diff --git a/AUTHORS b/AUTHORS
index 7a80d85b..2045c62 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -58,6 +58,7 @@
 Anssi Hannula <anssi.hannula@iki.fi>
 Antonio Gomes <a1.gomes@sisa.samsung.com>
 Anuj Kumar Sharma <anujk.sharma@samsung.com>
+Armin Burgmeier <aburgmeier@bloomberg.net>
 Arnaud Renevier <a.renevier@samsung.com>
 Arpita Bahuguna <a.bah@samsung.com>
 Arthur Lussos <developer0420@gmail.com>
diff --git a/BUILD.gn b/BUILD.gn
index fa73308..b017c94 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -873,13 +873,8 @@
 
     if (is_win) {
       deps += [
-        "//chrome/tools/crash_service",
         # "//gpu:angle_perftests", TODO(GYP): crbug.com/537008
       ]
-
-      if (target_cpu == "x86") {
-        deps += [ "//chrome/tools/crash_service:crash_service_win64" ]
-      }
     } else {
       deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
     }
diff --git a/DEPS b/DEPS
index b16e997..2c9d2ac 100644
--- a/DEPS
+++ b/DEPS
@@ -100,7 +100,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': '8dd4655214cc297a23bf16d4518d1f61cff98f89',
+  'catapult_revision': 'ea94b86fc8dade373c2fea89607933da396afa11',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
diff --git a/android_webview/browser/net/aw_cookie_store_wrapper.cc b/android_webview/browser/net/aw_cookie_store_wrapper.cc
index 2c4531f3..7195ef2 100644
--- a/android_webview/browser/net/aw_cookie_store_wrapper.cc
+++ b/android_webview/browser/net/aw_cookie_store_wrapper.cc
@@ -167,13 +167,13 @@
                                                  callback);
 }
 
-void DeleteAllCreatedBetweenForHostAsyncOnCookieThread(
-    const base::Time delete_begin,
-    const base::Time delete_end,
-    const GURL& url,
+void DeleteAllCreatedBetweenWithPredicateAsyncOnCookieThread(
+    const base::Time& delete_begin,
+    const base::Time& delete_end,
+    const net::CookieStore::CookiePredicate& predicate,
     const net::CookieStore::DeleteCallback& callback) {
-  GetCookieStore()->DeleteAllCreatedBetweenForHostAsync(
-      delete_begin, delete_end, url, callback);
+  GetCookieStore()->DeleteAllCreatedBetweenWithPredicateAsync(
+      delete_begin, delete_end, predicate, callback);
 }
 
 void DeleteSessionCookiesAsyncOnCookieThread(
@@ -287,15 +287,15 @@
                  delete_end, CreateWrappedCallback<int>(callback)));
 }
 
-void AwCookieStoreWrapper::DeleteAllCreatedBetweenForHostAsync(
-    const base::Time delete_begin,
-    const base::Time delete_end,
-    const GURL& url,
+void AwCookieStoreWrapper::DeleteAllCreatedBetweenWithPredicateAsync(
+    const base::Time& delete_begin,
+    const base::Time& delete_end,
+    const CookiePredicate& predicate,
     const DeleteCallback& callback) {
   DCHECK(client_task_runner_->RunsTasksOnCurrentThread());
   PostTaskToCookieStoreTaskRunner(base::Bind(
-      &DeleteAllCreatedBetweenForHostAsyncOnCookieThread, delete_begin,
-      delete_end, url, CreateWrappedCallback<int>(callback)));
+      &DeleteAllCreatedBetweenWithPredicateAsyncOnCookieThread, delete_begin,
+      delete_end, predicate, CreateWrappedCallback<int>(callback)));
 }
 
 void AwCookieStoreWrapper::DeleteSessionCookiesAsync(
diff --git a/android_webview/browser/net/aw_cookie_store_wrapper.h b/android_webview/browser/net/aw_cookie_store_wrapper.h
index c9bec7ab..61d61b2 100644
--- a/android_webview/browser/net/aw_cookie_store_wrapper.h
+++ b/android_webview/browser/net/aw_cookie_store_wrapper.h
@@ -72,10 +72,10 @@
   void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
                                     const base::Time& delete_end,
                                     const DeleteCallback& callback) override;
-  void DeleteAllCreatedBetweenForHostAsync(
-      const base::Time delete_begin,
-      const base::Time delete_end,
-      const GURL& url,
+  void DeleteAllCreatedBetweenWithPredicateAsync(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const CookiePredicate& predicate,
       const DeleteCallback& callback) override;
   void DeleteSessionCookiesAsync(const DeleteCallback& callback) override;
   void FlushStore(const base::Closure& callback) override;
diff --git a/android_webview/tools/cts_config/expected_failure_on_bot.json b/android_webview/tools/cts_config/expected_failure_on_bot.json
new file mode 100644
index 0000000..a4c8d64
--- /dev/null
+++ b/android_webview/tools/cts_config/expected_failure_on_bot.json
@@ -0,0 +1,37 @@
+{
+  "android.webkit.cts.WebSettingsTest":[
+    {
+      "name": "testUserAgentString_default"
+    }
+  ],
+  "android.webkit.cts.WebChromeClientTest":[
+    {
+      "name": "testOnJsBeforeUnload",
+      "_bug_id": "crbug.com/594573"
+    }
+  ],
+  "android.webkit.cts.WebViewTest":[
+    {
+      "name": "testPageScroll",
+      "_bug_id": "crbug.com/534643"
+    },
+    {
+      "name": "testStopLoading",
+      "_bug_id": "crbug.com/514474"
+    },
+    {
+      "name": "testJavascriptInterfaceForClientPopup",
+      "_bug_id": "crbug.com/563493"
+    },
+    {
+      "name": "testRequestImageRef",
+      "_bug_id": "crbug.com/563493"
+    }
+  ],
+  "android.webkit.cts.WebViewSslTest":[
+    {
+      "name": "testSslErrorProceedResponseNotReusedForDifferentHost",
+      "_bug_id": "crbug.com/514473"
+    }
+  ]
+}
diff --git a/android_webview/tools/cts_config/webview_cts_gcs_path.txt b/android_webview/tools/cts_config/webview_cts_gcs_path.txt
new file mode 100644
index 0000000..41fd3b8
--- /dev/null
+++ b/android_webview/tools/cts_config/webview_cts_gcs_path.txt
@@ -0,0 +1 @@
+android-cts-5.1_r5-linux_x86-arm.zip
diff --git a/ash/ash.gyp b/ash/ash.gyp
index be76e38..3ef16eb 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -519,8 +519,6 @@
       'volume_control_delegate.h',
       'wm/always_on_top_controller.cc',
       'wm/always_on_top_controller.h',
-      'wm/app_list_controller.cc',
-      'wm/app_list_controller.h',
       'wm/ash_focus_rules.cc',
       'wm/ash_focus_rules.h',
       'wm/ash_native_cursor_manager.cc',
@@ -702,8 +700,6 @@
       'desktop_background/desktop_background_controller_test_api.h',
       'shell/toplevel_window.cc',
       'shell/toplevel_window.h',
-      'test/app_list_controller_test_api.cc',
-      'test/app_list_controller_test_api.h',
       'test/ash_test_base.cc',
       'test/ash_test_base.h',
       'test/ash_test_helper.cc',
@@ -818,9 +814,7 @@
       'accelerators/accelerator_table_unittest.cc',
       'accelerators/magnifier_key_scroller_unittest.cc',
       'accelerators/spoken_feedback_toggler_unittest.cc',
-      # TODO(mfomitchev): uncomment when ash::Shell is switched to using
-      # app_list::AppListShower instead of ash::AppListController.
-#      'app_list/app_list_shower_delegate_unittest.cc',
+      'app_list/app_list_shower_delegate_unittest.cc',
       'ash_touch_exploration_manager_chromeos_unittest.cc',
       'autoclick/autoclick_unittest.cc',
       'content/display/screen_orientation_controller_chromeos_unittest.cc',
@@ -908,7 +902,6 @@
       'utility/partial_screenshot_controller_unittest.cc',
       'virtual_keyboard_controller_unittest.cc',
       'wm/always_on_top_controller_unittest.cc',
-      'wm/app_list_controller_unittest.cc',
       'wm/ash_native_cursor_manager_unittest.cc',
       'wm/ash_focus_rules_unittest.cc',
       'wm/dock/docked_window_layout_manager_unittest.cc',
diff --git a/ash/mus/shell_delegate_mus.cc b/ash/mus/shell_delegate_mus.cc
index 760b09c..8791307 100644
--- a/ash/mus/shell_delegate_mus.cc
+++ b/ash/mus/shell_delegate_mus.cc
@@ -164,7 +164,7 @@
   NOTIMPLEMENTED();
 }
 
-app_list::AppListViewDelegate* ShellDelegateMus::GetAppListViewDelegate() {
+app_list::AppListShower* ShellDelegateMus::GetAppListShower() {
   NOTIMPLEMENTED();
   return nullptr;
 }
diff --git a/ash/mus/shell_delegate_mus.h b/ash/mus/shell_delegate_mus.h
index 9d9ca5e8..537a1e4 100644
--- a/ash/mus/shell_delegate_mus.h
+++ b/ash/mus/shell_delegate_mus.h
@@ -39,7 +39,7 @@
   void RemoveVirtualKeyboardStateObserver(
       VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListViewDelegate* GetAppListViewDelegate() override;
+  app_list::AppListShower* GetAppListShower() override;
   ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
   ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
   ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
diff --git a/ash/shell.cc b/ash/shell.cc
index b4972ec0a..751706c4 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -57,7 +57,6 @@
 #include "ash/system/tray/system_tray_delegate.h"
 #include "ash/system/tray/system_tray_notifier.h"
 #include "ash/utility/partial_screenshot_controller.h"
-#include "ash/wm/app_list_controller.h"
 #include "ash/wm/ash_focus_rules.h"
 #include "ash/wm/ash_native_cursor_manager.h"
 #include "ash/wm/coordinate_conversion.h"
@@ -85,6 +84,7 @@
 #include "base/bind.h"
 #include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
+#include "ui/app_list/shower/app_list_shower.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/env.h"
 #include "ui/aura/layout_manager.h"
@@ -298,19 +298,15 @@
   // If the context window is not given, show it on the target root window.
   if (!window)
     window = GetTargetRootWindow();
-  if (!app_list_controller_)
-    app_list_controller_.reset(new AppListController);
-  app_list_controller_->Show(window);
+  delegate_->GetAppListShower()->Show(window);
 }
 
 void Shell::DismissAppList() {
-  if (!app_list_controller_)
-    return;
-  app_list_controller_->Dismiss();
+  delegate_->GetAppListShower()->Dismiss();
 }
 
 void Shell::ToggleAppList(aura::Window* window) {
-  if (app_list_controller_ && app_list_controller_->IsVisible()) {
+  if (delegate_->GetAppListShower()->IsVisible()) {
     DismissAppList();
     return;
   }
@@ -319,17 +315,7 @@
 }
 
 bool Shell::GetAppListTargetVisibility() const {
-  return app_list_controller_.get() &&
-      app_list_controller_->GetTargetVisibility();
-}
-
-aura::Window* Shell::GetAppListWindow() {
-  return app_list_controller_.get() ? app_list_controller_->GetWindow()
-                                    : nullptr;
-}
-
-app_list::AppListView* Shell::GetAppListView() {
-  return app_list_controller_.get() ? app_list_controller_->GetView() : nullptr;
+  return delegate_->GetAppListShower()->GetTargetVisibility();
 }
 
 bool Shell::IsSystemModalWindowOpen() const {
@@ -718,12 +704,6 @@
   // need to be removed.
   maximize_mode_controller_.reset();
 
-  // AppList needs to be released before shelf layout manager, which is
-  // destroyed with shelf container in the loop below. However, app list
-  // container is now on top of shelf container and released after it.
-  // TODO(xiyuan): Move it back when app list container is no longer needed.
-  app_list_controller_.reset();
-
 #if defined(OS_CHROMEOS)
   // Destroy the LastWindowClosedLogoutReminder before the
   // LogoutConfirmationController.
diff --git a/ash/shell.h b/ash/shell.h
index f6f3839..4654874 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -248,12 +248,6 @@
   // Returns app list target visibility.
   bool GetAppListTargetVisibility() const;
 
-  // Returns app list window or NULL if it is not visible.
-  aura::Window* GetAppListWindow();
-
-  // Returns app list view if one exists, or NULL otherwise.
-  app_list::AppListView* GetAppListView();
-
   // Returns true if a system-modal dialog window is currently open.
   bool IsSystemModalWindowOpen() const;
 
@@ -669,8 +663,6 @@
   std::unique_ptr<ShelfModel> shelf_model_;
   std::unique_ptr<WindowPositioner> window_positioner_;
 
-  std::unique_ptr<AppListController> app_list_controller_;
-
   std::unique_ptr<DragDropController> drag_drop_controller_;
   std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
   std::unique_ptr<::wm::ShadowController> shadow_controller_;
@@ -693,6 +685,7 @@
       partial_magnification_controller_;
   std::unique_ptr<AutoclickController> autoclick_controller_;
   std::unique_ptr<aura::client::FocusClient> focus_client_;
+
   aura::client::ActivationClient* activation_client_;
   std::unique_ptr<PartialScreenshotController> partial_screenshot_controller_;
 
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index 45e8acbc..0671bf6 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -5,6 +5,8 @@
 #include "ash/shell/shell_delegate_impl.h"
 
 #include "ash/accessibility_delegate.h"
+#include "ash/app_list/app_list_shower_delegate_factory.h"
+#include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/default_accessibility_delegate.h"
 #include "ash/default_user_wallpaper_delegate.h"
 #include "ash/gpu_support_stub.h"
@@ -19,10 +21,12 @@
 #include "ash/system/tray/default_system_tray_delegate.h"
 #include "ash/test/test_keyboard_ui.h"
 #include "ash/wm/window_state.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "components/user_manager/user_info_impl.h"
 #include "ui/app_list/app_list_view_delegate.h"
+#include "ui/app_list/shower/app_list_shower_impl.h"
 #include "ui/aura/window.h"
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia.h"
@@ -134,9 +138,30 @@
   DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateImpl);
 };
 
+class AppListViewDelegateFactoryImpl : public ash::AppListViewDelegateFactory {
+ public:
+  AppListViewDelegateFactoryImpl() {}
+  ~AppListViewDelegateFactoryImpl() override {}
+
+  // app_list::AppListViewDelegateFactory:
+  app_list::AppListViewDelegate* GetDelegate() override {
+    if (!app_list_view_delegate_.get())
+      app_list_view_delegate_.reset(CreateAppListViewDelegate());
+    return app_list_view_delegate_.get();
+  }
+
+ private:
+  std::unique_ptr<app_list::AppListViewDelegate> app_list_view_delegate_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl);
+};
+
 }  // namespace
 
-ShellDelegateImpl::ShellDelegateImpl() : shelf_delegate_(nullptr) {}
+ShellDelegateImpl::ShellDelegateImpl()
+    : shelf_delegate_(nullptr),
+      app_list_shower_delegate_factory_(new AppListShowerDelegateFactory(
+          base::WrapUnique(new AppListViewDelegateFactoryImpl))) {}
 
 ShellDelegateImpl::~ShellDelegateImpl() {}
 
@@ -191,10 +216,12 @@
 
 void ShellDelegateImpl::OpenUrl(const GURL& url) {}
 
-app_list::AppListViewDelegate* ShellDelegateImpl::GetAppListViewDelegate() {
-  if (!app_list_view_delegate_)
-    app_list_view_delegate_.reset(ash::shell::CreateAppListViewDelegate());
-  return app_list_view_delegate_.get();
+app_list::AppListShower* ShellDelegateImpl::GetAppListShower() {
+  if (!app_list_shower_) {
+    app_list_shower_.reset(new app_list::AppListShowerImpl(
+        app_list_shower_delegate_factory_.get()));
+  }
+  return app_list_shower_.get();
 }
 
 ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) {
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index c971d80..6c39567 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -12,6 +12,11 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 
+namespace app_list {
+class AppListShowerDelegateFactory;
+class AppListShowerImpl;
+}
+
 namespace keyboard {
 class KeyboardUI;
 }
@@ -42,7 +47,7 @@
   void RemoveVirtualKeyboardStateObserver(
       VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListViewDelegate* GetAppListViewDelegate() override;
+  app_list::AppListShower* GetAppListShower() override;
   ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
   ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
   ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
@@ -58,7 +63,9 @@
 
  private:
   ShelfDelegateImpl* shelf_delegate_;
-  std::unique_ptr<app_list::AppListViewDelegate> app_list_view_delegate_;
+  std::unique_ptr<app_list::AppListShowerDelegateFactory>
+      app_list_shower_delegate_factory_;
+  std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_;
 
   DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);
 };
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index 4a17a769..9224629 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -15,6 +15,7 @@
 class GURL;
 
 namespace app_list {
+class AppListShower;
 class AppListViewDelegate;
 }
 
@@ -112,9 +113,8 @@
   // Opens the |url| in a new browser tab.
   virtual void OpenUrl(const GURL& url) = 0;
 
-  // Get the AppListViewDelegate, creating one if it does not yet exist.
-  // Ownership stays with Chrome's AppListService, or the ShellDelegate.
-  virtual app_list::AppListViewDelegate* GetAppListViewDelegate() = 0;
+  // Get the AppListShower. Ownership stays with Chrome.
+  virtual app_list::AppListShower* GetAppListShower() = 0;
 
   // Creates a new ShelfDelegate. Shell takes ownership of the returned
   // value.
diff --git a/ash/test/app_list_controller_test_api.cc b/ash/test/app_list_controller_test_api.cc
deleted file mode 100644
index 6201e9ba4..0000000
--- a/ash/test/app_list_controller_test_api.cc
+++ /dev/null
@@ -1,40 +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 "ash/test/app_list_controller_test_api.h"
-
-#include "ash/test/shell_test_api.h"
-#include "ash/wm/app_list_controller.h"
-#include "ui/app_list/views/app_list_main_view.h"
-#include "ui/app_list/views/app_list_view.h"
-#include "ui/app_list/views/apps_container_view.h"
-#include "ui/app_list/views/apps_grid_view.h"
-#include "ui/app_list/views/contents_view.h"
-#include "ui/app_list/views/start_page_view.h"
-
-namespace ash {
-namespace test {
-
-AppListControllerTestApi::AppListControllerTestApi(Shell* shell)
-    : app_list_controller_(ShellTestApi(shell).app_list_controller()) {}
-
-app_list::AppsGridView* AppListControllerTestApi::GetRootGridView() const {
-  return view()->app_list_main_view()->contents_view()->
-      apps_container_view()->apps_grid_view();
-}
-
-app_list::StartPageView* AppListControllerTestApi::GetStartPageView() const {
-  return view()->app_list_main_view()->contents_view()->start_page_view();
-}
-
-app_list::AppListView* AppListControllerTestApi::view() const {
-  return app_list_controller_->view_;
-}
-
-void AppListControllerTestApi::LayoutContentsView() {
-  view()->app_list_main_view()->contents_view()->Layout();
-}
-
-}  // namespace test
-}  // namespace ash
diff --git a/ash/test/app_list_controller_test_api.h b/ash/test/app_list_controller_test_api.h
deleted file mode 100644
index b0fadc36..0000000
--- a/ash/test/app_list_controller_test_api.h
+++ /dev/null
@@ -1,47 +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 ASH_TEST_APP_LIST_CONTROLLER_TEST_API_H_
-#define ASH_TEST_APP_LIST_CONTROLLER_TEST_API_H_
-
-#include "base/macros.h"
-
-namespace app_list {
-class AppListView;
-class AppsGridView;
-class StartPageView;
-}
-
-namespace ash {
-class AppListController;
-class Shell;
-
-namespace test {
-
-// Accesses private data from an AppListController for testing.
-class AppListControllerTestApi {
- public:
-  explicit AppListControllerTestApi(Shell* shell);
-
-  // Gets the root level apps grid view.
-  app_list::AppsGridView* GetRootGridView() const;
-
-  // Gets the start page view.
-  app_list::StartPageView* GetStartPageView() const;
-
-  app_list::AppListView* view() const;
-
-  // Calls Layout() on the ContentsView.
-  void LayoutContentsView();
-
- private:
-  AppListController* app_list_controller_;  // Not owned.
-
-  DISALLOW_COPY_AND_ASSIGN(AppListControllerTestApi);
-};
-
-}  // namespace test
-}  // namespace ash
-
-#endif  // ASH_TEST_APP_LIST_CONTROLLER_TEST_API_H_
diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc
index 7d13801..9be1561 100644
--- a/ash/test/shell_test_api.cc
+++ b/ash/test/shell_test_api.cc
@@ -9,6 +9,7 @@
 #include "ash/session/session_state_delegate.h"
 #include "ash/shelf/shelf_delegate.h"
 #include "ash/shell.h"
+#include "ash/shell_delegate.h"
 
 namespace ash {
 namespace test {
@@ -43,8 +44,8 @@
   return shell_->drag_drop_controller_.get();
 }
 
-AppListController* ShellTestApi::app_list_controller() {
-  return shell_->app_list_controller_.get();
+app_list::AppListShower* ShellTestApi::app_list_shower() {
+  return shell_->delegate_->GetAppListShower();
 }
 
 void ShellTestApi::DisableDisplayAnimator() {
diff --git a/ash/test/shell_test_api.h b/ash/test/shell_test_api.h
index b144f0b..54c8684 100644
--- a/ash/test/shell_test_api.h
+++ b/ash/test/shell_test_api.h
@@ -7,8 +7,11 @@
 
 #include "base/macros.h"
 
+namespace app_list {
+class AppListShower;
+}
+
 namespace ash {
-class AppListController;
 class AshNativeCursorManager;
 class DragDropController;
 class MaximizeModeWindowManager;
@@ -35,7 +38,7 @@
   AshNativeCursorManager* ash_native_cursor_manager();
   ShelfModel* shelf_model();
   DragDropController* drag_drop_controller();
-  AppListController* app_list_controller();
+  app_list::AppListShower* app_list_shower();
   MaximizeModeWindowManager* maximize_mode_window_manager();
   void DisableDisplayAnimator();
 
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index fbfb219..ca44f6ed 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -6,6 +6,9 @@
 
 #include <limits>
 
+#include "ash/app_list/app_list_shower_delegate.h"
+#include "ash/app_list/app_list_shower_delegate_factory.h"
+#include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/default_accessibility_delegate.h"
 #include "ash/gpu_support_stub.h"
 #include "ash/media_delegate.h"
@@ -21,8 +24,8 @@
 #include "ash/wm/window_state.h"
 #include "ash/wm/window_util.h"
 #include "base/logging.h"
-#include "ui/app_list/app_list_model.h"
-#include "ui/app_list/app_list_view_delegate.h"
+#include "base/memory/ptr_util.h"
+#include "ui/app_list/shower/app_list_shower_impl.h"
 #include "ui/app_list/test/app_list_test_view_delegate.h"
 #include "ui/aura/window.h"
 #include "ui/gfx/image/image.h"
@@ -76,12 +79,34 @@
   DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl);
 };
 
+class AppListViewDelegateFactoryImpl : public ash::AppListViewDelegateFactory {
+ public:
+  AppListViewDelegateFactoryImpl() {}
+  ~AppListViewDelegateFactoryImpl() override {}
+
+  // app_list::AppListViewDelegateFactory:
+  app_list::AppListViewDelegate* GetDelegate() override {
+    if (!app_list_view_delegate_.get()) {
+      app_list_view_delegate_.reset(
+          new app_list::test::AppListTestViewDelegate);
+    }
+    return app_list_view_delegate_.get();
+  }
+
+ private:
+  std::unique_ptr<app_list::AppListViewDelegate> app_list_view_delegate_;
+
+  DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl);
+};
+
 }  // namespace
 
 TestShellDelegate::TestShellDelegate()
     : num_exit_requests_(0),
       multi_profiles_enabled_(false),
-      force_maximize_on_first_run_(false) {}
+      force_maximize_on_first_run_(false),
+      app_list_shower_delegate_factory_(new AppListShowerDelegateFactory(
+          base::WrapUnique(new AppListViewDelegateFactoryImpl))) {}
 
 TestShellDelegate::~TestShellDelegate() {
 }
@@ -142,10 +167,12 @@
 
 void TestShellDelegate::OpenUrl(const GURL& url) {}
 
-app_list::AppListViewDelegate* TestShellDelegate::GetAppListViewDelegate() {
-  if (!app_list_view_delegate_)
-    app_list_view_delegate_.reset(new app_list::test::AppListTestViewDelegate);
-  return app_list_view_delegate_.get();
+app_list::AppListShower* TestShellDelegate::GetAppListShower() {
+  if (!app_list_shower_) {
+    app_list_shower_.reset(new app_list::AppListShowerImpl(
+        app_list_shower_delegate_factory_.get()));
+  }
+  return app_list_shower_.get();
 }
 
 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 63727c0..e43cef6 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -15,6 +15,11 @@
 #include "base/macros.h"
 #include "base/observer_list.h"
 
+namespace app_list {
+class AppListShowerDelegateFactory;
+class AppListShowerImpl;
+}
+
 namespace keyboard {
 class KeyboardUI;
 }
@@ -48,7 +53,7 @@
   void RemoveVirtualKeyboardStateObserver(
       VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListViewDelegate* GetAppListViewDelegate() override;
+  app_list::AppListShower* GetAppListShower() override;
   ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override;
   SystemTrayDelegate* CreateSystemTrayDelegate() override;
   UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
@@ -64,6 +69,10 @@
 
   int num_exit_requests() const { return num_exit_requests_; }
 
+  app_list::AppListShowerImpl* app_list_shower() {
+    return app_list_shower_.get();
+  }
+
   void SetMediaCaptureState(MediaCaptureState state);
   void SetForceMaximizeOnFirstRun(bool maximize) {
     force_maximize_on_first_run_ = maximize;
@@ -74,7 +83,9 @@
   bool multi_profiles_enabled_;
   bool force_maximize_on_first_run_;
 
-  std::unique_ptr<app_list::AppListViewDelegate> app_list_view_delegate_;
+  std::unique_ptr<app_list::AppListShowerDelegateFactory>
+      app_list_shower_delegate_factory_;
+  std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_;
 
   base::ObserverList<ash::VirtualKeyboardStateObserver>
       keyboard_state_observer_list_;
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
deleted file mode 100644
index 823c3273..0000000
--- a/ash/wm/app_list_controller.cc
+++ /dev/null
@@ -1,557 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/app_list_controller.h"
-
-#include "ash/ash_switches.h"
-#include "ash/root_window_controller.h"
-#include "ash/screen_util.h"
-#include "ash/shelf/shelf.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/maximize_mode/maximize_mode_controller.h"
-#include "base/command_line.h"
-#include "ui/app_list/app_list_constants.h"
-#include "ui/app_list/app_list_switches.h"
-#include "ui/app_list/pagination_model.h"
-#include "ui/app_list/views/app_list_view.h"
-#include "ui/aura/client/focus_client.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/events/event.h"
-#include "ui/gfx/transform_util.h"
-#include "ui/keyboard/keyboard_controller.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-namespace {
-
-// Duration for show/hide animation in milliseconds.
-const int kAnimationDurationMs = 200;
-
-// Offset in pixels to animation away/towards the shelf.
-const int kAnimationOffset = 8;
-
-// The maximum shift in pixels when over-scroll happens.
-const int kMaxOverScrollShift = 48;
-
-// The minimal anchor position offset to make sure that the bubble is still on
-// the screen with 8 pixels spacing on the left / right. This constant is a
-// result of minimal bubble arrow sizes and offsets.
-const int kMinimalAnchorPositionOffset = 57;
-
-// The minimal margin (in pixels) around the app list when in centered mode.
-const int kMinimalCenteredAppListMargin = 10;
-
-ui::Layer* GetLayer(views::Widget* widget) {
-  return widget->GetNativeView()->layer();
-}
-
-// Gets arrow location based on shelf alignment.
-views::BubbleBorder::Arrow GetBubbleArrow(aura::Window* window) {
-  DCHECK(Shell::HasInstance());
-  return Shelf::ForWindow(window)->SelectValueForShelfAlignment(
-      views::BubbleBorder::BOTTOM_CENTER, views::BubbleBorder::LEFT_CENTER,
-      views::BubbleBorder::RIGHT_CENTER);
-}
-
-// Offset given |rect| towards shelf.
-gfx::Rect OffsetTowardsShelf(const gfx::Rect& rect, views::Widget* widget) {
-  DCHECK(Shell::HasInstance());
-  ShelfAlignment shelf_alignment = Shell::GetInstance()->GetShelfAlignment(
-      widget->GetNativeView()->GetRootWindow());
-  gfx::Rect offseted(rect);
-  switch (shelf_alignment) {
-    case SHELF_ALIGNMENT_BOTTOM:
-      offseted.Offset(0, kAnimationOffset);
-      break;
-    case SHELF_ALIGNMENT_LEFT:
-      offseted.Offset(-kAnimationOffset, 0);
-      break;
-    case SHELF_ALIGNMENT_RIGHT:
-      offseted.Offset(kAnimationOffset, 0);
-      break;
-  }
-
-  return offseted;
-}
-
-// Using |button_bounds|, determine the anchor offset so that the bubble gets
-// shown above the shelf (used for the alternate shelf theme).
-gfx::Vector2d GetAnchorPositionOffsetToShelf(
-    const gfx::Rect& button_bounds, views::Widget* widget) {
-  DCHECK(Shell::HasInstance());
-  ShelfAlignment shelf_alignment = Shell::GetInstance()->GetShelfAlignment(
-      widget->GetNativeView()->GetRootWindow());
-  gfx::Point anchor(button_bounds.CenterPoint());
-  switch (shelf_alignment) {
-    case SHELF_ALIGNMENT_BOTTOM:
-      if (base::i18n::IsRTL()) {
-        int screen_width = widget->GetWorkAreaBoundsInScreen().width();
-        return gfx::Vector2d(
-            std::min(screen_width - kMinimalAnchorPositionOffset - anchor.x(),
-                     0), 0);
-      }
-      return gfx::Vector2d(
-          std::max(kMinimalAnchorPositionOffset - anchor.x(), 0), 0);
-    case SHELF_ALIGNMENT_LEFT:
-      return gfx::Vector2d(
-          0, std::max(kMinimalAnchorPositionOffset - anchor.y(), 0));
-    case SHELF_ALIGNMENT_RIGHT:
-      return gfx::Vector2d(
-          0, std::max(kMinimalAnchorPositionOffset - anchor.y(), 0));
-  }
-  NOTREACHED();
-  return gfx::Vector2d();
-}
-
-// Gets the point at the center of the display that a particular view is on.
-// This calculation excludes the virtual keyboard area. If the height of the
-// display area is less than |minimum_height|, its bottom will be extended to
-// that height (so that the app list never starts above the top of the screen).
-gfx::Point GetCenterOfDisplayForView(const views::View* view,
-                                     int minimum_height) {
-  aura::Window* window = view->GetWidget()->GetNativeView();
-  gfx::Rect bounds = ScreenUtil::GetShelfDisplayBoundsInRoot(window);
-  bounds = ScreenUtil::ConvertRectToScreen(window->GetRootWindow(), bounds);
-
-  // If the virtual keyboard is active, subtract it from the display bounds, so
-  // that the app list is centered in the non-keyboard area of the display.
-  // (Note that work_area excludes the keyboard, but it doesn't get updated
-  // until after this function is called.)
-  keyboard::KeyboardController* keyboard_controller =
-      keyboard::KeyboardController::GetInstance();
-  if (keyboard_controller && keyboard_controller->keyboard_visible())
-    bounds.Subtract(keyboard_controller->current_keyboard_bounds());
-
-  // Apply the |minimum_height|.
-  if (bounds.height() < minimum_height)
-    bounds.set_height(minimum_height);
-
-  return bounds.CenterPoint();
-}
-
-// Gets the minimum height of the rectangle to center the app list in.
-int GetMinimumBoundsHeightForAppList(const app_list::AppListView* app_list) {
-  return app_list->bounds().height() + 2 * kMinimalCenteredAppListMargin;
-}
-
-bool IsFullscreenAppListEnabled() {
-#if defined(OS_CHROMEOS)
-  return base::CommandLine::ForCurrentProcess()->HasSwitch(
-             switches::kAshEnableFullscreenAppList) &&
-         app_list::switches::IsExperimentalAppListEnabled();
-#else
-  return false;
-#endif
-}
-
-}  // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, public:
-
-AppListController::AppListController()
-    : is_visible_(false),
-      is_centered_(false),
-      view_(NULL),
-      current_apps_page_(-1),
-      should_snap_back_(false) {
-  Shell::GetInstance()->AddShellObserver(this);
-}
-
-AppListController::~AppListController() {
-  // Ensures app list view goes before the controller since pagination model
-  // lives in the controller and app list view would access it on destruction.
-  if (view_) {
-    view_->GetAppsPaginationModel()->RemoveObserver(this);
-    if (view_->GetWidget())
-      view_->GetWidget()->CloseNow();
-  }
-
-  Shell::GetInstance()->RemoveShellObserver(this);
-}
-
-void AppListController::Show(aura::Window* window) {
-  if (is_visible_)
-    return;
-
-  is_visible_ = true;
-
-  // App list needs to know the new shelf layout in order to calculate its
-  // UI layout when AppListView visibility changes.
-  Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()->
-      UpdateAutoHideState();
-
-  if (view_) {
-    ScheduleAnimation();
-  } else {
-    // Note the AppListViewDelegate outlives the AppListView. For Ash, the view
-    // is destroyed when dismissed.
-    app_list::AppListView* view = new app_list::AppListView(
-        Shell::GetInstance()->delegate()->GetAppListViewDelegate());
-    aura::Window* root_window = window->GetRootWindow();
-    aura::Window* container = GetRootWindowController(root_window)->
-        GetContainer(kShellWindowId_AppListContainer);
-    views::View* applist_button =
-        Shelf::ForWindow(container)->GetAppListButtonView();
-    is_centered_ = view->ShouldCenterWindow();
-    bool is_fullscreen = IsFullscreenAppListEnabled() &&
-                         Shell::GetInstance()
-                             ->maximize_mode_controller()
-                             ->IsMaximizeModeWindowManagerEnabled();
-    if (is_fullscreen) {
-      view->InitAsFramelessWindow(
-          container, current_apps_page_,
-          ScreenUtil::GetDisplayWorkAreaBoundsInParent(container));
-    } else if (is_centered_) {
-      // Note: We can't center the app list until we have its dimensions, so we
-      // init at (0, 0) and then reset its anchor point.
-      view->InitAsBubbleAtFixedLocation(container,
-                                        current_apps_page_,
-                                        gfx::Point(),
-                                        views::BubbleBorder::FLOAT,
-                                        true /* border_accepts_events */);
-      // The experimental app list is centered over the display of the app list
-      // button that was pressed (if triggered via keyboard, this is the display
-      // with the currently focused window).
-      view->SetAnchorPoint(GetCenterOfDisplayForView(
-          applist_button, GetMinimumBoundsHeightForAppList(view)));
-    } else {
-      gfx::Rect applist_button_bounds = applist_button->GetBoundsInScreen();
-      // We need the location of the button within the local screen.
-      applist_button_bounds = ScreenUtil::ConvertRectFromScreen(
-          root_window,
-          applist_button_bounds);
-      view->InitAsBubbleAttachedToAnchor(
-          container,
-          current_apps_page_,
-          Shelf::ForWindow(container)->GetAppListButtonView(),
-          GetAnchorPositionOffsetToShelf(
-              applist_button_bounds,
-              Shelf::ForWindow(container)->GetAppListButtonView()->GetWidget()),
-          GetBubbleArrow(container),
-          true /* border_accepts_events */);
-      view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
-    }
-    SetView(view);
-    // By setting us as DnD recipient, the app list knows that we can
-    // handle items.
-    SetDragAndDropHostOfCurrentAppList(
-        Shelf::ForWindow(window)->GetDragAndDropHostForAppList());
-  }
-  // Update applist button status when app list visibility is changed.
-  Shelf::ForWindow(window)->GetAppListButtonView()->SchedulePaint();
-}
-
-void AppListController::Dismiss() {
-  if (!is_visible_)
-    return;
-
-  // If the app list is currently visible, there should be an existing view.
-  DCHECK(view_);
-
-  is_visible_ = false;
-
-  // App list needs to know the new shelf layout in order to calculate its
-  // UI layout when AppListView visibility changes.
-  Shell::GetPrimaryRootWindowController()
-      ->GetShelfLayoutManager()
-      ->UpdateAutoHideState();
-
-  // Our widget is currently active. When the animation completes we'll hide
-  // the widget, changing activation. If a menu is shown before the animation
-  // completes then the activation change triggers the menu to close. By
-  // deactivating now we ensure there is no activation change when the
-  // animation completes and any menus stay open.
-  view_->GetWidget()->Deactivate();
-  ScheduleAnimation();
-
-  // Update applist button status when app list visibility is changed.
-  Shelf::ForWindow(view_->GetWidget()->GetNativeView())
-      ->GetAppListButtonView()
-      ->SchedulePaint();
-}
-
-bool AppListController::IsVisible() const {
-  return view_ && view_->GetWidget()->IsVisible();
-}
-
-aura::Window* AppListController::GetWindow() {
-  return is_visible_ && view_ ? view_->GetWidget()->GetNativeWindow() : NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, private:
-
-void AppListController::SetDragAndDropHostOfCurrentAppList(
-    app_list::ApplicationDragAndDropHost* drag_and_drop_host) {
-  if (view_ && is_visible_)
-    view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
-}
-
-void AppListController::SetView(app_list::AppListView* view) {
-  DCHECK(view_ == NULL);
-  DCHECK(is_visible_);
-
-  view_ = view;
-  views::Widget* widget = view_->GetWidget();
-  widget->AddObserver(this);
-  keyboard::KeyboardController* keyboard_controller =
-      keyboard::KeyboardController::GetInstance();
-  if (keyboard_controller)
-    keyboard_controller->AddObserver(this);
-  Shell::GetInstance()->AddPreTargetHandler(this);
-  Shelf::ForWindow(widget->GetNativeWindow())->AddIconObserver(this);
-  widget->GetNativeView()->GetRootWindow()->AddObserver(this);
-  aura::client::GetFocusClient(widget->GetNativeView())->AddObserver(this);
-
-  view_->GetAppsPaginationModel()->AddObserver(this);
-
-  view_->ShowWhenReady();
-}
-
-void AppListController::ResetView() {
-  if (!view_)
-    return;
-
-  views::Widget* widget = view_->GetWidget();
-  widget->RemoveObserver(this);
-  GetLayer(widget)->GetAnimator()->RemoveObserver(this);
-  keyboard::KeyboardController* keyboard_controller =
-      keyboard::KeyboardController::GetInstance();
-  if (keyboard_controller)
-    keyboard_controller->RemoveObserver(this);
-  Shell::GetInstance()->RemovePreTargetHandler(this);
-  Shelf::ForWindow(widget->GetNativeWindow())->RemoveIconObserver(this);
-  widget->GetNativeView()->GetRootWindow()->RemoveObserver(this);
-  aura::client::GetFocusClient(widget->GetNativeView())->RemoveObserver(this);
-
-  view_->GetAppsPaginationModel()->RemoveObserver(this);
-
-  view_ = NULL;
-}
-
-void AppListController::ScheduleAnimation() {
-  // Stop observing previous animation.
-  StopObservingImplicitAnimations();
-
-  views::Widget* widget = view_->GetWidget();
-  ui::Layer* layer = GetLayer(widget);
-  layer->GetAnimator()->StopAnimating();
-
-  gfx::Rect target_bounds;
-  if (is_visible_) {
-    target_bounds = widget->GetWindowBoundsInScreen();
-    widget->SetBounds(OffsetTowardsShelf(target_bounds, widget));
-  } else {
-    target_bounds = OffsetTowardsShelf(widget->GetWindowBoundsInScreen(),
-                                       widget);
-  }
-
-  ui::ScopedLayerAnimationSettings animation(layer->GetAnimator());
-  animation.SetTransitionDuration(
-      base::TimeDelta::FromMilliseconds(
-          is_visible_ ? 0 : kAnimationDurationMs));
-  animation.AddObserver(this);
-
-  layer->SetOpacity(is_visible_ ? 1.0 : 0.0);
-  widget->SetBounds(target_bounds);
-}
-
-void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) {
-  if (!view_ || !is_visible_)
-    return;
-
-  // If the event happened on a menu, then the event should not close the app
-  // list.
-  aura::Window* target = static_cast<aura::Window*>(event->target());
-  if (target) {
-    RootWindowController* root_controller =
-        GetRootWindowController(target->GetRootWindow());
-    if (root_controller) {
-      aura::Window* menu_container =
-          root_controller->GetContainer(kShellWindowId_MenuContainer);
-      if (menu_container->Contains(target))
-        return;
-      aura::Window* keyboard_container = root_controller->GetContainer(
-          kShellWindowId_VirtualKeyboardContainer);
-      if (keyboard_container->Contains(target))
-        return;
-    }
-  }
-
-  aura::Window* window = view_->GetWidget()->GetNativeView()->parent();
-  if (!window->Contains(target) &&
-      !app_list::switches::ShouldNotDismissOnBlur()) {
-    Dismiss();
-  }
-}
-
-void AppListController::UpdateBounds() {
-  if (!view_ || !is_visible_)
-    return;
-
-  view_->UpdateBounds();
-
-  if (is_centered_)
-    view_->SetAnchorPoint(GetCenterOfDisplayForView(
-        view_, GetMinimumBoundsHeightForAppList(view_)));
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, aura::EventFilter implementation:
-
-void AppListController::OnMouseEvent(ui::MouseEvent* event) {
-  if (event->type() == ui::ET_MOUSE_PRESSED)
-    ProcessLocatedEvent(event);
-}
-
-void AppListController::OnGestureEvent(ui::GestureEvent* event) {
-  if (event->type() == ui::ET_GESTURE_TAP_DOWN)
-    ProcessLocatedEvent(event);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController,  aura::FocusObserver implementation:
-
-void AppListController::OnWindowFocused(aura::Window* gained_focus,
-                                        aura::Window* lost_focus) {
-  if (view_ && is_visible_) {
-    aura::Window* applist_window = view_->GetWidget()->GetNativeView();
-    aura::Window* applist_container = applist_window->parent();
-
-    if (applist_container->Contains(lost_focus) &&
-        (!gained_focus || !applist_container->Contains(gained_focus)) &&
-        !app_list::switches::ShouldNotDismissOnBlur()) {
-      Dismiss();
-    }
-  }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController,  aura::WindowObserver implementation:
-void AppListController::OnWindowBoundsChanged(aura::Window* root,
-                                              const gfx::Rect& old_bounds,
-                                              const gfx::Rect& new_bounds) {
-  UpdateBounds();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, ui::ImplicitAnimationObserver implementation:
-
-void AppListController::OnImplicitAnimationsCompleted() {
-  if (is_visible_ )
-    view_->GetWidget()->Activate();
-  else
-    view_->GetWidget()->Close();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, views::WidgetObserver implementation:
-
-void AppListController::OnWidgetDestroying(views::Widget* widget) {
-  DCHECK(view_->GetWidget() == widget);
-  if (is_visible_)
-    Dismiss();
-  ResetView();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, keyboard::KeyboardControllerObserver implementation:
-
-void AppListController::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
-  UpdateBounds();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, ShellObserver implementation:
-void AppListController::OnShelfAlignmentChanged(aura::Window* root_window) {
-  if (view_)
-    view_->SetBubbleArrow(GetBubbleArrow(view_->GetWidget()->GetNativeView()));
-}
-
-void AppListController::OnMaximizeModeStarted() {
-  // The "fullscreen" app-list is initialized as in a different type of window,
-  // therefore we can't switch between the fullscreen status and the normal
-  // app-list bubble. App-list should be dismissed for the transition between
-  // maximize mode (touch-view mode) and non-maximize mode, otherwise the app
-  // list tries to behave as a bubble which leads to a crash. crbug.com/510062
-  if (IsFullscreenAppListEnabled() && is_visible_)
-    Dismiss();
-}
-
-void AppListController::OnMaximizeModeEnded() {
-  // See the comments of OnMaximizeModeStarted().
-  if (IsFullscreenAppListEnabled() && is_visible_)
-    Dismiss();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, ShelfIconObserver implementation:
-
-void AppListController::OnShelfIconPositionsChanged() {
-  UpdateBounds();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AppListController, PaginationModelObserver implementation:
-
-void AppListController::TotalPagesChanged() {
-}
-
-void AppListController::SelectedPageChanged(int old_selected,
-                                            int new_selected) {
-  current_apps_page_ = new_selected;
-}
-
-void AppListController::TransitionStarted() {
-}
-
-void AppListController::TransitionChanged() {
-  // |view_| could be NULL when app list is closed with a running transition.
-  if (!view_)
-    return;
-
-  app_list::PaginationModel* pagination_model = view_->GetAppsPaginationModel();
-
-  const app_list::PaginationModel::Transition& transition =
-      pagination_model->transition();
-  if (pagination_model->is_valid_page(transition.target_page))
-    return;
-
-  views::Widget* widget = view_->GetWidget();
-  ui::LayerAnimator* widget_animator = GetLayer(widget)->GetAnimator();
-  if (!pagination_model->IsRevertingCurrentTransition()) {
-    // Update cached |view_bounds_| if it is the first over-scroll move and
-    // widget does not have running animations.
-    if (!should_snap_back_ && !widget_animator->is_animating())
-      view_bounds_ = widget->GetWindowBoundsInScreen();
-
-    const int current_page = pagination_model->selected_page();
-    const int dir = transition.target_page > current_page ? -1 : 1;
-
-    const double progress = 1.0 - pow(1.0 - transition.progress, 4);
-    const int shift = kMaxOverScrollShift * progress * dir;
-
-    gfx::Rect shifted(view_bounds_);
-    shifted.set_x(shifted.x() + shift);
-
-    widget->SetBounds(shifted);
-
-    should_snap_back_ = true;
-  } else if (should_snap_back_) {
-    should_snap_back_ = false;
-    ui::ScopedLayerAnimationSettings animation(widget_animator);
-    animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
-        app_list::kOverscrollPageTransitionDurationMs));
-    widget->SetBounds(view_bounds_);
-  }
-}
-
-}  // namespace ash
diff --git a/ash/wm/app_list_controller.h b/ash/wm/app_list_controller.h
deleted file mode 100644
index 1f3114c..0000000
--- a/ash/wm/app_list_controller.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_WM_APP_LIST_CONTROLLER_H_
-#define ASH_WM_APP_LIST_CONTROLLER_H_
-
-#include "ash/shelf/shelf_icon_observer.h"
-#include "ash/shell_observer.h"
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "ui/app_list/pagination_model_observer.h"
-#include "ui/aura/client/focus_change_observer.h"
-#include "ui/aura/window_observer.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/keyboard/keyboard_controller_observer.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace app_list {
-class ApplicationDragAndDropHost;
-class AppListView;
-}
-
-namespace ui {
-class LocatedEvent;
-}
-
-namespace ash {
-namespace test {
-class AppListControllerTestApi;
-}
-
-// AppListController is a controller that manages app list UI for shell.
-// It creates AppListView and schedules showing/hiding animation.
-// While the UI is visible, it monitors things such as app list widget's
-// activation state and desktop mouse click to auto dismiss the UI.
-class AppListController : public ui::EventHandler,
-                          public aura::client::FocusChangeObserver,
-                          public aura::WindowObserver,
-                          public ui::ImplicitAnimationObserver,
-                          public views::WidgetObserver,
-                          public keyboard::KeyboardControllerObserver,
-                          public ShellObserver,
-                          public ShelfIconObserver,
-                          public app_list::PaginationModelObserver {
- public:
-  AppListController();
-  ~AppListController() override;
-
-  // Show/hide app list window. The |window| is used to deterime in
-  // which display (in which the |window| exists) the app list should
-  // be shown.
-  void Show(aura::Window* window);
-  void Dismiss();
-
-  // Whether app list window is visible (shown or being shown).
-  bool IsVisible() const;
-
-  // Returns target visibility. This differs from IsVisible() if an animation
-  // is ongoing.
-  bool GetTargetVisibility() const { return is_visible_; }
-
-  // Returns app list window or NULL if it is not visible.
-  aura::Window* GetWindow();
-
-  // Returns app list view if one exists, or NULL otherwise.
-  app_list::AppListView* GetView() { return view_; }
-
- private:
-  friend class test::AppListControllerTestApi;
-
-  // If |drag_and_drop_host| is not NULL it will be called upon drag and drop
-  // operations outside the application list.
-  void SetDragAndDropHostOfCurrentAppList(
-      app_list::ApplicationDragAndDropHost* drag_and_drop_host);
-
-  // Sets the app list view and attempts to show it.
-  void SetView(app_list::AppListView* view);
-
-  // Forgets the view.
-  void ResetView();
-
-  // Starts show/hide animation.
-  void ScheduleAnimation();
-
-  void ProcessLocatedEvent(ui::LocatedEvent* event);
-
-  // Makes app list bubble update its bounds.
-  void UpdateBounds();
-
-  // ui::EventHandler overrides:
-  void OnMouseEvent(ui::MouseEvent* event) override;
-  void OnGestureEvent(ui::GestureEvent* event) override;
-
-  // aura::client::FocusChangeObserver overrides:
-  void OnWindowFocused(aura::Window* gained_focus,
-                       aura::Window* lost_focus) override;
-
-  // aura::WindowObserver overrides:
-  void OnWindowBoundsChanged(aura::Window* root,
-                             const gfx::Rect& old_bounds,
-                             const gfx::Rect& new_bounds) override;
-
-  // ui::ImplicitAnimationObserver overrides:
-  void OnImplicitAnimationsCompleted() override;
-
-  // views::WidgetObserver overrides:
-  void OnWidgetDestroying(views::Widget* widget) override;
-
-  // KeyboardControllerObserver overrides:
-  void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
-
-  // ShellObserver overrides:
-  void OnShelfAlignmentChanged(aura::Window* root_window) override;
-  void OnMaximizeModeStarted() override;
-  void OnMaximizeModeEnded() override;
-
-  // ShelfIconObserver overrides:
-  void OnShelfIconPositionsChanged() override;
-
-  // app_list::PaginationModelObserver overrides:
-  void TotalPagesChanged() override;
-  void SelectedPageChanged(int old_selected, int new_selected) override;
-  void TransitionStarted() override;
-  void TransitionChanged() override;
-
-  // Whether we should show or hide app list widget.
-  bool is_visible_;
-
-  // Whether the app list should remain centered.
-  bool is_centered_;
-
-  // The AppListView this class manages, owned by its widget.
-  app_list::AppListView* view_;
-
-  // The current page of the AppsGridView of |view_|. This is stored outside of
-  // the view's PaginationModel, so that it persists when the view is destroyed.
-  int current_apps_page_;
-
-  // Cached bounds of |view_| for snapping back animation after over-scroll.
-  gfx::Rect view_bounds_;
-
-  // Whether should schedule snap back animation.
-  bool should_snap_back_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppListController);
-};
-
-}  // namespace ash
-
-#endif  // ASH_WM_APP_LIST_CONTROLLER_H_
diff --git a/ash/wm/app_list_controller_unittest.cc b/ash/wm/app_list_controller_unittest.cc
deleted file mode 100644
index 4ac0e5b..0000000
--- a/ash/wm/app_list_controller_unittest.cc
+++ /dev/null
@@ -1,192 +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 <memory>
-
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/test/ash_test_base.h"
-#include "ash/test/test_shell_delegate.h"
-#include "ash/wm/window_util.h"
-#include "base/command_line.h"
-#include "ui/app_list/app_list_switches.h"
-#include "ui/app_list/views/app_list_view.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/events/test/event_generator.h"
-
-namespace ash {
-
-namespace {
-
-const int kMinimalCenteredAppListMargin = 10;
-
-}
-
-// The parameter is true to test the centered app list, false for normal.
-// (The test name ends in "/0" for normal, "/1" for centered.)
-class AppListControllerTest : public test::AshTestBase,
-                              public ::testing::WithParamInterface<bool> {
- public:
-  AppListControllerTest();
-  virtual ~AppListControllerTest();
-  void SetUp() override;
-
-  bool IsCentered() const;
-};
-
-AppListControllerTest::AppListControllerTest() {
-}
-
-AppListControllerTest::~AppListControllerTest() {
-}
-
-void AppListControllerTest::SetUp() {
-  AshTestBase::SetUp();
-  if (IsCentered()) {
-    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
-    command_line->AppendSwitch(app_list::switches::kEnableCenteredAppList);
-  }
-
-  // Make the display big enough to hold the experimental app list.
-  UpdateDisplay("1024x768");
-}
-
-bool AppListControllerTest::IsCentered() const {
-  return GetParam();
-}
-
-// Tests that app launcher hides when focus moves to a normal window.
-TEST_P(AppListControllerTest, HideOnFocusOut) {
-  Shell::GetInstance()->ShowAppList(NULL);
-  EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-
-  std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
-  wm::ActivateWindow(window.get());
-
-  EXPECT_FALSE(Shell::GetInstance()->GetAppListTargetVisibility());
-}
-
-// Tests that app launcher remains visible when focus is moved to a different
-// window in kShellWindowId_AppListContainer.
-TEST_P(AppListControllerTest, RemainVisibleWhenFocusingToApplistContainer) {
-  Shell::GetInstance()->ShowAppList(NULL);
-  EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-
-  aura::Window* applist_container = Shell::GetContainer(
-      Shell::GetPrimaryRootWindow(), kShellWindowId_AppListContainer);
-  std::unique_ptr<aura::Window> window(
-      aura::test::CreateTestWindowWithId(0, applist_container));
-  wm::ActivateWindow(window.get());
-
-  EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-}
-
-// Tests that clicking outside the app-list bubble closes it.
-TEST_P(AppListControllerTest, ClickOutsideBubbleClosesBubble) {
-  Shell* shell = Shell::GetInstance();
-  shell->ShowAppList(NULL);
-
-  aura::Window* app_window = shell->GetAppListWindow();
-  ASSERT_TRUE(app_window);
-  ui::test::EventGenerator generator(shell->GetPrimaryRootWindow(), app_window);
-  // Click on the bubble itself. The bubble should remain visible.
-  generator.ClickLeftButton();
-  EXPECT_TRUE(shell->GetAppListTargetVisibility());
-
-  // Click outside the bubble. This should close it.
-  gfx::Rect app_window_bounds = app_window->GetBoundsInRootWindow();
-  gfx::Point point_outside =
-      gfx::Point(app_window_bounds.right(), app_window_bounds.y()) +
-      gfx::Vector2d(10, 0);
-  EXPECT_TRUE(shell->GetPrimaryRootWindow()->bounds().Contains(point_outside));
-  generator.MoveMouseToInHost(point_outside);
-  generator.ClickLeftButton();
-  EXPECT_FALSE(shell->GetAppListTargetVisibility());
-}
-
-// Tests that clicking outside the app-list bubble closes it.
-TEST_P(AppListControllerTest, TapOutsideBubbleClosesBubble) {
-  Shell* shell = Shell::GetInstance();
-  shell->ShowAppList(NULL);
-
-  aura::Window* app_window = shell->GetAppListWindow();
-  ASSERT_TRUE(app_window);
-  gfx::Rect app_window_bounds = app_window->GetBoundsInRootWindow();
-
-  ui::test::EventGenerator generator(shell->GetPrimaryRootWindow());
-  // Click on the bubble itself. The bubble should remain visible.
-  generator.GestureTapAt(app_window_bounds.CenterPoint());
-  EXPECT_TRUE(shell->GetAppListTargetVisibility());
-
-  // Click outside the bubble. This should close it.
-  gfx::Point point_outside =
-      gfx::Point(app_window_bounds.right(), app_window_bounds.y()) +
-      gfx::Vector2d(10, 0);
-  EXPECT_TRUE(shell->GetPrimaryRootWindow()->bounds().Contains(point_outside));
-  generator.GestureTapAt(point_outside);
-  EXPECT_FALSE(shell->GetAppListTargetVisibility());
-}
-
-// Tests opening the app launcher on a non-primary display, then deleting the
-// display.
-TEST_P(AppListControllerTest, NonPrimaryDisplay) {
-  if (!SupportsMultipleDisplays())
-    return;
-
-  // Set up a screen with two displays (horizontally adjacent).
-  UpdateDisplay("1024x768,1024x768");
-
-  aura::Window::Windows root_windows = Shell::GetAllRootWindows();
-  ASSERT_EQ(2u, root_windows.size());
-  aura::Window* secondary_window = root_windows[1];
-  EXPECT_EQ("1024,0 1024x768",
-            secondary_window->GetBoundsInScreen().ToString());
-
-  Shell::GetInstance()->ShowAppList(secondary_window);
-  EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-
-  // Remove the secondary display. Shouldn't crash (http://crbug.com/368990).
-  UpdateDisplay("1024x768");
-
-  // Updating the displays should close the app list.
-  EXPECT_FALSE(Shell::GetInstance()->GetAppListTargetVisibility());
-}
-
-// Tests opening the app launcher on a tiny display that is too small to contain
-// it.
-TEST_P(AppListControllerTest, TinyDisplay) {
-  // Don't test this for the non-centered app list case; it isn't designed for
-  // small displays. The most common case of a small display --- when the
-  // virtual keyboard is open --- switches into the centered app list mode, so
-  // we just want to run this test in that case.
-  if (!IsCentered())
-    return;
-
-  // UpdateDisplay is not supported in this case, so just skip the test.
-  if (!SupportsHostWindowResize())
-    return;
-
-  // Set up a screen with a tiny display (height smaller than the app list).
-  UpdateDisplay("400x300");
-
-  Shell::GetInstance()->ShowAppList(NULL);
-  EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility());
-
-  // The top of the app list should be on-screen (even if the bottom is not).
-  // We need to manually calculate the Y coordinate of the top of the app list
-  // from the anchor (center) and height. There isn't a bounds rect that gives
-  // the actual app list position (the widget bounds include the bubble border
-  // which is much bigger than the actual app list size).
-  app_list::AppListView* app_list = Shell::GetInstance()->GetAppListView();
-  int app_list_view_top =
-      app_list->anchor_rect().y() - app_list->bounds().height() / 2;
-  EXPECT_GE(app_list_view_top, kMinimalCenteredAppListMargin);
-}
-
-INSTANTIATE_TEST_CASE_P(AppListControllerTestInstance,
-                        AppListControllerTest,
-                        ::testing::Bool());
-
-}  // namespace ash
diff --git a/base/task_scheduler/scheduler_worker_thread.cc b/base/task_scheduler/scheduler_worker_thread.cc
index 49dde51d..60d05e1c 100644
--- a/base/task_scheduler/scheduler_worker_thread.cc
+++ b/base/task_scheduler/scheduler_worker_thread.cc
@@ -74,7 +74,16 @@
     }
 
     task_tracker_->RunTask(sequence->PeekTask());
-    delegate_->RanTaskFromSequence(std::move(sequence));
+
+    const bool sequence_became_empty = sequence->PopTask();
+
+    // If |sequence| isn't empty immediately after the pop, enqueue it to
+    // maintain the invariant that a non-empty Sequence is always referenced by
+    // either a PriorityQueue or a SchedulerWorkerThread. If it is empty and
+    // there are live references to it, it will be enqueued when a Task is added
+    // to it. Otherwise, it will be destroyed at the end of this scope.
+    if (!sequence_became_empty)
+      delegate_->EnqueueSequence(std::move(sequence));
 
     // Calling WakeUp() guarantees that this SchedulerWorkerThread will run
     // Tasks from Sequences returned by the GetWork() method of |delegate_|
@@ -83,8 +92,6 @@
     // if WakeUp() is called while this SchedulerWorkerThread is awake.
     wake_up_event_.Reset();
   }
-
-  delegate_->OnMainExit();
 }
 
 bool SchedulerWorkerThread::ShouldExitForTesting() const {
diff --git a/base/task_scheduler/scheduler_worker_thread.h b/base/task_scheduler/scheduler_worker_thread.h
index cc3b1b5..912c1c7 100644
--- a/base/task_scheduler/scheduler_worker_thread.h
+++ b/base/task_scheduler/scheduler_worker_thread.h
@@ -40,17 +40,13 @@
     // Called when the main function of the SchedulerWorkerThread enters.
     virtual void OnMainEntry() = 0;
 
-    // Called when the main function of the SchedulerWorkerThread exits.
-    virtual void OnMainExit() = 0;
-
     // Called by |worker_thread| to get a Sequence from which to run a Task.
     virtual scoped_refptr<Sequence> GetWork(
         SchedulerWorkerThread* worker_thread) = 0;
 
-    // Called after the SchedulerWorkerThread has tried to run a Task from
-    // |sequence| (a TaskTracker might have prevented the Task from running).
-    // The Task is still in |sequence| when this is called.
-    virtual void RanTaskFromSequence(scoped_refptr<Sequence> sequence) = 0;
+    // Called when |sequence| isn't empty after the SchedulerWorkerThread pops a
+    // Task from it. |sequence| is the last Sequence returned by GetWork().
+    virtual void EnqueueSequence(scoped_refptr<Sequence> sequence) = 0;
   };
 
   // Creates a SchedulerWorkerThread with priority |thread_priority| that runs
diff --git a/base/task_scheduler/scheduler_worker_thread_unittest.cc b/base/task_scheduler/scheduler_worker_thread_unittest.cc
index 63e1cf6..541d1bc 100644
--- a/base/task_scheduler/scheduler_worker_thread_unittest.cc
+++ b/base/task_scheduler/scheduler_worker_thread_unittest.cc
@@ -26,13 +26,13 @@
 
 const size_t kNumSequencesPerTest = 150;
 
-class TaskSchedulerWorkerThreadTest : public testing::Test,
+// The test parameter is the number of Tasks per Sequence returned by GetWork().
+class TaskSchedulerWorkerThreadTest : public testing::TestWithParam<size_t>,
                                       public SchedulerWorkerThread::Delegate {
  protected:
   TaskSchedulerWorkerThreadTest()
       : main_entry_called_(true, false),
-        num_get_work_cv_(lock_.CreateConditionVariable()),
-        run_sequences_cv_(lock_.CreateConditionVariable()) {}
+        num_get_work_cv_(lock_.CreateConditionVariable()) {}
 
   void SetUp() override {
     worker_thread_ = SchedulerWorkerThread::CreateSchedulerWorkerThread(
@@ -42,17 +42,11 @@
   }
 
   void TearDown() override {
-    {
-      AutoSchedulerLock auto_lock(lock_);
-      EXPECT_FALSE(main_exit_called_);
-    }
-
     worker_thread_->JoinForTesting();
-
-    AutoSchedulerLock auto_lock(lock_);
-    EXPECT_TRUE(main_exit_called_);
   }
 
+  size_t TasksPerSequence() const { return GetParam(); }
+
   // Wait until GetWork() has been called |num_get_work| times.
   void WaitForNumGetWork(size_t num_get_work) {
     AutoSchedulerLock auto_lock(lock_);
@@ -60,23 +54,9 @@
       num_get_work_cv_->Wait();
   }
 
-  // Wait until there are no more Sequences to create and RanTaskFromSequence()
-  // has been invoked once for each Sequence returned by GetWork().
-  void WaitForAllSequencesToRun() {
+  void SetMaxGetWork(size_t max_get_work) {
     AutoSchedulerLock auto_lock(lock_);
-
-    while (num_sequences_to_create_ > 0 ||
-           run_sequences_.size() < created_sequences_.size()) {
-      run_sequences_cv_->Wait();
-    }
-
-    // Verify that RanTaskFromSequence() has been invoked with the same
-    // Sequences that were returned by GetWork().
-    EXPECT_EQ(created_sequences_, run_sequences_);
-
-    // Verify that RunTaskCallback() has been invoked once for each Sequence
-    // returned by GetWork().
-    EXPECT_EQ(created_sequences_.size(), num_run_tasks_);
+    max_get_work_ = max_get_work;
   }
 
   void SetNumSequencesToCreate(size_t num_sequences_to_create) {
@@ -85,9 +65,19 @@
     num_sequences_to_create_ = num_sequences_to_create;
   }
 
-  void SetMaxGetWork(size_t max_get_work) {
+  size_t NumRunTasks() {
     AutoSchedulerLock auto_lock(lock_);
-    max_get_work_ = max_get_work;
+    return num_run_tasks_;
+  }
+
+  std::vector<scoped_refptr<Sequence>> CreatedSequences() {
+    AutoSchedulerLock auto_lock(lock_);
+    return created_sequences_;
+  }
+
+  std::vector<scoped_refptr<Sequence>> EnqueuedSequences() {
+    AutoSchedulerLock auto_lock(lock_);
+    return enqueued_sequences_;
   }
 
   std::unique_ptr<SchedulerWorkerThread> worker_thread_;
@@ -102,12 +92,6 @@
     main_entry_called_.Signal();
   }
 
-  void OnMainExit() override {
-    AutoSchedulerLock auto_lock(lock_);
-    EXPECT_FALSE(main_exit_called_);
-    main_exit_called_ = true;
-  }
-
   scoped_refptr<Sequence> GetWork(
       SchedulerWorkerThread* worker_thread) override {
     EXPECT_EQ(worker_thread_.get(), worker_thread);
@@ -128,14 +112,16 @@
       --num_sequences_to_create_;
     }
 
-    // Create a Sequence that contains one Task.
+    // Create a Sequence with TasksPerSequence() Tasks.
     scoped_refptr<Sequence> sequence(new Sequence);
-    std::unique_ptr<Task> task(new Task(
-        FROM_HERE,
-        Bind(&TaskSchedulerWorkerThreadTest::RunTaskCallback, Unretained(this)),
-        TaskTraits()));
-    EXPECT_TRUE(task_tracker_.WillPostTask(task.get()));
-    sequence->PushTask(std::move(task));
+    for (size_t i = 0; i < TasksPerSequence(); ++i) {
+      std::unique_ptr<Task> task(new Task(
+          FROM_HERE, Bind(&TaskSchedulerWorkerThreadTest::RunTaskCallback,
+                          Unretained(this)),
+          TaskTraits()));
+      EXPECT_TRUE(task_tracker_.WillPostTask(task.get()));
+      sequence->PushTask(std::move(task));
+    }
 
     {
       // Add the Sequence to the vector of created Sequences.
@@ -146,11 +132,24 @@
     return sequence;
   }
 
-  void RanTaskFromSequence(scoped_refptr<Sequence> sequence) override {
+  // This override verifies that |sequence| contains the expected number of
+  // Tasks and adds it to |enqueued_sequences_|. Unlike a normal EnqueueSequence
+  // implementation, it doesn't reinsert |sequence| into a queue for further
+  // execution.
+  void EnqueueSequence(scoped_refptr<Sequence> sequence) override {
+    EXPECT_GT(TasksPerSequence(), 1U);
+
+    // Verify that |sequence| contains TasksPerSequence() - 1 Tasks.
+    for (size_t i = 0; i < TasksPerSequence() - 1; ++i) {
+      EXPECT_TRUE(sequence->PeekTask());
+      sequence->PopTask();
+    }
+    EXPECT_FALSE(sequence->PeekTask());
+
+    // Add |sequence| to |enqueued_sequences_|.
     AutoSchedulerLock auto_lock(lock_);
-    run_sequences_.push_back(std::move(sequence));
-    EXPECT_LE(run_sequences_.size(), created_sequences_.size());
-    run_sequences_cv_->Signal();
+    enqueued_sequences_.push_back(std::move(sequence));
+    EXPECT_LE(enqueued_sequences_.size(), created_sequences_.size());
   }
 
   void RunTaskCallback() {
@@ -167,9 +166,6 @@
   // Signaled once OnMainEntry() has been called.
   WaitableEvent main_entry_called_;
 
-  // True once OnMainExit() has been called.
-  bool main_exit_called_ = false;
-
   // Number of Sequences that should be created by GetWork(). When this
   // is 0, GetWork() returns nullptr.
   size_t num_sequences_to_create_ = 0;
@@ -186,11 +182,8 @@
   // Sequences created by GetWork().
   std::vector<scoped_refptr<Sequence>> created_sequences_;
 
-  // Sequences passed to RanTaskFromSequence().
-  std::vector<scoped_refptr<Sequence>> run_sequences_;
-
-  // Condition variable signaled when a Sequence is added to |run_sequences_|.
-  std::unique_ptr<ConditionVariable> run_sequences_cv_;
+  // Sequences passed to EnqueueSequence().
+  std::vector<scoped_refptr<Sequence>> enqueued_sequences_;
 
   // Number of times that RunTaskCallback() has been called.
   size_t num_run_tasks_ = 0;
@@ -200,7 +193,7 @@
 
 // Verify that when GetWork() continuously returns Sequences, all Tasks in these
 // Sequences run successfully. The test wakes up the SchedulerWorkerThread once.
-TEST_F(TaskSchedulerWorkerThreadTest, ContinuousWork) {
+TEST_P(TaskSchedulerWorkerThreadTest, ContinuousWork) {
   // Set GetWork() to return |kNumSequencesPerTest| Sequences before starting to
   // return nullptr.
   SetNumSequencesToCreate(kNumSequencesPerTest);
@@ -210,17 +203,27 @@
   const size_t kExpectedNumGetWork = kNumSequencesPerTest + 1;
   SetMaxGetWork(kExpectedNumGetWork);
 
-  // Wake up |worker_thread_| and wait until it has run all the Tasks returned
-  // by GetWork().
+  // Wake up |worker_thread_| and wait until GetWork() has been invoked the
+  // expected amount of times.
   worker_thread_->WakeUp();
-  WaitForAllSequencesToRun();
   WaitForNumGetWork(kExpectedNumGetWork);
+
+  // All tasks should have run.
+  EXPECT_EQ(kNumSequencesPerTest, NumRunTasks());
+
+  // If Sequences returned by GetWork() contain more than one Task, they aren't
+  // empty after the worker thread pops Tasks from them and thus should be
+  // returned to EnqueueSequence().
+  if (TasksPerSequence() > 1)
+    EXPECT_EQ(CreatedSequences(), EnqueuedSequences());
+  else
+    EXPECT_TRUE(EnqueuedSequences().empty());
 }
 
 // Verify that when GetWork() alternates between returning a Sequence and
 // returning nullptr, all Tasks in the returned Sequences run successfully. The
 // test wakes up the SchedulerWorkerThread once for each Sequence.
-TEST_F(TaskSchedulerWorkerThreadTest, IntermittentWork) {
+TEST_P(TaskSchedulerWorkerThreadTest, IntermittentWork) {
   for (size_t i = 0; i < kNumSequencesPerTest; ++i) {
     // Set GetWork() to return 1 Sequence before starting to return
     // nullptr.
@@ -231,14 +234,31 @@
     const size_t expected_num_get_work = 2 * (i + 1);
     SetMaxGetWork(expected_num_get_work);
 
-    // Wake up |worker_thread_| and wait until it has run the Task returned by
-    // GetWork().
+    // Wake up |worker_thread_| and wait until GetWork() has been invoked
+    // the expected amount of times.
     worker_thread_->WakeUp();
-    WaitForAllSequencesToRun();
     WaitForNumGetWork(expected_num_get_work);
+
+    // The Task should have run
+    EXPECT_EQ(i + 1, NumRunTasks());
+
+    // If Sequences returned by GetWork() contain more than one Task, they
+    // aren't empty after the worker thread pops Tasks from them and thus should
+    // be returned to EnqueueSequence().
+    if (TasksPerSequence() > 1)
+      EXPECT_EQ(CreatedSequences(), EnqueuedSequences());
+    else
+      EXPECT_TRUE(EnqueuedSequences().empty());
   }
 }
 
+INSTANTIATE_TEST_CASE_P(OneTaskPerSequence,
+                        TaskSchedulerWorkerThreadTest,
+                        ::testing::Values(1));
+INSTANTIATE_TEST_CASE_P(TwoTasksPerSequence,
+                        TaskSchedulerWorkerThreadTest,
+                        ::testing::Values(2));
+
 }  // namespace
 }  // namespace internal
 }  // namespace base
diff --git a/blimp/BUILD.gn b/blimp/BUILD.gn
index 64345a07..ec23917 100644
--- a/blimp/BUILD.gn
+++ b/blimp/BUILD.gn
@@ -19,7 +19,10 @@
   ]
 
   if (is_android) {
-    deps += [ "//blimp/client:blimp_apk" ]
+    deps += [
+      "//blimp/client:blimp_apk",
+      "//blimp/client:blimp_apk_incremental",
+    ]
   }
 
   if (is_linux) {
diff --git a/blimp/common/compositor/blimp_image_serialization_processor.cc b/blimp/common/compositor/blimp_image_serialization_processor.cc
index 24564e4b..206fec7 100644
--- a/blimp/common/compositor/blimp_image_serialization_processor.cc
+++ b/blimp/common/compositor/blimp_image_serialization_processor.cc
@@ -13,146 +13,13 @@
 #include "third_party/skia/include/core/SkData.h"
 #include "third_party/skia/include/core/SkPicture.h"
 #include "third_party/skia/include/core/SkPixelSerializer.h"
-#include "third_party/skia/include/core/SkUnPreMultiply.h"
-
-namespace {
-// TODO(nyquist): Make sure encoder does not serialize images more than once.
-// See crbug.com/548434.
-class WebPImageEncoder : public SkPixelSerializer {
- public:
-  WebPImageEncoder() {}
-  ~WebPImageEncoder() override{};
-
-  bool onUseEncodedData(const void* data, size_t len) override {
-    const unsigned char* cast_data = static_cast<const unsigned char*>(data);
-    if (len < 14)
-      return false;
-    return !memcmp(cast_data, "RIFF", 4) && !memcmp(cast_data + 8, "WEBPVP", 6);
-  }
-
-  SkData* onEncode(const SkPixmap& pixmap) override {
-    // Initialize an empty WebPConfig.
-    WebPConfig config;
-    if (!WebPConfigInit(&config))
-      return nullptr;
-
-    // Initialize an empty WebPPicture.
-    WebPPicture picture;
-    if (!WebPPictureInit(&picture))
-      return nullptr;
-
-    // Ensure width and height are valid dimensions.
-    if (!pixmap.width() || pixmap.width() > WEBP_MAX_DIMENSION)
-      return nullptr;
-    picture.width = pixmap.width();
-    if (!pixmap.height() || pixmap.height() > WEBP_MAX_DIMENSION)
-      return nullptr;
-    picture.height = pixmap.height();
-
-    // Import picture from raw pixels.
-    DCHECK(pixmap.alphaType() == kPremul_SkAlphaType);
-    auto pixel_chars = static_cast<const unsigned char*>(pixmap.addr());
-    if (!PlatformPictureImport(pixel_chars, &picture))
-      return nullptr;
-
-    // Create a buffer for where to store the output data.
-    std::vector<unsigned char> data;
-    picture.custom_ptr = &data;
-
-    // Use our own WebPWriterFunction implementation.
-    picture.writer = &WebPImageEncoder::WriteOutput;
-
-    // Setup the configuration for the output WebP picture. This is currently
-    // the same as the default configuration for WebP, but since any change in
-    // the WebP defaults would invalidate all caches they are hard coded.
-    config.quality = 75.0;  // between 0 (smallest file) and 100 (biggest).
-    config.method = 4;  // quality/speed trade-off (0=fast, 6=slower-better).
-
-    // Encode the picture using the given configuration.
-    bool success = WebPEncode(&config, &picture);
-
-    // Release the memory allocated by WebPPictureImport*(). This does not free
-    // the memory used by the picture object itself.
-    WebPPictureFree(&picture);
-
-    if (!success)
-      return nullptr;
-
-    // Copy WebP data into SkData. |data| is allocated only on the stack, so
-    // it is automatically deleted after this.
-    return SkData::NewWithCopy(&data.front(), data.size());
-  }
-
- private:
-  // WebPWriterFunction implementation.
-  static int WriteOutput(const uint8_t* data,
-                         size_t size,
-                         const WebPPicture* const picture) {
-    std::vector<unsigned char>* dest =
-        static_cast<std::vector<unsigned char>*>(picture->custom_ptr);
-    dest->insert(dest->end(), data, data + size);
-    return 1;
-  }
-
-  // For each pixel, un-premultiplies the alpha-channel for each of the RGB
-  // channels. As an example, for a channel value that before multiplication was
-  // 255, and after applying an alpha of 128, the premultiplied pixel would be
-  // 128. The un-premultiply step uses the alpha-channel to get back to 255. The
-  // alpha channel is kept unchanged.
-  void UnPremultiply(const unsigned char* in_pixels,
-                     unsigned char* out_pixels,
-                     size_t pixel_count) {
-    const SkUnPreMultiply::Scale* table = SkUnPreMultiply::GetScaleTable();
-    for (; pixel_count-- > 0; in_pixels += 4) {
-      unsigned char alpha = in_pixels[3];
-      if (alpha == 255) {  // Full opacity, just blindly copy.
-        *out_pixels++ = in_pixels[0];
-        *out_pixels++ = in_pixels[1];
-        *out_pixels++ = in_pixels[2];
-        *out_pixels++ = alpha;
-      } else {
-        SkUnPreMultiply::Scale scale = table[alpha];
-        *out_pixels++ = SkUnPreMultiply::ApplyScale(scale, in_pixels[0]);
-        *out_pixels++ = SkUnPreMultiply::ApplyScale(scale, in_pixels[1]);
-        *out_pixels++ = SkUnPreMultiply::ApplyScale(scale, in_pixels[2]);
-        *out_pixels++ = alpha;
-      }
-    }
-  }
-
-  bool PlatformPictureImport(const unsigned char* pixels,
-                             WebPPicture* picture) {
-    // Need to unpremultiply each pixel, each pixel using 4 bytes (RGBA).
-    size_t pixel_count = picture->height * picture->width;
-    std::vector<unsigned char> unpremul_pixels(pixel_count * 4);
-    UnPremultiply(pixels, unpremul_pixels.data(), pixel_count);
-
-    // Each pixel uses 4 bytes (RGBA) which affects the stride per row.
-    int row_stride = picture->width * 4;
-
-    if (SK_B32_SHIFT)  // Android
-      return WebPPictureImportRGBA(picture, unpremul_pixels.data(), row_stride);
-    return WebPPictureImportBGRA(picture, unpremul_pixels.data(), row_stride);
-  }
-};
-
-}  // namespace
 
 namespace blimp {
 
 BlimpImageSerializationProcessor::BlimpImageSerializationProcessor(Mode mode) {
-  switch (mode) {
-    case Mode::SERIALIZATION:
-      pixel_serializer_.reset(new WebPImageEncoder);
-      pixel_deserializer_ = nullptr;
-      break;
-    case Mode::DESERIALIZATION:
-      pixel_serializer_ = nullptr;
-      pixel_deserializer_ = &WebPDecoder;
-      break;
-    default:
-      NOTREACHED() << "Unknown serialization mode";
-  }
+  DCHECK(mode == Mode::DESERIALIZATION);
+  pixel_serializer_ = nullptr;
+  pixel_deserializer_ = &WebPDecoder;
 }
 
 BlimpImageSerializationProcessor::~BlimpImageSerializationProcessor() {}
diff --git a/blimp/docs/build.md b/blimp/docs/build.md
index 9a470dd..638cefa 100644
--- a/blimp/docs/build.md
+++ b/blimp/docs/build.md
@@ -24,14 +24,22 @@
 ninja -C out-android/Debug blimp
 ```
 
-You can also build and install incremental APK like this:
+This will also generate an incremental APK, which you can install with this
+command:
 
 ```bash
-ninja -C out-android/Debug blimp blimp_apk_incremental &&
+out-android/Debug/bin/install_blimp_apk_incremental
+```
+
+During development, it might be beneficial to put these two commands together
+like this:
+
+```bash
+ninja -C out-android/Debug blimp && \
     out-android/Debug/bin/install_blimp_apk_incremental
 ```
 
-To add your own build preferences
+To add your own build preferences:
 
 ```bash
 gn args out-android/Debug
diff --git a/blimp/engine/BUILD.gn b/blimp/engine/BUILD.gn
index 76ddb68..8503ab46 100644
--- a/blimp/engine/BUILD.gn
+++ b/blimp/engine/BUILD.gn
@@ -61,6 +61,8 @@
     "app/blimp_network_delegate.h",
     "app/blimp_permission_manager.cc",
     "app/blimp_permission_manager.h",
+    "app/blimp_system_url_request_context_getter.cc",
+    "app/blimp_system_url_request_context_getter.h",
     "app/blimp_url_request_context_getter.cc",
     "app/blimp_url_request_context_getter.h",
     "app/engine_settings.cc",
diff --git a/blimp/engine/app/blimp_content_renderer_client.h b/blimp/engine/app/blimp_content_renderer_client.h
index c80ca51..af568170 100644
--- a/blimp/engine/app/blimp_content_renderer_client.h
+++ b/blimp/engine/app/blimp_content_renderer_client.h
@@ -15,8 +15,6 @@
 }
 
 namespace blimp {
-class BlimpImageSerializationProcessor;
-
 namespace engine {
 
 class BlimpContentRendererClient : public content::ContentRendererClient {
diff --git a/blimp/engine/app/blimp_system_url_request_context_getter.cc b/blimp/engine/app/blimp_system_url_request_context_getter.cc
new file mode 100644
index 0000000..2b1e770
--- /dev/null
+++ b/blimp/engine/app/blimp_system_url_request_context_getter.cc
@@ -0,0 +1,44 @@
+// 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 "blimp/engine/app/blimp_system_url_request_context_getter.h"
+
+#include <utility>
+#include <vector>
+
+#include "base/logging.h"
+#include "base/single_thread_task_runner.h"
+#include "content/public/browser/browser_thread.h"
+#include "net/url_request/url_request_context.h"
+#include "net/url_request/url_request_context_builder.h"
+
+namespace blimp {
+namespace engine {
+
+BlimpSystemURLRequestContextGetter::BlimpSystemURLRequestContextGetter() {
+  // Must first be created on the UI thread.
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+}
+
+BlimpSystemURLRequestContextGetter::~BlimpSystemURLRequestContextGetter() {}
+
+net::URLRequestContext*
+BlimpSystemURLRequestContextGetter::GetURLRequestContext() {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+  if (!url_request_context_) {
+    // Use default values
+    net::URLRequestContextBuilder builder;
+    url_request_context_ = builder.Build();
+  }
+  return url_request_context_.get();
+}
+
+scoped_refptr<base::SingleThreadTaskRunner>
+BlimpSystemURLRequestContextGetter::GetNetworkTaskRunner() const {
+  return content::BrowserThread::GetMessageLoopProxyForThread(
+      content::BrowserThread::IO);
+}
+
+}  // namespace engine
+}  // namespace blimp
diff --git a/blimp/engine/app/blimp_system_url_request_context_getter.h b/blimp/engine/app/blimp_system_url_request_context_getter.h
new file mode 100644
index 0000000..fcb1c2a5f
--- /dev/null
+++ b/blimp/engine/app/blimp_system_url_request_context_getter.h
@@ -0,0 +1,43 @@
+// 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.
+
+#ifndef BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_
+#define BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_
+
+#include "base/files/file_path.h"
+#include "base/macros.h"
+#include "content/public/browser/content_browser_client.h"
+#include "net/url_request/url_request_context_getter.h"
+
+namespace base {
+class MessageLoop;
+class SingleThreadTaskRunner;
+}
+
+namespace blimp {
+namespace engine {
+
+// The URLRequestContextGetter for Blimp system requests that should not be
+// associated with a user URL request context (e.g. metrics upload).
+class BlimpSystemURLRequestContextGetter : public net::URLRequestContextGetter {
+ public:
+  BlimpSystemURLRequestContextGetter();
+
+  // net::URLRequestContextGetter implementation.
+  net::URLRequestContext* GetURLRequestContext() override;
+  scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
+      const override;
+
+ private:
+  ~BlimpSystemURLRequestContextGetter() override;
+
+  std::unique_ptr<net::URLRequestContext> url_request_context_;
+
+  DISALLOW_COPY_AND_ASSIGN(BlimpSystemURLRequestContextGetter);
+};
+
+}  // namespace engine
+}  // namespace blimp
+
+#endif  // BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_
diff --git a/blimp/engine/app/blimp_url_request_context_getter.h b/blimp/engine/app/blimp_url_request_context_getter.h
index 43d5395b..a991d6e 100644
--- a/blimp/engine/app/blimp_url_request_context_getter.h
+++ b/blimp/engine/app/blimp_url_request_context_getter.h
@@ -29,6 +29,8 @@
 namespace blimp {
 namespace engine {
 
+// The URLRequestContextGetter for Blimp "user" requests.
+// System request context is handled in a separate class.
 class BlimpURLRequestContextGetter : public net::URLRequestContextGetter {
  public:
   // The content of |protocol_handlers| is is swapped into the new instance.
diff --git a/blimp/engine/common/blimp_browser_context.cc b/blimp/engine/common/blimp_browser_context.cc
index 98a1201f..614bd494 100644
--- a/blimp/engine/common/blimp_browser_context.cc
+++ b/blimp/engine/common/blimp_browser_context.cc
@@ -97,6 +97,14 @@
   return nullptr;
 }
 
+net::URLRequestContextGetter*
+BlimpBrowserContext::GetSystemRequestContextGetter() {
+  if (!system_context_getter_) {
+    system_context_getter_ = new BlimpSystemURLRequestContextGetter();
+  }
+  return system_context_getter_.get();
+}
+
 net::URLRequestContextGetter* BlimpBrowserContext::GetRequestContext() {
   return GetDefaultStoragePartition(this)->GetURLRequestContext();
 }
diff --git a/blimp/engine/common/blimp_browser_context.h b/blimp/engine/common/blimp_browser_context.h
index e6caa4e..b1bfc2c 100644
--- a/blimp/engine/common/blimp_browser_context.h
+++ b/blimp/engine/common/blimp_browser_context.h
@@ -9,6 +9,7 @@
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
+#include "blimp/engine/app/blimp_system_url_request_context_getter.h"
 #include "blimp/engine/app/blimp_url_request_context_getter.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/content_browser_client.h"
@@ -60,12 +61,17 @@
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors) override;
 
+  // Provides a URLRequestContextGetter for system requests (e.g. metrics
+  // uploads).
+  net::URLRequestContextGetter* GetSystemRequestContextGetter();
+
  private:
   // Performs initialization of the BlimpBrowserContext while IO is still
   // allowed on the current thread.
   void InitWhileIOAllowed();
 
   std::unique_ptr<BlimpResourceContext> resource_context_;
+  scoped_refptr<BlimpSystemURLRequestContextGetter> system_context_getter_;
   bool ignore_certificate_errors_;
   std::unique_ptr<content::PermissionManager> permission_manager_;
   bool off_the_record_;
diff --git a/blimp/engine/renderer/engine_image_serialization_processor.cc b/blimp/engine/renderer/engine_image_serialization_processor.cc
index 8d1f2bb5..ffecf35 100644
--- a/blimp/engine/renderer/engine_image_serialization_processor.cc
+++ b/blimp/engine/renderer/engine_image_serialization_processor.cc
@@ -50,10 +50,13 @@
       return nullptr;
     picture.height = pixmap.height();
 
+    DVLOG(2) << "Encoding image color_type=" << pixmap.colorType()
+             << ", alpha_type=" << pixmap.alphaType() << " " << pixmap.width()
+             << "x" << pixmap.height();
+
     // Import picture from raw pixels.
-    DCHECK(pixmap.alphaType() == kPremul_SkAlphaType);
     auto pixel_chars = static_cast<const unsigned char*>(pixmap.addr());
-    if (!PlatformPictureImport(pixel_chars, &picture))
+    if (!PlatformPictureImport(pixel_chars, &picture, pixmap.alphaType()))
       return nullptr;
 
     // Create a buffer for where to store the output data.
@@ -66,6 +69,7 @@
     // Setup the configuration for the output WebP picture. This is currently
     // the same as the default configuration for WebP, but since any change in
     // the WebP defaults would invalidate all caches they are hard coded.
+    config.lossless = 0;
     config.quality = 75.0;  // between 0 (smallest file) and 100 (biggest).
     config.method = 4;  // quality/speed trade-off (0=fast, 6=slower-better).
 
@@ -122,18 +126,24 @@
   }
 
   bool PlatformPictureImport(const unsigned char* pixels,
-                             WebPPicture* picture) {
-    // Need to unpremultiply each pixel, each pixel using 4 bytes (RGBA).
-    size_t pixel_count = picture->height * picture->width;
-    std::vector<unsigned char> unpremul_pixels(pixel_count * 4);
-    UnPremultiply(pixels, unpremul_pixels.data(), pixel_count);
-
+                             WebPPicture* picture,
+                             SkAlphaType alphaType) {
     // Each pixel uses 4 bytes (RGBA) which affects the stride per row.
     int row_stride = picture->width * 4;
+    if (alphaType == kPremul_SkAlphaType) {
+      // Need to unpremultiply each pixel, each pixel using 4 bytes (RGBA).
+      size_t pixel_count = picture->height * picture->width;
+      std::vector<unsigned char> unpremul_pixels(pixel_count * 4);
+      UnPremultiply(pixels, unpremul_pixels.data(), pixel_count);
+      if (SK_B32_SHIFT)  // Android
+        return WebPPictureImportRGBA(picture, unpremul_pixels.data(),
+                                     row_stride);
+      return WebPPictureImportBGRA(picture, unpremul_pixels.data(), row_stride);
+    }
 
     if (SK_B32_SHIFT)  // Android
-      return WebPPictureImportRGBA(picture, unpremul_pixels.data(), row_stride);
-    return WebPPictureImportBGRA(picture, unpremul_pixels.data(), row_stride);
+      return WebPPictureImportRGBA(picture, pixels, row_stride);
+    return WebPPictureImportBGRA(picture, pixels, row_stride);
   }
 };
 
diff --git a/build/all.gyp b/build/all.gyp
index f688ebb..c8142f9 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -381,7 +381,6 @@
         }],
         ['OS=="win"', {
           'dependencies': [
-            '../chrome/chrome.gyp:crash_service',
             '../chrome/chrome.gyp:installer_util_unittests',
             '../chrome/chrome.gyp:setup_unittests',
             # ../chrome/test/mini_installer requires mini_installer.
@@ -590,15 +589,9 @@
             }],
             ['OS=="win"', {
               'dependencies': [
-                '../chrome/chrome.gyp:crash_service',
                 '../gpu/gpu.gyp:angle_perftests',
               ],
             }],
-            ['OS=="win" and target_arch=="ia32"', {
-              'dependencies': [
-                '../chrome/chrome.gyp:crash_service_win64',
-              ],
-            }],
           ],
         }, # target_name: chromium_builder_perf
         {
@@ -628,16 +621,6 @@
                 '../chrome/chrome.gyp:linux_symbols'
               ],
             }],
-            ['OS=="win"', {
-              'dependencies': [
-                '../chrome/chrome.gyp:crash_service',
-              ],
-            }],
-            ['OS=="win" and target_arch=="ia32"', {
-              'dependencies': [
-                '../chrome/chrome.gyp:crash_service_win64',
-              ],
-            }],
           ],
         }, # target_name: chromium_gpu_builder
         {
diff --git a/build/android/OWNERS b/build/android/OWNERS
index 09f8997..13e19f5 100644
--- a/build/android/OWNERS
+++ b/build/android/OWNERS
@@ -1,5 +1,4 @@
 jbudorick@chromium.org
-klundberg@chromium.org
 mikecase@chromium.org
 pasko@chromium.org
 perezju@chromium.org
diff --git a/build/android/android_lint_cache.gyp b/build/android/android_lint_cache.gyp
index 8c5175de..72b9e9e 100644
--- a/build/android/android_lint_cache.gyp
+++ b/build/android/android_lint_cache.gyp
@@ -34,6 +34,7 @@
             'python', '<(DEPTH)/build/android/gyp/lint.py',
             '--lint-path', '<(android_sdk_root)/tools/lint',
             '--cache-dir', '<(PRODUCT_DIR)/android_lint_cache',
+            '--android-sdk-version=<(android_sdk_version)',
             '--platform-xml-path', '<(platform_xml_path)',
             '--manifest-path', '<(android_manifest_path)',
             '--product-dir', '<(PRODUCT_DIR)',
diff --git a/build/android/gyp/lint.py b/build/android/gyp/lint.py
index 6f74d66d..72d81033 100755
--- a/build/android/gyp/lint.py
+++ b/build/android/gyp/lint.py
@@ -9,6 +9,7 @@
 
 import argparse
 import os
+import re
 import sys
 import traceback
 from xml.dom import minidom
@@ -22,9 +23,8 @@
 
 def _OnStaleMd5(changes, lint_path, config_path, processed_config_path,
                 manifest_path, result_path, product_dir, sources, jar_path,
-                cache_dir, resource_dir=None, classpath=None,
-                can_fail_build=False, silent=False):
-
+                cache_dir, android_sdk_version, resource_dir=None,
+                classpath=None, can_fail_build=False, silent=False):
   def _RelativizePath(path):
     """Returns relative path to top-level src dir.
 
@@ -129,14 +129,22 @@
         cmd.extend(['--sources', _RelativizePath(src_dir)])
       os.symlink(os.path.abspath(src), PathInDir(src_dir, src))
 
+    project_dir = NewSourceDir()
+    if android_sdk_version:
+      # Create dummy project.properies file in a temporary "project" directory.
+      # It is the only way to add Android SDK to the Lint's classpath. Proper
+      # classpath is necessary for most source-level checks.
+      with open(os.path.join(project_dir, 'project.properties'), 'w') \
+          as propfile:
+        print >> propfile, 'target=android-{}'.format(android_sdk_version)
+
     # Put the manifest in a temporary directory in order to avoid lint detecting
     # sibling res/ and src/ directories (which should be pass explicitly if they
     # are to be included).
     if manifest_path:
-      src_dir = NewSourceDir()
       os.symlink(os.path.abspath(manifest_path),
-                 PathInDir(src_dir, manifest_path))
-      cmd.append(src_dir)
+                 PathInDir(project_dir, manifest_path))
+    cmd.append(project_dir)
 
     if os.path.exists(result_path):
       os.remove(result_path)
@@ -144,10 +152,12 @@
     env = {}
     stderr_filter = None
     if cache_dir:
+      env['_JAVA_OPTIONS'] = '-Duser.home=%s' % _RelativizePath(cache_dir)
       # When _JAVA_OPTIONS is set, java prints to stderr:
       # Picked up _JAVA_OPTIONS: ...
-      env['_JAVA_OPTIONS'] = '-Duser.home=%s' % _RelativizePath(cache_dir)
-      stderr_filter = lambda l: '' if '_JAVA_OPTIONS' in l else l
+      #
+      # We drop all lines that contain _JAVA_OPTIONS from the output
+      stderr_filter = lambda l: re.sub(r'.*_JAVA_OPTIONS.*\n?', '', l)
 
     try:
       build_utils.CheckOutput(cmd, cwd=_SRC_ROOT, env=env or None,
@@ -225,6 +235,9 @@
                            'directory tree should be stored.')
   parser.add_argument('--platform-xml-path', required=True,
                       help='Path to api-platforms.xml')
+  parser.add_argument('--android-sdk-version',
+                      help='Version (API level) of the Android SDK used for '
+                           'building.')
   parser.add_argument('--create-cache', action='store_true',
                       help='Mark the lint cache file as an output rather than '
                       'an input.')
@@ -289,6 +302,8 @@
     input_paths.extend(classpath)
 
     input_strings = []
+    if args.android_sdk_version:
+      input_strings.append(args.android_sdk_version)
     if args.processed_config_path:
       input_strings.append(args.processed_config_path)
 
@@ -302,6 +317,7 @@
                                     args.product_dir, sources,
                                     args.jar_path,
                                     args.cache_dir,
+                                    args.android_sdk_version,
                                     resource_dir=args.resource_dir,
                                     classpath=classpath,
                                     can_fail_build=args.can_fail_build,
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index 5e088b7..d260289 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -267,6 +267,12 @@
   zipinfo = zipfile.ZipInfo(filename=zip_path, date_time=_HERMETIC_TIMESTAMP)
   zipinfo.external_attr = _HERMETIC_FILE_ATTR
 
+  if src_path and os.path.islink(src_path):
+    zipinfo.filename = zip_path
+    zipinfo.external_attr |= stat.S_IFLNK << 16L # mark as a symlink
+    zip_file.writestr(zipinfo, os.readlink(src_path))
+    return
+
   if src_path:
     with file(src_path) as f:
       data = f.read()
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index b94134c..140bd48 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -60,6 +60,7 @@
       rebase_path(_cache_dir, root_build_dir),
       "--platform-xml-path",
       rebase_path(_platform_xml_path, root_build_dir),
+      "--android-sdk-version=${android_sdk_version}",
       "--depfile",
       rebase_path(depfile, root_build_dir),
       "--config-path",
@@ -92,8 +93,7 @@
         "--jar-path",
         rebase_path(invoker.jar_path, root_build_dir),
         "--java-files=$_rebased_java_files",
-        "--classpath=['$rebased_android_sdk_jar']",
-        "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)",
+        "--classpath=@FileArg($_rebased_build_config:javac:classpath)",
       ]
     }
   }
diff --git a/build/config/ios/ios_app.py b/build/config/ios/ios_app.py
deleted file mode 100644
index 54a68ac2..0000000
--- a/build/config/ios/ios_app.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import errno
-import os
-import subprocess
-import sys
-
-
-def ProcessInfoPlist(args):
-  output_plist_file = os.path.abspath(os.path.join(args.output, 'Info.plist'))
-  return subprocess.check_call( [
-    '/usr/bin/env',
-    'xcrun',
-    'plutil',
-    '-convert',
-    'binary1',
-    '-o',
-    output_plist_file,
-    '--',
-    args.input,
-  ])
-
-
-def PerformCodeSigning(args):
-  return subprocess.check_call([
-    '/usr/bin/env',
-    'xcrun',
-    'codesign',
-    '--entitlements',
-    args.entitlements_path,
-    '--sign',
-    args.identity,
-    '-f',
-    args.application_path,
-  ])
-
-
-def MakeDirectories(path):
-  try:
-    os.makedirs(path)
-  except OSError as exc:
-    if exc.errno == errno.EEXIST and os.path.isdir(path):
-      return 0
-    else:
-      return -1
-  return 0
-
-
-def GenerateProjectStructure(args):
-  application_path = os.path.join(args.dir, args.name + ".app")
-  return MakeDirectories( application_path )
-
-
-def main():
-  parser = argparse.ArgumentParser(description='A script that aids in '
-                                   'the creation of an iOS application')
-  subparsers = parser.add_subparsers()
-
-  # Plist Parser
-  plist_parser = subparsers.add_parser('plist',
-                                       help='Process the Info.plist')
-  plist_parser.set_defaults(func=ProcessInfoPlist)
-
-  plist_parser.add_argument('-i', dest='input', help='The input plist path')
-  plist_parser.add_argument('-o', dest='output', help='The output plist dir')
-
-  # Directory Structure Parser
-  dir_struct_parser = subparsers.add_parser('structure',
-                      help='Creates the directory of an iOS application')
-
-  dir_struct_parser.set_defaults(func=GenerateProjectStructure)
-
-  dir_struct_parser.add_argument('-d', dest='dir', help='Out directory')
-  dir_struct_parser.add_argument('-n', dest='name', help='App name')
-
-  # Code Signing
-  code_signing_parser = subparsers.add_parser('codesign',
-                        help='Code sign the specified application')
-
-  code_signing_parser.set_defaults(func=PerformCodeSigning)
-
-  code_signing_parser.add_argument('-p', dest='application_path', required=True,
-                                   help='The application path')
-  code_signing_parser.add_argument('-i', dest='identity', required=True,
-                                   help='The code signing identity to use')
-  code_signing_parser.add_argument('-e', dest='entitlements_path',
-                                   required=True,
-                                   help='The path to the entitlements .xcent')
-
-  # Engage!
-  args = parser.parse_args()
-  return args.func(args)
-
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/build/config/ios/ios_sim.py b/build/config/ios/ios_sim.py
deleted file mode 100755
index 371719d5..0000000
--- a/build/config/ios/ios_sim.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import errno
-import os
-import subprocess
-import sys
-import re
-
-SIMCTL_PATH = [
-  '/usr/bin/env',
-  'xcrun',
-  'simctl',
-]
-
-PLIST_BUDDY_PATH = [
-  '/usr/bin/env',
-  'xcrun',
-  'PlistBuddy',
-]
-
-
-def ApplicationIdentifier(path):
-  identifier = subprocess.check_output(PLIST_BUDDY_PATH + [
-    '-c',
-    'Print CFBundleIdentifier',
-    '%s/Info.plist' % path,
-  ])
-  return identifier.strip()
-
-
-def Install(args):
-  return subprocess.check_call(SIMCTL_PATH + [
-    'install',
-    'booted',
-    args.path,
-  ])
-
-
-def InstallLaunchAndWait(args, wait):
-  res = Install(args)
-
-  if res != 0:
-    return res
-
-  identifier = ApplicationIdentifier(args.path)
-
-  launch_args = [ 'launch' ]
-
-  if wait:
-    launch_args += [ '-w' ]
-
-  launch_args += [
-    'booted',
-    identifier,
-  ]
-
-  return subprocess.check_output(SIMCTL_PATH + launch_arg).strip()
-
-
-def Launch(args):
-  InstallLaunchAndWait(args, False)
-
-
-def Debug(args):
-  launch_res = InstallLaunchAndWait(args, True)
-  launch_pid = re.search('.*: (\d+)', launch_res).group(1)
-  return os.system(' '.join([
-    '/usr/bin/env',
-    'xcrun',
-    'lldb',
-    '-s',
-    os.path.join(os.path.dirname(__file__), 'lldb_start_commands.txt'),
-    '-p',
-    launch_pid,
-  ]))
-
-
-def main():
-  parser = argparse.ArgumentParser(description='A script that launches an'
-                                   ' application in the simulator and attaches'
-                                   ' the debugger to the same')
-
-  parser.add_argument('-p', dest='path', required=True,
-                      help='Path the the simulator application')
-
-  subparsers = parser.add_subparsers()
-
-  launch_parser = subparsers.add_parser('launch', help='Launch')
-  launch_parser.set_defaults(func=Launch)
-
-  install_parser = subparsers.add_parser('install', help='Install')
-  install_parser.set_defaults(func=Install)
-
-  debug_parser = subparsers.add_parser('debug', help='Debug')
-  debug_parser.set_defaults(func=Debug)
-
-  args = parser.parse_args()
-  return args.func(args)
-
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/build/config/ios/lldb_start_commands.txt b/build/config/ios/lldb_start_commands.txt
deleted file mode 100644
index 42e0b14c..0000000
--- a/build/config/ios/lldb_start_commands.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-breakpoint set --name UIApplicationMain
-breakpoint set --name objc_exception_throw
-continue
-script print "........ Debugger break on main() ........"
diff --git a/build/config/mac/mac_app.py b/build/config/mac/mac_app.py
deleted file mode 100644
index cbc9d03..0000000
--- a/build/config/mac/mac_app.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import errno
-import os
-import subprocess
-import sys
-
-def MakeDirectories(path):
-  try:
-    os.makedirs(path)
-  except OSError as exc:
-    if exc.errno == errno.EEXIST and os.path.isdir(path):
-      return 0
-    else:
-      return -1
-
-  return 0
-
-
-def ProcessInfoPlist(args):
-  output_plist_file = os.path.abspath(os.path.join(args.output, 'Info.plist'))
-  return subprocess.check_call([
-    '/usr/bin/env',
-    'xcrun',
-    'plutil',
-    '-convert',
-    'binary1',
-    '-o',
-    output_plist_file,
-    '--',
-    args.input,
-  ])
-
-
-def ProcessNIB(args):
-  output_nib_file = os.path.join(os.path.abspath(args.output),
-      "%s.nib" % os.path.splitext(os.path.basename(args.input))[0])
-
-  return subprocess.check_call([
-    '/usr/bin/env',
-    'xcrun',
-    'ibtool',
-    '--module',
-    args.module,
-    '--auto-activate-custom-fonts',
-    '--target-device',
-    'mac',
-    '--compile',
-    output_nib_file,
-    os.path.abspath(args.input),
-  ])
-
-
-def GenerateProjectStructure(args):
-  application_path = os.path.join( args.dir, args.name + ".app", "Contents" )
-  return MakeDirectories( application_path )
-
-
-def main():
-  parser = argparse.ArgumentParser(description='A script that aids in '
-                                   'the creation of an Mac application')
-
-  subparsers = parser.add_subparsers()
-
-  # Plist Parser
-  plist_parser = subparsers.add_parser('plist',
-                                       help='Process the Info.plist')
-  plist_parser.set_defaults(func=ProcessInfoPlist)
-
-  plist_parser.add_argument('-i', dest='input', help='The input plist path')
-  plist_parser.add_argument('-o', dest='output', help='The output plist dir')
-
-  # NIB Parser
-  plist_parser = subparsers.add_parser('nib',
-                                       help='Process a NIB file')
-  plist_parser.set_defaults(func=ProcessNIB)
-
-  plist_parser.add_argument('-i', dest='input', help='The input nib path')
-  plist_parser.add_argument('-o', dest='output', help='The output nib dir')
-  plist_parser.add_argument('-m', dest='module', help='The module name')
-
-  # Directory Structure Parser
-  dir_struct_parser = subparsers.add_parser('structure',
-                      help='Creates the directory of an Mac application')
-
-  dir_struct_parser.set_defaults(func=GenerateProjectStructure)
-
-  dir_struct_parser.add_argument('-d', dest='dir', help='Out directory')
-  dir_struct_parser.add_argument('-n', dest='name', help='App name')
-
-  args = parser.parse_args()
-  return args.func(args)
-
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni
index 7055e1e..cca8f6da 100644
--- a/build/config/mac/rules.gni
+++ b/build/config/mac/rules.gni
@@ -4,215 +4,6 @@
 
 import("//build/toolchain/toolchain.gni")
 
-mac_app_script = "//build/config/mac/mac_app.py"
-
-template("code_sign_mac") {
-  assert(defined(invoker.entitlements_path),
-         "The path to the entitlements .xcent file")
-  assert(defined(invoker.identity), "The code signing identity")
-  assert(defined(invoker.application_path), "The application to code sign")
-  assert(defined(invoker.deps))
-
-  action(target_name) {
-    sources = [
-      invoker.entitlements_path,
-    ]
-
-    _application_path = invoker.application_path
-
-    script = mac_app_script
-
-    outputs = [
-      "$_application_path/_CodeSignature/CodeResources",
-    ]
-
-    args = [
-      "codesign",
-      "-p",
-      rebase_path(invoker.application_path, root_build_dir),
-      "-i",
-      invoker.identity,
-      "-e",
-      rebase_path(invoker.entitlements_path, root_build_dir),
-    ]
-
-    forward_variables_from(invoker,
-                           [
-                             "deps",
-                             "public_deps",
-                             "visibility",
-                           ])
-  }
-}
-
-template("process_nibs_mac") {
-  assert(defined(invoker.sources), "The nib sources must be specified")
-  assert(defined(invoker.module), "The nib module must be specified")
-  assert(defined(invoker.output_dir), "The output directory must be specified")
-
-  action_foreach(target_name) {
-    sources = invoker.sources
-
-    script = mac_app_script
-
-    invoker_out_dir = invoker.output_dir
-
-    outputs = [
-      "$root_build_dir/$invoker_out_dir/{{source_name_part}}.nib",
-    ]
-
-    args = [
-      "nib",
-      "-i",
-      "{{source}}",
-      "-o",
-      invoker_out_dir,
-      "-m",
-      invoker.module,
-    ]
-  }
-
-  forward_variables_from(invoker,
-                         [
-                           "deps",
-                           "public_deps",
-                           "visibility",
-                         ])
-}
-
-template("resource_copy_mac") {
-  assert(defined(invoker.resources),
-         "The source list of resources to copy over")
-  assert(defined(invoker.bundle_directory),
-         "The directory within the bundle to place the sources in")
-
-  if (defined(invoker.app_name)) {
-    _app_name = invoker.app_name
-  } else {
-    _app_name = target_name
-  }
-
-  _bundle_directory = invoker.bundle_directory
-  _resources = invoker.resources
-
-  copy(target_name) {
-    set_sources_assignment_filter([])
-    sources = _resources
-    outputs = [
-      "$root_build_dir/$_app_name.app/$_bundle_directory/Contents/Resources/{{source_file_part}}",
-    ]
-  }
-}
-
-template("mac_app") {
-  assert(defined(invoker.deps),
-         "Dependencies must be specified for $target_name")
-  assert(defined(invoker.info_plist),
-         "The application plist file must be specified for $target_name")
-  assert(defined(invoker.xibs),
-         "The list of XIB files must be specified for $target_name")
-
-  group_gen_target_name = target_name
-  copy_all_target_name = target_name + "_all_copy"
-
-  # We just create a variable so we can use the same in interpolation
-  if (defined(invoker.app_name)) {
-    _app_name = invoker.app_name
-  } else {
-    _app_name = target_name
-  }
-
-  # Generate the executable
-  bin_gen_target_name = target_name + "_bin"
-  executable(bin_gen_target_name) {
-    visibility = [ ":$group_gen_target_name" ]
-    deps = invoker.deps
-    output_name = app_name
-  }
-
-  # Process the Info.plist
-  plist_gen_target_name = target_name + "_plist"
-
-  action(plist_gen_target_name) {
-    visibility = [ ":$group_gen_target_name" ]
-    script = mac_app_script
-
-    sources = [
-      invoker.info_plist,
-    ]
-    outputs = [
-      "$root_build_dir/Info.plist",
-    ]
-
-    args = [
-      "plist",
-      "-i",
-      rebase_path(invoker.info_plist, root_build_dir),
-      "-o",
-      rebase_path(root_build_dir),
-    ]
-  }
-
-  # Copy the generated binaries and assets to their appropriate locations
-  copy_plist_gen_target_name = target_name + "_plist_copy"
-  copy(copy_plist_gen_target_name) {
-    visibility = [ ":$group_gen_target_name" ]
-    sources = [
-      "$root_build_dir/Info.plist",
-    ]
-
-    outputs = [
-      "$root_build_dir/$app_name.app/Contents/{{source_file_part}}",
-    ]
-
-    deps = [
-      ":$plist_gen_target_name",
-    ]
-  }
-
-  copy_bin_target_name = target_name + "_bin_copy"
-  copy(copy_bin_target_name) {
-    visibility = [ ":$group_gen_target_name" ]
-    sources = [
-      "$root_build_dir/$app_name",
-    ]
-
-    outputs = [
-      "$root_build_dir/$app_name.app/Contents/MacOS/{{source_file_part}}",
-    ]
-
-    deps = [
-      ":$bin_gen_target_name",
-    ]
-  }
-
-  copy_xib_target_name = target_name + "_xib_copy"
-  process_nibs_mac(copy_xib_target_name) {
-    visibility = [ ":$group_gen_target_name" ]
-    sources = invoker.xibs
-    module = app_name
-    output_dir = "$app_name.app/Contents/Resources"
-  }
-
-  group(copy_all_target_name) {
-    visibility = [ ":$group_gen_target_name" ]
-    deps = [
-      ":$copy_bin_target_name",
-      ":$copy_plist_gen_target_name",
-      ":$copy_xib_target_name",
-      ":$struct_gen_target_name",
-    ]
-  }
-
-  # Top level group
-
-  group(group_gen_target_name) {
-    deps = [
-      ":$copy_all_target_name",
-    ]
-  }
-}
-
 # Template to package a shared library into a Mac framework bundle.
 #
 # Arguments
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index 16fa4cf..b6433332 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -152,6 +152,7 @@
         }],
         ['use_aura==1', {
           'dependencies': [
+            '../ui/app_list/shower/app_list_shower.gyp:app_list_shower_unittests',
             '../ui/aura/aura.gyp:aura_demo',
             '../ui/aura/aura.gyp:aura_unittests',
             '../ui/keyboard/keyboard.gyp:keyboard_unittests',
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 0f4ae41..47bf6a8 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -375,6 +375,8 @@
     "raster/scoped_gpu_raster.h",
     "raster/single_thread_task_graph_runner.cc",
     "raster/single_thread_task_graph_runner.h",
+    "raster/staging_buffer_pool.cc",
+    "raster/staging_buffer_pool.h",
     "raster/synchronous_task_graph_runner.cc",
     "raster/synchronous_task_graph_runner.h",
     "raster/task_category.h",
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py
index d79ca80..c1f2ad20 100644
--- a/cc/PRESUBMIT.py
+++ b/cc/PRESUBMIT.py
@@ -152,7 +152,7 @@
     return [output_api.PresubmitError('Use >> instead of > >:', items=errors)]
   return []
 
-def CheckScopedPtr(input_api, output_api,
+def CheckUniquePtr(input_api, output_api,
                    white_list=CC_SOURCE_FILES, black_list=None):
   black_list = tuple(black_list or input_api.DEFAULT_BLACK_LIST)
   source_file_filter = lambda x: input_api.FilterSourceFile(x,
@@ -162,20 +162,20 @@
   for f in input_api.AffectedSourceFiles(source_file_filter):
     for line_number, line in f.ChangedContents():
       # Disallow:
-      # return scoped_ptr<T>(foo);
-      # bar = scoped_ptr<T>(foo);
+      # return std::unique_ptr<T>(foo);
+      # bar = std::unique_ptr<T>(foo);
       # But allow:
-      # return scoped_ptr<T[]>(foo);
-      # bar = scoped_ptr<T[]>(foo);
-      if re.search(r'(=|\breturn)\s*scoped_ptr<.*?(?<!])>\([^)]+\)', line):
+      # return std::unique_ptr<T[]>(foo);
+      # bar = std::unique_ptr<T[]>(foo);
+      if re.search(r'(=|\breturn)\s*std::unique_ptr<.*?(?<!])>\([^)]+\)', line):
         errors.append(output_api.PresubmitError(
-          ('%s:%d uses explicit scoped_ptr constructor. ' +
-           'Use make_scoped_ptr() instead.') % (f.LocalPath(), line_number)))
+          ('%s:%d uses explicit std::unique_ptr constructor. ' +
+           'Use base::WrapUnique() instead.') % (f.LocalPath(), line_number)))
       # Disallow:
-      # scoped_ptr<T>()
-      if re.search(r'\bscoped_ptr<.*?>\(\)', line):
+      # std::unique_ptr<T>()
+      if re.search(r'\bstd::unique_ptr<.*?>\(\)', line):
         errors.append(output_api.PresubmitError(
-          '%s:%d uses scoped_ptr<T>(). Use nullptr instead.' %
+          '%s:%d uses std::unique_ptr<T>(). Use nullptr instead.' %
           (f.LocalPath(), line_number)))
   return errors
 
@@ -318,7 +318,7 @@
   results += CheckChangeLintsClean(input_api, output_api)
   results += CheckTodos(input_api, output_api)
   results += CheckDoubleAngles(input_api, output_api)
-  results += CheckScopedPtr(input_api, output_api)
+  results += CheckUniquePtr(input_api, output_api)
   results += CheckNamespace(input_api, output_api)
   results += CheckForUseOfWrongClock(input_api, output_api)
   results += FindUselessIfdefs(input_api, output_api)
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index 5d34627..353bef76 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -6,6 +6,7 @@
 
 #include <cmath>
 
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/animation/animation_curve.h"
@@ -32,15 +33,16 @@
 
 namespace cc {
 
-scoped_ptr<Animation> Animation::Create(scoped_ptr<AnimationCurve> curve,
-                                        int animation_id,
-                                        int group_id,
-                                        TargetProperty::Type target_property) {
-  return make_scoped_ptr(
+std::unique_ptr<Animation> Animation::Create(
+    std::unique_ptr<AnimationCurve> curve,
+    int animation_id,
+    int group_id,
+    TargetProperty::Type target_property) {
+  return base::WrapUnique(
       new Animation(std::move(curve), animation_id, group_id, target_property));
 }
 
-Animation::Animation(scoped_ptr<AnimationCurve> curve,
+Animation::Animation(std::unique_ptr<AnimationCurve> curve,
                      int animation_id,
                      int group_id,
                      TargetProperty::Type target_property)
@@ -238,9 +240,9 @@
   return iteration_time;
 }
 
-scoped_ptr<Animation> Animation::CloneAndInitialize(
+std::unique_ptr<Animation> Animation::CloneAndInitialize(
     RunState initial_run_state) const {
-  scoped_ptr<Animation> to_return(
+  std::unique_ptr<Animation> to_return(
       new Animation(curve_->Clone(), id_, group_, target_property_));
   to_return->run_state_ = initial_run_state;
   to_return->iterations_ = iterations_;
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index c146322..fff74fa 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -5,8 +5,9 @@
 #ifndef CC_ANIMATION_ANIMATION_H_
 #define CC_ANIMATION_ANIMATION_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/target_property.h"
 #include "cc/base/cc_export.h"
@@ -58,10 +59,11 @@
     FILL_MODE_BOTH
   };
 
-  static scoped_ptr<Animation> Create(scoped_ptr<AnimationCurve> curve,
-                                      int animation_id,
-                                      int group_id,
-                                      TargetProperty::Type target_property);
+  static std::unique_ptr<Animation> Create(
+      std::unique_ptr<AnimationCurve> curve,
+      int animation_id,
+      int group_id,
+      TargetProperty::Type target_property);
 
   virtual ~Animation();
 
@@ -144,7 +146,8 @@
   base::TimeDelta TrimTimeToCurrentIteration(
       base::TimeTicks monotonic_time) const;
 
-  scoped_ptr<Animation> CloneAndInitialize(RunState initial_run_state) const;
+  std::unique_ptr<Animation> CloneAndInitialize(
+      RunState initial_run_state) const;
 
   void set_is_controlling_instance_for_test(bool is_controlling_instance) {
     is_controlling_instance_ = is_controlling_instance;
@@ -167,14 +170,14 @@
   bool affects_pending_observers() const { return affects_pending_observers_; }
 
  private:
-  Animation(scoped_ptr<AnimationCurve> curve,
+  Animation(std::unique_ptr<AnimationCurve> curve,
             int animation_id,
             int group_id,
             TargetProperty::Type target_property);
 
   base::TimeDelta ConvertToActiveTime(base::TimeTicks monotonic_time) const;
 
-  scoped_ptr<AnimationCurve> curve_;
+  std::unique_ptr<AnimationCurve> curve_;
 
   // IDs must be unique.
   int id_;
diff --git a/cc/animation/animation_curve.h b/cc/animation/animation_curve.h
index 68bad3ba..a54480c 100644
--- a/cc/animation/animation_curve.h
+++ b/cc/animation/animation_curve.h
@@ -5,7 +5,8 @@
 #ifndef CC_ANIMATION_ANIMATION_CURVE_H_
 #define CC_ANIMATION_ANIMATION_CURVE_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/filter_operations.h"
@@ -33,7 +34,7 @@
 
   virtual base::TimeDelta Duration() const = 0;
   virtual CurveType Type() const = 0;
-  virtual scoped_ptr<AnimationCurve> Clone() const = 0;
+  virtual std::unique_ptr<AnimationCurve> Clone() const = 0;
 
   const ColorAnimationCurve* ToColorAnimationCurve() const;
   const FloatAnimationCurve* ToFloatAnimationCurve() const;
diff --git a/cc/animation/animation_delegate.h b/cc/animation/animation_delegate.h
index aee077c..c7ec2bb 100644
--- a/cc/animation/animation_delegate.h
+++ b/cc/animation/animation_delegate.h
@@ -24,10 +24,11 @@
                                       TargetProperty::Type target_property,
                                       int group) = 0;
 
-  virtual void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
-                                       TargetProperty::Type target_property,
-                                       double animation_start_time,
-                                       scoped_ptr<AnimationCurve> curve) = 0;
+  virtual void NotifyAnimationTakeover(
+      base::TimeTicks monotonic_time,
+      TargetProperty::Type target_property,
+      double animation_start_time,
+      std::unique_ptr<AnimationCurve> curve) = 0;
 
  protected:
   virtual ~AnimationDelegate() {}
diff --git a/cc/animation/animation_events.h b/cc/animation/animation_events.h
index 73a7058..f4728ba 100644
--- a/cc/animation/animation_events.h
+++ b/cc/animation/animation_events.h
@@ -5,9 +5,9 @@
 #ifndef CC_ANIMATION_ANIMATION_EVENTS_H_
 #define CC_ANIMATION_ANIMATION_EVENTS_H_
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/animation/animation.h"
 #include "cc/animation/animation_curve.h"
 #include "cc/base/cc_export.h"
@@ -42,7 +42,7 @@
 
   // For continuing a scroll offset animation on the main thread.
   double animation_start_time;
-  scoped_ptr<AnimationCurve> curve;
+  std::unique_ptr<AnimationCurve> curve;
 };
 
 class CC_EXPORT AnimationEvents {
diff --git a/cc/animation/animation_host.cc b/cc/animation/animation_host.cc
index 61a24a9..78ec7c5 100644
--- a/cc/animation/animation_host.cc
+++ b/cc/animation/animation_host.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_delegate.h"
 #include "cc/animation/animation_events.h"
 #include "cc/animation/animation_id_provider.h"
@@ -46,13 +47,13 @@
   void ScrollAnimationCreate(int layer_id,
                              const gfx::ScrollOffset& target_offset,
                              const gfx::ScrollOffset& current_offset) {
-    scoped_ptr<ScrollOffsetAnimationCurve> curve =
+    std::unique_ptr<ScrollOffsetAnimationCurve> curve =
         ScrollOffsetAnimationCurve::Create(
             target_offset, EaseInOutTimingFunction::Create(),
             ScrollOffsetAnimationCurve::DurationBehavior::INVERSE_DELTA);
     curve->SetInitialValue(current_offset);
 
-    scoped_ptr<Animation> animation = Animation::Create(
+    std::unique_ptr<Animation> animation = Animation::Create(
         std::move(curve), AnimationIdProvider::NextAnimationId(),
         AnimationIdProvider::NextGroupId(), TargetProperty::SCROLL_OFFSET);
     animation->set_is_impl_only(true);
@@ -121,7 +122,8 @@
   void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
                                TargetProperty::Type target_property,
                                double animation_start_time,
-                               scoped_ptr<AnimationCurve> curve) override {}
+                               std::unique_ptr<AnimationCurve> curve) override {
+  }
 
  private:
   void ReattachScrollOffsetPlayerIfNeeded(int layer_id) {
@@ -144,9 +146,9 @@
   DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimations);
 };
 
-scoped_ptr<AnimationHost> AnimationHost::Create(
+std::unique_ptr<AnimationHost> AnimationHost::Create(
     ThreadInstance thread_instance) {
-  return make_scoped_ptr(new AnimationHost(thread_instance));
+  return base::WrapUnique(new AnimationHost(thread_instance));
 }
 
 AnimationHost::AnimationHost(ThreadInstance thread_instance)
@@ -155,7 +157,7 @@
       thread_instance_(thread_instance) {
   if (thread_instance_ == ThreadInstance::IMPL)
     scroll_offset_animations_ =
-        make_scoped_ptr(new ScrollOffsetAnimations(this));
+        base::WrapUnique(new ScrollOffsetAnimations(this));
 }
 
 AnimationHost::~AnimationHost() {
@@ -367,11 +369,12 @@
                                                     events);
 }
 
-scoped_ptr<AnimationEvents> AnimationHost::CreateEvents() {
+std::unique_ptr<AnimationEvents> AnimationHost::CreateEvents() {
   return animation_registrar_->CreateEvents();
 }
 
-void AnimationHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
+void AnimationHost::SetAnimationEvents(
+    std::unique_ptr<AnimationEvents> events) {
   return animation_registrar_->SetAnimationEvents(std::move(events));
 }
 
diff --git a/cc/animation/animation_host.h b/cc/animation/animation_host.h
index e7f4ae68..ac7abaf1 100644
--- a/cc/animation/animation_host.h
+++ b/cc/animation/animation_host.h
@@ -5,11 +5,11 @@
 #ifndef CC_ANIMATION_ANIMATION_HOST_H_
 #define CC_ANIMATION_ANIMATION_HOST_H_
 
+#include <memory>
 #include <unordered_map>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/animation.h"
 #include "cc/base/cc_export.h"
@@ -45,7 +45,7 @@
 // we want to merge AnimationRegistrar into AnimationHost.
 class CC_EXPORT AnimationHost {
  public:
-  static scoped_ptr<AnimationHost> Create(ThreadInstance thread_instance);
+  static std::unique_ptr<AnimationHost> Create(ThreadInstance thread_instance);
   virtual ~AnimationHost();
 
   void AddAnimationTimeline(scoped_refptr<AnimationTimeline> timeline);
@@ -90,8 +90,8 @@
   bool UpdateAnimationState(bool start_ready_animations,
                             AnimationEvents* events);
 
-  scoped_ptr<AnimationEvents> CreateEvents();
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> events);
+  std::unique_ptr<AnimationEvents> CreateEvents();
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> events);
 
   bool ScrollOffsetAnimationWasInterrupted(int layer_id) const;
 
@@ -164,7 +164,7 @@
   // if they are attached to the same element(layer). Note that Element can
   // contain many Layers.
   using LayerToElementAnimationsMap =
-      std::unordered_map<int, scoped_ptr<ElementAnimations>>;
+      std::unordered_map<int, std::unique_ptr<ElementAnimations>>;
   LayerToElementAnimationsMap layer_to_element_animations_map_;
 
   // A list of all timelines which this host owns.
@@ -172,11 +172,11 @@
       std::unordered_map<int, scoped_refptr<AnimationTimeline>>;
   IdToTimelineMap id_to_timeline_map_;
 
-  scoped_ptr<AnimationRegistrar> animation_registrar_;
+  std::unique_ptr<AnimationRegistrar> animation_registrar_;
   MutatorHostClient* mutator_host_client_;
 
   class ScrollOffsetAnimations;
-  scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_;
+  std::unique_ptr<ScrollOffsetAnimations> scroll_offset_animations_;
 
   const ThreadInstance thread_instance_;
 
diff --git a/cc/animation/animation_host_perftest.cc b/cc/animation/animation_host_perftest.cc
index bd183ed..fb893325 100644
--- a/cc/animation/animation_host_perftest.cc
+++ b/cc/animation/animation_host_perftest.cc
@@ -114,7 +114,7 @@
   }
 
  protected:
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
   scoped_refptr<Layer> root_layer_;
   LayerImpl* root_layer_impl_;
 
diff --git a/cc/animation/animation_host_unittest.cc b/cc/animation/animation_host_unittest.cc
index cf828f6..6c396252 100644
--- a/cc/animation/animation_host_unittest.cc
+++ b/cc/animation/animation_host_unittest.cc
@@ -24,8 +24,9 @@
 // animation_player_unittest.cc.
 
 TEST_F(AnimationHostTest, SyncTimelinesAddRemove) {
-  scoped_ptr<AnimationHost> host(AnimationHost::Create(ThreadInstance::MAIN));
-  scoped_ptr<AnimationHost> host_impl(
+  std::unique_ptr<AnimationHost> host(
+      AnimationHost::Create(ThreadInstance::MAIN));
+  std::unique_ptr<AnimationHost> host_impl(
       AnimationHost::Create(ThreadInstance::IMPL));
 
   const int timeline_id = AnimationIdProvider::NextTimelineId();
@@ -56,8 +57,9 @@
 }
 
 TEST_F(AnimationHostTest, ImplOnlyTimeline) {
-  scoped_ptr<AnimationHost> host(AnimationHost::Create(ThreadInstance::MAIN));
-  scoped_ptr<AnimationHost> host_impl(
+  std::unique_ptr<AnimationHost> host(
+      AnimationHost::Create(ThreadInstance::MAIN));
+  std::unique_ptr<AnimationHost> host_impl(
       AnimationHost::Create(ThreadInstance::IMPL));
 
   const int timeline_id1 = AnimationIdProvider::NextTimelineId();
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
index 77a7c21e..a609c25e 100644
--- a/cc/animation/animation_player.cc
+++ b/cc/animation/animation_player.cc
@@ -118,7 +118,7 @@
   DCHECK(animations_.empty());
 }
 
-void AnimationPlayer::AddAnimation(scoped_ptr<Animation> animation) {
+void AnimationPlayer::AddAnimation(std::unique_ptr<Animation> animation) {
   DCHECK(animation->target_property() != TargetProperty::SCROLL_OFFSET ||
          (animation_host_ && animation_host_->SupportsScrollAnimations()));
 
@@ -144,11 +144,11 @@
         animation_id);
     SetNeedsCommit();
   } else {
-    auto animations_to_remove =
-        std::remove_if(animations_.begin(), animations_.end(),
-                       [animation_id](const scoped_ptr<Animation>& animation) {
-                         return animation->id() == animation_id;
-                       });
+    auto animations_to_remove = std::remove_if(
+        animations_.begin(), animations_.end(),
+        [animation_id](const std::unique_ptr<Animation>& animation) {
+          return animation->id() == animation_id;
+        });
     animations_.erase(animations_to_remove, animations_.end());
   }
 }
@@ -169,7 +169,7 @@
   } else {
     auto animations_to_remove = std::remove_if(
         animations_.begin(), animations_.end(),
-        [target_property](const scoped_ptr<Animation>& animation) {
+        [target_property](const std::unique_ptr<Animation>& animation) {
           return animation->target_property() == target_property;
         });
     animations_.erase(animations_to_remove, animations_.end());
@@ -216,7 +216,7 @@
     base::TimeTicks monotonic_time,
     TargetProperty::Type target_property,
     double animation_start_time,
-    scoped_ptr<AnimationCurve> curve) {
+    std::unique_ptr<AnimationCurve> curve) {
   if (layer_animation_delegate_) {
     DCHECK(curve);
     layer_animation_delegate_->NotifyAnimationTakeover(
diff --git a/cc/animation/animation_player.h b/cc/animation/animation_player.h
index ddd303b..301e932 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -66,7 +66,7 @@
   void AttachLayer(int layer_id);
   void DetachLayer();
 
-  void AddAnimation(scoped_ptr<Animation> animation);
+  void AddAnimation(std::unique_ptr<Animation> animation);
   void PauseAnimation(int animation_id, double time_offset);
   void RemoveAnimation(int animation_id);
   void AbortAnimation(int animation_id);
@@ -88,7 +88,7 @@
   void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
                                TargetProperty::Type target_property,
                                double animation_start_time,
-                               scoped_ptr<AnimationCurve> curve);
+                               std::unique_ptr<AnimationCurve> curve);
 
   // Whether this player has animations waiting to get sent to LAC.
   bool has_pending_animations_for_testing() const {
@@ -112,7 +112,7 @@
   // We accumulate added animations in animations_ container
   // if element_animations_ is a nullptr. It allows us to add/remove animations
   // to non-attached AnimationPlayers.
-  std::vector<scoped_ptr<Animation>> animations_;
+  std::vector<std::unique_ptr<Animation>> animations_;
 
   AnimationHost* animation_host_;
   AnimationTimeline* animation_timeline_;
diff --git a/cc/animation/animation_registrar.cc b/cc/animation/animation_registrar.cc
index e498045..7380218 100644
--- a/cc/animation/animation_registrar.cc
+++ b/cc/animation/animation_registrar.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/animation/animation_events.h"
@@ -99,12 +100,12 @@
   return true;
 }
 
-scoped_ptr<AnimationEvents> AnimationRegistrar::CreateEvents() {
-  return make_scoped_ptr(new AnimationEvents());
+std::unique_ptr<AnimationEvents> AnimationRegistrar::CreateEvents() {
+  return base::WrapUnique(new AnimationEvents());
 }
 
 void AnimationRegistrar::SetAnimationEvents(
-    scoped_ptr<AnimationEvents> events) {
+    std::unique_ptr<AnimationEvents> events) {
   for (size_t event_index = 0; event_index < events->events_.size();
        ++event_index) {
     int event_layer_id = events->events_[event_index].layer_id;
diff --git a/cc/animation/animation_registrar.h b/cc/animation/animation_registrar.h
index bc14330..ca588f6 100644
--- a/cc/animation/animation_registrar.h
+++ b/cc/animation/animation_registrar.h
@@ -5,11 +5,12 @@
 #ifndef CC_ANIMATION_ANIMATION_REGISTRAR_H_
 #define CC_ANIMATION_ANIMATION_REGISTRAR_H_
 
+#include <memory>
 #include <unordered_map>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 
@@ -23,8 +24,8 @@
   using AnimationControllerMap =
       std::unordered_map<int, LayerAnimationController*>;
 
-  static scoped_ptr<AnimationRegistrar> Create() {
-    return make_scoped_ptr(new AnimationRegistrar());
+  static std::unique_ptr<AnimationRegistrar> Create() {
+    return base::WrapUnique(new AnimationRegistrar());
   }
 
   virtual ~AnimationRegistrar();
@@ -72,8 +73,8 @@
   bool UpdateAnimationState(bool start_ready_animations,
                             AnimationEvents* events);
 
-  scoped_ptr<AnimationEvents> CreateEvents();
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> events);
+  std::unique_ptr<AnimationEvents> CreateEvents();
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> events);
 
  private:
   AnimationRegistrar();
diff --git a/cc/animation/animation_timeline.h b/cc/animation/animation_timeline.h
index ca618ca..48dd059 100644
--- a/cc/animation/animation_timeline.h
+++ b/cc/animation/animation_timeline.h
@@ -5,11 +5,11 @@
 #ifndef CC_ANIMATION_ANIMATION_TIMELINE_H_
 #define CC_ANIMATION_ANIMATION_TIMELINE_H_
 
+#include <memory>
 #include <unordered_map>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/animation/animation_timeline_unittest.cc b/cc/animation/animation_timeline_unittest.cc
index 3b0bc5ab..c380024 100644
--- a/cc/animation/animation_timeline_unittest.cc
+++ b/cc/animation/animation_timeline_unittest.cc
@@ -15,8 +15,9 @@
 namespace {
 
 TEST(AnimationTimelineTest, SyncPlayersAttachDetach) {
-  scoped_ptr<AnimationHost> host(AnimationHost::Create(ThreadInstance::MAIN));
-  scoped_ptr<AnimationHost> host_impl(
+  std::unique_ptr<AnimationHost> host(
+      AnimationHost::Create(ThreadInstance::MAIN));
+  std::unique_ptr<AnimationHost> host_impl(
       AnimationHost::Create(ThreadInstance::IMPL));
 
   const int timeline_id = AnimationIdProvider::NextTimelineId();
@@ -60,8 +61,9 @@
 }
 
 TEST(AnimationTimelineTest, ClearPlayers) {
-  scoped_ptr<AnimationHost> host(AnimationHost::Create(ThreadInstance::MAIN));
-  scoped_ptr<AnimationHost> host_impl(
+  std::unique_ptr<AnimationHost> host(
+      AnimationHost::Create(ThreadInstance::MAIN));
+  std::unique_ptr<AnimationHost> host_impl(
       AnimationHost::Create(ThreadInstance::IMPL));
 
   const int timeline_id = AnimationIdProvider::NextTimelineId();
diff --git a/cc/animation/animation_unittest.cc b/cc/animation/animation_unittest.cc
index 3bb984a..f20e3f12 100644
--- a/cc/animation/animation_unittest.cc
+++ b/cc/animation/animation_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "cc/animation/animation.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/test/animation_test_common.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -18,27 +19,27 @@
                                             base::Time::kMicrosecondsPerSecond);
 }
 
-scoped_ptr<Animation> CreateAnimation(double iterations,
-                                      double duration,
-                                      double playback_rate) {
-  scoped_ptr<Animation> to_return(
-      Animation::Create(make_scoped_ptr(new FakeFloatAnimationCurve(duration)),
+std::unique_ptr<Animation> CreateAnimation(double iterations,
+                                           double duration,
+                                           double playback_rate) {
+  std::unique_ptr<Animation> to_return(
+      Animation::Create(base::WrapUnique(new FakeFloatAnimationCurve(duration)),
                         0, 1, TargetProperty::OPACITY));
   to_return->set_iterations(iterations);
   to_return->set_playback_rate(playback_rate);
   return to_return;
 }
 
-scoped_ptr<Animation> CreateAnimation(double iterations, double duration) {
+std::unique_ptr<Animation> CreateAnimation(double iterations, double duration) {
   return CreateAnimation(iterations, duration, 1);
 }
 
-scoped_ptr<Animation> CreateAnimation(double iterations) {
+std::unique_ptr<Animation> CreateAnimation(double iterations) {
   return CreateAnimation(iterations, 1, 1);
 }
 
 TEST(AnimationTest, TrimTimeZeroIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(0));
+  std::unique_ptr<Animation> anim(CreateAnimation(0));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -48,7 +49,7 @@
 }
 
 TEST(AnimationTest, TrimTimeOneIteration) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -60,7 +61,7 @@
 }
 
 TEST(AnimationTest, TrimTimeOneHalfIteration) {
-  scoped_ptr<Animation> anim(CreateAnimation(1.5));
+  std::unique_ptr<Animation> anim(CreateAnimation(1.5));
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                      .InSecondsF());
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
@@ -78,7 +79,7 @@
 }
 
 TEST(AnimationTest, TrimTimeInfiniteIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(-1));
+  std::unique_ptr<Animation> anim(CreateAnimation(-1));
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
   EXPECT_EQ(0.5, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.5))
@@ -90,7 +91,7 @@
 }
 
 TEST(AnimationTest, TrimTimeReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(-1));
+  std::unique_ptr<Animation> anim(CreateAnimation(-1));
   anim->set_direction(Animation::DIRECTION_REVERSE);
   EXPECT_EQ(
       1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0)).InSecondsF());
@@ -107,7 +108,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateInfiniteIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(-1));
+  std::unique_ptr<Animation> anim(CreateAnimation(-1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -124,7 +125,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateOneIteration) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -141,7 +142,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateTwoIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(2));
+  std::unique_ptr<Animation> anim(CreateAnimation(2));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -164,7 +165,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateTwoHalfIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(2.5));
+  std::unique_ptr<Animation> anim(CreateAnimation(2.5));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -191,7 +192,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateReverseInfiniteIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(-1));
+  std::unique_ptr<Animation> anim(CreateAnimation(-1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE_REVERSE);
   EXPECT_EQ(1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -208,7 +209,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateReverseOneIteration) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE_REVERSE);
   EXPECT_EQ(1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -225,7 +226,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateReverseTwoIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(2));
+  std::unique_ptr<Animation> anim(CreateAnimation(2));
   anim->set_direction(Animation::DIRECTION_ALTERNATE_REVERSE);
   EXPECT_EQ(1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -248,7 +249,7 @@
 }
 
 TEST(AnimationTest, TrimTimeStartTime) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_start_time(TicksFromSecondsF(4));
   EXPECT_EQ(
       0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0)).InSecondsF());
@@ -263,7 +264,7 @@
 }
 
 TEST(AnimationTest, TrimTimeStartTimeReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_start_time(TicksFromSecondsF(4));
   anim->set_direction(Animation::DIRECTION_REVERSE);
   EXPECT_EQ(
@@ -279,7 +280,7 @@
 }
 
 TEST(AnimationTest, TrimTimeTimeOffset) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_time_offset(TimeDelta::FromMilliseconds(4000));
   anim->set_start_time(TicksFromSecondsF(4));
   EXPECT_EQ(
@@ -293,7 +294,7 @@
 }
 
 TEST(AnimationTest, TrimTimeTimeOffsetReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_time_offset(TimeDelta::FromMilliseconds(4000));
   anim->set_start_time(TicksFromSecondsF(4));
   anim->set_direction(Animation::DIRECTION_REVERSE);
@@ -308,7 +309,7 @@
 }
 
 TEST(AnimationTest, TrimTimeNegativeTimeOffset) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_time_offset(TimeDelta::FromMilliseconds(-4000));
 
   EXPECT_EQ(
@@ -322,7 +323,7 @@
 }
 
 TEST(AnimationTest, TrimTimeNegativeTimeOffsetReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_time_offset(TimeDelta::FromMilliseconds(-4000));
   anim->set_direction(Animation::DIRECTION_REVERSE);
 
@@ -337,7 +338,7 @@
 }
 
 TEST(AnimationTest, TrimTimePauseResume) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_EQ(
       0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0)).InSecondsF());
@@ -354,7 +355,7 @@
 }
 
 TEST(AnimationTest, TrimTimePauseResumeReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_direction(Animation::DIRECTION_REVERSE);
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_EQ(1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
@@ -372,7 +373,7 @@
 }
 
 TEST(AnimationTest, TrimTimeSuspendResume) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_EQ(
       0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0)).InSecondsF());
@@ -389,7 +390,7 @@
 }
 
 TEST(AnimationTest, TrimTimeSuspendResumeReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_direction(Animation::DIRECTION_REVERSE);
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_EQ(1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
@@ -407,7 +408,7 @@
 }
 
 TEST(AnimationTest, TrimTimeZeroDuration) {
-  scoped_ptr<Animation> anim(CreateAnimation(0, 0));
+  std::unique_ptr<Animation> anim(CreateAnimation(0, 0));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
@@ -418,7 +419,7 @@
 }
 
 TEST(AnimationTest, TrimTimeStarting) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 5.0));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 5.0));
   anim->SetRunState(Animation::STARTING, TicksFromSecondsF(0.0));
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                      .InSecondsF());
@@ -445,7 +446,7 @@
 }
 
 TEST(AnimationTest, TrimTimeNeedsSynchronizedStartTime) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 5.0));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 5.0));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   anim->set_needs_synchronized_start_time(true);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
@@ -472,7 +473,7 @@
 }
 
 TEST(AnimationTest, IsFinishedAtZeroIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(0));
+  std::unique_ptr<Animation> anim(CreateAnimation(0));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_FALSE(anim->IsFinishedAt(TicksFromSecondsF(-1.0)));
   EXPECT_TRUE(anim->IsFinishedAt(TicksFromSecondsF(0.0)));
@@ -480,7 +481,7 @@
 }
 
 TEST(AnimationTest, IsFinishedAtOneIteration) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_FALSE(anim->IsFinishedAt(TicksFromSecondsF(-1.0)));
   EXPECT_FALSE(anim->IsFinishedAt(TicksFromSecondsF(0.0)));
@@ -489,7 +490,7 @@
 }
 
 TEST(AnimationTest, IsFinishedAtInfiniteIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(-1));
+  std::unique_ptr<Animation> anim(CreateAnimation(-1));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_FALSE(anim->IsFinishedAt(TicksFromSecondsF(0.0)));
   EXPECT_FALSE(anim->IsFinishedAt(TicksFromSecondsF(0.5)));
@@ -498,7 +499,7 @@
 }
 
 TEST(AnimationTest, IsFinishedNegativeTimeOffset) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_time_offset(TimeDelta::FromMilliseconds(-500));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
 
@@ -512,7 +513,7 @@
 }
 
 TEST(AnimationTest, IsFinishedPositiveTimeOffset) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_time_offset(TimeDelta::FromMilliseconds(500));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
 
@@ -523,7 +524,7 @@
 }
 
 TEST(AnimationTest, IsFinishedAtNotRunning) {
-  scoped_ptr<Animation> anim(CreateAnimation(0));
+  std::unique_ptr<Animation> anim(CreateAnimation(0));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_TRUE(anim->IsFinishedAt(TicksFromSecondsF(0.0)));
   anim->SetRunState(Animation::PAUSED, TicksFromSecondsF(0.0));
@@ -538,7 +539,7 @@
 }
 
 TEST(AnimationTest, IsFinished) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
   EXPECT_FALSE(anim->is_finished());
   anim->SetRunState(Animation::PAUSED, TicksFromSecondsF(0.0));
@@ -553,7 +554,7 @@
 }
 
 TEST(AnimationTest, IsFinishedNeedsSynchronizedStartTime) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(2.0));
   EXPECT_FALSE(anim->is_finished());
   anim->SetRunState(Animation::PAUSED, TicksFromSecondsF(2.0));
@@ -568,7 +569,7 @@
 }
 
 TEST(AnimationTest, RunStateChangesIgnoredWhileSuspended) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->Suspend(TicksFromSecondsF(0));
   EXPECT_EQ(Animation::PAUSED, anim->run_state());
   anim->SetRunState(Animation::RUNNING, TicksFromSecondsF(0.0));
@@ -579,7 +580,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackNormal) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 1, 1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 1, 1));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -593,7 +594,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackSlow) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 1, 0.5));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 1, 0.5));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -609,7 +610,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackFast) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 4, 2));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 4, 2));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -627,7 +628,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackNormalReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 2, -1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 2, -1));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -645,7 +646,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackSlowReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 2, -0.5));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 2, -0.5));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -671,7 +672,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackFastReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 2, -2));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 2, -2));
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
   EXPECT_EQ(
@@ -689,7 +690,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackFastInfiniteIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(-1, 4, 4));
+  std::unique_ptr<Animation> anim(CreateAnimation(-1, 4, 4));
   EXPECT_EQ(
       0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0)).InSecondsF());
   EXPECT_EQ(
@@ -705,7 +706,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackNormalDoubleReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 1, -1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 1, -1));
   anim->set_direction(Animation::DIRECTION_REVERSE);
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
@@ -720,7 +721,7 @@
 }
 
 TEST(AnimationTest, TrimTimePlaybackFastDoubleReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 4, -2));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 4, -2));
   anim->set_direction(Animation::DIRECTION_REVERSE);
   EXPECT_EQ(0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                    .InSecondsF());
@@ -739,7 +740,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateTwoIterationsPlaybackFast) {
-  scoped_ptr<Animation> anim(CreateAnimation(2, 2, 2));
+  std::unique_ptr<Animation> anim(CreateAnimation(2, 2, 2));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -764,7 +765,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateTwoIterationsPlaybackFastReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(2, 2, 2));
+  std::unique_ptr<Animation> anim(CreateAnimation(2, 2, 2));
   anim->set_direction(Animation::DIRECTION_ALTERNATE_REVERSE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                      .InSecondsF());
@@ -791,7 +792,7 @@
 }
 
 TEST(AnimationTest, TrimTimeAlternateTwoIterationsPlaybackFastDoubleReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(2, 2, -2));
+  std::unique_ptr<Animation> anim(CreateAnimation(2, 2, -2));
   anim->set_direction(Animation::DIRECTION_ALTERNATE_REVERSE);
   EXPECT_EQ(2.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -817,7 +818,7 @@
 
 TEST(AnimationTest,
      TrimTimeAlternateReverseThreeIterationsPlaybackFastAlternateReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(3, 2, -2));
+  std::unique_ptr<Animation> anim(CreateAnimation(3, 2, -2));
   anim->set_direction(Animation::DIRECTION_ALTERNATE_REVERSE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -851,7 +852,7 @@
 
 TEST(AnimationTest,
      TrimTimeAlternateReverseTwoIterationsPlaybackNormalAlternate) {
-  scoped_ptr<Animation> anim(CreateAnimation(2, 2, -1));
+  std::unique_ptr<Animation> anim(CreateAnimation(2, 2, -1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
                      .InSecondsF());
@@ -876,7 +877,7 @@
 }
 
 TEST(AnimationTest, TrimTimeIterationStart) {
-  scoped_ptr<Animation> anim(CreateAnimation(2, 1, 1));
+  std::unique_ptr<Animation> anim(CreateAnimation(2, 1, 1));
   anim->set_iteration_start(0.5);
   EXPECT_EQ(0.5, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
                      .InSecondsF());
@@ -895,7 +896,7 @@
 }
 
 TEST(AnimationTest, TrimTimeIterationStartAlternate) {
-  scoped_ptr<Animation> anim(CreateAnimation(2, 1, 1));
+  std::unique_ptr<Animation> anim(CreateAnimation(2, 1, 1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   anim->set_iteration_start(0.3);
   EXPECT_EQ(0.3, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
@@ -915,7 +916,7 @@
 }
 
 TEST(AnimationTest, TrimTimeIterationStartAlternateThreeIterations) {
-  scoped_ptr<Animation> anim(CreateAnimation(3, 1, 1));
+  std::unique_ptr<Animation> anim(CreateAnimation(3, 1, 1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   anim->set_iteration_start(1);
   EXPECT_EQ(1.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(-1.0))
@@ -940,7 +941,7 @@
 
 TEST(AnimationTest,
      TrimTimeIterationStartAlternateThreeIterationsPlaybackReverse) {
-  scoped_ptr<Animation> anim(CreateAnimation(3, 1, -1));
+  std::unique_ptr<Animation> anim(CreateAnimation(3, 1, -1));
   anim->set_direction(Animation::DIRECTION_ALTERNATE);
   anim->set_iteration_start(1);
   EXPECT_EQ(0.0, anim->TrimTimeToCurrentIteration(TicksFromSecondsF(0.0))
@@ -956,7 +957,7 @@
 }
 
 TEST(AnimationTest, InEffectFillMode) {
-  scoped_ptr<Animation> anim(CreateAnimation(1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1));
   anim->set_fill_mode(Animation::FILL_MODE_NONE);
   EXPECT_FALSE(anim->InEffect(TicksFromSecondsF(-1.0)));
   EXPECT_TRUE(anim->InEffect(TicksFromSecondsF(0.0)));
@@ -979,7 +980,7 @@
 }
 
 TEST(AnimationTest, InEffectFillModePlayback) {
-  scoped_ptr<Animation> anim(CreateAnimation(1, 1, -1));
+  std::unique_ptr<Animation> anim(CreateAnimation(1, 1, -1));
   anim->set_fill_mode(Animation::FILL_MODE_NONE);
   EXPECT_FALSE(anim->InEffect(TicksFromSecondsF(-1.0)));
   EXPECT_TRUE(anim->InEffect(TicksFromSecondsF(0.0)));
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index 6a9dc33..57985d90 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -5,6 +5,7 @@
 #include "cc/animation/element_animations.h"
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_host.h"
 #include "cc/animation/animation_player.h"
 #include "cc/animation/animation_registrar.h"
@@ -56,12 +57,13 @@
   DISALLOW_COPY_AND_ASSIGN(ValueObserver);
 };
 
-scoped_ptr<ElementAnimations> ElementAnimations::Create(AnimationHost* host) {
-  return make_scoped_ptr(new ElementAnimations(host));
+std::unique_ptr<ElementAnimations> ElementAnimations::Create(
+    AnimationHost* host) {
+  return base::WrapUnique(new ElementAnimations(host));
 }
 
 ElementAnimations::ElementAnimations(AnimationHost* host)
-    : players_list_(make_scoped_ptr(new PlayersList())), animation_host_(host) {
+    : players_list_(new PlayersList()), animation_host_(host) {
   DCHECK(animation_host_);
 }
 
@@ -211,7 +213,7 @@
   DCHECK(layer_animation_controller_);
   DCHECK(!active_value_observer_);
   active_value_observer_ =
-      make_scoped_ptr(new ValueObserver(this, LayerTreeType::ACTIVE));
+      base::WrapUnique(new ValueObserver(this, LayerTreeType::ACTIVE));
   layer_animation_controller_->AddValueObserver(active_value_observer_.get());
 }
 
@@ -226,7 +228,7 @@
   DCHECK(layer_animation_controller_);
   DCHECK(!pending_value_observer_);
   pending_value_observer_ =
-      make_scoped_ptr(new ValueObserver(this, LayerTreeType::PENDING));
+      base::WrapUnique(new ValueObserver(this, LayerTreeType::PENDING));
   layer_animation_controller_->AddValueObserver(pending_value_observer_.get());
 }
 
@@ -274,11 +276,11 @@
     base::TimeTicks monotonic_time,
     TargetProperty::Type target_property,
     double animation_start_time,
-    scoped_ptr<AnimationCurve> curve) {
+    std::unique_ptr<AnimationCurve> curve) {
   DCHECK(curve);
   for (PlayersListNode* node = players_list_->head();
        node != players_list_->end(); node = node->next()) {
-    scoped_ptr<AnimationCurve> animation_curve = curve->Clone();
+    std::unique_ptr<AnimationCurve> animation_curve = curve->Clone();
     AnimationPlayer* player = node->value();
     player->NotifyAnimationTakeover(monotonic_time, target_property,
                                     animation_start_time,
diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h
index 17dfbd0..9eb41b5 100644
--- a/cc/animation/element_animations.h
+++ b/cc/animation/element_animations.h
@@ -5,10 +5,11 @@
 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_
 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_
 
+#include <memory>
+
 #include "base/containers/linked_list.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/animation/animation_curve.h"
 #include "cc/animation/animation_delegate.h"
 #include "cc/animation/layer_animation_controller.h"
@@ -38,7 +39,7 @@
 class CC_EXPORT ElementAnimations : public AnimationDelegate,
                                     public LayerAnimationValueProvider {
  public:
-  static scoped_ptr<ElementAnimations> Create(AnimationHost* host);
+  static std::unique_ptr<ElementAnimations> Create(AnimationHost* host);
   ~ElementAnimations() override;
 
   int layer_id() const {
@@ -108,16 +109,16 @@
   void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
                                TargetProperty::Type target_property,
                                double animation_start_time,
-                               scoped_ptr<AnimationCurve> curve) override;
+                               std::unique_ptr<AnimationCurve> curve) override;
 
   // LayerAnimationValueProvider implementation.
   gfx::ScrollOffset ScrollOffsetForAnimation() const override;
 
-  scoped_ptr<PlayersList> players_list_;
+  std::unique_ptr<PlayersList> players_list_;
 
   class ValueObserver;
-  scoped_ptr<ValueObserver> active_value_observer_;
-  scoped_ptr<ValueObserver> pending_value_observer_;
+  std::unique_ptr<ValueObserver> active_value_observer_;
+  std::unique_ptr<ValueObserver> pending_value_observer_;
 
   // LAC is owned by ElementAnimations (1:1 relationship).
   scoped_refptr<LayerAnimationController> layer_animation_controller_;
diff --git a/cc/animation/keyframed_animation_curve.cc b/cc/animation/keyframed_animation_curve.cc
index a8dd9bd..061d48e 100644
--- a/cc/animation/keyframed_animation_curve.cc
+++ b/cc/animation/keyframed_animation_curve.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/animation/keyframed_animation_curve.h"
+
 #include <stddef.h>
 
 #include <algorithm>
 
-#include "cc/animation/keyframed_animation_curve.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/time_util.h"
 #include "ui/gfx/animation/tween.h"
 #include "ui/gfx/geometry/box_f.h"
@@ -16,8 +18,8 @@
 namespace {
 
 template <class KeyframeType>
-void InsertKeyframe(scoped_ptr<KeyframeType> keyframe,
-                    std::vector<scoped_ptr<KeyframeType>>* keyframes) {
+void InsertKeyframe(std::unique_ptr<KeyframeType> keyframe,
+                    std::vector<std::unique_ptr<KeyframeType>>* keyframes) {
   // Usually, the keyframes will be added in order, so this loop would be
   // unnecessary and we should skip it if possible.
   if (!keyframes->empty() && keyframe->Time() < keyframes->back()->Time()) {
@@ -34,8 +36,8 @@
 
 template <typename KeyframeType>
 base::TimeDelta TransformedAnimationTime(
-    const std::vector<scoped_ptr<KeyframeType>>& keyframes,
-    const scoped_ptr<TimingFunction>& timing_function,
+    const std::vector<std::unique_ptr<KeyframeType>>& keyframes,
+    const std::unique_ptr<TimingFunction>& timing_function,
     base::TimeDelta time) {
   if (timing_function) {
     base::TimeDelta start_time = keyframes.front()->Time();
@@ -51,8 +53,9 @@
 }
 
 template <typename KeyframeType>
-size_t GetActiveKeyframe(const std::vector<scoped_ptr<KeyframeType>>& keyframes,
-                         base::TimeDelta time) {
+size_t GetActiveKeyframe(
+    const std::vector<std::unique_ptr<KeyframeType>>& keyframes,
+    base::TimeDelta time) {
   DCHECK_GE(keyframes.size(), 2ul);
   size_t i = 0;
   for (; i < keyframes.size() - 2; ++i) {  // Last keyframe is never active.
@@ -65,7 +68,7 @@
 
 template <typename KeyframeType>
 double TransformedKeyframeProgress(
-    const std::vector<scoped_ptr<KeyframeType>>& keyframes,
+    const std::vector<std::unique_ptr<KeyframeType>>& keyframes,
     base::TimeDelta time,
     size_t i) {
   double progress =
@@ -82,7 +85,7 @@
 }  // namespace
 
 Keyframe::Keyframe(base::TimeDelta time,
-                   scoped_ptr<TimingFunction> timing_function)
+                   std::unique_ptr<TimingFunction> timing_function)
     : time_(time), timing_function_(std::move(timing_function)) {}
 
 Keyframe::~Keyframe() {}
@@ -91,41 +94,41 @@
   return time_;
 }
 
-scoped_ptr<ColorKeyframe> ColorKeyframe::Create(
+std::unique_ptr<ColorKeyframe> ColorKeyframe::Create(
     base::TimeDelta time,
     SkColor value,
-    scoped_ptr<TimingFunction> timing_function) {
-  return make_scoped_ptr(
+    std::unique_ptr<TimingFunction> timing_function) {
+  return base::WrapUnique(
       new ColorKeyframe(time, value, std::move(timing_function)));
 }
 
 ColorKeyframe::ColorKeyframe(base::TimeDelta time,
                              SkColor value,
-                             scoped_ptr<TimingFunction> timing_function)
+                             std::unique_ptr<TimingFunction> timing_function)
     : Keyframe(time, std::move(timing_function)), value_(value) {}
 
 ColorKeyframe::~ColorKeyframe() {}
 
 SkColor ColorKeyframe::Value() const { return value_; }
 
-scoped_ptr<ColorKeyframe> ColorKeyframe::Clone() const {
-  scoped_ptr<TimingFunction> func;
+std::unique_ptr<ColorKeyframe> ColorKeyframe::Clone() const {
+  std::unique_ptr<TimingFunction> func;
   if (timing_function())
     func = timing_function()->Clone();
   return ColorKeyframe::Create(Time(), Value(), std::move(func));
 }
 
-scoped_ptr<FloatKeyframe> FloatKeyframe::Create(
+std::unique_ptr<FloatKeyframe> FloatKeyframe::Create(
     base::TimeDelta time,
     float value,
-    scoped_ptr<TimingFunction> timing_function) {
-  return make_scoped_ptr(
+    std::unique_ptr<TimingFunction> timing_function) {
+  return base::WrapUnique(
       new FloatKeyframe(time, value, std::move(timing_function)));
 }
 
 FloatKeyframe::FloatKeyframe(base::TimeDelta time,
                              float value,
-                             scoped_ptr<TimingFunction> timing_function)
+                             std::unique_ptr<TimingFunction> timing_function)
     : Keyframe(time, std::move(timing_function)), value_(value) {}
 
 FloatKeyframe::~FloatKeyframe() {}
@@ -134,24 +137,25 @@
   return value_;
 }
 
-scoped_ptr<FloatKeyframe> FloatKeyframe::Clone() const {
-  scoped_ptr<TimingFunction> func;
+std::unique_ptr<FloatKeyframe> FloatKeyframe::Clone() const {
+  std::unique_ptr<TimingFunction> func;
   if (timing_function())
     func = timing_function()->Clone();
   return FloatKeyframe::Create(Time(), Value(), std::move(func));
 }
 
-scoped_ptr<TransformKeyframe> TransformKeyframe::Create(
+std::unique_ptr<TransformKeyframe> TransformKeyframe::Create(
     base::TimeDelta time,
     const TransformOperations& value,
-    scoped_ptr<TimingFunction> timing_function) {
-  return make_scoped_ptr(
+    std::unique_ptr<TimingFunction> timing_function) {
+  return base::WrapUnique(
       new TransformKeyframe(time, value, std::move(timing_function)));
 }
 
-TransformKeyframe::TransformKeyframe(base::TimeDelta time,
-                                     const TransformOperations& value,
-                                     scoped_ptr<TimingFunction> timing_function)
+TransformKeyframe::TransformKeyframe(
+    base::TimeDelta time,
+    const TransformOperations& value,
+    std::unique_ptr<TimingFunction> timing_function)
     : Keyframe(time, std::move(timing_function)), value_(value) {}
 
 TransformKeyframe::~TransformKeyframe() {}
@@ -160,24 +164,24 @@
   return value_;
 }
 
-scoped_ptr<TransformKeyframe> TransformKeyframe::Clone() const {
-  scoped_ptr<TimingFunction> func;
+std::unique_ptr<TransformKeyframe> TransformKeyframe::Clone() const {
+  std::unique_ptr<TimingFunction> func;
   if (timing_function())
     func = timing_function()->Clone();
   return TransformKeyframe::Create(Time(), Value(), std::move(func));
 }
 
-scoped_ptr<FilterKeyframe> FilterKeyframe::Create(
+std::unique_ptr<FilterKeyframe> FilterKeyframe::Create(
     base::TimeDelta time,
     const FilterOperations& value,
-    scoped_ptr<TimingFunction> timing_function) {
-  return make_scoped_ptr(
+    std::unique_ptr<TimingFunction> timing_function) {
+  return base::WrapUnique(
       new FilterKeyframe(time, value, std::move(timing_function)));
 }
 
 FilterKeyframe::FilterKeyframe(base::TimeDelta time,
                                const FilterOperations& value,
-                               scoped_ptr<TimingFunction> timing_function)
+                               std::unique_ptr<TimingFunction> timing_function)
     : Keyframe(time, std::move(timing_function)), value_(value) {}
 
 FilterKeyframe::~FilterKeyframe() {}
@@ -186,16 +190,16 @@
   return value_;
 }
 
-scoped_ptr<FilterKeyframe> FilterKeyframe::Clone() const {
-  scoped_ptr<TimingFunction> func;
+std::unique_ptr<FilterKeyframe> FilterKeyframe::Clone() const {
+  std::unique_ptr<TimingFunction> func;
   if (timing_function())
     func = timing_function()->Clone();
   return FilterKeyframe::Create(Time(), Value(), std::move(func));
 }
 
-scoped_ptr<KeyframedColorAnimationCurve> KeyframedColorAnimationCurve::
-    Create() {
-  return make_scoped_ptr(new KeyframedColorAnimationCurve);
+std::unique_ptr<KeyframedColorAnimationCurve>
+KeyframedColorAnimationCurve::Create() {
+  return base::WrapUnique(new KeyframedColorAnimationCurve);
 }
 
 KeyframedColorAnimationCurve::KeyframedColorAnimationCurve() {}
@@ -203,7 +207,7 @@
 KeyframedColorAnimationCurve::~KeyframedColorAnimationCurve() {}
 
 void KeyframedColorAnimationCurve::AddKeyframe(
-    scoped_ptr<ColorKeyframe> keyframe) {
+    std::unique_ptr<ColorKeyframe> keyframe) {
   InsertKeyframe(std::move(keyframe), &keyframes_);
 }
 
@@ -211,8 +215,8 @@
   return keyframes_.back()->Time() - keyframes_.front()->Time();
 }
 
-scoped_ptr<AnimationCurve> KeyframedColorAnimationCurve::Clone() const {
-  scoped_ptr<KeyframedColorAnimationCurve> to_return =
+std::unique_ptr<AnimationCurve> KeyframedColorAnimationCurve::Clone() const {
+  std::unique_ptr<KeyframedColorAnimationCurve> to_return =
       KeyframedColorAnimationCurve::Create();
   for (size_t i = 0; i < keyframes_.size(); ++i)
     to_return->AddKeyframe(keyframes_[i]->Clone());
@@ -240,9 +244,9 @@
 
 // KeyframedFloatAnimationCurve
 
-scoped_ptr<KeyframedFloatAnimationCurve> KeyframedFloatAnimationCurve::
-    Create() {
-  return make_scoped_ptr(new KeyframedFloatAnimationCurve);
+std::unique_ptr<KeyframedFloatAnimationCurve>
+KeyframedFloatAnimationCurve::Create() {
+  return base::WrapUnique(new KeyframedFloatAnimationCurve);
 }
 
 KeyframedFloatAnimationCurve::KeyframedFloatAnimationCurve() {}
@@ -250,7 +254,7 @@
 KeyframedFloatAnimationCurve::~KeyframedFloatAnimationCurve() {}
 
 void KeyframedFloatAnimationCurve::AddKeyframe(
-    scoped_ptr<FloatKeyframe> keyframe) {
+    std::unique_ptr<FloatKeyframe> keyframe) {
   InsertKeyframe(std::move(keyframe), &keyframes_);
 }
 
@@ -258,8 +262,8 @@
   return keyframes_.back()->Time() - keyframes_.front()->Time();
 }
 
-scoped_ptr<AnimationCurve> KeyframedFloatAnimationCurve::Clone() const {
-  scoped_ptr<KeyframedFloatAnimationCurve> to_return =
+std::unique_ptr<AnimationCurve> KeyframedFloatAnimationCurve::Clone() const {
+  std::unique_ptr<KeyframedFloatAnimationCurve> to_return =
       KeyframedFloatAnimationCurve::Create();
   for (size_t i = 0; i < keyframes_.size(); ++i)
     to_return->AddKeyframe(keyframes_[i]->Clone());
@@ -285,9 +289,9 @@
       (keyframes_[i+1]->Value() - keyframes_[i]->Value()) * progress;
 }
 
-scoped_ptr<KeyframedTransformAnimationCurve> KeyframedTransformAnimationCurve::
-    Create() {
-  return make_scoped_ptr(new KeyframedTransformAnimationCurve);
+std::unique_ptr<KeyframedTransformAnimationCurve>
+KeyframedTransformAnimationCurve::Create() {
+  return base::WrapUnique(new KeyframedTransformAnimationCurve);
 }
 
 KeyframedTransformAnimationCurve::KeyframedTransformAnimationCurve() {}
@@ -295,7 +299,7 @@
 KeyframedTransformAnimationCurve::~KeyframedTransformAnimationCurve() {}
 
 void KeyframedTransformAnimationCurve::AddKeyframe(
-    scoped_ptr<TransformKeyframe> keyframe) {
+    std::unique_ptr<TransformKeyframe> keyframe) {
   InsertKeyframe(std::move(keyframe), &keyframes_);
 }
 
@@ -303,8 +307,9 @@
   return keyframes_.back()->Time() - keyframes_.front()->Time();
 }
 
-scoped_ptr<AnimationCurve> KeyframedTransformAnimationCurve::Clone() const {
-  scoped_ptr<KeyframedTransformAnimationCurve> to_return =
+std::unique_ptr<AnimationCurve> KeyframedTransformAnimationCurve::Clone()
+    const {
+  std::unique_ptr<KeyframedTransformAnimationCurve> to_return =
       KeyframedTransformAnimationCurve::Create();
   for (size_t i = 0; i < keyframes_.size(); ++i)
     to_return->AddKeyframe(keyframes_[i]->Clone());
@@ -425,9 +430,9 @@
   return true;
 }
 
-scoped_ptr<KeyframedFilterAnimationCurve> KeyframedFilterAnimationCurve::
-    Create() {
-  return make_scoped_ptr(new KeyframedFilterAnimationCurve);
+std::unique_ptr<KeyframedFilterAnimationCurve>
+KeyframedFilterAnimationCurve::Create() {
+  return base::WrapUnique(new KeyframedFilterAnimationCurve);
 }
 
 KeyframedFilterAnimationCurve::KeyframedFilterAnimationCurve() {}
@@ -435,7 +440,7 @@
 KeyframedFilterAnimationCurve::~KeyframedFilterAnimationCurve() {}
 
 void KeyframedFilterAnimationCurve::AddKeyframe(
-    scoped_ptr<FilterKeyframe> keyframe) {
+    std::unique_ptr<FilterKeyframe> keyframe) {
   InsertKeyframe(std::move(keyframe), &keyframes_);
 }
 
@@ -443,8 +448,8 @@
   return keyframes_.back()->Time() - keyframes_.front()->Time();
 }
 
-scoped_ptr<AnimationCurve> KeyframedFilterAnimationCurve::Clone() const {
-  scoped_ptr<KeyframedFilterAnimationCurve> to_return =
+std::unique_ptr<AnimationCurve> KeyframedFilterAnimationCurve::Clone() const {
+  std::unique_ptr<KeyframedFilterAnimationCurve> to_return =
       KeyframedFilterAnimationCurve::Create();
   for (size_t i = 0; i < keyframes_.size(); ++i)
     to_return->AddKeyframe(keyframes_[i]->Clone());
diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h
index 24101f65..6e26875 100644
--- a/cc/animation/keyframed_animation_curve.h
+++ b/cc/animation/keyframed_animation_curve.h
@@ -24,92 +24,93 @@
   }
 
  protected:
-  Keyframe(base::TimeDelta time, scoped_ptr<TimingFunction> timing_function);
+  Keyframe(base::TimeDelta time,
+           std::unique_ptr<TimingFunction> timing_function);
   virtual ~Keyframe();
 
  private:
   base::TimeDelta time_;
-  scoped_ptr<TimingFunction> timing_function_;
+  std::unique_ptr<TimingFunction> timing_function_;
 
   DISALLOW_COPY_AND_ASSIGN(Keyframe);
 };
 
 class CC_EXPORT ColorKeyframe : public Keyframe {
  public:
-  static scoped_ptr<ColorKeyframe> Create(
+  static std::unique_ptr<ColorKeyframe> Create(
       base::TimeDelta time,
       SkColor value,
-      scoped_ptr<TimingFunction> timing_function);
+      std::unique_ptr<TimingFunction> timing_function);
   ~ColorKeyframe() override;
 
   SkColor Value() const;
 
-  scoped_ptr<ColorKeyframe> Clone() const;
+  std::unique_ptr<ColorKeyframe> Clone() const;
 
  private:
   ColorKeyframe(base::TimeDelta time,
                 SkColor value,
-                scoped_ptr<TimingFunction> timing_function);
+                std::unique_ptr<TimingFunction> timing_function);
 
   SkColor value_;
 };
 
 class CC_EXPORT FloatKeyframe : public Keyframe {
  public:
-  static scoped_ptr<FloatKeyframe> Create(
+  static std::unique_ptr<FloatKeyframe> Create(
       base::TimeDelta time,
       float value,
-      scoped_ptr<TimingFunction> timing_function);
+      std::unique_ptr<TimingFunction> timing_function);
   ~FloatKeyframe() override;
 
   float Value() const;
 
-  scoped_ptr<FloatKeyframe> Clone() const;
+  std::unique_ptr<FloatKeyframe> Clone() const;
 
  private:
   FloatKeyframe(base::TimeDelta time,
                 float value,
-                scoped_ptr<TimingFunction> timing_function);
+                std::unique_ptr<TimingFunction> timing_function);
 
   float value_;
 };
 
 class CC_EXPORT TransformKeyframe : public Keyframe {
  public:
-  static scoped_ptr<TransformKeyframe> Create(
+  static std::unique_ptr<TransformKeyframe> Create(
       base::TimeDelta time,
       const TransformOperations& value,
-      scoped_ptr<TimingFunction> timing_function);
+      std::unique_ptr<TimingFunction> timing_function);
   ~TransformKeyframe() override;
 
   const TransformOperations& Value() const;
 
-  scoped_ptr<TransformKeyframe> Clone() const;
+  std::unique_ptr<TransformKeyframe> Clone() const;
 
  private:
   TransformKeyframe(base::TimeDelta time,
                     const TransformOperations& value,
-                    scoped_ptr<TimingFunction> timing_function);
+                    std::unique_ptr<TimingFunction> timing_function);
 
   TransformOperations value_;
 };
 
 class CC_EXPORT FilterKeyframe : public Keyframe {
  public:
-  static scoped_ptr<FilterKeyframe> Create(
+  static std::unique_ptr<FilterKeyframe> Create(
       base::TimeDelta time,
       const FilterOperations& value,
-      scoped_ptr<TimingFunction> timing_function);
+      std::unique_ptr<TimingFunction> timing_function);
   ~FilterKeyframe() override;
 
   const FilterOperations& Value() const;
 
-  scoped_ptr<FilterKeyframe> Clone() const;
+  std::unique_ptr<FilterKeyframe> Clone() const;
 
  private:
   FilterKeyframe(base::TimeDelta time,
                  const FilterOperations& value,
-                 scoped_ptr<TimingFunction> timing_function);
+                 std::unique_ptr<TimingFunction> timing_function);
 
   FilterOperations value_;
 };
@@ -117,18 +118,18 @@
 class CC_EXPORT KeyframedColorAnimationCurve : public ColorAnimationCurve {
  public:
   // It is required that the keyframes be sorted by time.
-  static scoped_ptr<KeyframedColorAnimationCurve> Create();
+  static std::unique_ptr<KeyframedColorAnimationCurve> Create();
 
   ~KeyframedColorAnimationCurve() override;
 
-  void AddKeyframe(scoped_ptr<ColorKeyframe> keyframe);
-  void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+  void AddKeyframe(std::unique_ptr<ColorKeyframe> keyframe);
+  void SetTimingFunction(std::unique_ptr<TimingFunction> timing_function) {
     timing_function_ = std::move(timing_function);
   }
 
   // AnimationCurve implementation
   base::TimeDelta Duration() const override;
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
   // BackgrounColorAnimationCurve implementation
   SkColor GetValue(base::TimeDelta t) const override;
@@ -138,8 +139,8 @@
 
   // Always sorted in order of increasing time. No two keyframes have the
   // same time.
-  std::vector<scoped_ptr<ColorKeyframe>> keyframes_;
-  scoped_ptr<TimingFunction> timing_function_;
+  std::vector<std::unique_ptr<ColorKeyframe>> keyframes_;
+  std::unique_ptr<TimingFunction> timing_function_;
 
   DISALLOW_COPY_AND_ASSIGN(KeyframedColorAnimationCurve);
 };
@@ -147,18 +148,18 @@
 class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve {
  public:
   // It is required that the keyframes be sorted by time.
-  static scoped_ptr<KeyframedFloatAnimationCurve> Create();
+  static std::unique_ptr<KeyframedFloatAnimationCurve> Create();
 
   ~KeyframedFloatAnimationCurve() override;
 
-  void AddKeyframe(scoped_ptr<FloatKeyframe> keyframe);
-  void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+  void AddKeyframe(std::unique_ptr<FloatKeyframe> keyframe);
+  void SetTimingFunction(std::unique_ptr<TimingFunction> timing_function) {
     timing_function_ = std::move(timing_function);
   }
 
   // AnimationCurve implementation
   base::TimeDelta Duration() const override;
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
   // FloatAnimationCurve implementation
   float GetValue(base::TimeDelta t) const override;
@@ -168,8 +169,8 @@
 
   // Always sorted in order of increasing time. No two keyframes have the
   // same time.
-  std::vector<scoped_ptr<FloatKeyframe>> keyframes_;
-  scoped_ptr<TimingFunction> timing_function_;
+  std::vector<std::unique_ptr<FloatKeyframe>> keyframes_;
+  std::unique_ptr<TimingFunction> timing_function_;
 
   DISALLOW_COPY_AND_ASSIGN(KeyframedFloatAnimationCurve);
 };
@@ -178,18 +179,18 @@
     : public TransformAnimationCurve {
  public:
   // It is required that the keyframes be sorted by time.
-  static scoped_ptr<KeyframedTransformAnimationCurve> Create();
+  static std::unique_ptr<KeyframedTransformAnimationCurve> Create();
 
   ~KeyframedTransformAnimationCurve() override;
 
-  void AddKeyframe(scoped_ptr<TransformKeyframe> keyframe);
-  void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+  void AddKeyframe(std::unique_ptr<TransformKeyframe> keyframe);
+  void SetTimingFunction(std::unique_ptr<TimingFunction> timing_function) {
     timing_function_ = std::move(timing_function);
   }
 
   // AnimationCurve implementation
   base::TimeDelta Duration() const override;
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
   // TransformAnimationCurve implementation
   gfx::Transform GetValue(base::TimeDelta t) const override;
@@ -208,8 +209,8 @@
 
   // Always sorted in order of increasing time. No two keyframes have the
   // same time.
-  std::vector<scoped_ptr<TransformKeyframe>> keyframes_;
-  scoped_ptr<TimingFunction> timing_function_;
+  std::vector<std::unique_ptr<TransformKeyframe>> keyframes_;
+  std::unique_ptr<TimingFunction> timing_function_;
 
   DISALLOW_COPY_AND_ASSIGN(KeyframedTransformAnimationCurve);
 };
@@ -218,18 +219,18 @@
     : public FilterAnimationCurve {
  public:
   // It is required that the keyframes be sorted by time.
-  static scoped_ptr<KeyframedFilterAnimationCurve> Create();
+  static std::unique_ptr<KeyframedFilterAnimationCurve> Create();
 
   ~KeyframedFilterAnimationCurve() override;
 
-  void AddKeyframe(scoped_ptr<FilterKeyframe> keyframe);
-  void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+  void AddKeyframe(std::unique_ptr<FilterKeyframe> keyframe);
+  void SetTimingFunction(std::unique_ptr<TimingFunction> timing_function) {
     timing_function_ = std::move(timing_function);
   }
 
   // AnimationCurve implementation
   base::TimeDelta Duration() const override;
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
   // FilterAnimationCurve implementation
   FilterOperations GetValue(base::TimeDelta t) const override;
@@ -240,8 +241,8 @@
 
   // Always sorted in order of increasing time. No two keyframes have the
   // same time.
-  std::vector<scoped_ptr<FilterKeyframe>> keyframes_;
-  scoped_ptr<TimingFunction> timing_function_;
+  std::vector<std::unique_ptr<FilterKeyframe>> keyframes_;
+  std::unique_ptr<TimingFunction> timing_function_;
 
   DISALLOW_COPY_AND_ASSIGN(KeyframedFilterAnimationCurve);
 };
diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc
index 718872b8..ce5fb3c 100644
--- a/cc/animation/keyframed_animation_curve_unittest.cc
+++ b/cc/animation/keyframed_animation_curve_unittest.cc
@@ -27,7 +27,7 @@
 // Tests that a color animation with one keyframe works as expected.
 TEST(KeyframedAnimationCurveTest, OneColorKeyFrame) {
   SkColor color = SkColorSetARGB(255, 255, 255, 255);
-  scoped_ptr<KeyframedColorAnimationCurve> curve(
+  std::unique_ptr<KeyframedColorAnimationCurve> curve(
       KeyframedColorAnimationCurve::Create());
   curve->AddKeyframe(ColorKeyframe::Create(base::TimeDelta(), color, nullptr));
 
@@ -45,7 +45,7 @@
   SkColor color_a = SkColorSetARGB(255, 255, 0, 0);
   SkColor color_b = SkColorSetARGB(255, 0, 255, 0);
   SkColor color_midpoint = gfx::Tween::ColorValueBetween(0.5, color_a, color_b);
-  scoped_ptr<KeyframedColorAnimationCurve> curve(
+  std::unique_ptr<KeyframedColorAnimationCurve> curve(
       KeyframedColorAnimationCurve::Create());
   curve->AddKeyframe(
       ColorKeyframe::Create(base::TimeDelta(), color_a, nullptr));
@@ -73,7 +73,7 @@
       gfx::Tween::ColorValueBetween(0.5, color_a, color_b);
   SkColor color_midpoint2 =
       gfx::Tween::ColorValueBetween(0.5, color_b, color_c);
-  scoped_ptr<KeyframedColorAnimationCurve> curve(
+  std::unique_ptr<KeyframedColorAnimationCurve> curve(
       KeyframedColorAnimationCurve::Create());
   curve->AddKeyframe(
       ColorKeyframe::Create(base::TimeDelta(), color_a, nullptr));
@@ -103,7 +103,7 @@
   SkColor color_a = SkColorSetARGB(255, 64, 0, 0);
   SkColor color_b = SkColorSetARGB(255, 192, 0, 0);
 
-  scoped_ptr<KeyframedColorAnimationCurve> curve(
+  std::unique_ptr<KeyframedColorAnimationCurve> curve(
       KeyframedColorAnimationCurve::Create());
   curve->AddKeyframe(
       ColorKeyframe::Create(base::TimeDelta(), color_a, nullptr));
@@ -137,7 +137,7 @@
 
 // Tests that a float animation with one keyframe works as expected.
 TEST(KeyframedAnimationCurveTest, OneFloatKeyframe) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 2.f, nullptr));
   EXPECT_FLOAT_EQ(2.f, curve->GetValue(base::TimeDelta::FromSecondsD(-1.f)));
@@ -149,7 +149,7 @@
 
 // Tests that a float animation with two keyframes works as expected.
 TEST(KeyframedAnimationCurveTest, TwoFloatKeyframe) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 2.f, nullptr));
   curve->AddKeyframe(
@@ -163,7 +163,7 @@
 
 // Tests that a float animation with three keyframes works as expected.
 TEST(KeyframedAnimationCurveTest, ThreeFloatKeyframe) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 2.f, nullptr));
   curve->AddKeyframe(
@@ -181,7 +181,7 @@
 
 // Tests that a float animation with multiple keys at a given time works sanely.
 TEST(KeyframedAnimationCurveTest, RepeatedFloatKeyTimes) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 4.f, nullptr));
   curve->AddKeyframe(
@@ -206,7 +206,7 @@
 
 // Tests that a transform animation with one keyframe works as expected.
 TEST(KeyframedAnimationCurveTest, OneTransformKeyframe) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
   TransformOperations operations;
   operations.AppendTranslate(2.f, 0.f, 0.f);
@@ -222,7 +222,7 @@
 
 // Tests that a transform animation with two keyframes works as expected.
 TEST(KeyframedAnimationCurveTest, TwoTransformKeyframe) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
   TransformOperations operations1;
   operations1.AppendTranslate(2.f, 0.f, 0.f);
@@ -242,7 +242,7 @@
 
 // Tests that a transform animation with three keyframes works as expected.
 TEST(KeyframedAnimationCurveTest, ThreeTransformKeyframe) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
   TransformOperations operations1;
   operations1.AppendTranslate(2.f, 0.f, 0.f);
@@ -268,7 +268,7 @@
 // Tests that a transform animation with multiple keys at a given time works
 // sanely.
 TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
   // A step function.
   TransformOperations operations1;
@@ -304,7 +304,7 @@
 
 // Tests that a filter animation with one keyframe works as expected.
 TEST(KeyframedAnimationCurveTest, OneFilterKeyframe) {
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
   FilterOperations operations;
   operations.Append(FilterOperation::CreateBrightnessFilter(2.f));
@@ -320,7 +320,7 @@
 
 // Tests that a filter animation with two keyframes works as expected.
 TEST(KeyframedAnimationCurveTest, TwoFilterKeyframe) {
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
   FilterOperations operations1;
   operations1.Append(FilterOperation::CreateBrightnessFilter(2.f));
@@ -340,7 +340,7 @@
 
 // Tests that a filter animation with three keyframes works as expected.
 TEST(KeyframedAnimationCurveTest, ThreeFilterKeyframe) {
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
   FilterOperations operations1;
   operations1.Append(FilterOperation::CreateBrightnessFilter(2.f));
@@ -366,7 +366,7 @@
 // Tests that a filter animation with multiple keys at a given time works
 // sanely.
 TEST(KeyframedAnimationCurveTest, RepeatedFilterKeyTimes) {
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
   // A step function.
   FilterOperations operations1;
@@ -404,7 +404,7 @@
 
 // Tests that the keyframes may be added out of order.
 TEST(KeyframedAnimationCurveTest, UnsortedKeyframes) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(
       FloatKeyframe::Create(base::TimeDelta::FromSecondsD(2.f), 8.f, nullptr));
@@ -422,7 +422,7 @@
 
 // Tests that a cubic bezier timing function works as expected.
 TEST(KeyframedAnimationCurveTest, CubicBezierTimingFunction) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(
       base::TimeDelta(), 0.f,
@@ -442,7 +442,7 @@
 
 // Tests a step timing function if the change of values occur at the start.
 TEST(KeyframedAnimationCurveTest, StepsTimingFunctionStepAtStart) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   const int num_steps = 36;
   const float steps_start_offset = 1.0f;
@@ -473,7 +473,7 @@
 
 // Tests a step timing function if the change of values occur at the middle.
 TEST(KeyframedAnimationCurveTest, StepsTimingFunctionStepAtMiddle) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   const int num_steps = 36;
   const float steps_start_offset = 0.5f;
@@ -505,7 +505,7 @@
 
 // Tests a step timing function if the change of values occur at the end.
 TEST(KeyframedAnimationCurveTest, StepsTimingFunctionStepAtEnd) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   const int num_steps = 36;
   const float steps_start_offset = 0.0f;
@@ -537,7 +537,7 @@
 
 // Tests that animated bounds are computed as expected.
 TEST(KeyframedAnimationCurveTest, AnimatedBounds) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -562,7 +562,7 @@
 
 // Tests that animations that affect scale are correctly identified.
 TEST(KeyframedAnimationCurveTest, AffectsScale) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -593,7 +593,7 @@
 
 // Tests that animations that are translations are correctly identified.
 TEST(KeyframedAnimationCurveTest, IsTranslation) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -624,7 +624,7 @@
 
 // Tests that maximum target scale is computed as expected.
 TEST(KeyframedAnimationCurveTest, MaximumTargetScale) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -657,7 +657,7 @@
   EXPECT_FALSE(curve->MaximumTargetScale(true, &maximum_scale));
 
   // The original scale is not used in computing the max.
-  scoped_ptr<KeyframedTransformAnimationCurve> curve2(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations4;
@@ -679,7 +679,7 @@
 
 // Tests that starting animation scale is computed as expected.
 TEST(KeyframedAnimationCurveTest, AnimationStartScale) {
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -726,7 +726,7 @@
 
 // Tests that an animation with a curve timing function works as expected.
 TEST(KeyframedAnimationCurveTest, CurveTiming) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 0.f, nullptr));
   curve->AddKeyframe(
@@ -747,7 +747,7 @@
 // Tests that an animation with a curve and keyframe timing function works as
 // expected.
 TEST(KeyframedAnimationCurveTest, CurveAndKeyframeTiming) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(
       base::TimeDelta(), 0.f,
@@ -775,7 +775,7 @@
 // Tests that a linear timing function works as expected for inputs outside of
 // range [0,1]
 TEST(KeyframedAnimationCurveTest, LinearTimingInputsOutsideZeroOneRange) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 0.f, nullptr));
   curve->AddKeyframe(
@@ -794,7 +794,7 @@
 // the range [0, 1] then a keyframe cubic-bezier timing function
 // should consume that input properly (using end-point gradients).
 TEST(KeyframedAnimationCurveTest, CurveTimingInputsOutsideZeroOneRange) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   // Keyframe timing function with 0.5 gradients at each end.
   curve->AddKeyframe(FloatKeyframe::Create(
@@ -820,7 +820,7 @@
 // Tests that a step timing function works as expected for inputs outside of
 // range [0,1]
 TEST(KeyframedAnimationCurveTest, StepsTimingInputsOutsideZeroOneRange) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(
       base::TimeDelta(), 0.f, StepsTimingFunction::Create(4, 0.5f)));
@@ -837,7 +837,7 @@
 // Tests that an animation with a curve timing function and multiple keyframes
 // works as expected.
 TEST(KeyframedAnimationCurveTest, CurveTimingMultipleKeyframes) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 0.f, nullptr));
   curve->AddKeyframe(
@@ -866,7 +866,7 @@
 // Tests that an animation with a curve timing function that overshoots works as
 // expected.
 TEST(KeyframedAnimationCurveTest, CurveTimingOvershootMultipeKeyframes) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
   curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), 0.f, nullptr));
   curve->AddKeyframe(
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index f18a4cec..07454423 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -96,7 +96,7 @@
   // removed items in an unspecified state.
   auto animations_to_remove = std::stable_partition(
       animations_.begin(), animations_.end(),
-      [animation_id](const scoped_ptr<Animation>& animation) {
+      [animation_id](const std::unique_ptr<Animation>& animation) {
         return animation->id() != animation_id;
       });
   for (auto it = animations_to_remove; it != animations_.end(); ++it) {
@@ -288,7 +288,7 @@
     animations_[i]->set_affects_active_observers(
         animations_[i]->affects_pending_observers());
   }
-  auto affects_no_observers = [](const scoped_ptr<Animation>& animation) {
+  auto affects_no_observers = [](const std::unique_ptr<Animation>& animation) {
     return !animation->affects_active_observers() &&
            !animation->affects_pending_observers();
   };
@@ -301,7 +301,8 @@
     UpdatePotentiallyAnimatingTransform();
 }
 
-void LayerAnimationController::AddAnimation(scoped_ptr<Animation> animation) {
+void LayerAnimationController::AddAnimation(
+    std::unique_ptr<Animation> animation) {
   bool added_transform_animation =
       animation->target_property() == TargetProperty::TRANSFORM;
   animations_.push_back(std::move(animation));
@@ -440,7 +441,7 @@
     const AnimationEvent& event) {
   DCHECK(event.target_property == TargetProperty::SCROLL_OFFSET);
   if (layer_animation_delegate_) {
-    scoped_ptr<AnimationCurve> animation_curve = event.curve->Clone();
+    std::unique_ptr<AnimationCurve> animation_curve = event.curve->Clone();
     layer_animation_delegate_->NotifyAnimationTakeover(
         event.monotonic_time, event.target_property, event.animation_start_time,
         std::move(animation_curve));
@@ -723,7 +724,7 @@
     // The new animation should be set to run as soon as possible.
     Animation::RunState initial_run_state =
         Animation::WAITING_FOR_TARGET_AVAILABILITY;
-    scoped_ptr<Animation> to_add(
+    std::unique_ptr<Animation> to_add(
         animations_[i]->CloneAndInitialize(initial_run_state));
     DCHECK(!to_add->needs_synchronized_start_time());
     to_add->set_affects_active_observers(false);
@@ -757,7 +758,7 @@
     }
   }
   auto affects_active_only_and_is_waiting_for_deletion = [](
-      const scoped_ptr<Animation>& animation) {
+      const std::unique_ptr<Animation>& animation) {
     return animation->run_state() == Animation::WAITING_FOR_DELETION &&
            !animation->affects_pending_observers();
   };
@@ -1081,12 +1082,13 @@
 }
 
 void LayerAnimationController::PurgeAnimationsMarkedForDeletion() {
-  animations_.erase(std::remove_if(animations_.begin(), animations_.end(),
-                                   [](const scoped_ptr<Animation>& animation) {
-                                     return animation->run_state() ==
-                                            Animation::WAITING_FOR_DELETION;
-                                   }),
-                    animations_.end());
+  animations_.erase(
+      std::remove_if(animations_.begin(), animations_.end(),
+                     [](const std::unique_ptr<Animation>& animation) {
+                       return animation->run_state() ==
+                              Animation::WAITING_FOR_DELETION;
+                     }),
+      animations_.end());
 }
 
 void LayerAnimationController::TickAnimations(base::TimeTicks monotonic_time) {
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index 2676d812..4a7b1873 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -6,11 +6,11 @@
 #define CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_
 
 #include <bitset>
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/time/time.h"
 #include "cc/animation/animation.h"
@@ -44,7 +44,7 @@
 
   int id() const { return id_; }
 
-  void AddAnimation(scoped_ptr<Animation> animation);
+  void AddAnimation(std::unique_ptr<Animation> animation);
   void PauseAnimation(int animation_id, base::TimeDelta time_offset);
   void RemoveAnimation(int animation_id);
   void AbortAnimation(int animation_id);
@@ -228,7 +228,7 @@
 
   AnimationRegistrar* registrar_;
   int id_;
-  std::vector<scoped_ptr<Animation>> animations_;
+  std::vector<std::unique_ptr<Animation>> animations_;
 
   // This is used to ensure that we don't spam the registrar.
   bool is_active_;
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index 5390d1b..ed67610 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation.h"
 #include "cc/animation/animation_curve.h"
 #include "cc/animation/animation_delegate.h"
@@ -36,9 +37,10 @@
 // not yet been set.
 const TimeTicks kInitialTickTime = TicksFromSecondsF(1.0);
 
-scoped_ptr<Animation> CreateAnimation(scoped_ptr<AnimationCurve> curve,
-                                      int group_id,
-                                      TargetProperty::Type property) {
+std::unique_ptr<Animation> CreateAnimation(
+    std::unique_ptr<AnimationCurve> curve,
+    int group_id,
+    TargetProperty::Type property) {
   return Animation::Create(std::move(curve), 0, group_id, property);
 }
 
@@ -97,11 +99,11 @@
   dummy_provider_impl.set_scroll_offset(provider_initial_value);
 
   // Animation with initial value set.
-  scoped_ptr<ScrollOffsetAnimationCurve> curve_fixed(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve_fixed(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
   curve_fixed->SetInitialValue(initial_value);
-  scoped_ptr<Animation> animation_fixed(
+  std::unique_ptr<Animation> animation_fixed(
       Animation::Create(std::move(curve_fixed), 1 /* animation_id */, 0,
                         TargetProperty::SCROLL_OFFSET));
   controller->AddAnimation(std::move(animation_fixed));
@@ -112,10 +114,10 @@
                                          ->GetValue(base::TimeDelta()));
 
   // Animation without initial value set.
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 2 /* animation id */, 0,
                         TargetProperty::SCROLL_OFFSET));
   controller->AddAnimation(std::move(animation));
@@ -215,8 +217,9 @@
 
 // Tests that controllers activate and deactivate as expected.
 TEST(LayerAnimationControllerTest, Activation) {
-  scoped_ptr<AnimationRegistrar> registrar = AnimationRegistrar::Create();
-  scoped_ptr<AnimationRegistrar> registrar_impl = AnimationRegistrar::Create();
+  std::unique_ptr<AnimationRegistrar> registrar = AnimationRegistrar::Create();
+  std::unique_ptr<AnimationRegistrar> registrar_impl =
+      AnimationRegistrar::Create();
 
   FakeLayerAnimationValueObserver dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
@@ -226,7 +229,7 @@
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
-  scoped_ptr<AnimationEvents> events = registrar->CreateEvents();
+  std::unique_ptr<AnimationEvents> events = registrar->CreateEvents();
 
   controller->SetAnimationRegistrar(registrar.get());
   controller_impl->SetAnimationRegistrar(registrar_impl.get());
@@ -387,7 +390,8 @@
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
 
   EXPECT_FALSE(controller_impl->GetAnimation(TargetProperty::OPACITY));
 
@@ -433,7 +437,8 @@
 TEST(LayerAnimationControllerTest, AnimationsAreDeleted) {
   FakeLayerAnimationValueObserver dummy;
   FakeLayerAnimationValueObserver dummy_impl;
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   scoped_refptr<LayerAnimationController> controller_impl(
@@ -505,15 +510,16 @@
 }
 
 TEST(LayerAnimationControllerTest, TrivialTransition) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
 
   EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
   controller->AddAnimation(std::move(to_add));
@@ -535,15 +541,16 @@
 }
 
 TEST(LayerAnimationControllerTest, TrivialTransitionOnImpl) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   to_add->set_is_impl_only(true);
 
   controller_impl->AddAnimation(std::move(to_add));
@@ -568,7 +575,8 @@
 }
 
 TEST(LayerAnimationControllerTest, TrivialTransformOnImpl) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
@@ -579,7 +587,7 @@
   const float delta_x = 3;
   const float delta_y = 4;
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
 
   // Create simple TRANSFORM animation.
@@ -590,7 +598,7 @@
   curve->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 1, 0, TargetProperty::TRANSFORM));
   animation->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(animation));
@@ -623,13 +631,14 @@
 }
 
 TEST(LayerAnimationControllerTest, FilterTransition) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
 
   FilterOperations start_filters;
@@ -641,7 +650,7 @@
   curve->AddKeyframe(FilterKeyframe::Create(base::TimeDelta::FromSecondsD(1.0),
                                             end_filters, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 1, 0, TargetProperty::FILTER));
   controller->AddAnimation(std::move(animation));
 
@@ -670,13 +679,14 @@
 }
 
 TEST(LayerAnimationControllerTest, FilterTransitionOnImplOnly) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
 
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
 
   // Create simple FILTER animation.
@@ -689,7 +699,7 @@
   curve->AddKeyframe(FilterKeyframe::Create(base::TimeDelta::FromSecondsD(1.0),
                                             end_filters, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 1, 0, TargetProperty::FILTER));
   animation->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(animation));
@@ -726,7 +736,8 @@
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
   controller_impl->set_value_provider(&dummy_provider_impl);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   FakeLayerAnimationValueProvider dummy_provider;
   scoped_refptr<LayerAnimationController> controller(
@@ -736,11 +747,11 @@
 
   gfx::ScrollOffset initial_value(100.f, 300.f);
   gfx::ScrollOffset target_value(300.f, 200.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
@@ -804,7 +815,8 @@
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   FakeLayerAnimationValueProvider dummy_provider;
   scoped_refptr<LayerAnimationController> controller(
@@ -814,11 +826,11 @@
 
   gfx::ScrollOffset initial_value(500.f, 100.f);
   gfx::ScrollOffset target_value(300.f, 200.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
@@ -879,17 +891,18 @@
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
 
   gfx::ScrollOffset initial_value(100.f, 300.f);
   gfx::ScrollOffset target_value(300.f, 200.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
   curve->SetInitialValue(initial_value);
   double duration_in_seconds = curve->Duration().InSecondsF();
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(animation));
@@ -927,7 +940,8 @@
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
   controller_impl->set_value_provider(&dummy_provider_impl);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   FakeLayerAnimationValueProvider dummy_provider;
   scoped_refptr<LayerAnimationController> controller(
@@ -937,12 +951,12 @@
 
   // First test the 1-argument version of RemoveAnimation.
   gfx::ScrollOffset target_value(300.f, 200.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
 
   int animation_id = 1;
-  scoped_ptr<Animation> animation(Animation::Create(
+  std::unique_ptr<Animation> animation(Animation::Create(
       std::move(curve), animation_id, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
@@ -1050,7 +1064,7 @@
   void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
                                TargetProperty::Type target_property,
                                double animation_start_time,
-                               scoped_ptr<AnimationCurve> curve) override {
+                               std::unique_ptr<AnimationCurve> curve) override {
     takeover_ = true;
   }
 
@@ -1080,13 +1094,14 @@
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeAnimationDelegate delegate;
   controller_impl->set_layer_animation_delegate(&delegate);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   to_add->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(to_add));
 
@@ -1203,15 +1218,16 @@
 // finish.
 TEST(LayerAnimationControllerTest,
      AnimationsWaitingForStartTimeDoNotFinishIfTheyOutwaitTheirFinish) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   to_add->set_needs_synchronized_start_time(true);
 
   // We should pause at the first keyframe indefinitely waiting for that
@@ -1242,7 +1258,8 @@
 
 // Tests that two queued animations affecting the same property run in sequence.
 TEST(LayerAnimationControllerTest, TrivialQueuing) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
@@ -1251,11 +1268,11 @@
   EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
 
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), 2,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)),
+      2, TargetProperty::OPACITY));
 
   EXPECT_TRUE(controller->needs_to_start_animations_for_testing());
 
@@ -1283,22 +1300,23 @@
 
 // Tests interrupting a transition with another transition.
 TEST(LayerAnimationControllerTest, Interrupt) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
   EXPECT_TRUE(controller->HasActiveAnimation());
   EXPECT_EQ(0.f, dummy.opacity());
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), 2,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)),
+      2, TargetProperty::OPACITY));
   controller->AbortAnimations(TargetProperty::OPACITY);
   controller->AddAnimation(std::move(to_add));
 
@@ -1317,21 +1335,22 @@
 // Tests scheduling two animations to run together when only one property is
 // free.
 TEST(LayerAnimationControllerTest, ScheduleTogetherWhenAPropertyIsBlocked) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 2,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1)), 2,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      2, TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
@@ -1353,21 +1372,22 @@
 // another animation queued to start when the shorter animation finishes (should
 // wait for both to finish).
 TEST(LayerAnimationControllerTest, ScheduleTogetherWithAnAnimWaiting) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(2)), 1,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(2)), 1,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), 2,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)),
+      2, TargetProperty::OPACITY));
 
   // Animations with id 1 should both start now.
   controller->Animate(kInitialTickTime);
@@ -1393,15 +1413,16 @@
 
 // Test that a looping animation loops and for the correct number of iterations.
 TEST(LayerAnimationControllerTest, TrivialLooping) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   to_add->set_iterations(3);
   controller->AddAnimation(std::move(to_add));
 
@@ -1438,15 +1459,16 @@
 
 // Test that an infinitely looping animation does indeed go until aborted.
 TEST(LayerAnimationControllerTest, InfiniteLooping) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   to_add->set_iterations(-1);
   controller->AddAnimation(std::move(to_add));
 
@@ -1484,15 +1506,16 @@
 
 // Test that pausing and resuming work as expected.
 TEST(LayerAnimationControllerTest, PauseResume) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
@@ -1529,7 +1552,8 @@
 }
 
 TEST(LayerAnimationControllerTest, AbortAGroupedAnimation) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
@@ -1537,14 +1561,14 @@
 
   const int animation_id = 2;
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1, 1,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1, 1,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)),
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)),
       animation_id, 1, TargetProperty::OPACITY));
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.75f)), 3,
-      2, TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.75f)),
+      3, 2, TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
@@ -1574,15 +1598,16 @@
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<Animation> to_add(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)), 0,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> to_add(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)),
+      0, TargetProperty::OPACITY));
   to_add->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(to_add));
 
@@ -1605,14 +1630,15 @@
 
 // Tests that skipping a call to UpdateState works as expected.
 TEST(LayerAnimationControllerTest, SkipUpdateState) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   scoped_refptr<LayerAnimationController> controller(
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  scoped_ptr<Animation> first_animation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1,
+  std::unique_ptr<Animation> first_animation(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1,
       TargetProperty::TRANSFORM));
   first_animation->set_is_controlling_instance_for_test(true);
   controller->AddAnimation(std::move(first_animation));
@@ -1620,9 +1646,9 @@
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
 
-  scoped_ptr<Animation> second_animation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> second_animation(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      2, TargetProperty::OPACITY));
   second_animation->set_is_controlling_instance_for_test(true);
   controller->AddAnimation(std::move(second_animation));
 
@@ -1652,7 +1678,8 @@
 // Tests that an animation controller with only a pending observer gets ticked
 // but doesn't progress animations past the STARTING state.
 TEST(LayerAnimationControllerTest, InactiveObserverGetsTicked) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy;
   FakeInactiveLayerAnimationValueObserver pending_dummy;
   scoped_refptr<LayerAnimationController> controller(
@@ -1660,8 +1687,8 @@
 
   const int id = 1;
   controller->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.5f, 1.f)), id,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.5f, 1.f)),
+      id, TargetProperty::OPACITY));
 
   // Without an observer, the animation shouldn't progress to the STARTING
   // state.
@@ -1714,7 +1741,7 @@
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve1(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -1724,11 +1751,11 @@
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   controller_impl->AddAnimation(std::move(animation));
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve2(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations2;
@@ -1764,7 +1791,7 @@
   EXPECT_FALSE(controller_impl->HasTransformAnimationThatInflatesBounds());
 
   // Add an animation whose bounds we don't yet support computing.
-  scoped_ptr<KeyframedTransformAnimationCurve> curve3(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve3(
       KeyframedTransformAnimationCurve::Create());
   TransformOperations operations3;
   gfx::Transform transform3;
@@ -1791,20 +1818,20 @@
   // Start with several animations, and allow some of them to reach the finished
   // state.
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 1, 1,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 1, 1,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2, 2,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      2, 2, TargetProperty::OPACITY));
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 3, 3,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 3, 3,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)), 4, 4,
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(2.0)), 4, 4,
       TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 5, 5,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      5, 5, TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, nullptr);
@@ -1937,11 +1964,11 @@
   int animation_id = 1;
   gfx::ScrollOffset initial_value(100.f, 300.f);
   gfx::ScrollOffset target_value(300.f, 200.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
   curve->SetInitialValue(initial_value);
-  scoped_ptr<Animation> animation(Animation::Create(
+  std::unique_ptr<Animation> animation(Animation::Create(
       std::move(curve), animation_id, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_start_time(TicksFromSecondsF(123));
   animation->set_is_impl_only(true);
@@ -1986,7 +2013,8 @@
 // Ensure that we only generate FINISHED events for animations in a group
 // once all animations in that group are finished.
 TEST(LayerAnimationControllerTest, FinishedEventsForGroup) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
@@ -1995,15 +2023,15 @@
   const int group_id = 1;
 
   // Add two animations with the same group id but different durations.
-  scoped_ptr<Animation> first_animation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)), 1, group_id,
-      TargetProperty::TRANSFORM));
+  std::unique_ptr<Animation> first_animation(Animation::Create(
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(2.0)), 1,
+      group_id, TargetProperty::TRANSFORM));
   first_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(first_animation));
 
-  scoped_ptr<Animation> second_animation(Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2,
-      group_id, TargetProperty::OPACITY));
+  std::unique_ptr<Animation> second_animation(Animation::Create(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      2, group_id, TargetProperty::OPACITY));
   second_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(second_animation));
 
@@ -2042,22 +2070,23 @@
 // we generate a FINISHED event for the finished animation and an ABORTED
 // event for the aborted animation.
 TEST(LayerAnimationControllerTest, FinishedAndAbortedEventsForGroup) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
   controller_impl->AddValueObserver(&dummy_impl);
 
   // Add two animations with the same group id.
-  scoped_ptr<Animation> first_animation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 1,
+  std::unique_ptr<Animation> first_animation(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 1,
       TargetProperty::TRANSFORM));
   first_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(first_animation));
 
-  scoped_ptr<Animation> second_animation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> second_animation(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   second_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(second_animation));
 
@@ -2092,13 +2121,13 @@
   EXPECT_FALSE(controller_impl->HasAnimationThatAffectsScale());
 
   controller_impl->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
 
   // Opacity animations don't affect scale.
   EXPECT_FALSE(controller_impl->HasAnimationThatAffectsScale());
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve1(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -2108,14 +2137,14 @@
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve1), 2, 2, TargetProperty::TRANSFORM));
   controller_impl->AddAnimation(std::move(animation));
 
   // Translations don't affect scale.
   EXPECT_FALSE(controller_impl->HasAnimationThatAffectsScale());
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve2(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations2;
@@ -2149,8 +2178,8 @@
       LayerAnimationController::ObserverType::PENDING));
 
   controller_impl->AddAnimation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
 
   // Opacity animations aren't non-translation transforms.
   EXPECT_TRUE(controller_impl->HasOnlyTranslationTransforms(
@@ -2158,7 +2187,7 @@
   EXPECT_TRUE(controller_impl->HasOnlyTranslationTransforms(
       LayerAnimationController::ObserverType::PENDING));
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve1(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -2168,7 +2197,7 @@
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve1), 2, 2, TargetProperty::TRANSFORM));
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2178,7 +2207,7 @@
   EXPECT_TRUE(controller_impl->HasOnlyTranslationTransforms(
       LayerAnimationController::ObserverType::PENDING));
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve2(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations2;
@@ -2225,7 +2254,7 @@
 TEST(LayerAnimationControllerTest, AnimationStartScale) {
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
-  scoped_ptr<KeyframedTransformAnimationCurve> curve1(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -2235,7 +2264,7 @@
   TransformOperations operations2;
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
@@ -2256,7 +2285,7 @@
       LayerAnimationController::ObserverType::ACTIVE, &start_scale));
   EXPECT_EQ(4.f, start_scale);
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve2(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations3;
@@ -2275,7 +2304,7 @@
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve3(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve3(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations4;
@@ -2331,7 +2360,7 @@
       LayerAnimationController::ObserverType::ACTIVE, &max_scale));
   EXPECT_EQ(0.f, max_scale);
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve1(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations1;
@@ -2341,7 +2370,7 @@
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
@@ -2361,7 +2390,7 @@
       LayerAnimationController::ObserverType::ACTIVE, &max_scale));
   EXPECT_EQ(4.f, max_scale);
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve2(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve2(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations2;
@@ -2391,7 +2420,7 @@
       LayerAnimationController::ObserverType::ACTIVE, &max_scale));
   EXPECT_EQ(6.f, max_scale);
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve3(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve3(
       KeyframedTransformAnimationCurve::Create());
 
   TransformOperations operations3;
@@ -2437,7 +2466,7 @@
   scoped_refptr<LayerAnimationController> controller_impl(
       LayerAnimationController::Create(0));
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve1(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve1(
       KeyframedTransformAnimationCurve::Create());
   TransformOperations operations1;
   operations1.AppendScale(1.0, 2.0, 3.0);
@@ -2448,7 +2477,7 @@
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
 
-  scoped_ptr<Animation> animation_owned(
+  std::unique_ptr<Animation> animation_owned(
       Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   Animation* animation = animation_owned.get();
   controller_impl->AddAnimation(std::move(animation_owned));
@@ -2533,7 +2562,8 @@
 }
 
 TEST(LayerAnimationControllerTest, NewlyPushedAnimationWaitsForActivation) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   FakeInactiveLayerAnimationValueObserver pending_dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
@@ -2595,7 +2625,8 @@
 }
 
 TEST(LayerAnimationControllerTest, ActivationBetweenAnimateAndUpdateState) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   FakeInactiveLayerAnimationValueObserver pending_dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
@@ -2798,7 +2829,8 @@
 }
 
 TEST(LayerAnimationControllerTest, PushedDeletedAnimationWaitsForActivation) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   FakeInactiveLayerAnimationValueObserver pending_dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
@@ -2854,7 +2886,8 @@
 // Tests that an animation that affects only active observers won't block
 // an animation that affects only pending observers from starting.
 TEST(LayerAnimationControllerTest, StartAnimationsAffectingDifferentObservers) {
-  scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+  std::unique_ptr<AnimationEvents> events(
+      base::WrapUnique(new AnimationEvents));
   FakeLayerAnimationValueObserver dummy_impl;
   FakeInactiveLayerAnimationValueObserver pending_dummy_impl;
   scoped_refptr<LayerAnimationController> controller_impl(
@@ -2939,9 +2972,9 @@
   controller->AddValueObserver(&dummy);
 
   // Create an animation that initially affects only pending observers.
-  scoped_ptr<Animation> animation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> animation(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   animation->set_affects_active_observers(false);
 
   controller->AddAnimation(std::move(animation));
@@ -3016,9 +3049,9 @@
 
   // Create an animation that initially affects only pending observers, and has
   // a start delay of 2 seconds.
-  scoped_ptr<Animation> animation(CreateAnimation(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      TargetProperty::OPACITY));
+  std::unique_ptr<Animation> animation(CreateAnimation(
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      1, TargetProperty::OPACITY));
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(TimeDelta::FromMilliseconds(-2000));
   animation->set_affects_active_observers(false);
diff --git a/cc/animation/scroll_offset_animation_curve.cc b/cc/animation/scroll_offset_animation_curve.cc
index 86448b7..54f6fb7 100644
--- a/cc/animation/scroll_offset_animation_curve.cc
+++ b/cc/animation/scroll_offset_animation_curve.cc
@@ -8,6 +8,7 @@
 #include <cmath>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/animation/timing_function.h"
 #include "cc/base/time_util.h"
 #include "ui/gfx/animation/tween.h"
@@ -63,7 +64,8 @@
                                            base::Time::kMicrosecondsPerSecond);
 }
 
-static scoped_ptr<TimingFunction> EaseOutWithInitialVelocity(double velocity) {
+static std::unique_ptr<TimingFunction> EaseOutWithInitialVelocity(
+    double velocity) {
   // Clamp velocity to a sane value.
   velocity = std::min(std::max(velocity, -1000.0), 1000.0);
 
@@ -75,17 +77,17 @@
 
 }  // namespace
 
-scoped_ptr<ScrollOffsetAnimationCurve> ScrollOffsetAnimationCurve::Create(
+std::unique_ptr<ScrollOffsetAnimationCurve> ScrollOffsetAnimationCurve::Create(
     const gfx::ScrollOffset& target_value,
-    scoped_ptr<TimingFunction> timing_function,
+    std::unique_ptr<TimingFunction> timing_function,
     DurationBehavior duration_behavior) {
-  return make_scoped_ptr(new ScrollOffsetAnimationCurve(
+  return base::WrapUnique(new ScrollOffsetAnimationCurve(
       target_value, std::move(timing_function), duration_behavior));
 }
 
 ScrollOffsetAnimationCurve::ScrollOffsetAnimationCurve(
     const gfx::ScrollOffset& target_value,
-    scoped_ptr<TimingFunction> timing_function,
+    std::unique_ptr<TimingFunction> timing_function,
     DurationBehavior duration_behavior)
     : target_value_(target_value),
       timing_function_(std::move(timing_function)),
@@ -133,15 +135,15 @@
   return SCROLL_OFFSET;
 }
 
-scoped_ptr<AnimationCurve> ScrollOffsetAnimationCurve::Clone() const {
+std::unique_ptr<AnimationCurve> ScrollOffsetAnimationCurve::Clone() const {
   return CloneToScrollOffsetAnimationCurve();
 }
 
-scoped_ptr<ScrollOffsetAnimationCurve>
+std::unique_ptr<ScrollOffsetAnimationCurve>
 ScrollOffsetAnimationCurve::CloneToScrollOffsetAnimationCurve() const {
-  scoped_ptr<TimingFunction> timing_function(
+  std::unique_ptr<TimingFunction> timing_function(
       static_cast<TimingFunction*>(timing_function_->Clone().release()));
-  scoped_ptr<ScrollOffsetAnimationCurve> curve_clone =
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve_clone =
       Create(target_value_, std::move(timing_function), duration_behavior_);
   curve_clone->initial_value_ = initial_value_;
   curve_clone->total_animation_duration_ = total_animation_duration_;
diff --git a/cc/animation/scroll_offset_animation_curve.h b/cc/animation/scroll_offset_animation_curve.h
index 8f9530a0..7e5c75b 100644
--- a/cc/animation/scroll_offset_animation_curve.h
+++ b/cc/animation/scroll_offset_animation_curve.h
@@ -5,8 +5,9 @@
 #ifndef CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_
 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_curve.h"
 #include "cc/base/cc_export.h"
@@ -19,9 +20,9 @@
 class CC_EXPORT ScrollOffsetAnimationCurve : public AnimationCurve {
  public:
   enum class DurationBehavior { DELTA_BASED, CONSTANT, INVERSE_DELTA };
-  static scoped_ptr<ScrollOffsetAnimationCurve> Create(
+  static std::unique_ptr<ScrollOffsetAnimationCurve> Create(
       const gfx::ScrollOffset& target_value,
-      scoped_ptr<TimingFunction> timing_function,
+      std::unique_ptr<TimingFunction> timing_function,
       DurationBehavior = DurationBehavior::DELTA_BASED);
 
   ~ScrollOffsetAnimationCurve() override;
@@ -35,13 +36,13 @@
   // AnimationCurve implementation
   base::TimeDelta Duration() const override;
   CurveType Type() const override;
-  scoped_ptr<AnimationCurve> Clone() const override;
-  scoped_ptr<ScrollOffsetAnimationCurve> CloneToScrollOffsetAnimationCurve()
-      const;
+  std::unique_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<ScrollOffsetAnimationCurve>
+  CloneToScrollOffsetAnimationCurve() const;
 
  private:
   ScrollOffsetAnimationCurve(const gfx::ScrollOffset& target_value,
-                             scoped_ptr<TimingFunction> timing_function,
+                             std::unique_ptr<TimingFunction> timing_function,
                              DurationBehavior);
 
   gfx::ScrollOffset initial_value_;
@@ -51,7 +52,7 @@
   // Time from animation start to most recent UpdateTarget.
   base::TimeDelta last_retarget_;
 
-  scoped_ptr<TimingFunction> timing_function_;
+  std::unique_ptr<TimingFunction> timing_function_;
   DurationBehavior duration_behavior_;
 
   bool has_set_initial_value_;
diff --git a/cc/animation/scroll_offset_animation_curve_unittest.cc b/cc/animation/scroll_offset_animation_curve_unittest.cc
index 1f6e62a..f8f9584 100644
--- a/cc/animation/scroll_offset_animation_curve_unittest.cc
+++ b/cc/animation/scroll_offset_animation_curve_unittest.cc
@@ -17,7 +17,7 @@
 
 TEST(ScrollOffsetAnimationCurveTest, DeltaBasedDuration) {
   gfx::ScrollOffset target_value(100.f, 200.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
 
@@ -60,7 +60,7 @@
 TEST(ScrollOffsetAnimationCurveTest, GetValue) {
   gfx::ScrollOffset initial_value(2.f, 40.f);
   gfx::ScrollOffset target_value(10.f, 20.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
   curve->SetInitialValue(initial_value);
@@ -93,13 +93,13 @@
 TEST(ScrollOffsetAnimationCurveTest, Clone) {
   gfx::ScrollOffset initial_value(2.f, 40.f);
   gfx::ScrollOffset target_value(10.f, 20.f);
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
   curve->SetInitialValue(initial_value);
   base::TimeDelta duration = curve->Duration();
 
-  scoped_ptr<AnimationCurve> clone(curve->Clone());
+  std::unique_ptr<AnimationCurve> clone(curve->Clone());
 
   EXPECT_EQ(AnimationCurve::SCROLL_OFFSET, clone->Type());
   EXPECT_EQ(duration, clone->Duration());
@@ -131,7 +131,7 @@
   gfx::ScrollOffset initial_value(0.f, 0.f);
   gfx::ScrollOffset target_value(0.f, 3600.f);
   double duration = kConstantDuration / kDurationDivisor;
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(
           target_value, EaseInOutTimingFunction::Create(),
           ScrollOffsetAnimationCurve::DurationBehavior::CONSTANT));
@@ -174,7 +174,7 @@
 }
 
 TEST(ScrollOffsetAnimationCurveTest, InverseDeltaDuration) {
-  scoped_ptr<ScrollOffsetAnimationCurve> curve(
+  std::unique_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(
           gfx::ScrollOffset(0.f, 100.f), EaseInOutTimingFunction::Create(),
           ScrollOffsetAnimationCurve::DurationBehavior::INVERSE_DELTA));
diff --git a/cc/animation/timing_function.cc b/cc/animation/timing_function.cc
index 94bf128..ad8d368 100644
--- a/cc/animation/timing_function.cc
+++ b/cc/animation/timing_function.cc
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/animation/timing_function.h"
+
+#include <memory>
+
+#include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/math_util.h"
 
 namespace cc {
@@ -13,9 +16,9 @@
 
 TimingFunction::~TimingFunction() {}
 
-scoped_ptr<CubicBezierTimingFunction> CubicBezierTimingFunction::Create(
-    double x1, double y1, double x2, double y2) {
-  return make_scoped_ptr(new CubicBezierTimingFunction(x1, y1, x2, y2));
+std::unique_ptr<CubicBezierTimingFunction>
+CubicBezierTimingFunction::Create(double x1, double y1, double x2, double y2) {
+  return base::WrapUnique(new CubicBezierTimingFunction(x1, y1, x2, y2));
 }
 
 CubicBezierTimingFunction::CubicBezierTimingFunction(double x1,
@@ -42,32 +45,32 @@
   *max = static_cast<float>(max_d);
 }
 
-scoped_ptr<TimingFunction> CubicBezierTimingFunction::Clone() const {
-  return make_scoped_ptr(new CubicBezierTimingFunction(*this));
+std::unique_ptr<TimingFunction> CubicBezierTimingFunction::Clone() const {
+  return base::WrapUnique(new CubicBezierTimingFunction(*this));
 }
 
 // These numbers come from
 // http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag.
-scoped_ptr<TimingFunction> EaseTimingFunction::Create() {
+std::unique_ptr<TimingFunction> EaseTimingFunction::Create() {
   return CubicBezierTimingFunction::Create(0.25, 0.1, 0.25, 1.0);
 }
 
-scoped_ptr<TimingFunction> EaseInTimingFunction::Create() {
+std::unique_ptr<TimingFunction> EaseInTimingFunction::Create() {
   return CubicBezierTimingFunction::Create(0.42, 0.0, 1.0, 1.0);
 }
 
-scoped_ptr<TimingFunction> EaseOutTimingFunction::Create() {
+std::unique_ptr<TimingFunction> EaseOutTimingFunction::Create() {
   return CubicBezierTimingFunction::Create(0.0, 0.0, 0.58, 1.0);
 }
 
-scoped_ptr<TimingFunction> EaseInOutTimingFunction::Create() {
+std::unique_ptr<TimingFunction> EaseInOutTimingFunction::Create() {
   return CubicBezierTimingFunction::Create(0.42, 0.0, 0.58, 1);
 }
 
-scoped_ptr<StepsTimingFunction> StepsTimingFunction::Create(
+std::unique_ptr<StepsTimingFunction> StepsTimingFunction::Create(
     int steps,
     float steps_start_offset) {
-  return make_scoped_ptr(new StepsTimingFunction(steps, steps_start_offset));
+  return base::WrapUnique(new StepsTimingFunction(steps, steps_start_offset));
 }
 
 StepsTimingFunction::StepsTimingFunction(int steps, float steps_start_offset)
@@ -88,8 +91,8 @@
   return static_cast<float>(value);
 }
 
-scoped_ptr<TimingFunction> StepsTimingFunction::Clone() const {
-  return make_scoped_ptr(new StepsTimingFunction(*this));
+std::unique_ptr<TimingFunction> StepsTimingFunction::Clone() const {
+  return base::WrapUnique(new StepsTimingFunction(*this));
 }
 
 void StepsTimingFunction::Range(float* min, float* max) const {
diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h
index ddc3c51..0953a39 100644
--- a/cc/animation/timing_function.h
+++ b/cc/animation/timing_function.h
@@ -5,8 +5,9 @@
 #ifndef CC_ANIMATION_TIMING_FUNCTION_H_
 #define CC_ANIMATION_TIMING_FUNCTION_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/cubic_bezier.h"
 
@@ -21,7 +22,7 @@
   virtual float Velocity(double time) const = 0;
   // The smallest and largest values returned by GetValue for inputs in [0, 1].
   virtual void Range(float* min, float* max) const = 0;
-  virtual scoped_ptr<TimingFunction> Clone() const = 0;
+  virtual std::unique_ptr<TimingFunction> Clone() const = 0;
 
  protected:
   TimingFunction();
@@ -32,15 +33,17 @@
 
 class CC_EXPORT CubicBezierTimingFunction : public TimingFunction {
  public:
-  static scoped_ptr<CubicBezierTimingFunction> Create(double x1, double y1,
-                                                      double x2, double y2);
+  static std::unique_ptr<CubicBezierTimingFunction> Create(double x1,
+                                                           double y1,
+                                                           double x2,
+                                                           double y2);
   ~CubicBezierTimingFunction() override;
 
   // TimingFunction implementation.
   float GetValue(double time) const override;
   float Velocity(double time) const override;
   void Range(float* min, float* max) const override;
-  scoped_ptr<TimingFunction> Clone() const override;
+  std::unique_ptr<TimingFunction> Clone() const override;
 
  protected:
   CubicBezierTimingFunction(double x1, double y1, double x2, double y2);
@@ -53,7 +56,7 @@
 
 class CC_EXPORT EaseTimingFunction {
  public:
-  static scoped_ptr<TimingFunction> Create();
+  static std::unique_ptr<TimingFunction> Create();
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(EaseTimingFunction);
@@ -61,7 +64,7 @@
 
 class CC_EXPORT EaseInTimingFunction {
  public:
-  static scoped_ptr<TimingFunction> Create();
+  static std::unique_ptr<TimingFunction> Create();
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInTimingFunction);
@@ -69,7 +72,7 @@
 
 class CC_EXPORT EaseOutTimingFunction {
  public:
-  static scoped_ptr<TimingFunction> Create();
+  static std::unique_ptr<TimingFunction> Create();
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(EaseOutTimingFunction);
@@ -77,7 +80,7 @@
 
 class CC_EXPORT EaseInOutTimingFunction {
  public:
-  static scoped_ptr<TimingFunction> Create();
+  static std::unique_ptr<TimingFunction> Create();
 
  private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(EaseInOutTimingFunction);
@@ -85,12 +88,12 @@
 
 class CC_EXPORT StepsTimingFunction : public TimingFunction {
  public:
-  static scoped_ptr<StepsTimingFunction> Create(int steps,
-                                                float steps_start_offset);
+  static std::unique_ptr<StepsTimingFunction> Create(int steps,
+                                                     float steps_start_offset);
   ~StepsTimingFunction() override;
 
   float GetValue(double t) const override;
-  scoped_ptr<TimingFunction> Clone() const override;
+  std::unique_ptr<TimingFunction> Clone() const override;
 
   void Range(float* min, float* max) const override;
   float Velocity(double time) const override;
diff --git a/cc/animation/transform_operations.h b/cc/animation/transform_operations.h
index b97ba36..e2f547da 100644
--- a/cc/animation/transform_operations.h
+++ b/cc/animation/transform_operations.h
@@ -5,11 +5,11 @@
 #ifndef CC_ANIMATION_TRANSFORM_OPERATIONS_H_
 #define CC_ANIMATION_TRANSFORM_OPERATIONS_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/animation/transform_operation.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/transform.h"
@@ -108,7 +108,7 @@
   bool ComputeDecomposedTransform() const;
 
   // For efficiency, we cache the decomposed transform.
-  mutable scoped_ptr<gfx::DecomposedTransform> decomposed_transform_;
+  mutable std::unique_ptr<gfx::DecomposedTransform> decomposed_transform_;
   mutable bool decomposed_transform_dirty_;
 
   DISALLOW_ASSIGN(TransformOperations);
diff --git a/cc/animation/transform_operations_unittest.cc b/cc/animation/transform_operations_unittest.cc
index 9e37942..906be86 100644
--- a/cc/animation/transform_operations_unittest.cc
+++ b/cc/animation/transform_operations_unittest.cc
@@ -2,12 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/animation/transform_operations.h"
+
 #include <stddef.h>
 
 #include <limits>
 #include <vector>
 
-#include "cc/animation/transform_operations.h"
+#include "base/memory/ptr_util.h"
 #include "cc/test/geometry_test_utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/gfx/animation/tween.h"
@@ -19,26 +21,26 @@
 namespace {
 
 TEST(TransformOperationTest, TransformTypesAreUnique) {
-  std::vector<scoped_ptr<TransformOperations>> transforms;
+  std::vector<std::unique_ptr<TransformOperations>> transforms;
 
-  scoped_ptr<TransformOperations> to_add(
-      make_scoped_ptr(new TransformOperations()));
+  std::unique_ptr<TransformOperations> to_add(
+      base::WrapUnique(new TransformOperations()));
   to_add->AppendTranslate(1, 0, 0);
   transforms.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendRotate(0, 0, 1, 2);
   transforms.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendScale(2, 2, 2);
   transforms.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendSkew(1, 0);
   transforms.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendPerspective(800);
   transforms.push_back(std::move(to_add));
 
@@ -91,53 +93,53 @@
   EXPECT_FALSE(translates.MatchesTypes(translates2));
 }
 
-std::vector<scoped_ptr<TransformOperations>> GetIdentityOperations() {
-  std::vector<scoped_ptr<TransformOperations>> operations;
-  scoped_ptr<TransformOperations> to_add(
-      make_scoped_ptr(new TransformOperations()));
+std::vector<std::unique_ptr<TransformOperations>> GetIdentityOperations() {
+  std::vector<std::unique_ptr<TransformOperations>> operations;
+  std::unique_ptr<TransformOperations> to_add(
+      base::WrapUnique(new TransformOperations()));
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendTranslate(0, 0, 0);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendTranslate(0, 0, 0);
   to_add->AppendTranslate(0, 0, 0);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendScale(1, 1, 1);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendScale(1, 1, 1);
   to_add->AppendScale(1, 1, 1);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendSkew(0, 0);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendSkew(0, 0);
   to_add->AppendSkew(0, 0);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendRotate(0, 0, 1, 0);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendRotate(0, 0, 1, 0);
   to_add->AppendRotate(0, 0, 1, 0);
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendMatrix(gfx::Transform());
   operations.push_back(std::move(to_add));
 
-  to_add = make_scoped_ptr(new TransformOperations());
+  to_add = base::WrapUnique(new TransformOperations());
   to_add->AppendMatrix(gfx::Transform());
   to_add->AppendMatrix(gfx::Transform());
   operations.push_back(std::move(to_add));
@@ -167,7 +169,7 @@
 }
 
 TEST(TransformOperationTest, NoneAlwaysMatches) {
-  std::vector<scoped_ptr<TransformOperations>> operations =
+  std::vector<std::unique_ptr<TransformOperations>> operations =
       GetIdentityOperations();
 
   TransformOperations none_operation;
@@ -503,7 +505,7 @@
 }
 
 TEST(TransformOperationTest, BlendRotationFromIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -537,7 +539,7 @@
 }
 
 TEST(TransformOperationTest, BlendTranslationFromIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -571,7 +573,7 @@
 }
 
 TEST(TransformOperationTest, BlendScaleFromIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -636,7 +638,7 @@
 }
 
 TEST(TransformOperationTest, BlendPerspectiveFromIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -654,7 +656,7 @@
 }
 
 TEST(TransformOperationTest, BlendRotationToIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -672,7 +674,7 @@
 }
 
 TEST(TransformOperationTest, BlendTranslationToIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -690,7 +692,7 @@
 }
 
 TEST(TransformOperationTest, BlendScaleToIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
@@ -723,7 +725,7 @@
 }
 
 TEST(TransformOperationTest, BlendPerspectiveToIdentity) {
-  std::vector<scoped_ptr<TransformOperations>> identity_operations =
+  std::vector<std::unique_ptr<TransformOperations>> identity_operations =
       GetIdentityOperations();
 
   for (size_t i = 0; i < identity_operations.size(); ++i) {
diff --git a/cc/base/container_util.h b/cc/base/container_util.h
index 65a9d31..c9ebe69 100644
--- a/cc/base/container_util.h
+++ b/cc/base/container_util.h
@@ -5,7 +5,6 @@
 #ifndef CC_BASE_CONTAINER_UTIL_H_
 #define CC_BASE_CONTAINER_UTIL_H_
 
-#include "base/memory/scoped_ptr.h"
 
 namespace cc {
 
diff --git a/cc/base/contiguous_container.cc b/cc/base/contiguous_container.cc
index b56b26b..d6280b4 100644
--- a/cc/base/contiguous_container.cc
+++ b/cc/base/contiguous_container.cc
@@ -44,7 +44,7 @@
   const char* begin() const { return &data_[0]; }
 
   // begin() <= end_ <= begin() + capacity_
-  scoped_ptr<char[]> data_;
+  std::unique_ptr<char[]> data_;
   char* end_;
   size_t capacity_;
 };
@@ -136,7 +136,7 @@
 ContiguousContainerBase::AllocateNewBufferForNextAllocation(
     size_t buffer_size) {
   DCHECK(buffers_.empty() || end_index_ == buffers_.size() - 1);
-  scoped_ptr<Buffer> new_buffer(new Buffer(buffer_size));
+  std::unique_ptr<Buffer> new_buffer(new Buffer(buffer_size));
   Buffer* buffer_to_return = new_buffer.get();
   buffers_.push_back(std::move(new_buffer));
   end_index_ = buffers_.size() - 1;
diff --git a/cc/base/contiguous_container.h b/cc/base/contiguous_container.h
index 14f61c74..d032aa7 100644
--- a/cc/base/contiguous_container.h
+++ b/cc/base/contiguous_container.h
@@ -6,12 +6,13 @@
 #define CC_BASE_CONTIGUOUS_CONTAINER_H_
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "cc/base/cc_export.h"
 
@@ -60,7 +61,7 @@
 
   Buffer* AllocateNewBufferForNextAllocation(size_t buffer_size);
 
-  std::vector<scoped_ptr<Buffer>> buffers_;
+  std::vector<std::unique_ptr<Buffer>> buffers_;
   size_t end_index_;
   size_t max_object_size_;
 
diff --git a/cc/base/list_container.h b/cc/base/list_container.h
index 962f6f3..04c7f14 100644
--- a/cc/base/list_container.h
+++ b/cc/base/list_container.h
@@ -7,9 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/list_container_helper.h"
 
diff --git a/cc/base/list_container_helper.cc b/cc/base/list_container_helper.cc
index 7b249ac..9d8a029 100644
--- a/cc/base/list_container_helper.cc
+++ b/cc/base/list_container_helper.cc
@@ -29,7 +29,7 @@
   // This class holds the raw memory chunk, as well as information about its
   // size and availability.
   struct InnerList {
-    scoped_ptr<char[]> data;
+    std::unique_ptr<char[]> data;
     // The number of elements in total the memory can hold. The difference
     // between capacity and size is the how many more elements this list can
     // hold.
@@ -66,7 +66,7 @@
       capacity = size;
 
       // Allocate the new data and update the iterator's pointer.
-      scoped_ptr<char[]> new_data(new char[size * step]);
+      std::unique_ptr<char[]> new_data(new char[size * step]);
       size_t position_offset = *position - Begin();
       *position = new_data.get() + position_offset;
 
@@ -240,7 +240,7 @@
 
  private:
   void AllocateNewList(size_t list_size) {
-    scoped_ptr<InnerList> new_list(new InnerList);
+    std::unique_ptr<InnerList> new_list(new InnerList);
     new_list->capacity = list_size;
     new_list->size = 0;
     new_list->step = element_size_;
@@ -248,7 +248,7 @@
     storage_.push_back(std::move(new_list));
   }
 
-  std::vector<scoped_ptr<InnerList>> storage_;
+  std::vector<std::unique_ptr<InnerList>> storage_;
   const size_t element_size_;
 
   // The number of elements in the list.
diff --git a/cc/base/list_container_helper.h b/cc/base/list_container_helper.h
index 61ca25e..d4f5ead 100644
--- a/cc/base/list_container_helper.h
+++ b/cc/base/list_container_helper.h
@@ -7,8 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
@@ -171,7 +172,7 @@
   // Hands out memory location for an element at the end of data structure.
   void* Allocate(size_t size_of_actual_element_in_bytes);
 
-  scoped_ptr<CharAllocator> data_;
+  std::unique_ptr<CharAllocator> data_;
 
   DISALLOW_COPY_AND_ASSIGN(ListContainerHelper);
 };
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc
index 147b400..d078fb6 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -705,15 +705,15 @@
                         projected_length * destination.y());
 }
 
-scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Size& s) {
-  scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
+std::unique_ptr<base::Value> MathUtil::AsValue(const gfx::Size& s) {
+  std::unique_ptr<base::DictionaryValue> res(new base::DictionaryValue());
   res->SetDouble("width", s.width());
   res->SetDouble("height", s.height());
   return std::move(res);
 }
 
-scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
-  scoped_ptr<base::ListValue> res(new base::ListValue());
+std::unique_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
+  std::unique_ptr<base::ListValue> res(new base::ListValue());
   res->AppendInteger(r.x());
   res->AppendInteger(r.y());
   res->AppendInteger(r.width());
@@ -742,8 +742,8 @@
   return true;
 }
 
-scoped_ptr<base::Value> MathUtil::AsValue(const gfx::PointF& pt) {
-  scoped_ptr<base::ListValue> res(new base::ListValue());
+std::unique_ptr<base::Value> MathUtil::AsValue(const gfx::PointF& pt) {
+  std::unique_ptr<base::ListValue> res(new base::ListValue());
   res->AppendDouble(pt.x());
   res->AppendDouble(pt.y());
   return std::move(res);
diff --git a/cc/base/math_util.h b/cc/base/math_util.h
index c596348..4e3347e 100644
--- a/cc/base/math_util.h
+++ b/cc/base/math_util.h
@@ -7,10 +7,10 @@
 
 #include <algorithm>
 #include <cmath>
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/box_f.h"
 #include "ui/gfx/geometry/point3_f.h"
@@ -254,10 +254,10 @@
                                       const gfx::Vector2dF& destination);
 
   // Conversion to value.
-  static scoped_ptr<base::Value> AsValue(const gfx::Size& s);
-  static scoped_ptr<base::Value> AsValue(const gfx::Rect& r);
+  static std::unique_ptr<base::Value> AsValue(const gfx::Size& s);
+  static std::unique_ptr<base::Value> AsValue(const gfx::Rect& r);
   static bool FromValue(const base::Value*, gfx::Rect* out_rect);
-  static scoped_ptr<base::Value> AsValue(const gfx::PointF& q);
+  static std::unique_ptr<base::Value> AsValue(const gfx::PointF& q);
 
   static void AddToTracedValue(const char* name,
                                const gfx::Size& s,
diff --git a/cc/base/region.cc b/cc/base/region.cc
index 8332f9ad..1a5823a7 100644
--- a/cc/base/region.cc
+++ b/cc/base/region.cc
@@ -120,8 +120,8 @@
   return result;
 }
 
-scoped_ptr<base::Value> Region::AsValue() const {
-  scoped_ptr<base::ListValue> result(new base::ListValue());
+std::unique_ptr<base::Value> Region::AsValue() const {
+  std::unique_ptr<base::ListValue> result(new base::ListValue());
   for (Iterator it(*this); it.has_rect(); it.next()) {
     gfx::Rect rect(it.rect());
     result->AppendInteger(rect.x());
diff --git a/cc/base/region.h b/cc/base/region.h
index 583311e0..87d7973 100644
--- a/cc/base/region.h
+++ b/cc/base/region.h
@@ -5,9 +5,9 @@
 #ifndef CC_BASE_REGION_H_
 #define CC_BASE_REGION_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "third_party/skia/include/core/SkRegion.h"
 #include "ui/gfx/geometry/rect.h"
@@ -62,7 +62,7 @@
   }
 
   std::string ToString() const;
-  scoped_ptr<base::Value> AsValue() const;
+  std::unique_ptr<base::Value> AsValue() const;
   void AsValueInto(base::trace_event::TracedValue* array) const;
 
   class CC_EXPORT Iterator {
diff --git a/cc/blink/scrollbar_impl.cc b/cc/blink/scrollbar_impl.cc
index 6f5fe31..5df7cfe4 100644
--- a/cc/blink/scrollbar_impl.cc
+++ b/cc/blink/scrollbar_impl.cc
@@ -13,9 +13,9 @@
 namespace cc_blink {
 
 ScrollbarImpl::ScrollbarImpl(
-    scoped_ptr<WebScrollbar> scrollbar,
+    std::unique_ptr<WebScrollbar> scrollbar,
     blink::WebScrollbarThemePainter painter,
-    scoped_ptr<blink::WebScrollbarThemeGeometry> geometry)
+    std::unique_ptr<blink::WebScrollbarThemeGeometry> geometry)
     : scrollbar_(std::move(scrollbar)),
       painter_(painter),
       geometry_(std::move(geometry)) {}
diff --git a/cc/blink/scrollbar_impl.h b/cc/blink/scrollbar_impl.h
index 5f11a1b..4e4bdae 100644
--- a/cc/blink/scrollbar_impl.h
+++ b/cc/blink/scrollbar_impl.h
@@ -5,8 +5,9 @@
 #ifndef CC_BLINK_SCROLLBAR_IMPL_H_
 #define CC_BLINK_SCROLLBAR_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/input/scrollbar.h"
 #include "third_party/WebKit/public/platform/WebScrollbarThemePainter.h"
 
@@ -19,9 +20,9 @@
 
 class ScrollbarImpl : public cc::Scrollbar {
  public:
-  ScrollbarImpl(scoped_ptr<blink::WebScrollbar> scrollbar,
+  ScrollbarImpl(std::unique_ptr<blink::WebScrollbar> scrollbar,
                 blink::WebScrollbarThemePainter painter,
-                scoped_ptr<blink::WebScrollbarThemeGeometry> geometry);
+                std::unique_ptr<blink::WebScrollbarThemeGeometry> geometry);
   ~ScrollbarImpl() override;
 
   // cc::Scrollbar implementation.
@@ -40,9 +41,9 @@
                  const gfx::Rect& content_rect) override;
 
  private:
-  scoped_ptr<blink::WebScrollbar> scrollbar_;
+  std::unique_ptr<blink::WebScrollbar> scrollbar_;
   blink::WebScrollbarThemePainter painter_;
-  scoped_ptr<blink::WebScrollbarThemeGeometry> geometry_;
+  std::unique_ptr<blink::WebScrollbarThemeGeometry> geometry_;
 
   DISALLOW_COPY_AND_ASSIGN(ScrollbarImpl);
 };
diff --git a/cc/blink/test/cc_blink_test_suite.h b/cc/blink/test/cc_blink_test_suite.h
index faa76840..db5799c6 100644
--- a/cc/blink/test/cc_blink_test_suite.h
+++ b/cc/blink/test/cc_blink_test_suite.h
@@ -5,8 +5,9 @@
 #ifndef CC_BLINK_TEST_CC_BLINK_TEST_SUITE_H_
 #define CC_BLINK_TEST_CC_BLINK_TEST_SUITE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/test_suite.h"
 
 namespace base {
@@ -26,7 +27,7 @@
   void Shutdown() override;
 
  private:
-  scoped_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
 
   DISALLOW_COPY_AND_ASSIGN(CCBlinkTestSuite);
 };
diff --git a/cc/blink/web_compositor_support_impl.cc b/cc/blink/web_compositor_support_impl.cc
index a4966e7..2261c447 100644
--- a/cc/blink/web_compositor_support_impl.cc
+++ b/cc/blink/web_compositor_support_impl.cc
@@ -4,7 +4,8 @@
 
 #include "cc/blink/web_compositor_support_impl.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/blink/web_content_layer_impl.h"
 #include "cc/blink/web_display_item_list_impl.h"
 #include "cc/blink/web_external_texture_layer_impl.h"
diff --git a/cc/blink/web_content_layer_impl.cc b/cc/blink/web_content_layer_impl.cc
index b7a855c..fad7546 100644
--- a/cc/blink/web_content_layer_impl.cc
+++ b/cc/blink/web_content_layer_impl.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 
 #include "base/command_line.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/switches.h"
 #include "cc/blink/web_display_item_list_impl.h"
 #include "cc/layers/picture_layer.h"
@@ -51,7 +52,7 @@
 
 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client)
     : client_(client) {
-  layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this)));
+  layer_ = base::WrapUnique(new WebLayerImpl(PictureLayer::Create(this)));
   layer_->layer()->SetIsDrawable(true);
 }
 
diff --git a/cc/blink/web_content_layer_impl.h b/cc/blink/web_content_layer_impl.h
index 53fd83c..227225d 100644
--- a/cc/blink/web_content_layer_impl.h
+++ b/cc/blink/web_content_layer_impl.h
@@ -7,8 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "cc/blink/web_layer_impl.h"
 #include "cc/layers/content_layer_client.h"
@@ -43,7 +44,7 @@
   bool FillsBoundsCompletely() const override;
   size_t GetApproximateUnsharedMemoryUsage() const override;
 
-  scoped_ptr<WebLayerImpl> layer_;
+  std::unique_ptr<WebLayerImpl> layer_;
   blink::WebContentLayerClient* client_;
 
  private:
diff --git a/cc/blink/web_external_bitmap_impl.h b/cc/blink/web_external_bitmap_impl.h
index 20e27df..d054fd46 100644
--- a/cc/blink/web_external_bitmap_impl.h
+++ b/cc/blink/web_external_bitmap_impl.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebExternalBitmap.h"
 
@@ -19,7 +20,7 @@
 
 namespace cc_blink {
 
-typedef scoped_ptr<cc::SharedBitmap>(*SharedBitmapAllocationFunction)(
+typedef std::unique_ptr<cc::SharedBitmap> (*SharedBitmapAllocationFunction)(
     const gfx::Size& size);
 
 // Sets the function that this will use to allocate shared memory.
@@ -39,7 +40,7 @@
   cc::SharedBitmap* shared_bitmap() { return shared_bitmap_.get(); }
 
  private:
-  scoped_ptr<cc::SharedBitmap> shared_bitmap_;
+  std::unique_ptr<cc::SharedBitmap> shared_bitmap_;
   blink::WebSize size_;
 
   DISALLOW_COPY_AND_ASSIGN(WebExternalBitmapImpl);
diff --git a/cc/blink/web_external_texture_layer_impl.cc b/cc/blink/web_external_texture_layer_impl.cc
index e08f9e3..766040a 100644
--- a/cc/blink/web_external_texture_layer_impl.cc
+++ b/cc/blink/web_external_texture_layer_impl.cc
@@ -4,6 +4,7 @@
 
 #include "cc/blink/web_external_texture_layer_impl.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/blink/web_external_bitmap_impl.h"
 #include "cc/blink/web_layer_impl.h"
 #include "cc/layers/texture_layer.h"
@@ -63,7 +64,7 @@
 
 bool WebExternalTextureLayerImpl::PrepareTextureMailbox(
     cc::TextureMailbox* mailbox,
-    scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+    std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
     bool use_shared_memory) {
   blink::WebExternalTextureMailbox client_mailbox;
   WebExternalBitmapImpl* bitmap = nullptr;
@@ -72,7 +73,7 @@
     bitmap = AllocateBitmap();
   if (!client_->prepareMailbox(&client_mailbox, bitmap)) {
     if (bitmap)
-      free_bitmaps_.push_back(make_scoped_ptr(bitmap));
+      free_bitmaps_.push_back(base::WrapUnique(bitmap));
     return false;
   }
   gpu::Mailbox name;
@@ -134,7 +135,7 @@
          sizeof(sync_token));
   available_mailbox.validSyncToken = sync_token.HasData();
   if (bitmap)
-    layer->free_bitmaps_.push_back(make_scoped_ptr(bitmap));
+    layer->free_bitmaps_.push_back(base::WrapUnique(bitmap));
   layer->client_->mailboxReleased(available_mailbox, lost_resource);
 }
 
diff --git a/cc/blink/web_external_texture_layer_impl.h b/cc/blink/web_external_texture_layer_impl.h
index c85668f..cce8170 100644
--- a/cc/blink/web_external_texture_layer_impl.h
+++ b/cc/blink/web_external_texture_layer_impl.h
@@ -5,11 +5,11 @@
 #ifndef CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "cc/layers/texture_layer_client.h"
 #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
@@ -50,7 +50,7 @@
   // TextureLayerClient implementation.
   bool PrepareTextureMailbox(
       cc::TextureMailbox* mailbox,
-      scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+      std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
       bool use_shared_memory) override;
 
  private:
@@ -64,8 +64,8 @@
   WebExternalBitmapImpl* AllocateBitmap();
 
   blink::WebExternalTextureLayerClient* client_;
-  scoped_ptr<WebLayerImpl> layer_;
-  std::vector<scoped_ptr<WebExternalBitmapImpl>> free_bitmaps_;
+  std::unique_ptr<WebLayerImpl> layer_;
+  std::vector<std::unique_ptr<WebExternalBitmapImpl>> free_bitmaps_;
 
   DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl);
 };
diff --git a/cc/blink/web_image_layer_impl.h b/cc/blink/web_image_layer_impl.h
index d2775fb..84433bd 100644
--- a/cc/blink/web_image_layer_impl.h
+++ b/cc/blink/web_image_layer_impl.h
@@ -5,8 +5,9 @@
 #ifndef CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_
 #define CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebImageLayer.h"
 
@@ -25,7 +26,7 @@
   void setNearestNeighbor(bool nearest_neighbor) override;
 
  private:
-  scoped_ptr<WebLayerImpl> layer_;
+  std::unique_ptr<WebLayerImpl> layer_;
 
   DISALLOW_COPY_AND_ASSIGN(WebImageLayerImpl);
 };
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h
index 14d49ab..af1145ce9 100644
--- a/cc/blink/web_layer_impl.h
+++ b/cc/blink/web_layer_impl.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "cc/layers/layer_client.h"
 #include "third_party/WebKit/public/platform/WebColor.h"
diff --git a/cc/blink/web_layer_impl_fixed_bounds_unittest.cc b/cc/blink/web_layer_impl_fixed_bounds_unittest.cc
index 884cbdb..40c7db6 100644
--- a/cc/blink/web_layer_impl_fixed_bounds_unittest.cc
+++ b/cc/blink/web_layer_impl_fixed_bounds_unittest.cc
@@ -22,7 +22,7 @@
 namespace {
 
 TEST(WebLayerImplFixedBoundsTest, IdentityBounds) {
-  scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
+  std::unique_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
   layer->SetFixedBounds(gfx::Size(100, 100));
   layer->setBounds(WebSize(100, 100));
   EXPECT_EQ(WebSize(100, 100), layer->bounds());
@@ -59,7 +59,7 @@
 }
 
 TEST(WebLayerImplFixedBoundsTest, BoundsScaleSimple) {
-  scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
+  std::unique_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
   CheckBoundsScaleSimple(layer.get(), WebSize(100, 200), gfx::Size(150, 250));
   // Change fixed_bounds.
   CheckBoundsScaleSimple(layer.get(), WebSize(100, 200), gfx::Size(75, 100));
@@ -87,7 +87,8 @@
   WebFloatPoint position(20, 30);
   gfx::Size fixed_bounds(160, 70);
 
-  scoped_ptr<WebLayerImplFixedBounds> root_layer(new WebLayerImplFixedBounds());
+  std::unique_ptr<WebLayerImplFixedBounds> root_layer(
+      new WebLayerImplFixedBounds());
 
   WebLayerImplFixedBounds* fixed_bounds_layer =
       new WebLayerImplFixedBounds(cc::PictureImageLayer::Create());
@@ -106,7 +107,7 @@
 
   cc::FakeLayerTreeHostClient client(cc::FakeLayerTreeHostClient::DIRECT_3D);
   cc::TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<cc::FakeLayerTreeHost> host =
+  std::unique_ptr<cc::FakeLayerTreeHost> host =
       cc::FakeLayerTreeHost::Create(&client, &task_graph_runner);
   host->SetRootLayer(root_layer->layer());
 
diff --git a/cc/blink/web_scrollbar_layer_impl.cc b/cc/blink/web_scrollbar_layer_impl.cc
index e31f5c6..7011d5f 100644
--- a/cc/blink/web_scrollbar_layer_impl.cc
+++ b/cc/blink/web_scrollbar_layer_impl.cc
@@ -4,6 +4,7 @@
 
 #include "cc/blink/web_scrollbar_layer_impl.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/blink/scrollbar_impl.h"
 #include "cc/blink/web_layer_impl.h"
 #include "cc/layers/layer.h"
@@ -32,10 +33,10 @@
     blink::WebScrollbarThemeGeometry* geometry)
     : layer_(new WebLayerImpl(PaintedScrollbarLayer::Create(
 
-          scoped_ptr<cc::Scrollbar>(
-              new ScrollbarImpl(make_scoped_ptr(scrollbar),
+          std::unique_ptr<cc::Scrollbar>(
+              new ScrollbarImpl(base::WrapUnique(scrollbar),
                                 painter,
-                                make_scoped_ptr(geometry))),
+                                base::WrapUnique(geometry))),
           0))) {}
 
 WebScrollbarLayerImpl::WebScrollbarLayerImpl(
diff --git a/cc/blink/web_scrollbar_layer_impl.h b/cc/blink/web_scrollbar_layer_impl.h
index f9cd68c..0239b41 100644
--- a/cc/blink/web_scrollbar_layer_impl.h
+++ b/cc/blink/web_scrollbar_layer_impl.h
@@ -5,8 +5,9 @@
 #ifndef CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_
 #define CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebScrollbar.h"
 #include "third_party/WebKit/public/platform/WebScrollbarLayer.h"
@@ -38,7 +39,7 @@
   void setScrollLayer(blink::WebLayer* layer) override;
 
  private:
-  scoped_ptr<WebLayerImpl> layer_;
+  std::unique_ptr<WebLayerImpl> layer_;
 
   DISALLOW_COPY_AND_ASSIGN(WebScrollbarLayerImpl);
 };
diff --git a/cc/cc.gyp b/cc/cc.gyp
index 28e0ccc..ca59ec2 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -436,6 +436,8 @@
         'raster/scoped_gpu_raster.h',
         'raster/single_thread_task_graph_runner.cc',
         'raster/single_thread_task_graph_runner.h',
+        'raster/staging_buffer_pool.cc',
+        'raster/staging_buffer_pool.h',
         'raster/synchronous_task_graph_runner.cc',
         'raster/synchronous_task_graph_runner.h',
         'raster/task_category.h',
diff --git a/cc/debug/benchmark_instrumentation.cc b/cc/debug/benchmark_instrumentation.cc
index ed8fe214..c32565e 100644
--- a/cc/debug/benchmark_instrumentation.cc
+++ b/cc/debug/benchmark_instrumentation.cc
@@ -20,7 +20,7 @@
 }
 
 void IssueDisplayRenderingStatsEvent() {
-  scoped_ptr<base::trace_event::TracedValue> record_data(
+  std::unique_ptr<base::trace_event::TracedValue> record_data(
       new base::trace_event::TracedValue());
   record_data->SetInteger("frame_count", 1);
   TRACE_EVENT_INSTANT1(
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc
index cd38303..02264216 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include "base/memory/ptr_util.h"
 #include "cc/base/math_util.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/layer_iterator.h"
@@ -21,8 +22,8 @@
 namespace cc {
 
 // static
-scoped_ptr<DebugRectHistory> DebugRectHistory::Create() {
-  return make_scoped_ptr(new DebugRectHistory());
+std::unique_ptr<DebugRectHistory> DebugRectHistory::Create() {
+  return base::WrapUnique(new DebugRectHistory());
 }
 
 DebugRectHistory::DebugRectHistory() {}
diff --git a/cc/debug/debug_rect_history.h b/cc/debug/debug_rect_history.h
index b06dc58..4ffbd8c 100644
--- a/cc/debug/debug_rect_history.h
+++ b/cc/debug/debug_rect_history.h
@@ -5,9 +5,10 @@
 #ifndef CC_DEBUG_DEBUG_RECT_HISTORY_H_
 #define CC_DEBUG_DEBUG_RECT_HISTORY_H_
 
+#include <memory>
 #include <vector>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/layers/layer_collections.h"
 #include "ui/gfx/geometry/rect.h"
 
@@ -61,7 +62,7 @@
 // the appropriate LayerTreeSettings are enabled.
 class DebugRectHistory {
  public:
-  static scoped_ptr<DebugRectHistory> Create();
+  static std::unique_ptr<DebugRectHistory> Create();
 
   ~DebugRectHistory();
 
diff --git a/cc/debug/devtools_instrumentation.h b/cc/debug/devtools_instrumentation.h
index 5794b899..127c9a9 100644
--- a/cc/debug/devtools_instrumentation.h
+++ b/cc/debug/devtools_instrumentation.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
 
@@ -148,9 +149,9 @@
                        layer_tree_host_id);
 }
 
-inline scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+inline std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 BeginMainThreadFrameData(int frame_id) {
-  scoped_ptr<base::trace_event::TracedValue> value(
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   value->SetInteger("frameId", frame_id);
   return std::move(value);
@@ -163,9 +164,9 @@
       internal::kData, BeginMainThreadFrameData(frame_id));
 }
 
-inline scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+inline std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 NeedsBeginFrameData(bool needs_begin_frame) {
-  scoped_ptr<base::trace_event::TracedValue> value(
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   value->SetInteger("needsBeginFrame", needs_begin_frame);
   return std::move(value);
diff --git a/cc/debug/frame_rate_counter.cc b/cc/debug/frame_rate_counter.cc
index a6b4a4451..928c27ce 100644
--- a/cc/debug/frame_rate_counter.cc
+++ b/cc/debug/frame_rate_counter.cc
@@ -9,6 +9,7 @@
 #include <algorithm>
 #include <limits>
 
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "cc/trees/proxy.h"
 
@@ -33,8 +34,9 @@
 static const double kDroppedFrameTime = 1.0 / 50.0;
 
 // static
-scoped_ptr<FrameRateCounter> FrameRateCounter::Create(bool has_impl_thread) {
-  return make_scoped_ptr(new FrameRateCounter(has_impl_thread));
+std::unique_ptr<FrameRateCounter> FrameRateCounter::Create(
+    bool has_impl_thread) {
+  return base::WrapUnique(new FrameRateCounter(has_impl_thread));
 }
 
 base::TimeDelta FrameRateCounter::RecentFrameInterval(size_t n) const {
diff --git a/cc/debug/frame_rate_counter.h b/cc/debug/frame_rate_counter.h
index ad91598a..ba2d122c 100644
--- a/cc/debug/frame_rate_counter.h
+++ b/cc/debug/frame_rate_counter.h
@@ -7,8 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/debug/ring_buffer.h"
 
@@ -18,7 +19,7 @@
 // intelligently compute average frames per second.
 class FrameRateCounter {
  public:
-  static scoped_ptr<FrameRateCounter> Create(bool has_impl_thread);
+  static std::unique_ptr<FrameRateCounter> Create(bool has_impl_thread);
 
   size_t current_frame_number() const { return ring_buffer_.CurrentIndex(); }
   int dropped_frame_count() const { return dropped_frame_count_; }
diff --git a/cc/debug/frame_timing_tracker.cc b/cc/debug/frame_timing_tracker.cc
index dda2e311..d0b9a9b 100644
--- a/cc/debug/frame_timing_tracker.cc
+++ b/cc/debug/frame_timing_tracker.cc
@@ -9,6 +9,7 @@
 #include <algorithm>
 #include <limits>
 
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "cc/trees/layer_tree_host_impl.h"
 #include "cc/trees/proxy.h"
@@ -38,9 +39,9 @@
 }
 
 // static
-scoped_ptr<FrameTimingTracker> FrameTimingTracker::Create(
+std::unique_ptr<FrameTimingTracker> FrameTimingTracker::Create(
     LayerTreeHostImpl* layer_tree_host_impl) {
-  return make_scoped_ptr(new FrameTimingTracker(layer_tree_host_impl));
+  return base::WrapUnique(new FrameTimingTracker(layer_tree_host_impl));
 }
 
 FrameTimingTracker::FrameTimingTracker(LayerTreeHostImpl* layer_tree_host_impl)
@@ -82,10 +83,10 @@
     post_events_notifier_.Schedule();
 }
 
-scoped_ptr<FrameTimingTracker::CompositeTimingSet>
+std::unique_ptr<FrameTimingTracker::CompositeTimingSet>
 FrameTimingTracker::GroupCompositeCountsByRectId() {
   if (!composite_events_)
-    return make_scoped_ptr(new CompositeTimingSet);
+    return base::WrapUnique(new CompositeTimingSet);
   for (auto& infos : *composite_events_) {
     std::sort(
         infos.second.begin(), infos.second.end(),
@@ -96,10 +97,10 @@
   return std::move(composite_events_);
 }
 
-scoped_ptr<FrameTimingTracker::MainFrameTimingSet>
+std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
 FrameTimingTracker::GroupMainFrameCountsByRectId() {
   if (!main_frame_events_)
-    return make_scoped_ptr(new MainFrameTimingSet);
+    return base::WrapUnique(new MainFrameTimingSet);
   for (auto& infos : *main_frame_events_) {
     std::sort(
         infos.second.begin(), infos.second.end(),
diff --git a/cc/debug/frame_timing_tracker.h b/cc/debug/frame_timing_tracker.h
index 117a1f9c..f6f9d2b 100644
--- a/cc/debug/frame_timing_tracker.h
+++ b/cc/debug/frame_timing_tracker.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <unordered_map>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/delayed_unique_notifier.h"
@@ -51,7 +51,7 @@
   using MainFrameTimingSet =
       std::unordered_map<int64_t, std::vector<MainFrameTimingEvent>>;
 
-  static scoped_ptr<FrameTimingTracker> Create(
+  static std::unique_ptr<FrameTimingTracker> Create(
       LayerTreeHostImpl* layer_tree_host_impl);
 
   ~FrameTimingTracker();
@@ -61,11 +61,11 @@
   // [ {f_id1,r_id1,t1}, {f_id2,r_id1,t2}, {f_id3,r_id2,t3} ]
   // ====>
   // [ {r_id1,<{f_id1,t1},{f_id2,t2}>}, {r_id2,<{f_id3,t3}>} ]
-  scoped_ptr<CompositeTimingSet> GroupCompositeCountsByRectId();
+  std::unique_ptr<CompositeTimingSet> GroupCompositeCountsByRectId();
 
   // This routine takes all of the individual MainFrameEvents stored in the
   // tracker and collects them by "rect_id", as in the example below.
-  scoped_ptr<MainFrameTimingSet> GroupMainFrameCountsByRectId();
+  std::unique_ptr<MainFrameTimingSet> GroupMainFrameCountsByRectId();
 
   // This routine takes a timestamp and an array of frame_id,rect_id pairs
   // and generates CompositeTimingEvents (frame_id, timestamp) and adds them to
@@ -84,8 +84,8 @@
 
   void PostEvents();
 
-  scoped_ptr<CompositeTimingSet> composite_events_;
-  scoped_ptr<MainFrameTimingSet> main_frame_events_;
+  std::unique_ptr<CompositeTimingSet> composite_events_;
+  std::unique_ptr<MainFrameTimingSet> main_frame_events_;
 
   LayerTreeHostImpl* layer_tree_host_impl_;
   DelayedUniqueNotifier post_events_notifier_;
diff --git a/cc/debug/frame_timing_tracker_unittest.cc b/cc/debug/frame_timing_tracker_unittest.cc
index 2bef6b45..109b730d 100644
--- a/cc/debug/frame_timing_tracker_unittest.cc
+++ b/cc/debug/frame_timing_tracker_unittest.cc
@@ -21,8 +21,8 @@
 namespace {
 
 std::string CompositeToString(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> timingset) {
-  scoped_ptr<base::trace_event::TracedValue> value(
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> timingset) {
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   value->BeginArray("values");
   std::set<int> rect_ids;
@@ -48,8 +48,8 @@
 }
 
 std::string MainFrameToString(
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> timingset) {
-  scoped_ptr<base::trace_event::TracedValue> value(
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> timingset) {
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   value->BeginArray("values");
   std::set<int> rect_ids;
@@ -82,7 +82,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   EXPECT_EQ("{\"values\":[]}",
             CompositeToString(tracker->GroupCompositeCountsByRectId()));
@@ -97,7 +97,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   std::vector<std::pair<int, int64_t>> ids;
   tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids);
@@ -112,7 +112,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   tracker->SaveMainFrameTimeStamps(std::vector<int64_t>(),
                                    base::TimeTicks::FromInternalValue(100),
@@ -128,7 +128,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   std::vector<std::pair<int, int64_t>> ids;
   ids.push_back(std::make_pair(1, 2));
@@ -146,7 +146,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   std::vector<int64_t> rect_ids;
   rect_ids.push_back(1);
@@ -166,7 +166,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   std::vector<std::pair<int, int64_t>> ids;
   ids.push_back(std::make_pair(1, 2));
@@ -188,7 +188,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
   std::vector<int64_t> rect_ids;
   rect_ids.push_back(2);
@@ -216,7 +216,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
 
   std::vector<std::pair<int, int64_t>> ids200;
@@ -255,7 +255,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<FrameTimingTracker> tracker(
+  std::unique_ptr<FrameTimingTracker> tracker(
       FrameTimingTracker::Create(&host_impl));
 
   std::vector<int64_t> rect_ids200;
diff --git a/cc/debug/frame_viewer_instrumentation.cc b/cc/debug/frame_viewer_instrumentation.cc
index 5181aa8..d34907a 100644
--- a/cc/debug/frame_viewer_instrumentation.cc
+++ b/cc/debug/frame_viewer_instrumentation.cc
@@ -26,12 +26,12 @@
 const char kAnalyzeTask[] = "AnalyzeTask";
 const char kRasterTask[] = "RasterTask";
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat> TileDataAsValue(
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat> TileDataAsValue(
     const void* tile_id,
     TileResolution tile_resolution,
     int source_frame_number,
     int layer_id) {
-  scoped_ptr<base::trace_event::TracedValue> res(
+  std::unique_ptr<base::trace_event::TracedValue> res(
       new base::trace_event::TracedValue());
   TracedValue::SetIDRef(tile_id, res.get(), kTileId);
   res->SetString(kTileResolution, TileResolutionToString(tile_resolution));
diff --git a/cc/debug/invalidation_benchmark.cc b/cc/debug/invalidation_benchmark.cc
index 5a5436ca..c6f0a4f5 100644
--- a/cc/debug/invalidation_benchmark.cc
+++ b/cc/debug/invalidation_benchmark.cc
@@ -27,7 +27,7 @@
 }  // namespace
 
 InvalidationBenchmark::InvalidationBenchmark(
-    scoped_ptr<base::Value> value,
+    std::unique_ptr<base::Value> value,
     const MicroBenchmark::DoneCallback& callback)
     : MicroBenchmark(callback), seed_(0) {
   base::DictionaryValue* settings = nullptr;
@@ -112,7 +112,7 @@
   }
 }
 
-bool InvalidationBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
+bool InvalidationBenchmark::ProcessMessage(std::unique_ptr<base::Value> value) {
   base::DictionaryValue* message = nullptr;
   value->GetAsDictionary(&message);
   if (!message)
diff --git a/cc/debug/invalidation_benchmark.h b/cc/debug/invalidation_benchmark.h
index 9cd2643..668a7c9 100644
--- a/cc/debug/invalidation_benchmark.h
+++ b/cc/debug/invalidation_benchmark.h
@@ -21,14 +21,14 @@
 // measurement.
 class CC_EXPORT InvalidationBenchmark : public MicroBenchmark {
  public:
-  explicit InvalidationBenchmark(scoped_ptr<base::Value> value,
+  explicit InvalidationBenchmark(std::unique_ptr<base::Value> value,
                                  const MicroBenchmark::DoneCallback& callback);
   ~InvalidationBenchmark() override;
 
   // Implements MicroBenchmark interface.
   void DidUpdateLayers(LayerTreeHost* host) override;
   void RunOnLayer(PictureLayer* layer) override;
-  bool ProcessMessage(scoped_ptr<base::Value> value) override;
+  bool ProcessMessage(std::unique_ptr<base::Value> value) override;
 
  private:
   enum Mode { FIXED_SIZE, LAYER, VIEWPORT, RANDOM };
diff --git a/cc/debug/micro_benchmark.cc b/cc/debug/micro_benchmark.cc
index 8077718c..72d3c7de 100644
--- a/cc/debug/micro_benchmark.cc
+++ b/cc/debug/micro_benchmark.cc
@@ -4,9 +4,11 @@
 
 #include "cc/debug/micro_benchmark.h"
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/values.h"
 #include "cc/debug/micro_benchmark_impl.h"
@@ -28,7 +30,7 @@
 
 void MicroBenchmark::DidUpdateLayers(LayerTreeHost* host) {}
 
-void MicroBenchmark::NotifyDone(scoped_ptr<base::Value> result) {
+void MicroBenchmark::NotifyDone(std::unique_ptr<base::Value> result) {
   callback_.Run(std::move(result));
   is_done_ = true;
 }
@@ -37,7 +39,7 @@
 
 void MicroBenchmark::RunOnLayer(PictureLayer* layer) {}
 
-bool MicroBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
+bool MicroBenchmark::ProcessMessage(std::unique_ptr<base::Value> value) {
   return false;
 }
 
@@ -45,16 +47,16 @@
   return processed_for_benchmark_impl_;
 }
 
-scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::GetBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl> MicroBenchmark::GetBenchmarkImpl(
     scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
   DCHECK(!processed_for_benchmark_impl_);
   processed_for_benchmark_impl_ = true;
   return CreateBenchmarkImpl(origin_task_runner);
 }
 
-scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
     scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
-  return make_scoped_ptr<MicroBenchmarkImpl>(nullptr);
+  return base::WrapUnique<MicroBenchmarkImpl>(nullptr);
 }
 
 }  // namespace cc
diff --git a/cc/debug/micro_benchmark.h b/cc/debug/micro_benchmark.h
index c5bbd88..d224734 100644
--- a/cc/debug/micro_benchmark.h
+++ b/cc/debug/micro_benchmark.h
@@ -5,8 +5,9 @@
 #ifndef CC_DEBUG_MICRO_BENCHMARK_H_
 #define CC_DEBUG_MICRO_BENCHMARK_H_
 
+#include <memory>
+
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace base {
@@ -22,7 +23,7 @@
 class MicroBenchmarkImpl;
 class CC_EXPORT MicroBenchmark {
  public:
-  typedef base::Callback<void(scoped_ptr<base::Value>)> DoneCallback;
+  typedef base::Callback<void(std::unique_ptr<base::Value>)> DoneCallback;
 
   explicit MicroBenchmark(const DoneCallback& callback);
   virtual ~MicroBenchmark();
@@ -35,16 +36,16 @@
   virtual void RunOnLayer(Layer* layer);
   virtual void RunOnLayer(PictureLayer* layer);
 
-  virtual bool ProcessMessage(scoped_ptr<base::Value> value);
+  virtual bool ProcessMessage(std::unique_ptr<base::Value> value);
 
   bool ProcessedForBenchmarkImpl() const;
-  scoped_ptr<MicroBenchmarkImpl> GetBenchmarkImpl(
+  std::unique_ptr<MicroBenchmarkImpl> GetBenchmarkImpl(
       scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner);
 
  protected:
-  void NotifyDone(scoped_ptr<base::Value> result);
+  void NotifyDone(std::unique_ptr<base::Value> result);
 
-  virtual scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
+  virtual std::unique_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
       scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner);
 
  private:
diff --git a/cc/debug/micro_benchmark_controller.cc b/cc/debug/micro_benchmark_controller.cc
index 78fa561..54d33c9a 100644
--- a/cc/debug/micro_benchmark_controller.cc
+++ b/cc/debug/micro_benchmark_controller.cc
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/values.h"
 #include "cc/debug/invalidation_benchmark.h"
@@ -22,18 +23,18 @@
 
 namespace {
 
-scoped_ptr<MicroBenchmark> CreateBenchmark(
+std::unique_ptr<MicroBenchmark> CreateBenchmark(
     const std::string& name,
-    scoped_ptr<base::Value> value,
+    std::unique_ptr<base::Value> value,
     const MicroBenchmark::DoneCallback& callback) {
   if (name == "invalidation_benchmark") {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new InvalidationBenchmark(std::move(value), callback));
   } else if (name == "rasterize_and_record_benchmark") {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new RasterizeAndRecordBenchmark(std::move(value), callback));
   } else if (name == "unittest_only_benchmark") {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new UnittestOnlyBenchmark(std::move(value), callback));
   }
   return nullptr;
@@ -53,9 +54,9 @@
 
 int MicroBenchmarkController::ScheduleRun(
     const std::string& micro_benchmark_name,
-    scoped_ptr<base::Value> value,
+    std::unique_ptr<base::Value> value,
     const MicroBenchmark::DoneCallback& callback) {
-  scoped_ptr<MicroBenchmark> benchmark =
+  std::unique_ptr<MicroBenchmark> benchmark =
       CreateBenchmark(micro_benchmark_name, std::move(value), callback);
   if (benchmark.get()) {
     int id = GetNextIdAndIncrement();
@@ -76,11 +77,12 @@
 }
 
 bool MicroBenchmarkController::SendMessage(int id,
-                                           scoped_ptr<base::Value> value) {
-  auto it = std::find_if(benchmarks_.begin(), benchmarks_.end(),
-                         [id](const scoped_ptr<MicroBenchmark>& benchmark) {
-                           return benchmark->id() == id;
-                         });
+                                           std::unique_ptr<base::Value> value) {
+  auto it =
+      std::find_if(benchmarks_.begin(), benchmarks_.end(),
+                   [id](const std::unique_ptr<MicroBenchmark>& benchmark) {
+                     return benchmark->id() == id;
+                   });
   if (it == benchmarks_.end())
     return false;
   return (*it)->ProcessMessage(std::move(value));
@@ -89,7 +91,7 @@
 void MicroBenchmarkController::ScheduleImplBenchmarks(
     LayerTreeHostImpl* host_impl) {
   for (const auto& benchmark : benchmarks_) {
-    scoped_ptr<MicroBenchmarkImpl> benchmark_impl;
+    std::unique_ptr<MicroBenchmarkImpl> benchmark_impl;
     if (!benchmark->ProcessedForBenchmarkImpl()) {
       benchmark_impl =
           benchmark->GetBenchmarkImpl(main_controller_task_runner_);
@@ -112,7 +114,7 @@
 void MicroBenchmarkController::CleanUpFinishedBenchmarks() {
   benchmarks_.erase(
       std::remove_if(benchmarks_.begin(), benchmarks_.end(),
-                     [](const scoped_ptr<MicroBenchmark>& benchmark) {
+                     [](const std::unique_ptr<MicroBenchmark>& benchmark) {
                        return benchmark->IsDone();
                      }),
       benchmarks_.end());
diff --git a/cc/debug/micro_benchmark_controller.h b/cc/debug/micro_benchmark_controller.h
index 95000cb..88ccc84 100644
--- a/cc/debug/micro_benchmark_controller.h
+++ b/cc/debug/micro_benchmark_controller.h
@@ -30,10 +30,10 @@
 
   // Returns the id of the benchmark on success, 0 otherwise.
   int ScheduleRun(const std::string& micro_benchmark_name,
-                  scoped_ptr<base::Value> value,
+                  std::unique_ptr<base::Value> value,
                   const MicroBenchmark::DoneCallback& callback);
   // Returns true if the message was successfully delivered and handled.
-  bool SendMessage(int id, scoped_ptr<base::Value> value);
+  bool SendMessage(int id, std::unique_ptr<base::Value> value);
 
   void ScheduleImplBenchmarks(LayerTreeHostImpl* host_impl);
 
@@ -42,7 +42,7 @@
   int GetNextIdAndIncrement();
 
   LayerTreeHost* host_;
-  std::vector<scoped_ptr<MicroBenchmark>> benchmarks_;
+  std::vector<std::unique_ptr<MicroBenchmark>> benchmarks_;
   static int next_id_;
   scoped_refptr<base::SingleThreadTaskRunner> main_controller_task_runner_;
 
diff --git a/cc/debug/micro_benchmark_controller_impl.cc b/cc/debug/micro_benchmark_controller_impl.cc
index 8d917d7..7c46aed 100644
--- a/cc/debug/micro_benchmark_controller_impl.cc
+++ b/cc/debug/micro_benchmark_controller_impl.cc
@@ -21,7 +21,7 @@
 MicroBenchmarkControllerImpl::~MicroBenchmarkControllerImpl() {}
 
 void MicroBenchmarkControllerImpl::ScheduleRun(
-    scoped_ptr<MicroBenchmarkImpl> benchmark) {
+    std::unique_ptr<MicroBenchmarkImpl> benchmark) {
   benchmarks_.push_back(std::move(benchmark));
 }
 
@@ -37,7 +37,7 @@
 void MicroBenchmarkControllerImpl::CleanUpFinishedBenchmarks() {
   benchmarks_.erase(
       std::remove_if(benchmarks_.begin(), benchmarks_.end(),
-                     [](const scoped_ptr<MicroBenchmarkImpl>& benchmark) {
+                     [](const std::unique_ptr<MicroBenchmarkImpl>& benchmark) {
                        return benchmark->IsDone();
                      }),
       benchmarks_.end());
diff --git a/cc/debug/micro_benchmark_controller_impl.h b/cc/debug/micro_benchmark_controller_impl.h
index bcb4aa0..67c8005 100644
--- a/cc/debug/micro_benchmark_controller_impl.h
+++ b/cc/debug/micro_benchmark_controller_impl.h
@@ -21,13 +21,13 @@
 
   void DidCompleteCommit();
 
-  void ScheduleRun(scoped_ptr<MicroBenchmarkImpl> benchmark);
+  void ScheduleRun(std::unique_ptr<MicroBenchmarkImpl> benchmark);
 
  private:
   void CleanUpFinishedBenchmarks();
 
   LayerTreeHostImpl* host_;
-  std::vector<scoped_ptr<MicroBenchmarkImpl>> benchmarks_;
+  std::vector<std::unique_ptr<MicroBenchmarkImpl>> benchmarks_;
 
   DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkControllerImpl);
 };
diff --git a/cc/debug/micro_benchmark_controller_unittest.cc b/cc/debug/micro_benchmark_controller_unittest.cc
index 5e4aa403..4baeb864 100644
--- a/cc/debug/micro_benchmark_controller_unittest.cc
+++ b/cc/debug/micro_benchmark_controller_unittest.cc
@@ -2,10 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "cc/debug/micro_benchmark.h"
 #include "cc/debug/micro_benchmark_controller.h"
+
+#include <memory>
+
+#include "base/callback.h"
+#include "base/memory/ptr_util.h"
+#include "cc/debug/micro_benchmark.h"
 #include "cc/layers/layer.h"
 #include "cc/test/fake_impl_task_runner_provider.h"
 #include "cc/test/fake_layer_tree_host.h"
@@ -24,8 +27,8 @@
 
   void SetUp() override {
     impl_task_runner_provider_ =
-        make_scoped_ptr(new FakeImplTaskRunnerProvider);
-    layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(
+        base::WrapUnique(new FakeImplTaskRunnerProvider);
+    layer_tree_host_impl_ = base::WrapUnique(new FakeLayerTreeHostImpl(
         impl_task_runner_provider_.get(), &shared_bitmap_manager_,
         &task_graph_runner_));
 
@@ -34,7 +37,7 @@
     layer_tree_host_->SetRootLayer(Layer::Create());
     layer_tree_host_->InitializeForTesting(
         TaskRunnerProvider::Create(nullptr, nullptr),
-        scoped_ptr<Proxy>(new FakeProxy), nullptr);
+        std::unique_ptr<Proxy>(new FakeProxy), nullptr);
   }
 
   void TearDown() override {
@@ -46,15 +49,14 @@
   FakeLayerTreeHostClient layer_tree_host_client_;
   TestTaskGraphRunner task_graph_runner_;
   TestSharedBitmapManager shared_bitmap_manager_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
-  scoped_ptr<FakeLayerTreeHostImpl> layer_tree_host_impl_;
-  scoped_ptr<FakeImplTaskRunnerProvider> impl_task_runner_provider_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHostImpl> layer_tree_host_impl_;
+  std::unique_ptr<FakeImplTaskRunnerProvider> impl_task_runner_provider_;
 };
 
-void Noop(scoped_ptr<base::Value> value) {
-}
+void Noop(std::unique_ptr<base::Value> value) {}
 
-void IncrementCallCount(int* count, scoped_ptr<base::Value> value) {
+void IncrementCallCount(int* count, std::unique_ptr<base::Value> value) {
   ++(*count);
 }
 
@@ -124,7 +126,7 @@
 
 TEST_F(MicroBenchmarkControllerTest, BenchmarkImplRan) {
   int run_count = 0;
-  scoped_ptr<base::DictionaryValue> settings(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> settings(new base::DictionaryValue);
   settings->SetBoolean("run_benchmark_impl", true);
 
   // Schedule a main thread benchmark.
@@ -148,7 +150,7 @@
 
 TEST_F(MicroBenchmarkControllerTest, SendMessage) {
   // Send valid message to invalid benchmark (id = 0)
-  scoped_ptr<base::DictionaryValue> message(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> message(new base::DictionaryValue);
   message->SetBoolean("can_handle", true);
   bool message_handled =
       layer_tree_host_->SendMessageToMicroBenchmark(0, std::move(message));
@@ -163,14 +165,14 @@
   EXPECT_GT(id, 0);
 
   // Send valid message to valid benchmark
-  message = make_scoped_ptr(new base::DictionaryValue);
+  message = base::WrapUnique(new base::DictionaryValue);
   message->SetBoolean("can_handle", true);
   message_handled =
       layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(message));
   EXPECT_TRUE(message_handled);
 
   // Send invalid message to valid benchmark
-  message = make_scoped_ptr(new base::DictionaryValue);
+  message = base::WrapUnique(new base::DictionaryValue);
   message->SetBoolean("can_handle", false);
   message_handled =
       layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(message));
diff --git a/cc/debug/micro_benchmark_impl.cc b/cc/debug/micro_benchmark_impl.cc
index b7d59ae..8f818fd1 100644
--- a/cc/debug/micro_benchmark_impl.cc
+++ b/cc/debug/micro_benchmark_impl.cc
@@ -4,10 +4,11 @@
 
 #include "cc/debug/micro_benchmark_impl.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/values.h"
 
@@ -16,7 +17,7 @@
 namespace {
 
 void RunCallback(const MicroBenchmarkImpl::DoneCallback& callback,
-                 scoped_ptr<base::Value> result) {
+                 std::unique_ptr<base::Value> result) {
   callback.Run(std::move(result));
 }
 
@@ -38,7 +39,7 @@
 
 void MicroBenchmarkImpl::DidCompleteCommit(LayerTreeHostImpl* host) {}
 
-void MicroBenchmarkImpl::NotifyDone(scoped_ptr<base::Value> result) {
+void MicroBenchmarkImpl::NotifyDone(std::unique_ptr<base::Value> result) {
   origin_task_runner_->PostTask(
       FROM_HERE, base::Bind(RunCallback, callback_, base::Passed(&result)));
   is_done_ = true;
diff --git a/cc/debug/micro_benchmark_impl.h b/cc/debug/micro_benchmark_impl.h
index ed968a39..457eb4d 100644
--- a/cc/debug/micro_benchmark_impl.h
+++ b/cc/debug/micro_benchmark_impl.h
@@ -5,8 +5,9 @@
 #ifndef CC_DEBUG_MICRO_BENCHMARK_IMPL_H_
 #define CC_DEBUG_MICRO_BENCHMARK_IMPL_H_
 
+#include <memory>
+
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace base {
@@ -21,7 +22,7 @@
 class PictureLayerImpl;
 class CC_EXPORT MicroBenchmarkImpl {
  public:
-  typedef base::Callback<void(scoped_ptr<base::Value>)> DoneCallback;
+  typedef base::Callback<void(std::unique_ptr<base::Value>)> DoneCallback;
 
   explicit MicroBenchmarkImpl(
       const DoneCallback& callback,
@@ -35,7 +36,7 @@
   virtual void RunOnLayer(PictureLayerImpl* layer);
 
  protected:
-  void NotifyDone(scoped_ptr<base::Value> result);
+  void NotifyDone(std::unique_ptr<base::Value> result);
 
  private:
   DoneCallback callback_;
diff --git a/cc/debug/picture_debug_util.cc b/cc/debug/picture_debug_util.cc
index dda4dce..aef9ba8 100644
--- a/cc/debug/picture_debug_util.cc
+++ b/cc/debug/picture_debug_util.cc
@@ -7,11 +7,11 @@
 #include <stddef.h>
 
 #include <limits>
+#include <memory>
 #include <vector>
 
 #include "base/base64.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkData.h"
 #include "third_party/skia/include/core/SkImageInfo.h"
@@ -71,7 +71,7 @@
   picture->serialize(&stream, &serializer);
 
   size_t serialized_size = stream.bytesWritten();
-  scoped_ptr<char[]> serialized_picture(new char[serialized_size]);
+  std::unique_ptr<char[]> serialized_picture(new char[serialized_size]);
   stream.copyTo(serialized_picture.get());
   base::Base64Encode(
       base::StringPiece(serialized_picture.get(), serialized_size), output);
diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
index 3c7058f0..fcd2946 100644
--- a/cc/debug/rasterize_and_record_benchmark.cc
+++ b/cc/debug/rasterize_and_record_benchmark.cc
@@ -10,6 +10,7 @@
 #include <limits>
 #include <string>
 
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/values.h"
 #include "cc/debug/lap_timer.h"
@@ -47,7 +48,7 @@
 }  // namespace
 
 RasterizeAndRecordBenchmark::RasterizeAndRecordBenchmark(
-    scoped_ptr<base::Value> value,
+    std::unique_ptr<base::Value> value,
     const MicroBenchmark::DoneCallback& callback)
     : MicroBenchmark(callback),
       record_repeat_count_(kDefaultRecordRepeatCount),
@@ -75,7 +76,7 @@
       CallFunctionLayerType::ALL_LAYERS);
 
   DCHECK(!results_.get());
-  results_ = make_scoped_ptr(new base::DictionaryValue);
+  results_ = base::WrapUnique(new base::DictionaryValue);
   results_->SetInteger("pixels_recorded", record_results_.pixels_recorded);
   results_->SetInteger("picture_memory_usage",
                        static_cast<int>(record_results_.bytes_used));
@@ -89,7 +90,7 @@
 }
 
 void RasterizeAndRecordBenchmark::RecordRasterResults(
-    scoped_ptr<base::Value> results_value) {
+    std::unique_ptr<base::Value> results_value) {
   DCHECK(main_thread_benchmark_done_);
 
   base::DictionaryValue* results = nullptr;
@@ -101,9 +102,10 @@
   NotifyDone(std::move(results_));
 }
 
-scoped_ptr<MicroBenchmarkImpl> RasterizeAndRecordBenchmark::CreateBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl>
+RasterizeAndRecordBenchmark::CreateBenchmarkImpl(
     scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
-  return make_scoped_ptr(new RasterizeAndRecordBenchmarkImpl(
+  return base::WrapUnique(new RasterizeAndRecordBenchmarkImpl(
       origin_task_runner, settings_.get(),
       base::Bind(&RasterizeAndRecordBenchmark::RecordRasterResults,
                  weak_ptr_factory_.GetWeakPtr())));
diff --git a/cc/debug/rasterize_and_record_benchmark.h b/cc/debug/rasterize_and_record_benchmark.h
index a049d38a..f68b566 100644
--- a/cc/debug/rasterize_and_record_benchmark.h
+++ b/cc/debug/rasterize_and_record_benchmark.h
@@ -29,7 +29,7 @@
 class RasterizeAndRecordBenchmark : public MicroBenchmark {
  public:
   explicit RasterizeAndRecordBenchmark(
-      scoped_ptr<base::Value> value,
+      std::unique_ptr<base::Value> value,
       const MicroBenchmark::DoneCallback& callback);
   ~RasterizeAndRecordBenchmark() override;
 
@@ -37,11 +37,11 @@
   void DidUpdateLayers(LayerTreeHost* host) override;
   void RunOnLayer(PictureLayer* layer) override;
 
-  scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
+  std::unique_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
       scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) override;
 
  private:
-  void RecordRasterResults(scoped_ptr<base::Value> results);
+  void RecordRasterResults(std::unique_ptr<base::Value> results);
 
   struct RecordResults {
     RecordResults();
@@ -54,8 +54,8 @@
 
   RecordResults record_results_;
   int record_repeat_count_;
-  scoped_ptr<base::Value> settings_;
-  scoped_ptr<base::DictionaryValue> results_;
+  std::unique_ptr<base::Value> settings_;
+  std::unique_ptr<base::DictionaryValue> results_;
 
   // The following is used in DCHECKs.
   bool main_thread_benchmark_done_;
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index d4b4c11..ee819349 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -133,7 +133,7 @@
       },
       CallFunctionLayerType::ALL_LAYERS);
 
-  scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
   result->SetDouble("rasterize_time_ms",
                     rasterize_results_.total_best_time.InMillisecondsF());
   result->SetDouble("total_pictures_in_pile_size",
@@ -172,10 +172,11 @@
   // it takes to rasterize content. As such, the actual settings used here don't
   // really matter.
   const LayerTreeSettings& settings = layer->layer_tree_impl()->settings();
-  scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create(
-      layer->GetTree(), &client, settings.tiling_interest_area_padding,
-      settings.skewport_target_time_in_seconds,
-      settings.skewport_extrapolation_limit_in_content_pixels);
+  std::unique_ptr<PictureLayerTilingSet> tiling_set =
+      PictureLayerTilingSet::Create(
+          layer->GetTree(), &client, settings.tiling_interest_area_padding,
+          settings.skewport_target_time_in_seconds,
+          settings.skewport_extrapolation_limit_in_content_pixels);
 
   PictureLayerTiling* tiling =
       tiling_set->AddTiling(1.f, layer->GetRasterSource());
diff --git a/cc/debug/rendering_stats.cc b/cc/debug/rendering_stats.cc
index f0d56aa..bf31cc6c 100644
--- a/cc/debug/rendering_stats.cc
+++ b/cc/debug/rendering_stats.cc
@@ -50,9 +50,9 @@
 RenderingStats::~RenderingStats() {
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 RenderingStats::AsTraceableData() const {
-  scoped_ptr<base::trace_event::TracedValue> record_data(
+  std::unique_ptr<base::trace_event::TracedValue> record_data(
       new base::trace_event::TracedValue());
   record_data->SetInteger("frame_count", frame_count);
   record_data->SetInteger("visible_content_area", visible_content_area);
diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h
index a99d28d..f12d123 100644
--- a/cc/debug/rendering_stats.h
+++ b/cc/debug/rendering_stats.h
@@ -7,9 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "base/values.h"
@@ -59,7 +59,7 @@
   TimeDeltaList commit_to_activate_duration;
   TimeDeltaList commit_to_activate_duration_estimate;
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsTraceableData()
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsTraceableData()
       const;
   void Add(const RenderingStats& other);
 };
diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc
index de7057e7..69fbd50 100644
--- a/cc/debug/rendering_stats_instrumentation.cc
+++ b/cc/debug/rendering_stats_instrumentation.cc
@@ -2,16 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/debug/rendering_stats_instrumentation.h"
+
 #include <stdint.h>
 
-#include "cc/debug/rendering_stats_instrumentation.h"
+#include "base/memory/ptr_util.h"
 
 namespace cc {
 
 // static
-scoped_ptr<RenderingStatsInstrumentation>
-    RenderingStatsInstrumentation::Create() {
-  return make_scoped_ptr(new RenderingStatsInstrumentation());
+std::unique_ptr<RenderingStatsInstrumentation>
+RenderingStatsInstrumentation::Create() {
+  return base::WrapUnique(new RenderingStatsInstrumentation());
 }
 
 RenderingStatsInstrumentation::RenderingStatsInstrumentation()
diff --git a/cc/debug/rendering_stats_instrumentation.h b/cc/debug/rendering_stats_instrumentation.h
index 9197fb6..566a1218e 100644
--- a/cc/debug/rendering_stats_instrumentation.h
+++ b/cc/debug/rendering_stats_instrumentation.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "cc/debug/rendering_stats.h"
 
@@ -18,7 +19,7 @@
 // recording of rendering stats into a private RenderingStats instance.
 class CC_EXPORT RenderingStatsInstrumentation {
  public:
-  static scoped_ptr<RenderingStatsInstrumentation> Create();
+  static std::unique_ptr<RenderingStatsInstrumentation> Create();
   virtual ~RenderingStatsInstrumentation();
 
   // Return copy of current impl thread rendering stats.
diff --git a/cc/debug/rendering_stats_unittest.cc b/cc/debug/rendering_stats_unittest.cc
index b0695be7..2ba0d2b 100644
--- a/cc/debug/rendering_stats_unittest.cc
+++ b/cc/debug/rendering_stats_unittest.cc
@@ -13,7 +13,7 @@
 namespace {
 
 static std::string ToString(const RenderingStats::TimeDeltaList& list) {
-  scoped_ptr<base::trace_event::TracedValue> value(
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   list.AddToTracedValue("list_value", value.get());
   return value->ToString();
diff --git a/cc/debug/traced_display_item_list.cc b/cc/debug/traced_display_item_list.cc
index 7da87b9..b02446e9 100644
--- a/cc/debug/traced_display_item_list.cc
+++ b/cc/debug/traced_display_item_list.cc
@@ -19,7 +19,7 @@
 }
 
 void TracedDisplayItemList::AppendAsTraceFormat(std::string* out) const {
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> convertable(
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> convertable(
       display_item_list_->AsValue(include_items_));
   convertable->AppendAsTraceFormat(out);
 }
diff --git a/cc/debug/traced_display_item_list.h b/cc/debug/traced_display_item_list.h
index 71cf664..5073348 100644
--- a/cc/debug/traced_display_item_list.h
+++ b/cc/debug/traced_display_item_list.h
@@ -5,11 +5,11 @@
 #ifndef CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_
 #define CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/debug/traced_value.h"
 
@@ -20,10 +20,10 @@
 class TracedDisplayItemList
     : public base::trace_event::ConvertableToTraceFormat {
  public:
-  static scoped_ptr<ConvertableToTraceFormat> AsTraceableDisplayItemList(
+  static std::unique_ptr<ConvertableToTraceFormat> AsTraceableDisplayItemList(
       scoped_refptr<const DisplayItemList> list,
       bool include_items) {
-    return scoped_ptr<ConvertableToTraceFormat>(
+    return std::unique_ptr<ConvertableToTraceFormat>(
         new TracedDisplayItemList(list, include_items));
   }
   void AppendAsTraceFormat(std::string* out) const override;
diff --git a/cc/debug/unittest_only_benchmark.cc b/cc/debug/unittest_only_benchmark.cc
index 657c0f6..251507ba 100644
--- a/cc/debug/unittest_only_benchmark.cc
+++ b/cc/debug/unittest_only_benchmark.cc
@@ -5,13 +5,14 @@
 #include "cc/debug/unittest_only_benchmark.h"
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/values.h"
 #include "cc/debug/unittest_only_benchmark_impl.h"
 
 namespace cc {
 
-UnittestOnlyBenchmark::UnittestOnlyBenchmark(scoped_ptr<base::Value> value,
+UnittestOnlyBenchmark::UnittestOnlyBenchmark(std::unique_ptr<base::Value> value,
                                              const DoneCallback& callback)
     : MicroBenchmark(callback),
       create_impl_benchmark_(false),
@@ -36,7 +37,7 @@
   NotifyDone(nullptr);
 }
 
-bool UnittestOnlyBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
+bool UnittestOnlyBenchmark::ProcessMessage(std::unique_ptr<base::Value> value) {
   base::DictionaryValue* message = nullptr;
   value->GetAsDictionary(&message);
   bool can_handle;
@@ -48,16 +49,17 @@
   return false;
 }
 
-void UnittestOnlyBenchmark::RecordImplResults(scoped_ptr<base::Value> results) {
+void UnittestOnlyBenchmark::RecordImplResults(
+    std::unique_ptr<base::Value> results) {
   NotifyDone(std::move(results));
 }
 
-scoped_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl(
     scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
   if (!create_impl_benchmark_)
-    return make_scoped_ptr<MicroBenchmarkImpl>(nullptr);
+    return base::WrapUnique<MicroBenchmarkImpl>(nullptr);
 
-  return make_scoped_ptr(new UnittestOnlyBenchmarkImpl(
+  return base::WrapUnique(new UnittestOnlyBenchmarkImpl(
       origin_task_runner, nullptr,
       base::Bind(&UnittestOnlyBenchmark::RecordImplResults,
                  weak_ptr_factory_.GetWeakPtr())));
diff --git a/cc/debug/unittest_only_benchmark.h b/cc/debug/unittest_only_benchmark.h
index 4e74ec7..5a00c15 100644
--- a/cc/debug/unittest_only_benchmark.h
+++ b/cc/debug/unittest_only_benchmark.h
@@ -16,19 +16,19 @@
 
 class CC_EXPORT UnittestOnlyBenchmark : public MicroBenchmark {
  public:
-  UnittestOnlyBenchmark(scoped_ptr<base::Value> value,
+  UnittestOnlyBenchmark(std::unique_ptr<base::Value> value,
                         const DoneCallback& callback);
   ~UnittestOnlyBenchmark() override;
 
   void DidUpdateLayers(LayerTreeHost* host) override;
-  bool ProcessMessage(scoped_ptr<base::Value> value) override;
+  bool ProcessMessage(std::unique_ptr<base::Value> value) override;
 
  protected:
-  scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
+  std::unique_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
       scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) override;
 
  private:
-  void RecordImplResults(scoped_ptr<base::Value> results);
+  void RecordImplResults(std::unique_ptr<base::Value> results);
 
   bool create_impl_benchmark_;
   base::WeakPtrFactory<UnittestOnlyBenchmark> weak_ptr_factory_;
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h
index 90870d9..7115b31 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -5,8 +5,9 @@
 #ifndef CC_INPUT_INPUT_HANDLER_H_
 #define CC_INPUT_INPUT_HANDLER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/event_listener_properties.h"
@@ -196,8 +197,8 @@
   // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect()
   // is called on LayerTreeHostImpl, the original latency info will be turned
   // into a LatencyInfoSwapPromise.
-  virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
-      ui::LatencyInfo* latency) = 0;
+  virtual std::unique_ptr<SwapPromiseMonitor>
+  CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0;
 
   virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0;
 
diff --git a/cc/input/page_scale_animation.cc b/cc/input/page_scale_animation.cc
index d66f60a5..96ebd9c 100644
--- a/cc/input/page_scale_animation.cc
+++ b/cc/input/page_scale_animation.cc
@@ -7,6 +7,7 @@
 #include <math.h>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/animation/timing_function.h"
 #include "ui/gfx/geometry/point_f.h"
 #include "ui/gfx/geometry/rect_f.h"
@@ -43,13 +44,13 @@
 using base::TimeTicks;
 using base::TimeDelta;
 
-scoped_ptr<PageScaleAnimation> PageScaleAnimation::Create(
+std::unique_ptr<PageScaleAnimation> PageScaleAnimation::Create(
     const gfx::Vector2dF& start_scroll_offset,
     float start_page_scale_factor,
     const gfx::SizeF& viewport_size,
     const gfx::SizeF& root_layer_size,
-    scoped_ptr<TimingFunction> timing_function) {
-  return make_scoped_ptr(new PageScaleAnimation(
+    std::unique_ptr<TimingFunction> timing_function) {
+  return base::WrapUnique(new PageScaleAnimation(
       start_scroll_offset, start_page_scale_factor, viewport_size,
       root_layer_size, std::move(timing_function)));
 }
@@ -59,7 +60,7 @@
     float start_page_scale_factor,
     const gfx::SizeF& viewport_size,
     const gfx::SizeF& root_layer_size,
-    scoped_ptr<TimingFunction> timing_function)
+    std::unique_ptr<TimingFunction> timing_function)
     : start_page_scale_factor_(start_page_scale_factor),
       target_page_scale_factor_(0.f),
       start_scroll_offset_(start_scroll_offset),
diff --git a/cc/input/page_scale_animation.h b/cc/input/page_scale_animation.h
index dbe018b..d7d10a2 100644
--- a/cc/input/page_scale_animation.h
+++ b/cc/input/page_scale_animation.h
@@ -5,8 +5,9 @@
 #ifndef CC_INPUT_PAGE_SCALE_ANIMATION_H_
 #define CC_INPUT_PAGE_SCALE_ANIMATION_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/size_f.h"
@@ -46,12 +47,12 @@
 class CC_EXPORT PageScaleAnimation {
  public:
   // Construct with the state at the beginning of the animation.
-  static scoped_ptr<PageScaleAnimation> Create(
+  static std::unique_ptr<PageScaleAnimation> Create(
       const gfx::Vector2dF& start_scroll_offset,
       float start_page_scale_factor,
       const gfx::SizeF& viewport_size,
       const gfx::SizeF& root_layer_size,
-      scoped_ptr<TimingFunction> timing_function);
+      std::unique_ptr<TimingFunction> timing_function);
 
   ~PageScaleAnimation();
 
@@ -95,7 +96,7 @@
                      float start_page_scale_factor,
                      const gfx::SizeF& viewport_size,
                      const gfx::SizeF& root_layer_size,
-                     scoped_ptr<TimingFunction> timing_function);
+                     std::unique_ptr<TimingFunction> timing_function);
 
  private:
   void ClampTargetScrollOffset();
@@ -125,7 +126,7 @@
   base::TimeTicks start_time_;
   base::TimeDelta duration_;
 
-  scoped_ptr<TimingFunction> timing_function_;
+  std::unique_ptr<TimingFunction> timing_function_;
 
   DISALLOW_COPY_AND_ASSIGN(PageScaleAnimation);
 };
diff --git a/cc/input/scroll_state.h b/cc/input/scroll_state.h
index 3e6f92c..ce961c1 100644
--- a/cc/input/scroll_state.h
+++ b/cc/input/scroll_state.h
@@ -6,8 +6,8 @@
 #define CC_INPUT_SCROLL_STATE_H_
 
 #include <list>
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scroll_state_data.h"
 #include "ui/gfx/geometry/point.h"
diff --git a/cc/input/scroll_state_unittest.cc b/cc/input/scroll_state_unittest.cc
index a996a1c..b7299007 100644
--- a/cc/input/scroll_state_unittest.cc
+++ b/cc/input/scroll_state_unittest.cc
@@ -67,7 +67,7 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<LayerImpl> layer_impl =
+  std::unique_ptr<LayerImpl> layer_impl =
       LayerImpl::Create(host_impl.active_tree(), 1);
   ScrollNode* scroll_node =
       host_impl.active_tree()->property_trees()->scroll_tree.Node(
diff --git a/cc/input/scrollbar_animation_controller_linear_fade.cc b/cc/input/scrollbar_animation_controller_linear_fade.cc
index 079ac83..8ead324 100644
--- a/cc/input/scrollbar_animation_controller_linear_fade.cc
+++ b/cc/input/scrollbar_animation_controller_linear_fade.cc
@@ -4,20 +4,21 @@
 
 #include "cc/input/scrollbar_animation_controller_linear_fade.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/time/time.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/scrollbar_layer_impl_base.h"
 
 namespace cc {
 
-scoped_ptr<ScrollbarAnimationControllerLinearFade>
+std::unique_ptr<ScrollbarAnimationControllerLinearFade>
 ScrollbarAnimationControllerLinearFade::Create(
     int scroll_layer_id,
     ScrollbarAnimationControllerClient* client,
     base::TimeDelta delay_before_starting,
     base::TimeDelta resize_delay_before_starting,
     base::TimeDelta duration) {
-  return make_scoped_ptr(new ScrollbarAnimationControllerLinearFade(
+  return base::WrapUnique(new ScrollbarAnimationControllerLinearFade(
       scroll_layer_id, client, delay_before_starting,
       resize_delay_before_starting, duration));
 }
diff --git a/cc/input/scrollbar_animation_controller_linear_fade.h b/cc/input/scrollbar_animation_controller_linear_fade.h
index 356c2cd..f5993e7 100644
--- a/cc/input/scrollbar_animation_controller_linear_fade.h
+++ b/cc/input/scrollbar_animation_controller_linear_fade.h
@@ -5,8 +5,9 @@
 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_
 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scrollbar_animation_controller.h"
 
@@ -16,7 +17,7 @@
 class CC_EXPORT ScrollbarAnimationControllerLinearFade
     : public ScrollbarAnimationController {
  public:
-  static scoped_ptr<ScrollbarAnimationControllerLinearFade> Create(
+  static std::unique_ptr<ScrollbarAnimationControllerLinearFade> Create(
       int scroll_layer_id,
       ScrollbarAnimationControllerClient* client,
       base::TimeDelta delay_before_starting,
diff --git a/cc/input/scrollbar_animation_controller_linear_fade_unittest.cc b/cc/input/scrollbar_animation_controller_linear_fade_unittest.cc
index 35eacb51..7d7645b 100644
--- a/cc/input/scrollbar_animation_controller_linear_fade_unittest.cc
+++ b/cc/input/scrollbar_animation_controller_linear_fade_unittest.cc
@@ -49,7 +49,7 @@
     const bool kIsLeftSideVerticalScrollbar = false;
     const bool kIsOverlayScrollbar = true;  // Allow opacity animations.
 
-    scoped_ptr<LayerImpl> scroll_layer =
+    std::unique_ptr<LayerImpl> scroll_layer =
         LayerImpl::Create(host_impl_.active_tree(), 1);
     scrollbar_layer_ = SolidColorScrollbarLayerImpl::Create(
         host_impl_.active_tree(), 2, orientation(), kThumbThickness,
@@ -74,9 +74,9 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
   FakeLayerTreeHostImpl host_impl_;
-  scoped_ptr<ScrollbarAnimationControllerLinearFade> scrollbar_controller_;
-  scoped_ptr<LayerImpl> clip_layer_;
-  scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar_layer_;
+  std::unique_ptr<ScrollbarAnimationControllerLinearFade> scrollbar_controller_;
+  std::unique_ptr<LayerImpl> clip_layer_;
+  std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar_layer_;
 
   base::Closure start_fade_;
   base::TimeDelta delay_;
diff --git a/cc/input/scrollbar_animation_controller_thinning.cc b/cc/input/scrollbar_animation_controller_thinning.cc
index 8b801ab9..53e5895 100644
--- a/cc/input/scrollbar_animation_controller_thinning.cc
+++ b/cc/input/scrollbar_animation_controller_thinning.cc
@@ -4,6 +4,7 @@
 
 #include "cc/input/scrollbar_animation_controller_thinning.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/time/time.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/scrollbar_layer_impl_base.h"
@@ -17,14 +18,14 @@
 
 namespace cc {
 
-scoped_ptr<ScrollbarAnimationControllerThinning>
+std::unique_ptr<ScrollbarAnimationControllerThinning>
 ScrollbarAnimationControllerThinning::Create(
     int scroll_layer_id,
     ScrollbarAnimationControllerClient* client,
     base::TimeDelta delay_before_starting,
     base::TimeDelta resize_delay_before_starting,
     base::TimeDelta duration) {
-  return make_scoped_ptr(new ScrollbarAnimationControllerThinning(
+  return base::WrapUnique(new ScrollbarAnimationControllerThinning(
       scroll_layer_id, client, delay_before_starting,
       resize_delay_before_starting, duration));
 }
diff --git a/cc/input/scrollbar_animation_controller_thinning.h b/cc/input/scrollbar_animation_controller_thinning.h
index 0519d39..d8be95f 100644
--- a/cc/input/scrollbar_animation_controller_thinning.h
+++ b/cc/input/scrollbar_animation_controller_thinning.h
@@ -5,8 +5,9 @@
 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scrollbar_animation_controller.h"
 
@@ -18,7 +19,7 @@
 class CC_EXPORT ScrollbarAnimationControllerThinning
     : public ScrollbarAnimationController {
  public:
-  static scoped_ptr<ScrollbarAnimationControllerThinning> Create(
+  static std::unique_ptr<ScrollbarAnimationControllerThinning> Create(
       int scroll_layer_id,
       ScrollbarAnimationControllerClient* client,
       base::TimeDelta delay_before_starting,
diff --git a/cc/input/scrollbar_animation_controller_thinning_unittest.cc b/cc/input/scrollbar_animation_controller_thinning_unittest.cc
index da5d625..0dbe47d 100644
--- a/cc/input/scrollbar_animation_controller_thinning_unittest.cc
+++ b/cc/input/scrollbar_animation_controller_thinning_unittest.cc
@@ -42,7 +42,7 @@
 
  protected:
   void SetUp() override {
-    scoped_ptr<LayerImpl> scroll_layer =
+    std::unique_ptr<LayerImpl> scroll_layer =
         LayerImpl::Create(host_impl_.active_tree(), 1);
     clip_layer_ = LayerImpl::Create(host_impl_.active_tree(), 3);
     scroll_layer->SetScrollClipLayer(clip_layer_->id());
@@ -71,9 +71,9 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
   FakeLayerTreeHostImpl host_impl_;
-  scoped_ptr<ScrollbarAnimationControllerThinning> scrollbar_controller_;
-  scoped_ptr<LayerImpl> clip_layer_;
-  scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar_layer_;
+  std::unique_ptr<ScrollbarAnimationControllerThinning> scrollbar_controller_;
+  std::unique_ptr<LayerImpl> clip_layer_;
+  std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar_layer_;
 
   base::Closure start_fade_;
   base::TimeDelta delay_;
diff --git a/cc/input/top_controls_manager.cc b/cc/input/top_controls_manager.cc
index 44ed920..f04765ed 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -9,6 +9,7 @@
 #include <algorithm>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/animation/keyframed_animation_curve.h"
 #include "cc/animation/timing_function.h"
 #include "cc/input/top_controls_manager_client.h"
@@ -25,13 +26,12 @@
 }
 
 // static
-scoped_ptr<TopControlsManager> TopControlsManager::Create(
+std::unique_ptr<TopControlsManager> TopControlsManager::Create(
     TopControlsManagerClient* client,
     float top_controls_show_threshold,
     float top_controls_hide_threshold) {
-  return make_scoped_ptr(new TopControlsManager(client,
-                                                top_controls_show_threshold,
-                                                top_controls_hide_threshold));
+  return base::WrapUnique(new TopControlsManager(
+      client, top_controls_show_threshold, top_controls_hide_threshold));
 }
 
 TopControlsManager::TopControlsManager(TopControlsManagerClient* client,
diff --git a/cc/input/top_controls_manager.h b/cc/input/top_controls_manager.h
index 995577d..69bb75d 100644
--- a/cc/input/top_controls_manager.h
+++ b/cc/input/top_controls_manager.h
@@ -5,8 +5,9 @@
 #ifndef CC_INPUT_TOP_CONTROLS_MANAGER_H_
 #define CC_INPUT_TOP_CONTROLS_MANAGER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/input/top_controls_state.h"
 #include "cc/layers/layer_impl.h"
@@ -33,7 +34,7 @@
     HIDING_CONTROLS
   };
 
-  static scoped_ptr<TopControlsManager> Create(
+  static std::unique_ptr<TopControlsManager> Create(
       TopControlsManagerClient* client,
       float top_controls_show_threshold,
       float top_controls_hide_threshold);
@@ -79,7 +80,7 @@
   TopControlsManagerClient* client_;  // The client manages the lifecycle of
                                       // this.
 
-  scoped_ptr<KeyframedFloatAnimationCurve> top_controls_animation_;
+  std::unique_ptr<KeyframedFloatAnimationCurve> top_controls_animation_;
   AnimationDirection animation_direction_;
   TopControlsState permitted_state_;
 
diff --git a/cc/input/top_controls_manager_unittest.cc b/cc/input/top_controls_manager_unittest.cc
index b2ee9bf..60ea43b9 100644
--- a/cc/input/top_controls_manager_unittest.cc
+++ b/cc/input/top_controls_manager_unittest.cc
@@ -6,9 +6,9 @@
 
 #include <algorithm>
 #include <cmath>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/input/top_controls_manager_client.h"
 #include "cc/layers/layer_impl.h"
@@ -87,9 +87,9 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
   FakeLayerTreeHostImpl host_impl_;
-  scoped_ptr<LayerTreeImpl> active_tree_;
-  scoped_ptr<LayerImpl> root_scroll_layer_;
-  scoped_ptr<TopControlsManager> manager_;
+  std::unique_ptr<LayerTreeImpl> active_tree_;
+  std::unique_ptr<LayerImpl> root_scroll_layer_;
+  std::unique_ptr<TopControlsManager> manager_;
   bool redraw_needed_;
   bool update_draw_properties_needed_;
 
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h
index 2f3ce5d..ce62cd0 100644
--- a/cc/layers/draw_properties.h
+++ b/cc/layers/draw_properties.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/trees/occlusion.h"
 #include "third_party/skia/include/core/SkXfermode.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/cc/layers/empty_content_layer_client.h b/cc/layers/empty_content_layer_client.h
index 2554b8af..0d831b6 100644
--- a/cc/layers/empty_content_layer_client.h
+++ b/cc/layers/empty_content_layer_client.h
@@ -5,9 +5,10 @@
 #ifndef CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_
 #define CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_
 
+#include <memory>
+
 #include "base/lazy_instance.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/content_layer_client.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index 8d581dc..d06d138 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -62,7 +62,7 @@
   return true;
 }
 
-scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_);
 }
diff --git a/cc/layers/heads_up_display_layer.h b/cc/layers/heads_up_display_layer.h
index 5d416c2..60d8f53 100644
--- a/cc/layers/heads_up_display_layer.h
+++ b/cc/layers/heads_up_display_layer.h
@@ -5,10 +5,10 @@
 #ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_
 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 #include "third_party/skia/include/core/SkTypeface.h"
@@ -26,7 +26,7 @@
   void PrepareForCalculateDrawProperties(
       const gfx::Size& device_viewport, float device_scale_factor);
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   void SetTypeForProtoSerialization(proto::LayerNode* proto) const override;
 
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 610be60e..434c931 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -80,7 +80,7 @@
 
 HeadsUpDisplayLayerImpl::~HeadsUpDisplayLayerImpl() {}
 
-scoped_ptr<LayerImpl> HeadsUpDisplayLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> HeadsUpDisplayLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return HeadsUpDisplayLayerImpl::Create(tree_impl, id());
 }
@@ -94,7 +94,7 @@
     }
   }
 
-  scoped_ptr<ScopedResource> resource =
+  std::unique_ptr<ScopedResource> resource =
       ScopedResource::Create(resource_provider);
   resource->Allocate(internal_content_bounds_,
                      ResourceProvider::TEXTURE_HINT_IMMUTABLE,
@@ -106,7 +106,7 @@
     ResourceProvider* resource_provider) {
   auto it_erase =
       std::remove_if(resources_.begin(), resources_.end(),
-                     [this](const scoped_ptr<ScopedResource>& resource) {
+                     [this](const std::unique_ptr<ScopedResource>& resource) {
                        return internal_content_bounds_ != resource->size();
                      });
   resources_.erase(it_erase, resources_.end());
diff --git a/cc/layers/heads_up_display_layer_impl.h b/cc/layers/heads_up_display_layer_impl.h
index b97eb141..ac32edf 100644
--- a/cc/layers/heads_up_display_layer_impl.h
+++ b/cc/layers/heads_up_display_layer_impl.h
@@ -5,11 +5,12 @@
 #ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "cc/debug/debug_rect_history.h"
@@ -29,13 +30,14 @@
 
 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<HeadsUpDisplayLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                                    int id) {
-    return make_scoped_ptr(new HeadsUpDisplayLayerImpl(tree_impl, id));
+  static std::unique_ptr<HeadsUpDisplayLayerImpl> Create(
+      LayerTreeImpl* tree_impl,
+      int id) {
+    return base::WrapUnique(new HeadsUpDisplayLayerImpl(tree_impl, id));
   }
   ~HeadsUpDisplayLayerImpl() override;
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   bool WillDraw(DrawMode draw_mode,
                 ResourceProvider* resource_provider) override;
@@ -129,7 +131,7 @@
   void AcquireResource(ResourceProvider* resource_provider);
   void ReleaseUnmatchedSizeResources(ResourceProvider* resource_provider);
 
-  std::vector<scoped_ptr<ScopedResource>> resources_;
+  std::vector<std::unique_ptr<ScopedResource>> resources_;
   sk_sp<SkSurface> hud_surface_;
 
   skia::RefPtr<SkTypeface> typeface_;
diff --git a/cc/layers/heads_up_display_layer_impl_unittest.cc b/cc/layers/heads_up_display_layer_impl_unittest.cc
index cb69b1b8..9f7649f 100644
--- a/cc/layers/heads_up_display_layer_impl_unittest.cc
+++ b/cc/layers/heads_up_display_layer_impl_unittest.cc
@@ -20,7 +20,7 @@
 void CheckDrawLayer(HeadsUpDisplayLayerImpl* layer,
                     ResourceProvider* resource_provider,
                     DrawMode draw_mode) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   bool will_draw = layer->WillDraw(draw_mode, resource_provider);
   if (will_draw)
@@ -37,13 +37,13 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.CreatePendingTree();
   host_impl.SetVisible(true);
   host_impl.InitializeRenderer(output_surface.get());
-  scoped_ptr<HeadsUpDisplayLayerImpl> layer_ptr =
+  std::unique_ptr<HeadsUpDisplayLayerImpl> layer_ptr =
       HeadsUpDisplayLayerImpl::Create(host_impl.pending_tree(), 1);
   layer_ptr->SetBounds(gfx::Size(100, 100));
 
diff --git a/cc/layers/io_surface_layer.cc b/cc/layers/io_surface_layer.cc
index 0934f1e..eb3f952 100644
--- a/cc/layers/io_surface_layer.cc
+++ b/cc/layers/io_surface_layer.cc
@@ -26,7 +26,7 @@
   SetNeedsCommit();
 }
 
-scoped_ptr<LayerImpl> IOSurfaceLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> IOSurfaceLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return IOSurfaceLayerImpl::Create(tree_impl, layer_id_);
 }
diff --git a/cc/layers/io_surface_layer.h b/cc/layers/io_surface_layer.h
index c0883094..475b315 100644
--- a/cc/layers/io_surface_layer.h
+++ b/cc/layers/io_surface_layer.h
@@ -19,7 +19,7 @@
 
   void SetIOSurfaceProperties(uint32_t io_surface_id, const gfx::Size& size);
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
   bool Update() override;
 
diff --git a/cc/layers/io_surface_layer_impl.cc b/cc/layers/io_surface_layer_impl.cc
index d7c6cda..b97c869 100644
--- a/cc/layers/io_surface_layer_impl.cc
+++ b/cc/layers/io_surface_layer_impl.cc
@@ -31,7 +31,7 @@
   }
 }
 
-scoped_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return IOSurfaceLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/io_surface_layer_impl.h b/cc/layers/io_surface_layer_impl.h
index 29e9973..dc6baf3a 100644
--- a/cc/layers/io_surface_layer_impl.h
+++ b/cc/layers/io_surface_layer_impl.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "ui/gfx/geometry/size.h"
@@ -16,15 +17,15 @@
 
 class CC_EXPORT IOSurfaceLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<IOSurfaceLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                               int id) {
-    return make_scoped_ptr(new IOSurfaceLayerImpl(tree_impl, id));
+  static std::unique_ptr<IOSurfaceLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                    int id) {
+    return base::WrapUnique(new IOSurfaceLayerImpl(tree_impl, id));
   }
   ~IOSurfaceLayerImpl() override;
 
   void SetIOSurfaceProperties(unsigned io_surface_id, const gfx::Size& size);
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer_tree_impl) override;
 
   void AppendQuads(RenderPass* render_pass,
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 9415524..52f0d8a8 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -351,14 +351,14 @@
   return false;
 }
 
-void Layer::RequestCopyOfOutput(
-    scoped_ptr<CopyOutputRequest> request) {
+void Layer::RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> request) {
   DCHECK(IsPropertyChangeAllowed());
   if (void* source = request->source()) {
-    auto it = std::find_if(copy_requests_.begin(), copy_requests_.end(),
-                           [source](const scoped_ptr<CopyOutputRequest>& x) {
-                             return x->source() == source;
-                           });
+    auto it =
+        std::find_if(copy_requests_.begin(), copy_requests_.end(),
+                     [source](const std::unique_ptr<CopyOutputRequest>& x) {
+                       return x->source() == source;
+                     });
     if (it != copy_requests_.end())
       copy_requests_.erase(it);
   }
@@ -1096,15 +1096,16 @@
   SetNeedsCommit();
 }
 
-static void RunCopyCallbackOnMainThread(scoped_ptr<CopyOutputRequest> request,
-                                        scoped_ptr<CopyOutputResult> result) {
+static void RunCopyCallbackOnMainThread(
+    std::unique_ptr<CopyOutputRequest> request,
+    std::unique_ptr<CopyOutputResult> result) {
   request->SendResult(std::move(result));
 }
 
 static void PostCopyCallbackToMainThread(
     scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner,
-    scoped_ptr<CopyOutputRequest> request,
-    scoped_ptr<CopyOutputResult> result) {
+    std::unique_ptr<CopyOutputRequest> request,
+    std::unique_ptr<CopyOutputResult> result) {
   main_thread_task_runner->PostTask(FROM_HERE,
                                     base::Bind(&RunCopyCallbackOnMainThread,
                                                base::Passed(&request),
@@ -1242,13 +1243,13 @@
   {
     TRACE_EVENT0("cc", "Layer::PushPropertiesTo::CopyOutputRequests");
     // Wrap the copy_requests_ in a PostTask to the main thread.
-    std::vector<scoped_ptr<CopyOutputRequest>> main_thread_copy_requests;
+    std::vector<std::unique_ptr<CopyOutputRequest>> main_thread_copy_requests;
     for (auto it = copy_requests_.begin(); it != copy_requests_.end(); ++it) {
       scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner =
           layer_tree_host()->task_runner_provider()->MainThreadTaskRunner();
-      scoped_ptr<CopyOutputRequest> original_request = std::move(*it);
+      std::unique_ptr<CopyOutputRequest> original_request = std::move(*it);
       const CopyOutputRequest& original_request_ref = *original_request;
-      scoped_ptr<CopyOutputRequest> main_thread_request =
+      std::unique_ptr<CopyOutputRequest> main_thread_request =
           CopyOutputRequest::CreateRelayRequest(
               original_request_ref,
               base::Bind(&PostCopyCallbackToMainThread, main_thread_task_runner,
@@ -1574,7 +1575,7 @@
   update_rect_.Union(ProtoToRect(base.update_rect()));
 }
 
-scoped_ptr<LayerImpl> Layer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> Layer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
   return LayerImpl::Create(tree_impl, layer_id_);
 }
 
@@ -1625,7 +1626,8 @@
   return true;
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat> Layer::TakeDebugInfo() {
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+Layer::TakeDebugInfo() {
   if (client_)
     return client_->TakeDebugInfo(this);
   else
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index eb0ba34..af935839e 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -103,7 +103,7 @@
   // first), then the callback is called with a nullptr/empty result. If the
   // request's source property is set, any prior uncommitted requests having the
   // same source will be aborted.
-  void RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> request);
+  void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> request);
   bool HasCopyRequest() const {
     return !copy_requests_.empty();
   }
@@ -350,7 +350,7 @@
   virtual void SetIsMask(bool is_mask) {}
   virtual bool IsSuitableForGpuRasterization() const;
 
-  virtual scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+  virtual std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
   TakeDebugInfo();
 
   void SetLayerClient(LayerClient* client) { client_ = client; }
@@ -409,7 +409,7 @@
   virtual sk_sp<SkPicture> GetPicture() const;
 
   // Constructs a LayerImpl of the correct runtime type for this Layer type.
-  virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
+  virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
 
   bool NeedsDisplayForTesting() const { return !update_rect_.IsEmpty(); }
   void ResetNeedsDisplayForTesting() { update_rect_ = gfx::Rect(); }
@@ -666,10 +666,10 @@
   FilterOperations background_filters_;
   LayerPositionConstraint position_constraint_;
   Layer* scroll_parent_;
-  scoped_ptr<std::set<Layer*>> scroll_children_;
+  std::unique_ptr<std::set<Layer*>> scroll_children_;
 
   Layer* clip_parent_;
-  scoped_ptr<std::set<Layer*>> clip_children_;
+  std::unique_ptr<std::set<Layer*>> clip_children_;
 
   gfx::Transform transform_;
   gfx::Point3F transform_origin_;
@@ -679,7 +679,7 @@
 
   LayerClient* client_;
 
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_requests_;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_;
 
   base::Closure did_scroll_callback_;
 
diff --git a/cc/layers/layer_client.h b/cc/layers/layer_client.h
index fa33f92b..8f9310f2 100644
--- a/cc/layers/layer_client.h
+++ b/cc/layers/layer_client.h
@@ -5,7 +5,8 @@
 #ifndef CC_LAYERS_LAYER_CLIENT_H_
 #define CC_LAYERS_LAYER_CLIENT_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 
 namespace base {
@@ -27,8 +28,8 @@
   //
   // A pointer to the layer is provided for the convenience of layer clients
   // which service multiple layers.
-  virtual scoped_ptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo(
-      Layer* layer) = 0;
+  virtual std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+  TakeDebugInfo(Layer* layer) = 0;
 
  protected:
   virtual ~LayerClient() {}
diff --git a/cc/layers/layer_collections.h b/cc/layers/layer_collections.h
index 68302616..23c6c10 100644
--- a/cc/layers/layer_collections.h
+++ b/cc/layers/layer_collections.h
@@ -5,11 +5,11 @@
 #ifndef CC_LAYERS_LAYER_COLLECTIONS_H_
 #define CC_LAYERS_LAYER_COLLECTIONS_H_
 
+#include <memory>
 #include <unordered_map>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
@@ -17,9 +17,9 @@
 class LayerImpl;
 
 using LayerList = std::vector<scoped_refptr<Layer>>;
-using OwnedLayerImplList = std::vector<scoped_ptr<LayerImpl>>;
+using OwnedLayerImplList = std::vector<std::unique_ptr<LayerImpl>>;
 using LayerImplList = std::vector<LayerImpl*>;
-using OwnedLayerImplMap = std::unordered_map<int, scoped_ptr<LayerImpl>>;
+using OwnedLayerImplMap = std::unordered_map<int, std::unique_ptr<LayerImpl>>;
 using LayerImplMap = std::unordered_map<int, LayerImpl*>;
 
 }  // namespace cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 3c41b183..8f750fb 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -11,6 +11,7 @@
 #include <utility>
 
 #include "base/json/json_reader.h"
+#include "base/memory/ptr_util.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
@@ -123,14 +124,14 @@
   ClearChildList();
 }
 
-void LayerImpl::AddChild(scoped_ptr<LayerImpl> child) {
+void LayerImpl::AddChild(std::unique_ptr<LayerImpl> child) {
   child->SetParent(this);
   DCHECK_EQ(layer_tree_impl(), child->layer_tree_impl());
   children_.push_back(child.get());
   layer_tree_impl_->AddLayer(std::move(child));
 }
 
-scoped_ptr<LayerImpl> LayerImpl::RemoveChildForTesting(LayerImpl* child) {
+std::unique_ptr<LayerImpl> LayerImpl::RemoveChildForTesting(LayerImpl* child) {
   auto it = std::find(children_.begin(), children_.end(), child);
   if (it != children_.end())
     children_.erase(it);
@@ -167,7 +168,7 @@
 }
 
 void LayerImpl::SetDebugInfo(
-    scoped_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) {
+    std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) {
   owned_debug_info_ = std::move(debug_info);
   debug_info_ = owned_debug_info_.get();
   SetNeedsPushProperties();
@@ -249,7 +250,7 @@
 }
 
 void LayerImpl::PassCopyRequests(
-    std::vector<scoped_ptr<CopyOutputRequest>>* requests) {
+    std::vector<std::unique_ptr<CopyOutputRequest>>* requests) {
   // In the case that a layer still has a copy request, this means that there's
   // a commit to the active tree without a draw.  This only happens in some
   // edge cases during lost context or visibility changes, so don't try to
@@ -273,7 +274,7 @@
 }
 
 void LayerImpl::TakeCopyRequestsAndTransformToTarget(
-    std::vector<scoped_ptr<CopyOutputRequest>>* requests) {
+    std::vector<std::unique_ptr<CopyOutputRequest>>* requests) {
   DCHECK(!copy_requests_.empty());
   DCHECK(layer_tree_impl()->IsActiveTree());
   DCHECK_EQ(render_target(), this);
@@ -461,7 +462,8 @@
                                      : user_scrollable_vertical_;
 }
 
-scoped_ptr<LayerImpl> LayerImpl::CreateLayerImpl(LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> LayerImpl::CreateLayerImpl(
+    LayerTreeImpl* tree_impl) {
   return LayerImpl::Create(tree_impl, layer_id_);
 }
 
@@ -651,7 +653,7 @@
     result->SetBoolean("Scrollable", true);
 
   if (!touch_event_handler_region_.IsEmpty()) {
-    scoped_ptr<base::Value> region = touch_event_handler_region_.AsValue();
+    std::unique_ptr<base::Value> region = touch_event_handler_region_.AsValue();
     result->Set("TouchRegion", region.release());
   }
 
@@ -979,7 +981,7 @@
   }
 }
 
-void LayerImpl::SetMaskLayer(scoped_ptr<LayerImpl> mask_layer) {
+void LayerImpl::SetMaskLayer(std::unique_ptr<LayerImpl> mask_layer) {
   int new_layer_id = mask_layer ? mask_layer->id() : -1;
 
   if (mask_layer) {
@@ -998,16 +1000,16 @@
   mask_layer_id_ = new_layer_id;
 }
 
-scoped_ptr<LayerImpl> LayerImpl::TakeMaskLayer() {
+std::unique_ptr<LayerImpl> LayerImpl::TakeMaskLayer() {
   mask_layer_id_ = -1;
-  scoped_ptr<LayerImpl> ret;
+  std::unique_ptr<LayerImpl> ret;
   if (mask_layer_)
     ret = layer_tree_impl_->RemoveLayer(mask_layer_->id());
   mask_layer_ = nullptr;
   return ret;
 }
 
-void LayerImpl::SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer) {
+void LayerImpl::SetReplicaLayer(std::unique_ptr<LayerImpl> replica_layer) {
   int new_layer_id = replica_layer ? replica_layer->id() : -1;
 
   if (replica_layer) {
@@ -1026,9 +1028,9 @@
   replica_layer_id_ = new_layer_id;
 }
 
-scoped_ptr<LayerImpl> LayerImpl::TakeReplicaLayer() {
+std::unique_ptr<LayerImpl> LayerImpl::TakeReplicaLayer() {
   replica_layer_id_ = -1;
-  scoped_ptr<LayerImpl> ret;
+  std::unique_ptr<LayerImpl> ret;
   if (replica_layer_)
     ret = layer_tree_impl_->RemoveLayer(replica_layer_->id());
   replica_layer_ = nullptr;
@@ -1469,7 +1471,7 @@
     std::string str;
     debug_info_->AppendAsTraceFormat(&str);
     base::JSONReader json_reader;
-    scoped_ptr<base::Value> debug_info_value(json_reader.ReadToValue(str));
+    std::unique_ptr<base::Value> debug_info_value(json_reader.ReadToValue(str));
 
     if (debug_info_value->IsType(base::Value::TYPE_DICTIONARY)) {
       base::DictionaryValue* dictionary_value = nullptr;
@@ -1518,7 +1520,7 @@
 
   SetNeedsPushProperties();
   if (should_have_render_surface) {
-    render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this));
+    render_surface_ = base::WrapUnique(new RenderSurfaceImpl(this));
     return;
   }
   render_surface_.reset();
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 40d7336..1e63d8f 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -9,13 +9,14 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "cc/animation/target_property.h"
 #include "cc/base/cc_export.h"
@@ -82,8 +83,8 @@
 
   enum RenderingContextConstants { NO_RENDERING_CONTEXT = 0 };
 
-  static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new LayerImpl(tree_impl, id));
+  static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
+    return base::WrapUnique(new LayerImpl(tree_impl, id));
   }
 
   virtual ~LayerImpl();
@@ -104,8 +105,8 @@
   LayerImpl* parent() { return parent_; }
   LayerImplList& children() { return children_; }
   LayerImpl* child_at(size_t index) const { return children_[index]; }
-  void AddChild(scoped_ptr<LayerImpl> child);
-  scoped_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child);
+  void AddChild(std::unique_ptr<LayerImpl> child);
+  std::unique_ptr<LayerImpl> RemoveChildForTesting(LayerImpl* child);
   void SetParent(LayerImpl* parent);
 
   void SetScrollParent(LayerImpl* parent);
@@ -180,22 +181,23 @@
     return clip_children_.get();
   }
 
-  void PassCopyRequests(std::vector<scoped_ptr<CopyOutputRequest>>* requests);
+  void PassCopyRequests(
+      std::vector<std::unique_ptr<CopyOutputRequest>>* requests);
   // Can only be called when the layer has a copy request.
   void TakeCopyRequestsAndTransformToTarget(
-      std::vector<scoped_ptr<CopyOutputRequest>>* request);
+      std::vector<std::unique_ptr<CopyOutputRequest>>* request);
   bool HasCopyRequest() const { return !copy_requests_.empty(); }
   bool InsideCopyRequest() const;
 
-  void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer);
+  void SetMaskLayer(std::unique_ptr<LayerImpl> mask_layer);
   LayerImpl* mask_layer() { return mask_layer_; }
   const LayerImpl* mask_layer() const { return mask_layer_; }
-  scoped_ptr<LayerImpl> TakeMaskLayer();
+  std::unique_ptr<LayerImpl> TakeMaskLayer();
 
-  void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer);
+  void SetReplicaLayer(std::unique_ptr<LayerImpl> replica_layer);
   LayerImpl* replica_layer() { return replica_layer_; }
   const LayerImpl* replica_layer() const { return replica_layer_; }
-  scoped_ptr<LayerImpl> TakeReplicaLayer();
+  std::unique_ptr<LayerImpl> TakeReplicaLayer();
 
   bool has_mask() const { return !!mask_layer_; }
   bool has_replica() const { return !!replica_layer_; }
@@ -522,7 +524,7 @@
   // ReleaseResources call.
   virtual void RecreateResources();
 
-  virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
+  virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
   virtual void PushPropertiesTo(LayerImpl* layer);
 
   virtual void GetAllPrioritizedTilesForTracing(
@@ -536,7 +538,7 @@
   virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark);
 
   void SetDebugInfo(
-      scoped_ptr<base::trace_event::ConvertableToTraceFormat> debug_info);
+      std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info);
 
   bool IsDrawnRenderSurfaceLayerListMember() const;
 
@@ -642,10 +644,10 @@
   // used. If this pointer turns out to be too heavy, we could have this (and
   // the scroll parent above) be stored in a LayerImpl -> scroll_info
   // map somewhere.
-  scoped_ptr<std::set<LayerImpl*>> scroll_children_;
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children_;
 
   LayerImpl* clip_parent_;
-  scoped_ptr<std::set<LayerImpl*>> clip_children_;
+  std::unique_ptr<std::set<LayerImpl*>> clip_children_;
 
   // mask_layer_ can be temporarily stolen during tree sync, we need this ID to
   // confirm newly assigned layer is still the previous one
@@ -749,16 +751,17 @@
   // space.
   gfx::Rect damage_rect_;
 
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_requests_;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_;
 
   // Group of properties that need to be computed based on the layer tree
   // hierarchy before layers can be drawn.
   DrawProperties draw_properties_;
   PerformanceProperties<LayerImpl> performance_properties_;
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> owned_debug_info_;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+      owned_debug_info_;
   base::trace_event::ConvertableToTraceFormat* debug_info_;
-  scoped_ptr<RenderSurfaceImpl> render_surface_;
+  std::unique_ptr<RenderSurfaceImpl> render_surface_;
 
   bool force_render_surface_;
 
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index 7e8c3275..714093e 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -122,20 +122,20 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
   EXPECT_TRUE(host_impl.InitializeRenderer(output_surface.get()));
-  scoped_ptr<LayerImpl> root_clip_ptr =
+  std::unique_ptr<LayerImpl> root_clip_ptr =
       LayerImpl::Create(host_impl.active_tree(), 1);
   LayerImpl* root_clip = root_clip_ptr.get();
-  scoped_ptr<LayerImpl> root_ptr =
+  std::unique_ptr<LayerImpl> root_ptr =
       LayerImpl::Create(host_impl.active_tree(), 2);
   LayerImpl* root = root_ptr.get();
   root_clip_ptr->AddChild(std::move(root_ptr));
   host_impl.active_tree()->SetRootLayer(std::move(root_clip_ptr));
-  scoped_ptr<LayerImpl> scroll_parent =
+  std::unique_ptr<LayerImpl> scroll_parent =
       LayerImpl::Create(host_impl.active_tree(), 3);
   LayerImpl* scroll_child = LayerImpl::Create(host_impl.active_tree(), 4).get();
   std::set<LayerImpl*>* scroll_children = new std::set<LayerImpl*>();
@@ -143,7 +143,7 @@
   scroll_children->insert(root);
   root->SetForceRenderSurface(true);
 
-  scoped_ptr<LayerImpl> clip_parent =
+  std::unique_ptr<LayerImpl> clip_parent =
       LayerImpl::Create(host_impl.active_tree(), 5);
   LayerImpl* clip_child = LayerImpl::Create(host_impl.active_tree(), 6).get();
   std::set<LayerImpl*>* clip_children = new std::set<LayerImpl*>();
@@ -278,7 +278,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
@@ -287,12 +287,12 @@
       LayerImpl::Create(host_impl.active_tree(), 1));
   LayerImpl* root = host_impl.active_tree()->root_layer();
   root->SetHasRenderSurface(true);
-  scoped_ptr<LayerImpl> layer_ptr =
+  std::unique_ptr<LayerImpl> layer_ptr =
       LayerImpl::Create(host_impl.active_tree(), 2);
   LayerImpl* layer = layer_ptr.get();
   root->AddChild(std::move(layer_ptr));
   layer->SetScrollClipLayer(root->id());
-  scoped_ptr<LayerImpl> layer2_ptr =
+  std::unique_ptr<LayerImpl> layer2_ptr =
       LayerImpl::Create(host_impl.active_tree(), 3);
   LayerImpl* layer2 = layer2_ptr.get();
   root->AddChild(std::move(layer2_ptr));
@@ -426,7 +426,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
@@ -468,7 +468,8 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<LayerImpl> layer = LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> layer =
+      LayerImpl::Create(host_impl.active_tree(), 1);
   EXPECT_TRUE(layer->transform().IsInvertible());
   EXPECT_TRUE(layer->transform_is_invertible());
 
@@ -658,7 +659,7 @@
 
   scroll_tree(layer())->CollectScrollDeltasForTesting();
 
-  scoped_ptr<LayerImpl> pending_layer =
+  std::unique_ptr<LayerImpl> pending_layer =
       LayerImpl::Create(host_impl().sync_tree(), layer()->id());
   scroll_tree(pending_layer.get())
       ->UpdateScrollOffsetBaseForTesting(pending_layer->id(),
diff --git a/cc/layers/layer_iterator_unittest.cc b/cc/layers/layer_iterator_unittest.cc
index 158dd935..4667877 100644
--- a/cc/layers/layer_iterator_unittest.cc
+++ b/cc/layers/layer_iterator_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "cc/layers/layer.h"
 #include "cc/test/fake_layer_tree_host.h"
 #include "cc/test/test_task_graph_runner.h"
@@ -24,8 +25,8 @@
 
 class TestLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<TestLayerImpl> Create(LayerTreeImpl* tree, int id) {
-    return make_scoped_ptr(new TestLayerImpl(tree, id));
+  static std::unique_ptr<TestLayerImpl> Create(LayerTreeImpl* tree, int id) {
+    return base::WrapUnique(new TestLayerImpl(tree, id));
   }
   ~TestLayerImpl() override {}
 
@@ -98,7 +99,7 @@
                    &task_graph_runner_),
         id_(1) {}
 
-  scoped_ptr<TestLayerImpl> CreateLayer() {
+  std::unique_ptr<TestLayerImpl> CreateLayer() {
     return TestLayerImpl::Create(host_impl_.active_tree(), id_++);
   }
 
@@ -118,11 +119,11 @@
 }
 
 TEST_F(LayerIteratorTest, SimpleTree) {
-  scoped_ptr<TestLayerImpl> root_layer = CreateLayer();
-  scoped_ptr<TestLayerImpl> first = CreateLayer();
-  scoped_ptr<TestLayerImpl> second = CreateLayer();
-  scoped_ptr<TestLayerImpl> third = CreateLayer();
-  scoped_ptr<TestLayerImpl> fourth = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root_layer = CreateLayer();
+  std::unique_ptr<TestLayerImpl> first = CreateLayer();
+  std::unique_ptr<TestLayerImpl> second = CreateLayer();
+  std::unique_ptr<TestLayerImpl> third = CreateLayer();
+  std::unique_ptr<TestLayerImpl> fourth = CreateLayer();
 
   TestLayerImpl* root_ptr = root_layer.get();
   TestLayerImpl* first_ptr = first.get();
@@ -153,15 +154,15 @@
 }
 
 TEST_F(LayerIteratorTest, ComplexTree) {
-  scoped_ptr<TestLayerImpl> root_layer = CreateLayer();
-  scoped_ptr<TestLayerImpl> root1 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root2 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root3 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root21 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root22 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root23 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root221 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root231 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root_layer = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root1 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root2 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root3 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root21 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root22 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root23 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root221 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root231 = CreateLayer();
 
   TestLayerImpl* root_ptr = root_layer.get();
   TestLayerImpl* root1_ptr = root1.get();
@@ -204,15 +205,15 @@
 }
 
 TEST_F(LayerIteratorTest, ComplexTreeMultiSurface) {
-  scoped_ptr<TestLayerImpl> root_layer = CreateLayer();
-  scoped_ptr<TestLayerImpl> root1 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root2 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root3 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root21 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root22 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root23 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root221 = CreateLayer();
-  scoped_ptr<TestLayerImpl> root231 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root_layer = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root1 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root2 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root3 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root21 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root22 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root23 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root221 = CreateLayer();
+  std::unique_ptr<TestLayerImpl> root231 = CreateLayer();
 
   TestLayerImpl* root_ptr = root_layer.get();
   TestLayerImpl* root1_ptr = root1.get();
diff --git a/cc/layers/layer_list_iterator_unittest.cc b/cc/layers/layer_list_iterator_unittest.cc
index 97b2cd5..d098509 100644
--- a/cc/layers/layer_list_iterator_unittest.cc
+++ b/cc/layers/layer_list_iterator_unittest.cc
@@ -4,8 +4,9 @@
 
 #include "cc/layers/layer_list_iterator.h"
 
+#include <memory>
+
 #include "base/containers/adapters.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/test/fake_impl_task_runner_provider.h"
 #include "cc/test/fake_layer_tree_host_impl.h"
 #include "cc/test/fake_output_surface.h"
@@ -22,7 +23,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
@@ -37,13 +38,20 @@
   //   +-6
   //   +-7
   // We expect to visit all seven layers in that order.
-  scoped_ptr<LayerImpl> layer1 = LayerImpl::Create(host_impl.active_tree(), 1);
-  scoped_ptr<LayerImpl> layer2 = LayerImpl::Create(host_impl.active_tree(), 2);
-  scoped_ptr<LayerImpl> layer3 = LayerImpl::Create(host_impl.active_tree(), 3);
-  scoped_ptr<LayerImpl> layer4 = LayerImpl::Create(host_impl.active_tree(), 4);
-  scoped_ptr<LayerImpl> layer5 = LayerImpl::Create(host_impl.active_tree(), 5);
-  scoped_ptr<LayerImpl> layer6 = LayerImpl::Create(host_impl.active_tree(), 6);
-  scoped_ptr<LayerImpl> layer7 = LayerImpl::Create(host_impl.active_tree(), 7);
+  std::unique_ptr<LayerImpl> layer1 =
+      LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> layer2 =
+      LayerImpl::Create(host_impl.active_tree(), 2);
+  std::unique_ptr<LayerImpl> layer3 =
+      LayerImpl::Create(host_impl.active_tree(), 3);
+  std::unique_ptr<LayerImpl> layer4 =
+      LayerImpl::Create(host_impl.active_tree(), 4);
+  std::unique_ptr<LayerImpl> layer5 =
+      LayerImpl::Create(host_impl.active_tree(), 5);
+  std::unique_ptr<LayerImpl> layer6 =
+      LayerImpl::Create(host_impl.active_tree(), 6);
+  std::unique_ptr<LayerImpl> layer7 =
+      LayerImpl::Create(host_impl.active_tree(), 7);
 
   layer2->AddChild(std::move(layer3));
   layer2->AddChild(std::move(layer4));
@@ -68,14 +76,15 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
   EXPECT_TRUE(host_impl.InitializeRenderer(output_surface.get()));
 
   // This test constructs a tree consisting of a single layer.
-  scoped_ptr<LayerImpl> layer1 = LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> layer1 =
+      LayerImpl::Create(host_impl.active_tree(), 1);
   host_impl.active_tree()->SetRootLayer(std::move(layer1));
 
   int i = 1;
@@ -102,7 +111,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
@@ -117,13 +126,20 @@
   //   +-6
   //   +-7
   // We expect to visit all seven layers in reverse order.
-  scoped_ptr<LayerImpl> layer1 = LayerImpl::Create(host_impl.active_tree(), 1);
-  scoped_ptr<LayerImpl> layer2 = LayerImpl::Create(host_impl.active_tree(), 2);
-  scoped_ptr<LayerImpl> layer3 = LayerImpl::Create(host_impl.active_tree(), 3);
-  scoped_ptr<LayerImpl> layer4 = LayerImpl::Create(host_impl.active_tree(), 4);
-  scoped_ptr<LayerImpl> layer5 = LayerImpl::Create(host_impl.active_tree(), 5);
-  scoped_ptr<LayerImpl> layer6 = LayerImpl::Create(host_impl.active_tree(), 6);
-  scoped_ptr<LayerImpl> layer7 = LayerImpl::Create(host_impl.active_tree(), 7);
+  std::unique_ptr<LayerImpl> layer1 =
+      LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> layer2 =
+      LayerImpl::Create(host_impl.active_tree(), 2);
+  std::unique_ptr<LayerImpl> layer3 =
+      LayerImpl::Create(host_impl.active_tree(), 3);
+  std::unique_ptr<LayerImpl> layer4 =
+      LayerImpl::Create(host_impl.active_tree(), 4);
+  std::unique_ptr<LayerImpl> layer5 =
+      LayerImpl::Create(host_impl.active_tree(), 5);
+  std::unique_ptr<LayerImpl> layer6 =
+      LayerImpl::Create(host_impl.active_tree(), 6);
+  std::unique_ptr<LayerImpl> layer7 =
+      LayerImpl::Create(host_impl.active_tree(), 7);
 
   layer2->AddChild(std::move(layer3));
   layer2->AddChild(std::move(layer4));
@@ -150,14 +166,15 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.SetVisible(true);
   EXPECT_TRUE(host_impl.InitializeRenderer(output_surface.get()));
 
   // This test constructs a tree consisting of a single layer.
-  scoped_ptr<LayerImpl> layer1 = LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> layer1 =
+      LayerImpl::Create(host_impl.active_tree(), 1);
   host_impl.active_tree()->SetRootLayer(std::move(layer1));
 
   int i = 1;
diff --git a/cc/layers/layer_perftest.cc b/cc/layers/layer_perftest.cc
index d3c1191..237d7cf 100644
--- a/cc/layers/layer_perftest.cc
+++ b/cc/layers/layer_perftest.cc
@@ -51,13 +51,13 @@
   FakeLayerTreeHostImpl host_impl_;
 
   FakeLayerTreeHostClient fake_client_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
   LapTimer timer_;
 };
 
 TEST_F(LayerPerfTest, PushPropertiesTo) {
   scoped_refptr<Layer> test_layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
 
   layer_tree_host_->SetRootLayer(test_layer);
diff --git a/cc/layers/layer_position_constraint_unittest.cc b/cc/layers/layer_position_constraint_unittest.cc
index d64cf4f..9c060ea 100644
--- a/cc/layers/layer_position_constraint_unittest.cc
+++ b/cc/layers/layer_position_constraint_unittest.cc
@@ -75,7 +75,7 @@
         great_grand_child_impl_(nullptr) {
     layer_tree_host_->InitializeForTesting(
         TaskRunnerProvider::Create(nullptr, nullptr),
-        scoped_ptr<Proxy>(new FakeProxy), nullptr);
+        std::unique_ptr<Proxy>(new FakeProxy), nullptr);
     CreateTreeForTest();
     fixed_to_top_left_.set_is_fixed_position(true);
     fixed_to_bottom_right_.set_is_fixed_position(true);
@@ -168,7 +168,7 @@
  protected:
   FakeLayerTreeHostClient fake_client_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
   scoped_refptr<Layer> root_;
   scoped_refptr<Layer> inner_viewport_container_layer_;
   scoped_refptr<Layer> scroll_layer_;
diff --git a/cc/layers/layer_proto_converter_unittest.cc b/cc/layers/layer_proto_converter_unittest.cc
index 33d12aca..49da6c8 100644
--- a/cc/layers/layer_proto_converter_unittest.cc
+++ b/cc/layers/layer_proto_converter_unittest.cc
@@ -35,7 +35,7 @@
 
   TestTaskGraphRunner task_graph_runner_;
   FakeLayerTreeHostClient fake_client_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 };
 
 TEST_F(LayerProtoConverterTest, TestKeepingRoot) {
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 752757b4..089d25d 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -816,7 +816,7 @@
 
   TestTaskGraphRunner task_graph_runner_;
   FakeLayerTreeHostClient fake_client_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 };
 
 namespace {
@@ -929,7 +929,7 @@
   FakeLayerTreeHostImpl host_impl_;
 
   FakeLayerTreeHostClient fake_client_;
-  scoped_ptr<StrictMock<MockLayerTreeHost>> layer_tree_host_;
+  std::unique_ptr<StrictMock<MockLayerTreeHost>> layer_tree_host_;
   scoped_refptr<Layer> parent_;
   scoped_refptr<Layer> child1_;
   scoped_refptr<Layer> child2_;
@@ -973,17 +973,17 @@
   EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1));
   child2->SetScrollParent(grand_child.get());
   SkXfermode::Mode arbitrary_blend_mode = SkXfermode::kMultiply_Mode;
-  scoped_ptr<LayerImpl> root_impl =
+  std::unique_ptr<LayerImpl> root_impl =
       LayerImpl::Create(host_impl_.active_tree(), root->id());
-  scoped_ptr<LayerImpl> child_impl =
+  std::unique_ptr<LayerImpl> child_impl =
       LayerImpl::Create(host_impl_.active_tree(), child->id());
-  scoped_ptr<LayerImpl> child2_impl =
+  std::unique_ptr<LayerImpl> child2_impl =
       LayerImpl::Create(host_impl_.active_tree(), child2->id());
-  scoped_ptr<LayerImpl> grand_child_impl =
+  std::unique_ptr<LayerImpl> grand_child_impl =
       LayerImpl::Create(host_impl_.active_tree(), grand_child->id());
-  scoped_ptr<LayerImpl> dummy_layer1_impl =
+  std::unique_ptr<LayerImpl> dummy_layer1_impl =
       LayerImpl::Create(host_impl_.active_tree(), dummy_layer1->id());
-  scoped_ptr<LayerImpl> dummy_layer2_impl =
+  std::unique_ptr<LayerImpl> dummy_layer2_impl =
       LayerImpl::Create(host_impl_.active_tree(), dummy_layer2->id());
 
   EXPECT_CALL(*layer_tree_host_, SetNeedsFullTreeSync()).Times(1);
@@ -1680,7 +1680,7 @@
 
 TEST_F(LayerTest, PushPropertiesAccumulatesUpdateRect) {
   scoped_refptr<Layer> test_layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
 
   EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
@@ -1712,7 +1712,7 @@
 
 TEST_F(LayerTest, PushPropertiesCausesLayerPropertyChangedForTransform) {
   scoped_refptr<Layer> test_layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
 
   EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
@@ -1731,7 +1731,7 @@
 
 TEST_F(LayerTest, PushPropertiesCausesLayerPropertyChangedForOpacity) {
   scoped_refptr<Layer> test_layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
 
   EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
@@ -1783,7 +1783,7 @@
 
 TEST_F(LayerTest, CheckTransformIsInvertible) {
   scoped_refptr<Layer> layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
   EXPECT_CALL(*layer_tree_host_, SetNeedsFullTreeSync()).Times(1);
   EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
@@ -1814,7 +1814,7 @@
 
 TEST_F(LayerTest, TransformIsInvertibleAnimation) {
   scoped_refptr<Layer> layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
   EXPECT_CALL(*layer_tree_host_, SetNeedsFullTreeSync()).Times(1);
   EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
@@ -1848,9 +1848,11 @@
  public:
   LayerTreeHostFactory() : client_(FakeLayerTreeHostClient::DIRECT_3D) {}
 
-  scoped_ptr<LayerTreeHost> Create() { return Create(LayerTreeSettings()); }
+  std::unique_ptr<LayerTreeHost> Create() {
+    return Create(LayerTreeSettings());
+  }
 
-  scoped_ptr<LayerTreeHost> Create(LayerTreeSettings settings) {
+  std::unique_ptr<LayerTreeHost> Create(LayerTreeSettings settings) {
     LayerTreeHost::InitParams params;
     params.client = &client_;
     params.shared_bitmap_manager = &shared_bitmap_manager_;
@@ -1900,7 +1902,7 @@
   AssertLayerTreeHostMatchesForSubtree(parent.get(), nullptr);
 
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> layer_tree_host = factory.Create();
   // Setting the root layer should set the host pointer for all layers in the
   // tree.
   layer_tree_host->SetRootLayer(parent.get());
@@ -1917,7 +1919,7 @@
 TEST_F(LayerLayerTreeHostTest, AddingLayerSubtree) {
   scoped_refptr<Layer> parent = Layer::Create();
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> layer_tree_host = factory.Create();
 
   layer_tree_host->SetRootLayer(parent.get());
 
@@ -1957,7 +1959,7 @@
   replica->SetMaskLayer(replica_mask.get());
 
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> first_layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> first_layer_tree_host = factory.Create();
   first_layer_tree_host->SetRootLayer(parent.get());
 
   AssertLayerTreeHostMatchesForSubtree(parent.get(),
@@ -1965,7 +1967,7 @@
 
   // Now re-root the tree to a new host (simulating what we do on a context lost
   // event). This should update the host pointers for all layers in the tree.
-  scoped_ptr<LayerTreeHost> second_layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> second_layer_tree_host = factory.Create();
   second_layer_tree_host->SetRootLayer(parent.get());
 
   AssertLayerTreeHostMatchesForSubtree(parent.get(),
@@ -1987,7 +1989,7 @@
   first_parent->AddChild(second_child);
 
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> first_layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> first_layer_tree_host = factory.Create();
   first_layer_tree_host->SetRootLayer(first_parent.get());
 
   AssertLayerTreeHostMatchesForSubtree(first_parent.get(),
@@ -1995,7 +1997,7 @@
 
   // Now reparent the subtree starting at second_child to a layer in a different
   // tree.
-  scoped_ptr<LayerTreeHost> second_layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> second_layer_tree_host = factory.Create();
   second_layer_tree_host->SetRootLayer(second_parent.get());
 
   second_parent->AddChild(second_child);
@@ -2025,7 +2027,7 @@
   replica->AddChild(replica_child);
 
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> layer_tree_host = factory.Create();
   layer_tree_host->SetRootLayer(parent.get());
 
   AssertLayerTreeHostMatchesForSubtree(parent.get(), layer_tree_host.get());
@@ -2049,13 +2051,13 @@
   scoped_refptr<Layer> child = Layer::Create();
   root->AddChild(child);
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> layer_tree_host = factory.Create();
   layer_tree_host->SetRootLayer(root);
 }
 
 TEST_F(LayerTest, SafeOpaqueBackgroundColor) {
   LayerTreeHostFactory factory;
-  scoped_ptr<LayerTreeHost> layer_tree_host = factory.Create();
+  std::unique_ptr<LayerTreeHost> layer_tree_host = factory.Create();
 
   scoped_refptr<Layer> layer = Layer::Create();
   layer_tree_host->SetRootLayer(layer);
@@ -2132,7 +2134,7 @@
 }
 
 void ReceiveCopyOutputResult(int* result_count,
-                             scoped_ptr<CopyOutputResult> result) {
+                             std::unique_ptr<CopyOutputResult> result) {
   ++(*result_count);
 }
 
@@ -2142,7 +2144,7 @@
 
   // Create identical requests without the source being set, and expect the
   // layer does not abort either one.
-  scoped_ptr<CopyOutputRequest> request = CopyOutputRequest::CreateRequest(
+  std::unique_ptr<CopyOutputRequest> request = CopyOutputRequest::CreateRequest(
       base::Bind(&ReceiveCopyOutputResult, &result_count));
   layer->RequestCopyOfOutput(std::move(request));
   EXPECT_EQ(0, result_count);
@@ -2495,7 +2497,7 @@
 
 TEST_F(LayerTest, ElementIdAndMutablePropertiesArePushed) {
   scoped_refptr<Layer> test_layer = Layer::Create();
-  scoped_ptr<LayerImpl> impl_layer =
+  std::unique_ptr<LayerImpl> impl_layer =
       LayerImpl::Create(host_impl_.active_tree(), 1);
 
   EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
diff --git a/cc/layers/layer_utils_unittest.cc b/cc/layers/layer_utils_unittest.cc
index 771d5bd..a6c39a6 100644
--- a/cc/layers/layer_utils_unittest.cc
+++ b/cc/layers/layer_utils_unittest.cc
@@ -56,7 +56,8 @@
 
  private:
   static LayerImpl* CreateTwoForkTree(LayerTreeHostImpl* host_impl) {
-    scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl->active_tree(), 1);
+    std::unique_ptr<LayerImpl> root =
+        LayerImpl::Create(host_impl->active_tree(), 1);
     LayerImpl* root_ptr = root.get();
     root->AddChild(LayerImpl::Create(host_impl->active_tree(), 2));
     root->children()[0]->AddChild(
diff --git a/cc/layers/nine_patch_layer.cc b/cc/layers/nine_patch_layer.cc
index e2dc92f..b68891c 100644
--- a/cc/layers/nine_patch_layer.cc
+++ b/cc/layers/nine_patch_layer.cc
@@ -21,7 +21,7 @@
 
 NinePatchLayer::~NinePatchLayer() {}
 
-scoped_ptr<LayerImpl> NinePatchLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> NinePatchLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return NinePatchLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/nine_patch_layer.h b/cc/layers/nine_patch_layer.h
index 20b5e49..1c2d725 100644
--- a/cc/layers/nine_patch_layer.h
+++ b/cc/layers/nine_patch_layer.h
@@ -5,8 +5,9 @@
 #ifndef CC_LAYERS_NINE_PATCH_LAYER_H_
 #define CC_LAYERS_NINE_PATCH_LAYER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 #include "cc/layers/ui_resource_layer.h"
@@ -44,7 +45,7 @@
  private:
   NinePatchLayer();
   ~NinePatchLayer() override;
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   gfx::Rect border_;
   bool fill_center_;
diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc
index 933bf60..039adb37 100644
--- a/cc/layers/nine_patch_layer_impl.cc
+++ b/cc/layers/nine_patch_layer_impl.cc
@@ -21,7 +21,7 @@
 
 NinePatchLayerImpl::~NinePatchLayerImpl() {}
 
-scoped_ptr<LayerImpl> NinePatchLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> NinePatchLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return NinePatchLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/nine_patch_layer_impl.h b/cc/layers/nine_patch_layer_impl.h
index 539d8e71..1fe8e7f2 100644
--- a/cc/layers/nine_patch_layer_impl.h
+++ b/cc/layers/nine_patch_layer_impl.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/ui_resource_layer_impl.h"
@@ -24,9 +25,9 @@
 
 class CC_EXPORT NinePatchLayerImpl : public UIResourceLayerImpl {
  public:
-  static scoped_ptr<NinePatchLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                               int id) {
-    return make_scoped_ptr(new NinePatchLayerImpl(tree_impl, id));
+  static std::unique_ptr<NinePatchLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                    int id) {
+    return base::WrapUnique(new NinePatchLayerImpl(tree_impl, id));
   }
   ~NinePatchLayerImpl() override;
 
@@ -59,7 +60,7 @@
                  bool fill_center,
                  bool nearest_neighbor);
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
 
   void AppendQuads(RenderPass* render_pass,
diff --git a/cc/layers/nine_patch_layer_impl_unittest.cc b/cc/layers/nine_patch_layer_impl_unittest.cc
index 2dbc6832..cc456cfe 100644
--- a/cc/layers/nine_patch_layer_impl_unittest.cc
+++ b/cc/layers/nine_patch_layer_impl_unittest.cc
@@ -37,7 +37,7 @@
                               const gfx::Rect& border,
                               bool fill_center,
                               size_t expected_quad_size) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   gfx::Rect visible_layer_rect(layer_size);
   gfx::Rect expected_remaining(border.x(),
                                border.y(),
@@ -47,13 +47,13 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeUIResourceLayerTreeHostImpl host_impl(
       &task_runner_provider, &shared_bitmap_manager, &task_graph_runner);
   host_impl.SetVisible(true);
   host_impl.InitializeRenderer(output_surface.get());
 
-  scoped_ptr<NinePatchLayerImpl> layer =
+  std::unique_ptr<NinePatchLayerImpl> layer =
       NinePatchLayerImpl::Create(host_impl.active_tree(), 1);
   layer->draw_properties().visible_layer_rect = visible_layer_rect;
   layer->SetBounds(layer_size);
diff --git a/cc/layers/nine_patch_layer_unittest.cc b/cc/layers/nine_patch_layer_unittest.cc
index 381c024..5cc14e2 100644
--- a/cc/layers/nine_patch_layer_unittest.cc
+++ b/cc/layers/nine_patch_layer_unittest.cc
@@ -42,7 +42,7 @@
 
   FakeLayerTreeHostClient fake_client_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 };
 
 TEST_F(NinePatchLayerTest, SetLayerProperties) {
@@ -62,7 +62,7 @@
   EXPECT_FALSE(test_layer->DrawsContent());
 
   bool is_opaque = false;
-  scoped_ptr<ScopedUIResource> resource = ScopedUIResource::Create(
+  std::unique_ptr<ScopedUIResource> resource = ScopedUIResource::Create(
       layer_tree_host_.get(), UIResourceBitmap(gfx::Size(10, 10), is_opaque));
   gfx::Rect aperture(5, 5, 1, 1);
   bool fill_center = true;
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc
index b9476665..4f4b84d7 100644
--- a/cc/layers/painted_scrollbar_layer.cc
+++ b/cc/layers/painted_scrollbar_layer.cc
@@ -24,21 +24,22 @@
 
 namespace cc {
 
-scoped_ptr<LayerImpl> PaintedScrollbarLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> PaintedScrollbarLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return PaintedScrollbarLayerImpl::Create(
       tree_impl, id(), scrollbar_->Orientation());
 }
 
 scoped_refptr<PaintedScrollbarLayer> PaintedScrollbarLayer::Create(
-    scoped_ptr<Scrollbar> scrollbar,
+    std::unique_ptr<Scrollbar> scrollbar,
     int scroll_layer_id) {
   return make_scoped_refptr(
       new PaintedScrollbarLayer(std::move(scrollbar), scroll_layer_id));
 }
 
-PaintedScrollbarLayer::PaintedScrollbarLayer(scoped_ptr<Scrollbar> scrollbar,
-                                             int scroll_layer_id)
+PaintedScrollbarLayer::PaintedScrollbarLayer(
+    std::unique_ptr<Scrollbar> scrollbar,
+    int scroll_layer_id)
     : scrollbar_(std::move(scrollbar)),
       scroll_layer_id_(scroll_layer_id),
       internal_contents_scale_(1.f),
diff --git a/cc/layers/painted_scrollbar_layer.h b/cc/layers/painted_scrollbar_layer.h
index 1d452bcc..c3dacb12 100644
--- a/cc/layers/painted_scrollbar_layer.h
+++ b/cc/layers/painted_scrollbar_layer.h
@@ -19,10 +19,10 @@
 class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface,
                                         public Layer {
  public:
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   static scoped_refptr<PaintedScrollbarLayer> Create(
-      scoped_ptr<Scrollbar> scrollbar,
+      std::unique_ptr<Scrollbar> scrollbar,
       int scroll_layer_id);
 
   bool OpacityCanAnimateOnImplThread() const override;
@@ -44,7 +44,8 @@
   }
 
  protected:
-  PaintedScrollbarLayer(scoped_ptr<Scrollbar> scrollbar, int scroll_layer_id);
+  PaintedScrollbarLayer(std::unique_ptr<Scrollbar> scrollbar,
+                        int scroll_layer_id);
   ~PaintedScrollbarLayer() override;
 
   // For unit tests
@@ -77,7 +78,7 @@
                                           const gfx::Rect& content_rect,
                                           ScrollbarPart part);
 
-  scoped_ptr<Scrollbar> scrollbar_;
+  std::unique_ptr<Scrollbar> scrollbar_;
   int scroll_layer_id_;
 
   float internal_contents_scale_;
@@ -92,8 +93,8 @@
   bool is_overlay_;
   bool has_thumb_;
 
-  scoped_ptr<ScopedUIResource> track_resource_;
-  scoped_ptr<ScopedUIResource> thumb_resource_;
+  std::unique_ptr<ScopedUIResource> track_resource_;
+  std::unique_ptr<ScopedUIResource> thumb_resource_;
 
   float thumb_opacity_;
 
diff --git a/cc/layers/painted_scrollbar_layer_impl.cc b/cc/layers/painted_scrollbar_layer_impl.cc
index eb44f0df..72027ed 100644
--- a/cc/layers/painted_scrollbar_layer_impl.cc
+++ b/cc/layers/painted_scrollbar_layer_impl.cc
@@ -6,6 +6,7 @@
 
 #include <algorithm>
 
+#include "base/memory/ptr_util.h"
 #include "cc/input/scrollbar_animation_controller.h"
 #include "cc/layers/layer.h"
 #include "cc/quads/solid_color_draw_quad.h"
@@ -17,11 +18,11 @@
 
 namespace cc {
 
-scoped_ptr<PaintedScrollbarLayerImpl> PaintedScrollbarLayerImpl::Create(
+std::unique_ptr<PaintedScrollbarLayerImpl> PaintedScrollbarLayerImpl::Create(
     LayerTreeImpl* tree_impl,
     int id,
     ScrollbarOrientation orientation) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new PaintedScrollbarLayerImpl(tree_impl, id, orientation));
 }
 
@@ -41,7 +42,7 @@
 
 PaintedScrollbarLayerImpl::~PaintedScrollbarLayerImpl() {}
 
-scoped_ptr<LayerImpl> PaintedScrollbarLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> PaintedScrollbarLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return PaintedScrollbarLayerImpl::Create(tree_impl, id(), orientation());
 }
diff --git a/cc/layers/painted_scrollbar_layer_impl.h b/cc/layers/painted_scrollbar_layer_impl.h
index 8ea06ab5..10c6ba6 100644
--- a/cc/layers/painted_scrollbar_layer_impl.h
+++ b/cc/layers/painted_scrollbar_layer_impl.h
@@ -18,14 +18,12 @@
 
 class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase {
  public:
-  static scoped_ptr<PaintedScrollbarLayerImpl> Create(
-      LayerTreeImpl* tree_impl,
-      int id,
-      ScrollbarOrientation orientation);
+  static std::unique_ptr<PaintedScrollbarLayerImpl>
+  Create(LayerTreeImpl* tree_impl, int id, ScrollbarOrientation orientation);
   ~PaintedScrollbarLayerImpl() override;
 
   // LayerImpl implementation.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
 
   bool WillDraw(DrawMode draw_mode,
diff --git a/cc/layers/painted_scrollbar_layer_unittest.cc b/cc/layers/painted_scrollbar_layer_unittest.cc
index f5b49b9..cb969e5 100644
--- a/cc/layers/painted_scrollbar_layer_unittest.cc
+++ b/cc/layers/painted_scrollbar_layer_unittest.cc
@@ -29,7 +29,7 @@
 TEST(PaintedScrollbarLayerTest, NeedsPaint) {
   FakeLayerTreeHostClient fake_client_(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 
   layer_tree_host_ =
       FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
@@ -39,7 +39,7 @@
 
   MockScrollbar* scrollbar = new MockScrollbar();
   scoped_refptr<PaintedScrollbarLayer> scrollbar_layer =
-      PaintedScrollbarLayer::Create(scoped_ptr<Scrollbar>(scrollbar), 1);
+      PaintedScrollbarLayer::Create(std::unique_ptr<Scrollbar>(scrollbar), 1);
 
   scrollbar_layer->SetIsDrawable(true);
   scrollbar_layer->SetBounds(gfx::Size(100, 100));
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index 64d71a53..a3937fd 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -27,7 +27,7 @@
   ClearClient();
 }
 
-scoped_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return PictureImageLayerImpl::Create(tree_impl, id(), is_mask());
 }
diff --git a/cc/layers/picture_image_layer.h b/cc/layers/picture_image_layer.h
index 88dd2c9..0ba03e9 100644
--- a/cc/layers/picture_image_layer.h
+++ b/cc/layers/picture_image_layer.h
@@ -25,7 +25,7 @@
   void SetImage(skia::RefPtr<const SkImage> image);
 
   // Layer implementation.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   gfx::Rect PaintableRegion() override;
 
diff --git a/cc/layers/picture_image_layer_impl.cc b/cc/layers/picture_image_layer_impl.cc
index c816986d..eeae33c3 100644
--- a/cc/layers/picture_image_layer_impl.cc
+++ b/cc/layers/picture_image_layer_impl.cc
@@ -23,7 +23,7 @@
   return "cc::PictureImageLayerImpl";
 }
 
-scoped_ptr<LayerImpl> PictureImageLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> PictureImageLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return PictureImageLayerImpl::Create(tree_impl, id(), is_mask_);
 }
diff --git a/cc/layers/picture_image_layer_impl.h b/cc/layers/picture_image_layer_impl.h
index 759606a..723990599 100644
--- a/cc/layers/picture_image_layer_impl.h
+++ b/cc/layers/picture_image_layer_impl.h
@@ -6,22 +6,23 @@
 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/layers/picture_layer_impl.h"
 
 namespace cc {
 
 class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl {
  public:
-  static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                                  int id,
-                                                  bool is_mask) {
-    return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id, is_mask));
+  static std::unique_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                       int id,
+                                                       bool is_mask) {
+    return base::WrapUnique(new PictureImageLayerImpl(tree_impl, id, is_mask));
   }
   ~PictureImageLayerImpl() override;
 
   // LayerImpl overrides.
   const char* LayerTypeAsString() const override;
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
  protected:
   PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask);
diff --git a/cc/layers/picture_image_layer_impl_unittest.cc b/cc/layers/picture_image_layer_impl_unittest.cc
index 63dd21b..8564d1c 100644
--- a/cc/layers/picture_image_layer_impl_unittest.cc
+++ b/cc/layers/picture_image_layer_impl_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "cc/layers/picture_image_layer_impl.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/layers/append_quads_data.h"
 #include "cc/quads/draw_quad.h"
@@ -25,8 +26,9 @@
   TestablePictureImageLayerImpl(LayerTreeImpl* tree_impl, int id)
       : PictureImageLayerImpl(tree_impl, id, false) {}
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
-    return make_scoped_ptr(new TestablePictureImageLayerImpl(tree_impl, id()));
+  std::unique_ptr<LayerImpl> CreateLayerImpl(
+      LayerTreeImpl* tree_impl) override {
+    return base::WrapUnique(new TestablePictureImageLayerImpl(tree_impl, id()));
   }
 
   using PictureLayerImpl::UpdateIdealScales;
@@ -58,8 +60,9 @@
     host_impl_.InitializeRenderer(output_surface_.get());
   }
 
-  scoped_ptr<TestablePictureImageLayerImpl> CreateLayer(int id,
-                                                        WhichTree which_tree) {
+  std::unique_ptr<TestablePictureImageLayerImpl> CreateLayer(
+      int id,
+      WhichTree which_tree) {
     LayerTreeImpl* tree = nullptr;
     switch (which_tree) {
       case ACTIVE_TREE:
@@ -73,7 +76,7 @@
         new TestablePictureImageLayerImpl(tree, id);
     layer->raster_source_ = FakeRasterSource::CreateInfiniteFilled();
     layer->SetBounds(layer->raster_source_->GetSize());
-    return make_scoped_ptr(layer);
+    return base::WrapUnique(layer);
   }
 
   void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer,
@@ -99,12 +102,13 @@
   FakeImplTaskRunnerProvider task_runner_provider_;
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   FakeLayerTreeHostImpl host_impl_;
 };
 
 TEST_F(PictureImageLayerImplTest, CalculateContentsScale) {
-  scoped_ptr<TestablePictureImageLayerImpl> layer(CreateLayer(1, PENDING_TREE));
+  std::unique_ptr<TestablePictureImageLayerImpl> layer(
+      CreateLayer(1, PENDING_TREE));
   layer->SetDrawsContent(true);
 
   TestablePictureImageLayerImpl* layer_ptr = layer.get();
@@ -118,7 +122,7 @@
 }
 
 TEST_F(PictureImageLayerImplTest, IgnoreIdealContentScale) {
-  scoped_ptr<TestablePictureImageLayerImpl> pending_layer(
+  std::unique_ptr<TestablePictureImageLayerImpl> pending_layer(
       CreateLayer(1, PENDING_TREE));
   pending_layer->SetDrawsContent(true);
 
@@ -161,7 +165,7 @@
       active_layer->tilings()->tiling_at(0)->AllTilesForTesting());
 
   // Draw.
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer->AppendQuads(render_pass.get(), &data);
diff --git a/cc/layers/picture_image_layer_unittest.cc b/cc/layers/picture_image_layer_unittest.cc
index fb0f206..434106b 100644
--- a/cc/layers/picture_image_layer_unittest.cc
+++ b/cc/layers/picture_image_layer_unittest.cc
@@ -21,7 +21,7 @@
   scoped_refptr<PictureImageLayer> layer = PictureImageLayer::Create();
   FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&client, &task_graph_runner);
   layer->SetLayerTreeHost(host.get());
   gfx::Rect layer_rect(200, 200);
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 9daded8..526c7a4 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -31,7 +31,7 @@
       nearest_neighbor_(false) {}
 
 PictureLayer::PictureLayer(ContentLayerClient* client,
-                           scoped_ptr<RecordingSource> source)
+                           std::unique_ptr<RecordingSource> source)
     : PictureLayer(client) {
   recording_source_ = std::move(source);
 }
@@ -39,7 +39,8 @@
 PictureLayer::~PictureLayer() {
 }
 
-scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> PictureLayer::CreateLayerImpl(
+    LayerTreeImpl* tree_impl) {
   return PictureLayerImpl::Create(tree_impl, id(), is_mask_);
 }
 
@@ -135,7 +136,7 @@
     return nullptr;
 
   gfx::Size layer_size = bounds();
-  scoped_ptr<RecordingSource> recording_source(new RecordingSource);
+  std::unique_ptr<RecordingSource> recording_source(new RecordingSource);
   Region recording_invalidation;
   recording_source->UpdateAndExpandInvalidation(
       client_, &recording_invalidation, layer_size, update_source_frame_number_,
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h
index a750c95..5bafbe5 100644
--- a/cc/layers/picture_layer.h
+++ b/cc/layers/picture_layer.h
@@ -26,7 +26,7 @@
   void SetNearestNeighbor(bool nearest_neighbor);
 
   // Layer interface.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void SetLayerTreeHost(LayerTreeHost* host) override;
   void PushPropertiesTo(LayerImpl* layer) override;
   void SetNeedsDisplayRect(const gfx::Rect& layer_rect) override;
@@ -46,7 +46,8 @@
  protected:
   explicit PictureLayer(ContentLayerClient* client);
   // Allow tests to inject a recording source.
-  PictureLayer(ContentLayerClient* client, scoped_ptr<RecordingSource> source);
+  PictureLayer(ContentLayerClient* client,
+               std::unique_ptr<RecordingSource> source);
   ~PictureLayer() override;
 
   bool HasDrawableContent() const override;
@@ -63,7 +64,7 @@
   void DropRecordingSourceContentIfInvalid();
 
   ContentLayerClient* client_;
-  scoped_ptr<RecordingSource> recording_source_;
+  std::unique_ptr<RecordingSource> recording_source_;
   devtools_instrumentation::
       ScopedLayerObjectTracker instrumentation_object_tracker_;
 
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index d74a3b6..7278504a 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -91,7 +91,7 @@
   return "cc::PictureLayerImpl";
 }
 
-scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return PictureLayerImpl::Create(tree_impl, id(), is_mask_);
 }
@@ -1161,7 +1161,7 @@
   return std::max(max_contents_scale, MinimumContentsScale());
 }
 
-scoped_ptr<PictureLayerTilingSet>
+std::unique_ptr<PictureLayerTilingSet>
 PictureLayerImpl::CreatePictureLayerTilingSet() {
   const LayerTreeSettings& settings = layer_tree_impl()->settings();
   return PictureLayerTilingSet::Create(
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 8293de0..d227d3f 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/tiles/picture_layer_tiling.h"
@@ -28,10 +29,10 @@
     : public LayerImpl,
       NON_EXPORTED_BASE(public PictureLayerTilingClient) {
  public:
-  static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                             int id,
-                                             bool is_mask) {
-    return make_scoped_ptr(new PictureLayerImpl(tree_impl, id, is_mask));
+  static std::unique_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                  int id,
+                                                  bool is_mask) {
+    return base::WrapUnique(new PictureLayerImpl(tree_impl, id, is_mask));
   }
   ~PictureLayerImpl() override;
 
@@ -39,7 +40,7 @@
 
   // LayerImpl overrides.
   const char* LayerTypeAsString() const override;
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
   void AppendQuads(RenderPass* render_pass,
                    AppendQuadsData* append_quads_data) override;
@@ -120,11 +121,11 @@
 
   virtual void UpdateIdealScales();
   float MaximumTilingContentsScale() const;
-  scoped_ptr<PictureLayerTilingSet> CreatePictureLayerTilingSet();
+  std::unique_ptr<PictureLayerTilingSet> CreatePictureLayerTilingSet();
 
   PictureLayerImpl* twin_layer_;
 
-  scoped_ptr<PictureLayerTilingSet> tilings_;
+  std::unique_ptr<PictureLayerTilingSet> tilings_;
   scoped_refptr<RasterSource> raster_source_;
   Region invalidation_;
 
diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc
index 72d1353..0f9e602 100644
--- a/cc/layers/picture_layer_impl_perftest.cc
+++ b/cc/layers/picture_layer_impl_perftest.cc
@@ -63,7 +63,7 @@
     LayerTreeImpl* pending_tree = host_impl_.pending_tree();
     pending_tree->ClearLayers();
 
-    scoped_ptr<FakePictureLayerImpl> pending_layer =
+    std::unique_ptr<FakePictureLayerImpl> pending_layer =
         FakePictureLayerImpl::CreateWithRasterSource(pending_tree, 7,
                                                      raster_source);
     pending_layer->SetDrawsContent(true);
@@ -85,8 +85,9 @@
     timer_.Reset();
     do {
       int count = num_tiles;
-      scoped_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
-          pending_layer_->picture_layer_tiling_set(), false));
+      std::unique_ptr<TilingSetRasterQueueAll> queue(
+          new TilingSetRasterQueueAll(
+              pending_layer_->picture_layer_tiling_set(), false));
       while (count--) {
         ASSERT_TRUE(!queue->IsEmpty()) << "count: " << count;
         ASSERT_TRUE(queue->Top().tile()) << "count: " << count;
@@ -112,8 +113,9 @@
 
     timer_.Reset();
     do {
-      scoped_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
-          pending_layer_->picture_layer_tiling_set(), false));
+      std::unique_ptr<TilingSetRasterQueueAll> queue(
+          new TilingSetRasterQueueAll(
+              pending_layer_->picture_layer_tiling_set(), false));
       timer_.NextLap();
     } while (!timer_.HasTimeLimitExpired());
 
@@ -132,7 +134,7 @@
     timer_.Reset();
     do {
       int count = num_tiles;
-      scoped_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
+      std::unique_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
           pending_layer_->picture_layer_tiling_set()));
       while (count--) {
         ASSERT_TRUE(!queue->IsEmpty()) << "count: " << count;
@@ -160,7 +162,7 @@
 
     timer_.Reset();
     do {
-      scoped_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
+      std::unique_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
           pending_layer_->picture_layer_tiling_set()));
       timer_.NextLap();
     } while (!timer_.HasTimeLimitExpired());
@@ -173,7 +175,7 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
   FakeImplTaskRunnerProvider task_runner_provider_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   FakeLayerTreeHostImpl host_impl_;
   FakePictureLayerImpl* pending_layer_;
   LapTimer timer_;
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 94f51aa..526c921 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -229,10 +229,10 @@
 
     // Steal from the recycled tree if possible.
     LayerImpl* pending_root = pending_tree->root_layer();
-    scoped_ptr<FakePictureLayerImpl> pending_layer;
+    std::unique_ptr<FakePictureLayerImpl> pending_layer;
     DCHECK(!pending_root || pending_root->id() == root_id_);
     if (!pending_root) {
-      scoped_ptr<LayerImpl> new_pending_root =
+      std::unique_ptr<LayerImpl> new_pending_root =
           LayerImpl::Create(pending_tree, root_id_);
       pending_layer = FakePictureLayerImpl::Create(pending_tree, id_);
       if (!tile_size.IsEmpty())
@@ -393,7 +393,7 @@
   FakeImplTaskRunnerProvider task_runner_provider_;
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   FakeLayerTreeHostImpl host_impl_;
   int root_id_;
   int id_;
@@ -421,7 +421,7 @@
       FakeRasterSource::CreateFilled(layer_size);
 
   // Create an active recording source, but make sure it's not solid.
-  scoped_ptr<FakeRecordingSource> active_recording_source =
+  std::unique_ptr<FakeRecordingSource> active_recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_size);
   active_recording_source->SetLayerBounds(layer_size);
   active_recording_source->add_draw_rect(gfx::Rect(layer_size));
@@ -1294,7 +1294,7 @@
   EXPECT_EQ(pending_layer_->num_tilings(), 1u);
 
   // Mask layers dont create low res since they always fit on one tile.
-  scoped_ptr<FakePictureLayerImpl> mask =
+  std::unique_ptr<FakePictureLayerImpl> mask =
       FakePictureLayerImpl::CreateMaskWithRasterSource(
           host_impl_.pending_tree(), 3, pending_raster_source);
   mask->SetBounds(layer_bounds);
@@ -1322,7 +1322,7 @@
       FakeRasterSource::CreateFilled(layer_bounds);
   SetupPendingTree(valid_raster_source);
 
-  scoped_ptr<FakePictureLayerImpl> mask_ptr =
+  std::unique_ptr<FakePictureLayerImpl> mask_ptr =
       FakePictureLayerImpl::CreateMaskWithRasterSource(
           host_impl_.pending_tree(), 3, valid_raster_source);
   mask_ptr->SetBounds(layer_bounds);
@@ -1451,7 +1451,7 @@
       FakeRasterSource::CreateFilled(layer_bounds);
   SetupPendingTree(valid_raster_source);
 
-  scoped_ptr<FakePictureLayerImpl> mask_ptr =
+  std::unique_ptr<FakePictureLayerImpl> mask_ptr =
       FakePictureLayerImpl::CreateMaskWithRasterSource(
           host_impl_.pending_tree(), 3, valid_raster_source);
   mask_ptr->SetBounds(layer_bounds);
@@ -1539,11 +1539,11 @@
   ResetTilingsAndRasterScales();
 
   // Change the max texture size on the output surface context.
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   context->set_max_texture_size(140);
   host_impl_.DidLoseOutputSurface();
-  scoped_ptr<OutputSurface> new_output_surface =
+  std::unique_ptr<OutputSurface> new_output_surface =
       FakeOutputSurface::Create3d(std::move(context));
   host_impl_.SetVisible(true);
   host_impl_.InitializeRenderer(new_output_surface.get());
@@ -1579,11 +1579,11 @@
   ResetTilingsAndRasterScales();
 
   // Change the max texture size on the output surface context.
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   context->set_max_texture_size(140);
   host_impl_.DidLoseOutputSurface();
-  scoped_ptr<OutputSurface> new_output_surface =
+  std::unique_ptr<OutputSurface> new_output_surface =
       FakeOutputSurface::Create3d(std::move(context));
   host_impl_.SetVisible(true);
   host_impl_.InitializeRenderer(new_output_surface.get());
@@ -1607,7 +1607,7 @@
 }
 
 TEST_F(PictureLayerImplTest, DisallowTileDrawQuads) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_bounds(1300, 1900);
   gfx::Rect layer_rect(layer_bounds);
@@ -1632,7 +1632,7 @@
 }
 
 TEST_F(PictureLayerImplTest, ResourcelessPartialRecording) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size tile_size(400, 400);
   gfx::Size layer_bounds(700, 650);
@@ -1669,7 +1669,7 @@
 }
 
 TEST_F(PictureLayerImplTest, ResourcelessEmptyRecording) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_bounds(700, 650);
   scoped_refptr<FakeRasterSource> active_raster_source =
@@ -1689,7 +1689,7 @@
 }
 
 TEST_F(PictureLayerImplTest, SolidColorLayerHasVisibleFullCoverage) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_bounds(1500, 1500);
   gfx::Rect visible_rect(250, 250, 1000, 1000);
@@ -1760,7 +1760,7 @@
   int num_visible = 0;
   int num_offscreen = 0;
 
-  scoped_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
+  std::unique_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
       pending_layer_->picture_layer_tiling_set(), false));
   for (; !queue->IsEmpty(); queue->Pop()) {
     const PrioritizedTile& prioritized_tile = queue->Top();
@@ -1843,7 +1843,7 @@
   host_impl_.active_tree()->UpdateDrawProperties(update_lcd_text);
   active_layer_->draw_properties().visible_layer_rect = visible_layer_rect;
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -1872,7 +1872,7 @@
       active_layer_->tilings()->tiling_at(0)->AllTilesForTesting();
   host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(tiles);
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -1896,7 +1896,7 @@
   SetupPendingTreeWithFixedTileSize(pending_raster_source, tile_size, Region());
   ActivateTree();
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -1923,7 +1923,7 @@
       active_layer_->tilings()->tiling_at(1)->AllTilesForTesting();
   host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(low_tiles);
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -1957,7 +1957,7 @@
       active_layer_->tilings()->tiling_at(1)->AllTilesForTesting();
   host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(low_tiles);
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -2010,7 +2010,7 @@
       active_layer_->HighResTiling()->AllTilesForTesting();
   host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(high_tiles);
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -2043,7 +2043,7 @@
   SetupPendingTreeWithFixedTileSize(pending_raster_source, tile_size, Region());
   ActivateTree();
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -2232,7 +2232,7 @@
   host_impl_.CreatePendingTree();
   LayerTreeImpl* pending_tree = host_impl_.pending_tree();
 
-  scoped_ptr<FakePictureLayerImpl> pending_layer =
+  std::unique_ptr<FakePictureLayerImpl> pending_layer =
       FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_,
                                                    pending_raster_source);
   pending_layer->SetDrawsContent(true);
@@ -2895,7 +2895,7 @@
   int low_res_tile_count = 0u;
   int high_res_tile_count = 0u;
   int high_res_now_tiles = 0u;
-  scoped_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
+  std::unique_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
       pending_layer_->picture_layer_tiling_set(), false));
   while (!queue->IsEmpty()) {
     PrioritizedTile prioritized_tile = queue->Top();
@@ -2934,7 +2934,7 @@
   EXPECT_EQ(low_res_tile_count + high_res_tile_count + non_ideal_tile_count,
             static_cast<int>(unique_tiles.size()));
 
-  scoped_ptr<TilingSetRasterQueueRequired> required_queue(
+  std::unique_ptr<TilingSetRasterQueueRequired> required_queue(
       new TilingSetRasterQueueRequired(
           pending_layer_->picture_layer_tiling_set(),
           RasterTilePriorityQueue::Type::REQUIRED_FOR_DRAW));
@@ -3022,7 +3022,7 @@
   ActivateTree();
   EXPECT_EQ(2u, active_layer_->num_tilings());
 
-  scoped_ptr<TilingSetRasterQueueRequired> queue(
+  std::unique_ptr<TilingSetRasterQueueRequired> queue(
       new TilingSetRasterQueueRequired(
           active_layer_->picture_layer_tiling_set(),
           RasterTilePriorityQueue::Type::REQUIRED_FOR_DRAW));
@@ -3049,7 +3049,7 @@
       pending_layer_->picture_layer_tiling_set()->FindTilingWithResolution(
           HIGH_RESOLUTION));
 
-  scoped_ptr<TilingSetRasterQueueRequired> queue(
+  std::unique_ptr<TilingSetRasterQueueRequired> queue(
       new TilingSetRasterQueueRequired(
           pending_layer_->picture_layer_tiling_set(),
           RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION));
@@ -3104,7 +3104,7 @@
   EXPECT_GT(number_of_unmarked_tiles, 1u);
 
   // Tiles don't have resources yet.
-  scoped_ptr<TilingSetEvictionQueue> queue(
+  std::unique_ptr<TilingSetEvictionQueue> queue(
       new TilingSetEvictionQueue(pending_layer_->picture_layer_tiling_set()));
   EXPECT_TRUE(queue->IsEmpty());
 
@@ -3664,7 +3664,7 @@
 }
 
 TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_bounds(1000, 2000);
   host_impl_.SetViewportSize(gfx::Size(10000, 20000));
@@ -3749,7 +3749,7 @@
   host_impl_.SetTreePriority(SAME_PRIORITY_FOR_BOTH_TREES);
   host_impl_.PrepareTiles();
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_HARDWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -3781,7 +3781,7 @@
     size_t occluded_tile_count = 0u;
     PrioritizedTile last_tile;
 
-    scoped_ptr<TilingSetEvictionQueue> queue(
+    std::unique_ptr<TilingSetEvictionQueue> queue(
         new TilingSetEvictionQueue(layer->picture_layer_tiling_set()));
     while (!queue->IsEmpty()) {
       PrioritizedTile prioritized_tile = queue->Top();
@@ -3835,7 +3835,7 @@
 
   // No occlusion.
   int unoccluded_tile_count = 0;
-  scoped_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
+  std::unique_ptr<TilingSetRasterQueueAll> queue(new TilingSetRasterQueueAll(
       pending_layer_->picture_layer_tiling_set(), false));
   while (!queue->IsEmpty()) {
     PrioritizedTile prioritized_tile = queue->Top();
@@ -4381,7 +4381,7 @@
   scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
   RecordingSource* recording_source = layer->GetRecordingSourceForTesting();
@@ -4412,7 +4412,7 @@
     host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(tiles);
   }
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   active_layer_->AppendQuads(render_pass.get(), &data);
@@ -4444,7 +4444,7 @@
   scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
   RecordingSource* recording_source = layer->GetRecordingSourceForTesting();
@@ -4780,7 +4780,7 @@
   host_impl_.CreatePendingTree();
 
   LayerTreeImpl* pending_tree = host_impl_.pending_tree();
-  scoped_ptr<FakePictureLayerImpl> layer =
+  std::unique_ptr<FakePictureLayerImpl> layer =
       FakePictureLayerImpl::Create(pending_tree, id_);
 
   host_impl_.SetViewportSize(gfx::Size(1000, 1000));
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index c57bb61e..8ce8b7e 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/layers/append_quads_data.h"
 #include "cc/layers/content_layer_client.h"
@@ -64,10 +65,10 @@
     FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
     TestTaskGraphRunner task_graph_runner;
     LayerTreeSettings settings;
-    scoped_ptr<FakeImageSerializationProcessor>
+    std::unique_ptr<FakeImageSerializationProcessor>
         fake_image_serialization_processor =
-            make_scoped_ptr(new FakeImageSerializationProcessor);
-    scoped_ptr<FakeLayerTreeHost> host =
+            base::WrapUnique(new FakeImageSerializationProcessor);
+    std::unique_ptr<FakeLayerTreeHost> host =
         FakeLayerTreeHost::Create(&host_client, &task_graph_runner, settings,
                                   CompositorMode::SINGLE_THREADED,
                                   fake_image_serialization_processor.get());
@@ -85,7 +86,7 @@
 
  private:
   TestSerializationPictureLayer(ContentLayerClient* client,
-                                scoped_ptr<RecordingSource> source,
+                                std::unique_ptr<RecordingSource> source,
                                 const gfx::Size& recording_source_viewport)
       : PictureLayer(client, std::move(source)),
         recording_source_viewport_(recording_source_viewport) {}
@@ -102,10 +103,10 @@
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
   LayerTreeSettings settings;
-  scoped_ptr<FakeImageSerializationProcessor>
+  std::unique_ptr<FakeImageSerializationProcessor>
       fake_image_serialization_processor =
-          make_scoped_ptr(new FakeImageSerializationProcessor);
-  scoped_ptr<FakeLayerTreeHost> host =
+          base::WrapUnique(new FakeImageSerializationProcessor);
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner, settings,
                                 CompositorMode::SINGLE_THREADED,
                                 fake_image_serialization_processor.get());
@@ -133,10 +134,10 @@
 TEST(PictureLayerTest, TestSerializationDeserialization) {
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeImageSerializationProcessor>
+  std::unique_ptr<FakeImageSerializationProcessor>
       fake_image_serialization_processor =
-          make_scoped_ptr(new FakeImageSerializationProcessor);
-  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
+          base::WrapUnique(new FakeImageSerializationProcessor);
+  std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
       &host_client, &task_graph_runner, LayerTreeSettings(),
       CompositorMode::SINGLE_THREADED,
       fake_image_serialization_processor.get());
@@ -158,7 +159,7 @@
 TEST(PictureLayerTest, TestEmptySerializationDeserialization) {
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
 
   gfx::Size recording_source_viewport(256, 256);
@@ -175,7 +176,7 @@
 
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
   layer->SetIsDrawable(true);
@@ -194,15 +195,15 @@
   FakeImplTaskRunnerProvider impl_task_runner_provider;
 
   TestSharedBitmapManager shared_bitmap_manager;
-  scoped_ptr<FakeOutputSurface> output_surface =
+  std::unique_ptr<FakeOutputSurface> output_surface =
       FakeOutputSurface::CreateSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice));
+          base::WrapUnique(new SoftwareOutputDevice));
   FakeLayerTreeHostImpl host_impl(LayerTreeSettings(),
                                   &impl_task_runner_provider,
                                   &shared_bitmap_manager, &task_graph_runner);
   host_impl.InitializeRenderer(output_surface.get());
   host_impl.CreatePendingTree();
-  scoped_ptr<FakePictureLayerImpl> layer_impl =
+  std::unique_ptr<FakePictureLayerImpl> layer_impl =
       FakePictureLayerImpl::Create(host_impl.pending_tree(), 1);
 
   layer->PushPropertiesTo(layer_impl.get());
@@ -221,7 +222,7 @@
 
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
   layer->SetIsDrawable(true);
@@ -236,7 +237,7 @@
   host->CommitComplete();
   FakeImplTaskRunnerProvider impl_task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+  std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
   LayerTreeSettings layer_tree_settings = LayerTreeSettings();
   layer_tree_settings.image_decode_tasks_enabled = true;
   FakeLayerTreeHostImpl host_impl(layer_tree_settings,
@@ -264,7 +265,7 @@
 
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
   layer->SetIsDrawable(true);
@@ -278,7 +279,7 @@
   host->CommitComplete();
   FakeImplTaskRunnerProvider impl_task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+  std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
   LayerTreeSettings layer_tree_settings = LayerTreeSettings();
   layer_tree_settings.image_decode_tasks_enabled = true;
   FakeLayerTreeHostImpl host_impl(layer_tree_settings,
@@ -307,7 +308,7 @@
 
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
   layer->SetIsDrawable(true);
@@ -324,7 +325,7 @@
   FakeImplTaskRunnerProvider impl_task_runner_provider;
 
   TestSharedBitmapManager shared_bitmap_manager;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+  std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
   LayerTreeSettings layer_tree_settings = LayerTreeSettings();
   layer_tree_settings.image_decode_tasks_enabled = true;
   FakeLayerTreeHostImpl host_impl(layer_tree_settings,
@@ -367,7 +368,7 @@
 
   host_impl.ActivateSyncTree();
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData data;
   host_impl.active_tree()->root_layer()->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
   host_impl.active_tree()->root_layer()->AppendQuads(render_pass.get(), &data);
@@ -375,7 +376,7 @@
 }
 
 TEST(PictureLayerTest, SuitableForGpuRasterization) {
-  scoped_ptr<FakeRecordingSource> recording_source_owned(
+  std::unique_ptr<FakeRecordingSource> recording_source_owned(
       new FakeRecordingSource);
   FakeRecordingSource* recording_source = recording_source_owned.get();
 
@@ -386,7 +387,7 @@
 
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
   host->SetRootLayer(layer);
 
@@ -430,13 +431,13 @@
   params.settings = &settings;
   params.task_graph_runner = &task_graph_runner;
   params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
-  scoped_ptr<LayerTreeHost> host1 =
+  std::unique_ptr<LayerTreeHost> host1 =
       LayerTreeHost::CreateSingleThreaded(&host_client1, &params);
   host1->SetVisible(true);
   host_client1.SetLayerTreeHost(host1.get());
 
   params.client = &host_client2;
-  scoped_ptr<LayerTreeHost> host2 =
+  std::unique_ptr<LayerTreeHost> host2 =
       LayerTreeHost::CreateSingleThreaded(&host_client2, &params);
   host2->SetVisible(true);
   host_client2.SetLayerTreeHost(host2.get());
diff --git a/cc/layers/render_pass_sink.h b/cc/layers/render_pass_sink.h
index 725f1dd..aa5bfbc 100644
--- a/cc/layers/render_pass_sink.h
+++ b/cc/layers/render_pass_sink.h
@@ -5,7 +5,8 @@
 #ifndef CC_LAYERS_RENDER_PASS_SINK_H_
 #define CC_LAYERS_RENDER_PASS_SINK_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 
 namespace cc {
@@ -13,7 +14,7 @@
 
 class CC_EXPORT RenderPassSink {
  public:
-  virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) = 0;
+  virtual void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) = 0;
 
  protected:
   virtual ~RenderPassSink() {}
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc
index 4ca3225..b42e261 100644
--- a/cc/layers/render_surface_impl.cc
+++ b/cc/layers/render_surface_impl.cc
@@ -163,7 +163,7 @@
 }
 
 void RenderSurfaceImpl::AppendRenderPasses(RenderPassSink* pass_sink) {
-  scoped_ptr<RenderPass> pass = RenderPass::Create(layer_list_.size());
+  std::unique_ptr<RenderPass> pass = RenderPass::Create(layer_list_.size());
   pass->SetNew(GetRenderPassId(), content_rect(),
                gfx::IntersectRects(content_rect(),
                                    damage_tracker_->current_damage_rect()),
diff --git a/cc/layers/render_surface_impl.h b/cc/layers/render_surface_impl.h
index de7a984..4e6ca861 100644
--- a/cc/layers/render_surface_impl.h
+++ b/cc/layers/render_surface_impl.h
@@ -7,11 +7,11 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_collections.h"
 #include "cc/quads/render_pass.h"
@@ -203,7 +203,7 @@
   // surface, and that ignores outside occlusion. This can point to itself.
   RenderSurfaceImpl* nearest_occlusion_immune_ancestor_;
 
-  scoped_ptr<DamageTracker> damage_tracker_;
+  std::unique_ptr<DamageTracker> damage_tracker_;
 
   // For LayerIteratorActions
   int target_render_surface_layer_index_history_;
diff --git a/cc/layers/render_surface_impl_unittest.cc b/cc/layers/render_surface_impl_unittest.cc
index 436eab59..6b65529 100644
--- a/cc/layers/render_surface_impl_unittest.cc
+++ b/cc/layers/render_surface_impl_unittest.cc
@@ -69,10 +69,10 @@
   gfx::Size viewport_size(1000, 1000);
 
   LayerTestCommon::LayerImplTest impl;
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(impl.host_impl()->active_tree(), 2);
   root->SetHasRenderSurface(true);
-  scoped_ptr<LayerImpl> surface =
+  std::unique_ptr<LayerImpl> surface =
       LayerImpl::Create(impl.host_impl()->active_tree(), 3);
   surface->SetBounds(layer_size);
   surface->SetHasRenderSurface(true);
@@ -86,7 +86,7 @@
   surface->mask_layer()->SetDrawsContent(true);
   surface->mask_layer()->SetBounds(layer_size);
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       LayerImpl::Create(impl.host_impl()->active_tree(), 5);
   child->SetDrawsContent(true);
   child->SetBounds(layer_size);
@@ -102,7 +102,7 @@
   LayerImpl* surface_raw =
       impl.host_impl()->active_tree()->root_layer()->children()[0];
   RenderSurfaceImpl* render_surface_impl = surface_raw->render_surface();
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData append_quads_data;
   render_surface_impl->AppendQuads(
       render_pass.get(), render_surface_impl->draw_transform(), Occlusion(),
diff --git a/cc/layers/render_surface_unittest.cc b/cc/layers/render_surface_unittest.cc
index 2c15bf6..7035460 100644
--- a/cc/layers/render_surface_unittest.cc
+++ b/cc/layers/render_surface_unittest.cc
@@ -42,7 +42,7 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
-  scoped_ptr<LayerImpl> owning_layer =
+  std::unique_ptr<LayerImpl> owning_layer =
       LayerImpl::Create(host_impl.active_tree(), 1);
   owning_layer->SetHasRenderSurface(true);
   ASSERT_TRUE(owning_layer->render_surface());
@@ -68,7 +68,7 @@
   EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(
       render_surface->SetContentRect(test_rect));
 
-  scoped_ptr<LayerImpl> dummy_mask =
+  std::unique_ptr<LayerImpl> dummy_mask =
       LayerImpl::Create(host_impl.active_tree(), 2);
   gfx::Transform dummy_matrix;
   dummy_matrix.Translate(1.0, 2.0);
@@ -91,10 +91,10 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
-  scoped_ptr<LayerImpl> root_layer =
+  std::unique_ptr<LayerImpl> root_layer =
       LayerImpl::Create(host_impl.active_tree(), 1);
 
-  scoped_ptr<LayerImpl> owning_layer =
+  std::unique_ptr<LayerImpl> owning_layer =
       LayerImpl::Create(host_impl.active_tree(), 2);
   owning_layer->SetHasRenderSurface(true);
   ASSERT_TRUE(owning_layer->render_surface());
@@ -115,7 +115,7 @@
   render_surface->SetClipRect(clip_rect);
   render_surface->SetDrawOpacity(1.f);
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   AppendQuadsData append_quads_data;
 
   render_surface->AppendQuads(render_pass.get(), origin, Occlusion(),
@@ -140,7 +140,7 @@
 
 class TestRenderPassSink : public RenderPassSink {
  public:
-  void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override {
+  void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override {
     render_passes_.push_back(std::move(render_pass));
   }
 
@@ -158,10 +158,10 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
-  scoped_ptr<LayerImpl> root_layer =
+  std::unique_ptr<LayerImpl> root_layer =
       LayerImpl::Create(host_impl.active_tree(), 1);
 
-  scoped_ptr<LayerImpl> owning_layer =
+  std::unique_ptr<LayerImpl> owning_layer =
       LayerImpl::Create(host_impl.active_tree(), 2);
   owning_layer->SetHasRenderSurface(true);
   ASSERT_TRUE(owning_layer->render_surface());
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 0979b2f..5ecbf44 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -37,12 +37,13 @@
 namespace cc {
 namespace {
 
-LayerImpl* LayerImplForScrollAreaAndScrollbar(FakeLayerTreeHost* host,
-                                              scoped_ptr<Scrollbar> scrollbar,
-                                              bool reverse_order,
-                                              bool use_solid_color_scrollbar,
-                                              int thumb_thickness,
-                                              int track_start) {
+LayerImpl* LayerImplForScrollAreaAndScrollbar(
+    FakeLayerTreeHost* host,
+    std::unique_ptr<Scrollbar> scrollbar,
+    bool reverse_order,
+    bool use_solid_color_scrollbar,
+    int thumb_thickness,
+    int track_start) {
   scoped_refptr<Layer> layer_tree_root = Layer::Create();
   scoped_refptr<Layer> child1 = Layer::Create();
   scoped_refptr<Layer> child2;
@@ -141,12 +142,12 @@
   FakeLayerTreeHostClient fake_client_;
   TestTaskGraphRunner task_graph_runner_;
   LayerTreeSettings layer_tree_settings_;
-  scoped_ptr<FakeResourceTrackingLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeResourceTrackingLayerTreeHost> layer_tree_host_;
 };
 
 TEST_F(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
   // Create and attach a non-overlay scrollbar.
-  scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
+  std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar);
   LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
       layer_tree_host_.get(), std::move(scrollbar), false, false, 0, 0);
   PaintedScrollbarLayerImpl* scrollbar_layer_impl =
@@ -189,7 +190,7 @@
 }
 
 TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
-  scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
+  std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar);
   scoped_refptr<Layer> layer_tree_root = Layer::Create();
   scoped_refptr<Layer> scroll_layer = Layer::Create();
   scoped_refptr<Layer> content_layer = Layer::Create();
@@ -380,7 +381,7 @@
   const int kTrackStart = 1;
   const int kTrackLength = 100;
 
-  scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
+  std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
   LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
       layer_tree_host_.get(), std::move(scrollbar), false, true,
       kThumbThickness, kTrackStart);
@@ -394,7 +395,7 @@
 
   // Thickness should be overridden to 3.
   {
-    scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
     AppendQuadsData data;
     scrollbar_layer_impl->AppendQuads(render_pass.get(), &data);
 
@@ -409,7 +410,7 @@
   scrollbar_layer_impl->SetClipLayerLength(25.f);
   scrollbar_layer_impl->SetScrollLayerLength(125.f);
   {
-    scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
     AppendQuadsData data;
     scrollbar_layer_impl->AppendQuads(render_pass.get(), &data);
 
@@ -424,7 +425,7 @@
   scrollbar_layer_impl->SetClipLayerLength(125.f);
   scrollbar_layer_impl->SetScrollLayerLength(125.f);
   {
-    scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
     AppendQuadsData data;
     scrollbar_layer_impl->AppendQuads(render_pass.get(), &data);
 
@@ -440,7 +441,7 @@
   const int kTrackStart = 0;
   const int kTrackLength = 10;
 
-  scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
+  std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
 
   {
     scoped_refptr<Layer> layer_tree_root = Layer::Create();
@@ -478,7 +479,7 @@
   scrollbar_layer_impl->SetCurrentPos(4.f);
 
   {
-    scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
     AppendQuadsData data;
     scrollbar_layer_impl->AppendQuads(render_pass.get(), &data);
@@ -525,9 +526,9 @@
   FakeImplTaskRunnerProvider task_runner_provider_;
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHostImpl> host_impl_;
-  scoped_ptr<SolidColorScrollbarLayerImpl> horizontal_scrollbar_layer_;
-  scoped_ptr<SolidColorScrollbarLayerImpl> vertical_scrollbar_layer_;
+  std::unique_ptr<FakeLayerTreeHostImpl> host_impl_;
+  std::unique_ptr<SolidColorScrollbarLayerImpl> horizontal_scrollbar_layer_;
+  std::unique_ptr<SolidColorScrollbarLayerImpl> vertical_scrollbar_layer_;
 };
 
 TEST_F(ScrollbarLayerSolidColorThumbTest, SolidColorThumbLength) {
@@ -606,7 +607,7 @@
     scroll_layer_ = Layer::Create();
     layer_tree_host()->root_layer()->AddChild(scroll_layer_);
 
-    scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
+    std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar);
     scrollbar_layer_ = PaintedScrollbarLayer::Create(std::move(scrollbar),
                                                      scroll_layer_->id());
     scrollbar_layer_->SetScrollLayer(scroll_layer_->id());
@@ -642,7 +643,7 @@
 };
 
 TEST_F(ScrollbarLayerTestMaxTextureSize, DirectRenderer) {
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   int max_size = 0;
   context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
@@ -651,7 +652,7 @@
 }
 
 TEST_F(ScrollbarLayerTestMaxTextureSize, DelegatingRenderer) {
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   int max_size = 0;
   context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
@@ -666,7 +667,7 @@
                           int expected_created,
                           int expected_deleted,
                           bool use_solid_color_scrollbar) {
-    scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, false));
+    std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, false));
     scoped_refptr<Layer> layer_tree_root = Layer::Create();
     scoped_refptr<Layer> content_layer = Layer::Create();
     scoped_refptr<Layer> scrollbar_layer;
diff --git a/cc/layers/solid_color_layer.cc b/cc/layers/solid_color_layer.cc
index 176f1e30..3f364a5 100644
--- a/cc/layers/solid_color_layer.cc
+++ b/cc/layers/solid_color_layer.cc
@@ -8,7 +8,7 @@
 
 namespace cc {
 
-scoped_ptr<LayerImpl> SolidColorLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> SolidColorLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return SolidColorLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/solid_color_layer.h b/cc/layers/solid_color_layer.h
index d1f108a6..66a6ad8e 100644
--- a/cc/layers/solid_color_layer.h
+++ b/cc/layers/solid_color_layer.h
@@ -18,7 +18,7 @@
  public:
   static scoped_refptr<SolidColorLayer> Create();
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   void SetBackgroundColor(SkColor color) override;
 
diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc
index 76cd3fc4..322d9c8 100644
--- a/cc/layers/solid_color_layer_impl.cc
+++ b/cc/layers/solid_color_layer_impl.cc
@@ -22,7 +22,7 @@
 
 SolidColorLayerImpl::~SolidColorLayerImpl() {}
 
-scoped_ptr<LayerImpl> SolidColorLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> SolidColorLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return SolidColorLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/solid_color_layer_impl.h b/cc/layers/solid_color_layer_impl.h
index a56b69b..1f6aaf5a 100644
--- a/cc/layers/solid_color_layer_impl.h
+++ b/cc/layers/solid_color_layer_impl.h
@@ -5,8 +5,10 @@
 #ifndef CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
 #define CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 
@@ -14,9 +16,9 @@
 
 class CC_EXPORT SolidColorLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<SolidColorLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                                int id) {
-    return make_scoped_ptr(new SolidColorLayerImpl(tree_impl, id));
+  static std::unique_ptr<SolidColorLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                     int id) {
+    return base::WrapUnique(new SolidColorLayerImpl(tree_impl, id));
   }
 
   static void AppendSolidQuads(RenderPass* render_pass,
@@ -29,7 +31,7 @@
   ~SolidColorLayerImpl() override;
 
   // LayerImpl overrides.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void AppendQuads(RenderPass* render_pass,
                    AppendQuadsData* append_quads_data) override;
 
diff --git a/cc/layers/solid_color_layer_impl_unittest.cc b/cc/layers/solid_color_layer_impl_unittest.cc
index 5a9b11d..75a8e9c 100644
--- a/cc/layers/solid_color_layer_impl_unittest.cc
+++ b/cc/layers/solid_color_layer_impl_unittest.cc
@@ -24,7 +24,7 @@
 namespace {
 
 TEST(SolidColorLayerImplTest, VerifyTilingCompleteAndNoOverlap) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_size = gfx::Size(800, 600);
   gfx::Rect visible_layer_rect = gfx::Rect(layer_size);
@@ -33,7 +33,7 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, nullptr,
                                   &task_graph_runner);
-  scoped_ptr<SolidColorLayerImpl> layer =
+  std::unique_ptr<SolidColorLayerImpl> layer =
       SolidColorLayerImpl::Create(host_impl.active_tree(), 1);
   layer->draw_properties().visible_layer_rect = visible_layer_rect;
   layer->SetBounds(layer_size);
@@ -50,7 +50,7 @@
 TEST(SolidColorLayerImplTest, VerifyCorrectBackgroundColorInQuad) {
   SkColor test_color = 0xFFA55AFF;
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_size = gfx::Size(100, 100);
   gfx::Rect visible_layer_rect = gfx::Rect(layer_size);
@@ -59,7 +59,7 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, nullptr,
                                   &task_graph_runner);
-  scoped_ptr<SolidColorLayerImpl> layer =
+  std::unique_ptr<SolidColorLayerImpl> layer =
       SolidColorLayerImpl::Create(host_impl.active_tree(), 1);
   layer->draw_properties().visible_layer_rect = visible_layer_rect;
   layer->SetBounds(layer_size);
@@ -79,7 +79,7 @@
 TEST(SolidColorLayerImplTest, VerifyCorrectOpacityInQuad) {
   const float opacity = 0.5f;
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_size = gfx::Size(100, 100);
   gfx::Rect visible_layer_rect = gfx::Rect(layer_size);
@@ -88,7 +88,7 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, nullptr,
                                   &task_graph_runner);
-  scoped_ptr<SolidColorLayerImpl> layer =
+  std::unique_ptr<SolidColorLayerImpl> layer =
       SolidColorLayerImpl::Create(host_impl.active_tree(), 1);
   layer->draw_properties().visible_layer_rect = visible_layer_rect;
   layer->SetBounds(layer_size);
@@ -108,7 +108,7 @@
 TEST(SolidColorLayerImplTest, VerifyCorrectBlendModeInQuad) {
   const SkXfermode::Mode blend_mode = SkXfermode::kMultiply_Mode;
 
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   gfx::Size layer_size = gfx::Size(100, 100);
   gfx::Rect visible_layer_rect = gfx::Rect(layer_size);
@@ -117,7 +117,7 @@
   TestTaskGraphRunner task_graph_runner;
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, nullptr,
                                   &task_graph_runner);
-  scoped_ptr<SolidColorLayerImpl> layer =
+  std::unique_ptr<SolidColorLayerImpl> layer =
       SolidColorLayerImpl::Create(host_impl.active_tree(), 1);
   layer->SetBounds(layer_size);
   layer->set_draw_blend_mode(blend_mode);
@@ -143,7 +143,7 @@
 
   FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&client, &task_graph_runner);
   host->SetRootLayer(root);
 
@@ -155,7 +155,7 @@
   layer->SetBackgroundColor(SkColorSetARGBInline(255, 10, 20, 30));
   EXPECT_TRUE(layer->contents_opaque());
   {
-    scoped_ptr<SolidColorLayerImpl> layer_impl =
+    std::unique_ptr<SolidColorLayerImpl> layer_impl =
         SolidColorLayerImpl::Create(host->host_impl()->active_tree(),
                                     layer->id());
     layer->PushPropertiesTo(layer_impl.get());
@@ -167,7 +167,7 @@
     // should be the full tile.
     layer_impl->draw_properties().opacity = 1;
 
-    scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
     AppendQuadsData data;
     layer_impl->AppendQuads(render_pass.get(), &data);
@@ -181,7 +181,7 @@
   layer->SetBackgroundColor(SkColorSetARGBInline(254, 10, 20, 30));
   EXPECT_FALSE(layer->contents_opaque());
   {
-    scoped_ptr<SolidColorLayerImpl> layer_impl =
+    std::unique_ptr<SolidColorLayerImpl> layer_impl =
         SolidColorLayerImpl::Create(host->host_impl()->active_tree(),
                                     layer->id());
     layer->PushPropertiesTo(layer_impl.get());
@@ -193,7 +193,7 @@
     // should be empty.
     layer_impl->draw_properties().opacity = 1;
 
-    scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
     AppendQuadsData data;
     layer_impl->AppendQuads(render_pass.get(), &data);
diff --git a/cc/layers/solid_color_scrollbar_layer.cc b/cc/layers/solid_color_scrollbar_layer.cc
index 9df9167c..c567dce 100644
--- a/cc/layers/solid_color_scrollbar_layer.cc
+++ b/cc/layers/solid_color_scrollbar_layer.cc
@@ -4,13 +4,14 @@
 
 #include "cc/layers/solid_color_scrollbar_layer.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
 
 namespace cc {
 
-scoped_ptr<LayerImpl> SolidColorScrollbarLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> SolidColorScrollbarLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   const bool kIsOverlayScrollbar = true;
   return SolidColorScrollbarLayerImpl::Create(tree_impl,
diff --git a/cc/layers/solid_color_scrollbar_layer.h b/cc/layers/solid_color_scrollbar_layer.h
index 1ed52ef..b04fb1d 100644
--- a/cc/layers/solid_color_scrollbar_layer.h
+++ b/cc/layers/solid_color_scrollbar_layer.h
@@ -15,7 +15,7 @@
 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
                                            public Layer {
  public:
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   static scoped_refptr<SolidColorScrollbarLayer> Create(
       ScrollbarOrientation orientation,
diff --git a/cc/layers/solid_color_scrollbar_layer_impl.cc b/cc/layers/solid_color_scrollbar_layer_impl.cc
index 0b0a24e..40e47de 100644
--- a/cc/layers/solid_color_scrollbar_layer_impl.cc
+++ b/cc/layers/solid_color_scrollbar_layer_impl.cc
@@ -3,6 +3,8 @@
 // found in the LICENSE file.
 
 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
+
+#include "base/memory/ptr_util.h"
 #include "cc/quads/solid_color_draw_quad.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/layer_tree_settings.h"
@@ -10,27 +12,22 @@
 
 namespace cc {
 
-scoped_ptr<SolidColorScrollbarLayerImpl> SolidColorScrollbarLayerImpl::Create(
-    LayerTreeImpl* tree_impl,
-    int id,
-    ScrollbarOrientation orientation,
-    int thumb_thickness,
-    int track_start,
-    bool is_left_side_vertical_scrollbar,
-    bool is_overlay) {
-  return make_scoped_ptr(
-      new SolidColorScrollbarLayerImpl(tree_impl,
-                                       id,
-                                       orientation,
-                                       thumb_thickness,
-                                       track_start,
-                                       is_left_side_vertical_scrollbar,
-                                       is_overlay));
+std::unique_ptr<SolidColorScrollbarLayerImpl>
+SolidColorScrollbarLayerImpl::Create(LayerTreeImpl* tree_impl,
+                                     int id,
+                                     ScrollbarOrientation orientation,
+                                     int thumb_thickness,
+                                     int track_start,
+                                     bool is_left_side_vertical_scrollbar,
+                                     bool is_overlay) {
+  return base::WrapUnique(new SolidColorScrollbarLayerImpl(
+      tree_impl, id, orientation, thumb_thickness, track_start,
+      is_left_side_vertical_scrollbar, is_overlay));
 }
 
 SolidColorScrollbarLayerImpl::~SolidColorScrollbarLayerImpl() {}
 
-scoped_ptr<LayerImpl> SolidColorScrollbarLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> SolidColorScrollbarLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return SolidColorScrollbarLayerImpl::Create(tree_impl,
                                               id(),
diff --git a/cc/layers/solid_color_scrollbar_layer_impl.h b/cc/layers/solid_color_scrollbar_layer_impl.h
index 1cb03c76..2ecba03 100644
--- a/cc/layers/solid_color_scrollbar_layer_impl.h
+++ b/cc/layers/solid_color_scrollbar_layer_impl.h
@@ -12,7 +12,7 @@
 
 class CC_EXPORT SolidColorScrollbarLayerImpl : public ScrollbarLayerImplBase {
  public:
-  static scoped_ptr<SolidColorScrollbarLayerImpl> Create(
+  static std::unique_ptr<SolidColorScrollbarLayerImpl> Create(
       LayerTreeImpl* tree_impl,
       int id,
       ScrollbarOrientation orientation,
@@ -23,7 +23,7 @@
   ~SolidColorScrollbarLayerImpl() override;
 
   // LayerImpl overrides.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
 
   void AppendQuads(RenderPass* render_pass,
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index f31a8ae..8f0e051 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -70,7 +70,8 @@
   SetNeedsPushProperties();
 }
 
-scoped_ptr<LayerImpl> SurfaceLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> SurfaceLayer::CreateLayerImpl(
+    LayerTreeImpl* tree_impl) {
   return SurfaceLayerImpl::Create(tree_impl, id());
 }
 
@@ -111,7 +112,7 @@
   if (!layer_tree_host())
     return;
   DCHECK(!destroy_sequence_.is_null());
-  scoped_ptr<SatisfySwapPromise> satisfy(
+  std::unique_ptr<SatisfySwapPromise> satisfy(
       new SatisfySwapPromise(destroy_sequence_, satisfy_callback_));
   layer_tree_host()->QueueSwapPromise(std::move(satisfy));
   destroy_sequence_ = SurfaceSequence();
diff --git a/cc/layers/surface_layer.h b/cc/layers/surface_layer.h
index b4166d3..583625fe9 100644
--- a/cc/layers/surface_layer.h
+++ b/cc/layers/surface_layer.h
@@ -34,7 +34,7 @@
   void SetSurfaceId(SurfaceId surface_id, float scale, const gfx::Size& size);
 
   // Layer overrides.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void SetLayerTreeHost(LayerTreeHost* host) override;
   void PushPropertiesTo(LayerImpl* layer) override;
 
diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc
index a8a50f33..429d928 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -24,7 +24,7 @@
   layer_tree_impl()->RemoveSurfaceLayer(this);
 }
 
-scoped_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return SurfaceLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/surface_layer_impl.h b/cc/layers/surface_layer_impl.h
index 819ee73..d67efd86 100644
--- a/cc/layers/surface_layer_impl.h
+++ b/cc/layers/surface_layer_impl.h
@@ -5,8 +5,10 @@
 #ifndef CC_LAYERS_SURFACE_LAYER_IMPL_H_
 #define CC_LAYERS_SURFACE_LAYER_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/surfaces/surface_id.h"
@@ -15,8 +17,9 @@
 
 class CC_EXPORT SurfaceLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<SurfaceLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new SurfaceLayerImpl(tree_impl, id));
+  static std::unique_ptr<SurfaceLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                  int id) {
+    return base::WrapUnique(new SurfaceLayerImpl(tree_impl, id));
   }
   ~SurfaceLayerImpl() override;
 
@@ -26,7 +29,7 @@
   SurfaceId surface_id() const { return surface_id_; }
 
   // LayerImpl overrides.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
   void AppendQuads(RenderPass* render_pass,
                    AppendQuadsData* append_quads_data) override;
diff --git a/cc/layers/surface_layer_unittest.cc b/cc/layers/surface_layer_unittest.cc
index 0c15b5c3..028be56b 100644
--- a/cc/layers/surface_layer_unittest.cc
+++ b/cc/layers/surface_layer_unittest.cc
@@ -48,7 +48,7 @@
 
   FakeLayerTreeHostClient fake_client_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 };
 
 void SatisfyCallback(SurfaceSequence* out, SurfaceSequence in) {
@@ -77,7 +77,7 @@
   layer_tree_host_->set_surface_id_namespace(1);
   layer_tree_host_->SetRootLayer(layer);
 
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host2 =
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host2 =
       FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
   scoped_refptr<SurfaceLayer> layer2(SurfaceLayer::Create(
       base::Bind(&SatisfyCallback, &blank_change),
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index a656955..b5b3173 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/synchronization/lock.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/base/simple_enclosed_region.h"
@@ -52,7 +53,8 @@
   SetTextureMailbox(TextureMailbox(), nullptr);
 }
 
-scoped_ptr<LayerImpl> TextureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> TextureLayer::CreateLayerImpl(
+    LayerTreeImpl* tree_impl) {
   return TextureLayerImpl::Create(tree_impl, id());
 }
 
@@ -115,7 +117,7 @@
 
 void TextureLayer::SetTextureMailboxInternal(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallback> release_callback,
+    std::unique_ptr<SingleReleaseCallback> release_callback,
     bool requires_commit,
     bool allow_mailbox_reuse) {
   DCHECK(!mailbox.IsValid() || !holder_ref_ ||
@@ -145,7 +147,7 @@
 
 void TextureLayer::SetTextureMailbox(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallback> release_callback) {
+    std::unique_ptr<SingleReleaseCallback> release_callback) {
   bool requires_commit = true;
   bool allow_mailbox_reuse = false;
   SetTextureMailboxInternal(mailbox, std::move(release_callback),
@@ -163,7 +165,7 @@
   DCHECK(!mailbox.IsValid() || !holder_ref_ ||
          !mailbox.Equals(holder_ref_->holder()->mailbox()) ||
          mailbox.sync_token() != holder_ref_->holder()->mailbox().sync_token());
-  scoped_ptr<SingleReleaseCallback> release;
+  std::unique_ptr<SingleReleaseCallback> release;
   bool requires_commit = true;
   bool allow_mailbox_reuse = true;
   if (mailbox.IsValid())
@@ -202,7 +204,7 @@
   bool updated = Layer::Update();
   if (client_) {
     TextureMailbox mailbox;
-    scoped_ptr<SingleReleaseCallback> release_callback;
+    std::unique_ptr<SingleReleaseCallback> release_callback;
     if (client_->PrepareTextureMailbox(
             &mailbox,
             &release_callback,
@@ -236,7 +238,7 @@
   texture_layer->SetBlendBackgroundColor(blend_background_color_);
   if (needs_set_mailbox_) {
     TextureMailbox texture_mailbox;
-    scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl;
+    std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl;
     if (holder_ref_) {
       TextureMailboxHolder* holder = holder_ref_->holder();
       texture_mailbox = holder->mailbox();
@@ -261,7 +263,7 @@
 
 TextureLayer::TextureMailboxHolder::TextureMailboxHolder(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallback> release_callback)
+    std::unique_ptr<SingleReleaseCallback> release_callback)
     : internal_references_(0),
       mailbox_(mailbox),
       release_callback_(std::move(release_callback)),
@@ -272,11 +274,11 @@
   DCHECK_EQ(0u, internal_references_);
 }
 
-scoped_ptr<TextureLayer::TextureMailboxHolder::MainThreadReference>
+std::unique_ptr<TextureLayer::TextureMailboxHolder::MainThreadReference>
 TextureLayer::TextureMailboxHolder::Create(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallback> release_callback) {
-  return make_scoped_ptr(new MainThreadReference(
+    std::unique_ptr<SingleReleaseCallback> release_callback) {
+  return base::WrapUnique(new MainThreadReference(
       new TextureMailboxHolder(mailbox, std::move(release_callback))));
 }
 
@@ -288,7 +290,7 @@
   is_lost_ = is_lost;
 }
 
-scoped_ptr<SingleReleaseCallbackImpl>
+std::unique_ptr<SingleReleaseCallbackImpl>
 TextureLayer::TextureMailboxHolder::GetCallbackForImplThread() {
   // We can't call GetCallbackForImplThread if we released the main thread
   // reference.
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h
index 3601b23..4fa239f83 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -47,15 +47,15 @@
 
     // Gets a ReleaseCallback that can be called from another thread. Note: the
     // caller must ensure the callback is called.
-    scoped_ptr<SingleReleaseCallbackImpl> GetCallbackForImplThread();
+    std::unique_ptr<SingleReleaseCallbackImpl> GetCallbackForImplThread();
 
    protected:
     friend class TextureLayer;
 
     // Protected visiblity so only TextureLayer and unit tests can create these.
-    static scoped_ptr<MainThreadReference> Create(
+    static std::unique_ptr<MainThreadReference> Create(
         const TextureMailbox& mailbox,
-        scoped_ptr<SingleReleaseCallback> release_callback);
+        std::unique_ptr<SingleReleaseCallback> release_callback);
     virtual ~TextureMailboxHolder();
 
    private:
@@ -63,7 +63,7 @@
     friend class MainThreadReference;
     explicit TextureMailboxHolder(
         const TextureMailbox& mailbox,
-        scoped_ptr<SingleReleaseCallback> release_callback);
+        std::unique_ptr<SingleReleaseCallback> release_callback);
 
     void InternalAddRef();
     void InternalRelease();
@@ -76,7 +76,7 @@
     // during commit where the main thread is blocked.
     unsigned internal_references_;
     TextureMailbox mailbox_;
-    scoped_ptr<SingleReleaseCallback> release_callback_;
+    std::unique_ptr<SingleReleaseCallback> release_callback_;
 
     // This lock guards the sync_token_ and is_lost_ fields because they can be
     // accessed on both the impl and main thread. We do this to ensure that the
@@ -99,7 +99,7 @@
   // Resets the texture.
   void ClearTexture();
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   // Sets whether this texture should be Y-flipped at draw time. Defaults to
   // true.
@@ -129,8 +129,9 @@
   void SetBlendBackgroundColor(bool blend);
 
   // Code path for plugins which supply their own mailbox.
-  void SetTextureMailbox(const TextureMailbox& mailbox,
-                         scoped_ptr<SingleReleaseCallback> release_callback);
+  void SetTextureMailbox(
+      const TextureMailbox& mailbox,
+      std::unique_ptr<SingleReleaseCallback> release_callback);
 
   // Use this for special cases where the same texture is used to back the
   // TextureLayer across all frames.
@@ -152,7 +153,7 @@
  private:
   void SetTextureMailboxInternal(
       const TextureMailbox& mailbox,
-      scoped_ptr<SingleReleaseCallback> release_callback,
+      std::unique_ptr<SingleReleaseCallback> release_callback,
       bool requires_commit,
       bool allow_mailbox_reuse);
 
@@ -167,7 +168,7 @@
   bool premultiplied_alpha_;
   bool blend_background_color_;
 
-  scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_;
+  std::unique_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_;
   bool needs_set_mailbox_;
 
   DISALLOW_COPY_AND_ASSIGN(TextureLayer);
diff --git a/cc/layers/texture_layer_client.h b/cc/layers/texture_layer_client.h
index 0b8b225..46b7efc 100644
--- a/cc/layers/texture_layer_client.h
+++ b/cc/layers/texture_layer_client.h
@@ -18,7 +18,7 @@
   // and the old mailbox is to be reused.
   virtual bool PrepareTextureMailbox(
       TextureMailbox* mailbox,
-      scoped_ptr<SingleReleaseCallback>* release_callback,
+      std::unique_ptr<SingleReleaseCallback>* release_callback,
       bool use_shared_memory) = 0;
 
  protected:
diff --git a/cc/layers/texture_layer_impl.cc b/cc/layers/texture_layer_impl.cc
index 27d3c971..1474bbf 100644
--- a/cc/layers/texture_layer_impl.cc
+++ b/cc/layers/texture_layer_impl.cc
@@ -43,7 +43,7 @@
 
 void TextureLayerImpl::SetTextureMailbox(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallbackImpl> release_callback) {
+    std::unique_ptr<SingleReleaseCallbackImpl> release_callback) {
   DCHECK_EQ(mailbox.IsValid(), !!release_callback);
   FreeTextureMailbox();
   texture_mailbox_ = mailbox;
@@ -53,7 +53,7 @@
   SetNeedsPushProperties();
 }
 
-scoped_ptr<LayerImpl> TextureLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> TextureLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return TextureLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/texture_layer_impl.h b/cc/layers/texture_layer_impl.h
index e799eff5..233c14e 100644
--- a/cc/layers/texture_layer_impl.h
+++ b/cc/layers/texture_layer_impl.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 
@@ -18,12 +19,13 @@
 
 class CC_EXPORT TextureLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new TextureLayerImpl(tree_impl, id));
+  static std::unique_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                  int id) {
+    return base::WrapUnique(new TextureLayerImpl(tree_impl, id));
   }
   ~TextureLayerImpl() override;
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(
+  std::unique_ptr<LayerImpl> CreateLayerImpl(
       LayerTreeImpl* layer_tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
 
@@ -52,7 +54,7 @@
 
   void SetTextureMailbox(
       const TextureMailbox& mailbox,
-      scoped_ptr<SingleReleaseCallbackImpl> release_callback);
+      std::unique_ptr<SingleReleaseCallbackImpl> release_callback);
 
  private:
   TextureLayerImpl(LayerTreeImpl* tree_impl, int id);
@@ -69,10 +71,10 @@
   gfx::PointF uv_bottom_right_;
   float vertex_opacity_[4];
   // This is a resource that's a GL copy of a software texture mailbox.
-  scoped_ptr<ScopedResource> texture_copy_;
+  std::unique_ptr<ScopedResource> texture_copy_;
 
   TextureMailbox texture_mailbox_;
-  scoped_ptr<SingleReleaseCallbackImpl> release_callback_;
+  std::unique_ptr<SingleReleaseCallbackImpl> release_callback_;
   bool own_mailbox_;
   bool valid_texture_copy_;
 
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index b02dd52c..6250eec 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -14,6 +14,7 @@
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
 #include "base/synchronization/waitable_event.h"
@@ -64,7 +65,7 @@
 
 class MockLayerTreeHost : public LayerTreeHost {
  public:
-  static scoped_ptr<MockLayerTreeHost> Create(
+  static std::unique_ptr<MockLayerTreeHost> Create(
       FakeLayerTreeHostClient* client,
       TaskGraphRunner* task_graph_runner) {
     LayerTreeHost::InitParams params;
@@ -72,7 +73,7 @@
     params.task_graph_runner = task_graph_runner;
     LayerTreeSettings settings;
     params.settings = &settings;
-    return make_scoped_ptr(new MockLayerTreeHost(client, &params));
+    return base::WrapUnique(new MockLayerTreeHost(client, &params));
   }
 
   MOCK_METHOD0(SetNeedsCommit, void());
@@ -95,7 +96,7 @@
 
   bool PrepareTextureMailbox(
       TextureMailbox* mailbox,
-      scoped_ptr<SingleReleaseCallback>* release_callback,
+      std::unique_ptr<SingleReleaseCallback>* release_callback,
       bool use_shared_memory) override {
     if (!mailbox_changed_)
       return false;
@@ -107,7 +108,7 @@
   }
 
   void set_mailbox(const TextureMailbox& mailbox,
-                   scoped_ptr<SingleReleaseCallback> release_callback) {
+                   std::unique_ptr<SingleReleaseCallback> release_callback) {
     mailbox_ = mailbox;
     release_callback_ = std::move(release_callback);
     mailbox_changed_ = true;
@@ -115,7 +116,7 @@
 
  private:
   TextureMailbox mailbox_;
-  scoped_ptr<SingleReleaseCallback> release_callback_;
+  std::unique_ptr<SingleReleaseCallback> release_callback_;
   bool mailbox_changed_;
   DISALLOW_COPY_AND_ASSIGN(FakeTextureLayerClient);
 };
@@ -196,7 +197,7 @@
   TextureMailbox mailbox3_;
   gpu::SyncToken sync_token1_;
   gpu::SyncToken sync_token2_;
-  scoped_ptr<SharedBitmap> shared_bitmap_;
+  std::unique_ptr<SharedBitmap> shared_bitmap_;
 };
 
 class TextureLayerTest : public testing::Test {
@@ -227,12 +228,12 @@
     layer_tree_host_ = nullptr;
   }
 
-  scoped_ptr<MockLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<MockLayerTreeHost> layer_tree_host_;
   FakeImplTaskRunnerProvider task_runner_provider_;
   FakeLayerTreeHostClient fake_client_;
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   FakeLayerTreeHostImpl host_impl_;
   CommonMailboxObjects test_data_;
 };
@@ -387,7 +388,7 @@
 
   void ReleaseMainRef() { main_ref_ = nullptr; }
 
-  void CreateImplRef(scoped_ptr<SingleReleaseCallbackImpl>* impl_ref) {
+  void CreateImplRef(std::unique_ptr<SingleReleaseCallbackImpl>* impl_ref) {
     *impl_ref = main_ref_->holder()->GetCallbackForImplThread();
   }
 
@@ -407,10 +408,9 @@
         BlockingTaskRunner::Create(main_thread_.task_runner());
   }
 
-  scoped_ptr<TestMailboxHolder::MainThreadReference>
-      main_ref_;
+  std::unique_ptr<TestMailboxHolder::MainThreadReference> main_ref_;
   base::Thread main_thread_;
-  scoped_ptr<BlockingTaskRunner> main_thread_task_runner_;
+  std::unique_ptr<BlockingTaskRunner> main_thread_task_runner_;
 };
 
 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_BothReleaseThenMain) {
@@ -426,14 +426,14 @@
 
   // The texture layer is attached to compositor1, and passes a reference to its
   // impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor1;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor1;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor1));
 
   // Then the texture layer is removed and attached to compositor2, and passes a
   // reference to its impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor2;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor2;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor2));
@@ -479,14 +479,14 @@
 
   // The texture layer is attached to compositor1, and passes a reference to its
   // impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor1;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor1;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor1));
 
   // Then the texture layer is removed and attached to compositor2, and passes a
   // reference to its impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor2;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor2;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor2));
@@ -533,14 +533,14 @@
 
   // The texture layer is attached to compositor1, and passes a reference to its
   // impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor1;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor1;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor1));
 
   // Then the texture layer is removed and attached to compositor2, and passes a
   // reference to its impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor2;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor2;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor2));
@@ -587,14 +587,14 @@
 
   // The texture layer is attached to compositor1, and passes a reference to its
   // impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor1;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor1;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor1));
 
   // Then the texture layer is removed and attached to compositor2, and passes a
   // reference to its impl tree.
-  scoped_ptr<SingleReleaseCallbackImpl> compositor2;
+  std::unique_ptr<SingleReleaseCallbackImpl> compositor2;
   main_thread_.message_loop()->task_runner()->PostTask(
       FROM_HERE, base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
                             base::Unretained(this), &compositor2));
@@ -664,8 +664,8 @@
 
   void SetMailbox(char mailbox_char) {
     EXPECT_EQ(true, main_thread_.CalledOnValidThread());
-    scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create(
-        base::Bind(
+    std::unique_ptr<SingleReleaseCallback> callback =
+        SingleReleaseCallback::Create(base::Bind(
             &TextureLayerImplWithMailboxThreadedCallback::ReleaseCallback,
             base::Unretained(this)));
     layer_->SetTextureMailbox(
@@ -786,9 +786,10 @@
   void SetMailbox(char mailbox_char) {
     const gpu::SyncToken sync_token =
         SyncTokenFromUInt(static_cast<uint32_t>(mailbox_char));
-    scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create(
-        base::Bind(&TextureLayerMailboxIsActivatedDuringCommit::ReleaseCallback,
-                   sync_token));
+    std::unique_ptr<SingleReleaseCallback> callback =
+        SingleReleaseCallback::Create(base::Bind(
+            &TextureLayerMailboxIsActivatedDuringCommit::ReleaseCallback,
+            sync_token));
     layer_->SetTextureMailbox(TextureMailbox(MailboxFromChar(mailbox_char),
                                              sync_token, GL_TEXTURE_2D),
                               std::move(callback));
@@ -898,7 +899,7 @@
       .Times(AnyNumber());
   // Hardware mode.
   {
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(
         test_data_.mailbox1_,
@@ -907,7 +908,7 @@
   }
 
   {
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(TextureMailbox(), nullptr);
     EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE));
@@ -915,7 +916,7 @@
 
   {
     // Software resource.
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(
         test_data_.mailbox3_,
@@ -925,7 +926,7 @@
 
   // Software mode.
   {
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(
         test_data_.mailbox1_,
@@ -934,7 +935,7 @@
   }
 
   {
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(TextureMailbox(), nullptr);
     EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE));
@@ -942,7 +943,7 @@
 
   {
     // Software resource.
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(
         test_data_.mailbox3_,
@@ -952,7 +953,7 @@
 
   // Resourceless software mode.
   {
-    scoped_ptr<TextureLayerImpl> impl_layer =
+    std::unique_ptr<TextureLayerImpl> impl_layer =
         TextureLayerImpl::Create(host_impl_.active_tree(), 1);
     impl_layer->SetTextureMailbox(
         test_data_.mailbox1_,
@@ -963,11 +964,11 @@
 
 TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
   host_impl_.CreatePendingTree();
-  scoped_ptr<TextureLayerImpl> pending_layer;
+  std::unique_ptr<TextureLayerImpl> pending_layer;
   pending_layer = TextureLayerImpl::Create(host_impl_.pending_tree(), 1);
   ASSERT_TRUE(pending_layer);
 
-  scoped_ptr<LayerImpl> active_layer(
+  std::unique_ptr<LayerImpl> active_layer(
       pending_layer->CreateLayerImpl(host_impl_.active_tree()));
   ASSERT_TRUE(active_layer);
 
@@ -1021,7 +1022,7 @@
 
 TEST_F(TextureLayerImplWithMailboxTest,
        TestDestructorCallbackOnCreatedResource) {
-  scoped_ptr<TextureLayerImpl> impl_layer;
+  std::unique_ptr<TextureLayerImpl> impl_layer;
   impl_layer = TextureLayerImpl::Create(host_impl_.active_tree(), 1);
   ASSERT_TRUE(impl_layer);
 
@@ -1069,7 +1070,7 @@
   // TextureLayerClient implementation.
   bool PrepareTextureMailbox(
       TextureMailbox* texture_mailbox,
-      scoped_ptr<SingleReleaseCallback>* release_callback,
+      std::unique_ptr<SingleReleaseCallback>* release_callback,
       bool use_shared_memory) override {
     if (layer_tree_host()->source_frame_number() == 1) {
       // Once this has been committed, the mailbox will be released.
@@ -1168,7 +1169,7 @@
   // TextureLayerClient implementation.
   bool PrepareTextureMailbox(
       TextureMailbox* mailbox,
-      scoped_ptr<SingleReleaseCallback>* release_callback,
+      std::unique_ptr<SingleReleaseCallback>* release_callback,
       bool use_shared_memory) override {
     ++prepare_called_;
     if (!mailbox_changed_)
@@ -1305,7 +1306,7 @@
   // TextureLayerClient implementation.
   bool PrepareTextureMailbox(
       TextureMailbox* mailbox,
-      scoped_ptr<SingleReleaseCallback>* release_callback,
+      std::unique_ptr<SingleReleaseCallback>* release_callback,
       bool use_shared_memory) override {
     *mailbox = TextureMailbox(MailboxFromChar('1'), SyncTokenFromUInt(1),
                               GL_TEXTURE_2D);
@@ -1376,8 +1377,8 @@
 
   void SetMailbox(char mailbox_char) {
     EXPECT_EQ(true, main_thread_.CalledOnValidThread());
-    scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create(
-        base::Bind(
+    std::unique_ptr<SingleReleaseCallback> callback =
+        SingleReleaseCallback::Create(base::Bind(
             &TextureLayerWithMailboxMainThreadDeleted::ReleaseCallback,
             base::Unretained(this)));
     layer_->SetTextureMailbox(
@@ -1447,8 +1448,8 @@
 
   void SetMailbox(char mailbox_char) {
     EXPECT_EQ(true, main_thread_.CalledOnValidThread());
-    scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create(
-        base::Bind(
+    std::unique_ptr<SingleReleaseCallback> callback =
+        SingleReleaseCallback::Create(base::Bind(
             &TextureLayerWithMailboxImplThreadDeleted::ReleaseCallback,
             base::Unretained(this)));
     layer_->SetTextureMailbox(
diff --git a/cc/layers/ui_resource_layer.cc b/cc/layers/ui_resource_layer.cc
index 6842851..de86098 100644
--- a/cc/layers/ui_resource_layer.cc
+++ b/cc/layers/ui_resource_layer.cc
@@ -4,6 +4,7 @@
 
 #include "cc/layers/ui_resource_layer.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/layers/ui_resource_layer_impl.h"
 #include "cc/resources/scoped_ui_resource.h"
@@ -17,9 +18,10 @@
 
 class ScopedUIResourceHolder : public UIResourceLayer::UIResourceHolder {
  public:
-  static scoped_ptr<ScopedUIResourceHolder> Create(LayerTreeHost* host,
-                                            const SkBitmap& skbitmap) {
-    return make_scoped_ptr(new ScopedUIResourceHolder(host, skbitmap));
+  static std::unique_ptr<ScopedUIResourceHolder> Create(
+      LayerTreeHost* host,
+      const SkBitmap& skbitmap) {
+    return base::WrapUnique(new ScopedUIResourceHolder(host, skbitmap));
   }
   UIResourceId id() override { return resource_->id(); }
 
@@ -28,13 +30,13 @@
     resource_ = ScopedUIResource::Create(host, UIResourceBitmap(skbitmap));
   }
 
-  scoped_ptr<ScopedUIResource> resource_;
+  std::unique_ptr<ScopedUIResource> resource_;
 };
 
 class SharedUIResourceHolder : public UIResourceLayer::UIResourceHolder {
  public:
-  static scoped_ptr<SharedUIResourceHolder> Create(UIResourceId id) {
-    return make_scoped_ptr(new SharedUIResourceHolder(id));
+  static std::unique_ptr<SharedUIResourceHolder> Create(UIResourceId id) {
+    return base::WrapUnique(new SharedUIResourceHolder(id));
   }
 
   UIResourceId id() override { return id_; }
@@ -63,7 +65,7 @@
 
 UIResourceLayer::~UIResourceLayer() {}
 
-scoped_ptr<LayerImpl> UIResourceLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> UIResourceLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return UIResourceLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/ui_resource_layer.h b/cc/layers/ui_resource_layer.h
index 794a86c..8004d1e 100644
--- a/cc/layers/ui_resource_layer.h
+++ b/cc/layers/ui_resource_layer.h
@@ -5,8 +5,9 @@
 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_H_
 #define CC_LAYERS_UI_RESOURCE_LAYER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 #include "cc/resources/ui_resource_client.h"
@@ -54,7 +55,7 @@
 
   bool HasDrawableContent() const override;
 
-  scoped_ptr<UIResourceHolder> ui_resource_holder_;
+  std::unique_ptr<UIResourceHolder> ui_resource_holder_;
   SkBitmap bitmap_;
 
   gfx::PointF uv_top_left_;
@@ -62,7 +63,7 @@
   float vertex_opacity_[4];
 
  private:
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void RecreateUIResourceHolder();
 
   DISALLOW_COPY_AND_ASSIGN(UIResourceLayer);
diff --git a/cc/layers/ui_resource_layer_impl.cc b/cc/layers/ui_resource_layer_impl.cc
index 9fb703ef..dfe9e259 100644
--- a/cc/layers/ui_resource_layer_impl.cc
+++ b/cc/layers/ui_resource_layer_impl.cc
@@ -27,7 +27,7 @@
 
 UIResourceLayerImpl::~UIResourceLayerImpl() {}
 
-scoped_ptr<LayerImpl> UIResourceLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> UIResourceLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   return UIResourceLayerImpl::Create(tree_impl, id());
 }
diff --git a/cc/layers/ui_resource_layer_impl.h b/cc/layers/ui_resource_layer_impl.h
index 05293e67..129c5cd 100644
--- a/cc/layers/ui_resource_layer_impl.h
+++ b/cc/layers/ui_resource_layer_impl.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/resources/resource_provider.h"
@@ -23,9 +24,9 @@
 
 class CC_EXPORT UIResourceLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<UIResourceLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                               int id) {
-    return make_scoped_ptr(new UIResourceLayerImpl(tree_impl, id));
+  static std::unique_ptr<UIResourceLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                     int id) {
+    return base::WrapUnique(new UIResourceLayerImpl(tree_impl, id));
   }
   ~UIResourceLayerImpl() override;
 
@@ -40,7 +41,7 @@
   // opacity value.
   void SetVertexOpacity(const float vertex_opacity[4]);
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer) override;
 
   bool WillDraw(DrawMode draw_mode,
diff --git a/cc/layers/ui_resource_layer_impl_unittest.cc b/cc/layers/ui_resource_layer_impl_unittest.cc
index 9241945..4d464f5c 100644
--- a/cc/layers/ui_resource_layer_impl_unittest.cc
+++ b/cc/layers/ui_resource_layer_impl_unittest.cc
@@ -24,14 +24,14 @@
 namespace cc {
 namespace {
 
-scoped_ptr<UIResourceLayerImpl> GenerateUIResourceLayer(
+std::unique_ptr<UIResourceLayerImpl> GenerateUIResourceLayer(
     FakeUIResourceLayerTreeHostImpl* host_impl,
     const gfx::Size& bitmap_size,
     const gfx::Size& layer_size,
     bool opaque,
     UIResourceId uid) {
   gfx::Rect visible_layer_rect(layer_size);
-  scoped_ptr<UIResourceLayerImpl> layer =
+  std::unique_ptr<UIResourceLayerImpl> layer =
       UIResourceLayerImpl::Create(host_impl->active_tree(), 1);
   layer->draw_properties().visible_layer_rect = visible_layer_rect;
   layer->SetBounds(layer_size);
@@ -46,9 +46,9 @@
   return layer;
 }
 
-void QuadSizeTest(scoped_ptr<UIResourceLayerImpl> layer,
+void QuadSizeTest(std::unique_ptr<UIResourceLayerImpl> layer,
                   size_t expected_quad_size) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   AppendQuadsData data;
   layer->AppendQuads(render_pass.get(), &data);
@@ -62,7 +62,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeUIResourceLayerTreeHostImpl host_impl(
       &task_runner_provider, &shared_bitmap_manager, &task_graph_runner);
   host_impl.SetVisible(true);
@@ -74,11 +74,8 @@
   size_t expected_quad_size = 1;
   bool opaque = true;
   UIResourceId uid = 1;
-  scoped_ptr<UIResourceLayerImpl> layer = GenerateUIResourceLayer(&host_impl,
-                                                                  bitmap_size,
-                                                                  layer_size,
-                                                                  opaque,
-                                                                  uid);
+  std::unique_ptr<UIResourceLayerImpl> layer =
+      GenerateUIResourceLayer(&host_impl, bitmap_size, layer_size, opaque, uid);
   QuadSizeTest(std::move(layer), expected_quad_size);
 
   // Make sure we're not appending quads when there are invalid values.
@@ -92,9 +89,9 @@
   QuadSizeTest(std::move(layer), expected_quad_size);
 }
 
-void OpaqueBoundsTest(scoped_ptr<UIResourceLayerImpl> layer,
-                 const gfx::Rect& expected_opaque_bounds) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+void OpaqueBoundsTest(std::unique_ptr<UIResourceLayerImpl> layer,
+                      const gfx::Rect& expected_opaque_bounds) {
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
 
   AppendQuadsData data;
   layer->AppendQuads(render_pass.get(), &data);
@@ -110,7 +107,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeUIResourceLayerTreeHostImpl host_impl(
       &task_runner_provider, &shared_bitmap_manager, &task_graph_runner);
   host_impl.SetVisible(true);
@@ -120,11 +117,8 @@
   gfx::Size layer_size(100, 100);
   bool opaque = false;
   UIResourceId uid = 1;
-  scoped_ptr<UIResourceLayerImpl> layer = GenerateUIResourceLayer(&host_impl,
-                                                                  bitmap_size,
-                                                                  layer_size,
-                                                                  opaque,
-                                                                  uid);
+  std::unique_ptr<UIResourceLayerImpl> layer =
+      GenerateUIResourceLayer(&host_impl, bitmap_size, layer_size, opaque, uid);
   gfx::Rect expected_opaque_bounds;
   OpaqueBoundsTest(std::move(layer), expected_opaque_bounds);
 
@@ -142,7 +136,7 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeUIResourceLayerTreeHostImpl host_impl(
       &task_runner_provider, &shared_bitmap_manager, &task_graph_runner);
   host_impl.SetVisible(true);
@@ -152,7 +146,7 @@
   gfx::Size layer_size(100, 100);
   bool skbitmap_opaque = false;
   UIResourceId uid = 1;
-  scoped_ptr<UIResourceLayerImpl> layer = GenerateUIResourceLayer(
+  std::unique_ptr<UIResourceLayerImpl> layer = GenerateUIResourceLayer(
       &host_impl, bitmap_size, layer_size, skbitmap_opaque, uid);
   layer->SetContentsOpaque(false);
   gfx::Rect expected_opaque_bounds;
diff --git a/cc/layers/ui_resource_layer_unittest.cc b/cc/layers/ui_resource_layer_unittest.cc
index 94efef4..a91d676 100644
--- a/cc/layers/ui_resource_layer_unittest.cc
+++ b/cc/layers/ui_resource_layer_unittest.cc
@@ -62,7 +62,7 @@
 
   FakeLayerTreeHostClient fake_client_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 };
 
 TEST_F(UIResourceLayerTest, SetBitmap) {
@@ -104,7 +104,7 @@
   EXPECT_FALSE(test_layer->DrawsContent());
 
   bool is_opaque = false;
-  scoped_ptr<ScopedUIResource> resource = ScopedUIResource::Create(
+  std::unique_ptr<ScopedUIResource> resource = ScopedUIResource::Create(
       layer_tree_host_.get(), UIResourceBitmap(gfx::Size(10, 10), is_opaque));
   test_layer->SetUIResourceId(resource->id());
   test_layer->Update();
@@ -113,7 +113,7 @@
 
   // ID is preserved even when you set ID first and attach it to the tree.
   layer_tree_host_->SetRootLayer(nullptr);
-  scoped_ptr<ScopedUIResource> shared_resource = ScopedUIResource::Create(
+  std::unique_ptr<ScopedUIResource> shared_resource = ScopedUIResource::Create(
       layer_tree_host_.get(), UIResourceBitmap(gfx::Size(5, 5), is_opaque));
   test_layer->SetUIResourceId(shared_resource->id());
   layer_tree_host_->SetRootLayer(test_layer);
diff --git a/cc/layers/video_layer.cc b/cc/layers/video_layer.cc
index b55d82a..fcb549b 100644
--- a/cc/layers/video_layer.cc
+++ b/cc/layers/video_layer.cc
@@ -22,7 +22,8 @@
 
 VideoLayer::~VideoLayer() {}
 
-scoped_ptr<LayerImpl> VideoLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> VideoLayer::CreateLayerImpl(
+    LayerTreeImpl* tree_impl) {
   return VideoLayerImpl::Create(tree_impl, id(), provider_, video_rotation_);
 }
 
diff --git a/cc/layers/video_layer.h b/cc/layers/video_layer.h
index 4828468..5a74dcc44 100644
--- a/cc/layers/video_layer.h
+++ b/cc/layers/video_layer.h
@@ -24,7 +24,7 @@
   static scoped_refptr<VideoLayer> Create(VideoFrameProvider* provider,
                                           media::VideoRotation video_rotation);
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   bool Update() override;
 
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index f22860c..56eb6776 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -8,6 +8,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/layers/video_frame_provider_client_impl.h"
 #include "cc/quads/io_surface_draw_quad.h"
 #include "cc/quads/stream_video_draw_quad.h"
@@ -27,7 +28,7 @@
 namespace cc {
 
 // static
-scoped_ptr<VideoLayerImpl> VideoLayerImpl::Create(
+std::unique_ptr<VideoLayerImpl> VideoLayerImpl::Create(
     LayerTreeImpl* tree_impl,
     int id,
     VideoFrameProvider* provider,
@@ -39,7 +40,7 @@
       VideoFrameProviderClientImpl::Create(
           provider, tree_impl->GetVideoFrameControllerClient());
 
-  return make_scoped_ptr(new VideoLayerImpl(
+  return base::WrapUnique(new VideoLayerImpl(
       tree_impl, id, std::move(provider_client_impl), video_rotation));
 }
 
@@ -66,9 +67,9 @@
   }
 }
 
-scoped_ptr<LayerImpl> VideoLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> VideoLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
-  return make_scoped_ptr(new VideoLayerImpl(
+  return base::WrapUnique(new VideoLayerImpl(
       tree_impl, id(), provider_client_impl_, video_rotation_));
 }
 
diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h
index 6db1930..4a2480ac 100644
--- a/cc/layers/video_layer_impl.h
+++ b/cc/layers/video_layer_impl.h
@@ -26,14 +26,15 @@
  public:
   // Must be called on the impl thread while the main thread is blocked. This is
   // so that |provider| stays alive while this is being created.
-  static scoped_ptr<VideoLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                           int id,
-                                           VideoFrameProvider* provider,
-                                           media::VideoRotation video_rotation);
+  static std::unique_ptr<VideoLayerImpl> Create(
+      LayerTreeImpl* tree_impl,
+      int id,
+      VideoFrameProvider* provider,
+      media::VideoRotation video_rotation);
   ~VideoLayerImpl() override;
 
   // LayerImpl implementation.
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   bool WillDraw(DrawMode draw_mode,
                 ResourceProvider* resource_provider) override;
   void AppendQuads(RenderPass* render_pass,
@@ -61,7 +62,7 @@
 
   media::VideoRotation video_rotation_;
 
-  scoped_ptr<VideoResourceUpdater> updater_;
+  std::unique_ptr<VideoResourceUpdater> updater_;
   VideoFrameExternalResources::ResourceType frame_resource_type_;
   float frame_resource_offset_;
   float frame_resource_multiplier_;
diff --git a/cc/layers/video_layer_impl_unittest.cc b/cc/layers/video_layer_impl_unittest.cc
index 3558376..4f1c450a 100644
--- a/cc/layers/video_layer_impl_unittest.cc
+++ b/cc/layers/video_layer_impl_unittest.cc
@@ -94,14 +94,14 @@
   auto active_tree = impl.host_impl()->active_tree();
 
   // Create a video layer with no frame on top of another layer.
-  scoped_ptr<LayerImpl> layer_impl = LayerImpl::Create(active_tree, 3);
+  std::unique_ptr<LayerImpl> layer_impl = LayerImpl::Create(active_tree, 3);
   layer_impl->SetForceRenderSurface(true);
   layer_impl->SetBounds(layer_size);
   layer_impl->SetDrawsContent(true);
   const auto& draw_properties = layer_impl->draw_properties();
 
   FakeVideoFrameProvider provider;
-  scoped_ptr<VideoLayerImpl> video_layer_impl = VideoLayerImpl::Create(
+  std::unique_ptr<VideoLayerImpl> video_layer_impl = VideoLayerImpl::Create(
       active_tree, 4, &provider, media::VIDEO_ROTATION_0);
   video_layer_impl->SetBounds(layer_size);
   video_layer_impl->SetDrawsContent(true);
diff --git a/cc/layers/viewport.cc b/cc/layers/viewport.cc
index b54c9cc..d80d40c 100644
--- a/cc/layers/viewport.cc
+++ b/cc/layers/viewport.cc
@@ -5,6 +5,7 @@
 #include "cc/layers/viewport.h"
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/input/top_controls_manager.h"
 #include "cc/trees/layer_tree_host_impl.h"
 #include "cc/trees/layer_tree_impl.h"
@@ -14,9 +15,8 @@
 namespace cc {
 
 // static
-scoped_ptr<Viewport> Viewport::Create(
-    LayerTreeHostImpl* host_impl) {
-  return make_scoped_ptr(new Viewport(host_impl));
+std::unique_ptr<Viewport> Viewport::Create(LayerTreeHostImpl* host_impl) {
+  return base::WrapUnique(new Viewport(host_impl));
 }
 
 Viewport::Viewport(LayerTreeHostImpl* host_impl)
diff --git a/cc/layers/viewport.h b/cc/layers/viewport.h
index 0c92881..2d603f25 100644
--- a/cc/layers/viewport.h
+++ b/cc/layers/viewport.h
@@ -5,9 +5,10 @@
 #ifndef CC_LAYERS_VIEWPORT_H_
 #define CC_LAYERS_VIEWPORT_H_
 
+#include <memory>
+
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/layers/layer_impl.h"
 #include "ui/gfx/geometry/vector2d_f.h"
 
@@ -34,7 +35,7 @@
     gfx::Vector2dF content_scrolled_delta;
   };
 
-  static scoped_ptr<Viewport> Create(LayerTreeHostImpl* host_impl);
+  static std::unique_ptr<Viewport> Create(LayerTreeHostImpl* host_impl);
 
   // Differs from scrolling in that only the visual viewport is moved, without
   // affecting the top controls or outer viewport.
diff --git a/cc/output/begin_frame_args.cc b/cc/output/begin_frame_args.cc
index 98f0a3e..e25d2f5 100644
--- a/cc/output/begin_frame_args.cc
+++ b/cc/output/begin_frame_args.cc
@@ -98,9 +98,9 @@
 #endif
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 BeginFrameArgs::AsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   AsValueInto(state.get());
   return std::move(state);
diff --git a/cc/output/begin_frame_args.h b/cc/output/begin_frame_args.h
index 27496310..c8c7b2f2 100644
--- a/cc/output/begin_frame_args.h
+++ b/cc/output/begin_frame_args.h
@@ -5,9 +5,10 @@
 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_
 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_
 
+#include <memory>
+
 #include "base/location.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/values.h"
 #include "cc/base/cc_export.h"
@@ -83,7 +84,7 @@
 
   bool IsValid() const { return interval >= base::TimeDelta(); }
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
   void AsValueInto(base::trace_event::TracedValue* dict) const;
 
   void ToProtobuf(proto::BeginFrameArgs* proto) const;
diff --git a/cc/output/bsp_tree.cc b/cc/output/bsp_tree.cc
index 6f0b99ea2..080866f5 100644
--- a/cc/output/bsp_tree.cc
+++ b/cc/output/bsp_tree.cc
@@ -4,25 +4,27 @@
 
 #include "cc/output/bsp_tree.h"
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/container_util.h"
 #include "cc/output/bsp_compare_result.h"
 #include "cc/quads/draw_polygon.h"
 
 namespace cc {
 
-BspNode::BspNode(scoped_ptr<DrawPolygon> data) : node_data(std::move(data)) {}
+BspNode::BspNode(std::unique_ptr<DrawPolygon> data)
+    : node_data(std::move(data)) {}
 
 BspNode::~BspNode() {
 }
 
-BspTree::BspTree(std::deque<scoped_ptr<DrawPolygon>>* list) {
+BspTree::BspTree(std::deque<std::unique_ptr<DrawPolygon>>* list) {
   if (list->size() == 0)
     return;
 
-  root_ = make_scoped_ptr(new BspNode(PopFront(list)));
+  root_ = base::WrapUnique(new BspNode(PopFront(list)));
   BuildTree(root_.get(), list);
 }
 
@@ -32,10 +34,11 @@
 // front when the heuristic decides that they're a better choice. This way we
 // can always simply just take from the front of the deque for our node's
 // data.
-void BspTree::BuildTree(BspNode* node,
-                        std::deque<scoped_ptr<DrawPolygon>>* polygon_list) {
-  std::deque<scoped_ptr<DrawPolygon>> front_list;
-  std::deque<scoped_ptr<DrawPolygon>> back_list;
+void BspTree::BuildTree(
+    BspNode* node,
+    std::deque<std::unique_ptr<DrawPolygon>>* polygon_list) {
+  std::deque<std::unique_ptr<DrawPolygon>> front_list;
+  std::deque<std::unique_ptr<DrawPolygon>> back_list;
 
   // We take in a list of polygons at this level of the tree, and have to
   // find a splitting plane, then classify polygons as either in front of
@@ -57,9 +60,9 @@
         break;
       case BSP_SPLIT:
       {
-        scoped_ptr<DrawPolygon> polygon;
-        scoped_ptr<DrawPolygon> new_front;
-        scoped_ptr<DrawPolygon> new_back;
+        std::unique_ptr<DrawPolygon> polygon;
+        std::unique_ptr<DrawPolygon> new_front;
+        std::unique_ptr<DrawPolygon> new_back;
         // Time to split this geometry, *it needs to be split by node_data.
         polygon = PopFront(polygon_list);
         bool split_result =
@@ -86,13 +89,13 @@
 
   // Build the back subtree using the front of the back_list as our splitter.
   if (back_list.size() > 0) {
-    node->back_child = make_scoped_ptr(new BspNode(PopFront(&back_list)));
+    node->back_child = base::WrapUnique(new BspNode(PopFront(&back_list)));
     BuildTree(node->back_child.get(), &back_list);
   }
 
   // Build the front subtree using the front of the front_list as our splitter.
   if (front_list.size() > 0) {
-    node->front_child = make_scoped_ptr(new BspNode(PopFront(&front_list)));
+    node->front_child = base::WrapUnique(new BspNode(PopFront(&front_list)));
     BuildTree(node->front_child.get(), &front_list);
   }
 }
diff --git a/cc/output/bsp_tree.h b/cc/output/bsp_tree.h
index 695c47e5..3c703d2 100644
--- a/cc/output/bsp_tree.h
+++ b/cc/output/bsp_tree.h
@@ -8,9 +8,9 @@
 #include <stddef.h>
 
 #include <deque>
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/output/bsp_compare_result.h"
 #include "cc/quads/draw_polygon.h"
 
@@ -18,22 +18,22 @@
 
 struct BspNode {
   // This represents the splitting plane.
-  scoped_ptr<DrawPolygon> node_data;
+  std::unique_ptr<DrawPolygon> node_data;
   // This represents any coplanar geometry we found while building the BSP.
-  std::vector<scoped_ptr<DrawPolygon>> coplanars_front;
-  std::vector<scoped_ptr<DrawPolygon>> coplanars_back;
+  std::vector<std::unique_ptr<DrawPolygon>> coplanars_front;
+  std::vector<std::unique_ptr<DrawPolygon>> coplanars_back;
 
-  scoped_ptr<BspNode> back_child;
-  scoped_ptr<BspNode> front_child;
+  std::unique_ptr<BspNode> back_child;
+  std::unique_ptr<BspNode> front_child;
 
-  explicit BspNode(scoped_ptr<DrawPolygon> data);
+  explicit BspNode(std::unique_ptr<DrawPolygon> data);
   ~BspNode();
 };
 
 class CC_EXPORT BspTree {
  public:
-  explicit BspTree(std::deque<scoped_ptr<DrawPolygon>>* list);
-  scoped_ptr<BspNode>& root() { return root_; }
+  explicit BspTree(std::deque<std::unique_ptr<DrawPolygon>>* list);
+  std::unique_ptr<BspNode>& root() { return root_; }
 
   template <typename ActionHandlerType>
   void TraverseWithActionHandler(ActionHandlerType* action_handler) const {
@@ -45,10 +45,10 @@
   ~BspTree();
 
  private:
-  scoped_ptr<BspNode> root_;
+  std::unique_ptr<BspNode> root_;
 
-  void FromList(std::vector<scoped_ptr<DrawPolygon>>* list);
-  void BuildTree(BspNode* node, std::deque<scoped_ptr<DrawPolygon>>* data);
+  void FromList(std::vector<std::unique_ptr<DrawPolygon>>* list);
+  void BuildTree(BspNode* node, std::deque<std::unique_ptr<DrawPolygon>>* data);
 
   template <typename ActionHandlerType>
   void WalkInOrderAction(ActionHandlerType* action_handler,
@@ -62,8 +62,8 @@
       const BspNode* node,
       const BspNode* first_child,
       const BspNode* second_child,
-      const std::vector<scoped_ptr<DrawPolygon>>& first_coplanars,
-      const std::vector<scoped_ptr<DrawPolygon>>& second_coplanars) const {
+      const std::vector<std::unique_ptr<DrawPolygon>>& first_coplanars,
+      const std::vector<std::unique_ptr<DrawPolygon>>& second_coplanars) const {
     if (first_child) {
       WalkInOrderRecursion(action_handler, first_child);
     }
diff --git a/cc/output/bsp_tree_unittest.cc b/cc/output/bsp_tree_unittest.cc
index 1d71413..acf2def 100644
--- a/cc/output/bsp_tree_unittest.cc
+++ b/cc/output/bsp_tree_unittest.cc
@@ -2,13 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/output/bsp_tree.h"
+
 #include <stddef.h>
 
 #include <deque>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "cc/output/bsp_tree.h"
 #include "cc/output/bsp_walk_action.h"
 #include "cc/quads/draw_polygon.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -32,7 +33,7 @@
 
 class BspTreeTest {
  public:
-  static void RunTest(std::deque<scoped_ptr<DrawPolygon>>* test_polygons,
+  static void RunTest(std::deque<std::unique_ptr<DrawPolygon>>* test_polygons,
                       const std::vector<int>& compare_list) {
     BspTree bsp_tree(test_polygons);
 
@@ -44,7 +45,7 @@
     EXPECT_TRUE(VerifySidedness(bsp_tree.root()));
   }
 
-  static bool VerifySidedness(const scoped_ptr<BspNode>& node) {
+  static bool VerifySidedness(const std::unique_ptr<BspNode>& node) {
     // We check if both the front and back child nodes have geometry that is
     // completely on the expected side of the current node.
     bool front_ok = true;
@@ -108,14 +109,14 @@
   vertices_c.push_back(gfx::Point3F(10.0f, 0.0f, 5.0f));
   vertices_c.push_back(gfx::Point3F(10.0f, 10.0f, 5.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 1));
-  scoped_ptr<DrawPolygon> polygon_c(
+  std::unique_ptr<DrawPolygon> polygon_c(
       CREATE_DRAW_POLYGON(vertices_c, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 2));
 
-  std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+  std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
   polygon_list.push_back(std::move(polygon_a));
   polygon_list.push_back(std::move(polygon_b));
   polygon_list.push_back(std::move(polygon_c));
@@ -138,12 +139,12 @@
   vertices_b.push_back(gfx::Point3F(0.0f, 5.0f, 5.0f));
   vertices_b.push_back(gfx::Point3F(0.0f, -5.0f, 5.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
 
-  std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+  std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
   polygon_list.push_back(std::move(polygon_a));
   polygon_list.push_back(std::move(polygon_b));
 
@@ -167,12 +168,12 @@
   vertices_b.push_back(gfx::Point3F(0.0f, -5.0f, -10.0f));
   vertices_b.push_back(gfx::Point3F(0.0f, 5.0f, -10.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
 
-  std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+  std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
   polygon_list.push_back(std::move(polygon_a));
   polygon_list.push_back(std::move(polygon_b));
 
@@ -196,12 +197,12 @@
   vertices_b.push_back(gfx::Point3F(0.0f, 5.0f, -10.0f));
   vertices_b.push_back(gfx::Point3F(0.0f, -5.0f, -10.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
 
-  std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+  std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
   polygon_list.push_back(std::move(polygon_b));
   polygon_list.push_back(std::move(polygon_a));
 
@@ -230,14 +231,14 @@
   vertices_c.push_back(gfx::Point3F(5.0f, 0.0f, 5.0f));
   vertices_c.push_back(gfx::Point3F(5.0f, 0.0f, -5.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
-  scoped_ptr<DrawPolygon> polygon_c(
+  std::unique_ptr<DrawPolygon> polygon_c(
       CREATE_DRAW_POLYGON(vertices_c, gfx::Vector3dF(0.0f, 1.0f, 0.0f), 2));
 
-  std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+  std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
   polygon_list.push_back(std::move(polygon_a));
   polygon_list.push_back(std::move(polygon_b));
   polygon_list.push_back(std::move(polygon_c));
@@ -266,19 +267,19 @@
   vertices_c.push_back(gfx::Point3F(3.0f, 3.0f, 0.0f));
   vertices_c.push_back(gfx::Point3F(3.0f, -3.0f, 0.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 1));
-  scoped_ptr<DrawPolygon> polygon_c(
+  std::unique_ptr<DrawPolygon> polygon_c(
       CREATE_DRAW_POLYGON(vertices_c, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 2));
 
-  scoped_ptr<DrawPolygon> polygon_d = polygon_a->CreateCopy();
-  scoped_ptr<DrawPolygon> polygon_e = polygon_b->CreateCopy();
-  scoped_ptr<DrawPolygon> polygon_f = polygon_c->CreateCopy();
+  std::unique_ptr<DrawPolygon> polygon_d = polygon_a->CreateCopy();
+  std::unique_ptr<DrawPolygon> polygon_e = polygon_b->CreateCopy();
+  std::unique_ptr<DrawPolygon> polygon_f = polygon_c->CreateCopy();
 
   {
-    std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+    std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
     polygon_list.push_back(std::move(polygon_a));
     polygon_list.push_back(std::move(polygon_b));
     polygon_list.push_back(std::move(polygon_c));
@@ -290,7 +291,7 @@
 
   // Now check a different order and ensure we get that back as well
   {
-    std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+    std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
     polygon_list.push_back(std::move(polygon_f));
     polygon_list.push_back(std::move(polygon_d));
     polygon_list.push_back(std::move(polygon_e));
@@ -326,16 +327,16 @@
   vertices_d.push_back(gfx::Point3F(0.0f, 15.0f, 15.0f));
   vertices_d.push_back(gfx::Point3F(0.0f, -15.0f, 15.0f));
 
-  scoped_ptr<DrawPolygon> polygon_a(
+  std::unique_ptr<DrawPolygon> polygon_a(
       CREATE_DRAW_POLYGON(vertices_a, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 0));
-  scoped_ptr<DrawPolygon> polygon_b(
+  std::unique_ptr<DrawPolygon> polygon_b(
       CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 1));
-  scoped_ptr<DrawPolygon> polygon_c(
+  std::unique_ptr<DrawPolygon> polygon_c(
       CREATE_DRAW_POLYGON(vertices_c, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 2));
-  scoped_ptr<DrawPolygon> polygon_d(
+  std::unique_ptr<DrawPolygon> polygon_d(
       CREATE_DRAW_POLYGON(vertices_d, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 3));
 
-  std::deque<scoped_ptr<DrawPolygon>> polygon_list;
+  std::deque<std::unique_ptr<DrawPolygon>> polygon_list;
   polygon_list.push_back(std::move(polygon_a));
   polygon_list.push_back(std::move(polygon_b));
   polygon_list.push_back(std::move(polygon_c));
diff --git a/cc/output/bsp_walk_action.cc b/cc/output/bsp_walk_action.cc
index 8a336941..56fca47 100644
--- a/cc/output/bsp_walk_action.cc
+++ b/cc/output/bsp_walk_action.cc
@@ -4,9 +4,9 @@
 
 #include "cc/output/bsp_walk_action.h"
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/output/direct_renderer.h"
 #include "cc/quads/draw_polygon.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/output/bsp_walk_action.h b/cc/output/bsp_walk_action.h
index a89d8ea..3f605dab 100644
--- a/cc/output/bsp_walk_action.h
+++ b/cc/output/bsp_walk_action.h
@@ -5,9 +5,9 @@
 #ifndef CC_OUTPUT_BSP_WALK_ACTION_H_
 #define CC_OUTPUT_BSP_WALK_ACTION_H_
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/output/direct_renderer.h"
 #include "cc/quads/draw_polygon.h"
 
diff --git a/cc/output/compositor_frame.h b/cc/output/compositor_frame.h
index 8a95fff..e5e0c66 100644
--- a/cc/output/compositor_frame.h
+++ b/cc/output/compositor_frame.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_H_
 #define CC_OUTPUT_COMPOSITOR_FRAME_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/compositor_frame_metadata.h"
 #include "cc/output/delegated_frame_data.h"
@@ -23,8 +24,8 @@
   ~CompositorFrame();
 
   CompositorFrameMetadata metadata;
-  scoped_ptr<DelegatedFrameData> delegated_frame_data;
-  scoped_ptr<GLFrameData> gl_frame_data;
+  std::unique_ptr<DelegatedFrameData> delegated_frame_data;
+  std::unique_ptr<GLFrameData> gl_frame_data;
 
   void AssignTo(CompositorFrame* target);
 
diff --git a/cc/output/compositor_frame_ack.h b/cc/output/compositor_frame_ack.h
index a4e161b..55ca7f1 100644
--- a/cc/output/compositor_frame_ack.h
+++ b/cc/output/compositor_frame_ack.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_ACK_H_
 #define CC_OUTPUT_COMPOSITOR_FRAME_ACK_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/gl_frame_data.h"
 #include "cc/resources/returned_resource.h"
@@ -19,7 +20,7 @@
   ~CompositorFrameAck();
 
   ReturnedResourceArray resources;
-  scoped_ptr<GLFrameData> gl_frame_data;
+  std::unique_ptr<GLFrameData> gl_frame_data;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(CompositorFrameAck);
diff --git a/cc/output/copy_output_request.cc b/cc/output/copy_output_request.cc
index 0018edd..05f15ae 100644
--- a/cc/output/copy_output_request.cc
+++ b/cc/output/copy_output_request.cc
@@ -15,10 +15,10 @@
 namespace cc {
 
 // static
-scoped_ptr<CopyOutputRequest> CopyOutputRequest::CreateRelayRequest(
+std::unique_ptr<CopyOutputRequest> CopyOutputRequest::CreateRelayRequest(
     const CopyOutputRequest& original_request,
     const CopyOutputRequestCallback& result_callback) {
-  scoped_ptr<CopyOutputRequest> relay = CreateRequest(result_callback);
+  std::unique_ptr<CopyOutputRequest> relay = CreateRequest(result_callback);
   relay->force_bitmap_result_ = original_request.force_bitmap_result_;
   relay->has_area_ = original_request.has_area_;
   relay->area_ = original_request.area_;
@@ -50,7 +50,7 @@
     SendResult(CopyOutputResult::CreateEmptyResult());
 }
 
-void CopyOutputRequest::SendResult(scoped_ptr<CopyOutputResult> result) {
+void CopyOutputRequest::SendResult(std::unique_ptr<CopyOutputResult> result) {
   bool success = !result->IsEmpty();
   base::ResetAndReturn(&result_callback_).Run(std::move(result));
   TRACE_EVENT_ASYNC_END1("cc", "CopyOutputRequest", this, "success", success);
@@ -60,14 +60,14 @@
   SendResult(CopyOutputResult::CreateEmptyResult());
 }
 
-void CopyOutputRequest::SendBitmapResult(scoped_ptr<SkBitmap> bitmap) {
+void CopyOutputRequest::SendBitmapResult(std::unique_ptr<SkBitmap> bitmap) {
   SendResult(CopyOutputResult::CreateBitmapResult(std::move(bitmap)));
 }
 
 void CopyOutputRequest::SendTextureResult(
     const gfx::Size& size,
     const TextureMailbox& texture_mailbox,
-    scoped_ptr<SingleReleaseCallback> release_callback) {
+    std::unique_ptr<SingleReleaseCallback> release_callback) {
   DCHECK(texture_mailbox.IsTexture());
   SendResult(CopyOutputResult::CreateTextureResult(
       size, texture_mailbox, std::move(release_callback)));
diff --git a/cc/output/copy_output_request.h b/cc/output/copy_output_request.h
index c634db4..4ce583a 100644
--- a/cc/output/copy_output_request.h
+++ b/cc/output/copy_output_request.h
@@ -5,8 +5,10 @@
 #ifndef CC_OUTPUT_COPY_OUTPUT_REQUEST_H_
 #define CC_OUTPUT_COPY_OUTPUT_REQUEST_H_
 
+#include <memory>
+
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/single_release_callback.h"
 #include "cc/resources/texture_mailbox.h"
@@ -19,21 +21,21 @@
 
 class CC_EXPORT CopyOutputRequest {
  public:
-  typedef base::Callback<void(scoped_ptr<CopyOutputResult> result)>
+  typedef base::Callback<void(std::unique_ptr<CopyOutputResult> result)>
       CopyOutputRequestCallback;
 
-  static scoped_ptr<CopyOutputRequest> CreateEmptyRequest() {
-    return make_scoped_ptr(new CopyOutputRequest);
+  static std::unique_ptr<CopyOutputRequest> CreateEmptyRequest() {
+    return base::WrapUnique(new CopyOutputRequest);
   }
-  static scoped_ptr<CopyOutputRequest> CreateRequest(
+  static std::unique_ptr<CopyOutputRequest> CreateRequest(
       const CopyOutputRequestCallback& result_callback) {
-    return make_scoped_ptr(new CopyOutputRequest(false, result_callback));
+    return base::WrapUnique(new CopyOutputRequest(false, result_callback));
   }
-  static scoped_ptr<CopyOutputRequest> CreateBitmapRequest(
+  static std::unique_ptr<CopyOutputRequest> CreateBitmapRequest(
       const CopyOutputRequestCallback& result_callback) {
-    return make_scoped_ptr(new CopyOutputRequest(true, result_callback));
+    return base::WrapUnique(new CopyOutputRequest(true, result_callback));
   }
-  static scoped_ptr<CopyOutputRequest> CreateRelayRequest(
+  static std::unique_ptr<CopyOutputRequest> CreateRelayRequest(
       const CopyOutputRequest& original_request,
       const CopyOutputRequestCallback& result_callback);
 
@@ -67,12 +69,13 @@
   const TextureMailbox& texture_mailbox() const { return texture_mailbox_; }
 
   void SendEmptyResult();
-  void SendBitmapResult(scoped_ptr<SkBitmap> bitmap);
-  void SendTextureResult(const gfx::Size& size,
-                         const TextureMailbox& texture_mailbox,
-                         scoped_ptr<SingleReleaseCallback> release_callback);
+  void SendBitmapResult(std::unique_ptr<SkBitmap> bitmap);
+  void SendTextureResult(
+      const gfx::Size& size,
+      const TextureMailbox& texture_mailbox,
+      std::unique_ptr<SingleReleaseCallback> release_callback);
 
-  void SendResult(scoped_ptr<CopyOutputResult> result);
+  void SendResult(std::unique_ptr<CopyOutputResult> result);
 
  private:
   CopyOutputRequest();
diff --git a/cc/output/copy_output_result.cc b/cc/output/copy_output_result.cc
index 84e9ef8..3a349f2 100644
--- a/cc/output/copy_output_result.cc
+++ b/cc/output/copy_output_result.cc
@@ -12,7 +12,7 @@
 
 CopyOutputResult::CopyOutputResult() {}
 
-CopyOutputResult::CopyOutputResult(scoped_ptr<SkBitmap> bitmap)
+CopyOutputResult::CopyOutputResult(std::unique_ptr<SkBitmap> bitmap)
     : size_(bitmap->width(), bitmap->height()), bitmap_(std::move(bitmap)) {
   DCHECK(bitmap_);
 }
@@ -20,7 +20,7 @@
 CopyOutputResult::CopyOutputResult(
     const gfx::Size& size,
     const TextureMailbox& texture_mailbox,
-    scoped_ptr<SingleReleaseCallback> release_callback)
+    std::unique_ptr<SingleReleaseCallback> release_callback)
     : size_(size),
       texture_mailbox_(texture_mailbox),
       release_callback_(std::move(release_callback)) {
@@ -32,13 +32,13 @@
     release_callback_->Run(gpu::SyncToken(), false);
 }
 
-scoped_ptr<SkBitmap> CopyOutputResult::TakeBitmap() {
+std::unique_ptr<SkBitmap> CopyOutputResult::TakeBitmap() {
   return std::move(bitmap_);
 }
 
 void CopyOutputResult::TakeTexture(
     TextureMailbox* texture_mailbox,
-    scoped_ptr<SingleReleaseCallback>* release_callback) {
+    std::unique_ptr<SingleReleaseCallback>* release_callback) {
   *texture_mailbox = texture_mailbox_;
   *release_callback = std::move(release_callback_);
 
diff --git a/cc/output/copy_output_result.h b/cc/output/copy_output_result.h
index 57f0cca..a64fc51 100644
--- a/cc/output/copy_output_result.h
+++ b/cc/output/copy_output_result.h
@@ -5,7 +5,9 @@
 #ifndef CC_OUTPUT_COPY_OUTPUT_RESULT_H_
 #define CC_OUTPUT_COPY_OUTPUT_RESULT_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/single_release_callback.h"
 #include "cc/resources/texture_mailbox.h"
@@ -18,19 +20,19 @@
 
 class CC_EXPORT CopyOutputResult {
  public:
-  static scoped_ptr<CopyOutputResult> CreateEmptyResult() {
-    return make_scoped_ptr(new CopyOutputResult);
+  static std::unique_ptr<CopyOutputResult> CreateEmptyResult() {
+    return base::WrapUnique(new CopyOutputResult);
   }
-  static scoped_ptr<CopyOutputResult> CreateBitmapResult(
-      scoped_ptr<SkBitmap> bitmap) {
-    return make_scoped_ptr(new CopyOutputResult(std::move(bitmap)));
+  static std::unique_ptr<CopyOutputResult> CreateBitmapResult(
+      std::unique_ptr<SkBitmap> bitmap) {
+    return base::WrapUnique(new CopyOutputResult(std::move(bitmap)));
   }
-  static scoped_ptr<CopyOutputResult> CreateTextureResult(
+  static std::unique_ptr<CopyOutputResult> CreateTextureResult(
       const gfx::Size& size,
       const TextureMailbox& texture_mailbox,
-      scoped_ptr<SingleReleaseCallback> release_callback) {
-    return make_scoped_ptr(new CopyOutputResult(size, texture_mailbox,
-                                                std::move(release_callback)));
+      std::unique_ptr<SingleReleaseCallback> release_callback) {
+    return base::WrapUnique(new CopyOutputResult(size, texture_mailbox,
+                                                 std::move(release_callback)));
   }
 
   ~CopyOutputResult();
@@ -40,21 +42,22 @@
   bool HasTexture() const { return texture_mailbox_.IsValid(); }
 
   gfx::Size size() const { return size_; }
-  scoped_ptr<SkBitmap> TakeBitmap();
+  std::unique_ptr<SkBitmap> TakeBitmap();
   void TakeTexture(TextureMailbox* texture_mailbox,
-                   scoped_ptr<SingleReleaseCallback>* release_callback);
+                   std::unique_ptr<SingleReleaseCallback>* release_callback);
 
  private:
   CopyOutputResult();
-  explicit CopyOutputResult(scoped_ptr<SkBitmap> bitmap);
-  explicit CopyOutputResult(const gfx::Size& size,
-                            const TextureMailbox& texture_mailbox,
-                            scoped_ptr<SingleReleaseCallback> release_callback);
+  explicit CopyOutputResult(std::unique_ptr<SkBitmap> bitmap);
+  explicit CopyOutputResult(
+      const gfx::Size& size,
+      const TextureMailbox& texture_mailbox,
+      std::unique_ptr<SingleReleaseCallback> release_callback);
 
   gfx::Size size_;
-  scoped_ptr<SkBitmap> bitmap_;
+  std::unique_ptr<SkBitmap> bitmap_;
   TextureMailbox texture_mailbox_;
-  scoped_ptr<SingleReleaseCallback> release_callback_;
+  std::unique_ptr<SingleReleaseCallback> release_callback_;
 };
 
 }  // namespace cc
diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc
index 1bd7d0a..a3746cc 100644
--- a/cc/output/delegating_renderer.cc
+++ b/cc/output/delegating_renderer.cc
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/output/compositor_frame_ack.h"
 #include "cc/output/context_provider.h"
@@ -20,12 +21,12 @@
 
 namespace cc {
 
-scoped_ptr<DelegatingRenderer> DelegatingRenderer::Create(
+std::unique_ptr<DelegatingRenderer> DelegatingRenderer::Create(
     RendererClient* client,
     const RendererSettings* settings,
     OutputSurface* output_surface,
     ResourceProvider* resource_provider) {
-  return make_scoped_ptr(new DelegatingRenderer(
+  return base::WrapUnique(new DelegatingRenderer(
       client, settings, output_surface, resource_provider));
 }
 
@@ -81,7 +82,7 @@
 
   DCHECK(!delegated_frame_data_);
 
-  delegated_frame_data_ = make_scoped_ptr(new DelegatedFrameData);
+  delegated_frame_data_ = base::WrapUnique(new DelegatedFrameData);
   DelegatedFrameData& out_data = *delegated_frame_data_;
   out_data.device_scale_factor = device_scale_factor;
   // Move the render passes and resources into the |out_frame|.
diff --git a/cc/output/delegating_renderer.h b/cc/output/delegating_renderer.h
index 4b0c9cc6..2ad09ce4 100644
--- a/cc/output/delegating_renderer.h
+++ b/cc/output/delegating_renderer.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_
 #define CC_OUTPUT_DELEGATING_RENDERER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/renderer.h"
@@ -18,7 +19,7 @@
 
 class CC_EXPORT DelegatingRenderer : public Renderer {
  public:
-  static scoped_ptr<DelegatingRenderer> Create(
+  static std::unique_ptr<DelegatingRenderer> Create(
       RendererClient* client,
       const RendererSettings* settings,
       OutputSurface* output_surface,
@@ -49,7 +50,7 @@
   OutputSurface* output_surface_;
   ResourceProvider* resource_provider_;
   RendererCapabilitiesImpl capabilities_;
-  scoped_ptr<DelegatedFrameData> delegated_frame_data_;
+  std::unique_ptr<DelegatedFrameData> delegated_frame_data_;
 
   DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
 };
diff --git a/cc/output/delegating_renderer_unittest.cc b/cc/output/delegating_renderer_unittest.cc
index 63b4e0c6..ab88909 100644
--- a/cc/output/delegating_renderer_unittest.cc
+++ b/cc/output/delegating_renderer_unittest.cc
@@ -18,8 +18,8 @@
   DelegatingRendererTest() : LayerTreeTest(), output_surface_(NULL) {}
   ~DelegatingRendererTest() override {}
 
-  scoped_ptr<OutputSurface> CreateOutputSurface() override {
-    scoped_ptr<FakeOutputSurface> output_surface =
+  std::unique_ptr<OutputSurface> CreateOutputSurface() override {
+    std::unique_ptr<FakeOutputSurface> output_surface =
         FakeOutputSurface::CreateDelegating3d();
     output_surface_ = output_surface.get();
     return std::move(output_surface);
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 7446afdc..8bb36e5 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -181,7 +181,7 @@
 
   for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i) {
     if (render_pass_textures_.count(render_passes_in_draw_order[i]->id) == 0) {
-      scoped_ptr<ScopedResource> texture =
+      std::unique_ptr<ScopedResource> texture =
           ScopedResource::Create(resource_provider_);
       render_pass_textures_[render_passes_in_draw_order[i]->id] =
           std::move(texture);
@@ -397,7 +397,7 @@
 }
 
 void DirectRenderer::FlushPolygons(
-    std::deque<scoped_ptr<DrawPolygon>>* poly_list,
+    std::deque<std::unique_ptr<DrawPolygon>>* poly_list,
     DrawingFrame* frame,
     const gfx::Rect& render_pass_scissor,
     bool use_render_pass_scissor) {
@@ -482,7 +482,7 @@
       MoveFromDrawToWindowSpace(frame, render_pass_scissor_in_draw_space));
 
   const QuadList& quad_list = render_pass->quad_list;
-  std::deque<scoped_ptr<DrawPolygon>> poly_list;
+  std::deque<std::unique_ptr<DrawPolygon>> poly_list;
 
   int next_polygon_id = 0;
   int last_sorting_context_id = 0;
@@ -504,7 +504,7 @@
     // This layer is in a 3D sorting context so we add it to the list of
     // polygons to go into the BSP tree.
     if (quad.shared_quad_state->sorting_context_id != 0) {
-      scoped_ptr<DrawPolygon> new_polygon(new DrawPolygon(
+      std::unique_ptr<DrawPolygon> new_polygon(new DrawPolygon(
           *it, gfx::RectF(quad.visible_rect),
           quad.shared_quad_state->quad_to_target_transform, next_polygon_id++));
       if (new_polygon->points().size() > 2u) {
diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h
index 1328a3d..88fff7b 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -106,7 +106,7 @@
 
   static gfx::Size RenderPassTextureSize(const RenderPass* render_pass);
 
-  void FlushPolygons(std::deque<scoped_ptr<DrawPolygon>>* poly_list,
+  void FlushPolygons(std::deque<std::unique_ptr<DrawPolygon>>* poly_list,
                      DrawingFrame* frame,
                      const gfx::Rect& render_pass_scissor,
                      bool use_render_pass_scissor);
@@ -140,14 +140,16 @@
 
   virtual void CopyCurrentRenderPassToBitmap(
       DrawingFrame* frame,
-      scoped_ptr<CopyOutputRequest> request) = 0;
+      std::unique_ptr<CopyOutputRequest> request) = 0;
 
   // TODO(danakj): Just use a vector of pairs here? Hash map is way overkill.
-  std::unordered_map<RenderPassId, scoped_ptr<ScopedResource>, RenderPassIdHash>
+  std::unordered_map<RenderPassId,
+                     std::unique_ptr<ScopedResource>,
+                     RenderPassIdHash>
       render_pass_textures_;
   OutputSurface* output_surface_;
   ResourceProvider* resource_provider_;
-  scoped_ptr<OverlayProcessor> overlay_processor_;
+  std::unique_ptr<OverlayProcessor> overlay_processor_;
 
   // For use in coordinate conversion, this stores the output rect, viewport
   // rect (= unflipped version of glViewport rect), the size of target
diff --git a/cc/output/filter_operation.cc b/cc/output/filter_operation.cc
index a37d27d..1b2cca7 100644
--- a/cc/output/filter_operation.cc
+++ b/cc/output/filter_operation.cc
@@ -303,7 +303,7 @@
     case FilterOperation::ALPHA_THRESHOLD: {
         value->SetDouble("inner_threshold", amount_);
         value->SetDouble("outer_threshold", outer_threshold_);
-        scoped_ptr<base::ListValue> region_value(new base::ListValue());
+        std::unique_ptr<base::ListValue> region_value(new base::ListValue());
         value->BeginArray("region");
         for (SkRegion::Iterator it(region_); !it.done(); it.next()) {
           value->AppendInteger(it.rect().x());
diff --git a/cc/output/filter_operation.h b/cc/output/filter_operation.h
index 44590c2..fae06f8 100644
--- a/cc/output/filter_operation.h
+++ b/cc/output/filter_operation.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_FILTER_OPERATION_H_
 #define CC_OUTPUT_FILTER_OPERATION_H_
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "skia/ext/refptr.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/cc/output/filter_operations.h b/cc/output/filter_operations.h
index 6769969..13926b5 100644
--- a/cc/output/filter_operations.h
+++ b/cc/output/filter_operations.h
@@ -7,10 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/output/filter_operation.h"
 
 namespace base {
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index f618cfd..6487e2e 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -9,13 +9,14 @@
 
 #include <algorithm>
 #include <limits>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -158,14 +159,14 @@
 
 class GLRenderer::ScopedUseGrContext {
  public:
-  static scoped_ptr<ScopedUseGrContext> Create(GLRenderer* renderer,
-                                               DrawingFrame* frame) {
+  static std::unique_ptr<ScopedUseGrContext> Create(GLRenderer* renderer,
+                                                    DrawingFrame* frame) {
     // GrContext for filters is created lazily, and may fail if the context
     // is lost.
     // TODO(vmiura,bsalomon): crbug.com/487850 Ensure that
     // ContextProvider::GrContext() does not return NULL.
     if (renderer->output_surface_->context_provider()->GrContext())
-      return make_scoped_ptr(new ScopedUseGrContext(renderer, frame));
+      return base::WrapUnique(new ScopedUseGrContext(renderer, frame));
     return nullptr;
   }
 
@@ -189,7 +190,7 @@
     // scoped_gpu_raster_ passes context control to Skia.
   }
 
-  scoped_ptr<ScopedGpuRaster> scoped_gpu_raster_;
+  std::unique_ptr<ScopedGpuRaster> scoped_gpu_raster_;
   GLRenderer* renderer_;
   DrawingFrame* frame_;
 
@@ -199,7 +200,7 @@
 struct GLRenderer::PendingAsyncReadPixels {
   PendingAsyncReadPixels() : buffer(0) {}
 
-  scoped_ptr<CopyOutputRequest> copy_request;
+  std::unique_ptr<CopyOutputRequest> copy_request;
   base::CancelableClosure finished_read_pixels_callback;
   unsigned buffer;
 
@@ -299,19 +300,16 @@
   DISALLOW_COPY_AND_ASSIGN(SyncQuery);
 };
 
-scoped_ptr<GLRenderer> GLRenderer::Create(
+std::unique_ptr<GLRenderer> GLRenderer::Create(
     RendererClient* client,
     const RendererSettings* settings,
     OutputSurface* output_surface,
     ResourceProvider* resource_provider,
     TextureMailboxDeleter* texture_mailbox_deleter,
     int highp_threshold_min) {
-  return make_scoped_ptr(new GLRenderer(client,
-                                        settings,
-                                        output_surface,
-                                        resource_provider,
-                                        texture_mailbox_deleter,
-                                        highp_threshold_min));
+  return base::WrapUnique(
+      new GLRenderer(client, settings, output_surface, resource_provider,
+                     texture_mailbox_deleter, highp_threshold_min));
 }
 
 GLRenderer::GLRenderer(RendererClient* client,
@@ -480,7 +478,7 @@
     }
 
     current_sync_query_ = available_sync_queries_.empty()
-                              ? make_scoped_ptr(new SyncQuery(gl_))
+                              ? base::WrapUnique(new SyncQuery(gl_))
                               : PopFront(&available_sync_queries_);
 
     read_lock_fence = current_sync_query_->Begin();
@@ -598,7 +596,7 @@
 }
 
 static skia::RefPtr<SkImage> ApplyImageFilter(
-    scoped_ptr<GLRenderer::ScopedUseGrContext> use_gr_context,
+    std::unique_ptr<GLRenderer::ScopedUseGrContext> use_gr_context,
     ResourceProvider* resource_provider,
     const gfx::RectF& src_rect,
     const gfx::RectF& dst_rect,
@@ -835,9 +833,9 @@
   return backdrop_rect;
 }
 
-scoped_ptr<ScopedResource> GLRenderer::GetBackdropTexture(
+std::unique_ptr<ScopedResource> GLRenderer::GetBackdropTexture(
     const gfx::Rect& bounding_rect) {
-  scoped_ptr<ScopedResource> device_background_texture =
+  std::unique_ptr<ScopedResource> device_background_texture =
       ScopedResource::Create(resource_provider_);
   // CopyTexImage2D fails when called on a texture having immutable storage.
   device_background_texture->Allocate(
@@ -927,7 +925,7 @@
       ShouldApplyBackgroundFilters(quad) ||
       settings_->force_blending_with_shaders;
 
-  scoped_ptr<ScopedResource> background_texture;
+  std::unique_ptr<ScopedResource> background_texture;
   skia::RefPtr<SkImage> background_image;
   GLuint background_image_id = 0;
   gfx::Rect background_rect;
@@ -1041,7 +1039,7 @@
     }
   }
 
-  scoped_ptr<ResourceProvider::ScopedSamplerGL> mask_resource_lock;
+  std::unique_ptr<ResourceProvider::ScopedSamplerGL> mask_resource_lock;
   unsigned mask_texture_id = 0;
   SamplerType mask_sampler = SAMPLER_TYPE_NA;
   if (quad->mask_resource_id()) {
@@ -1051,13 +1049,13 @@
     mask_sampler = SamplerTypeFromTextureTarget(mask_resource_lock->target());
   }
 
-  scoped_ptr<ResourceProvider::ScopedSamplerGL> contents_resource_lock;
+  std::unique_ptr<ResourceProvider::ScopedSamplerGL> contents_resource_lock;
   if (filter_image_id) {
     DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
     gl_->BindTexture(GL_TEXTURE_2D, filter_image_id);
   } else {
     contents_resource_lock =
-        make_scoped_ptr(new ResourceProvider::ScopedSamplerGL(
+        base::WrapUnique(new ResourceProvider::ScopedSamplerGL(
             resource_provider_, contents_texture->id(), GL_LINEAR));
     DCHECK_EQ(static_cast<GLenum>(GL_TEXTURE_2D),
               contents_resource_lock->target());
@@ -1220,7 +1218,8 @@
     gl_->Uniform4fv(locations.color_offset, 1, offset);
   }
 
-  scoped_ptr<ResourceProvider::ScopedSamplerGL> shader_background_sampler_lock;
+  std::unique_ptr<ResourceProvider::ScopedSamplerGL>
+      shader_background_sampler_lock;
   if (locations.backdrop != -1) {
     DCHECK(background_texture || background_image_id);
     DCHECK_NE(locations.backdrop, 0);
@@ -1240,11 +1239,10 @@
         gl_->Uniform1i(locations.original_backdrop, ++last_texture_unit);
     }
     if (background_texture) {
-      shader_background_sampler_lock = make_scoped_ptr(
-          new ResourceProvider::ScopedSamplerGL(resource_provider_,
-                                                background_texture->id(),
-                                                GL_TEXTURE0 + last_texture_unit,
-                                                GL_LINEAR));
+      shader_background_sampler_lock =
+          base::WrapUnique(new ResourceProvider::ScopedSamplerGL(
+              resource_provider_, background_texture->id(),
+              GL_TEXTURE0 + last_texture_unit, GL_LINEAR));
       DCHECK_EQ(static_cast<GLenum>(GL_TEXTURE_2D),
                 shader_background_sampler_lock->target());
     }
@@ -1968,7 +1966,7 @@
   ResourceProvider::ScopedSamplerGL v_plane_lock(
       resource_provider_, quad->v_plane_resource_id(), GL_TEXTURE3, GL_LINEAR);
   DCHECK_EQ(y_plane_lock.target(), v_plane_lock.target());
-  scoped_ptr<ResourceProvider::ScopedSamplerGL> a_plane_lock;
+  std::unique_ptr<ResourceProvider::ScopedSamplerGL> a_plane_lock;
   if (use_alpha_plane) {
     a_plane_lock.reset(new ResourceProvider::ScopedSamplerGL(
         resource_provider_, quad->a_plane_resource_id(), GL_TEXTURE4,
@@ -2542,7 +2540,7 @@
 
 void GLRenderer::CopyCurrentRenderPassToBitmap(
     DrawingFrame* frame,
-    scoped_ptr<CopyOutputRequest> request) {
+    std::unique_ptr<CopyOutputRequest> request) {
   TRACE_EVENT0("cc", "GLRenderer::CopyCurrentRenderPassToBitmap");
   gfx::Rect copy_rect = frame->current_render_pass->output_rect;
   if (request->has_area())
@@ -2656,7 +2654,7 @@
 
   CompositorFrame compositor_frame;
   compositor_frame.metadata = metadata;
-  compositor_frame.gl_frame_data = make_scoped_ptr(new GLFrameData);
+  compositor_frame.gl_frame_data = base::WrapUnique(new GLFrameData);
   compositor_frame.gl_frame_data->size = surface_size;
   if (capabilities_.using_partial_swap) {
     // If supported, we can save significant bandwidth by only swapping the
@@ -2732,7 +2730,7 @@
 void GLRenderer::GetFramebufferPixelsAsync(
     const DrawingFrame* frame,
     const gfx::Rect& rect,
-    scoped_ptr<CopyOutputRequest> request) {
+    std::unique_ptr<CopyOutputRequest> request) {
   DCHECK(!request->IsEmpty());
   if (request->IsEmpty())
     return;
@@ -2783,7 +2781,7 @@
 
     TextureMailbox texture_mailbox(mailbox, sync_token, GL_TEXTURE_2D);
 
-    scoped_ptr<SingleReleaseCallback> release_callback;
+    std::unique_ptr<SingleReleaseCallback> release_callback;
     if (own_mailbox) {
       gl_->BindTexture(GL_TEXTURE_2D, 0);
       release_callback = texture_mailbox_deleter_->GetReleaseCallback(
@@ -2799,7 +2797,8 @@
 
   DCHECK(request->force_bitmap_result());
 
-  scoped_ptr<PendingAsyncReadPixels> pending_read(new PendingAsyncReadPixels);
+  std::unique_ptr<PendingAsyncReadPixels> pending_read(
+      new PendingAsyncReadPixels);
   pending_read->copy_request = std::move(request);
   pending_async_read_pixels_.insert(pending_async_read_pixels_.begin(),
                                     std::move(pending_read));
@@ -2863,7 +2862,7 @@
   PendingAsyncReadPixels* current_read = iter->get();
 
   uint8_t* src_pixels = NULL;
-  scoped_ptr<SkBitmap> bitmap;
+  std::unique_ptr<SkBitmap> bitmap;
 
   if (source_buffer != 0) {
     gl_->BindBuffer(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, source_buffer);
@@ -2873,7 +2872,7 @@
     if (src_pixels) {
       bitmap.reset(new SkBitmap);
       bitmap->allocN32Pixels(size.width(), size.height());
-      scoped_ptr<SkAutoLockPixels> lock(new SkAutoLockPixels(*bitmap));
+      std::unique_ptr<SkAutoLockPixels> lock(new SkAutoLockPixels(*bitmap));
       uint8_t* dest_pixels = static_cast<uint8_t*>(bitmap->getPixels());
 
       size_t row_bytes = size.width() * 4;
@@ -2950,7 +2949,7 @@
   SetStencilEnabled(false);
   gl_->BindFramebuffer(GL_FRAMEBUFFER, offscreen_framebuffer_id_);
   current_framebuffer_lock_ =
-      make_scoped_ptr(new ResourceProvider::ScopedWriteLockGL(
+      base::WrapUnique(new ResourceProvider::ScopedWriteLockGL(
           resource_provider_, texture->id()));
   unsigned texture_id = current_framebuffer_lock_->texture_id();
   gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
@@ -2992,8 +2991,8 @@
   gl_->GenFramebuffers(1, &offscreen_framebuffer_id_);
 
   shared_geometry_ =
-      make_scoped_ptr(new StaticGeometryBinding(gl_, QuadVertexRect()));
-  clipped_geometry_ = make_scoped_ptr(new DynamicGeometryBinding(gl_));
+      base::WrapUnique(new StaticGeometryBinding(gl_, QuadVertexRect()));
+  clipped_geometry_ = base::WrapUnique(new DynamicGeometryBinding(gl_));
 }
 
 void GLRenderer::PrepareGeometry(BoundGeometry binding) {
@@ -3547,7 +3546,7 @@
     unsigned texture_id = 0;
     if (ca_layer_overlay.contents_resource_id) {
       pending_overlay_resources_.push_back(
-          make_scoped_ptr(new ResourceProvider::ScopedReadLockGL(
+          base::WrapUnique(new ResourceProvider::ScopedReadLockGL(
               resource_provider_, ca_layer_overlay.contents_resource_id)));
       texture_id = pending_overlay_resources_.back()->texture_id();
     }
@@ -3588,7 +3587,7 @@
       DCHECK(texture_id || IsContextLost());
     } else {
       pending_overlay_resources_.push_back(
-          make_scoped_ptr(new ResourceProvider::ScopedReadLockGL(
+          base::WrapUnique(new ResourceProvider::ScopedReadLockGL(
               resource_provider_, overlay.resource_id)));
       texture_id = pending_overlay_resources_.back()->texture_id();
     }
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index 321c2377..7466581 100644
--- a/cc/output/gl_renderer.h
+++ b/cc/output/gl_renderer.h
@@ -49,7 +49,7 @@
  public:
   class ScopedUseGrContext;
 
-  static scoped_ptr<GLRenderer> Create(
+  static std::unique_ptr<GLRenderer> Create(
       RendererClient* client,
       const RendererSettings* settings,
       OutputSurface* output_surface,
@@ -88,7 +88,7 @@
 
   void GetFramebufferPixelsAsync(const DrawingFrame* frame,
                                  const gfx::Rect& rect,
-                                 scoped_ptr<CopyOutputRequest> request);
+                                 std::unique_ptr<CopyOutputRequest> request);
   void GetFramebufferTexture(unsigned texture_id,
                              ResourceFormat texture_format,
                              const gfx::Rect& device_rect);
@@ -118,7 +118,7 @@
   void EnsureScissorTestDisabled() override;
   void CopyCurrentRenderPassToBitmap(
       DrawingFrame* frame,
-      scoped_ptr<CopyOutputRequest> request) override;
+      std::unique_ptr<CopyOutputRequest> request) override;
   void FinishDrawingQuadList() override;
 
   // Returns true if quad requires antialiasing and false otherwise.
@@ -169,7 +169,8 @@
       const gfx::Transform& contents_device_transform,
       const gfx::QuadF* clip_region,
       bool use_aa);
-  scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect);
+  std::unique_ptr<ScopedResource> GetBackdropTexture(
+      const gfx::Rect& bounding_rect);
 
   static bool ShouldApplyBackgroundFilters(const RenderPassDrawQuad* quad);
   skia::RefPtr<SkImage> ApplyBackgroundFilters(
@@ -240,7 +241,7 @@
   void InitializeSharedObjects();
   void CleanupSharedObjects();
 
-  typedef base::Callback<void(scoped_ptr<CopyOutputRequest> copy_request,
+  typedef base::Callback<void(std::unique_ptr<CopyOutputRequest> copy_request,
                               bool success)>
       AsyncGetFramebufferPixelsCleanupCallback;
   void FinishedReadback(unsigned source_buffer,
@@ -259,7 +260,7 @@
   void ScheduleOverlays(DrawingFrame* frame);
 
   using OverlayResourceLockList =
-      std::vector<scoped_ptr<ResourceProvider::ScopedReadLockGL>>;
+      std::vector<std::unique_ptr<ResourceProvider::ScopedReadLockGL>>;
   OverlayResourceLockList pending_overlay_resources_;
   std::deque<OverlayResourceLockList> swapped_overlay_resources_;
 
@@ -267,8 +268,8 @@
 
   unsigned offscreen_framebuffer_id_;
 
-  scoped_ptr<StaticGeometryBinding> shared_geometry_;
-  scoped_ptr<DynamicGeometryBinding> clipped_geometry_;
+  std::unique_ptr<StaticGeometryBinding> shared_geometry_;
+  std::unique_ptr<DynamicGeometryBinding> clipped_geometry_;
   gfx::QuadF shared_geometry_quad_;
 
   // This block of bindings defines all of the programs used by the compositor
@@ -498,14 +499,16 @@
   int highp_threshold_cache_;
 
   struct PendingAsyncReadPixels;
-  std::vector<scoped_ptr<PendingAsyncReadPixels>> pending_async_read_pixels_;
+  std::vector<std::unique_ptr<PendingAsyncReadPixels>>
+      pending_async_read_pixels_;
 
-  scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_;
+  std::unique_ptr<ResourceProvider::ScopedWriteLockGL>
+      current_framebuffer_lock_;
 
   class SyncQuery;
-  std::deque<scoped_ptr<SyncQuery>> pending_sync_queries_;
-  std::deque<scoped_ptr<SyncQuery>> available_sync_queries_;
-  scoped_ptr<SyncQuery> current_sync_query_;
+  std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_;
+  std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_;
+  std::unique_ptr<SyncQuery> current_sync_query_;
   bool use_sync_query_;
   bool use_blend_equation_advanced_;
   bool use_blend_equation_advanced_coherent_;
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index ba7ac39..641b4587 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -9,6 +9,7 @@
 #include <set>
 
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/base/math_util.h"
@@ -346,21 +347,20 @@
     shared_bitmap_manager_.reset(new TestSharedBitmapManager());
     resource_provider_ = FakeResourceProvider::Create(
         output_surface_.get(), shared_bitmap_manager_.get());
-    renderer_ = make_scoped_ptr(new FakeRendererGL(&renderer_client_,
-                                                   &settings_,
-                                                   output_surface_.get(),
-                                                   resource_provider_.get()));
+    renderer_ = base::WrapUnique(
+        new FakeRendererGL(&renderer_client_, &settings_, output_surface_.get(),
+                           resource_provider_.get()));
   }
 
   void SwapBuffers() { renderer_->SwapBuffers(CompositorFrameMetadata()); }
 
   RendererSettings settings_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
   FakeRendererClient renderer_client_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<FakeRendererGL> renderer_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<FakeRendererGL> renderer_;
 };
 
 // Closing the namespace here so that GLRendererShaderTest can take advantage
@@ -478,11 +478,11 @@
 
   RendererSettings settings_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
   FakeRendererClient renderer_client_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<FakeRendererGL> renderer_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<FakeRendererGL> renderer_;
 };
 
 namespace {
@@ -667,14 +667,16 @@
 };
 TEST_F(GLRendererTest, InitializationDoesNotMakeSynchronousCalls) {
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
-      scoped_ptr<TestWebGraphicsContext3D>(new ForbidSynchronousCallContext)));
+  std::unique_ptr<OutputSurface> output_surface(
+      FakeOutputSurface::Create3d(std::unique_ptr<TestWebGraphicsContext3D>(
+          new ForbidSynchronousCallContext)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -701,14 +703,16 @@
 
 TEST_F(GLRendererTest, InitializationWithQuicklyLostContextDoesNotAssert) {
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
-      scoped_ptr<TestWebGraphicsContext3D>(new LoseContextOnFirstGetContext)));
+  std::unique_ptr<OutputSurface> output_surface(
+      FakeOutputSurface::Create3d(std::unique_ptr<TestWebGraphicsContext3D>(
+          new LoseContextOnFirstGetContext)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -730,18 +734,19 @@
 };
 
 TEST_F(GLRendererTest, OpaqueBackground) {
-  scoped_ptr<ClearCountingContext> context_owned(new ClearCountingContext);
+  std::unique_ptr<ClearCountingContext> context_owned(new ClearCountingContext);
   ClearCountingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -775,18 +780,19 @@
 }
 
 TEST_F(GLRendererTest, TransparentBackground) {
-  scoped_ptr<ClearCountingContext> context_owned(new ClearCountingContext);
+  std::unique_ptr<ClearCountingContext> context_owned(new ClearCountingContext);
   ClearCountingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -813,18 +819,19 @@
 }
 
 TEST_F(GLRendererTest, OffscreenOutputSurface) {
-  scoped_ptr<ClearCountingContext> context_owned(new ClearCountingContext);
+  std::unique_ptr<ClearCountingContext> context_owned(new ClearCountingContext);
   ClearCountingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::CreateOffscreen(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -874,19 +881,20 @@
 };
 
 TEST_F(GLRendererTest, ActiveTextureState) {
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -959,19 +967,20 @@
 };
 
 TEST_F(GLRendererTest, ShouldClearRootRenderPass) {
-  scoped_ptr<NoClearRootRenderPassMockContext> mock_context_owned(
+  std::unique_ptr<NoClearRootRenderPassMockContext> mock_context_owned(
       new NoClearRootRenderPassMockContext);
   NoClearRootRenderPassMockContext* mock_context = mock_context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(mock_context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   settings.should_clear_root_render_pass = false;
@@ -1051,18 +1060,19 @@
 };
 
 TEST_F(GLRendererTest, ScissorTestWhenClearing) {
-  scoped_ptr<ScissorTestOnClearCheckingContext> context_owned(
+  std::unique_ptr<ScissorTestOnClearCheckingContext> context_owned(
       new ScissorTestOnClearCheckingContext);
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -1128,7 +1138,7 @@
 class NonReshapableOutputSurface : public FakeOutputSurface {
  public:
   explicit NonReshapableOutputSurface(
-      scoped_ptr<TestWebGraphicsContext3D> context3d)
+      std::unique_ptr<TestWebGraphicsContext3D> context3d)
       : FakeOutputSurface(TestContextProvider::Create(std::move(context3d)),
                           false) {
     surface_size_ = gfx::Size(500, 500);
@@ -1140,19 +1150,21 @@
 };
 
 TEST_F(GLRendererTest, NoDiscardOnPartialUpdates) {
-  scoped_ptr<DiscardCheckingContext> context_owned(new DiscardCheckingContext);
+  std::unique_ptr<DiscardCheckingContext> context_owned(
+      new DiscardCheckingContext);
   DiscardCheckingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<NonReshapableOutputSurface> output_surface(
+  std::unique_ptr<NonReshapableOutputSurface> output_surface(
       new NonReshapableOutputSurface(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
   output_surface->set_fixed_size(gfx::Size(100, 100));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   settings.partial_swap_enabled = true;
@@ -1294,7 +1306,7 @@
   // and maintains a fixed size. This test verifies that glViewport and
   // glScissor's Y coordinate is flipped correctly in this environment, and that
   // the glViewport can be at a nonzero origin within the surface.
-  scoped_ptr<FlippedScissorAndViewportContext> context_owned(
+  std::unique_ptr<FlippedScissorAndViewportContext> context_owned(
       new FlippedScissorAndViewportContext);
 
   // We expect exactly one call to viewport on this context and exactly two
@@ -1304,14 +1316,15 @@
   EXPECT_CALL(*context_owned, scissor(30, 450, 20, 20));
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       new NonReshapableOutputSurface(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -1346,14 +1359,15 @@
   // Note: there is one path that will set it to 0, but that is after the render
   // has finished.
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<FakeOutputSurface> output_surface(
+  std::unique_ptr<FakeOutputSurface> output_surface(
       FakeOutputSurface::Create3d(TestWebGraphicsContext3D::Create()));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
 
   RendererSettings settings;
   FakeRendererClient renderer_client;
@@ -1750,8 +1764,8 @@
 class MockOutputSurface : public OutputSurface {
  public:
   MockOutputSurface()
-      : OutputSurface(
-            TestContextProvider::Create(scoped_ptr<TestWebGraphicsContext3D>(
+      : OutputSurface(TestContextProvider::Create(
+            std::unique_ptr<TestWebGraphicsContext3D>(
                 new StrictMock<OutputSurfaceMockContext>))) {
     surface_size_ = gfx::Size(100, 100);
   }
@@ -1821,10 +1835,10 @@
   RendererSettings settings_;
   FakeOutputSurfaceClient output_surface_client_;
   StrictMock<MockOutputSurface> output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
   FakeRendererClient renderer_client_;
-  scoped_ptr<FakeRendererGL> renderer_;
+  std::unique_ptr<FakeRendererGL> renderer_;
 };
 
 TEST_F(MockOutputSurfaceTest, DrawFrameAndSwap) {
@@ -1983,7 +1997,7 @@
   ~TestOverlayProcessor() override {}
   void Initialize() override {
     strategy_ = new Strategy();
-    strategies_.push_back(make_scoped_ptr(strategy_));
+    strategies_.push_back(base::WrapUnique(strategy_));
   }
 
   Strategy* strategy_;
@@ -1993,21 +2007,22 @@
                      bool lost_resource,
                      BlockingTaskRunner* main_thread_task_runner) {}
 
-void IgnoreCopyResult(scoped_ptr<CopyOutputResult> result) {
-}
+void IgnoreCopyResult(std::unique_ptr<CopyOutputResult> result) {}
 
 TEST_F(GLRendererTest, DontOverlayWithCopyRequests) {
-  scoped_ptr<DiscardCheckingContext> context_owned(new DiscardCheckingContext);
+  std::unique_ptr<DiscardCheckingContext> context_owned(
+      new DiscardCheckingContext);
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<FakeOutputSurface> output_surface(
+  std::unique_ptr<FakeOutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
-  scoped_ptr<TextureMailboxDeleter> mailbox_deleter(
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
+  std::unique_ptr<TextureMailboxDeleter> mailbox_deleter(
       new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get()));
 
   RendererSettings settings;
@@ -2019,7 +2034,7 @@
       new TestOverlayProcessor(output_surface.get());
   processor->Initialize();
   renderer.SetOverlayProcessor(processor);
-  scoped_ptr<TestOverlayProcessor::Validator> validator(
+  std::unique_ptr<TestOverlayProcessor::Validator> validator(
       new TestOverlayProcessor::Validator);
   output_surface->SetOverlayCandidateValidator(validator.get());
 
@@ -2034,7 +2049,7 @@
   TextureMailbox mailbox =
       TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D,
                      gfx::Size(256, 256), true, false);
-  scoped_ptr<SingleReleaseCallbackImpl> release_callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> release_callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased));
   ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox(
       mailbox, std::move(release_callback));
@@ -2107,8 +2122,9 @@
    public:
     void GetStrategies(OverlayProcessor::StrategyList* strategies) override {
       strategies->push_back(
-          make_scoped_ptr(new OverlayStrategySingleOnTop(this)));
-      strategies->push_back(make_scoped_ptr(new OverlayStrategyUnderlay(this)));
+          base::WrapUnique(new OverlayStrategySingleOnTop(this)));
+      strategies->push_back(
+          base::WrapUnique(new OverlayStrategyUnderlay(this)));
     }
 
     bool AllowCALayerOverlays() override { return false; }
@@ -2125,7 +2141,7 @@
 
   void Initialize() override {
     strategies_.push_back(
-        make_scoped_ptr(new OverlayStrategySingleOnTop(&validator_)));
+        base::WrapUnique(new OverlayStrategySingleOnTop(&validator_)));
   }
 
   SingleOverlayValidator validator_;
@@ -2147,7 +2163,7 @@
 };
 
 TEST_F(GLRendererTest, OverlaySyncTokensAreProcessed) {
-  scoped_ptr<WaitSyncTokenCountingContext> context_owned(
+  std::unique_ptr<WaitSyncTokenCountingContext> context_owned(
       new WaitSyncTokenCountingContext);
   WaitSyncTokenCountingContext* context = context_owned.get();
 
@@ -2158,15 +2174,16 @@
       &MockOverlayScheduler::Schedule, base::Unretained(&overlay_scheduler)));
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(context_provider));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
-  scoped_ptr<TextureMailboxDeleter> mailbox_deleter(
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
+  std::unique_ptr<TextureMailboxDeleter> mailbox_deleter(
       new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get()));
 
   RendererSettings settings;
@@ -2190,7 +2207,7 @@
   TextureMailbox mailbox =
       TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D,
                      gfx::Size(256, 256), true, false);
-  scoped_ptr<SingleReleaseCallbackImpl> release_callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> release_callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased));
   ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox(
       mailbox, std::move(release_callback));
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index b3b18da4..64b1d3b 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -124,7 +124,7 @@
 #if defined(ENABLE_VULKAN)
     scoped_refptr<VulkanContextProvider> vulkan_context_provider,
 #endif
-    scoped_ptr<SoftwareOutputDevice> software_device)
+    std::unique_ptr<SoftwareOutputDevice> software_device)
     : client_(NULL),
       context_provider_(std::move(context_provider)),
       worker_context_provider_(std::move(worker_context_provider)),
@@ -168,7 +168,8 @@
                     nullptr) {}
 #endif
 
-OutputSurface::OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device)
+OutputSurface::OutputSurface(
+    std::unique_ptr<SoftwareOutputDevice> software_device)
     : OutputSurface(nullptr,
                     nullptr,
 #if defined(ENABLE_VULKAN)
@@ -177,8 +178,9 @@
                     std::move(software_device)) {
 }
 
-OutputSurface::OutputSurface(scoped_refptr<ContextProvider> context_provider,
-                             scoped_ptr<SoftwareOutputDevice> software_device)
+OutputSurface::OutputSurface(
+    scoped_refptr<ContextProvider> context_provider,
+    std::unique_ptr<SoftwareOutputDevice> software_device)
     : OutputSurface(std::move(context_provider),
                     nullptr,
 #if defined(ENABLE_VULKAN)
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index ccfe1184d..062fd00 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -6,10 +6,10 @@
 #define CC_OUTPUT_OUTPUT_SURFACE_H_
 
 #include <deque>
+#include <memory>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "cc/base/cc_export.h"
@@ -54,7 +54,7 @@
 #if defined(ENABLE_VULKAN)
                 scoped_refptr<VulkanContextProvider> vulkan_context_provider,
 #endif
-                scoped_ptr<SoftwareOutputDevice> software_device);
+                std::unique_ptr<SoftwareOutputDevice> software_device);
   OutputSurface(scoped_refptr<ContextProvider> context_provider,
                 scoped_refptr<ContextProvider> worker_context_provider);
   explicit OutputSurface(scoped_refptr<ContextProvider> context_provider);
@@ -62,10 +62,10 @@
   explicit OutputSurface(
       scoped_refptr<VulkanContextProvider> vulkan_context_provider);
 #endif
-  explicit OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device);
+  explicit OutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device);
 
   OutputSurface(scoped_refptr<ContextProvider> context_provider,
-                scoped_ptr<SoftwareOutputDevice> software_device);
+                std::unique_ptr<SoftwareOutputDevice> software_device);
 
   ~OutputSurface() override;
 
@@ -193,7 +193,7 @@
 #if defined(ENABLE_VULKAN)
   scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
 #endif
-  scoped_ptr<SoftwareOutputDevice> software_device_;
+  std::unique_ptr<SoftwareOutputDevice> software_device_;
   gfx::Size surface_size_;
   float device_scale_factor_;
   bool has_alpha_;
diff --git a/cc/output/output_surface_unittest.cc b/cc/output/output_surface_unittest.cc
index 3684852..1014ad1 100644
--- a/cc/output/output_surface_unittest.cc
+++ b/cc/output/output_surface_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "cc/output/output_surface.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/test/test_simple_task_runner.h"
 #include "cc/output/managed_memory_policy.h"
 #include "cc/output/output_surface_client.h"
@@ -28,11 +29,12 @@
                     scoped_refptr<ContextProvider> worker_context_provider)
       : OutputSurface(worker_context_provider) {}
 
-  explicit TestOutputSurface(scoped_ptr<SoftwareOutputDevice> software_device)
+  explicit TestOutputSurface(
+      std::unique_ptr<SoftwareOutputDevice> software_device)
       : OutputSurface(std::move(software_device)) {}
 
   TestOutputSurface(scoped_refptr<ContextProvider> context_provider,
-                    scoped_ptr<SoftwareOutputDevice> software_device)
+                    std::unique_ptr<SoftwareOutputDevice> software_device)
       : OutputSurface(context_provider, std::move(software_device)) {}
 
   void SwapBuffers(CompositorFrame* frame) override {
@@ -158,7 +160,7 @@
 
   // TestOutputSurface now owns software_output_device and has responsibility to
   // free it.
-  TestOutputSurface output_surface(make_scoped_ptr(software_output_device));
+  TestOutputSurface output_surface(base::WrapUnique(software_output_device));
 
   EXPECT_EQ(0, software_output_device->ensure_backbuffer_count());
   EXPECT_EQ(0, software_output_device->discard_backbuffer_count());
diff --git a/cc/output/overlay_processor.h b/cc/output/overlay_processor.h
index 4a441a8..01c28d2 100644
--- a/cc/output/overlay_processor.h
+++ b/cc/output/overlay_processor.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_OVERLAY_PROCESSOR_H_
 #define CC_OUTPUT_OVERLAY_PROCESSOR_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/ca_layer_overlay.h"
 #include "cc/output/overlay_candidate.h"
@@ -29,7 +30,7 @@
                          RenderPass* render_pass,
                          OverlayCandidateList* candidates) = 0;
   };
-  using StrategyList = std::vector<scoped_ptr<Strategy>>;
+  using StrategyList = std::vector<std::unique_ptr<Strategy>>;
 
   explicit OverlayProcessor(OutputSurface* surface);
   virtual ~OverlayProcessor();
diff --git a/cc/output/overlay_unittest.cc b/cc/output/overlay_unittest.cc
index 8697685..3cc09a3 100644
--- a/cc/output/overlay_unittest.cc
+++ b/cc/output/overlay_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "cc/base/region.h"
 #include "cc/output/compositor_frame_metadata.h"
 #include "cc/output/gl_renderer.h"
@@ -63,8 +64,8 @@
  public:
   void GetStrategies(OverlayProcessor::StrategyList* strategies) override {
     strategies->push_back(
-        make_scoped_ptr(new OverlayStrategySingleOnTop(this)));
-    strategies->push_back(make_scoped_ptr(new OverlayStrategyUnderlay(this)));
+        base::WrapUnique(new OverlayStrategySingleOnTop(this)));
+    strategies->push_back(base::WrapUnique(new OverlayStrategyUnderlay(this)));
   }
   bool AllowCALayerOverlays() override { return false; }
   void CheckOverlaySupport(OverlayCandidateList* surfaces) override {
@@ -105,14 +106,14 @@
  public:
   void GetStrategies(OverlayProcessor::StrategyList* strategies) override {
     strategies->push_back(
-        make_scoped_ptr(new OverlayStrategySingleOnTop(this)));
+        base::WrapUnique(new OverlayStrategySingleOnTop(this)));
   }
 };
 
 class UnderlayOverlayValidator : public SingleOverlayValidator {
  public:
   void GetStrategies(OverlayProcessor::StrategyList* strategies) override {
-    strategies->push_back(make_scoped_ptr(new OverlayStrategyUnderlay(this)));
+    strategies->push_back(base::WrapUnique(new OverlayStrategyUnderlay(this)));
   }
 };
 
@@ -171,17 +172,17 @@
   unsigned bind_framebuffer_count() const { return bind_framebuffer_count_; }
 
  private:
-  scoped_ptr<OverlayCandidateValidator> overlay_candidate_validator_;
+  std::unique_ptr<OverlayCandidateValidator> overlay_candidate_validator_;
   bool is_displayed_as_overlay_plane_;
   unsigned bind_framebuffer_count_ = 0;
 };
 
-scoped_ptr<RenderPass> CreateRenderPass() {
+std::unique_ptr<RenderPass> CreateRenderPass() {
   RenderPassId id(1, 0);
   gfx::Rect output_rect(0, 0, 256, 256);
   bool has_transparent_background = true;
 
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->SetAll(id,
                output_rect,
                output_rect,
@@ -199,7 +200,7 @@
   TextureMailbox mailbox =
       TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D,
                      size, is_overlay_candidate, false);
-  scoped_ptr<SingleReleaseCallbackImpl> release_callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> release_callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased));
 
   return resource_provider->CreateResourceFromTextureMailbox(
@@ -350,11 +351,11 @@
   }
 
   scoped_refptr<TestContextProvider> provider_;
-  scoped_ptr<OverlayOutputSurface> output_surface_;
+  std::unique_ptr<OverlayOutputSurface> output_surface_;
   FakeOutputSurfaceClient client_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<OverlayProcessor> overlay_processor_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<OverlayProcessor> overlay_processor_;
   gfx::Rect damage_rect_;
 };
 
@@ -378,19 +379,20 @@
   EXPECT_TRUE(output_surface.BindToClient(&client));
   output_surface.SetOverlayCandidateValidator(new SingleOverlayValidator);
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      &output_surface, shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(&output_surface,
+                                   shared_bitmap_manager.get());
 
-  scoped_ptr<DefaultOverlayProcessor> overlay_processor(
+  std::unique_ptr<DefaultOverlayProcessor> overlay_processor(
       new DefaultOverlayProcessor(&output_surface));
   overlay_processor->Initialize();
   EXPECT_GE(2U, overlay_processor->GetStrategyCount());
 }
 
 TEST_F(SingleOverlayOnTopTest, SuccessfulOverlay) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   TextureDrawQuad* original_quad =
       CreateFullscreenCandidateQuad(resource_provider_.get(),
                                     pass->shared_quad_state_list.back(),
@@ -425,7 +427,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, DamageRect) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -455,7 +457,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, NoCandidates) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenOpaqueQuad(resource_provider_.get(),
                              pass->shared_quad_state_list.back(), pass.get());
   CreateFullscreenOpaqueQuad(resource_provider_.get(),
@@ -477,7 +479,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, OccludedCandidates) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenOpaqueQuad(resource_provider_.get(),
                              pass->shared_quad_state_list.back(), pass.get());
   CreateFullscreenOpaqueQuad(resource_provider_.get(),
@@ -504,7 +506,7 @@
 
 // Test with multiple render passes.
 TEST_F(SingleOverlayOnTopTest, MultipleRenderPasses) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -524,7 +526,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectPremultipliedAlpha) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   TextureDrawQuad* quad =
       CreateFullscreenCandidateQuad(resource_provider_.get(),
                                     pass->shared_quad_state_list.back(),
@@ -539,7 +541,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectBlending) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   TextureDrawQuad* quad =
       CreateFullscreenCandidateQuad(resource_provider_.get(),
                                     pass->shared_quad_state_list.back(),
@@ -554,7 +556,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectBackgroundColor) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   TextureDrawQuad* quad =
       CreateFullscreenCandidateQuad(resource_provider_.get(),
                                     pass->shared_quad_state_list.back(),
@@ -569,7 +571,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectBlendMode) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -583,7 +585,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectOpacity) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -597,7 +599,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectNonAxisAlignedTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -612,7 +614,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowClipped) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -630,7 +632,7 @@
   gfx::Rect rect = kOverlayRect;
   rect.set_width(rect.width() / 2);
   rect.Offset(0, -rect.height());
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(), rect);
   pass->shared_quad_state_list.back()->quad_to_target_transform.Scale(2.0f,
@@ -648,7 +650,7 @@
   gfx::Rect rect = kOverlayRect;
   rect.set_height(rect.height() / 2);
   rect.Offset(-rect.width(), 0);
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(), rect);
   pass->shared_quad_state_list.back()->quad_to_target_transform.Scale(-1.0f,
@@ -666,7 +668,7 @@
 TEST_F(SingleOverlayOnTopTest, AllowPositiveScaleTransform) {
   gfx::Rect rect = kOverlayRect;
   rect.set_width(rect.width() / 2);
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(), rect);
   pass->shared_quad_state_list.back()->quad_to_target_transform.Scale(2.0f,
@@ -681,7 +683,7 @@
 TEST_F(SingleOverlayOnTopTest, Allow90DegreeRotation) {
   gfx::Rect rect = kOverlayRect;
   rect.Offset(0, -rect.height());
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(), rect);
   pass->shared_quad_state_list.back()
@@ -698,7 +700,7 @@
 TEST_F(SingleOverlayOnTopTest, Allow180DegreeRotation) {
   gfx::Rect rect = kOverlayRect;
   rect.Offset(-rect.width(), -rect.height());
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(), rect);
   pass->shared_quad_state_list.back()
@@ -715,7 +717,7 @@
 TEST_F(SingleOverlayOnTopTest, Allow270DegreeRotation) {
   gfx::Rect rect = kOverlayRect;
   rect.Offset(-rect.width(), 0);
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(), rect);
   pass->shared_quad_state_list.back()
@@ -730,7 +732,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowNotTopIfNotOccluded) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateOpaqueQuadAt(resource_provider_.get(),
                      pass->shared_quad_state_list.back(), pass.get(),
                      kOverlayTopLeftRect);
@@ -747,7 +749,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowTransparentOnTop) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState();
   shared_state->opacity = 0.f;
   CreateSolidColorQuadAt(shared_state, SK_ColorBLACK, pass.get(),
@@ -765,7 +767,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowTransparentColorOnTop) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateSolidColorQuadAt(pass->shared_quad_state_list.back(),
                          SK_ColorTRANSPARENT, pass.get(),
                          kOverlayBottomRightRect);
@@ -781,7 +783,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectOpaqueColorOnTop) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState();
   shared_state->opacity = 0.5f;
   CreateSolidColorQuadAt(shared_state, SK_ColorBLACK, pass.get(),
@@ -799,7 +801,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectTransparentColorOnTopWithoutBlending) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState();
   CreateSolidColorQuadAt(shared_state, SK_ColorTRANSPARENT, pass.get(),
                          kOverlayBottomRightRect)->opaque_rect =
@@ -815,7 +817,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, RejectVideoSwapTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateVideoQuad(resource_provider_.get(),
                                      pass->shared_quad_state_list.back(),
                                      pass.get(), kSwapTransform);
@@ -828,7 +830,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowVideoXMirrorTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateVideoQuad(resource_provider_.get(),
                                      pass->shared_quad_state_list.back(),
                                      pass.get(), kXMirrorTransform);
@@ -841,7 +843,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowVideoBothMirrorTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateVideoQuad(resource_provider_.get(),
                                      pass->shared_quad_state_list.back(),
                                      pass.get(), kBothMirrorTransform);
@@ -854,7 +856,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowVideoNormalTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateVideoQuad(resource_provider_.get(),
                                      pass->shared_quad_state_list.back(),
                                      pass.get(), kNormalTransform);
@@ -867,7 +869,7 @@
 }
 
 TEST_F(SingleOverlayOnTopTest, AllowVideoYMirrorTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateVideoQuad(resource_provider_.get(),
                                      pass->shared_quad_state_list.back(),
                                      pass.get(), kYMirrorTransform);
@@ -880,7 +882,7 @@
 }
 
 TEST_F(UnderlayTest, OverlayLayerUnderMainLayer) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenOpaqueQuad(resource_provider_.get(),
                              pass->shared_quad_state_list.back(), pass.get());
   CreateCandidateQuadAt(resource_provider_.get(),
@@ -899,7 +901,7 @@
 }
 
 TEST_F(UnderlayTest, AllowOnTop) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -919,7 +921,7 @@
 
 // The first time an underlay is scheduled its damage must not be subtracted.
 TEST_F(UnderlayTest, InitialUnderlayDamageNotSubtracted) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -938,7 +940,7 @@
 // subtracted the second time.
 TEST_F(UnderlayTest, DamageSubtractedForConsecutiveIdenticalUnderlays) {
   for (int i = 0; i < 2; ++i) {
-    scoped_ptr<RenderPass> pass = CreateRenderPass();
+    std::unique_ptr<RenderPass> pass = CreateRenderPass();
     CreateFullscreenCandidateQuad(resource_provider_.get(),
                                   pass->shared_quad_state_list.back(),
                                   pass.get());
@@ -965,7 +967,7 @@
 TEST_F(UnderlayTest, DamageNotSubtractedForNonIdenticalConsecutiveUnderlays) {
   gfx::Rect overlay_rects[] = {kOverlayBottomRightRect, kOverlayRect};
   for (int i = 0; i < 2; ++i) {
-    scoped_ptr<RenderPass> pass = CreateRenderPass();
+    std::unique_ptr<RenderPass> pass = CreateRenderPass();
 
     CreateCandidateQuadAt(resource_provider_.get(),
                           pass->shared_quad_state_list.back(), pass.get(),
@@ -984,7 +986,7 @@
 
 TEST_F(UnderlayTest, DamageNotSubtractedWhenQuadsAboveOverlap) {
   for (int i = 0; i < 2; ++i) {
-    scoped_ptr<RenderPass> pass = CreateRenderPass();
+    std::unique_ptr<RenderPass> pass = CreateRenderPass();
     // Add an overlapping quad above the candidate.
     CreateFullscreenOpaqueQuad(resource_provider_.get(),
                                pass->shared_quad_state_list.back(), pass.get());
@@ -1005,7 +1007,7 @@
 
 TEST_F(UnderlayTest, DamageSubtractedWhenQuadsAboveDontOverlap) {
   for (int i = 0; i < 2; ++i) {
-    scoped_ptr<RenderPass> pass = CreateRenderPass();
+    std::unique_ptr<RenderPass> pass = CreateRenderPass();
     // Add a non-overlapping quad above the candidate.
     CreateOpaqueQuadAt(resource_provider_.get(),
                        pass->shared_quad_state_list.back(), pass.get(),
@@ -1038,7 +1040,7 @@
 }
 
 TEST_F(CALayerOverlayTest, AllowNonAxisAlignedTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -1058,7 +1060,7 @@
 }
 
 TEST_F(CALayerOverlayTest, ThreeDTransform) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -1081,7 +1083,7 @@
 }
 
 TEST_F(CALayerOverlayTest, AllowContainingClip) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -1101,7 +1103,7 @@
 }
 
 TEST_F(CALayerOverlayTest, NontrivialClip) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -1123,7 +1125,7 @@
 }
 
 TEST_F(CALayerOverlayTest, SkipTransparent) {
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
                                 pass.get());
@@ -1215,11 +1217,9 @@
     if (use_validator)
       output_surface_->SetOverlayCandidateValidator(new SingleOverlayValidator);
 
-    renderer_ =
-        make_scoped_ptr(new OverlayInfoRendererGL(&renderer_client_,
-                                                  &settings_,
-                                                  output_surface_.get(),
-                                                  resource_provider_.get()));
+    renderer_ = base::WrapUnique(new OverlayInfoRendererGL(
+        &renderer_client_, &settings_, output_surface_.get(),
+        resource_provider_.get()));
   }
 
   void SwapBuffers() {
@@ -1237,10 +1237,10 @@
 
   RendererSettings settings_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<OverlayOutputSurface> output_surface_;
+  std::unique_ptr<OverlayOutputSurface> output_surface_;
   FakeRendererClient renderer_client_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<OverlayInfoRendererGL> renderer_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<OverlayInfoRendererGL> renderer_;
   scoped_refptr<TestContextProvider> provider_;
   MockOverlayScheduler scheduler_;
 };
@@ -1251,7 +1251,7 @@
   renderer_->set_expect_overlays(true);
   gfx::Rect viewport_rect(16, 16);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
 
   CreateCandidateQuadAt(resource_provider_.get(),
                         pass->shared_quad_state_list.back(), pass.get(),
@@ -1290,7 +1290,7 @@
   renderer_->set_expect_overlays(true);
   gfx::Rect viewport_rect(16, 16);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
 
   CreateFullscreenOpaqueQuad(resource_provider_.get(),
                              pass->shared_quad_state_list.back(), pass.get());
@@ -1330,7 +1330,7 @@
   renderer_->set_expect_overlays(false);
   gfx::Rect viewport_rect(16, 16);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
 
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
@@ -1364,7 +1364,7 @@
   renderer_->set_expect_overlays(true);
   gfx::Rect viewport_rect(16, 16);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
 
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
@@ -1395,7 +1395,7 @@
   renderer_->set_expect_overlays(true);
   gfx::Rect viewport_rect(16, 16);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
 
   CreateFullscreenCandidateQuad(resource_provider_.get(),
                                 pass->shared_quad_state_list.back(),
@@ -1431,7 +1431,7 @@
   ResourceId resource3 =
       CreateResource(resource_provider_.get(), gfx::Size(32, 32), true);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   RenderPassList pass_list;
   pass_list.push_back(std::move(pass));
 
@@ -1554,7 +1554,7 @@
   ResourceId resource3 =
       CreateResource(resource_provider_.get(), gfx::Size(32, 32), true);
 
-  scoped_ptr<RenderPass> pass = CreateRenderPass();
+  std::unique_ptr<RenderPass> pass = CreateRenderPass();
   RenderPassList pass_list;
   pass_list.push_back(std::move(pass));
 
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index 880a139..cfda9fe 100644
--- a/cc/output/renderer.h
+++ b/cc/output/renderer.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_RENDERER_H_
 #define CC_OUTPUT_RENDERER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/renderer_capabilities.h"
 #include "cc/output/renderer_settings.h"
@@ -21,7 +22,7 @@
 class ScopedResource;
 class Task;
 
-typedef std::vector<scoped_ptr<RenderPass>> RenderPassList;
+typedef std::vector<std::unique_ptr<RenderPass>> RenderPassList;
 
 struct RendererCapabilitiesImpl {
   RendererCapabilitiesImpl();
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index b9472b35..e7925b2d 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -30,9 +30,9 @@
 namespace {
 
 #if !defined(OS_ANDROID)
-scoped_ptr<RenderPass> CreateTestRootRenderPass(RenderPassId id,
-                                                const gfx::Rect& rect) {
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+std::unique_ptr<RenderPass> CreateTestRootRenderPass(RenderPassId id,
+                                                     const gfx::Rect& rect) {
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   const gfx::Rect output_rect = rect;
   const gfx::Rect damage_rect = rect;
   const gfx::Transform transform_to_root_target;
@@ -40,11 +40,11 @@
   return pass;
 }
 
-scoped_ptr<RenderPass> CreateTestRenderPass(
+std::unique_ptr<RenderPass> CreateTestRenderPass(
     RenderPassId id,
     const gfx::Rect& rect,
     const gfx::Transform& transform_to_root_target) {
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   const gfx::Rect output_rect = rect;
   const gfx::Rect damage_rect = rect;
   pass->SetNew(id, output_rect, damage_rect, transform_to_root_target);
@@ -523,7 +523,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -546,7 +546,7 @@
   gfx::Rect small_rect(100, 100);
 
   RenderPassId child_id(2, 1);
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_id, small_rect, gfx::Transform());
 
   SharedQuadState* child_shared_state =
@@ -557,7 +557,7 @@
   color_quad->SetNew(child_shared_state, rect, rect, SK_ColorGREEN, false);
 
   RenderPassId root_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRenderPass(root_id, rect, gfx::Transform());
 
   SharedQuadState* root_shared_state =
@@ -583,7 +583,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -613,7 +613,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* texture_quad_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -712,7 +712,7 @@
     return render_pass_->CreateAndAppendDrawQuad<T>();
   }
 
-  scoped_ptr<RenderPass> render_pass_;
+  std::unique_ptr<RenderPass> render_pass_;
   gfx::Rect viewport_rect_;
   SharedQuadState* front_quad_state_;
   SharedQuadState* back_quad_state_;
@@ -735,8 +735,8 @@
   }
 
  protected:
-  scoped_ptr<VideoResourceUpdater> video_resource_updater_;
-  scoped_ptr<VideoResourceUpdater> video_resource_updater2_;
+  std::unique_ptr<VideoResourceUpdater> video_resource_updater_;
+  std::unique_ptr<VideoResourceUpdater> video_resource_updater2_;
 };
 
 template <typename TypeParam>
@@ -817,7 +817,7 @@
   SkPaint green_paint;
   green_paint.setColor(SK_ColorGREEN);
 
-  scoped_ptr<FakeRecordingSource> blue_recording =
+  std::unique_ptr<FakeRecordingSource> blue_recording =
       FakeRecordingSource::CreateFilledRecordingSource(this->quad_rect_.size());
   blue_recording->add_draw_rect_with_paint(outer_rect, black_paint);
   blue_recording->add_draw_rect_with_paint(inner_rect, blue_paint);
@@ -833,7 +833,7 @@
                     this->quad_rect_.size(), false, RGBA_8888, this->quad_rect_,
                     1.f, blue_raster_source);
 
-  scoped_ptr<FakeRecordingSource> green_recording =
+  std::unique_ptr<FakeRecordingSource> green_recording =
       FakeRecordingSource::CreateFilledRecordingSource(this->quad_rect_.size());
   green_recording->add_draw_rect_with_paint(outer_rect, green_paint);
   green_recording->add_draw_rect_with_paint(inner_rect, black_paint);
@@ -856,11 +856,11 @@
   this->SetupQuadStateAndRenderPass();
   RenderPassId child_pass_id1(2, 2);
   RenderPassId child_pass_id2(2, 3);
-  scoped_ptr<RenderPass> child_pass1 =
+  std::unique_ptr<RenderPass> child_pass1 =
       CreateTestRenderPass(child_pass_id1, this->quad_rect_, gfx::Transform());
   SharedQuadState* child1_quad_state = CreateTestSharedQuadState(
       gfx::Transform(), this->quad_rect_, child_pass1.get());
-  scoped_ptr<RenderPass> child_pass2 =
+  std::unique_ptr<RenderPass> child_pass2 =
       CreateTestRenderPass(child_pass_id2, this->quad_rect_, gfx::Transform());
   SharedQuadState* child2_quad_state = CreateTestSharedQuadState(
       gfx::Transform(), this->quad_rect_, child_pass2.get());
@@ -920,7 +920,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -951,7 +951,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* texture_quad_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -988,7 +988,7 @@
     gfx::Rect rect(200, 200);
 
     RenderPassId id(1, 1);
-    scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+    std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
     // Scale the video up so that bilinear filtering kicks in to sample more
     // than just nearest neighbor would.
@@ -1025,7 +1025,7 @@
         output_surface_->context_provider(), resource_provider_.get()));
   }
 
-  scoped_ptr<VideoResourceUpdater> video_resource_updater_;
+  std::unique_ptr<VideoResourceUpdater> video_resource_updater_;
 };
 
 class VideoGLRendererPixelHiLoTest
@@ -1036,7 +1036,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1062,7 +1062,7 @@
                       this->device_viewport_size_.height() * 1.5);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, viewport);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, viewport);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), viewport, pass.get());
@@ -1085,7 +1085,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1108,7 +1108,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1136,7 +1136,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1179,7 +1179,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1203,7 +1203,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1230,7 +1230,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
@@ -1257,13 +1257,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -1349,13 +1349,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -1420,13 +1420,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -1493,13 +1493,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -1589,13 +1589,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -1638,13 +1638,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -1702,14 +1702,14 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
   SharedQuadState* root_pass_shared_state = CreateTestSharedQuadState(
       gfx::Transform(), viewport_rect, root_pass.get());
 
   RenderPassId child_pass_id(2, 2);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, viewport_rect, transform_to_root);
   SharedQuadState* child_pass_shared_state = CreateTestSharedQuadState(
       gfx::Transform(), viewport_rect, child_pass.get());
@@ -1795,14 +1795,14 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
   SharedQuadState* root_pass_shared_state = CreateTestSharedQuadState(
       gfx::Transform(), viewport_rect, root_pass.get());
 
   RenderPassId child_pass_id(2, 2);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, viewport_rect, transform_to_root);
   SharedQuadState* child_pass_shared_state = CreateTestSharedQuadState(
       gfx::Transform(), viewport_rect, child_pass.get());
@@ -1886,7 +1886,7 @@
     gfx::Rect device_viewport_rect(this->device_viewport_size_);
 
     RenderPassId root_id(1, 1);
-    scoped_ptr<RenderPass> root_pass =
+    std::unique_ptr<RenderPass> root_pass =
         CreateTestRootRenderPass(root_id, device_viewport_rect);
     root_pass->has_transparent_background = false;
 
@@ -1894,7 +1894,7 @@
 
     RenderPassId filter_pass_id(2, 1);
     gfx::Transform transform_to_root;
-    scoped_ptr<RenderPass> filter_pass = CreateTestRenderPass(
+    std::unique_ptr<RenderPass> filter_pass = CreateTestRenderPass(
         filter_pass_id, filter_pass_layer_rect_, transform_to_root);
 
     // A non-visible quad in the filtering render pass.
@@ -2045,7 +2045,7 @@
   // clipped to the bottom left and top right corners by the external stencil.
   gfx::Rect rect(this->device_viewport_size_);
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
   SharedQuadState* blue_shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
   SolidColorDrawQuad* blue =
@@ -2068,7 +2068,7 @@
   // buffer should be ignored.
   gfx::Rect rect(this->device_viewport_size_);
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
   SharedQuadState* green_shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
   SolidColorDrawQuad* green =
@@ -2092,14 +2092,14 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
   root_pass->has_transparent_background = false;
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -2137,7 +2137,7 @@
   // clipped to the bottom right corner by the device clip.
   gfx::Rect rect(this->device_viewport_size_);
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
   SharedQuadState* blue_shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
   SolidColorDrawQuad* blue =
@@ -2157,7 +2157,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   gfx::Transform red_quad_to_target_transform;
   red_quad_to_target_transform.Rotate(10);
@@ -2200,7 +2200,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, rect, transform_to_root);
 
   gfx::Transform red_quad_to_target_transform;
@@ -2247,7 +2247,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, rect, transform_to_root);
 
   gfx::Transform hole_quad_to_target_transform;
@@ -2282,7 +2282,7 @@
 TEST_F(GLRendererPixelTest, AntiAliasingPerspective) {
   gfx::Rect rect(this->device_viewport_size_);
 
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRootRenderPass(RenderPassId(1, 1), rect);
 
   gfx::Rect red_rect(0, 0, 180, 500);
@@ -2325,7 +2325,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   // One clipped blue quad in the lower right corner.  Outside the clip
@@ -2333,7 +2333,7 @@
   gfx::Rect blue_rect(gfx::Size(100, 100));
   gfx::Rect blue_clip_rect(gfx::Point(50, 50), gfx::Size(50, 50));
 
-  scoped_ptr<FakeRecordingSource> blue_recording =
+  std::unique_ptr<FakeRecordingSource> blue_recording =
       FakeRecordingSource::CreateFilledRecordingSource(blue_rect.size());
   SkPaint red_paint;
   red_paint.setColor(SK_ColorRED);
@@ -2364,7 +2364,7 @@
                     1.f, std::move(blue_raster_source));
 
   // One viewport-filling green quad.
-  scoped_ptr<FakeRecordingSource> green_recording =
+  std::unique_ptr<FakeRecordingSource> green_recording =
       FakeRecordingSource::CreateFilledRecordingSource(viewport.size());
   SkPaint green_paint;
   green_paint.setColor(SK_ColorGREEN);
@@ -2401,11 +2401,11 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   // One viewport-filling 0.5-opacity green quad.
-  scoped_ptr<FakeRecordingSource> green_recording =
+  std::unique_ptr<FakeRecordingSource> green_recording =
       FakeRecordingSource::CreateFilledRecordingSource(viewport.size());
   SkPaint green_paint;
   green_paint.setColor(SK_ColorGREEN);
@@ -2426,7 +2426,7 @@
                      texture_format, viewport, 1.f, green_raster_source.get());
 
   // One viewport-filling white quad.
-  scoped_ptr<FakeRecordingSource> white_recording =
+  std::unique_ptr<FakeRecordingSource> white_recording =
       FakeRecordingSource::CreateFilledRecordingSource(viewport.size());
   SkPaint white_paint;
   white_paint.setColor(SK_ColorWHITE);
@@ -2483,7 +2483,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(2, 2);
@@ -2495,7 +2495,7 @@
   canvas->drawPoint(1, 1, SK_ColorGREEN);
   skia::RefPtr<SkImage> image = skia::AdoptRef(surface->newImageSnapshot());
 
-  scoped_ptr<FakeRecordingSource> recording =
+  std::unique_ptr<FakeRecordingSource> recording =
       FakeRecordingSource::CreateFilledRecordingSource(viewport.size());
   SkPaint paint;
   paint.setFilterQuality(kLow_SkFilterQuality);
@@ -2532,7 +2532,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(2, 2);
@@ -2544,7 +2544,7 @@
   canvas->drawPoint(1, 1, SK_ColorGREEN);
   skia::RefPtr<SkImage> image = skia::AdoptRef(surface->newImageSnapshot());
 
-  scoped_ptr<FakeRecordingSource> recording =
+  std::unique_ptr<FakeRecordingSource> recording =
       FakeRecordingSource::CreateFilledRecordingSource(viewport.size());
   SkPaint paint;
   paint.setFilterQuality(kLow_SkFilterQuality);
@@ -2600,7 +2600,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -2650,7 +2650,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -2701,7 +2701,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -2733,7 +2733,7 @@
 
   RenderPassId id(1, 1);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> pass =
+  std::unique_ptr<RenderPass> pass =
       CreateTestRenderPass(id, viewport, transform_to_root);
 
   // As scaling up the blue checkerboards will cause sampling on the GPU,
@@ -2744,7 +2744,7 @@
   gfx::Rect green_rect1(gfx::Point(80, 0), gfx::Size(20, 100));
   gfx::Rect green_rect2(gfx::Point(0, 80), gfx::Size(100, 20));
 
-  scoped_ptr<FakeRecordingSource> green_recording =
+  std::unique_ptr<FakeRecordingSource> green_recording =
       FakeRecordingSource::CreateFilledRecordingSource(viewport.size());
 
   SkPaint red_paint;
@@ -2810,7 +2810,7 @@
   blue_layer_rect1.Inset(inset, inset, inset, inset);
   blue_layer_rect2.Inset(inset, inset, inset, inset);
 
-  scoped_ptr<FakeRecordingSource> recording =
+  std::unique_ptr<FakeRecordingSource> recording =
       FakeRecordingSource::CreateFilledRecordingSource(layer_rect.size());
 
   Region outside(layer_rect);
@@ -2877,13 +2877,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -2925,13 +2925,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -2973,13 +2973,13 @@
   gfx::Rect viewport_rect(this->device_viewport_size_);
 
   RenderPassId root_pass_id(1, 1);
-  scoped_ptr<RenderPass> root_pass =
+  std::unique_ptr<RenderPass> root_pass =
       CreateTestRootRenderPass(root_pass_id, viewport_rect);
 
   RenderPassId child_pass_id(2, 2);
   gfx::Rect pass_rect(this->device_viewport_size_);
   gfx::Transform transform_to_root;
-  scoped_ptr<RenderPass> child_pass =
+  std::unique_ptr<RenderPass> child_pass =
       CreateTestRenderPass(child_pass_id, pass_rect, transform_to_root);
 
   gfx::Transform quad_to_target_transform;
@@ -3030,7 +3030,7 @@
   gfx::Rect rect(this->device_viewport_size_);
 
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+  std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
 
   SharedQuadState* shared_state =
       CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
diff --git a/cc/output/renderer_unittest.cc b/cc/output/renderer_unittest.cc
index 1648aece..67d13caf 100644
--- a/cc/output/renderer_unittest.cc
+++ b/cc/output/renderer_unittest.cc
@@ -39,7 +39,8 @@
 
 class MockContextProvider : public TestContextProvider {
  public:
-  explicit MockContextProvider(scoped_ptr<TestWebGraphicsContext3D> context)
+  explicit MockContextProvider(
+      std::unique_ptr<TestWebGraphicsContext3D> context)
       : TestContextProvider(std::move(context)) {}
   MOCK_METHOD0(DeleteCachedResources, void());
 
@@ -48,13 +49,13 @@
 };
 
 template <class T>
-scoped_ptr<Renderer> CreateRenderer(RendererClient* client,
-                                    const RendererSettings* settings,
-                                    OutputSurface* output_surface,
-                                    ResourceProvider* resource_provider);
+std::unique_ptr<Renderer> CreateRenderer(RendererClient* client,
+                                         const RendererSettings* settings,
+                                         OutputSurface* output_surface,
+                                         ResourceProvider* resource_provider);
 
 template <>
-scoped_ptr<Renderer> CreateRenderer<DelegatingRenderer>(
+std::unique_ptr<Renderer> CreateRenderer<DelegatingRenderer>(
     RendererClient* client,
     const RendererSettings* settings,
     OutputSurface* output_surface,
@@ -64,7 +65,7 @@
 }
 
 template <>
-scoped_ptr<Renderer> CreateRenderer<GLRenderer>(
+std::unique_ptr<Renderer> CreateRenderer<GLRenderer>(
     RendererClient* client,
     const RendererSettings* settings,
     OutputSurface* output_surface,
@@ -93,9 +94,9 @@
   RendererSettings tree_settings_;
   FakeOutputSurfaceClient output_surface_client_;
   scoped_refptr<MockContextProvider> context_provider_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<Renderer> renderer_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<Renderer> renderer_;
 };
 
 typedef ::testing::Types<DelegatingRenderer, GLRenderer> RendererTypes;
diff --git a/cc/output/shader_unittest.cc b/cc/output/shader_unittest.cc
index 675e47f..78850184 100644
--- a/cc/output/shader_unittest.cc
+++ b/cc/output/shader_unittest.cc
@@ -15,8 +15,8 @@
 TEST(ShaderTest, HighpThresholds) {
   // The test context always uses a mediump precision of 10 bits which
   // corresponds to a native highp threshold of 2^10 = 1024
-  scoped_ptr<TestWebGraphicsContext3D> stub_context =
-    TestWebGraphicsContext3D::Create();
+  std::unique_ptr<TestWebGraphicsContext3D> stub_context =
+      TestWebGraphicsContext3D::Create();
   TestGLES2Interface stub_gl(stub_context.get());
 
   int threshold_cache = 0;
diff --git a/cc/output/software_output_device.h b/cc/output/software_output_device.h
index 3972297..109fc90f 100644
--- a/cc/output/software_output_device.h
+++ b/cc/output/software_output_device.h
@@ -5,8 +5,9 @@
 #ifndef CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "third_party/skia/include/core/SkSurface.h"
 #include "ui/gfx/geometry/rect.h"
@@ -60,7 +61,7 @@
   float scale_factor_;
   gfx::Rect damage_rect_;
   sk_sp<SkSurface> surface_;
-  scoped_ptr<gfx::VSyncProvider> vsync_provider_;
+  std::unique_ptr<gfx::VSyncProvider> vsync_provider_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice);
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 51c75014..9256fda4 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -4,6 +4,7 @@
 
 #include "cc/output/software_renderer.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/base/math_util.h"
 #include "cc/output/compositor_frame.h"
@@ -51,13 +52,13 @@
 
 }  // anonymous namespace
 
-scoped_ptr<SoftwareRenderer> SoftwareRenderer::Create(
+std::unique_ptr<SoftwareRenderer> SoftwareRenderer::Create(
     RendererClient* client,
     const RendererSettings* settings,
     OutputSurface* output_surface,
     ResourceProvider* resource_provider) {
-  return make_scoped_ptr(new SoftwareRenderer(
-      client, settings, output_surface, resource_provider));
+  return base::WrapUnique(new SoftwareRenderer(client, settings, output_surface,
+                                               resource_provider));
 }
 
 SoftwareRenderer::SoftwareRenderer(RendererClient* client,
@@ -149,8 +150,8 @@
   // Explicitly release lock, otherwise we can crash when try to lock
   // same texture again.
   current_framebuffer_lock_ = nullptr;
-  current_framebuffer_lock_ = make_scoped_ptr(
-      new ResourceProvider::ScopedWriteLockSoftware(
+  current_framebuffer_lock_ =
+      base::WrapUnique(new ResourceProvider::ScopedWriteLockSoftware(
           resource_provider_, texture->id()));
   current_framebuffer_canvas_ =
       skia::AdoptRef(new SkCanvas(current_framebuffer_lock_->sk_bitmap()));
@@ -516,9 +517,9 @@
                                       SkShader::kClamp_TileMode, &content_mat);
   }
 
-  scoped_ptr<ResourceProvider::ScopedReadLockSoftware> mask_lock;
+  std::unique_ptr<ResourceProvider::ScopedReadLockSoftware> mask_lock;
   if (quad->mask_resource_id()) {
-    mask_lock = scoped_ptr<ResourceProvider::ScopedReadLockSoftware>(
+    mask_lock = std::unique_ptr<ResourceProvider::ScopedReadLockSoftware>(
         new ResourceProvider::ScopedReadLockSoftware(resource_provider_,
                                                      quad->mask_resource_id()));
 
@@ -574,13 +575,13 @@
 
 void SoftwareRenderer::CopyCurrentRenderPassToBitmap(
     DrawingFrame* frame,
-    scoped_ptr<CopyOutputRequest> request) {
+    std::unique_ptr<CopyOutputRequest> request) {
   gfx::Rect copy_rect = frame->current_render_pass->output_rect;
   if (request->has_area())
     copy_rect.Intersect(request->area());
   gfx::Rect window_copy_rect = MoveFromDrawToWindowSpace(frame, copy_rect);
 
-  scoped_ptr<SkBitmap> bitmap(new SkBitmap);
+  std::unique_ptr<SkBitmap> bitmap(new SkBitmap);
   bitmap->setInfo(SkImageInfo::MakeN32Premul(window_copy_rect.width(),
                                              window_copy_rect.height()));
   current_canvas_->readPixels(
diff --git a/cc/output/software_renderer.h b/cc/output/software_renderer.h
index 38cf2a9..359364f 100644
--- a/cc/output/software_renderer.h
+++ b/cc/output/software_renderer.h
@@ -26,7 +26,7 @@
 
 class CC_EXPORT SoftwareRenderer : public DirectRenderer {
  public:
-  static scoped_ptr<SoftwareRenderer> Create(
+  static std::unique_ptr<SoftwareRenderer> Create(
       RendererClient* client,
       const RendererSettings* settings,
       OutputSurface* output_surface,
@@ -58,7 +58,7 @@
   void EnsureScissorTestDisabled() override;
   void CopyCurrentRenderPassToBitmap(
       DrawingFrame* frame,
-      scoped_ptr<CopyOutputRequest> request) override;
+      std::unique_ptr<CopyOutputRequest> request) override;
 
   SoftwareRenderer(RendererClient* client,
                    const RendererSettings* settings,
@@ -110,7 +110,7 @@
   SkCanvas* root_canvas_;
   SkCanvas* current_canvas_;
   SkPaint current_paint_;
-  scoped_ptr<ResourceProvider::ScopedWriteLockSoftware>
+  std::unique_ptr<ResourceProvider::ScopedWriteLockSoftware>
       current_framebuffer_lock_;
   skia::RefPtr<SkCanvas> current_framebuffer_canvas_;
 
diff --git a/cc/output/software_renderer_unittest.cc b/cc/output/software_renderer_unittest.cc
index 7f890c9..13601c95 100644
--- a/cc/output/software_renderer_unittest.cc
+++ b/cc/output/software_renderer_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "cc/output/compositor_frame_metadata.h"
 #include "cc/output/copy_output_request.h"
@@ -32,7 +33,7 @@
 class SoftwareRendererTest : public testing::Test, public RendererClient {
  public:
   void InitializeRenderer(
-      scoped_ptr<SoftwareOutputDevice> software_output_device) {
+      std::unique_ptr<SoftwareOutputDevice> software_output_device) {
     output_surface_ =
         FakeOutputSurface::CreateSoftware(std::move(software_output_device));
     CHECK(output_surface_->BindToClient(&output_surface_client_));
@@ -53,10 +54,10 @@
   // RendererClient implementation.
   void SetFullRootLayerDamage() override {}
 
-  scoped_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list,
-                                         float device_scale_factor,
-                                         gfx::Rect device_viewport_rect) {
-    scoped_ptr<SkBitmap> bitmap_result;
+  std::unique_ptr<SkBitmap> DrawAndCopyOutput(RenderPassList* list,
+                                              float device_scale_factor,
+                                              gfx::Rect device_viewport_rect) {
+    std::unique_ptr<SkBitmap> bitmap_result;
     base::RunLoop loop;
 
     list->back()->copy_requests.push_back(
@@ -74,9 +75,9 @@
     return bitmap_result;
   }
 
-  static void SaveBitmapResult(scoped_ptr<SkBitmap>* bitmap_result,
+  static void SaveBitmapResult(std::unique_ptr<SkBitmap>* bitmap_result,
                                const base::Closure& quit_closure,
-                               scoped_ptr<CopyOutputResult> result) {
+                               std::unique_ptr<CopyOutputResult> result) {
     DCHECK(result->HasBitmap());
     *bitmap_result = result->TakeBitmap();
     quit_closure.Run();
@@ -85,10 +86,10 @@
  protected:
   RendererSettings settings_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<SoftwareRenderer> renderer_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<SoftwareRenderer> renderer_;
 };
 
 TEST_F(SoftwareRendererTest, SolidColorQuad) {
@@ -98,10 +99,10 @@
   gfx::Rect inner_rect(gfx::Point(1, 1), inner_size);
   gfx::Rect visible_rect(gfx::Point(1, 2), gfx::Size(98, 97));
 
-  InitializeRenderer(make_scoped_ptr(new SoftwareOutputDevice));
+  InitializeRenderer(base::WrapUnique(new SoftwareOutputDevice));
 
   RenderPassId root_render_pass_id = RenderPassId(1, 1);
-  scoped_ptr<RenderPass> root_render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> root_render_pass = RenderPass::Create();
   root_render_pass->SetNew(
       root_render_pass_id, outer_rect, outer_rect, gfx::Transform());
   SharedQuadState* shared_quad_state =
@@ -129,7 +130,7 @@
 
   float device_scale_factor = 1.f;
   gfx::Rect device_viewport_rect(outer_size);
-  scoped_ptr<SkBitmap> output =
+  std::unique_ptr<SkBitmap> output =
       DrawAndCopyOutput(&list, device_scale_factor, device_viewport_rect);
   EXPECT_EQ(outer_rect.width(), output->info().width());
   EXPECT_EQ(outer_rect.height(), output->info().height());
@@ -148,7 +149,7 @@
   gfx::Size inner_size(98, 98);
   gfx::Rect outer_rect(outer_size);
   gfx::Rect inner_rect(gfx::Point(1, 1), inner_size);
-  InitializeRenderer(make_scoped_ptr(new SoftwareOutputDevice));
+  InitializeRenderer(base::WrapUnique(new SoftwareOutputDevice));
 
   ResourceId resource_yellow = resource_provider()->CreateResource(
       outer_size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888);
@@ -172,7 +173,7 @@
   gfx::Rect root_rect = outer_rect;
 
   RenderPassId root_render_pass_id = RenderPassId(1, 1);
-  scoped_ptr<RenderPass> root_render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> root_render_pass = RenderPass::Create();
   root_render_pass->SetNew(
       root_render_pass_id, root_rect, root_rect, gfx::Transform());
   SharedQuadState* shared_quad_state =
@@ -201,7 +202,7 @@
 
   float device_scale_factor = 1.f;
   gfx::Rect device_viewport_rect(outer_size);
-  scoped_ptr<SkBitmap> output =
+  std::unique_ptr<SkBitmap> output =
       DrawAndCopyOutput(&list, device_scale_factor, device_viewport_rect);
   EXPECT_EQ(outer_rect.width(), output->info().width());
   EXPECT_EQ(outer_rect.height(), output->info().height());
@@ -219,7 +220,7 @@
   gfx::Rect tile_rect(tile_size);
   gfx::Rect visible_rect = tile_rect;
   visible_rect.Inset(1, 2, 3, 4);
-  InitializeRenderer(make_scoped_ptr(new SoftwareOutputDevice));
+  InitializeRenderer(base::WrapUnique(new SoftwareOutputDevice));
 
   ResourceId resource_cyan = resource_provider()->CreateResource(
       tile_size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888);
@@ -238,7 +239,7 @@
   gfx::Rect root_rect(tile_size);
 
   RenderPassId root_render_pass_id = RenderPassId(1, 1);
-  scoped_ptr<RenderPass> root_render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> root_render_pass = RenderPass::Create();
   root_render_pass->SetNew(
       root_render_pass_id, root_rect, root_rect, gfx::Transform());
   SharedQuadState* shared_quad_state =
@@ -263,7 +264,7 @@
 
   float device_scale_factor = 1.f;
   gfx::Rect device_viewport_rect(tile_size);
-  scoped_ptr<SkBitmap> output =
+  std::unique_ptr<SkBitmap> output =
       DrawAndCopyOutput(&list, device_scale_factor, device_viewport_rect);
   EXPECT_EQ(tile_rect.width(), output->info().width());
   EXPECT_EQ(tile_rect.height(), output->info().height());
@@ -293,7 +294,7 @@
   gfx::Rect device_viewport_rect(0, 0, 100, 100);
 
   settings_.should_clear_root_render_pass = false;
-  InitializeRenderer(make_scoped_ptr(new SoftwareOutputDevice));
+  InitializeRenderer(base::WrapUnique(new SoftwareOutputDevice));
 
   RenderPassList list;
 
@@ -305,7 +306,7 @@
 
   renderer()->DecideRenderPassAllocationsForFrame(list);
 
-  scoped_ptr<SkBitmap> output =
+  std::unique_ptr<SkBitmap> output =
       DrawAndCopyOutput(&list, device_scale_factor, device_viewport_rect);
   EXPECT_EQ(device_viewport_rect.width(), output->info().width());
   EXPECT_EQ(device_viewport_rect.height(), output->info().height());
@@ -348,7 +349,7 @@
 TEST_F(SoftwareRendererTest, RenderPassVisibleRect) {
   float device_scale_factor = 1.f;
   gfx::Rect device_viewport_rect(0, 0, 100, 100);
-  InitializeRenderer(make_scoped_ptr(new SoftwareOutputDevice));
+  InitializeRenderer(base::WrapUnique(new SoftwareOutputDevice));
 
   RenderPassList list;
 
@@ -372,7 +373,7 @@
 
   renderer()->DecideRenderPassAllocationsForFrame(list);
 
-  scoped_ptr<SkBitmap> output =
+  std::unique_ptr<SkBitmap> output =
       DrawAndCopyOutput(&list, device_scale_factor, device_viewport_rect);
   EXPECT_EQ(device_viewport_rect.width(), output->info().width());
   EXPECT_EQ(device_viewport_rect.height(), output->info().height());
diff --git a/cc/output/texture_mailbox_deleter.cc b/cc/output/texture_mailbox_deleter.cc
index 1310fe7b..ff3480d5 100644
--- a/cc/output/texture_mailbox_deleter.cc
+++ b/cc/output/texture_mailbox_deleter.cc
@@ -48,13 +48,14 @@
     impl_callbacks_.at(i)->Run(gpu::SyncToken(), true);
 }
 
-scoped_ptr<SingleReleaseCallback> TextureMailboxDeleter::GetReleaseCallback(
+std::unique_ptr<SingleReleaseCallback>
+TextureMailboxDeleter::GetReleaseCallback(
     scoped_refptr<ContextProvider> context_provider,
     unsigned texture_id) {
   // This callback owns the |context_provider|. It must be destroyed on the impl
   // thread. Upon destruction of this class, the callback must immediately be
   // destroyed.
-  scoped_ptr<SingleReleaseCallback> impl_callback =
+  std::unique_ptr<SingleReleaseCallback> impl_callback =
       SingleReleaseCallback::Create(base::Bind(
           &DeleteTextureOnImplThread, std::move(context_provider), texture_id));
 
@@ -68,7 +69,7 @@
 
   // Provide a callback for the main thread that posts back to the impl
   // thread.
-  scoped_ptr<SingleReleaseCallback> main_callback;
+  std::unique_ptr<SingleReleaseCallback> main_callback;
   if (impl_task_runner_) {
     main_callback = SingleReleaseCallback::Create(base::Bind(
         &PostTaskFromMainToImplThread, impl_task_runner_, run_impl_callback));
diff --git a/cc/output/texture_mailbox_deleter.h b/cc/output/texture_mailbox_deleter.h
index 3ff91d4..c4fbf0b51 100644
--- a/cc/output/texture_mailbox_deleter.h
+++ b/cc/output/texture_mailbox_deleter.h
@@ -5,9 +5,9 @@
 #ifndef CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_
 #define CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/base/cc_export.h"
 
@@ -38,7 +38,7 @@
   // due to the compositor shutting down, then the ReleaseCallback will
   // become a no-op and the texture will be deleted immediately on the
   // impl thread, along with dropping the reference to the ContextProvider.
-  scoped_ptr<SingleReleaseCallback> GetReleaseCallback(
+  std::unique_ptr<SingleReleaseCallback> GetReleaseCallback(
       scoped_refptr<ContextProvider> context_provider,
       unsigned texture_id);
 
@@ -50,7 +50,7 @@
                                     bool is_lost);
 
   scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
-  std::vector<scoped_ptr<SingleReleaseCallback>> impl_callbacks_;
+  std::vector<std::unique_ptr<SingleReleaseCallback>> impl_callbacks_;
   base::WeakPtrFactory<TextureMailboxDeleter> weak_ptr_factory_;
 };
 
diff --git a/cc/output/texture_mailbox_deleter_unittest.cc b/cc/output/texture_mailbox_deleter_unittest.cc
index d17e9c36..3bf239bb 100644
--- a/cc/output/texture_mailbox_deleter_unittest.cc
+++ b/cc/output/texture_mailbox_deleter_unittest.cc
@@ -15,7 +15,7 @@
 namespace {
 
 TEST(TextureMailboxDeleterTest, Destroy) {
-  scoped_ptr<TextureMailboxDeleter> deleter(
+  std::unique_ptr<TextureMailboxDeleter> deleter(
       new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get()));
 
   scoped_refptr<TestContextProvider> context_provider =
@@ -28,7 +28,7 @@
   EXPECT_TRUE(context_provider->HasOneRef());
   EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
 
-  scoped_ptr<SingleReleaseCallback> cb =
+  std::unique_ptr<SingleReleaseCallback> cb =
       deleter->GetReleaseCallback(context_provider, texture_id);
   EXPECT_FALSE(context_provider->HasOneRef());
   EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
@@ -45,7 +45,8 @@
 }
 
 TEST(TextureMailboxDeleterTest, NullTaskRunner) {
-  scoped_ptr<TextureMailboxDeleter> deleter(new TextureMailboxDeleter(nullptr));
+  std::unique_ptr<TextureMailboxDeleter> deleter(
+      new TextureMailboxDeleter(nullptr));
 
   scoped_refptr<TestContextProvider> context_provider =
       TestContextProvider::Create();
@@ -57,7 +58,7 @@
   EXPECT_TRUE(context_provider->HasOneRef());
   EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
 
-  scoped_ptr<SingleReleaseCallback> cb =
+  std::unique_ptr<SingleReleaseCallback> cb =
       deleter->GetReleaseCallback(context_provider, texture_id);
   EXPECT_FALSE(context_provider->HasOneRef());
   EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
diff --git a/cc/output/vulkan_in_process_context_provider.cc b/cc/output/vulkan_in_process_context_provider.cc
index 67e1122..0b67eb1 100644
--- a/cc/output/vulkan_in_process_context_provider.cc
+++ b/cc/output/vulkan_in_process_context_provider.cc
@@ -24,7 +24,8 @@
 }
 
 bool VulkanInProcessContextProvider::Initialize() {
-  scoped_ptr<gpu::VulkanDeviceQueue> device_queue(new gpu::VulkanDeviceQueue);
+  std::unique_ptr<gpu::VulkanDeviceQueue> device_queue(
+      new gpu::VulkanDeviceQueue);
   if (device_queue->Initialize(
           gpu::VulkanDeviceQueue::GRAPHICS_QUEUE_FLAG |
           gpu::VulkanDeviceQueue::PRESENTATION_SUPPORT_QUEUE_FLAG)) {
diff --git a/cc/output/vulkan_in_process_context_provider.h b/cc/output/vulkan_in_process_context_provider.h
index da2d0e0..3f3de616 100644
--- a/cc/output/vulkan_in_process_context_provider.h
+++ b/cc/output/vulkan_in_process_context_provider.h
@@ -5,7 +5,8 @@
 #ifndef CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_
 #define CC_OUTPUT_VULKAN_IN_PROCESS_CONTEXT_PROVIDER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/output/vulkan_context_provider.h"
 
@@ -29,7 +30,7 @@
   ~VulkanInProcessContextProvider() override;
 
  private:
-  scoped_ptr<gpu::VulkanDeviceQueue> device_queue_;
+  std::unique_ptr<gpu::VulkanDeviceQueue> device_queue_;
 };
 
 }  // namespace cc
diff --git a/cc/output/vulkan_renderer.cc b/cc/output/vulkan_renderer.cc
index a285c65..2289035 100644
--- a/cc/output/vulkan_renderer.cc
+++ b/cc/output/vulkan_renderer.cc
@@ -6,14 +6,14 @@
 
 namespace cc {
 
-scoped_ptr<VulkanRenderer> VulkanRenderer::Create(
+std::unique_ptr<VulkanRenderer> VulkanRenderer::Create(
     RendererClient* client,
     const RendererSettings* settings,
     OutputSurface* output_surface,
     ResourceProvider* resource_provider,
     TextureMailboxDeleter* texture_mailbox_deleter,
     int highp_threshold_min) {
-  return scoped_ptr<VulkanRenderer>(
+  return std::unique_ptr<VulkanRenderer>(
       new VulkanRenderer(client, settings, output_surface, resource_provider,
                          texture_mailbox_deleter, highp_threshold_min));
 }
@@ -110,7 +110,7 @@
 
 void VulkanRenderer::CopyCurrentRenderPassToBitmap(
     DrawingFrame* frame,
-    scoped_ptr<CopyOutputRequest> request) {
+    std::unique_ptr<CopyOutputRequest> request) {
   NOTIMPLEMENTED();
 }
 
diff --git a/cc/output/vulkan_renderer.h b/cc/output/vulkan_renderer.h
index 1dfbbc7..0d9eca72 100644
--- a/cc/output/vulkan_renderer.h
+++ b/cc/output/vulkan_renderer.h
@@ -15,7 +15,7 @@
 
 class VulkanRenderer : public DirectRenderer {
  public:
-  static scoped_ptr<VulkanRenderer> Create(
+  static std::unique_ptr<VulkanRenderer> Create(
       RendererClient* client,
       const RendererSettings* settings,
       OutputSurface* output_surface,
@@ -63,7 +63,7 @@
   void EnsureBackbuffer() override;
   void CopyCurrentRenderPassToBitmap(
       DrawingFrame* frame,
-      scoped_ptr<CopyOutputRequest> request) override;
+      std::unique_ptr<CopyOutputRequest> request) override;
 
  private:
   RendererCapabilitiesImpl capabilities_;
diff --git a/cc/playback/clip_display_item.h b/cc/playback/clip_display_item.h
index 2715ce3..41619018 100644
--- a/cc/playback/clip_display_item.h
+++ b/cc/playback/clip_display_item.h
@@ -7,9 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
 #include "third_party/skia/include/core/SkRRect.h"
diff --git a/cc/playback/clip_path_display_item.cc b/cc/playback/clip_path_display_item.cc
index 64ad813..a5dccec 100644
--- a/cc/playback/clip_path_display_item.cc
+++ b/cc/playback/clip_path_display_item.cc
@@ -62,7 +62,7 @@
   // Just use skia's serialization method for the SkPath for now.
   size_t path_size = clip_path_.writeToMemory(nullptr);
   if (path_size > 0) {
-    scoped_ptr<uint8_t[]> buffer(new uint8_t[path_size]);
+    std::unique_ptr<uint8_t[]> buffer(new uint8_t[path_size]);
     clip_path_.writeToMemory(buffer.get());
     details->set_clip_path(buffer.get(), path_size);
   }
diff --git a/cc/playback/clip_path_display_item.h b/cc/playback/clip_path_display_item.h
index f946c147..5bbb1f1 100644
--- a/cc/playback/clip_path_display_item.h
+++ b/cc/playback/clip_path_display_item.h
@@ -7,7 +7,9 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
 #include "third_party/skia/include/core/SkPath.h"
@@ -51,8 +53,8 @@
   explicit EndClipPathDisplayItem(const proto::DisplayItem& proto);
   ~EndClipPathDisplayItem() override;
 
-  static scoped_ptr<EndClipPathDisplayItem> Create() {
-    return make_scoped_ptr(new EndClipPathDisplayItem());
+  static std::unique_ptr<EndClipPathDisplayItem> Create() {
+    return base::WrapUnique(new EndClipPathDisplayItem());
   }
 
   void ToProtobuf(proto::DisplayItem* proto,
diff --git a/cc/playback/compositing_display_item.cc b/cc/playback/compositing_display_item.cc
index 0d75ca9..12738844 100644
--- a/cc/playback/compositing_display_item.cc
+++ b/cc/playback/compositing_display_item.cc
@@ -40,7 +40,7 @@
   const proto::CompositingDisplayItem& details = proto.compositing_item();
   uint8_t alpha = static_cast<uint8_t>(details.alpha());
   SkXfermode::Mode xfermode = SkXfermodeModeFromProto(details.mode());
-  scoped_ptr<SkRect> bounds;
+  std::unique_ptr<SkRect> bounds;
   if (details.has_bounds()) {
     bounds.reset(
         new SkRect(gfx::RectFToSkRect(ProtoToRectF(details.bounds()))));
diff --git a/cc/playback/compositing_display_item.h b/cc/playback/compositing_display_item.h
index cf67222..484cb4b6 100644
--- a/cc/playback/compositing_display_item.h
+++ b/cc/playback/compositing_display_item.h
@@ -8,7 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
 #include "third_party/skia/include/core/SkColorFilter.h"
@@ -66,8 +68,8 @@
   explicit EndCompositingDisplayItem(const proto::DisplayItem& proto);
   ~EndCompositingDisplayItem() override;
 
-  static scoped_ptr<EndCompositingDisplayItem> Create() {
-    return make_scoped_ptr(new EndCompositingDisplayItem());
+  static std::unique_ptr<EndCompositingDisplayItem> Create() {
+    return base::WrapUnique(new EndCompositingDisplayItem());
   }
 
   void ToProtobuf(proto::DisplayItem* proto,
diff --git a/cc/playback/discardable_image_map_unittest.cc b/cc/playback/discardable_image_map_unittest.cc
index 95c23a3b..c02de7dc 100644
--- a/cc/playback/discardable_image_map_unittest.cc
+++ b/cc/playback/discardable_image_map_unittest.cc
@@ -6,8 +6,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "cc/base/region.h"
 #include "cc/test/fake_content_layer_client.h"
@@ -338,7 +339,7 @@
     DiscardableImageMap::ScopedMetadataGenerator generator(&image_map,
                                                            visible_rect.size());
     {
-      scoped_ptr<SkPaint> paint(new SkPaint());
+      std::unique_ptr<SkPaint> paint(new SkPaint());
       generator.canvas()->saveLayer(gfx::RectToSkRect(visible_rect),
                                     paint.get());
     }
diff --git a/cc/playback/display_item.h b/cc/playback/display_item.h
index 3f61adb..bc1eae6 100644
--- a/cc/playback/display_item.h
+++ b/cc/playback/display_item.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/debug/traced_value.h"
 #include "third_party/skia/include/core/SkPicture.h"
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index 91f9cf2..7fb037a7 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -237,9 +237,9 @@
   return ApproximateOpCount() <= kOpCountThatIsOkToAnalyze;
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 DisplayItemList::AsValue(bool include_items) const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
 
   state->BeginDictionary("params");
diff --git a/cc/playback/display_item_list.h b/cc/playback/display_item_list.h
index 5d33d24..4588b03 100644
--- a/cc/playback/display_item_list.h
+++ b/cc/playback/display_item_list.h
@@ -6,12 +6,13 @@
 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/contiguous_container.h"
@@ -98,7 +99,7 @@
 
   bool RetainsIndividualDisplayItems() const;
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue(
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue(
       bool include_items) const;
 
   void EmitTraceSnapshot() const;
@@ -128,7 +129,7 @@
   std::vector<gfx::Rect> visual_rects_;
   sk_sp<SkPicture> picture_;
 
-  scoped_ptr<SkPictureRecorder> recorder_;
+  std::unique_ptr<SkPictureRecorder> recorder_;
   skia::RefPtr<SkCanvas> canvas_;
   const DisplayItemListSettings settings_;
   bool retain_individual_display_items_;
diff --git a/cc/playback/display_item_list_unittest.cc b/cc/playback/display_item_list_unittest.cc
index 67d890f..6efce7ca3 100644
--- a/cc/playback/display_item_list_unittest.cc
+++ b/cc/playback/display_item_list_unittest.cc
@@ -8,6 +8,7 @@
 
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "cc/output/filter_operation.h"
 #include "cc/output/filter_operations.h"
 #include "cc/playback/clip_display_item.h"
@@ -80,9 +81,9 @@
                                           scoped_refptr<DisplayItemList> list) {
   list->Finalize();
 
-  scoped_ptr<FakeImageSerializationProcessor>
+  std::unique_ptr<FakeImageSerializationProcessor>
       fake_image_serialization_processor =
-          make_scoped_ptr(new FakeImageSerializationProcessor);
+          base::WrapUnique(new FakeImageSerializationProcessor);
 
   // Serialize and deserialize the DisplayItemList.
   proto::DisplayItemList proto;
diff --git a/cc/playback/drawing_display_item.h b/cc/playback/drawing_display_item.h
index 0e7c640..c24fe23 100644
--- a/cc/playback/drawing_display_item.h
+++ b/cc/playback/drawing_display_item.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
 #include "third_party/skia/include/core/SkRefCnt.h"
diff --git a/cc/playback/filter_display_item.h b/cc/playback/filter_display_item.h
index b385538..396d6b5a 100644
--- a/cc/playback/filter_display_item.h
+++ b/cc/playback/filter_display_item.h
@@ -7,7 +7,9 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/filter_operations.h"
 #include "cc/playback/display_item.h"
@@ -50,8 +52,8 @@
   explicit EndFilterDisplayItem(const proto::DisplayItem& proto);
   ~EndFilterDisplayItem() override;
 
-  static scoped_ptr<EndFilterDisplayItem> Create() {
-    return make_scoped_ptr(new EndFilterDisplayItem());
+  static std::unique_ptr<EndFilterDisplayItem> Create() {
+    return base::WrapUnique(new EndFilterDisplayItem());
   }
 
   void ToProtobuf(proto::DisplayItem* proto,
diff --git a/cc/playback/float_clip_display_item.h b/cc/playback/float_clip_display_item.h
index 41d9ace..f4614010a1 100644
--- a/cc/playback/float_clip_display_item.h
+++ b/cc/playback/float_clip_display_item.h
@@ -7,9 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
 #include "ui/gfx/geometry/rect_f.h"
@@ -50,8 +51,8 @@
   explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto);
   ~EndFloatClipDisplayItem() override;
 
-  static scoped_ptr<EndFloatClipDisplayItem> Create() {
-    return make_scoped_ptr(new EndFloatClipDisplayItem());
+  static std::unique_ptr<EndFloatClipDisplayItem> Create() {
+    return base::WrapUnique(new EndFloatClipDisplayItem());
   }
 
   void ToProtobuf(proto::DisplayItem* proto,
diff --git a/cc/playback/raster_source.h b/cc/playback/raster_source.h
index 4931ee5..11ece7c5 100644
--- a/cc/playback/raster_source.h
+++ b/cc/playback/raster_source.h
@@ -7,10 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/trace_event/memory_allocator_dump.h"
 #include "base/trace_event/memory_dump_provider.h"
diff --git a/cc/playback/raster_source_unittest.cc b/cc/playback/raster_source_unittest.cc
index 7efbaf9..7f0c0cfc 100644
--- a/cc/playback/raster_source_unittest.cc
+++ b/cc/playback/raster_source_unittest.cc
@@ -2,10 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/playback/raster_source.h"
+
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
-#include "cc/playback/raster_source.h"
+#include <memory>
+
 #include "cc/test/fake_recording_source.h"
 #include "cc/test/skia_common.h"
 #include "skia/ext/refptr.h"
@@ -21,7 +23,7 @@
 TEST(RasterSourceTest, AnalyzeIsSolidUnscaled) {
   gfx::Size layer_bounds(400, 400);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
 
   SkPaint solid_paint;
@@ -92,7 +94,7 @@
 TEST(RasterSourceTest, AnalyzeIsSolidScaled) {
   gfx::Size layer_bounds(400, 400);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
 
   SkColor solid_color = SkColorSetARGB(255, 12, 23, 34);
@@ -163,7 +165,7 @@
 TEST(RasterSourceTest, AnalyzeIsSolidEmpty) {
   gfx::Size layer_bounds(400, 400);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source->Rerecord();
 
@@ -181,7 +183,7 @@
 TEST(RasterSourceTest, PixelRefIteratorDiscardableRefsOneTile) {
   gfx::Size layer_bounds(512, 512);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
 
   skia::RefPtr<SkImage> discardable_image[2][2];
@@ -245,7 +247,7 @@
   float contents_scale = 1.5f;
   float raster_divisions = 2.f;
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source->SetBackgroundColor(SK_ColorBLACK);
   recording_source->SetClearCanvasWithDebugColor(false);
@@ -311,7 +313,7 @@
   gfx::Size layer_bounds(3, 5);
   float contents_scale = 1.5f;
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source->SetBackgroundColor(SK_ColorGREEN);
   recording_source->SetClearCanvasWithDebugColor(false);
@@ -403,7 +405,7 @@
   gfx::Size partial_bounds(2, 4);
   float contents_scale = 1.5f;
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source->SetBackgroundColor(SK_ColorGREEN);
   recording_source->SetRequiresClear(true);
@@ -449,7 +451,7 @@
     }
   }
 
-  scoped_ptr<FakeRecordingSource> recording_source_light =
+  std::unique_ptr<FakeRecordingSource> recording_source_light =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source_light->SetBackgroundColor(SK_ColorGREEN);
   recording_source_light->SetRequiresClear(true);
@@ -492,7 +494,7 @@
   gfx::Size layer_bounds(5, 3);
   float contents_scale = 0.5f;
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source->SetBackgroundColor(SK_ColorTRANSPARENT);
   recording_source->SetRequiresClear(true);
@@ -524,7 +526,7 @@
 TEST(RasterSourceTest, GetPictureMemoryUsageIncludesClientReportedMemory) {
   const size_t kReportedMemoryUsageInBytes = 100 * 1024 * 1024;
   gfx::Size layer_bounds(5, 3);
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
   recording_source->set_reported_memory_usage(kReportedMemoryUsageInBytes);
   recording_source->Rerecord();
diff --git a/cc/playback/recording_source.h b/cc/playback/recording_source.h
index 7da3e64..9e5aa7e 100644
--- a/cc/playback/recording_source.h
+++ b/cc/playback/recording_source.h
@@ -7,9 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/invalidation_region.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/cc/playback/recording_source_unittest.cc b/cc/playback/recording_source_unittest.cc
index b4b8d250..c214cf6 100644
--- a/cc/playback/recording_source_unittest.cc
+++ b/cc/playback/recording_source_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "cc/base/region.h"
 #include "cc/playback/raster_source.h"
 #include "cc/proto/recording_source.pb.h"
@@ -16,10 +17,10 @@
 namespace cc {
 namespace {
 
-scoped_ptr<FakeRecordingSource> CreateRecordingSource(
+std::unique_ptr<FakeRecordingSource> CreateRecordingSource(
     const gfx::Rect& viewport) {
   gfx::Rect layer_rect(viewport.right(), viewport.bottom());
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateRecordingSource(viewport, layer_rect.size());
   return recording_source;
 }
@@ -32,9 +33,9 @@
 }
 
 void ValidateRecordingSourceSerialization(FakeRecordingSource* source) {
-  scoped_ptr<FakeImageSerializationProcessor>
+  std::unique_ptr<FakeImageSerializationProcessor>
       fake_image_serialization_processor =
-          make_scoped_ptr(new FakeImageSerializationProcessor);
+          base::WrapUnique(new FakeImageSerializationProcessor);
 
   proto::RecordingSource proto;
   source->ToProtobuf(&proto, fake_image_serialization_processor.get());
@@ -48,7 +49,7 @@
 TEST(RecordingSourceTest, TestNullDisplayListSerialization) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
   recording_source->SetDisplayListUsesCachedPicture(false);
   recording_source->SetGenerateDiscardableImagesMetadata(true);
@@ -61,7 +62,7 @@
 TEST(RecordingSourceTest, TestEmptySerializationDeserialization) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
   recording_source->SetDisplayListUsesCachedPicture(false);
   recording_source->SetGenerateDiscardableImagesMetadata(true);
@@ -73,7 +74,7 @@
 TEST(RecordingSourceTest, TestPopulatedSerializationDeserialization) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
   recording_source->SetDisplayListUsesCachedPicture(false);
 
@@ -97,7 +98,7 @@
 TEST(RecordingSourceTest, DiscardableImagesWithTransform) {
   gfx::Rect recorded_viewport(256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(
           recorded_viewport.size());
   skia::RefPtr<SkImage> discardable_image[2][2];
@@ -188,7 +189,7 @@
 TEST(RecordingSourceTest, NoGatherImageEmptyImages) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
   recording_source->SetGenerateDiscardableImagesMetadata(false);
   recording_source->Rerecord();
@@ -208,7 +209,7 @@
 TEST(RecordingSourceTest, EmptyImages) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
   recording_source->SetGenerateDiscardableImagesMetadata(true);
   recording_source->Rerecord();
@@ -242,7 +243,7 @@
 TEST(RecordingSourceTest, NoDiscardableImages) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
 
   SkPaint simple_paint;
@@ -300,7 +301,7 @@
 TEST(RecordingSourceTest, DiscardableImages) {
   gfx::Rect recorded_viewport(0, 0, 256, 256);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
 
   skia::RefPtr<SkImage> discardable_image[2][2];
@@ -367,7 +368,7 @@
 TEST(RecordingSourceTest, DiscardableImagesBaseNonDiscardable) {
   gfx::Rect recorded_viewport(0, 0, 512, 512);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       CreateRecordingSource(recorded_viewport);
 
   SkBitmap non_discardable_bitmap;
diff --git a/cc/playback/transform_display_item.h b/cc/playback/transform_display_item.h
index 7c1d934f..5065ea9 100644
--- a/cc/playback/transform_display_item.h
+++ b/cc/playback/transform_display_item.h
@@ -7,7 +7,9 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
 #include "ui/gfx/transform.h"
@@ -48,8 +50,8 @@
   explicit EndTransformDisplayItem(const proto::DisplayItem& proto);
   ~EndTransformDisplayItem() override;
 
-  static scoped_ptr<EndTransformDisplayItem> Create() {
-    return make_scoped_ptr(new EndTransformDisplayItem());
+  static std::unique_ptr<EndTransformDisplayItem> Create() {
+    return base::WrapUnique(new EndTransformDisplayItem());
   }
 
   void ToProtobuf(proto::DisplayItem* proto,
diff --git a/cc/quads/content_draw_quad_base.h b/cc/quads/content_draw_quad_base.h
index da8a472f..52b1850f 100644
--- a/cc/quads/content_draw_quad_base.h
+++ b/cc/quads/content_draw_quad_base.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_
 #define CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "ui/gfx/geometry/rect_f.h"
diff --git a/cc/quads/debug_border_draw_quad.h b/cc/quads/debug_border_draw_quad.h
index 7023ab23..1a205b3 100644
--- a/cc/quads/debug_border_draw_quad.h
+++ b/cc/quads/debug_border_draw_quad.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_DEBUG_BORDER_DRAW_QUAD_H_
 #define CC_QUADS_DEBUG_BORDER_DRAW_QUAD_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc
index a300c92..b0b6b4a 100644
--- a/cc/quads/draw_polygon.cc
+++ b/cc/quads/draw_polygon.cc
@@ -78,8 +78,8 @@
 DrawPolygon::~DrawPolygon() {
 }
 
-scoped_ptr<DrawPolygon> DrawPolygon::CreateCopy() {
-  scoped_ptr<DrawPolygon> new_polygon(new DrawPolygon());
+std::unique_ptr<DrawPolygon> DrawPolygon::CreateCopy() {
+  std::unique_ptr<DrawPolygon> new_polygon(new DrawPolygon());
   new_polygon->order_index_ = order_index_;
   new_polygon->original_ref_ = original_ref_;
   new_polygon->points_.reserve(points_.size());
@@ -257,8 +257,8 @@
 }
 
 bool DrawPolygon::Split(const DrawPolygon& splitter,
-                        scoped_ptr<DrawPolygon>* front,
-                        scoped_ptr<DrawPolygon>* back) {
+                        std::unique_ptr<DrawPolygon>* front,
+                        std::unique_ptr<DrawPolygon>* back) {
   gfx::Point3F intersections[2];
   std::vector<gfx::Point3F> out_points[2];
   // vertex_before stores the index of the vertex before its matching
@@ -318,9 +318,9 @@
 
   // Give both polygons the original splitting polygon's ID, so that they'll
   // still be sorted properly in co-planar instances.
-  scoped_ptr<DrawPolygon> poly1(
+  std::unique_ptr<DrawPolygon> poly1(
       new DrawPolygon(original_ref_, out_points[0], normal_, order_index_));
-  scoped_ptr<DrawPolygon> poly2(
+  std::unique_ptr<DrawPolygon> poly2(
       new DrawPolygon(original_ref_, out_points[1], normal_, order_index_));
 
   DCHECK_GE(poly1->points().size(), 3u);
diff --git a/cc/quads/draw_polygon.h b/cc/quads/draw_polygon.h
index 668d9f2..b3bde398c 100644
--- a/cc/quads/draw_polygon.h
+++ b/cc/quads/draw_polygon.h
@@ -41,8 +41,8 @@
   // intersection points. Only when it returns true will front and back both be
   // valid new polygons that are on opposite sides of the splitting plane.
   bool Split(const DrawPolygon& splitter,
-             scoped_ptr<DrawPolygon>* front,
-             scoped_ptr<DrawPolygon>* back);
+             std::unique_ptr<DrawPolygon>* front,
+             std::unique_ptr<DrawPolygon>* back);
   float SignedPointDistance(const gfx::Point3F& point) const;
   // Checks polygon a against polygon b and returns which side it lies on, or
   // whether it crosses (necessitating a split in the BSP tree).
@@ -57,7 +57,7 @@
   const DrawQuad* original_ref() const { return original_ref_; }
   int order_index() const { return order_index_; }
   bool is_split() const { return is_split_; }
-  scoped_ptr<DrawPolygon> CreateCopy();
+  std::unique_ptr<DrawPolygon> CreateCopy();
 
   void RecomputeNormalForTesting();
 
diff --git a/cc/quads/draw_polygon_unittest.cc b/cc/quads/draw_polygon_unittest.cc
index eb6d162..d70ef5c 100644
--- a/cc/quads/draw_polygon_unittest.cc
+++ b/cc/quads/draw_polygon_unittest.cc
@@ -260,8 +260,8 @@
 
   EXPECT_EQ(BSP_SPLIT, DrawPolygon::SideCompare(polygon_b, polygon_a));
 
-  scoped_ptr<DrawPolygon> front_polygon;
-  scoped_ptr<DrawPolygon> back_polygon;
+  std::unique_ptr<DrawPolygon> front_polygon;
+  std::unique_ptr<DrawPolygon> back_polygon;
   polygon_b.Split(polygon_a, &front_polygon, &back_polygon);
   EXPECT_EQ(BSP_FRONT, DrawPolygon::SideCompare(*front_polygon, polygon_a));
   EXPECT_EQ(BSP_BACK, DrawPolygon::SideCompare(*back_polygon, polygon_a));
@@ -304,8 +304,8 @@
 
   EXPECT_EQ(BSP_SPLIT, DrawPolygon::SideCompare(polygon_a, polygon_b));
 
-  scoped_ptr<DrawPolygon> front_polygon;
-  scoped_ptr<DrawPolygon> back_polygon;
+  std::unique_ptr<DrawPolygon> front_polygon;
+  std::unique_ptr<DrawPolygon> back_polygon;
   polygon_a.Split(polygon_b, &front_polygon, &back_polygon);
   EXPECT_EQ(BSP_FRONT, DrawPolygon::SideCompare(*front_polygon, polygon_b));
   EXPECT_EQ(BSP_BACK, DrawPolygon::SideCompare(*back_polygon, polygon_b));
diff --git a/cc/quads/draw_quad_perftest.cc b/cc/quads/draw_quad_perftest.cc
index 08ce6d0..f9504be 100644
--- a/cc/quads/draw_quad_perftest.cc
+++ b/cc/quads/draw_quad_perftest.cc
@@ -98,7 +98,7 @@
   }
 
  private:
-  scoped_ptr<RenderPass> render_pass_;
+  std::unique_ptr<RenderPass> render_pass_;
   SharedQuadState* shared_state_;
   LapTimer timer_;
 };
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index 1059470..8360f1e 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -43,11 +43,11 @@
   SkXfermode::Mode blend_mode = SkXfermode::kMultiply_Mode;
   int sorting_context_id = 65536;
 
-  scoped_ptr<SharedQuadState> state(new SharedQuadState);
+  std::unique_ptr<SharedQuadState> state(new SharedQuadState);
   state->SetAll(quad_transform, layer_bounds, visible_layer_rect, clip_rect,
                 is_clipped, opacity, blend_mode, sorting_context_id);
 
-  scoped_ptr<SharedQuadState> copy(new SharedQuadState);
+  std::unique_ptr<SharedQuadState> copy(new SharedQuadState);
   copy->CopyFrom(state.get());
   EXPECT_EQ(quad_transform, copy->quad_to_target_transform);
   EXPECT_EQ(visible_layer_rect, copy->visible_quad_layer_rect);
@@ -85,7 +85,7 @@
 }
 
 #define CREATE_SHARED_STATE()                                              \
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();               \
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();          \
   SharedQuadState* shared_state(CreateSharedQuadState(render_pass.get())); \
   SharedQuadState* copy_shared_state =                                     \
       render_pass->CreateAndAppendSharedQuadState();                       \
diff --git a/cc/quads/io_surface_draw_quad.h b/cc/quads/io_surface_draw_quad.h
index 9deb8fa..4c66922 100644
--- a/cc/quads/io_surface_draw_quad.h
+++ b/cc/quads/io_surface_draw_quad.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/cc/quads/picture_draw_quad.h b/cc/quads/picture_draw_quad.h
index 27abd61..b9286b7 100644
--- a/cc/quads/picture_draw_quad.h
+++ b/cc/quads/picture_draw_quad.h
@@ -5,8 +5,9 @@
 #ifndef CC_QUADS_PICTURE_DRAW_QUAD_H_
 #define CC_QUADS_PICTURE_DRAW_QUAD_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/raster_source.h"
 #include "cc/quads/content_draw_quad_base.h"
diff --git a/cc/quads/render_pass.cc b/cc/quads/render_pass.cc
index 15ed6a4..a553d92 100644
--- a/cc/quads/render_pass.cc
+++ b/cc/quads/render_pass.cc
@@ -8,6 +8,7 @@
 
 #include <algorithm>
 
+#include "base/memory/ptr_util.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "base/values.h"
@@ -39,17 +40,18 @@
     : ListContainer<DrawQuad>(LargestDrawQuadSize(), default_size_to_reserve) {
 }
 
-scoped_ptr<RenderPass> RenderPass::Create() {
-  return make_scoped_ptr(new RenderPass());
+std::unique_ptr<RenderPass> RenderPass::Create() {
+  return base::WrapUnique(new RenderPass());
 }
 
-scoped_ptr<RenderPass> RenderPass::Create(size_t num_layers) {
-  return make_scoped_ptr(new RenderPass(num_layers));
+std::unique_ptr<RenderPass> RenderPass::Create(size_t num_layers) {
+  return base::WrapUnique(new RenderPass(num_layers));
 }
 
-scoped_ptr<RenderPass> RenderPass::Create(size_t shared_quad_state_list_size,
-                                          size_t quad_list_size) {
-  return make_scoped_ptr(
+std::unique_ptr<RenderPass> RenderPass::Create(
+    size_t shared_quad_state_list_size,
+    size_t quad_list_size) {
+  return base::WrapUnique(
       new RenderPass(shared_quad_state_list_size, quad_list_size));
 }
 
@@ -82,8 +84,8 @@
       "cc::RenderPass", id.AsTracingId());
 }
 
-scoped_ptr<RenderPass> RenderPass::Copy(RenderPassId new_id) const {
-  scoped_ptr<RenderPass> copy_pass(
+std::unique_ptr<RenderPass> RenderPass::Copy(RenderPassId new_id) const {
+  std::unique_ptr<RenderPass> copy_pass(
       Create(shared_quad_state_list.size(), quad_list.size()));
   copy_pass->SetAll(new_id,
                     output_rect,
@@ -94,14 +96,14 @@
 }
 
 // static
-void RenderPass::CopyAll(const std::vector<scoped_ptr<RenderPass>>& in,
-                         std::vector<scoped_ptr<RenderPass>>* out) {
+void RenderPass::CopyAll(const std::vector<std::unique_ptr<RenderPass>>& in,
+                         std::vector<std::unique_ptr<RenderPass>>* out) {
   for (const auto& source : in) {
     // Since we can't copy these, it's wrong to use CopyAll in a situation where
     // you may have copy_requests present.
     DCHECK_EQ(source->copy_requests.size(), 0u);
 
-    scoped_ptr<RenderPass> copy_pass(Create(
+    std::unique_ptr<RenderPass> copy_pass(Create(
         source->shared_quad_state_list.size(), source->quad_list.size()));
     copy_pass->SetAll(source->id,
                       source->output_rect,
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index 3f7775d..ef0b926 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -57,18 +57,18 @@
  public:
   ~RenderPass();
 
-  static scoped_ptr<RenderPass> Create();
-  static scoped_ptr<RenderPass> Create(size_t num_layers);
-  static scoped_ptr<RenderPass> Create(size_t shared_quad_state_list_size,
-                                       size_t quad_list_size);
+  static std::unique_ptr<RenderPass> Create();
+  static std::unique_ptr<RenderPass> Create(size_t num_layers);
+  static std::unique_ptr<RenderPass> Create(size_t shared_quad_state_list_size,
+                                            size_t quad_list_size);
 
   // A shallow copy of the render pass, which does not include its quads or copy
   // requests.
-  scoped_ptr<RenderPass> Copy(RenderPassId new_id) const;
+  std::unique_ptr<RenderPass> Copy(RenderPassId new_id) const;
 
   // A deep copy of the render passes in the list including the quads.
-  static void CopyAll(const std::vector<scoped_ptr<RenderPass>>& in,
-                      std::vector<scoped_ptr<RenderPass>>* out);
+  static void CopyAll(const std::vector<std::unique_ptr<RenderPass>>& in,
+                      std::vector<std::unique_ptr<RenderPass>>* out);
 
   void SetNew(RenderPassId id,
               const gfx::Rect& output_rect,
@@ -115,7 +115,7 @@
   // contents as a bitmap, and give a copy of the bitmap to each callback in
   // this list. This property should not be serialized between compositors, as
   // it only makes sense in the root compositor.
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_requests;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
 
   QuadList quad_list;
   SharedQuadStateList shared_quad_state_list;
@@ -134,7 +134,7 @@
   DISALLOW_COPY_AND_ASSIGN(RenderPass);
 };
 
-using RenderPassList = std::vector<scoped_ptr<RenderPass>>;
+using RenderPassList = std::vector<std::unique_ptr<RenderPass>>;
 using RenderPassIdHashMap =
     std::unordered_map<RenderPassId, RenderPass*, RenderPassIdHash>;
 
diff --git a/cc/quads/render_pass_draw_quad.h b/cc/quads/render_pass_draw_quad.h
index 2591ac8..94461a1a 100644
--- a/cc/quads/render_pass_draw_quad.h
+++ b/cc/quads/render_pass_draw_quad.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/output/filter_operations.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/quads/render_pass_unittest.cc b/cc/quads/render_pass_unittest.cc
index b833a0c..0a4e7221 100644
--- a/cc/quads/render_pass_unittest.cc
+++ b/cc/quads/render_pass_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include "base/memory/ptr_util.h"
 #include "cc/base/math_util.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/quads/render_pass_draw_quad.h"
@@ -28,7 +29,7 @@
   gfx::Rect output_rect;
   gfx::Rect damage_rect;
   bool has_transparent_background;
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_callbacks;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_callbacks;
 };
 
 static void CompareRenderPassLists(const RenderPassList& expected_list,
@@ -69,7 +70,7 @@
   gfx::Rect damage_rect(56, 123, 19, 43);
   bool has_transparent_background = true;
 
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->SetAll(id,
                output_rect,
                damage_rect,
@@ -95,7 +96,7 @@
 
   RenderPassId new_id(63, 4);
 
-  scoped_ptr<RenderPass> copy = pass->Copy(new_id);
+  std::unique_ptr<RenderPass> copy = pass->Copy(new_id);
   EXPECT_EQ(new_id, copy->id);
   EXPECT_EQ(pass->output_rect, copy->output_rect);
   EXPECT_EQ(pass->transform_to_root_target, copy->transform_to_root_target);
@@ -120,7 +121,7 @@
   gfx::Rect damage_rect(56, 123, 19, 43);
   bool has_transparent_background = true;
 
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->SetAll(id,
                output_rect,
                damage_rect,
@@ -181,7 +182,7 @@
   gfx::Rect contrib_damage_rect(11, 16, 10, 15);
   bool contrib_has_transparent_background = true;
 
-  scoped_ptr<RenderPass> contrib = RenderPass::Create();
+  std::unique_ptr<RenderPass> contrib = RenderPass::Create();
   contrib->SetAll(contrib_id,
                   contrib_output_rect,
                   contrib_damage_rect,
@@ -206,8 +207,8 @@
                        false);
 
   // And a RenderPassDrawQuad for the contributing pass.
-  scoped_ptr<RenderPassDrawQuad> pass_quad =
-      make_scoped_ptr(new RenderPassDrawQuad);
+  std::unique_ptr<RenderPassDrawQuad> pass_quad =
+      base::WrapUnique(new RenderPassDrawQuad);
   pass_quad->SetNew(pass->shared_quad_state_list.back(),
                     contrib_output_rect,
                     contrib_output_rect,
@@ -239,7 +240,7 @@
   gfx::Rect damage_rect(56, 123, 19, 43);
   bool has_transparent_background = true;
 
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->SetAll(id,
                output_rect,
                damage_rect,
diff --git a/cc/quads/shared_quad_state.h b/cc/quads/shared_quad_state.h
index a66c7bc..35da669 100644
--- a/cc/quads/shared_quad_state.h
+++ b/cc/quads/shared_quad_state.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_SHARED_QUAD_STATE_H_
 #define CC_QUADS_SHARED_QUAD_STATE_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "third_party/skia/include/core/SkXfermode.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/cc/quads/solid_color_draw_quad.h b/cc/quads/solid_color_draw_quad.h
index 8b95041..97ab1e2 100644
--- a/cc/quads/solid_color_draw_quad.h
+++ b/cc/quads/solid_color_draw_quad.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_SOLID_COLOR_DRAW_QUAD_H_
 #define CC_QUADS_SOLID_COLOR_DRAW_QUAD_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/cc/quads/stream_video_draw_quad.h b/cc/quads/stream_video_draw_quad.h
index 8547b66..8137edb 100644
--- a/cc/quads/stream_video_draw_quad.h
+++ b/cc/quads/stream_video_draw_quad.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "ui/gfx/transform.h"
diff --git a/cc/quads/surface_draw_quad.h b/cc/quads/surface_draw_quad.h
index 86887ca..890f3bf 100644
--- a/cc/quads/surface_draw_quad.h
+++ b/cc/quads/surface_draw_quad.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_SURFACE_DRAW_QUAD_H_
 #define CC_QUADS_SURFACE_DRAW_QUAD_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "cc/surfaces/surface_id.h"
diff --git a/cc/quads/texture_draw_quad.h b/cc/quads/texture_draw_quad.h
index 5ec060e..a370fd72 100644
--- a/cc/quads/texture_draw_quad.h
+++ b/cc/quads/texture_draw_quad.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "ui/gfx/geometry/rect_f.h"
diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
index 7193377a..1f53e8d 100644
--- a/cc/quads/yuv_video_draw_quad.h
+++ b/cc/quads/yuv_video_draw_quad.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
 #include "ui/gfx/geometry/rect_f.h"
diff --git a/cc/raster/bitmap_tile_task_worker_pool.cc b/cc/raster/bitmap_tile_task_worker_pool.cc
index 783ec484..a24b1a2 100644
--- a/cc/raster/bitmap_tile_task_worker_pool.cc
+++ b/cc/raster/bitmap_tile_task_worker_pool.cc
@@ -10,6 +10,7 @@
 #include <algorithm>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
@@ -67,11 +68,11 @@
 }  // namespace
 
 // static
-scoped_ptr<TileTaskWorkerPool> BitmapTileTaskWorkerPool::Create(
+std::unique_ptr<TileTaskWorkerPool> BitmapTileTaskWorkerPool::Create(
     base::SequencedTaskRunner* task_runner,
     TaskGraphRunner* task_graph_runner,
     ResourceProvider* resource_provider) {
-  return make_scoped_ptr<TileTaskWorkerPool>(new BitmapTileTaskWorkerPool(
+  return base::WrapUnique<TileTaskWorkerPool>(new BitmapTileTaskWorkerPool(
       task_runner, task_graph_runner, resource_provider));
 }
 
@@ -132,16 +133,16 @@
   return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
 }
 
-scoped_ptr<RasterBuffer> BitmapTileTaskWorkerPool::AcquireBufferForRaster(
+std::unique_ptr<RasterBuffer> BitmapTileTaskWorkerPool::AcquireBufferForRaster(
     const Resource* resource,
     uint64_t resource_content_id,
     uint64_t previous_content_id) {
-  return scoped_ptr<RasterBuffer>(new RasterBufferImpl(
+  return std::unique_ptr<RasterBuffer>(new RasterBufferImpl(
       resource_provider_, resource, resource_content_id, previous_content_id));
 }
 
 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster(
-    scoped_ptr<RasterBuffer> buffer) {
+    std::unique_ptr<RasterBuffer> buffer) {
   // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
 }
 
diff --git a/cc/raster/bitmap_tile_task_worker_pool.h b/cc/raster/bitmap_tile_task_worker_pool.h
index 7fea2b2d..4f6d99d 100644
--- a/cc/raster/bitmap_tile_task_worker_pool.h
+++ b/cc/raster/bitmap_tile_task_worker_pool.h
@@ -27,7 +27,7 @@
  public:
   ~BitmapTileTaskWorkerPool() override;
 
-  static scoped_ptr<TileTaskWorkerPool> Create(
+  static std::unique_ptr<TileTaskWorkerPool> Create(
       base::SequencedTaskRunner* task_runner,
       TaskGraphRunner* task_graph_runner,
       ResourceProvider* resource_provider);
@@ -43,11 +43,11 @@
   bool GetResourceRequiresSwizzle(bool must_support_alpha) const override;
 
   // Overridden from TileTaskClient:
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override;
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override;
 
  protected:
   BitmapTileTaskWorkerPool(base::SequencedTaskRunner* task_runner,
@@ -55,7 +55,8 @@
                            ResourceProvider* resource_provider);
 
  private:
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue()
+      const;
 
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
   TaskGraphRunner* task_graph_runner_;
diff --git a/cc/raster/gpu_tile_task_worker_pool.cc b/cc/raster/gpu_tile_task_worker_pool.cc
index 27d0a4651..858094e 100644
--- a/cc/raster/gpu_tile_task_worker_pool.cc
+++ b/cc/raster/gpu_tile_task_worker_pool.cc
@@ -9,6 +9,7 @@
 #include <algorithm>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/playback/raster_source.h"
 #include "cc/raster/gpu_rasterizer.h"
@@ -89,14 +90,14 @@
 }  // namespace
 
 // static
-scoped_ptr<TileTaskWorkerPool> GpuTileTaskWorkerPool::Create(
+std::unique_ptr<TileTaskWorkerPool> GpuTileTaskWorkerPool::Create(
     base::SequencedTaskRunner* task_runner,
     TaskGraphRunner* task_graph_runner,
     ContextProvider* context_provider,
     ResourceProvider* resource_provider,
     bool use_distance_field_text,
     int gpu_rasterization_msaa_sample_count) {
-  return make_scoped_ptr<TileTaskWorkerPool>(new GpuTileTaskWorkerPool(
+  return base::WrapUnique<TileTaskWorkerPool>(new GpuTileTaskWorkerPool(
       task_runner, task_graph_runner, context_provider, resource_provider,
       use_distance_field_text, gpu_rasterization_msaa_sample_count));
 }
@@ -178,16 +179,16 @@
   completed_tasks_.clear();
 }
 
-scoped_ptr<RasterBuffer> GpuTileTaskWorkerPool::AcquireBufferForRaster(
+std::unique_ptr<RasterBuffer> GpuTileTaskWorkerPool::AcquireBufferForRaster(
     const Resource* resource,
     uint64_t resource_content_id,
     uint64_t previous_content_id) {
-  return scoped_ptr<RasterBuffer>(new RasterBufferImpl(
+  return std::unique_ptr<RasterBuffer>(new RasterBufferImpl(
       rasterizer_.get(), resource, resource_content_id, previous_content_id));
 }
 
 void GpuTileTaskWorkerPool::ReleaseBufferForRaster(
-    scoped_ptr<RasterBuffer> buffer) {
+    std::unique_ptr<RasterBuffer> buffer) {
   // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
 }
 
diff --git a/cc/raster/gpu_tile_task_worker_pool.h b/cc/raster/gpu_tile_task_worker_pool.h
index 0577b51..6943a271 100644
--- a/cc/raster/gpu_tile_task_worker_pool.h
+++ b/cc/raster/gpu_tile_task_worker_pool.h
@@ -22,7 +22,7 @@
  public:
   ~GpuTileTaskWorkerPool() override;
 
-  static scoped_ptr<TileTaskWorkerPool> Create(
+  static std::unique_ptr<TileTaskWorkerPool> Create(
       base::SequencedTaskRunner* task_runner,
       TaskGraphRunner* task_graph_runner,
       ContextProvider* context_provider,
@@ -41,11 +41,11 @@
   bool GetResourceRequiresSwizzle(bool must_support_alpha) const override;
 
   // Overridden from TileTaskClient:
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override;
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override;
 
  private:
   GpuTileTaskWorkerPool(base::SequencedTaskRunner* task_runner,
@@ -60,7 +60,7 @@
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
   TaskGraphRunner* task_graph_runner_;
   const NamespaceToken namespace_token_;
-  scoped_ptr<GpuRasterizer> rasterizer_;
+  std::unique_ptr<GpuRasterizer> rasterizer_;
 
   Task::Vector completed_tasks_;
 
diff --git a/cc/raster/one_copy_tile_task_worker_pool.cc b/cc/raster/one_copy_tile_task_worker_pool.cc
index 8789119..47e4c01c 100644
--- a/cc/raster/one_copy_tile_task_worker_pool.cc
+++ b/cc/raster/one_copy_tile_task_worker_pool.cc
@@ -11,15 +11,9 @@
 #include <utility>
 
 #include "base/macros.h"
-#include "base/strings/stringprintf.h"
-#include "base/thread_task_runner_handle.h"
-#include "base/trace_event/memory_dump_manager.h"
-#include "base/trace_event/trace_event.h"
-#include "base/trace_event/trace_event_argument.h"
-#include "cc/base/container_util.h"
 #include "cc/base/math_util.h"
-#include "cc/debug/traced_value.h"
 #include "cc/raster/raster_buffer.h"
+#include "cc/raster/staging_buffer_pool.h"
 #include "cc/resources/platform_color.h"
 #include "cc/resources/resource_format.h"
 #include "cc/resources/resource_util.h"
@@ -68,117 +62,14 @@
   DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl);
 };
 
-// Delay between checking for query result to be available.
-const int kCheckForQueryResultAvailableTickRateMs = 1;
-
-// Number of attempts to allow before we perform a check that will wait for
-// query to complete.
-const int kMaxCheckForQueryResultAvailableAttempts = 256;
-
 // 4MiB is the size of 4 512x512 tiles, which has proven to be a good
 // default batch size for copy operations.
 const int kMaxBytesPerCopyOperation = 1024 * 1024 * 4;
 
-// Delay before a staging buffer might be released.
-const int kStagingBufferExpirationDelayMs = 1000;
-
-bool CheckForQueryResult(gpu::gles2::GLES2Interface* gl, unsigned query_id) {
-  unsigned complete = 1;
-  gl->GetQueryObjectuivEXT(query_id, GL_QUERY_RESULT_AVAILABLE_EXT, &complete);
-  return !!complete;
-}
-
-void WaitForQueryResult(gpu::gles2::GLES2Interface* gl, unsigned query_id) {
-  TRACE_EVENT0("cc", "WaitForQueryResult");
-
-  int attempts_left = kMaxCheckForQueryResultAvailableAttempts;
-  while (attempts_left--) {
-    if (CheckForQueryResult(gl, query_id))
-      break;
-
-    // We have to flush the context to be guaranteed that a query result will
-    // be available in a finite amount of time.
-    gl->ShallowFlushCHROMIUM();
-
-    base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
-        kCheckForQueryResultAvailableTickRateMs));
-  }
-
-  unsigned result = 0;
-  gl->GetQueryObjectuivEXT(query_id, GL_QUERY_RESULT_EXT, &result);
-}
-
 }  // namespace
 
-OneCopyTileTaskWorkerPool::StagingBuffer::StagingBuffer(const gfx::Size& size,
-                                                        ResourceFormat format)
-    : size(size),
-      format(format),
-      texture_id(0),
-      image_id(0),
-      query_id(0),
-      content_id(0) {}
-
-OneCopyTileTaskWorkerPool::StagingBuffer::~StagingBuffer() {
-  DCHECK_EQ(texture_id, 0u);
-  DCHECK_EQ(image_id, 0u);
-  DCHECK_EQ(query_id, 0u);
-}
-
-void OneCopyTileTaskWorkerPool::StagingBuffer::DestroyGLResources(
-    gpu::gles2::GLES2Interface* gl) {
-  if (query_id) {
-    gl->DeleteQueriesEXT(1, &query_id);
-    query_id = 0;
-  }
-  if (image_id) {
-    gl->DestroyImageCHROMIUM(image_id);
-    image_id = 0;
-  }
-  if (texture_id) {
-    gl->DeleteTextures(1, &texture_id);
-    texture_id = 0;
-  }
-}
-
-void OneCopyTileTaskWorkerPool::StagingBuffer::OnMemoryDump(
-    base::trace_event::ProcessMemoryDump* pmd,
-    ResourceFormat format,
-    bool in_free_list) const {
-  if (!gpu_memory_buffer)
-    return;
-
-  gfx::GpuMemoryBufferId buffer_id = gpu_memory_buffer->GetId();
-  std::string buffer_dump_name =
-      base::StringPrintf("cc/one_copy/staging_memory/buffer_%d", buffer_id.id);
-  base::trace_event::MemoryAllocatorDump* buffer_dump =
-      pmd->CreateAllocatorDump(buffer_dump_name);
-
-  uint64_t buffer_size_in_bytes =
-      ResourceUtil::UncheckedSizeInBytes<uint64_t>(size, format);
-  buffer_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
-                         base::trace_event::MemoryAllocatorDump::kUnitsBytes,
-                         buffer_size_in_bytes);
-  buffer_dump->AddScalar("free_size",
-                         base::trace_event::MemoryAllocatorDump::kUnitsBytes,
-                         in_free_list ? buffer_size_in_bytes : 0);
-
-  // Emit an ownership edge towards a global allocator dump node.
-  const uint64_t tracing_process_id =
-      base::trace_event::MemoryDumpManager::GetInstance()
-          ->GetTracingProcessId();
-  base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid =
-      gfx::GetGpuMemoryBufferGUIDForTracing(tracing_process_id, buffer_id);
-  pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
-
-  // By creating an edge with a higher |importance| (w.r.t. browser-side dumps)
-  // the tracing UI will account the effective size of the buffer to the child.
-  const int kImportance = 2;
-  pmd->AddOwnershipEdge(buffer_dump->guid(), shared_buffer_guid, kImportance);
-}
-
 // static
-scoped_ptr<TileTaskWorkerPool> OneCopyTileTaskWorkerPool::Create(
+std::unique_ptr<TileTaskWorkerPool> OneCopyTileTaskWorkerPool::Create(
     base::SequencedTaskRunner* task_runner,
     TaskGraphRunner* task_graph_runner,
     ContextProvider* context_provider,
@@ -187,7 +78,7 @@
     bool use_partial_raster,
     int max_staging_buffer_usage_in_bytes,
     ResourceFormat preferred_tile_format) {
-  return make_scoped_ptr<TileTaskWorkerPool>(new OneCopyTileTaskWorkerPool(
+  return base::WrapUnique<TileTaskWorkerPool>(new OneCopyTileTaskWorkerPool(
       task_runner, task_graph_runner, resource_provider,
       max_copy_texture_chromium_size, use_partial_raster,
       max_staging_buffer_usage_in_bytes, preferred_tile_format));
@@ -201,8 +92,7 @@
     bool use_partial_raster,
     int max_staging_buffer_usage_in_bytes,
     ResourceFormat preferred_tile_format)
-    : task_runner_(task_runner),
-      task_graph_runner_(task_graph_runner),
+    : task_graph_runner_(task_graph_runner),
       namespace_token_(task_graph_runner->GetNamespaceToken()),
       resource_provider_(resource_provider),
       max_bytes_per_copy_operation_(
@@ -212,24 +102,13 @@
               : kMaxBytesPerCopyOperation),
       use_partial_raster_(use_partial_raster),
       bytes_scheduled_since_last_flush_(0),
-      max_staging_buffer_usage_in_bytes_(max_staging_buffer_usage_in_bytes),
-      preferred_tile_format_(preferred_tile_format),
-      staging_buffer_usage_in_bytes_(0),
-      free_staging_buffer_usage_in_bytes_(0),
-      staging_buffer_expiration_delay_(
-          base::TimeDelta::FromMilliseconds(kStagingBufferExpirationDelayMs)),
-      reduce_memory_usage_pending_(false),
-      weak_ptr_factory_(this) {
-  base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
-      this, "OneCopyTileTaskWorkerPool", base::ThreadTaskRunnerHandle::Get());
-  reduce_memory_usage_callback_ =
-      base::Bind(&OneCopyTileTaskWorkerPool::ReduceMemoryUsage,
-                 weak_ptr_factory_.GetWeakPtr());
+      preferred_tile_format_(preferred_tile_format) {
+  staging_pool_ = StagingBufferPool::Create(task_runner, resource_provider,
+                                            use_partial_raster,
+                                            max_staging_buffer_usage_in_bytes);
 }
 
 OneCopyTileTaskWorkerPool::~OneCopyTileTaskWorkerPool() {
-  base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
-      this);
 }
 
 TileTaskRunner* OneCopyTileTaskWorkerPool::AsTileTaskRunner() {
@@ -243,14 +122,7 @@
   task_graph_runner_->ScheduleTasks(namespace_token_, &empty);
   task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
 
-  base::AutoLock lock(lock_);
-
-  if (buffers_.empty())
-    return;
-
-  ReleaseBuffersNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
-  DCHECK_EQ(staging_buffer_usage_in_bytes_, 0);
-  DCHECK_EQ(free_staging_buffer_usage_in_bytes_, 0);
+  staging_pool_->Shutdown();
 }
 
 void OneCopyTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) {
@@ -300,19 +172,19 @@
   return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
 }
 
-scoped_ptr<RasterBuffer> OneCopyTileTaskWorkerPool::AcquireBufferForRaster(
+std::unique_ptr<RasterBuffer> OneCopyTileTaskWorkerPool::AcquireBufferForRaster(
     const Resource* resource,
     uint64_t resource_content_id,
     uint64_t previous_content_id) {
   // TODO(danakj): If resource_content_id != 0, we only need to copy/upload
   // the dirty rect.
-  return make_scoped_ptr<RasterBuffer>(
+  return base::WrapUnique<RasterBuffer>(
       new RasterBufferImpl(this, resource_provider_, resource->format(),
                            resource, previous_content_id));
 }
 
 void OneCopyTileTaskWorkerPool::ReleaseBufferForRaster(
-    scoped_ptr<RasterBuffer> buffer) {
+    std::unique_ptr<RasterBuffer> buffer) {
   // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
 }
 
@@ -326,56 +198,78 @@
     const RasterSource::PlaybackSettings& playback_settings,
     uint64_t previous_content_id,
     uint64_t new_content_id) {
-  base::AutoLock lock(lock_);
+  std::unique_ptr<StagingBuffer> staging_buffer =
+      staging_pool_->AcquireStagingBuffer(resource, previous_content_id);
 
-  scoped_ptr<StagingBuffer> staging_buffer =
-      AcquireStagingBuffer(resource, previous_content_id);
-  DCHECK(staging_buffer);
+  PlaybackToStagingBuffer(staging_buffer.get(), resource, raster_source,
+                          raster_full_rect, raster_dirty_rect, scale,
+                          playback_settings, previous_content_id,
+                          new_content_id);
 
-  {
-    base::AutoUnlock unlock(lock_);
+  CopyOnWorkerThread(staging_buffer.get(), resource, resource_lock,
+                     raster_source, previous_content_id, new_content_id);
 
-    // Allocate GpuMemoryBuffer if necessary. If using partial raster, we
-    // must allocate a buffer with BufferUsage CPU_READ_WRITE_PERSISTENT.
-    if (!staging_buffer->gpu_memory_buffer) {
-      staging_buffer->gpu_memory_buffer =
-          resource_provider_->gpu_memory_buffer_manager()
-              ->AllocateGpuMemoryBuffer(
-                  staging_buffer->size, BufferFormat(resource->format()),
-                  use_partial_raster_
-                      ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT
-                      : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
-                  0 /* surface_id */);
-    }
+  staging_pool_->ReleaseStagingBuffer(std::move(staging_buffer));
+}
 
-    gfx::Rect playback_rect = raster_full_rect;
-    if (use_partial_raster_ && previous_content_id) {
-      // Reduce playback rect to dirty region if the content id of the staging
-      // buffer matches the prevous content id.
-      if (previous_content_id == staging_buffer->content_id)
-        playback_rect.Intersect(raster_dirty_rect);
-    }
-
-    if (staging_buffer->gpu_memory_buffer) {
-      gfx::GpuMemoryBuffer* buffer = staging_buffer->gpu_memory_buffer.get();
-      DCHECK_EQ(1u, gfx::NumberOfPlanesForBufferFormat(buffer->GetFormat()));
-      bool rv = buffer->Map();
-      DCHECK(rv);
-      DCHECK(buffer->memory(0));
-      // TileTaskWorkerPool::PlaybackToMemory only supports unsigned strides.
-      DCHECK_GE(buffer->stride(0), 0);
-
-      DCHECK(!playback_rect.IsEmpty())
-          << "Why are we rastering a tile that's not dirty?";
-      TileTaskWorkerPool::PlaybackToMemory(
-          buffer->memory(0), resource->format(), staging_buffer->size,
-          buffer->stride(0), raster_source, raster_full_rect, playback_rect,
-          scale, playback_settings);
-      buffer->Unmap();
-      staging_buffer->content_id = new_content_id;
-    }
+void OneCopyTileTaskWorkerPool::PlaybackToStagingBuffer(
+    StagingBuffer* staging_buffer,
+    const Resource* resource,
+    const RasterSource* raster_source,
+    const gfx::Rect& raster_full_rect,
+    const gfx::Rect& raster_dirty_rect,
+    float scale,
+    const RasterSource::PlaybackSettings& playback_settings,
+    uint64_t previous_content_id,
+    uint64_t new_content_id) {
+  // Allocate GpuMemoryBuffer if necessary. If using partial raster, we
+  // must allocate a buffer with BufferUsage CPU_READ_WRITE_PERSISTENT.
+  if (!staging_buffer->gpu_memory_buffer) {
+    staging_buffer->gpu_memory_buffer =
+        resource_provider_->gpu_memory_buffer_manager()
+            ->AllocateGpuMemoryBuffer(
+                staging_buffer->size, BufferFormat(resource->format()),
+                use_partial_raster_
+                    ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT
+                    : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
+                0 /* surface_id */);
   }
 
+  gfx::Rect playback_rect = raster_full_rect;
+  if (use_partial_raster_ && previous_content_id) {
+    // Reduce playback rect to dirty region if the content id of the staging
+    // buffer matches the prevous content id.
+    if (previous_content_id == staging_buffer->content_id)
+      playback_rect.Intersect(raster_dirty_rect);
+  }
+
+  if (staging_buffer->gpu_memory_buffer) {
+    gfx::GpuMemoryBuffer* buffer = staging_buffer->gpu_memory_buffer.get();
+    DCHECK_EQ(1u, gfx::NumberOfPlanesForBufferFormat(buffer->GetFormat()));
+    bool rv = buffer->Map();
+    DCHECK(rv);
+    DCHECK(buffer->memory(0));
+    // TileTaskWorkerPool::PlaybackToMemory only supports unsigned strides.
+    DCHECK_GE(buffer->stride(0), 0);
+
+    DCHECK(!playback_rect.IsEmpty())
+        << "Why are we rastering a tile that's not dirty?";
+    TileTaskWorkerPool::PlaybackToMemory(
+        buffer->memory(0), resource->format(), staging_buffer->size,
+        buffer->stride(0), raster_source, raster_full_rect, playback_rect,
+        scale, playback_settings);
+    buffer->Unmap();
+    staging_buffer->content_id = new_content_id;
+  }
+}
+
+void OneCopyTileTaskWorkerPool::CopyOnWorkerThread(
+    StagingBuffer* staging_buffer,
+    const Resource* resource,
+    ResourceProvider::ScopedWriteLockGL* resource_lock,
+    const RasterSource* raster_source,
+    uint64_t previous_content_id,
+    uint64_t new_content_id) {
   ContextProvider* context_provider =
       resource_provider_->output_surface()->worker_context_provider();
   DCHECK(context_provider);
@@ -486,262 +380,6 @@
     gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
     resource_lock->UpdateResourceSyncToken(sync_token);
   }
-
-  staging_buffer->last_usage = base::TimeTicks::Now();
-  busy_buffers_.push_back(std::move(staging_buffer));
-
-  ScheduleReduceMemoryUsage();
-}
-
-bool OneCopyTileTaskWorkerPool::OnMemoryDump(
-    const base::trace_event::MemoryDumpArgs& args,
-    base::trace_event::ProcessMemoryDump* pmd) {
-  base::AutoLock lock(lock_);
-
-  for (const auto* buffer : buffers_) {
-    auto in_free_buffers =
-        std::find_if(free_buffers_.begin(), free_buffers_.end(),
-                     [buffer](const scoped_ptr<StagingBuffer>& b) {
-                       return b.get() == buffer;
-                     });
-    buffer->OnMemoryDump(pmd, buffer->format,
-                         in_free_buffers != free_buffers_.end());
-  }
-
-  return true;
-}
-
-void OneCopyTileTaskWorkerPool::AddStagingBuffer(
-    const StagingBuffer* staging_buffer,
-    ResourceFormat format) {
-  lock_.AssertAcquired();
-
-  DCHECK(buffers_.find(staging_buffer) == buffers_.end());
-  buffers_.insert(staging_buffer);
-  int buffer_usage_in_bytes =
-      ResourceUtil::UncheckedSizeInBytes<int>(staging_buffer->size, format);
-  staging_buffer_usage_in_bytes_ += buffer_usage_in_bytes;
-}
-
-void OneCopyTileTaskWorkerPool::RemoveStagingBuffer(
-    const StagingBuffer* staging_buffer) {
-  lock_.AssertAcquired();
-
-  DCHECK(buffers_.find(staging_buffer) != buffers_.end());
-  buffers_.erase(staging_buffer);
-  int buffer_usage_in_bytes = ResourceUtil::UncheckedSizeInBytes<int>(
-      staging_buffer->size, staging_buffer->format);
-  DCHECK_GE(staging_buffer_usage_in_bytes_, buffer_usage_in_bytes);
-  staging_buffer_usage_in_bytes_ -= buffer_usage_in_bytes;
-}
-
-void OneCopyTileTaskWorkerPool::MarkStagingBufferAsFree(
-    const StagingBuffer* staging_buffer) {
-  lock_.AssertAcquired();
-
-  int buffer_usage_in_bytes = ResourceUtil::UncheckedSizeInBytes<int>(
-      staging_buffer->size, staging_buffer->format);
-  free_staging_buffer_usage_in_bytes_ += buffer_usage_in_bytes;
-}
-
-void OneCopyTileTaskWorkerPool::MarkStagingBufferAsBusy(
-    const StagingBuffer* staging_buffer) {
-  lock_.AssertAcquired();
-
-  int buffer_usage_in_bytes = ResourceUtil::UncheckedSizeInBytes<int>(
-      staging_buffer->size, staging_buffer->format);
-  DCHECK_GE(free_staging_buffer_usage_in_bytes_, buffer_usage_in_bytes);
-  free_staging_buffer_usage_in_bytes_ -= buffer_usage_in_bytes;
-}
-
-scoped_ptr<OneCopyTileTaskWorkerPool::StagingBuffer>
-OneCopyTileTaskWorkerPool::AcquireStagingBuffer(const Resource* resource,
-                                                uint64_t previous_content_id) {
-  lock_.AssertAcquired();
-
-  scoped_ptr<StagingBuffer> staging_buffer;
-
-  ContextProvider* context_provider =
-      resource_provider_->output_surface()->worker_context_provider();
-  DCHECK(context_provider);
-
-  ContextProvider::ScopedContextLock scoped_context(context_provider);
-
-  gpu::gles2::GLES2Interface* gl = scoped_context.ContextGL();
-  DCHECK(gl);
-
-  // Check if any busy buffers have become available.
-  if (resource_provider_->use_sync_query()) {
-    while (!busy_buffers_.empty()) {
-      if (!CheckForQueryResult(gl, busy_buffers_.front()->query_id))
-        break;
-
-      MarkStagingBufferAsFree(busy_buffers_.front().get());
-      free_buffers_.push_back(PopFront(&busy_buffers_));
-    }
-  }
-
-  // Wait for memory usage of non-free buffers to become less than the limit.
-  while (
-      (staging_buffer_usage_in_bytes_ - free_staging_buffer_usage_in_bytes_) >=
-      max_staging_buffer_usage_in_bytes_) {
-    // Stop when there are no more busy buffers to wait for.
-    if (busy_buffers_.empty())
-      break;
-
-    if (resource_provider_->use_sync_query()) {
-      WaitForQueryResult(gl, busy_buffers_.front()->query_id);
-      MarkStagingBufferAsFree(busy_buffers_.front().get());
-      free_buffers_.push_back(PopFront(&busy_buffers_));
-    } else {
-      // Fall-back to glFinish if CHROMIUM_sync_query is not available.
-      gl->Finish();
-      while (!busy_buffers_.empty()) {
-        MarkStagingBufferAsFree(busy_buffers_.front().get());
-        free_buffers_.push_back(PopFront(&busy_buffers_));
-      }
-    }
-  }
-
-  // Find a staging buffer that allows us to perform partial raster when
-  // using persistent GpuMemoryBuffers.
-  if (use_partial_raster_ && previous_content_id) {
-    StagingBufferDeque::iterator it = std::find_if(
-        free_buffers_.begin(), free_buffers_.end(),
-        [previous_content_id](const scoped_ptr<StagingBuffer>& buffer) {
-          return buffer->content_id == previous_content_id;
-        });
-    if (it != free_buffers_.end()) {
-      staging_buffer = std::move(*it);
-      free_buffers_.erase(it);
-      MarkStagingBufferAsBusy(staging_buffer.get());
-    }
-  }
-
-  // Find staging buffer of correct size and format.
-  if (!staging_buffer) {
-    StagingBufferDeque::iterator it =
-        std::find_if(free_buffers_.begin(), free_buffers_.end(),
-                     [resource](const scoped_ptr<StagingBuffer>& buffer) {
-                       return buffer->size == resource->size() &&
-                              buffer->format == resource->format();
-                     });
-    if (it != free_buffers_.end()) {
-      staging_buffer = std::move(*it);
-      free_buffers_.erase(it);
-      MarkStagingBufferAsBusy(staging_buffer.get());
-    }
-  }
-
-  // Create new staging buffer if necessary.
-  if (!staging_buffer) {
-    staging_buffer = make_scoped_ptr(
-        new StagingBuffer(resource->size(), resource->format()));
-    AddStagingBuffer(staging_buffer.get(), resource->format());
-  }
-
-  // Release enough free buffers to stay within the limit.
-  while (staging_buffer_usage_in_bytes_ > max_staging_buffer_usage_in_bytes_) {
-    if (free_buffers_.empty())
-      break;
-
-    free_buffers_.front()->DestroyGLResources(gl);
-    MarkStagingBufferAsBusy(free_buffers_.front().get());
-    RemoveStagingBuffer(free_buffers_.front().get());
-    free_buffers_.pop_front();
-  }
-
-  return staging_buffer;
-}
-
-base::TimeTicks OneCopyTileTaskWorkerPool::GetUsageTimeForLRUBuffer() {
-  lock_.AssertAcquired();
-
-  if (!free_buffers_.empty())
-    return free_buffers_.front()->last_usage;
-
-  if (!busy_buffers_.empty())
-    return busy_buffers_.front()->last_usage;
-
-  return base::TimeTicks();
-}
-
-void OneCopyTileTaskWorkerPool::ScheduleReduceMemoryUsage() {
-  lock_.AssertAcquired();
-
-  if (reduce_memory_usage_pending_)
-    return;
-
-  reduce_memory_usage_pending_ = true;
-
-  // Schedule a call to ReduceMemoryUsage at the time when the LRU buffer
-  // should be released.
-  base::TimeTicks reduce_memory_usage_time =
-      GetUsageTimeForLRUBuffer() + staging_buffer_expiration_delay_;
-  task_runner_->PostDelayedTask(
-      FROM_HERE, reduce_memory_usage_callback_,
-      reduce_memory_usage_time - base::TimeTicks::Now());
-}
-
-void OneCopyTileTaskWorkerPool::ReduceMemoryUsage() {
-  base::AutoLock lock(lock_);
-
-  reduce_memory_usage_pending_ = false;
-
-  if (free_buffers_.empty() && busy_buffers_.empty())
-    return;
-
-  base::TimeTicks current_time = base::TimeTicks::Now();
-  ReleaseBuffersNotUsedSince(current_time - staging_buffer_expiration_delay_);
-
-  if (free_buffers_.empty() && busy_buffers_.empty())
-    return;
-
-  reduce_memory_usage_pending_ = true;
-
-  // Schedule another call to ReduceMemoryUsage at the time when the next
-  // buffer should be released.
-  base::TimeTicks reduce_memory_usage_time =
-      GetUsageTimeForLRUBuffer() + staging_buffer_expiration_delay_;
-  task_runner_->PostDelayedTask(FROM_HERE, reduce_memory_usage_callback_,
-                                reduce_memory_usage_time - current_time);
-}
-
-void OneCopyTileTaskWorkerPool::ReleaseBuffersNotUsedSince(
-    base::TimeTicks time) {
-  lock_.AssertAcquired();
-
-  ContextProvider* context_provider =
-      resource_provider_->output_surface()->worker_context_provider();
-  DCHECK(context_provider);
-
-  {
-    ContextProvider::ScopedContextLock scoped_context(context_provider);
-
-    gpu::gles2::GLES2Interface* gl = scoped_context.ContextGL();
-    DCHECK(gl);
-
-    // Note: Front buffer is guaranteed to be LRU so we can stop releasing
-    // buffers as soon as we find a buffer that has been used since |time|.
-    while (!free_buffers_.empty()) {
-      if (free_buffers_.front()->last_usage > time)
-        return;
-
-      free_buffers_.front()->DestroyGLResources(gl);
-      MarkStagingBufferAsBusy(free_buffers_.front().get());
-      RemoveStagingBuffer(free_buffers_.front().get());
-      free_buffers_.pop_front();
-    }
-
-    while (!busy_buffers_.empty()) {
-      if (busy_buffers_.front()->last_usage > time)
-        return;
-
-      busy_buffers_.front()->DestroyGLResources(gl);
-      RemoveStagingBuffer(busy_buffers_.front().get());
-      busy_buffers_.pop_front();
-    }
-  }
 }
 
 }  // namespace cc
diff --git a/cc/raster/one_copy_tile_task_worker_pool.h b/cc/raster/one_copy_tile_task_worker_pool.h
index f691232..e362bdd 100644
--- a/cc/raster/one_copy_tile_task_worker_pool.h
+++ b/cc/raster/one_copy_tile_task_worker_pool.h
@@ -7,45 +7,24 @@
 
 #include <stdint.h>
 
-#include <deque>
-#include <set>
-
 #include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "base/synchronization/lock.h"
-#include "base/time/time.h"
-#include "base/trace_event/memory_dump_provider.h"
-#include "base/values.h"
 #include "cc/output/context_provider.h"
 #include "cc/raster/tile_task_runner.h"
 #include "cc/raster/tile_task_worker_pool.h"
 #include "cc/resources/resource_provider.h"
 
-namespace base {
-namespace trace_event {
-class ConvertableToTraceFormat;
-class TracedValue;
-}
-}
-
-namespace gpu {
-namespace gles2 {
-class GLES2Interface;
-}
-}
-
 namespace cc {
+struct StagingBuffer;
+class StagingBufferPool;
 class ResourcePool;
 
-class CC_EXPORT OneCopyTileTaskWorkerPool
-    : public TileTaskWorkerPool,
-      public TileTaskRunner,
-      public TileTaskClient,
-      public base::trace_event::MemoryDumpProvider {
+class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool,
+                                            public TileTaskRunner,
+                                            public TileTaskClient {
  public:
   ~OneCopyTileTaskWorkerPool() override;
 
-  static scoped_ptr<TileTaskWorkerPool> Create(
+  static std::unique_ptr<TileTaskWorkerPool> Create(
       base::SequencedTaskRunner* task_runner,
       TaskGraphRunner* task_graph_runner,
       ContextProvider* context_provider,
@@ -66,15 +45,11 @@
   bool GetResourceRequiresSwizzle(bool must_support_alpha) const override;
 
   // Overridden from TileTaskClient:
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override;
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
-
-  // Overridden from base::trace_event::MemoryDumpProvider:
-  bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
-                    base::trace_event::ProcessMemoryDump* pmd) override;
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override;
 
   // Playback raster source and copy result into |resource|.
   void PlaybackAndCopyOnWorkerThread(
@@ -85,8 +60,8 @@
       const gfx::Rect& raster_dirty_rect,
       float scale,
       const RasterSource::PlaybackSettings& playback_settings,
-      uint64_t resource_content_id,
-      uint64_t previous_content_id);
+      uint64_t previous_content_id,
+      uint64_t new_content_id);
 
  protected:
   OneCopyTileTaskWorkerPool(base::SequencedTaskRunner* task_runner,
@@ -98,68 +73,37 @@
                             ResourceFormat preferred_tile_format);
 
  private:
-  struct StagingBuffer {
-    StagingBuffer(const gfx::Size& size, ResourceFormat format);
-    ~StagingBuffer();
+  void PlaybackToStagingBuffer(
+      StagingBuffer* staging_buffer,
+      const Resource* resource,
+      const RasterSource* raster_source,
+      const gfx::Rect& raster_full_rect,
+      const gfx::Rect& raster_dirty_rect,
+      float scale,
+      const RasterSource::PlaybackSettings& playback_settings,
+      uint64_t previous_content_id,
+      uint64_t new_content_id);
+  void CopyOnWorkerThread(StagingBuffer* staging_buffer,
+                          const Resource* resource,
+                          ResourceProvider::ScopedWriteLockGL* resource_lock,
+                          const RasterSource* raster_source,
+                          uint64_t previous_content_id,
+                          uint64_t new_content_id);
 
-    void DestroyGLResources(gpu::gles2::GLES2Interface* gl);
-    void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
-                      ResourceFormat format,
-                      bool is_free) const;
-
-    const gfx::Size size;
-    const ResourceFormat format;
-    scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer;
-    base::TimeTicks last_usage;
-    unsigned texture_id;
-    unsigned image_id;
-    unsigned query_id;
-    uint64_t content_id;
-  };
-
-  void AddStagingBuffer(const StagingBuffer* staging_buffer,
-                        ResourceFormat format);
-  void RemoveStagingBuffer(const StagingBuffer* staging_buffer);
-  void MarkStagingBufferAsFree(const StagingBuffer* staging_buffer);
-  void MarkStagingBufferAsBusy(const StagingBuffer* staging_buffer);
-  scoped_ptr<StagingBuffer> AcquireStagingBuffer(const Resource* resource,
-                                                 uint64_t previous_content_id);
-  base::TimeTicks GetUsageTimeForLRUBuffer();
-  void ScheduleReduceMemoryUsage();
-  void ReduceMemoryUsage();
-  void ReleaseBuffersNotUsedSince(base::TimeTicks time);
-
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() const;
-  void StagingStateAsValueInto(
-      base::trace_event::TracedValue* staging_state) const;
-
-  scoped_refptr<base::SequencedTaskRunner> task_runner_;
   TaskGraphRunner* task_graph_runner_;
   const NamespaceToken namespace_token_;
   ResourceProvider* const resource_provider_;
   const int max_bytes_per_copy_operation_;
-  const bool use_partial_raster_;
+  bool use_partial_raster_;
+
+  // Context lock must be acquired when accessing this member.
+  int bytes_scheduled_since_last_flush_;
+
+  ResourceFormat preferred_tile_format_;
+  std::unique_ptr<StagingBufferPool> staging_pool_;
 
   Task::Vector completed_tasks_;
 
-  mutable base::Lock lock_;
-  // |lock_| must be acquired when accessing the following members.
-  using StagingBufferSet = std::set<const StagingBuffer*>;
-  StagingBufferSet buffers_;
-  using StagingBufferDeque = std::deque<scoped_ptr<StagingBuffer>>;
-  StagingBufferDeque free_buffers_;
-  StagingBufferDeque busy_buffers_;
-  int bytes_scheduled_since_last_flush_;
-  const int max_staging_buffer_usage_in_bytes_;
-  ResourceFormat preferred_tile_format_;
-  int staging_buffer_usage_in_bytes_;
-  int free_staging_buffer_usage_in_bytes_;
-  const base::TimeDelta staging_buffer_expiration_delay_;
-  bool reduce_memory_usage_pending_;
-  base::Closure reduce_memory_usage_callback_;
-
-  base::WeakPtrFactory<OneCopyTileTaskWorkerPool> weak_ptr_factory_;
-
   DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool);
 };
 
diff --git a/cc/raster/scoped_gpu_raster.h b/cc/raster/scoped_gpu_raster.h
index 274772c..3d9083b 100644
--- a/cc/raster/scoped_gpu_raster.h
+++ b/cc/raster/scoped_gpu_raster.h
@@ -5,9 +5,10 @@
 #ifndef CC_RASTER_SCOPED_GPU_RASTER_H_
 #define CC_RASTER_SCOPED_GPU_RASTER_H_
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/context_provider.h"
 
diff --git a/cc/raster/scoped_gpu_raster_unittest.cc b/cc/raster/scoped_gpu_raster_unittest.cc
index 7ffb464..0451d41 100644
--- a/cc/raster/scoped_gpu_raster_unittest.cc
+++ b/cc/raster/scoped_gpu_raster_unittest.cc
@@ -24,7 +24,7 @@
   EXPECT_EQ(4, unpack_alignment);
 
   {
-    scoped_ptr<ScopedGpuRaster> scoped_gpu_raster(
+    std::unique_ptr<ScopedGpuRaster> scoped_gpu_raster(
         new ScopedGpuRaster(provider.get()));
     gl->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
     gl->GetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment);
diff --git a/cc/raster/single_thread_task_graph_runner.h b/cc/raster/single_thread_task_graph_runner.h
index 3e8dec0..a8609cb2 100644
--- a/cc/raster/single_thread_task_graph_runner.h
+++ b/cc/raster/single_thread_task_graph_runner.h
@@ -5,7 +5,8 @@
 #ifndef CC_RASTER_SINGLE_THREAD_TASK_GRAPH_RUNNER_H_
 #define CC_RASTER_SINGLE_THREAD_TASK_GRAPH_RUNNER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/synchronization/condition_variable.h"
 #include "base/threading/simple_thread.h"
 #include "cc/raster/task_graph_runner.h"
@@ -43,7 +44,7 @@
   // Returns true if there was a task to run.
   bool RunTaskWithLockAcquired();
 
-  scoped_ptr<base::SimpleThread> thread_;
+  std::unique_ptr<base::SimpleThread> thread_;
 
   // Lock to exclusively access all the following members that are used to
   // implement the TaskRunner interfaces.
diff --git a/cc/raster/staging_buffer_pool.cc b/cc/raster/staging_buffer_pool.cc
new file mode 100644
index 0000000..43239c53
--- /dev/null
+++ b/cc/raster/staging_buffer_pool.cc
@@ -0,0 +1,428 @@
+// 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 "cc/raster/staging_buffer_pool.h"
+
+#include <memory>
+
+#include "base/memory/ptr_util.h"
+#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
+#include "base/trace_event/memory_dump_manager.h"
+#include "cc/base/container_util.h"
+#include "cc/debug/traced_value.h"
+#include "cc/resources/scoped_resource.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
+
+namespace cc {
+namespace {
+
+// Delay between checking for query result to be available.
+const int kCheckForQueryResultAvailableTickRateMs = 1;
+
+// Number of attempts to allow before we perform a check that will wait for
+// query to complete.
+const int kMaxCheckForQueryResultAvailableAttempts = 256;
+
+// Delay before a staging buffer might be released.
+const int kStagingBufferExpirationDelayMs = 1000;
+
+bool CheckForQueryResult(gpu::gles2::GLES2Interface* gl, unsigned query_id) {
+  unsigned complete = 1;
+  gl->GetQueryObjectuivEXT(query_id, GL_QUERY_RESULT_AVAILABLE_EXT, &complete);
+  return !!complete;
+}
+
+void WaitForQueryResult(gpu::gles2::GLES2Interface* gl, unsigned query_id) {
+  TRACE_EVENT0("cc", "WaitForQueryResult");
+
+  int attempts_left = kMaxCheckForQueryResultAvailableAttempts;
+  while (attempts_left--) {
+    if (CheckForQueryResult(gl, query_id))
+      break;
+
+    // We have to flush the context to be guaranteed that a query result will
+    // be available in a finite amount of time.
+    gl->ShallowFlushCHROMIUM();
+
+    base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
+        kCheckForQueryResultAvailableTickRateMs));
+  }
+
+  unsigned result = 0;
+  gl->GetQueryObjectuivEXT(query_id, GL_QUERY_RESULT_EXT, &result);
+}
+
+}  // namespace
+
+StagingBuffer::StagingBuffer(const gfx::Size& size, ResourceFormat format)
+    : size(size),
+      format(format),
+      texture_id(0),
+      image_id(0),
+      query_id(0),
+      content_id(0) {}
+
+StagingBuffer::~StagingBuffer() {
+  DCHECK_EQ(texture_id, 0u);
+  DCHECK_EQ(image_id, 0u);
+  DCHECK_EQ(query_id, 0u);
+}
+
+void StagingBuffer::DestroyGLResources(gpu::gles2::GLES2Interface* gl) {
+  if (query_id) {
+    gl->DeleteQueriesEXT(1, &query_id);
+    query_id = 0;
+  }
+  if (image_id) {
+    gl->DestroyImageCHROMIUM(image_id);
+    image_id = 0;
+  }
+  if (texture_id) {
+    gl->DeleteTextures(1, &texture_id);
+    texture_id = 0;
+  }
+}
+
+void StagingBuffer::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
+                                 ResourceFormat format,
+                                 bool in_free_list) const {
+  if (!gpu_memory_buffer)
+    return;
+
+  gfx::GpuMemoryBufferId buffer_id = gpu_memory_buffer->GetId();
+  std::string buffer_dump_name =
+      base::StringPrintf("cc/one_copy/staging_memory/buffer_%d", buffer_id.id);
+  base::trace_event::MemoryAllocatorDump* buffer_dump =
+      pmd->CreateAllocatorDump(buffer_dump_name);
+
+  uint64_t buffer_size_in_bytes =
+      ResourceUtil::UncheckedSizeInBytes<uint64_t>(size, format);
+  buffer_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
+                         base::trace_event::MemoryAllocatorDump::kUnitsBytes,
+                         buffer_size_in_bytes);
+  buffer_dump->AddScalar("free_size",
+                         base::trace_event::MemoryAllocatorDump::kUnitsBytes,
+                         in_free_list ? buffer_size_in_bytes : 0);
+
+  // Emit an ownership edge towards a global allocator dump node.
+  const uint64_t tracing_process_id =
+      base::trace_event::MemoryDumpManager::GetInstance()
+          ->GetTracingProcessId();
+  base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid =
+      gfx::GetGpuMemoryBufferGUIDForTracing(tracing_process_id, buffer_id);
+  pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
+
+  // By creating an edge with a higher |importance| (w.r.t. browser-side dumps)
+  // the tracing UI will account the effective size of the buffer to the child.
+  const int kImportance = 2;
+  pmd->AddOwnershipEdge(buffer_dump->guid(), shared_buffer_guid, kImportance);
+}
+
+// static
+std::unique_ptr<StagingBufferPool> StagingBufferPool::Create(
+    base::SequencedTaskRunner* task_runner,
+    ResourceProvider* resource_provider,
+    bool use_partial_raster,
+    int max_staging_buffer_usage_in_bytes) {
+  return base::WrapUnique(
+      new StagingBufferPool(task_runner, resource_provider, use_partial_raster,
+                            max_staging_buffer_usage_in_bytes));
+}
+
+StagingBufferPool::StagingBufferPool(base::SequencedTaskRunner* task_runner,
+                                     ResourceProvider* resource_provider,
+                                     bool use_partial_raster,
+                                     int max_staging_buffer_usage_in_bytes)
+    : task_runner_(task_runner),
+      resource_provider_(resource_provider),
+      use_partial_raster_(use_partial_raster),
+      max_staging_buffer_usage_in_bytes_(max_staging_buffer_usage_in_bytes),
+      staging_buffer_usage_in_bytes_(0),
+      free_staging_buffer_usage_in_bytes_(0),
+      staging_buffer_expiration_delay_(
+          base::TimeDelta::FromMilliseconds(kStagingBufferExpirationDelayMs)),
+      reduce_memory_usage_pending_(false),
+      weak_ptr_factory_(this) {
+  base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
+      this, "cc::StagingBufferPool", base::ThreadTaskRunnerHandle::Get());
+  reduce_memory_usage_callback_ = base::Bind(
+      &StagingBufferPool::ReduceMemoryUsage, weak_ptr_factory_.GetWeakPtr());
+}
+
+StagingBufferPool::~StagingBufferPool() {
+  base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
+      this);
+}
+
+void StagingBufferPool::Shutdown() {
+  base::AutoLock lock(lock_);
+  if (buffers_.empty())
+    return;
+
+  ReleaseBuffersNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
+  DCHECK_EQ(staging_buffer_usage_in_bytes_, 0);
+  DCHECK_EQ(free_staging_buffer_usage_in_bytes_, 0);
+}
+
+void StagingBufferPool::ReleaseStagingBuffer(
+    std::unique_ptr<StagingBuffer> staging_buffer) {
+  base::AutoLock lock(lock_);
+
+  staging_buffer->last_usage = base::TimeTicks::Now();
+  busy_buffers_.push_back(std::move(staging_buffer));
+
+  ScheduleReduceMemoryUsage();
+}
+
+bool StagingBufferPool::OnMemoryDump(
+    const base::trace_event::MemoryDumpArgs& args,
+    base::trace_event::ProcessMemoryDump* pmd) {
+  base::AutoLock lock(lock_);
+
+  for (const auto* buffer : buffers_) {
+    auto in_free_buffers =
+        std::find_if(free_buffers_.begin(), free_buffers_.end(),
+                     [buffer](const std::unique_ptr<StagingBuffer>& b) {
+                       return b.get() == buffer;
+                     });
+    buffer->OnMemoryDump(pmd, buffer->format,
+                         in_free_buffers != free_buffers_.end());
+  }
+
+  return true;
+}
+
+void StagingBufferPool::AddStagingBuffer(const StagingBuffer* staging_buffer,
+                                         ResourceFormat format) {
+  lock_.AssertAcquired();
+
+  DCHECK(buffers_.find(staging_buffer) == buffers_.end());
+  buffers_.insert(staging_buffer);
+  int buffer_usage_in_bytes =
+      ResourceUtil::UncheckedSizeInBytes<int>(staging_buffer->size, format);
+  staging_buffer_usage_in_bytes_ += buffer_usage_in_bytes;
+}
+
+void StagingBufferPool::RemoveStagingBuffer(
+    const StagingBuffer* staging_buffer) {
+  lock_.AssertAcquired();
+
+  DCHECK(buffers_.find(staging_buffer) != buffers_.end());
+  buffers_.erase(staging_buffer);
+  int buffer_usage_in_bytes = ResourceUtil::UncheckedSizeInBytes<int>(
+      staging_buffer->size, staging_buffer->format);
+  DCHECK_GE(staging_buffer_usage_in_bytes_, buffer_usage_in_bytes);
+  staging_buffer_usage_in_bytes_ -= buffer_usage_in_bytes;
+}
+
+void StagingBufferPool::MarkStagingBufferAsFree(
+    const StagingBuffer* staging_buffer) {
+  lock_.AssertAcquired();
+
+  int buffer_usage_in_bytes = ResourceUtil::UncheckedSizeInBytes<int>(
+      staging_buffer->size, staging_buffer->format);
+  free_staging_buffer_usage_in_bytes_ += buffer_usage_in_bytes;
+}
+
+void StagingBufferPool::MarkStagingBufferAsBusy(
+    const StagingBuffer* staging_buffer) {
+  lock_.AssertAcquired();
+
+  int buffer_usage_in_bytes = ResourceUtil::UncheckedSizeInBytes<int>(
+      staging_buffer->size, staging_buffer->format);
+  DCHECK_GE(free_staging_buffer_usage_in_bytes_, buffer_usage_in_bytes);
+  free_staging_buffer_usage_in_bytes_ -= buffer_usage_in_bytes;
+}
+
+std::unique_ptr<StagingBuffer> StagingBufferPool::AcquireStagingBuffer(
+    const Resource* resource,
+    uint64_t previous_content_id) {
+  base::AutoLock lock(lock_);
+
+  std::unique_ptr<StagingBuffer> staging_buffer;
+
+  ContextProvider* context_provider =
+      resource_provider_->output_surface()->worker_context_provider();
+  DCHECK(context_provider);
+
+  ContextProvider::ScopedContextLock scoped_context(context_provider);
+
+  gpu::gles2::GLES2Interface* gl = scoped_context.ContextGL();
+  DCHECK(gl);
+
+  // Check if any busy buffers have become available.
+  if (resource_provider_->use_sync_query()) {
+    while (!busy_buffers_.empty()) {
+      if (!CheckForQueryResult(gl, busy_buffers_.front()->query_id))
+        break;
+
+      MarkStagingBufferAsFree(busy_buffers_.front().get());
+      free_buffers_.push_back(PopFront(&busy_buffers_));
+    }
+  }
+
+  // Wait for memory usage of non-free buffers to become less than the limit.
+  while (
+      (staging_buffer_usage_in_bytes_ - free_staging_buffer_usage_in_bytes_) >=
+      max_staging_buffer_usage_in_bytes_) {
+    // Stop when there are no more busy buffers to wait for.
+    if (busy_buffers_.empty())
+      break;
+
+    if (resource_provider_->use_sync_query()) {
+      WaitForQueryResult(gl, busy_buffers_.front()->query_id);
+      MarkStagingBufferAsFree(busy_buffers_.front().get());
+      free_buffers_.push_back(PopFront(&busy_buffers_));
+    } else {
+      // Fall-back to glFinish if CHROMIUM_sync_query is not available.
+      gl->Finish();
+      while (!busy_buffers_.empty()) {
+        MarkStagingBufferAsFree(busy_buffers_.front().get());
+        free_buffers_.push_back(PopFront(&busy_buffers_));
+      }
+    }
+  }
+
+  // Find a staging buffer that allows us to perform partial raster when
+  // using persistent GpuMemoryBuffers.
+  if (use_partial_raster_ && previous_content_id) {
+    StagingBufferDeque::iterator it = std::find_if(
+        free_buffers_.begin(), free_buffers_.end(),
+        [previous_content_id](const std::unique_ptr<StagingBuffer>& buffer) {
+          return buffer->content_id == previous_content_id;
+        });
+    if (it != free_buffers_.end()) {
+      staging_buffer = std::move(*it);
+      free_buffers_.erase(it);
+      MarkStagingBufferAsBusy(staging_buffer.get());
+    }
+  }
+
+  // Find staging buffer of correct size and format.
+  if (!staging_buffer) {
+    StagingBufferDeque::iterator it =
+        std::find_if(free_buffers_.begin(), free_buffers_.end(),
+                     [resource](const std::unique_ptr<StagingBuffer>& buffer) {
+                       return buffer->size == resource->size() &&
+                              buffer->format == resource->format();
+                     });
+    if (it != free_buffers_.end()) {
+      staging_buffer = std::move(*it);
+      free_buffers_.erase(it);
+      MarkStagingBufferAsBusy(staging_buffer.get());
+    }
+  }
+
+  // Create new staging buffer if necessary.
+  if (!staging_buffer) {
+    staging_buffer = base::WrapUnique(
+        new StagingBuffer(resource->size(), resource->format()));
+    AddStagingBuffer(staging_buffer.get(), resource->format());
+  }
+
+  // Release enough free buffers to stay within the limit.
+  while (staging_buffer_usage_in_bytes_ > max_staging_buffer_usage_in_bytes_) {
+    if (free_buffers_.empty())
+      break;
+
+    free_buffers_.front()->DestroyGLResources(gl);
+    MarkStagingBufferAsBusy(free_buffers_.front().get());
+    RemoveStagingBuffer(free_buffers_.front().get());
+    free_buffers_.pop_front();
+  }
+
+  return staging_buffer;
+}
+
+base::TimeTicks StagingBufferPool::GetUsageTimeForLRUBuffer() {
+  lock_.AssertAcquired();
+
+  if (!free_buffers_.empty())
+    return free_buffers_.front()->last_usage;
+
+  if (!busy_buffers_.empty())
+    return busy_buffers_.front()->last_usage;
+
+  return base::TimeTicks();
+}
+
+void StagingBufferPool::ScheduleReduceMemoryUsage() {
+  lock_.AssertAcquired();
+
+  if (reduce_memory_usage_pending_)
+    return;
+
+  reduce_memory_usage_pending_ = true;
+
+  // Schedule a call to ReduceMemoryUsage at the time when the LRU buffer
+  // should be released.
+  base::TimeTicks reduce_memory_usage_time =
+      GetUsageTimeForLRUBuffer() + staging_buffer_expiration_delay_;
+  task_runner_->PostDelayedTask(
+      FROM_HERE, reduce_memory_usage_callback_,
+      reduce_memory_usage_time - base::TimeTicks::Now());
+}
+
+void StagingBufferPool::ReduceMemoryUsage() {
+  base::AutoLock lock(lock_);
+
+  reduce_memory_usage_pending_ = false;
+
+  if (free_buffers_.empty() && busy_buffers_.empty())
+    return;
+
+  base::TimeTicks current_time = base::TimeTicks::Now();
+  ReleaseBuffersNotUsedSince(current_time - staging_buffer_expiration_delay_);
+
+  if (free_buffers_.empty() && busy_buffers_.empty())
+    return;
+
+  reduce_memory_usage_pending_ = true;
+
+  // Schedule another call to ReduceMemoryUsage at the time when the next
+  // buffer should be released.
+  base::TimeTicks reduce_memory_usage_time =
+      GetUsageTimeForLRUBuffer() + staging_buffer_expiration_delay_;
+  task_runner_->PostDelayedTask(FROM_HERE, reduce_memory_usage_callback_,
+                                reduce_memory_usage_time - current_time);
+}
+
+void StagingBufferPool::ReleaseBuffersNotUsedSince(base::TimeTicks time) {
+  lock_.AssertAcquired();
+
+  ContextProvider* context_provider =
+      resource_provider_->output_surface()->worker_context_provider();
+  DCHECK(context_provider);
+
+  {
+    ContextProvider::ScopedContextLock scoped_context(context_provider);
+
+    gpu::gles2::GLES2Interface* gl = scoped_context.ContextGL();
+    DCHECK(gl);
+
+    // Note: Front buffer is guaranteed to be LRU so we can stop releasing
+    // buffers as soon as we find a buffer that has been used since |time|.
+    while (!free_buffers_.empty()) {
+      if (free_buffers_.front()->last_usage > time)
+        return;
+
+      free_buffers_.front()->DestroyGLResources(gl);
+      MarkStagingBufferAsBusy(free_buffers_.front().get());
+      RemoveStagingBuffer(free_buffers_.front().get());
+      free_buffers_.pop_front();
+    }
+
+    while (!busy_buffers_.empty()) {
+      if (busy_buffers_.front()->last_usage > time)
+        return;
+
+      busy_buffers_.front()->DestroyGLResources(gl);
+      RemoveStagingBuffer(busy_buffers_.front().get());
+      busy_buffers_.pop_front();
+    }
+  }
+}
+
+}  // namespace cc
diff --git a/cc/raster/staging_buffer_pool.h b/cc/raster/staging_buffer_pool.h
new file mode 100644
index 0000000..14818b4b
--- /dev/null
+++ b/cc/raster/staging_buffer_pool.h
@@ -0,0 +1,120 @@
+// 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.
+
+#ifndef CC_RASTER_STAGING_BUFFER_POOL_H_
+#define CC_RASTER_STAGING_BUFFER_POOL_H_
+
+#include <stdint.h>
+
+#include <deque>
+#include <memory>
+#include <set>
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "base/synchronization/lock.h"
+#include "base/time/time.h"
+#include "base/trace_event/memory_dump_provider.h"
+#include "cc/output/context_provider.h"
+#include "cc/resources/resource_provider.h"
+
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}
+
+namespace cc {
+class Resource;
+class RasterSource;
+class ResourcePool;
+
+struct StagingBuffer {
+  StagingBuffer(const gfx::Size& size, ResourceFormat format);
+  ~StagingBuffer();
+
+  void DestroyGLResources(gpu::gles2::GLES2Interface* gl);
+  void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
+                    ResourceFormat format,
+                    bool is_free) const;
+
+  const gfx::Size size;
+  const ResourceFormat format;
+  std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer;
+  base::TimeTicks last_usage;
+  unsigned texture_id;
+  unsigned image_id;
+  unsigned query_id;
+  uint64_t content_id;
+};
+
+class CC_EXPORT StagingBufferPool
+    : public base::trace_event::MemoryDumpProvider {
+ public:
+  ~StagingBufferPool() final;
+
+  static std::unique_ptr<StagingBufferPool> Create(
+      base::SequencedTaskRunner* task_runner,
+      ResourceProvider* resource_provider,
+      bool use_partial_raster,
+      int max_staging_buffer_usage_in_bytes);
+  void Shutdown();
+
+  // Overridden from base::trace_event::MemoryDumpProvider:
+  bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+                    base::trace_event::ProcessMemoryDump* pmd) override;
+
+  std::unique_ptr<StagingBuffer> AcquireStagingBuffer(
+      const Resource* resource,
+      uint64_t previous_content_id);
+  void ReleaseStagingBuffer(std::unique_ptr<StagingBuffer> staging_buffer);
+
+ private:
+  StagingBufferPool(base::SequencedTaskRunner* task_runner,
+                    ResourceProvider* resource_provider,
+                    bool use_partial_raster,
+                    int max_staging_buffer_usage_in_bytes);
+
+  void AddStagingBuffer(const StagingBuffer* staging_buffer,
+                        ResourceFormat format);
+  void RemoveStagingBuffer(const StagingBuffer* staging_buffer);
+  void MarkStagingBufferAsFree(const StagingBuffer* staging_buffer);
+  void MarkStagingBufferAsBusy(const StagingBuffer* staging_buffer);
+
+  base::TimeTicks GetUsageTimeForLRUBuffer();
+  void ScheduleReduceMemoryUsage();
+  void ReduceMemoryUsage();
+  void ReleaseBuffersNotUsedSince(base::TimeTicks time);
+
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue()
+      const;
+  void StagingStateAsValueInto(
+      base::trace_event::TracedValue* staging_state) const;
+
+  scoped_refptr<base::SequencedTaskRunner> task_runner_;
+  ResourceProvider* const resource_provider_;
+  const bool use_partial_raster_;
+
+  mutable base::Lock lock_;
+  // |lock_| must be acquired when accessing the following members.
+  using StagingBufferSet = std::set<const StagingBuffer*>;
+  StagingBufferSet buffers_;
+  using StagingBufferDeque = std::deque<std::unique_ptr<StagingBuffer>>;
+  StagingBufferDeque free_buffers_;
+  StagingBufferDeque busy_buffers_;
+  const int max_staging_buffer_usage_in_bytes_;
+  int staging_buffer_usage_in_bytes_;
+  int free_staging_buffer_usage_in_bytes_;
+  const base::TimeDelta staging_buffer_expiration_delay_;
+  bool reduce_memory_usage_pending_;
+  base::Closure reduce_memory_usage_callback_;
+
+  base::WeakPtrFactory<StagingBufferPool> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(StagingBufferPool);
+};
+
+}  // namespace cc
+
+#endif  // CC_RASTER_STAGING_BUFFER_POOL_H_
diff --git a/cc/raster/task_graph_runner.h b/cc/raster/task_graph_runner.h
index 23094ef..d5f8cee 100644
--- a/cc/raster/task_graph_runner.h
+++ b/cc/raster/task_graph_runner.h
@@ -10,11 +10,11 @@
 
 #include <algorithm>
 #include <map>
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/raster/task_graph_runner_perftest.cc b/cc/raster/task_graph_runner_perftest.cc
index f86bae57..56540f1 100644
--- a/cc/raster/task_graph_runner_perftest.cc
+++ b/cc/raster/task_graph_runner_perftest.cc
@@ -5,10 +5,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/time/time.h"
 #include "cc/base/completion_event.h"
 #include "cc/debug/lap_timer.h"
@@ -49,7 +50,7 @@
 
   // Overridden from testing::Test:
   void SetUp() override {
-    task_graph_runner_ = make_scoped_ptr(new SynchronousTaskGraphRunner);
+    task_graph_runner_ = base::WrapUnique(new SynchronousTaskGraphRunner);
     namespace_token_ = task_graph_runner_->GetNamespaceToken();
   }
   void TearDown() override { task_graph_runner_ = nullptr; }
@@ -272,7 +273,7 @@
 
   // Test uses SynchronousTaskGraphRunner, as this implementation introduces
   // minimal additional complexity over the TaskGraphWorkQueue helpers.
-  scoped_ptr<SynchronousTaskGraphRunner> task_graph_runner_;
+  std::unique_ptr<SynchronousTaskGraphRunner> task_graph_runner_;
   NamespaceToken namespace_token_;
   LapTimer timer_;
 };
diff --git a/cc/raster/texture_compressor.cc b/cc/raster/texture_compressor.cc
index b8992bb..6aabf679 100644
--- a/cc/raster/texture_compressor.cc
+++ b/cc/raster/texture_compressor.cc
@@ -5,6 +5,7 @@
 #include "cc/raster/texture_compressor.h"
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/raster/texture_compressor_etc1.h"
 
 #if defined(ARCH_CPU_X86_FAMILY)
@@ -14,16 +15,16 @@
 
 namespace cc {
 
-scoped_ptr<TextureCompressor> TextureCompressor::Create(Format format) {
+std::unique_ptr<TextureCompressor> TextureCompressor::Create(Format format) {
   switch (format) {
     case kFormatETC1: {
 #if defined(ARCH_CPU_X86_FAMILY)
       base::CPU cpu;
       if (cpu.has_sse2()) {
-        return make_scoped_ptr(new TextureCompressorETC1SSE());
+        return base::WrapUnique(new TextureCompressorETC1SSE());
       }
 #endif
-      return make_scoped_ptr(new TextureCompressorETC1());
+      return base::WrapUnique(new TextureCompressorETC1());
     }
   }
 
diff --git a/cc/raster/texture_compressor.h b/cc/raster/texture_compressor.h
index 95536bc..36a5a8d 100644
--- a/cc/raster/texture_compressor.h
+++ b/cc/raster/texture_compressor.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
@@ -25,7 +26,7 @@
     kQualityHigh,
   };
 
-  static scoped_ptr<TextureCompressor> Create(Format format);
+  static std::unique_ptr<TextureCompressor> Create(Format format);
   virtual ~TextureCompressor() {}
 
   virtual void Compress(const uint8_t* src,
diff --git a/cc/raster/texture_compressor_etc1_unittest.cc b/cc/raster/texture_compressor_etc1_unittest.cc
index dc90ebb..4857b69 100644
--- a/cc/raster/texture_compressor_etc1_unittest.cc
+++ b/cc/raster/texture_compressor_etc1_unittest.cc
@@ -17,7 +17,7 @@
 const int kImageSizeInBytes = kImageWidth * kImageHeight * kImageChannels;
 
 TEST(TextureCompressorETC1Test, Compress256x256Ratio) {
-  scoped_ptr<TextureCompressor> compressor =
+  std::unique_ptr<TextureCompressor> compressor =
       TextureCompressor::Create(TextureCompressor::kFormatETC1);
   uint8_t src[kImageSizeInBytes];
   uint8_t dst[kImageSizeInBytes];
diff --git a/cc/raster/texture_compressor_perftest.cc b/cc/raster/texture_compressor_perftest.cc
index 96ab60db..99ccb60 100644
--- a/cc/raster/texture_compressor_perftest.cc
+++ b/cc/raster/texture_compressor_perftest.cc
@@ -77,7 +77,7 @@
 
  protected:
   LapTimer timer_;
-  scoped_ptr<TextureCompressor> compressor_;
+  std::unique_ptr<TextureCompressor> compressor_;
   uint8_t src_[kImageSizeInBytes];
   uint8_t dst_[kImageSizeInBytes];
 };
diff --git a/cc/raster/tile_task_runner.h b/cc/raster/tile_task_runner.h
index 5e2f7fd1..8c3bb34 100644
--- a/cc/raster/tile_task_runner.h
+++ b/cc/raster/tile_task_runner.h
@@ -21,11 +21,11 @@
 
 class CC_EXPORT TileTaskClient {
  public:
-  virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  virtual std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) = 0;
-  virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0;
+  virtual void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) = 0;
 
  protected:
   virtual ~TileTaskClient() {}
diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc
index 2efd928..91e5164 100644
--- a/cc/raster/tile_task_worker_pool.cc
+++ b/cc/raster/tile_task_worker_pool.cc
@@ -112,7 +112,7 @@
                      "TileTaskWorkerPool::PlaybackToMemory::CompressETC1");
         DCHECK_EQ(size.width() % 4, 0);
         DCHECK_EQ(size.height() % 4, 0);
-        scoped_ptr<TextureCompressor> texture_compressor =
+        std::unique_ptr<TextureCompressor> texture_compressor =
             TextureCompressor::Create(TextureCompressor::kFormatETC1);
         texture_compressor->Compress(reinterpret_cast<const uint8_t*>(
                                          surface->peekPixels(nullptr, nullptr)),
diff --git a/cc/raster/tile_task_worker_pool_perftest.cc b/cc/raster/tile_task_worker_pool_perftest.cc
index 086d7b1..d2c7e6c5 100644
--- a/cc/raster/tile_task_worker_pool_perftest.cc
+++ b/cc/raster/tile_task_worker_pool_perftest.cc
@@ -2,12 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/raster/tile_task_worker_pool.h"
-
 #include <stddef.h>
 #include <stdint.h>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/time/time.h"
 #include "cc/debug/lap_timer.h"
@@ -19,6 +18,7 @@
 #include "cc/raster/raster_buffer.h"
 #include "cc/raster/synchronous_task_graph_runner.h"
 #include "cc/raster/tile_task_runner.h"
+#include "cc/raster/tile_task_worker_pool.h"
 #include "cc/raster/zero_copy_tile_task_worker_pool.h"
 #include "cc/resources/resource_pool.h"
 #include "cc/resources/resource_provider.h"
@@ -107,7 +107,7 @@
  private:
   ~PerfContextProvider() override {}
 
-  scoped_ptr<PerfGLES2Interface> context_gl_;
+  std::unique_ptr<PerfGLES2Interface> context_gl_;
   skia::RefPtr<class GrContext> gr_context_;
   TestContextSupport support_;
   base::Lock context_lock_;
@@ -149,7 +149,7 @@
 
 class PerfRasterTaskImpl : public RasterTask {
  public:
-  PerfRasterTaskImpl(scoped_ptr<ScopedResource> resource,
+  PerfRasterTaskImpl(std::unique_ptr<ScopedResource> resource,
                      ImageDecodeTask::Vector* dependencies)
       : RasterTask(dependencies), resource_(std::move(resource)) {}
 
@@ -175,8 +175,8 @@
   ~PerfRasterTaskImpl() override {}
 
  private:
-  scoped_ptr<ScopedResource> resource_;
-  scoped_ptr<RasterBuffer> raster_buffer_;
+  std::unique_ptr<ScopedResource> resource_;
+  std::unique_ptr<RasterBuffer> raster_buffer_;
 
   DISALLOW_COPY_AND_ASSIGN(PerfRasterTaskImpl);
 };
@@ -207,7 +207,7 @@
     const gfx::Size size(1, 1);
 
     for (unsigned i = 0; i < num_raster_tasks; ++i) {
-      scoped_ptr<ScopedResource> resource(
+      std::unique_ptr<ScopedResource> resource(
           ScopedResource::Create(resource_provider_.get()));
       resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE,
                          RGBA_8888);
@@ -241,10 +241,10 @@
  protected:
   scoped_refptr<ContextProvider> context_provider_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
-  scoped_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
-  scoped_ptr<SynchronousTaskGraphRunner> task_graph_runner_;
+  std::unique_ptr<SynchronousTaskGraphRunner> task_graph_runner_;
   LapTimer timer_;
 };
 
@@ -396,7 +396,7 @@
 
   void CreateSoftwareOutputSurfaceAndResourceProvider() {
     output_surface_ = FakeOutputSurface::CreateSoftware(
-        make_scoped_ptr(new SoftwareOutputDevice));
+        base::WrapUnique(new SoftwareOutputDevice));
     CHECK(output_surface_->BindToClient(&output_surface_client_));
     resource_provider_ = FakeResourceProvider::Create(
         output_surface_.get(), &shared_bitmap_manager_, nullptr);
@@ -417,7 +417,7 @@
     return std::string();
   }
 
-  scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
+  std::unique_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
   TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
   TestSharedBitmapManager shared_bitmap_manager_;
 };
diff --git a/cc/raster/tile_task_worker_pool_unittest.cc b/cc/raster/tile_task_worker_pool_unittest.cc
index f761385..919a885 100644
--- a/cc/raster/tile_task_worker_pool_unittest.cc
+++ b/cc/raster/tile_task_worker_pool_unittest.cc
@@ -14,6 +14,7 @@
 #include "base/cancelable_callback.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/base/unique_notifier.h"
@@ -88,7 +89,7 @@
  private:
   const Resource* resource_;
   const Reply reply_;
-  scoped_ptr<RasterBuffer> raster_buffer_;
+  std::unique_ptr<RasterBuffer> raster_buffer_;
   scoped_refptr<RasterSource> raster_source_;
 
   DISALLOW_COPY_AND_ASSIGN(TestRasterTaskImpl);
@@ -204,7 +205,7 @@
   }
 
   void AppendTask(unsigned id, const gfx::Size& size) {
-    scoped_ptr<ScopedResource> resource(
+    std::unique_ptr<ScopedResource> resource(
         ScopedResource::Create(resource_provider_.get()));
     resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE,
                        RGBA_8888);
@@ -223,7 +224,7 @@
   void AppendBlockingTask(unsigned id, base::Lock* lock) {
     const gfx::Size size(1, 1);
 
-    scoped_ptr<ScopedResource> resource(
+    std::unique_ptr<ScopedResource> resource(
         ScopedResource::Create(resource_provider_.get()));
     resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE,
                        RGBA_8888);
@@ -262,16 +263,15 @@
 
   void CreateSoftwareOutputSurfaceAndResourceProvider() {
     output_surface_ = FakeOutputSurface::CreateSoftware(
-        make_scoped_ptr(new SoftwareOutputDevice));
+        base::WrapUnique(new SoftwareOutputDevice));
     CHECK(output_surface_->BindToClient(&output_surface_client_));
     resource_provider_ = FakeResourceProvider::Create(
         output_surface_.get(), &shared_bitmap_manager_, nullptr);
   }
 
-  void OnTaskCompleted(
-      scoped_ptr<ScopedResource> resource,
-      unsigned id,
-      bool was_canceled) {
+  void OnTaskCompleted(std::unique_ptr<ScopedResource> resource,
+                       unsigned id,
+                       bool was_canceled) {
     RasterTaskResult result;
     result.id = id;
     result.canceled = was_canceled;
@@ -287,9 +287,9 @@
   scoped_refptr<TestContextProvider> context_provider_;
   scoped_refptr<TestContextProvider> worker_context_provider_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
   TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
   TestSharedBitmapManager shared_bitmap_manager_;
   SynchronousTaskGraphRunner task_graph_runner_;
diff --git a/cc/raster/zero_copy_tile_task_worker_pool.cc b/cc/raster/zero_copy_tile_task_worker_pool.cc
index da96233..203415a 100644
--- a/cc/raster/zero_copy_tile_task_worker_pool.cc
+++ b/cc/raster/zero_copy_tile_task_worker_pool.cc
@@ -9,6 +9,7 @@
 #include <algorithm>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
@@ -65,12 +66,12 @@
 }  // namespace
 
 // static
-scoped_ptr<TileTaskWorkerPool> ZeroCopyTileTaskWorkerPool::Create(
+std::unique_ptr<TileTaskWorkerPool> ZeroCopyTileTaskWorkerPool::Create(
     base::SequencedTaskRunner* task_runner,
     TaskGraphRunner* task_graph_runner,
     ResourceProvider* resource_provider,
     ResourceFormat preferred_tile_format) {
-  return make_scoped_ptr<TileTaskWorkerPool>(
+  return base::WrapUnique<TileTaskWorkerPool>(
       new ZeroCopyTileTaskWorkerPool(task_runner, task_graph_runner,
                                      resource_provider, preferred_tile_format));
 }
@@ -140,16 +141,17 @@
   return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
 }
 
-scoped_ptr<RasterBuffer> ZeroCopyTileTaskWorkerPool::AcquireBufferForRaster(
+std::unique_ptr<RasterBuffer>
+ZeroCopyTileTaskWorkerPool::AcquireBufferForRaster(
     const Resource* resource,
     uint64_t resource_content_id,
     uint64_t previous_content_id) {
-  return make_scoped_ptr<RasterBuffer>(
+  return base::WrapUnique<RasterBuffer>(
       new RasterBufferImpl(resource_provider_, resource));
 }
 
 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster(
-    scoped_ptr<RasterBuffer> buffer) {
+    std::unique_ptr<RasterBuffer> buffer) {
   // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
 }
 
diff --git a/cc/raster/zero_copy_tile_task_worker_pool.h b/cc/raster/zero_copy_tile_task_worker_pool.h
index bc558d7..d8d99481 100644
--- a/cc/raster/zero_copy_tile_task_worker_pool.h
+++ b/cc/raster/zero_copy_tile_task_worker_pool.h
@@ -28,7 +28,7 @@
  public:
   ~ZeroCopyTileTaskWorkerPool() override;
 
-  static scoped_ptr<TileTaskWorkerPool> Create(
+  static std::unique_ptr<TileTaskWorkerPool> Create(
       base::SequencedTaskRunner* task_runner,
       TaskGraphRunner* task_graph_runner,
       ResourceProvider* resource_provider,
@@ -45,11 +45,11 @@
   bool GetResourceRequiresSwizzle(bool must_support_alpha) const override;
 
   // Overridden from TileTaskClient:
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override;
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override;
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override;
 
  protected:
   ZeroCopyTileTaskWorkerPool(base::SequencedTaskRunner* task_runner,
@@ -58,7 +58,8 @@
                              ResourceFormat preferred_tile_format);
 
  private:
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> StateAsValue()
+      const;
 
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
   TaskGraphRunner* task_graph_runner_;
diff --git a/cc/resources/memory_history.cc b/cc/resources/memory_history.cc
index 29bad2a..caf8498 100644
--- a/cc/resources/memory_history.cc
+++ b/cc/resources/memory_history.cc
@@ -6,11 +6,13 @@
 
 #include <limits>
 
+#include "base/memory/ptr_util.h"
+
 namespace cc {
 
 // static
-scoped_ptr<MemoryHistory> MemoryHistory::Create() {
-  return make_scoped_ptr(new MemoryHistory());
+std::unique_ptr<MemoryHistory> MemoryHistory::Create() {
+  return base::WrapUnique(new MemoryHistory());
 }
 
 MemoryHistory::MemoryHistory() {}
diff --git a/cc/resources/memory_history.h b/cc/resources/memory_history.h
index cdcc46a..2a39648 100644
--- a/cc/resources/memory_history.h
+++ b/cc/resources/memory_history.h
@@ -8,8 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/debug/ring_buffer.h"
 
@@ -18,7 +19,7 @@
 // Maintains a history of memory for each frame.
 class MemoryHistory {
  public:
-  static scoped_ptr<MemoryHistory> Create();
+  static std::unique_ptr<MemoryHistory> Create();
 
   size_t HistorySize() const { return ring_buffer_.BufferSize(); }
 
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 374b7178..af5b240 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -121,7 +121,7 @@
     return resource;
   }
 
-  scoped_ptr<PoolResource> pool_resource =
+  std::unique_ptr<PoolResource> pool_resource =
       PoolResource::Create(resource_provider_);
 
   if (use_gpu_memory_buffers_) {
@@ -147,11 +147,11 @@
 Resource* ResourcePool::TryAcquireResourceWithContentId(uint64_t content_id) {
   DCHECK(content_id);
 
-  auto it =
-      std::find_if(unused_resources_.begin(), unused_resources_.end(),
-                   [content_id](const scoped_ptr<PoolResource>& pool_resource) {
-                     return pool_resource->content_id() == content_id;
-                   });
+  auto it = std::find_if(
+      unused_resources_.begin(), unused_resources_.end(),
+      [content_id](const std::unique_ptr<PoolResource>& pool_resource) {
+        return pool_resource->content_id() == content_id;
+      });
   if (it == unused_resources_.end())
     return nullptr;
 
@@ -185,19 +185,19 @@
 
     // Maybe this is a double free - see if the resource exists in our busy
     // list.
-    auto found_busy =
-        std::find_if(busy_resources_.begin(), busy_resources_.end(),
-                     [resource](const scoped_ptr<PoolResource>& busy_resource) {
-                       return busy_resource->id() == resource->id();
-                     });
+    auto found_busy = std::find_if(
+        busy_resources_.begin(), busy_resources_.end(),
+        [resource](const std::unique_ptr<PoolResource>& busy_resource) {
+          return busy_resource->id() == resource->id();
+        });
     CHECK(found_busy == busy_resources_.end());
 
     // Also check if the resource exists in our unused resources list.
-    auto found_unused =
-        std::find_if(unused_resources_.begin(), unused_resources_.end(),
-                     [resource](const scoped_ptr<PoolResource>& pool_resource) {
-                       return pool_resource->id() == resource->id();
-                     });
+    auto found_unused = std::find_if(
+        unused_resources_.begin(), unused_resources_.end(),
+        [resource](const std::unique_ptr<PoolResource>& pool_resource) {
+          return pool_resource->id() == resource->id();
+        });
     CHECK(found_unused == unused_resources_.end());
 
     // Resource doesn't exist in any of our lists. CHECK.
@@ -256,7 +256,7 @@
   return false;
 }
 
-void ResourcePool::DeleteResource(scoped_ptr<PoolResource> resource) {
+void ResourcePool::DeleteResource(std::unique_ptr<PoolResource> resource) {
   size_t resource_bytes = ResourceUtil::UncheckedSizeInBytes<size_t>(
       resource->size(), resource->format());
   total_memory_usage_bytes_ -= resource_bytes;
@@ -281,7 +281,8 @@
   }
 }
 
-void ResourcePool::DidFinishUsingResource(scoped_ptr<PoolResource> resource) {
+void ResourcePool::DidFinishUsingResource(
+    std::unique_ptr<PoolResource> resource) {
   unused_resources_.push_front(std::move(resource));
 }
 
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index df95846..74262de 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -10,9 +10,10 @@
 
 #include <deque>
 #include <map>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/memory_dump_provider.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/renderer.h"
@@ -24,17 +25,17 @@
 
 class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider {
  public:
-  static scoped_ptr<ResourcePool> CreateForGpuMemoryBufferResources(
+  static std::unique_ptr<ResourcePool> CreateForGpuMemoryBufferResources(
       ResourceProvider* resource_provider,
       base::SingleThreadTaskRunner* task_runner) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new ResourcePool(resource_provider, task_runner, true));
   }
 
-  static scoped_ptr<ResourcePool> Create(
+  static std::unique_ptr<ResourcePool> Create(
       ResourceProvider* resource_provider,
       base::SingleThreadTaskRunner* task_runner) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new ResourcePool(resource_provider, task_runner, false));
   }
 
@@ -80,9 +81,9 @@
  private:
   class PoolResource : public ScopedResource {
    public:
-    static scoped_ptr<PoolResource> Create(
+    static std::unique_ptr<PoolResource> Create(
         ResourceProvider* resource_provider) {
-      return make_scoped_ptr(new PoolResource(resource_provider));
+      return base::WrapUnique(new PoolResource(resource_provider));
     }
     void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
                       const ResourceProvider* resource_provider,
@@ -101,8 +102,8 @@
     base::TimeTicks last_usage_;
   };
 
-  void DidFinishUsingResource(scoped_ptr<PoolResource> resource);
-  void DeleteResource(scoped_ptr<PoolResource> resource);
+  void DidFinishUsingResource(std::unique_ptr<PoolResource> resource);
+  void DeleteResource(std::unique_ptr<PoolResource> resource);
 
   // Functions which manage periodic eviction of expired resources.
   void ScheduleEvictExpiredResourcesIn(base::TimeDelta time_from_now);
@@ -120,11 +121,11 @@
   size_t total_resource_count_;
 
   // Holds most recently used resources at the front of the queue.
-  using ResourceDeque = std::deque<scoped_ptr<PoolResource>>;
+  using ResourceDeque = std::deque<std::unique_ptr<PoolResource>>;
   ResourceDeque unused_resources_;
   ResourceDeque busy_resources_;
 
-  std::map<ResourceId, scoped_ptr<PoolResource>> in_use_resources_;
+  std::map<ResourceId, std::unique_ptr<PoolResource>> in_use_resources_;
 
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
   bool evict_expired_resources_pending_;
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc
index af86503..ec82b56 100644
--- a/cc/resources/resource_pool_unittest.cc
+++ b/cc/resources/resource_pool_unittest.cc
@@ -34,11 +34,11 @@
 
  protected:
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
-  scoped_ptr<ResourcePool> resource_pool_;
+  std::unique_ptr<ResourcePool> resource_pool_;
 };
 
 TEST_F(ResourcePoolTest, AcquireRelease) {
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 128ab28..fa9fa859d 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -65,7 +65,7 @@
 
   GLES2Interface* gl_;
   const size_t id_allocation_chunk_size_;
-  scoped_ptr<GLuint[]> ids_;
+  std::unique_ptr<GLuint[]> ids_;
   size_t next_id_index_;
 };
 
@@ -383,7 +383,7 @@
 
 ResourceProvider::Child::~Child() {}
 
-scoped_ptr<ResourceProvider> ResourceProvider::Create(
+std::unique_ptr<ResourceProvider> ResourceProvider::Create(
     OutputSurface* output_surface,
     SharedBitmapManager* shared_bitmap_manager,
     gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
@@ -392,7 +392,7 @@
     size_t id_allocation_chunk_size,
     bool use_gpu_memory_buffer_resources,
     const std::vector<unsigned>& use_image_texture_targets) {
-  scoped_ptr<ResourceProvider> resource_provider(new ResourceProvider(
+  std::unique_ptr<ResourceProvider> resource_provider(new ResourceProvider(
       output_surface, shared_bitmap_manager, gpu_memory_buffer_manager,
       blocking_main_thread_task_runner, highp_threshold_min,
       id_allocation_chunk_size, use_gpu_memory_buffer_resources,
@@ -551,7 +551,7 @@
 ResourceId ResourceProvider::CreateBitmap(const gfx::Size& size) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  scoped_ptr<SharedBitmap> bitmap =
+  std::unique_ptr<SharedBitmap> bitmap =
       shared_bitmap_manager_->AllocateSharedBitmap(size);
   uint8_t* pixels = bitmap->pixels();
   DCHECK(pixels);
@@ -586,7 +586,7 @@
 
 ResourceId ResourceProvider::CreateResourceFromTextureMailbox(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl,
+    std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl,
     bool read_lock_fences_enabled) {
   DCHECK(thread_checker_.CalledOnValidThread());
   // Just store the information. Mailbox will be consumed in LockForRead().
@@ -622,7 +622,7 @@
 
 ResourceId ResourceProvider::CreateResourceFromTextureMailbox(
     const TextureMailbox& mailbox,
-    scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl) {
+    std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl) {
   return CreateResourceFromTextureMailbox(
       mailbox, std::move(release_callback_impl), false);
 }
@@ -868,7 +868,7 @@
 
   if (!resource->pixels && resource->has_shared_bitmap_id &&
       shared_bitmap_manager_) {
-    scoped_ptr<SharedBitmap> bitmap =
+    std::unique_ptr<SharedBitmap> bitmap =
         shared_bitmap_manager_->GetSharedBitmapFromId(
             resource->size, resource->shared_bitmap_id);
     if (bitmap) {
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 0c6d3b7..bd395bf0 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -9,6 +9,7 @@
 #include <stdint.h>
 
 #include <deque>
+#include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
@@ -19,7 +20,6 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/trace_event/memory_allocator_dump.h"
 #include "base/trace_event/memory_dump_provider.h"
@@ -86,7 +86,7 @@
     RESOURCE_TYPE_BITMAP,
   };
 
-  static scoped_ptr<ResourceProvider> Create(
+  static std::unique_ptr<ResourceProvider> Create(
       OutputSurface* output_surface,
       SharedBitmapManager* shared_bitmap_manager,
       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
@@ -146,11 +146,11 @@
   // Wraps an external texture mailbox into a GL resource.
   ResourceId CreateResourceFromTextureMailbox(
       const TextureMailbox& mailbox,
-      scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl);
+      std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl);
 
   ResourceId CreateResourceFromTextureMailbox(
       const TextureMailbox& mailbox,
-      scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl,
+      std::unique_ptr<SingleReleaseCallbackImpl> release_callback_impl,
       bool read_lock_fences_enabled);
 
   void DeleteResource(ResourceId id);
@@ -327,7 +327,7 @@
    private:
     ResourceProvider* resource_provider_;
     ResourceProvider::Resource* resource_;
-    scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
+    std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
     base::ThreadChecker thread_checker_;
 
     DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGpuMemoryBuffer);
@@ -669,8 +669,8 @@
   scoped_refptr<Fence> current_read_lock_fence_;
 
   const size_t id_allocation_chunk_size_;
-  scoped_ptr<IdAllocator> texture_id_allocator_;
-  scoped_ptr<IdAllocator> buffer_id_allocator_;
+  std::unique_ptr<IdAllocator> texture_id_allocator_;
+  std::unique_ptr<IdAllocator> buffer_id_allocator_;
 
   bool use_sync_query_;
   std::vector<unsigned> use_image_texture_targets_;
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index d3eb2649..578eeb0 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -16,6 +16,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
 #include "cc/output/output_surface.h"
 #include "cc/resources/returned_resource.h"
@@ -68,13 +69,13 @@
 }
 
 static void SharedBitmapReleaseCallback(
-    scoped_ptr<SharedBitmap> bitmap,
+    std::unique_ptr<SharedBitmap> bitmap,
     const gpu::SyncToken& sync_token,
     bool lost_resource,
     BlockingTaskRunner* main_thread_task_runner) {}
 
 static void ReleaseSharedBitmapCallback(
-    scoped_ptr<SharedBitmap> shared_bitmap,
+    std::unique_ptr<SharedBitmap> shared_bitmap,
     bool* release_called,
     gpu::SyncToken* release_sync_token,
     bool* lost_resource_result,
@@ -86,11 +87,12 @@
   *lost_resource_result = lost_resource;
 }
 
-static scoped_ptr<SharedBitmap> CreateAndFillSharedBitmap(
+static std::unique_ptr<SharedBitmap> CreateAndFillSharedBitmap(
     SharedBitmapManager* manager,
     const gfx::Size& size,
     uint32_t value) {
-  scoped_ptr<SharedBitmap> shared_bitmap = manager->AllocateSharedBitmap(size);
+  std::unique_ptr<SharedBitmap> shared_bitmap =
+      manager->AllocateSharedBitmap(size);
   CHECK(shared_bitmap);
   uint32_t* pixels = reinterpret_cast<uint32_t*>(shared_bitmap->pixels());
   CHECK(pixels);
@@ -136,8 +138,8 @@
 // contents as well as information about sync points.
 class ContextSharedData {
  public:
-  static scoped_ptr<ContextSharedData> Create() {
-    return make_scoped_ptr(new ContextSharedData());
+  static std::unique_ptr<ContextSharedData> Create() {
+    return base::WrapUnique(new ContextSharedData());
   }
 
   uint32_t InsertFenceSync() { return next_fence_sync_++; }
@@ -189,9 +191,9 @@
 
 class ResourceProviderContext : public TestWebGraphicsContext3D {
  public:
-  static scoped_ptr<ResourceProviderContext> Create(
+  static std::unique_ptr<ResourceProviderContext> Create(
       ContextSharedData* shared_data) {
-    return make_scoped_ptr(new ResourceProviderContext(shared_data));
+    return base::WrapUnique(new ResourceProviderContext(shared_data));
   }
 
   GLuint64 insertFenceSync() override {
@@ -205,7 +207,7 @@
     sync_token_data.SetVerifyFlush();
     // Commit the produceTextureCHROMIUM calls at this point, so that
     // they're associated with the sync point.
-    for (const scoped_ptr<PendingProduceTexture>& pending_texture :
+    for (const std::unique_ptr<PendingProduceTexture>& pending_texture :
          pending_produce_textures_) {
       shared_data_->ProduceTexture(pending_texture->mailbox, sync_token_data,
                                    pending_texture->texture);
@@ -301,7 +303,7 @@
     // Delay moving the texture into the mailbox until the next
     // sync token, so that it is not visible to other contexts that
     // haven't waited on that sync point.
-    scoped_ptr<PendingProduceTexture> pending(new PendingProduceTexture);
+    std::unique_ptr<PendingProduceTexture> pending(new PendingProduceTexture);
     memcpy(pending->mailbox, mailbox, sizeof(pending->mailbox));
     base::AutoLock lock_for_texture_access(namespace_->lock);
     pending->texture = UnboundTexture(texture);
@@ -380,7 +382,7 @@
   };
   ContextSharedData* shared_data_;
   gpu::SyncToken last_waited_sync_token_;
-  std::deque<scoped_ptr<PendingProduceTexture>> pending_produce_textures_;
+  std::deque<std::unique_ptr<PendingProduceTexture>> pending_produce_textures_;
 };
 
 void GetResourcePixels(ResourceProvider* resource_provider,
@@ -421,7 +423,7 @@
     switch (GetParam()) {
       case ResourceProvider::RESOURCE_TYPE_GPU_MEMORY_BUFFER:
       case ResourceProvider::RESOURCE_TYPE_GL_TEXTURE: {
-        scoped_ptr<ResourceProviderContext> context3d(
+        std::unique_ptr<ResourceProviderContext> context3d(
             ResourceProviderContext::Create(shared_data_.get()));
         context3d_ = context3d.get();
 
@@ -430,7 +432,7 @@
 
         output_surface_ = FakeOutputSurface::Create3d(context_provider);
 
-        scoped_ptr<ResourceProviderContext> child_context_owned =
+        std::unique_ptr<ResourceProviderContext> child_context_owned =
             ResourceProviderContext::Create(shared_data_.get());
         child_context_ = child_context_owned.get();
         if (child_needs_sync_token) {
@@ -444,9 +446,9 @@
       }
       case ResourceProvider::RESOURCE_TYPE_BITMAP:
         output_surface_ = FakeOutputSurface::CreateSoftware(
-            make_scoped_ptr(new SoftwareOutputDevice));
+            base::WrapUnique(new SoftwareOutputDevice));
         child_output_surface_ = FakeOutputSurface::CreateSoftware(
-            make_scoped_ptr(new SoftwareOutputDevice));
+            base::WrapUnique(new SoftwareOutputDevice));
         break;
     }
     CHECK(output_surface_->BindToClient(&output_surface_client_));
@@ -500,8 +502,8 @@
                                    sync_token->GetData());
       EXPECT_TRUE(sync_token->HasData());
 
-      scoped_ptr<SharedBitmap> shared_bitmap;
-      scoped_ptr<SingleReleaseCallbackImpl> callback =
+      std::unique_ptr<SharedBitmap> shared_bitmap;
+      std::unique_ptr<SingleReleaseCallbackImpl> callback =
           SingleReleaseCallbackImpl::Create(base::Bind(
               ReleaseSharedBitmapCallback, base::Passed(&shared_bitmap),
               release_called, release_sync_token, lost_resource));
@@ -510,11 +512,11 @@
           std::move(callback));
     } else {
       gfx::Size size(64, 64);
-      scoped_ptr<SharedBitmap> shared_bitmap(
+      std::unique_ptr<SharedBitmap> shared_bitmap(
           CreateAndFillSharedBitmap(shared_bitmap_manager_.get(), size, 0));
 
       SharedBitmap* shared_bitmap_ptr = shared_bitmap.get();
-      scoped_ptr<SingleReleaseCallbackImpl> callback =
+      std::unique_ptr<SingleReleaseCallbackImpl> callback =
           SingleReleaseCallbackImpl::Create(base::Bind(
               ReleaseSharedBitmapCallback, base::Passed(&shared_bitmap),
               release_called, release_sync_token, lost_resource));
@@ -534,18 +536,18 @@
  protected:
   static bool use_gpu_memory_buffer_resources_;
   static std::vector<unsigned> use_image_texture_targets_;
-  scoped_ptr<ContextSharedData> shared_data_;
+  std::unique_ptr<ContextSharedData> shared_data_;
   ResourceProviderContext* context3d_;
   ResourceProviderContext* child_context_;
   FakeOutputSurfaceClient output_surface_client_;
   FakeOutputSurfaceClient child_output_surface_client_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<OutputSurface> child_output_surface_;
-  scoped_ptr<BlockingTaskRunner> main_thread_task_runner_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<ResourceProvider> child_resource_provider_;
-  scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> child_output_surface_;
+  std::unique_ptr<BlockingTaskRunner> main_thread_task_runner_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<ResourceProvider> child_resource_provider_;
+  std::unique_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
 };
 
 bool ResourceProviderTest::use_gpu_memory_buffer_resources_ = false;
@@ -1263,7 +1265,7 @@
   uint8_t data2[4] = { 5, 5, 5, 5 };
   child_resource_provider_->CopyToResource(id2, data2, size);
 
-  scoped_ptr<SharedBitmap> shared_bitmap(CreateAndFillSharedBitmap(
+  std::unique_ptr<SharedBitmap> shared_bitmap(CreateAndFillSharedBitmap(
       shared_bitmap_manager_.get(), gfx::Size(1, 1), 0));
   SharedBitmap* shared_bitmap_ptr = shared_bitmap.get();
   ResourceId id3 = child_resource_provider_->CreateResourceFromTextureMailbox(
@@ -1451,18 +1453,19 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_BITMAP)
     return;
 
-  scoped_ptr<ResourceProviderContext> child_context_owned(
+  std::unique_ptr<ResourceProviderContext> child_context_owned(
       ResourceProviderContext::Create(shared_data_.get()));
 
   FakeOutputSurfaceClient child_output_surface_client;
-  scoped_ptr<OutputSurface> child_output_surface(
+  std::unique_ptr<OutputSurface> child_output_surface(
       FakeOutputSurface::Create3d(std::move(child_context_owned)));
   CHECK(child_output_surface->BindToClient(&child_output_surface_client));
 
-  scoped_ptr<ResourceProvider> child_resource_provider(ResourceProvider::Create(
-      child_output_surface.get(), shared_bitmap_manager_.get(),
-      gpu_memory_buffer_manager_.get(), NULL, 0, 1,
-      use_gpu_memory_buffer_resources_, use_image_texture_targets_));
+  std::unique_ptr<ResourceProvider> child_resource_provider(
+      ResourceProvider::Create(
+          child_output_surface.get(), shared_bitmap_manager_.get(),
+          gpu_memory_buffer_manager_.get(), NULL, 0, 1,
+          use_gpu_memory_buffer_resources_, use_image_texture_targets_));
 
   gfx::Size size(1, 1);
   ResourceFormat format = RGBA_8888;
@@ -1962,33 +1965,33 @@
 class ResourceProviderTestTextureFilters : public ResourceProviderTest {
  public:
   static void RunTest(GLenum child_filter, GLenum parent_filter) {
-    scoped_ptr<TextureStateTrackingContext> child_context_owned(
+    std::unique_ptr<TextureStateTrackingContext> child_context_owned(
         new TextureStateTrackingContext);
     TextureStateTrackingContext* child_context = child_context_owned.get();
 
     FakeOutputSurfaceClient child_output_surface_client;
-    scoped_ptr<OutputSurface> child_output_surface(
+    std::unique_ptr<OutputSurface> child_output_surface(
         FakeOutputSurface::Create3d(std::move(child_context_owned)));
     CHECK(child_output_surface->BindToClient(&child_output_surface_client));
-    scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+    std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
         new TestSharedBitmapManager());
 
-    scoped_ptr<ResourceProvider> child_resource_provider(
+    std::unique_ptr<ResourceProvider> child_resource_provider(
         ResourceProvider::Create(child_output_surface.get(),
                                  shared_bitmap_manager.get(), NULL, NULL, 0, 1,
                                  use_gpu_memory_buffer_resources_,
                                  use_image_texture_targets_));
 
-    scoped_ptr<TextureStateTrackingContext> parent_context_owned(
+    std::unique_ptr<TextureStateTrackingContext> parent_context_owned(
         new TextureStateTrackingContext);
     TextureStateTrackingContext* parent_context = parent_context_owned.get();
 
     FakeOutputSurfaceClient parent_output_surface_client;
-    scoped_ptr<OutputSurface> parent_output_surface(
+    std::unique_ptr<OutputSurface> parent_output_surface(
         FakeOutputSurface::Create3d(std::move(parent_context_owned)));
     CHECK(parent_output_surface->BindToClient(&parent_output_surface_client));
 
-    scoped_ptr<ResourceProvider> parent_resource_provider(
+    std::unique_ptr<ResourceProvider> parent_resource_provider(
         ResourceProvider::Create(parent_output_surface.get(),
                                  shared_bitmap_manager.get(), NULL, NULL, 0, 1,
                                  use_gpu_memory_buffer_resources_,
@@ -2591,7 +2594,7 @@
   gpu::SyncToken release_sync_token;
   bool lost_resource = false;
   BlockingTaskRunner* main_thread_task_runner = NULL;
-  scoped_ptr<SingleReleaseCallbackImpl> callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> callback =
       SingleReleaseCallbackImpl::Create(
           base::Bind(ReleaseCallback, &release_sync_token, &lost_resource,
                      &main_thread_task_runner));
@@ -2615,16 +2618,16 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -2694,16 +2697,16 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -2737,16 +2740,16 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -2779,18 +2782,18 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
   context->set_support_texture_storage(true);
   context->set_support_texture_usage(true);
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -2840,16 +2843,16 @@
 
   gfx::Size size(64, 64);
   const uint32_t kBadBeef = 0xbadbeef;
-  scoped_ptr<SharedBitmap> shared_bitmap(
+  std::unique_ptr<SharedBitmap> shared_bitmap(
       CreateAndFillSharedBitmap(shared_bitmap_manager_.get(), size, kBadBeef));
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
-      FakeOutputSurface::CreateSoftware(make_scoped_ptr(
-          new SoftwareOutputDevice)));
+  std::unique_ptr<OutputSurface> output_surface(
+      FakeOutputSurface::CreateSoftware(
+          base::WrapUnique(new SoftwareOutputDevice)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), main_thread_task_runner_.get(), 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -2857,7 +2860,7 @@
   gpu::SyncToken release_sync_token;
   bool lost_resource = false;
   BlockingTaskRunner* main_thread_task_runner = NULL;
-  scoped_ptr<SingleReleaseCallbackImpl> callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> callback =
       SingleReleaseCallbackImpl::Create(
           base::Bind(&ReleaseCallback, &release_sync_token, &lost_resource,
                      &main_thread_task_runner));
@@ -2889,19 +2892,20 @@
                       BlockingTaskRunner* main_thread_task_runner,
                       bool mailbox_nearest_neighbor,
                       GLenum sampler_filter) {
-    scoped_ptr<TextureStateTrackingContext> context_owned(
+    std::unique_ptr<TextureStateTrackingContext> context_owned(
         new TextureStateTrackingContext);
     TextureStateTrackingContext* context = context_owned.get();
 
     FakeOutputSurfaceClient output_surface_client;
-    scoped_ptr<OutputSurface> output_surface(
+    std::unique_ptr<OutputSurface> output_surface(
         FakeOutputSurface::Create3d(std::move(context_owned)));
     CHECK(output_surface->BindToClient(&output_surface_client));
 
-    scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
-        output_surface.get(), shared_bitmap_manager, gpu_memory_buffer_manager,
-        main_thread_task_runner, 0, 1, use_gpu_memory_buffer_resources_,
-        use_image_texture_targets_));
+    std::unique_ptr<ResourceProvider> resource_provider(
+        ResourceProvider::Create(
+            output_surface.get(), shared_bitmap_manager,
+            gpu_memory_buffer_manager, main_thread_task_runner, 0, 1,
+            use_gpu_memory_buffer_resources_, use_image_texture_targets_));
 
     unsigned texture_id = 1;
     gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
@@ -2920,7 +2924,7 @@
     gpu::SyncToken release_sync_token;
     bool lost_resource = false;
     BlockingTaskRunner* mailbox_task_runner = NULL;
-    scoped_ptr<SingleReleaseCallbackImpl> callback =
+    std::unique_ptr<SingleReleaseCallbackImpl> callback =
         SingleReleaseCallbackImpl::Create(
             base::Bind(&ReleaseCallback, &release_sync_token, &lost_resource,
                        &mailbox_task_runner));
@@ -3034,16 +3038,16 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3060,7 +3064,7 @@
 
   gpu::Mailbox gpu_mailbox;
   memcpy(gpu_mailbox.name, "Hello world", strlen("Hello world") + 1);
-  scoped_ptr<SingleReleaseCallbackImpl> callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&EmptyReleaseCallback));
 
   TextureMailbox mailbox(gpu_mailbox, sync_token, target);
@@ -3104,16 +3108,16 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3130,7 +3134,7 @@
 
   gpu::Mailbox gpu_mailbox;
   memcpy(gpu_mailbox.name, "Hello world", strlen("Hello world") + 1);
-  scoped_ptr<SingleReleaseCallbackImpl> callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&EmptyReleaseCallback));
 
   TextureMailbox mailbox(gpu_mailbox, sync_token, target);
@@ -3160,16 +3164,16 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<TextureStateTrackingContext> context_owned(
+  std::unique_ptr<TextureStateTrackingContext> context_owned(
       new TextureStateTrackingContext);
   TextureStateTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3185,7 +3189,7 @@
 
   gpu::Mailbox gpu_mailbox;
   memcpy(gpu_mailbox.name, "Hello world", strlen("Hello world") + 1);
-  scoped_ptr<SingleReleaseCallbackImpl> callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&EmptyReleaseCallback));
 
   TextureMailbox mailbox(gpu_mailbox, sync_token, target);
@@ -3282,16 +3286,16 @@
   // Only for GL textures.
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
-  scoped_ptr<AllocationTrackingContext3D> context_owned(
+  std::unique_ptr<AllocationTrackingContext3D> context_owned(
       new StrictMock<AllocationTrackingContext3D>);
   AllocationTrackingContext3D* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3336,18 +3340,18 @@
   // Only for GL textures.
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
-  scoped_ptr<AllocationTrackingContext3D> context_owned(
+  std::unique_ptr<AllocationTrackingContext3D> context_owned(
       new StrictMock<AllocationTrackingContext3D>);
   AllocationTrackingContext3D* context = context_owned.get();
   context->set_support_texture_storage(true);
   context->set_support_texture_usage(true);
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3391,7 +3395,7 @@
   // Only for GL textures.
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
-  scoped_ptr<AllocationTrackingContext3D> context_owned(
+  std::unique_ptr<AllocationTrackingContext3D> context_owned(
       new StrictMock<AllocationTrackingContext3D>);
   AllocationTrackingContext3D* context = context_owned.get();
   context->set_support_texture_format_bgra8888(true);
@@ -3399,11 +3403,11 @@
   context->set_support_texture_usage(true);
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3445,12 +3449,12 @@
   // Only for GL textures.
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
-  scoped_ptr<AllocationTrackingContext3D> context_owned(
+  std::unique_ptr<AllocationTrackingContext3D> context_owned(
       new StrictMock<AllocationTrackingContext3D>);
   AllocationTrackingContext3D* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
@@ -3462,7 +3466,7 @@
   const unsigned kTextureId = 123u;
   const unsigned kImageId = 234u;
 
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3529,18 +3533,18 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<AllocationTrackingContext3D> context_owned(
+  std::unique_ptr<AllocationTrackingContext3D> context_owned(
       new AllocationTrackingContext3D);
   AllocationTrackingContext3D* context = context_owned.get();
   context_owned->set_support_compressed_texture_etc1(true);
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
   gfx::Size size(4, 4);
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3561,18 +3565,18 @@
   if (GetParam() != ResourceProvider::RESOURCE_TYPE_GL_TEXTURE)
     return;
 
-  scoped_ptr<AllocationTrackingContext3D> context_owned(
+  std::unique_ptr<AllocationTrackingContext3D> context_owned(
       new AllocationTrackingContext3D);
   AllocationTrackingContext3D* context = context_owned.get();
   context_owned->set_support_compressed_texture_etc1(true);
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
 
   gfx::Size size(4, 4);
-  scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+  std::unique_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
       output_surface.get(), shared_bitmap_manager_.get(),
       gpu_memory_buffer_manager_.get(), NULL, 0, 1,
       use_gpu_memory_buffer_resources_, use_image_texture_targets_));
@@ -3613,15 +3617,15 @@
 };
 
 TEST(ResourceProviderTest, TextureAllocationChunkSize) {
-  scoped_ptr<TextureIdAllocationTrackingContext> context_owned(
+  std::unique_ptr<TextureIdAllocationTrackingContext> context_owned(
       new TextureIdAllocationTrackingContext);
   TextureIdAllocationTrackingContext* context = context_owned.get();
 
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context_owned)));
   CHECK(output_surface->BindToClient(&output_surface_client));
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
 
   gfx::Size size(1, 1);
@@ -3629,11 +3633,12 @@
 
   {
     size_t kTextureAllocationChunkSize = 1;
-    scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
-        output_surface.get(), shared_bitmap_manager.get(), NULL, NULL, 0,
-        kTextureAllocationChunkSize,
-        ResourceProviderTest::use_gpu_memory_buffer_resources(),
-        ResourceProviderTest::use_image_texture_targets()));
+    std::unique_ptr<ResourceProvider> resource_provider(
+        ResourceProvider::Create(
+            output_surface.get(), shared_bitmap_manager.get(), NULL, NULL, 0,
+            kTextureAllocationChunkSize,
+            ResourceProviderTest::use_gpu_memory_buffer_resources(),
+            ResourceProviderTest::use_image_texture_targets()));
 
     ResourceId id = resource_provider->CreateResource(
         size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, format);
@@ -3646,11 +3651,12 @@
 
   {
     size_t kTextureAllocationChunkSize = 8;
-    scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
-        output_surface.get(), shared_bitmap_manager.get(), NULL, NULL, 0,
-        kTextureAllocationChunkSize,
-        ResourceProviderTest::use_gpu_memory_buffer_resources(),
-        ResourceProviderTest::use_image_texture_targets()));
+    std::unique_ptr<ResourceProvider> resource_provider(
+        ResourceProvider::Create(
+            output_surface.get(), shared_bitmap_manager.get(), NULL, NULL, 0,
+            kTextureAllocationChunkSize,
+            ResourceProviderTest::use_gpu_memory_buffer_resources(),
+            ResourceProviderTest::use_image_texture_targets()));
 
     ResourceId id = resource_provider->CreateResource(
         size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, format);
diff --git a/cc/resources/scoped_resource.h b/cc/resources/scoped_resource.h
index 0e50d0a..1190b47 100644
--- a/cc/resources/scoped_resource.h
+++ b/cc/resources/scoped_resource.h
@@ -5,9 +5,11 @@
 #ifndef CC_RESOURCES_SCOPED_RESOURCE_H_
 #define CC_RESOURCES_SCOPED_RESOURCE_H_
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/resource.h"
 
@@ -19,9 +21,9 @@
 
 class CC_EXPORT ScopedResource : public Resource {
  public:
-  static scoped_ptr<ScopedResource> Create(
+  static std::unique_ptr<ScopedResource> Create(
       ResourceProvider* resource_provider) {
-    return make_scoped_ptr(new ScopedResource(resource_provider));
+    return base::WrapUnique(new ScopedResource(resource_provider));
   }
   virtual ~ScopedResource();
 
diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc
index 1133f21..a7811d0 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -18,14 +18,15 @@
 
 TEST(ScopedResourceTest, NewScopedResource) {
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+  std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
-  scoped_ptr<ScopedResource> texture =
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
+  std::unique_ptr<ScopedResource> texture =
       ScopedResource::Create(resource_provider.get());
 
   // New scoped textures do not hold a texture yet.
@@ -39,14 +40,15 @@
 
 TEST(ScopedResourceTest, CreateScopedResource) {
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+  std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
-  scoped_ptr<ScopedResource> texture =
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
+  std::unique_ptr<ScopedResource> texture =
       ScopedResource::Create(resource_provider.get());
   texture->Allocate(gfx::Size(30, 30), ResourceProvider::TEXTURE_HINT_IMMUTABLE,
                     RGBA_8888);
@@ -63,15 +65,16 @@
 
 TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
   FakeOutputSurfaceClient output_surface_client;
-  scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
+  std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
   CHECK(output_surface->BindToClient(&output_surface_client));
 
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
       new TestSharedBitmapManager());
-  scoped_ptr<ResourceProvider> resource_provider = FakeResourceProvider::Create(
-      output_surface.get(), shared_bitmap_manager.get());
+  std::unique_ptr<ResourceProvider> resource_provider =
+      FakeResourceProvider::Create(output_surface.get(),
+                                   shared_bitmap_manager.get());
   {
-    scoped_ptr<ScopedResource> texture =
+    std::unique_ptr<ScopedResource> texture =
         ScopedResource::Create(resource_provider.get());
 
     EXPECT_EQ(0u, resource_provider->num_resources());
@@ -83,7 +86,7 @@
 
   EXPECT_EQ(0u, resource_provider->num_resources());
   {
-    scoped_ptr<ScopedResource> texture =
+    std::unique_ptr<ScopedResource> texture =
         ScopedResource::Create(resource_provider.get());
     EXPECT_EQ(0u, resource_provider->num_resources());
     texture->Allocate(gfx::Size(30, 30),
diff --git a/cc/resources/scoped_ui_resource.cc b/cc/resources/scoped_ui_resource.cc
index 2db3edd..4ac336d2 100644
--- a/cc/resources/scoped_ui_resource.cc
+++ b/cc/resources/scoped_ui_resource.cc
@@ -5,14 +5,15 @@
 #include "cc/resources/scoped_ui_resource.h"
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "cc/trees/layer_tree_host.h"
 
 namespace cc {
 
-scoped_ptr<ScopedUIResource> ScopedUIResource::Create(
+std::unique_ptr<ScopedUIResource> ScopedUIResource::Create(
     LayerTreeHost* host,
     const UIResourceBitmap& bitmap) {
-  return make_scoped_ptr(new ScopedUIResource(host, bitmap));
+  return base::WrapUnique(new ScopedUIResource(host, bitmap));
 }
 
 ScopedUIResource::ScopedUIResource(LayerTreeHost* host,
diff --git a/cc/resources/scoped_ui_resource.h b/cc/resources/scoped_ui_resource.h
index 0e1676f..4176c4b5 100644
--- a/cc/resources/scoped_ui_resource.h
+++ b/cc/resources/scoped_ui_resource.h
@@ -23,8 +23,9 @@
 // resource or not.
 class CC_EXPORT ScopedUIResource : public UIResourceClient {
  public:
-  static scoped_ptr<ScopedUIResource> Create(LayerTreeHost* host,
-                                             const UIResourceBitmap& bitmap);
+  static std::unique_ptr<ScopedUIResource> Create(
+      LayerTreeHost* host,
+      const UIResourceBitmap& bitmap);
   ~ScopedUIResource() override;
 
   // UIResourceClient implementation.
diff --git a/cc/resources/shared_bitmap_manager.h b/cc/resources/shared_bitmap_manager.h
index 881f6fa..7ee8c9c 100644
--- a/cc/resources/shared_bitmap_manager.h
+++ b/cc/resources/shared_bitmap_manager.h
@@ -5,8 +5,9 @@
 #ifndef CC_RESOURCES_SHARED_BITMAP_MANAGER_H_
 #define CC_RESOURCES_SHARED_BITMAP_MANAGER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/shared_bitmap.h"
 #include "ui/gfx/geometry/size.h"
@@ -18,8 +19,9 @@
   SharedBitmapManager() {}
   virtual ~SharedBitmapManager() {}
 
-  virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size&) = 0;
-  virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
+  virtual std::unique_ptr<SharedBitmap> AllocateSharedBitmap(
+      const gfx::Size&) = 0;
+  virtual std::unique_ptr<SharedBitmap> GetSharedBitmapFromId(
       const gfx::Size&,
       const SharedBitmapId&) = 0;
 
diff --git a/cc/resources/single_release_callback.h b/cc/resources/single_release_callback.h
index 2118ad7..cfb2330 100644
--- a/cc/resources/single_release_callback.h
+++ b/cc/resources/single_release_callback.h
@@ -5,7 +5,9 @@
 #ifndef CC_RESOURCES_SINGLE_RELEASE_CALLBACK_H_
 #define CC_RESOURCES_SINGLE_RELEASE_CALLBACK_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/release_callback.h"
 
@@ -13,8 +15,9 @@
 
 class CC_EXPORT SingleReleaseCallback {
  public:
-  static scoped_ptr<SingleReleaseCallback> Create(const ReleaseCallback& cb) {
-    return make_scoped_ptr(new SingleReleaseCallback(cb));
+  static std::unique_ptr<SingleReleaseCallback> Create(
+      const ReleaseCallback& cb) {
+    return base::WrapUnique(new SingleReleaseCallback(cb));
   }
 
   ~SingleReleaseCallback();
diff --git a/cc/resources/single_release_callback_impl.h b/cc/resources/single_release_callback_impl.h
index 50c0210b..eafcb1f8 100644
--- a/cc/resources/single_release_callback_impl.h
+++ b/cc/resources/single_release_callback_impl.h
@@ -5,7 +5,9 @@
 #ifndef CC_RESOURCES_SINGLE_RELEASE_CALLBACK_IMPL_H_
 #define CC_RESOURCES_SINGLE_RELEASE_CALLBACK_IMPL_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/release_callback_impl.h"
 
@@ -13,9 +15,9 @@
 
 class CC_EXPORT SingleReleaseCallbackImpl {
  public:
-  static scoped_ptr<SingleReleaseCallbackImpl> Create(
+  static std::unique_ptr<SingleReleaseCallbackImpl> Create(
       const ReleaseCallbackImpl& cb) {
-    return make_scoped_ptr(new SingleReleaseCallbackImpl(cb));
+    return base::WrapUnique(new SingleReleaseCallbackImpl(cb));
   }
 
   ~SingleReleaseCallbackImpl();
diff --git a/cc/resources/ui_resource_bitmap.cc b/cc/resources/ui_resource_bitmap.cc
index 3acc6dc4..b7b9312 100644
--- a/cc/resources/ui_resource_bitmap.cc
+++ b/cc/resources/ui_resource_bitmap.cc
@@ -6,8 +6,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkMallocPixelRef.h"
 #include "third_party/skia/include/core/SkPixelRef.h"
diff --git a/cc/resources/ui_resource_bitmap.h b/cc/resources/ui_resource_bitmap.h
index a90159f..dadbdee0 100644
--- a/cc/resources/ui_resource_bitmap.h
+++ b/cc/resources/ui_resource_bitmap.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "skia/ext/refptr.h"
 #include "third_party/skia/include/core/SkPixelRef.h"
diff --git a/cc/resources/ui_resource_request.cc b/cc/resources/ui_resource_request.cc
index b8dd50a..28fd7f36 100644
--- a/cc/resources/ui_resource_request.cc
+++ b/cc/resources/ui_resource_request.cc
@@ -4,6 +4,8 @@
 
 #include "cc/resources/ui_resource_request.h"
 
+#include "base/memory/ptr_util.h"
+
 namespace cc {
 
 UIResourceRequest::UIResourceRequest(UIResourceRequestType type,
@@ -24,7 +26,7 @@
   type_ = request.type_;
   id_ = request.id_;
   if (request.bitmap_) {
-    bitmap_ = make_scoped_ptr(new UIResourceBitmap(*request.bitmap_.get()));
+    bitmap_ = base::WrapUnique(new UIResourceBitmap(*request.bitmap_.get()));
   } else {
     bitmap_ = nullptr;
   }
diff --git a/cc/resources/ui_resource_request.h b/cc/resources/ui_resource_request.h
index b89e567..8294724 100644
--- a/cc/resources/ui_resource_request.h
+++ b/cc/resources/ui_resource_request.h
@@ -5,8 +5,9 @@
 #ifndef CC_RESOURCES_UI_RESOURCE_REQUEST_H_
 #define CC_RESOURCES_UI_RESOURCE_REQUEST_H_
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/ui_resource_bitmap.h"
 #include "cc/resources/ui_resource_client.h"
@@ -41,7 +42,7 @@
  private:
   UIResourceRequestType type_;
   UIResourceId id_;
-  scoped_ptr<UIResourceBitmap> bitmap_;
+  std::unique_ptr<UIResourceBitmap> bitmap_;
 };
 
 }  // namespace cc
diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h
index 9af50b2..ca3be1a 100644
--- a/cc/resources/video_resource_updater.h
+++ b/cc/resources/video_resource_updater.h
@@ -9,11 +9,11 @@
 #include <stdint.h>
 
 #include <list>
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
@@ -161,7 +161,7 @@
 
   ContextProvider* context_provider_;
   ResourceProvider* resource_provider_;
-  scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_;
+  std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_;
   std::vector<uint8_t> upload_pixels_;
 
   // Recycle resources so that we can reduce the number of allocations and
diff --git a/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc
index 4adf8372..db1c4de5 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "cc/resources/resource_provider.h"
 #include "cc/test/fake_output_surface.h"
 #include "cc/test/fake_output_surface_client.h"
@@ -70,7 +71,7 @@
 
 class SharedBitmapManagerAllocationCounter : public TestSharedBitmapManager {
  public:
-  scoped_ptr<SharedBitmap> AllocateSharedBitmap(
+  std::unique_ptr<SharedBitmap> AllocateSharedBitmap(
       const gfx::Size& size) override {
     ++allocation_count_;
     return TestSharedBitmapManager::AllocateSharedBitmap(size);
@@ -86,7 +87,7 @@
 class VideoResourceUpdaterTest : public testing::Test {
  protected:
   VideoResourceUpdaterTest() {
-    scoped_ptr<WebGraphicsContext3DUploadCounter> context3d(
+    std::unique_ptr<WebGraphicsContext3DUploadCounter> context3d(
         new WebGraphicsContext3DUploadCounter());
 
     context3d_ = context3d.get();
@@ -100,7 +101,7 @@
     testing::Test::SetUp();
 
     output_surface_software_ = FakeOutputSurface::CreateSoftware(
-        make_scoped_ptr(new SoftwareOutputDevice));
+        base::WrapUnique(new SoftwareOutputDevice));
     CHECK(output_surface_software_->BindToClient(&client_));
 
     shared_bitmap_manager_.reset(new SharedBitmapManagerAllocationCounter());
@@ -243,11 +244,11 @@
 
   WebGraphicsContext3DUploadCounter* context3d_;
   FakeOutputSurfaceClient client_;
-  scoped_ptr<FakeOutputSurface> output_surface3d_;
-  scoped_ptr<FakeOutputSurface> output_surface_software_;
-  scoped_ptr<SharedBitmapManagerAllocationCounter> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider3d_;
-  scoped_ptr<ResourceProvider> resource_provider_software_;
+  std::unique_ptr<FakeOutputSurface> output_surface3d_;
+  std::unique_ptr<FakeOutputSurface> output_surface_software_;
+  std::unique_ptr<SharedBitmapManagerAllocationCounter> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider3d_;
+  std::unique_ptr<ResourceProvider> resource_provider_software_;
 };
 
 TEST_F(VideoResourceUpdaterTest, SoftwareFrame) {
diff --git a/cc/scheduler/begin_frame_source.cc b/cc/scheduler/begin_frame_source.cc
index a0cf3627..e0bc5e0 100644
--- a/cc/scheduler/begin_frame_source.cc
+++ b/cc/scheduler/begin_frame_source.cc
@@ -197,7 +197,7 @@
 }
 
 SyntheticBeginFrameSource::SyntheticBeginFrameSource(
-    scoped_ptr<DelayBasedTimeSource> time_source)
+    std::unique_ptr<DelayBasedTimeSource> time_source)
     : time_source_(std::move(time_source)) {
   time_source_->SetClient(this);
 }
diff --git a/cc/scheduler/begin_frame_source.h b/cc/scheduler/begin_frame_source.h
index fb0c8c3..cc238deb 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -215,7 +215,7 @@
   explicit SyntheticBeginFrameSource(base::SingleThreadTaskRunner* task_runner,
                                      base::TimeDelta initial_vsync_interval);
   explicit SyntheticBeginFrameSource(
-      scoped_ptr<DelayBasedTimeSource> time_source);
+      std::unique_ptr<DelayBasedTimeSource> time_source);
   ~SyntheticBeginFrameSource() override;
 
   void OnUpdateVSyncParameters(base::TimeTicks new_vsync_timebase,
@@ -235,7 +235,7 @@
   BeginFrameArgs CreateBeginFrameArgs(base::TimeTicks frame_time,
                                       BeginFrameArgs::BeginFrameArgsType type);
 
-  scoped_ptr<DelayBasedTimeSource> time_source_;
+  std::unique_ptr<DelayBasedTimeSource> time_source_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(SyntheticBeginFrameSource);
diff --git a/cc/scheduler/begin_frame_source_unittest.cc b/cc/scheduler/begin_frame_source_unittest.cc
index 37b0a63..0e8fd9d 100644
--- a/cc/scheduler/begin_frame_source_unittest.cc
+++ b/cc/scheduler/begin_frame_source_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/test/test_simple_task_runner.h"
 #include "cc/test/begin_frame_args_test.h"
 #include "cc/test/begin_frame_source_test.h"
@@ -199,7 +200,7 @@
   obs.source_ = &source;
   source.AddObserver(&obs);
 
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   source.AsValueInto(state.get());
 }
@@ -223,10 +224,10 @@
   static const int64_t kDeadline;
   static const int64_t kInterval;
 
-  scoped_ptr<base::SimpleTestTickClock> now_src_;
+  std::unique_ptr<base::SimpleTestTickClock> now_src_;
   scoped_refptr<OrderedSimpleTaskRunner> task_runner_;
-  scoped_ptr<TestBackToBackBeginFrameSource> source_;
-  scoped_ptr<MockBeginFrameObserver> obs_;
+  std::unique_ptr<TestBackToBackBeginFrameSource> source_;
+  std::unique_ptr<MockBeginFrameObserver> obs_;
 
   void SetUp() override {
     now_src_.reset(new base::SimpleTestTickClock());
@@ -235,7 +236,8 @@
         make_scoped_refptr(new OrderedSimpleTaskRunner(now_src_.get(), false));
     source_.reset(
         new TestBackToBackBeginFrameSource(now_src_.get(), task_runner_.get()));
-    obs_ = make_scoped_ptr(new ::testing::StrictMock<MockBeginFrameObserver>());
+    obs_ =
+        base::WrapUnique(new ::testing::StrictMock<MockBeginFrameObserver>());
   }
 
   void TearDown() override { obs_.reset(); }
@@ -402,10 +404,10 @@
 // SyntheticBeginFrameSource testing ------------------------------------------
 class SyntheticBeginFrameSourceTest : public ::testing::Test {
  public:
-  scoped_ptr<base::SimpleTestTickClock> now_src_;
+  std::unique_ptr<base::SimpleTestTickClock> now_src_;
   scoped_refptr<OrderedSimpleTaskRunner> task_runner_;
-  scoped_ptr<TestSyntheticBeginFrameSource> source_;
-  scoped_ptr<MockBeginFrameObserver> obs_;
+  std::unique_ptr<TestSyntheticBeginFrameSource> source_;
+  std::unique_ptr<MockBeginFrameObserver> obs_;
 
   void SetUp() override {
     now_src_.reset(new base::SimpleTestTickClock());
@@ -415,7 +417,7 @@
     source_.reset(new TestSyntheticBeginFrameSource(
         now_src_.get(), task_runner_.get(),
         base::TimeDelta::FromMicroseconds(10000)));
-    obs_ = make_scoped_ptr(new MockBeginFrameObserver());
+    obs_ = base::WrapUnique(new MockBeginFrameObserver());
   }
 
   void TearDown() override { obs_.reset(); }
diff --git a/cc/scheduler/compositor_timing_history.cc b/cc/scheduler/compositor_timing_history.cc
index 9d5a5844..793ad10 100644
--- a/cc/scheduler/compositor_timing_history.cc
+++ b/cc/scheduler/compositor_timing_history.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/debug/rendering_stats_instrumentation.h"
@@ -381,21 +382,21 @@
 CompositorTimingHistory::~CompositorTimingHistory() {
 }
 
-scoped_ptr<CompositorTimingHistory::UMAReporter>
+std::unique_ptr<CompositorTimingHistory::UMAReporter>
 CompositorTimingHistory::CreateUMAReporter(UMACategory category) {
   switch (category) {
     case RENDERER_UMA:
-      return make_scoped_ptr(new RendererUMAReporter);
+      return base::WrapUnique(new RendererUMAReporter);
       break;
     case BROWSER_UMA:
-      return make_scoped_ptr(new BrowserUMAReporter);
+      return base::WrapUnique(new BrowserUMAReporter);
       break;
     case NULL_UMA:
-      return make_scoped_ptr(new NullUMAReporter);
+      return base::WrapUnique(new NullUMAReporter);
       break;
   }
   NOTREACHED();
-  return make_scoped_ptr<CompositorTimingHistory::UMAReporter>(nullptr);
+  return base::WrapUnique<CompositorTimingHistory::UMAReporter>(nullptr);
 }
 
 void CompositorTimingHistory::AsValueInto(
diff --git a/cc/scheduler/compositor_timing_history.h b/cc/scheduler/compositor_timing_history.h
index fc07c61..d850786 100644
--- a/cc/scheduler/compositor_timing_history.h
+++ b/cc/scheduler/compositor_timing_history.h
@@ -5,8 +5,9 @@
 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/rolling_time_delta_history.h"
 
 namespace base {
@@ -85,7 +86,7 @@
 
   bool ShouldReportUma() const;
 
-  static scoped_ptr<UMAReporter> CreateUMAReporter(UMACategory category);
+  static std::unique_ptr<UMAReporter> CreateUMAReporter(UMACategory category);
   virtual base::TimeTicks Now() const;
 
   bool using_synchronous_renderer_compositor_;
@@ -125,7 +126,7 @@
   base::TimeTicks draw_start_time_;
   base::TimeTicks swap_start_time_;
 
-  scoped_ptr<UMAReporter> uma_reporter_;
+  std::unique_ptr<UMAReporter> uma_reporter_;
   RenderingStatsInstrumentation* rendering_stats_instrumentation_;
 
  private:
diff --git a/cc/scheduler/compositor_timing_history_unittest.cc b/cc/scheduler/compositor_timing_history_unittest.cc
index f57d443..8bbe93d9 100644
--- a/cc/scheduler/compositor_timing_history_unittest.cc
+++ b/cc/scheduler/compositor_timing_history_unittest.cc
@@ -43,7 +43,7 @@
   base::TimeTicks Now() { return now_; }
 
  protected:
-  scoped_ptr<RenderingStatsInstrumentation> rendering_stats_;
+  std::unique_ptr<RenderingStatsInstrumentation> rendering_stats_;
   TestCompositorTimingHistory timing_history_;
   base::TimeTicks now_;
 };
diff --git a/cc/scheduler/delay_based_time_source.h b/cc/scheduler/delay_based_time_source.h
index 1be9d9b..be9e5c4b 100644
--- a/cc/scheduler/delay_based_time_source.h
+++ b/cc/scheduler/delay_based_time_source.h
@@ -5,11 +5,12 @@
 #ifndef CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/cancelable_callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"
 #include "cc/base/cc_export.h"
@@ -35,10 +36,10 @@
 // delays. DelayBasedTimeSource uses base::TimeTicks::Now as its timebase.
 class CC_EXPORT DelayBasedTimeSource {
  public:
-  static scoped_ptr<DelayBasedTimeSource> Create(
+  static std::unique_ptr<DelayBasedTimeSource> Create(
       base::TimeDelta interval,
       base::SingleThreadTaskRunner* task_runner) {
-    return make_scoped_ptr(new DelayBasedTimeSource(interval, task_runner));
+    return base::WrapUnique(new DelayBasedTimeSource(interval, task_runner));
   }
 
   virtual ~DelayBasedTimeSource();
diff --git a/cc/scheduler/delay_based_time_source_unittest.cc b/cc/scheduler/delay_based_time_source_unittest.cc
index a905fed..5b70bbfd 100644
--- a/cc/scheduler/delay_based_time_source_unittest.cc
+++ b/cc/scheduler/delay_based_time_source_unittest.cc
@@ -22,7 +22,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
 
@@ -40,7 +40,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -54,7 +54,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -68,7 +68,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -85,7 +85,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -106,7 +106,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -129,7 +129,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -151,7 +151,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -173,7 +173,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -193,7 +193,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -237,7 +237,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -279,7 +279,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -390,7 +390,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);
@@ -415,7 +415,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
   timer->SetActive(true);  // Should post a task.
@@ -430,7 +430,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
 
@@ -455,7 +455,7 @@
   scoped_refptr<base::TestSimpleTaskRunner> task_runner =
       new base::TestSimpleTaskRunner;
   FakeDelayBasedTimeSourceClient client;
-  scoped_ptr<FakeDelayBasedTimeSource> timer =
+  std::unique_ptr<FakeDelayBasedTimeSource> timer =
       FakeDelayBasedTimeSource::Create(Interval(), task_runner.get());
   timer->SetClient(&client);
 
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 3fb8b3b1..e2a531f 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -8,6 +8,7 @@
 
 #include "base/auto_reset.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/single_thread_task_runner.h"
 #include "base/trace_event/trace_event.h"
@@ -26,16 +27,16 @@
     base::TimeDelta::FromMicroseconds(1000);
 }
 
-scoped_ptr<Scheduler> Scheduler::Create(
+std::unique_ptr<Scheduler> Scheduler::Create(
     SchedulerClient* client,
     const SchedulerSettings& settings,
     int layer_tree_host_id,
     base::SingleThreadTaskRunner* task_runner,
     BeginFrameSource* begin_frame_source,
-    scoped_ptr<CompositorTimingHistory> compositor_timing_history) {
-  return make_scoped_ptr(new Scheduler(client, settings, layer_tree_host_id,
-                                       task_runner, begin_frame_source,
-                                       std::move(compositor_timing_history)));
+    std::unique_ptr<CompositorTimingHistory> compositor_timing_history) {
+  return base::WrapUnique(new Scheduler(client, settings, layer_tree_host_id,
+                                        task_runner, begin_frame_source,
+                                        std::move(compositor_timing_history)));
 }
 
 Scheduler::Scheduler(
@@ -44,7 +45,7 @@
     int layer_tree_host_id,
     base::SingleThreadTaskRunner* task_runner,
     BeginFrameSource* begin_frame_source,
-    scoped_ptr<CompositorTimingHistory> compositor_timing_history)
+    std::unique_ptr<CompositorTimingHistory> compositor_timing_history)
     : settings_(settings),
       client_(client),
       layer_tree_host_id_(layer_tree_host_id),
@@ -741,9 +742,9 @@
   SetupNextBeginFrameIfNeeded();
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat> Scheduler::AsValue()
-    const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+Scheduler::AsValue() const {
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   AsValueInto(state.get());
   return std::move(state);
diff --git a/cc/scheduler/scheduler.h b/cc/scheduler/scheduler.h
index 6672de4..9aade7e 100644
--- a/cc/scheduler/scheduler.h
+++ b/cc/scheduler/scheduler.h
@@ -6,11 +6,11 @@
 #define CC_SCHEDULER_SCHEDULER_H_
 
 #include <deque>
+#include <memory>
 #include <string>
 
 #include "base/cancelable_callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/begin_frame_args.h"
@@ -55,13 +55,13 @@
 
 class CC_EXPORT Scheduler : public BeginFrameObserverBase {
  public:
-  static scoped_ptr<Scheduler> Create(
+  static std::unique_ptr<Scheduler> Create(
       SchedulerClient* client,
       const SchedulerSettings& scheduler_settings,
       int layer_tree_host_id,
       base::SingleThreadTaskRunner* task_runner,
       BeginFrameSource* begin_frame_source,
-      scoped_ptr<CompositorTimingHistory> compositor_timing_history);
+      std::unique_ptr<CompositorTimingHistory> compositor_timing_history);
 
   ~Scheduler() override;
 
@@ -135,7 +135,7 @@
 
   void SetDeferCommits(bool defer_commits);
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
   void AsValueInto(base::trace_event::TracedValue* value) const override;
 
   void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
@@ -151,7 +151,7 @@
             int layer_tree_host_id,
             base::SingleThreadTaskRunner* task_runner,
             BeginFrameSource* begin_frame_source,
-            scoped_ptr<CompositorTimingHistory> compositor_timing_history);
+            std::unique_ptr<CompositorTimingHistory> compositor_timing_history);
 
   // Virtual for testing.
   virtual base::TimeTicks Now() const;
@@ -166,7 +166,7 @@
   BeginFrameSource* begin_frame_source_;
   bool observing_begin_frame_source_;
 
-  scoped_ptr<CompositorTimingHistory> compositor_timing_history_;
+  std::unique_ptr<CompositorTimingHistory> compositor_timing_history_;
   base::TimeDelta estimated_parent_draw_time_;
 
   std::deque<BeginFrameArgs> begin_retro_frame_args_;
diff --git a/cc/scheduler/scheduler_settings.cc b/cc/scheduler/scheduler_settings.cc
index 79576acc..6f174fa 100644
--- a/cc/scheduler/scheduler_settings.cc
+++ b/cc/scheduler/scheduler_settings.cc
@@ -24,9 +24,9 @@
 
 SchedulerSettings::~SchedulerSettings() {}
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 SchedulerSettings::AsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   state->SetBoolean("use_external_begin_frame_source",
                     use_external_begin_frame_source);
diff --git a/cc/scheduler/scheduler_settings.h b/cc/scheduler/scheduler_settings.h
index 2f07b30..bc04717 100644
--- a/cc/scheduler/scheduler_settings.h
+++ b/cc/scheduler/scheduler_settings.h
@@ -5,8 +5,9 @@
 #ifndef CC_SCHEDULER_SCHEDULER_SETTINGS_H_
 #define CC_SCHEDULER_SCHEDULER_SETTINGS_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/values.h"
 #include "cc/base/cc_export.h"
@@ -37,7 +38,7 @@
   int maximum_number_of_failed_draws_before_draw_is_forced;
   base::TimeDelta background_frame_interval;
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
 };
 
 }  // namespace cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 266f887..35e73f6 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -189,9 +189,9 @@
   return "???";
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 SchedulerStateMachine::AsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   AsValueInto(state.get());
   return std::move(state);
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index f1872fe..2d0ee144 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -5,10 +5,10 @@
 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/scheduler/commit_earlyout_reason.h"
@@ -129,7 +129,7 @@
   };
   static const char* ActionToString(Action action);
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
   void AsValueInto(base::trace_event::TracedValue* dict) const;
 
   Action NextAction() const;
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 75652c7..4b12a5d 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/run_loop.h"
@@ -207,7 +208,8 @@
   BeginFrameArgs last_begin_main_frame_args_;
   base::TimeTicks posted_begin_impl_frame_deadline_;
   std::vector<const char*> actions_;
-  std::vector<scoped_ptr<base::trace_event::ConvertableToTraceFormat>> states_;
+  std::vector<std::unique_ptr<base::trace_event::ConvertableToTraceFormat>>
+      states_;
   TestScheduler* scheduler_;
 };
 
@@ -271,8 +273,8 @@
       frame_source = synthetic_frame_source_.get();
     }
 
-    scoped_ptr<FakeCompositorTimingHistory> fake_compositor_timing_history =
-        FakeCompositorTimingHistory::Create(
+    std::unique_ptr<FakeCompositorTimingHistory>
+        fake_compositor_timing_history = FakeCompositorTimingHistory::Create(
             scheduler_settings_.using_synchronous_renderer_compositor);
     fake_compositor_timing_history_ = fake_compositor_timing_history.get();
 
@@ -295,10 +297,10 @@
   }
 
   void SetUpScheduler(bool initSurface) {
-    SetUpScheduler(make_scoped_ptr(new FakeSchedulerClient), initSurface);
+    SetUpScheduler(base::WrapUnique(new FakeSchedulerClient), initSurface);
   }
 
-  void SetUpScheduler(scoped_ptr<FakeSchedulerClient> client,
+  void SetUpScheduler(std::unique_ptr<FakeSchedulerClient> client,
                       bool initSurface) {
     client_ = std::move(client);
     if (initSurface)
@@ -437,14 +439,15 @@
                                     ScrollHandlerState scroll_handler_state,
                                     base::TimeDelta durations);
 
-  scoped_ptr<base::SimpleTestTickClock> now_src_;
+  std::unique_ptr<base::SimpleTestTickClock> now_src_;
   scoped_refptr<OrderedSimpleTaskRunner> task_runner_;
-  scoped_ptr<FakeExternalBeginFrameSource> fake_external_begin_frame_source_;
-  scoped_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source_;
-  scoped_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source_;
+  std::unique_ptr<FakeExternalBeginFrameSource>
+      fake_external_begin_frame_source_;
+  std::unique_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source_;
+  std::unique_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source_;
   SchedulerSettings scheduler_settings_;
-  scoped_ptr<FakeSchedulerClient> client_;
-  scoped_ptr<TestScheduler> scheduler_;
+  std::unique_ptr<FakeSchedulerClient> client_;
+  std::unique_ptr<TestScheduler> scheduler_;
   FakeCompositorTimingHistory* fake_compositor_timing_history_;
 };
 
@@ -784,7 +787,7 @@
   SchedulerClientThatsetNeedsDrawInsideDraw* client =
       new SchedulerClientThatsetNeedsDrawInsideDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
   client->SetRequestRedrawsInsideDraw(true);
 
   scheduler_->SetNeedsRedraw();
@@ -820,7 +823,7 @@
   SchedulerClientThatsetNeedsDrawInsideDraw* client =
       new SchedulerClientThatsetNeedsDrawInsideDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   client->SetRequestRedrawsInsideDraw(true);
   client->SetDrawWillHappen(false);
@@ -896,7 +899,7 @@
       new SchedulerClientThatSetNeedsBeginMainFrameInsideDraw;
 
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   EXPECT_FALSE(client->needs_begin_frames());
   scheduler_->SetNeedsRedraw();
@@ -938,7 +941,7 @@
   SchedulerClientThatsetNeedsDrawInsideDraw* client =
       new SchedulerClientThatsetNeedsDrawInsideDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   client->SetDrawWillHappen(false);
 
@@ -981,7 +984,7 @@
   SchedulerClientThatSetNeedsBeginMainFrameInsideDraw* client =
       new SchedulerClientThatSetNeedsBeginMainFrameInsideDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   scheduler_->SetNeedsRedraw();
   EXPECT_TRUE(scheduler_->RedrawPending());
@@ -1019,7 +1022,7 @@
   SchedulerClientNeedsPrepareTilesInDraw* client =
       new SchedulerClientNeedsPrepareTilesInDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   // Request both draw and prepare tiles. PrepareTiles shouldn't
   // be trigged until BeginImplFrame.
@@ -1229,8 +1232,8 @@
 }
 
 TEST_F(SchedulerTest, PrepareTilesFunnelResetOnVisibilityChange) {
-  scoped_ptr<SchedulerClientNeedsPrepareTilesInDraw> client =
-      make_scoped_ptr(new SchedulerClientNeedsPrepareTilesInDraw);
+  std::unique_ptr<SchedulerClientNeedsPrepareTilesInDraw> client =
+      base::WrapUnique(new SchedulerClientNeedsPrepareTilesInDraw);
   scheduler_settings_.use_external_begin_frame_source = true;
   SetUpScheduler(std::move(client), true);
 
@@ -1265,7 +1268,7 @@
   SchedulerClientNeedsPrepareTilesInDraw* client =
       new SchedulerClientNeedsPrepareTilesInDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   scheduler_->SetNeedsRedraw();
   EXPECT_SCOPED(AdvanceFrame());
@@ -1280,7 +1283,7 @@
       new SchedulerClientNeedsPrepareTilesInDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
   scheduler_settings_.commit_to_active_tree = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   // SetNeedsBeginMainFrame should begin the frame on the next BeginImplFrame.
   scheduler_->SetNeedsBeginMainFrame();
@@ -1320,7 +1323,7 @@
       new SchedulerClientNeedsPrepareTilesInDraw;
   scheduler_settings_.use_external_begin_frame_source = true;
   scheduler_settings_.commit_to_active_tree = true;
-  SetUpScheduler(make_scoped_ptr(client), true);
+  SetUpScheduler(base::WrapUnique(client), true);
 
   // SetNeedsBeginMainFrame should begin the frame on the next BeginImplFrame.
   scheduler_->SetNeedsBeginMainFrame();
@@ -3544,8 +3547,8 @@
   scheduler_settings_.using_synchronous_renderer_compositor = true;
   scheduler_settings_.use_external_begin_frame_source = true;
 
-  scoped_ptr<FakeSchedulerClient> client =
-      make_scoped_ptr(new SchedulerClientSetNeedsPrepareTilesOnDraw);
+  std::unique_ptr<FakeSchedulerClient> client =
+      base::WrapUnique(new SchedulerClientSetNeedsPrepareTilesOnDraw);
   SetUpScheduler(std::move(client), true);
 
   scheduler_->SetNeedsRedraw();
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 6866ced..2632827 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -54,7 +54,7 @@
   }
 }
 
-bool Display::Initialize(scoped_ptr<OutputSurface> output_surface,
+bool Display::Initialize(std::unique_ptr<OutputSurface> output_surface,
                          DisplayScheduler* scheduler) {
   // TODO(enne): register/unregister BeginFrameSource with SurfaceManager here.
   output_surface_ = std::move(output_surface);
@@ -105,25 +105,26 @@
   if (resource_provider_)
     return;
 
-  scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
-      output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_,
-      nullptr, settings_.highp_threshold_min,
-      settings_.texture_id_allocation_chunk_size,
-      settings_.use_gpu_memory_buffer_resources,
-      std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1,
-                            GL_TEXTURE_2D));
+  std::unique_ptr<ResourceProvider> resource_provider =
+      ResourceProvider::Create(
+          output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_,
+          nullptr, settings_.highp_threshold_min,
+          settings_.texture_id_allocation_chunk_size,
+          settings_.use_gpu_memory_buffer_resources,
+          std::vector<unsigned>(
+              static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D));
   if (!resource_provider)
     return;
 
   if (output_surface_->context_provider()) {
-    scoped_ptr<GLRenderer> renderer = GLRenderer::Create(
+    std::unique_ptr<GLRenderer> renderer = GLRenderer::Create(
         this, &settings_, output_surface_.get(), resource_provider.get(),
         texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
     if (!renderer)
       return;
     renderer_ = std::move(renderer);
   } else {
-    scoped_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create(
+    std::unique_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create(
         this, &settings_, output_surface_.get(), resource_provider.get());
     if (!renderer)
       return;
@@ -168,7 +169,7 @@
     return false;
   }
 
-  scoped_ptr<CompositorFrame> frame =
+  std::unique_ptr<CompositorFrame> frame =
       aggregator_->Aggregate(current_surface_id_);
   if (!frame) {
     TRACE_EVENT_INSTANT0("cc", "Empty aggregated frame.",
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index 4646179..cb8e898b 100644
--- a/cc/surfaces/display.h
+++ b/cc/surfaces/display.h
@@ -5,10 +5,10 @@
 #ifndef CC_SURFACES_DISPLAY_H_
 #define CC_SURFACES_DISPLAY_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/output/output_surface_client.h"
 #include "cc/output/renderer.h"
 #include "cc/resources/returned_resource.h"
@@ -58,7 +58,7 @@
           const RendererSettings& settings);
   ~Display() override;
 
-  bool Initialize(scoped_ptr<OutputSurface> output_surface,
+  bool Initialize(std::unique_ptr<OutputSurface> output_surface,
                   DisplayScheduler* scheduler);
 
   // device_scale_factor is used to communicate to the external window system
@@ -110,12 +110,12 @@
   float device_scale_factor_;
   bool swapped_since_resize_;
   gfx::Rect external_clip_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   DisplayScheduler* scheduler_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<SurfaceAggregator> aggregator_;
-  scoped_ptr<DirectRenderer> renderer_;
-  scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<SurfaceAggregator> aggregator_;
+  std::unique_ptr<DirectRenderer> renderer_;
+  std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
   std::vector<ui::LatencyInfo> stored_latency_info_;
 
   DISALLOW_COPY_AND_ASSIGN(Display);
diff --git a/cc/surfaces/display_client.h b/cc/surfaces/display_client.h
index 61ea4d3..1e3ccb2 100644
--- a/cc/surfaces/display_client.h
+++ b/cc/surfaces/display_client.h
@@ -5,7 +5,8 @@
 #ifndef CC_SURFACES_DISPLAY_CLIENT_H_
 #define CC_SURFACES_DISPLAY_CLIENT_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/time/time.h"
 
 namespace cc {
diff --git a/cc/surfaces/display_scheduler.h b/cc/surfaces/display_scheduler.h
index 90e99f4..cd4b5db 100644
--- a/cc/surfaces/display_scheduler.h
+++ b/cc/surfaces/display_scheduler.h
@@ -5,10 +5,11 @@
 #ifndef CC_SURFACES_DISPLAY_SCHEDULER_H_
 #define CC_SURFACES_DISPLAY_SCHEDULER_H_
 
+#include <memory>
+
 #include "base/cancelable_callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "cc/scheduler/begin_frame_source.h"
 #include "cc/surfaces/surface_id.h"
@@ -70,7 +71,7 @@
   base::TimeTicks begin_frame_deadline_task_time_;
 
   // TODO(tansell): Set this to something useful.
-  scoped_ptr<BeginFrameSource> begin_frame_source_for_children_;
+  std::unique_ptr<BeginFrameSource> begin_frame_source_for_children_;
 
   bool output_surface_lost_;
   bool root_surface_resources_locked_;
diff --git a/cc/surfaces/display_scheduler_unittest.cc b/cc/surfaces/display_scheduler_unittest.cc
index 18e6303..50c082c 100644
--- a/cc/surfaces/display_scheduler_unittest.cc
+++ b/cc/surfaces/display_scheduler_unittest.cc
@@ -101,10 +101,10 @@
 
   FakeBeginFrameSource fake_begin_frame_source_;
 
-  scoped_ptr<base::SimpleTestTickClock> now_src_;
+  std::unique_ptr<base::SimpleTestTickClock> now_src_;
   scoped_refptr<base::NullTaskRunner> task_runner_;
-  scoped_ptr<FakeDisplaySchedulerClient> client_;
-  scoped_ptr<TestDisplayScheduler> scheduler_;
+  std::unique_ptr<FakeDisplaySchedulerClient> client_;
+  std::unique_ptr<TestDisplayScheduler> scheduler_;
 };
 
 TEST_F(DisplaySchedulerTest, ResizeHasLateDeadlineUntilNewRootSurface) {
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
index cbc7e34..4a2de66 100644
--- a/cc/surfaces/display_unittest.cc
+++ b/cc/surfaces/display_unittest.cc
@@ -61,12 +61,12 @@
         task_runner_(new base::NullTaskRunner) {}
 
  protected:
-  void SetUpContext(scoped_ptr<TestWebGraphicsContext3D> context) {
+  void SetUpContext(std::unique_ptr<TestWebGraphicsContext3D> context) {
     if (context) {
       output_surface_ = FakeOutputSurface::Create3d(
           TestContextProvider::Create(std::move(context)));
     } else {
-      scoped_ptr<TestSoftwareOutputDevice> output_device(
+      std::unique_ptr<TestSoftwareOutputDevice> output_device(
           new TestSoftwareOutputDevice);
       software_output_device_ = output_device.get();
       output_surface_ =
@@ -77,10 +77,10 @@
   }
 
   void SubmitCompositorFrame(RenderPassList* pass_list, SurfaceId surface_id) {
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     pass_list->swap(frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
 
     factory_.SubmitCompositorFrame(surface_id, std::move(frame),
@@ -91,11 +91,11 @@
   FakeSurfaceFactoryClient surface_factory_client_;
   SurfaceFactory factory_;
   TestSoftwareOutputDevice* software_output_device_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
   FakeOutputSurface* output_surface_ptr_;
   FakeBeginFrameSource fake_begin_frame_source_;
   scoped_refptr<base::NullTaskRunner> task_runner_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
 };
 
 class TestDisplayClient : public DisplayClient {
@@ -149,7 +149,7 @@
   bool swapped;
 };
 
-void CopyCallback(bool* called, scoped_ptr<CopyOutputResult> result) {
+void CopyCallback(bool* called, std::unique_ptr<CopyOutputResult> result) {
   *called = true;
 }
 
@@ -185,7 +185,7 @@
 
   // First draw from surface should have full damage.
   RenderPassList pass_list;
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->output_rect = gfx::Rect(0, 0, 100, 100);
   pass->damage_rect = gfx::Rect(10, 10, 1, 1);
   pass->id = RenderPassId(1, 1);
@@ -325,10 +325,10 @@
 
     pass_list.push_back(std::move(pass));
     scheduler.ResetDamageForTest();
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     pass_list.swap(frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
     frame->metadata.latency_info.push_back(ui::LatencyInfo());
 
@@ -358,10 +358,10 @@
 
     pass_list.push_back(std::move(pass));
     scheduler.ResetDamageForTest();
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     pass_list.swap(frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
 
     factory_.SubmitCompositorFrame(surface_id, std::move(frame),
@@ -417,7 +417,7 @@
 };
 
 TEST_F(DisplayTest, Finish) {
-  scoped_ptr<MockedContext> context(new MockedContext());
+  std::unique_ptr<MockedContext> context(new MockedContext());
   MockedContext* context_ptr = context.get();
   SetUpContext(std::move(context));
 
@@ -441,7 +441,7 @@
 
   {
     RenderPassList pass_list;
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->output_rect = gfx::Rect(0, 0, 100, 100);
     pass->damage_rect = gfx::Rect(10, 10, 1, 1);
     pass->id = RenderPassId(1, 1);
@@ -467,7 +467,7 @@
   EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()).Times(0);
   {
     RenderPassList pass_list;
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->output_rect = gfx::Rect(0, 0, 200, 200);
     pass->damage_rect = gfx::Rect(10, 10, 1, 1);
     pass->id = RenderPassId(1, 1);
diff --git a/cc/surfaces/onscreen_display_client.cc b/cc/surfaces/onscreen_display_client.cc
index e8baf1b8..0f34a20 100644
--- a/cc/surfaces/onscreen_display_client.cc
+++ b/cc/surfaces/onscreen_display_client.cc
@@ -15,7 +15,7 @@
 namespace cc {
 
 OnscreenDisplayClient::OnscreenDisplayClient(
-    scoped_ptr<OutputSurface> output_surface,
+    std::unique_ptr<OutputSurface> output_surface,
     SurfaceManager* manager,
     SharedBitmapManager* bitmap_manager,
     gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
diff --git a/cc/surfaces/onscreen_display_client.h b/cc/surfaces/onscreen_display_client.h
index d91f9c4..bf87523 100644
--- a/cc/surfaces/onscreen_display_client.h
+++ b/cc/surfaces/onscreen_display_client.h
@@ -5,13 +5,13 @@
 #ifndef CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_
 #define CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_
 
-#include "cc/surfaces/display_client.h"
+#include <memory>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/surfaces/display.h"
+#include "cc/surfaces/display_client.h"
 #include "cc/surfaces/surfaces_export.h"
 
 namespace base {
@@ -31,7 +31,7 @@
     : NON_EXPORTED_BASE(DisplayClient) {
  public:
   OnscreenDisplayClient(
-      scoped_ptr<OutputSurface> output_surface,
+      std::unique_ptr<OutputSurface> output_surface,
       SurfaceManager* manager,
       SharedBitmapManager* bitmap_manager,
       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
@@ -54,15 +54,15 @@
   bool output_surface_lost() { return output_surface_lost_; }
 
  protected:
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   // Be careful of destruction order:
   // Display depends on DisplayScheduler depends on *BeginFrameSource
   // depends on TaskRunner.
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
-  scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_;
-  scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_;
-  scoped_ptr<DisplayScheduler> scheduler_;
-  scoped_ptr<Display> display_;
+  std::unique_ptr<SyntheticBeginFrameSource> synthetic_frame_source_;
+  std::unique_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_;
+  std::unique_ptr<DisplayScheduler> scheduler_;
+  std::unique_ptr<Display> display_;
   SurfaceDisplayOutputSurface* surface_display_output_surface_;
   bool output_surface_lost_;
   bool disable_display_vsync_;
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
index 281a6901..173218c 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -41,7 +41,7 @@
     draw_callback_.Run(SurfaceDrawStatus::DRAW_SKIPPED);
 }
 
-void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
+void Surface::QueueFrame(std::unique_ptr<CompositorFrame> frame,
                          const DrawCallback& callback) {
   DCHECK(factory_);
   ClearCopyRequests();
@@ -50,7 +50,7 @@
     TakeLatencyInfo(&frame->metadata.latency_info);
   }
 
-  scoped_ptr<CompositorFrame> previous_frame = std::move(current_frame_);
+  std::unique_ptr<CompositorFrame> previous_frame = std::move(current_frame_);
   current_frame_ = std::move(frame);
 
   if (current_frame_) {
@@ -95,10 +95,11 @@
   }
 }
 
-void Surface::RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> copy_request) {
+void Surface::RequestCopyOfOutput(
+    std::unique_ptr<CopyOutputRequest> copy_request) {
   if (current_frame_ &&
       !current_frame_->delegated_frame_data->render_pass_list.empty()) {
-    std::vector<scoped_ptr<CopyOutputRequest>>& copy_requests =
+    std::vector<std::unique_ptr<CopyOutputRequest>>& copy_requests =
         current_frame_->delegated_frame_data->render_pass_list.back()
             ->copy_requests;
 
@@ -107,7 +108,7 @@
       // source.
       auto to_remove =
           std::remove_if(copy_requests.begin(), copy_requests.end(),
-                         [source](const scoped_ptr<CopyOutputRequest>& x) {
+                         [source](const std::unique_ptr<CopyOutputRequest>& x) {
                            return x->source() == source;
                          });
       copy_requests.erase(to_remove, copy_requests.end());
@@ -119,7 +120,8 @@
 }
 
 void Surface::TakeCopyOutputRequests(
-    std::multimap<RenderPassId, scoped_ptr<CopyOutputRequest>>* copy_requests) {
+    std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>>*
+        copy_requests) {
   DCHECK(copy_requests->empty());
   if (current_frame_) {
     for (const auto& render_pass :
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 340db19..957d9f8 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -9,13 +9,13 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <unordered_set>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/quads/render_pass_id.h"
@@ -45,13 +45,13 @@
 
   SurfaceId surface_id() const { return surface_id_; }
 
-  void QueueFrame(scoped_ptr<CompositorFrame> frame,
+  void QueueFrame(std::unique_ptr<CompositorFrame> frame,
                   const DrawCallback& draw_callback);
-  void RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> copy_request);
+  void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request);
   // Adds each CopyOutputRequest in the current frame to copy_requests. The
   // caller takes ownership of them.
   void TakeCopyOutputRequests(
-      std::multimap<RenderPassId, scoped_ptr<CopyOutputRequest>>*
+      std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>>*
           copy_requests);
   // Returns the most recent frame that is eligible to be rendered.
   const CompositorFrame* GetEligibleFrame();
@@ -90,7 +90,7 @@
   SurfaceId surface_id_;
   base::WeakPtr<SurfaceFactory> factory_;
   // TODO(jamesr): Support multiple frames in flight.
-  scoped_ptr<CompositorFrame> current_frame_;
+  std::unique_ptr<CompositorFrame> current_frame_;
   int frame_index_;
   bool destroyed_;
   std::vector<SurfaceSequence> destruction_dependencies_;
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 4c7e04e..1ef8fbe 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -11,6 +11,7 @@
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/base/math_util.h"
@@ -30,8 +31,9 @@
 
 void MoveMatchingRequests(
     RenderPassId id,
-    std::multimap<RenderPassId, scoped_ptr<CopyOutputRequest>>* copy_requests,
-    std::vector<scoped_ptr<CopyOutputRequest>>* output_requests) {
+    std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>>*
+        copy_requests,
+    std::vector<std::unique_ptr<CopyOutputRequest>>* output_requests) {
   auto request_range = copy_requests->equal_range(id);
   for (auto it = request_range.first; it != request_range.second; ++it) {
     DCHECK(it->second);
@@ -120,7 +122,7 @@
 
 RenderPassId SurfaceAggregator::RemapPassId(RenderPassId surface_local_pass_id,
                                             SurfaceId surface_id) {
-  scoped_ptr<RenderPassIdAllocator>& allocator =
+  std::unique_ptr<RenderPassIdAllocator>& allocator =
       render_pass_allocator_map_[surface_id];
   if (!allocator)
     allocator.reset(new RenderPassIdAllocator(&next_render_pass_id_));
@@ -181,7 +183,7 @@
   if (!frame_data)
     return;
 
-  std::multimap<RenderPassId, scoped_ptr<CopyOutputRequest>> copy_requests;
+  std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>> copy_requests;
   surface->TakeCopyOutputRequests(&copy_requests);
 
   const RenderPassList& render_pass_list = frame_data->render_pass_list;
@@ -209,7 +211,8 @@
 
     size_t sqs_size = source.shared_quad_state_list.size();
     size_t dq_size = source.quad_list.size();
-    scoped_ptr<RenderPass> copy_pass(RenderPass::Create(sqs_size, dq_size));
+    std::unique_ptr<RenderPass> copy_pass(
+        RenderPass::Create(sqs_size, dq_size));
 
     RenderPassId remapped_pass_id = RemapPassId(source.id, surface_id);
 
@@ -424,7 +427,7 @@
                                    Surface* surface) {
   // The root surface is allowed to have copy output requests, so grab them
   // off its render passes.
-  std::multimap<RenderPassId, scoped_ptr<CopyOutputRequest>> copy_requests;
+  std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>> copy_requests;
   surface->TakeCopyOutputRequests(&copy_requests);
 
   const RenderPassList& source_pass_list = frame_data->render_pass_list;
@@ -443,7 +446,8 @@
 
     size_t sqs_size = source.shared_quad_state_list.size();
     size_t dq_size = source.quad_list.size();
-    scoped_ptr<RenderPass> copy_pass(RenderPass::Create(sqs_size, dq_size));
+    std::unique_ptr<RenderPass> copy_pass(
+        RenderPass::Create(sqs_size, dq_size));
 
     MoveMatchingRequests(source.id, &copy_requests, &copy_pass->copy_requests);
 
@@ -643,7 +647,8 @@
   }
 }
 
-scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(SurfaceId surface_id) {
+std::unique_ptr<CompositorFrame> SurfaceAggregator::Aggregate(
+    SurfaceId surface_id) {
   Surface* surface = manager_->GetSurfaceForId(surface_id);
   DCHECK(surface);
   contained_surfaces_[surface_id] = surface->frame_index();
@@ -652,8 +657,8 @@
     return nullptr;
   TRACE_EVENT0("cc", "SurfaceAggregator::Aggregate");
 
-  scoped_ptr<CompositorFrame> frame(new CompositorFrame);
-  frame->delegated_frame_data = make_scoped_ptr(new DelegatedFrameData);
+  std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
+  frame->delegated_frame_data = base::WrapUnique(new DelegatedFrameData);
 
   DCHECK(root_surface_frame->delegated_frame_data);
 
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index 9360ed9e..6499123 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -5,12 +5,12 @@
 #ifndef CC_SURFACES_SURFACE_AGGREGATOR_H_
 #define CC_SURFACES_SURFACE_AGGREGATOR_H_
 
+#include <memory>
 #include <set>
 #include <unordered_map>
 #include <unordered_set>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/quads/draw_quad.h"
 #include "cc/quads/render_pass.h"
@@ -36,7 +36,7 @@
                     bool aggregate_only_damaged);
   ~SurfaceAggregator();
 
-  scoped_ptr<CompositorFrame> Aggregate(SurfaceId surface_id);
+  std::unique_ptr<CompositorFrame> Aggregate(SurfaceId surface_id);
   void ReleaseResources(SurfaceId surface_id);
   SurfaceIndexMap& previous_contained_surfaces() {
     return previous_contained_surfaces_;
@@ -106,7 +106,7 @@
   class RenderPassIdAllocator;
   using RenderPassIdAllocatorMap =
       std::unordered_map<SurfaceId,
-                         scoped_ptr<RenderPassIdAllocator>,
+                         std::unique_ptr<RenderPassIdAllocator>,
                          SurfaceIdHash>;
   RenderPassIdAllocatorMap render_pass_allocator_map_;
   int next_render_pass_id_;
diff --git a/cc/surfaces/surface_aggregator_perftest.cc b/cc/surfaces/surface_aggregator_perftest.cc
index b79bd881..e09de6b2 100644
--- a/cc/surfaces/surface_aggregator_perftest.cc
+++ b/cc/surfaces/surface_aggregator_perftest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/memory/ptr_util.h"
 #include "cc/debug/lap_timer.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/delegated_frame_data.h"
@@ -31,7 +32,7 @@
  public:
   SurfaceAggregatorPerfTest() : factory_(&manager_, &empty_client_) {
     output_surface_ = FakeOutputSurface::CreateSoftware(
-        make_scoped_ptr(new SoftwareOutputDevice));
+        base::WrapUnique(new SoftwareOutputDevice));
     output_surface_->BindToClient(&output_surface_client_);
     shared_bitmap_manager_.reset(new TestSharedBitmapManager);
 
@@ -49,8 +50,8 @@
                                             optimize_damage));
     for (int i = 1; i <= num_surfaces; i++) {
       factory_.Create(SurfaceId(i));
-      scoped_ptr<RenderPass> pass(RenderPass::Create());
-      scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+      std::unique_ptr<RenderPass> pass(RenderPass::Create());
+      std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
 
       SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
       for (int j = 0; j < num_textures; j++) {
@@ -89,7 +90,7 @@
       }
 
       frame_data->render_pass_list.push_back(std::move(pass));
-      scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+      std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
       frame->delegated_frame_data = std::move(frame_data);
       factory_.SubmitCompositorFrame(SurfaceId(i), std::move(frame),
                                      SurfaceFactory::DrawCallback());
@@ -98,8 +99,8 @@
     factory_.Create(SurfaceId(num_surfaces + 1));
     timer_.Reset();
     do {
-      scoped_ptr<RenderPass> pass(RenderPass::Create());
-      scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+      std::unique_ptr<RenderPass> pass(RenderPass::Create());
+      std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
 
       SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
       SurfaceDrawQuad* surface_quad =
@@ -113,13 +114,13 @@
         pass->damage_rect = gfx::Rect(0, 0, 1, 1);
 
       frame_data->render_pass_list.push_back(std::move(pass));
-      scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+      std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
       frame->delegated_frame_data = std::move(frame_data);
       factory_.SubmitCompositorFrame(SurfaceId(num_surfaces + 1),
                                      std::move(frame),
                                      SurfaceFactory::DrawCallback());
 
-      scoped_ptr<CompositorFrame> aggregated =
+      std::unique_ptr<CompositorFrame> aggregated =
           aggregator_->Aggregate(SurfaceId(num_surfaces + 1));
       timer_.NextLap();
     } while (!timer_.HasTimeLimitExpired());
@@ -137,10 +138,10 @@
   EmptySurfaceFactoryClient empty_client_;
   SurfaceFactory factory_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<SurfaceAggregator> aggregator_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<SurfaceAggregator> aggregator_;
   LapTimer timer_;
 };
 
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index dca531d8..2fab3d4f 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -10,6 +10,7 @@
 #include <utility>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/delegated_frame_data.h"
 #include "cc/quads/render_pass.h"
@@ -81,7 +82,7 @@
   SurfaceId one_id(7);
   factory_.Create(one_id);
 
-  scoped_ptr<CompositorFrame> frame = aggregator_.Aggregate(one_id);
+  std::unique_ptr<CompositorFrame> frame = aggregator_.Aggregate(one_id);
   EXPECT_FALSE(frame);
 
   factory_.Destroy(one_id);
@@ -112,7 +113,7 @@
                           size_t expected_pass_count,
                           SurfaceId* surface_ids,
                           size_t expected_surface_count) {
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -140,10 +141,10 @@
   }
 
   void SubmitPassListAsFrame(SurfaceId surface_id, RenderPassList* pass_list) {
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     pass_list->swap(frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
 
     factory_.SubmitCompositorFrame(surface_id, std::move(frame),
@@ -158,11 +159,13 @@
     SubmitPassListAsFrame(surface_id, &pass_list);
   }
 
-  void QueuePassAsFrame(scoped_ptr<RenderPass> pass, SurfaceId surface_id) {
-    scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+  void QueuePassAsFrame(std::unique_ptr<RenderPass> pass,
+                        SurfaceId surface_id) {
+    std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+        new DelegatedFrameData);
     delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-    scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
     child_frame->delegated_frame_data = std::move(delegated_frame_data);
 
     factory_.SubmitCompositorFrame(surface_id, std::move(child_frame),
@@ -211,7 +214,7 @@
 
   SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -295,7 +298,7 @@
 
   SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
                         embedded_surface_id);
-  scoped_ptr<CopyOutputRequest> copy_request(
+  std::unique_ptr<CopyOutputRequest> copy_request(
       CopyOutputRequest::CreateEmptyRequest());
   CopyOutputRequest* copy_request_ptr = copy_request.get();
   factory_.RequestCopyOfSurface(embedded_surface_id, std::move(copy_request));
@@ -307,7 +310,7 @@
 
   SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -353,10 +356,10 @@
 
   SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
                         embedded_surface_id);
-  scoped_ptr<CopyOutputRequest> copy_request(
+  std::unique_ptr<CopyOutputRequest> copy_request(
       CopyOutputRequest::CreateEmptyRequest());
   CopyOutputRequest* copy_request_ptr = copy_request.get();
-  scoped_ptr<CopyOutputRequest> copy_request2(
+  std::unique_ptr<CopyOutputRequest> copy_request2(
       CopyOutputRequest::CreateEmptyRequest());
   CopyOutputRequest* copy_request2_ptr = copy_request2.get();
 
@@ -376,17 +379,17 @@
     pass_list[0]->copy_requests.push_back(std::move(copy_request));
     pass_list[1]->copy_requests.push_back(std::move(copy_request2));
 
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     pass_list.swap(frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
 
     factory_.SubmitCompositorFrame(root_surface_id_, std::move(frame),
                                    SurfaceFactory::DrawCallback());
   }
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -443,7 +446,7 @@
 
   SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
                         embedded_surface_id);
-  scoped_ptr<CopyOutputRequest> copy_request(
+  std::unique_ptr<CopyOutputRequest> copy_request(
       CopyOutputRequest::CreateEmptyRequest());
   CopyOutputRequest* copy_request_ptr = copy_request.get();
   factory_.RequestCopyOfSurface(embedded_surface_id, std::move(copy_request));
@@ -459,11 +462,11 @@
       test::Pass(parent_quads, arraysize(parent_quads))};
 
   {
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()),
               parent_passes, arraysize(parent_passes));
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
     frame->metadata.referenced_surfaces.push_back(embedded_surface_id);
 
@@ -476,11 +479,11 @@
   test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))};
 
   {
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     AddPasses(&frame_data->render_pass_list, gfx::Rect(SurfaceSize()),
               root_passes, arraysize(root_passes));
 
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
     frame->metadata.referenced_surfaces.push_back(parent_surface_id);
     // Reference to Surface ID of a Surface that doesn't exist should be
@@ -491,7 +494,7 @@
                                    SurfaceFactory::DrawCallback());
   }
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -559,7 +562,7 @@
 
   SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -795,7 +798,7 @@
   SubmitCompositorFrame(parent_passes, arraysize(parent_passes),
                         root_surface_id_);
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -895,7 +898,7 @@
   RenderPassId pass_id(1, 1);
   SurfaceId grandchild_surface_id = allocator_.GenerateId();
   factory_.Create(grandchild_surface_id);
-  scoped_ptr<RenderPass> grandchild_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> grandchild_pass = RenderPass::Create();
   gfx::Rect output_rect(SurfaceSize());
   gfx::Rect damage_rect(SurfaceSize());
   gfx::Transform transform_to_root_target;
@@ -908,7 +911,7 @@
   SurfaceId child_one_surface_id = allocator_.GenerateId();
   factory_.Create(child_one_surface_id);
 
-  scoped_ptr<RenderPass> child_one_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> child_one_pass = RenderPass::Create();
   child_one_pass->SetNew(
       pass_id, output_rect, damage_rect, transform_to_root_target);
   AddSolidColorQuadWithBlendMode(
@@ -926,14 +929,14 @@
   SurfaceId child_two_surface_id = allocator_.GenerateId();
   factory_.Create(child_two_surface_id);
 
-  scoped_ptr<RenderPass> child_two_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> child_two_pass = RenderPass::Create();
   child_two_pass->SetNew(
       pass_id, output_rect, damage_rect, transform_to_root_target);
   AddSolidColorQuadWithBlendMode(
       SurfaceSize(), child_two_pass.get(), blend_modes[5]);
   QueuePassAsFrame(std::move(child_two_pass), child_two_surface_id);
 
-  scoped_ptr<RenderPass> root_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> root_pass = RenderPass::Create();
   root_pass->SetNew(
       pass_id, output_rect, damage_rect, transform_to_root_target);
 
@@ -958,7 +961,7 @@
 
   QueuePassAsFrame(std::move(root_pass), root_surface_id_);
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -1035,10 +1038,11 @@
     child_root_pass_sqs->is_clipped = true;
     child_root_pass_sqs->clip_rect = gfx::Rect(0, 0, 5, 5);
 
-    scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> child_frame_data(
+        new DelegatedFrameData);
     child_pass_list.swap(child_frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
     child_frame->delegated_frame_data = std::move(child_frame_data);
 
     factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
@@ -1066,10 +1070,11 @@
         middle_root_pass->shared_quad_state_list.front();
     middle_root_pass_sqs->quad_to_target_transform.Scale(2, 3);
 
-    scoped_ptr<DelegatedFrameData> middle_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> middle_frame_data(
+        new DelegatedFrameData);
     middle_pass_list.swap(middle_frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> middle_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> middle_frame(new CompositorFrame);
     middle_frame->delegated_frame_data = std::move(middle_frame_data);
 
     factory_.SubmitCompositorFrame(middle_surface_id, std::move(middle_frame),
@@ -1102,16 +1107,16 @@
 
   root_pass_list[0]->transform_to_root_target.Translate(10, 5);
 
-  scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
+  std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
   root_pass_list.swap(root_frame_data->render_pass_list);
 
-  scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
   root_frame->delegated_frame_data = std::move(root_frame_data);
 
   factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
                                  SurfaceFactory::DrawCallback());
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -1209,10 +1214,10 @@
       child_root_pass->shared_quad_state_list.front();
   child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
 
-  scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
+  std::unique_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
   child_pass_list.swap(child_frame_data->render_pass_list);
 
-  scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
   child_frame->delegated_frame_data = std::move(child_frame_data);
 
   SurfaceId child_surface_id = allocator_.GenerateId();
@@ -1234,11 +1239,11 @@
 
   // Parent surface is only used to test if the transform is applied correctly
   // to the child surface's damage.
-  scoped_ptr<DelegatedFrameData> parent_surface_frame_data(
+  std::unique_ptr<DelegatedFrameData> parent_surface_frame_data(
       new DelegatedFrameData);
   parent_surface_pass_list.swap(parent_surface_frame_data->render_pass_list);
 
-  scoped_ptr<CompositorFrame> parent_surface_frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> parent_surface_frame(new CompositorFrame);
   parent_surface_frame->delegated_frame_data =
       std::move(parent_surface_frame_data);
 
@@ -1271,16 +1276,16 @@
   root_pass_list[0]->damage_rect = gfx::Rect(5, 5, 10, 10);
   root_pass_list[1]->damage_rect = gfx::Rect(5, 5, 100, 100);
 
-  scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
+  std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
   root_pass_list.swap(root_frame_data->render_pass_list);
 
-  scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
   root_frame->delegated_frame_data = std::move(root_frame_data);
 
   factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
                                  SurfaceFactory::DrawCallback());
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -1308,16 +1313,17 @@
     child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
     child_root_pass->damage_rect = gfx::Rect(10, 10, 10, 10);
 
-    scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> child_frame_data(
+        new DelegatedFrameData);
     child_pass_list.swap(child_frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
     child_frame->delegated_frame_data = std::move(child_frame_data);
 
     factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
                                    SurfaceFactory::DrawCallback());
 
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1348,10 +1354,10 @@
         ->quad_to_target_transform.Translate(0, 10);
     root_pass_list[0]->damage_rect = gfx::Rect(0, 0, 1, 1);
 
-    scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
     root_pass_list.swap(root_frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
     root_frame->delegated_frame_data = std::move(root_frame_data);
 
     factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
@@ -1370,16 +1376,16 @@
         ->quad_to_target_transform.Translate(0, 10);
     root_pass_list[0]->damage_rect = gfx::Rect(1, 1, 1, 1);
 
-    scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
     root_pass_list.swap(root_frame_data->render_pass_list);
 
-    scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
     root_frame->delegated_frame_data = std::move(root_frame_data);
 
     factory_.SubmitCompositorFrame(root_surface_id_, std::move(root_frame),
                                    SurfaceFactory::DrawCallback());
 
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1400,7 +1406,7 @@
 
   // No Surface changed, so no damage should be given.
   {
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1420,7 +1426,7 @@
   // marked as damaged.
   {
     aggregator_.SetFullDamageForSurface(root_surface_id_);
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1496,7 +1502,7 @@
     SubmitPassListAsFrame(root_surface_id_, &root_pass_list);
   }
 
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator_.Aggregate(root_surface_id_);
 
   ASSERT_TRUE(aggregated_frame);
@@ -1531,7 +1537,7 @@
   }
 
   {
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1586,7 +1592,7 @@
   }
 
   {
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1610,7 +1616,7 @@
   }
 
   {
-    scoped_ptr<CompositorFrame> aggregated_frame =
+    std::unique_ptr<CompositorFrame> aggregated_frame =
         aggregator_.Aggregate(root_surface_id_);
 
     ASSERT_TRUE(aggregated_frame);
@@ -1634,7 +1640,7 @@
  public:
   void SetUp() override {
     output_surface_ = FakeOutputSurface::CreateSoftware(
-        make_scoped_ptr(new SoftwareOutputDevice));
+        base::WrapUnique(new SoftwareOutputDevice));
     output_surface_->BindToClient(&output_surface_client_);
     shared_bitmap_manager_.reset(new TestSharedBitmapManager);
 
@@ -1648,10 +1654,10 @@
  protected:
   SurfaceManager manager_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<SurfaceAggregator> aggregator_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<SurfaceAggregator> aggregator_;
 };
 
 class ResourceTrackingSurfaceFactoryClient : public SurfaceFactoryClient {
@@ -1681,8 +1687,8 @@
                                         SurfaceId child_id,
                                         SurfaceFactory* factory,
                                         SurfaceId surface_id) {
-  scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->id = RenderPassId(1, 1);
   SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
   sqs->opacity = 1.f;
@@ -1717,7 +1723,7 @@
                  nearest_neighbor);
   }
   frame_data->render_pass_list.push_back(std::move(pass));
-  scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
   frame->delegated_frame_data = std::move(frame_data);
   factory->SubmitCompositorFrame(surface_id, std::move(frame),
                                  SurfaceFactory::DrawCallback());
@@ -1733,7 +1739,7 @@
   SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(),
                                      &factory, surface_id);
 
-  scoped_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface_id);
+  std::unique_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface_id);
 
   // Nothing should be available to be returned yet.
   EXPECT_TRUE(client.returned_resources().empty());
@@ -1759,8 +1765,8 @@
   SurfaceId surface_id(7u);
   factory.Create(surface_id);
 
-  scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->id = RenderPassId(1, 1);
   TransferableResource resource;
   resource.id = 11;
@@ -1769,12 +1775,12 @@
   resource.is_software = false;
   frame_data->resource_list.push_back(resource);
   frame_data->render_pass_list.push_back(std::move(pass));
-  scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
   frame->delegated_frame_data = std::move(frame_data);
   factory.SubmitCompositorFrame(surface_id, std::move(frame),
                                 SurfaceFactory::DrawCallback());
 
-  scoped_ptr<CompositorFrame> returned_frame =
+  std::unique_ptr<CompositorFrame> returned_frame =
       aggregator_->Aggregate(surface_id);
 
   // Nothing should be available to be returned yet.
@@ -1804,7 +1810,7 @@
   SubmitCompositorFrameWithResources(ids2, arraysize(ids2), true, SurfaceId(),
                                      &factory, surface2_id);
 
-  scoped_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface1_id);
+  std::unique_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface1_id);
 
   SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory,
                                      surface1_id);
@@ -1853,7 +1859,7 @@
                                      middle_surface_id, &factory,
                                      root_surface_id);
 
-  scoped_ptr<CompositorFrame> frame;
+  std::unique_ptr<CompositorFrame> frame;
   frame = aggregator_->Aggregate(root_surface_id);
 
   RenderPassList* pass_list = &frame->delegated_frame_data->render_pass_list;
diff --git a/cc/surfaces/surface_display_output_surface.cc b/cc/surfaces/surface_display_output_surface.cc
index dfb491e..396f7bb 100644
--- a/cc/surfaces/surface_display_output_surface.cc
+++ b/cc/surfaces/surface_display_output_surface.cc
@@ -63,7 +63,7 @@
 
   client_->DidSwapBuffers();
 
-  scoped_ptr<CompositorFrame> frame_copy(new CompositorFrame());
+  std::unique_ptr<CompositorFrame> frame_copy(new CompositorFrame());
   frame->AssignTo(frame_copy.get());
   factory_.SubmitCompositorFrame(
       surface_id_, std::move(frame_copy),
diff --git a/cc/surfaces/surface_display_output_surface_unittest.cc b/cc/surfaces/surface_display_output_surface_unittest.cc
index 367891cd..de06bd3 100644
--- a/cc/surfaces/surface_display_output_surface_unittest.cc
+++ b/cc/surfaces/surface_display_output_surface_unittest.cc
@@ -79,11 +79,11 @@
   ~SurfaceDisplayOutputSurfaceTest() override {}
 
   void SwapBuffersWithDamage(const gfx::Rect& damage_rect_) {
-    scoped_ptr<RenderPass> render_pass(RenderPass::Create());
+    std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
     render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect_,
                         gfx::Transform());
 
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     frame_data->render_pass_list.push_back(std::move(render_pass));
 
     CompositorFrame frame;
@@ -102,7 +102,7 @@
   }
 
  protected:
-  scoped_ptr<base::SimpleTestTickClock> now_src_;
+  std::unique_ptr<base::SimpleTestTickClock> now_src_;
   scoped_refptr<OrderedSimpleTaskRunner> task_runner_;
   SurfaceIdAllocator allocator_;
 
diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
index d7f4810d..0cbe9d5c 100644
--- a/cc/surfaces/surface_factory.cc
+++ b/cc/surfaces/surface_factory.cc
@@ -38,7 +38,7 @@
 }
 
 void SurfaceFactory::Create(SurfaceId surface_id) {
-  scoped_ptr<Surface> surface(new Surface(surface_id, this));
+  std::unique_ptr<Surface> surface(new Surface(surface_id, this));
   manager_->RegisterSurface(surface.get());
   DCHECK(!surface_map_.count(surface_id));
   surface_map_[surface_id] = std::move(surface);
@@ -48,14 +48,15 @@
   OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
   DCHECK(it != surface_map_.end());
   DCHECK(it->second->factory().get() == this);
-  scoped_ptr<Surface> surface(std::move(it->second));
+  std::unique_ptr<Surface> surface(std::move(it->second));
   surface_map_.erase(it);
   manager_->Destroy(std::move(surface));
 }
 
-void SurfaceFactory::SubmitCompositorFrame(SurfaceId surface_id,
-                                           scoped_ptr<CompositorFrame> frame,
-                                           const DrawCallback& callback) {
+void SurfaceFactory::SubmitCompositorFrame(
+    SurfaceId surface_id,
+    std::unique_ptr<CompositorFrame> frame,
+    const DrawCallback& callback) {
   TRACE_EVENT0("cc", "SurfaceFactory::SubmitCompositorFrame");
   OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
   DCHECK(it != surface_map_.end());
@@ -69,7 +70,7 @@
 
 void SurfaceFactory::RequestCopyOfSurface(
     SurfaceId surface_id,
-    scoped_ptr<CopyOutputRequest> copy_request) {
+    std::unique_ptr<CopyOutputRequest> copy_request) {
   OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
   if (it == surface_map_.end()) {
     copy_request->SendEmptyResult();
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 742cc2a..eee51bf 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -5,12 +5,12 @@
 #ifndef CC_SURFACES_SURFACE_FACTORY_H_
 #define CC_SURFACES_SURFACE_FACTORY_H_
 
+#include <memory>
 #include <set>
 #include <unordered_map>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "cc/output/compositor_frame.h"
@@ -54,10 +54,10 @@
   // The callback is called the first time this frame is used to draw, or if
   // the frame is discarded.
   void SubmitCompositorFrame(SurfaceId surface_id,
-                             scoped_ptr<CompositorFrame> frame,
+                             std::unique_ptr<CompositorFrame> frame,
                              const DrawCallback& callback);
   void RequestCopyOfSurface(SurfaceId surface_id,
-                            scoped_ptr<CopyOutputRequest> copy_request);
+                            std::unique_ptr<CopyOutputRequest> copy_request);
 
   void WillDrawSurface(SurfaceId id, const gfx::Rect& damage_rect);
 
@@ -83,7 +83,7 @@
   bool needs_sync_points_;
 
   using OwningSurfaceMap =
-      std::unordered_map<SurfaceId, scoped_ptr<Surface>, SurfaceIdHash>;
+      std::unordered_map<SurfaceId, std::unique_ptr<Surface>, SurfaceIdHash>;
   OwningSurfaceMap surface_map_;
 
   DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index a48d669..1d7a8b92 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -69,14 +69,14 @@
 
   void SubmitCompositorFrameWithResources(ResourceId* resource_ids,
                                           size_t num_resource_ids) {
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     for (size_t i = 0u; i < num_resource_ids; ++i) {
       TransferableResource resource;
       resource.id = resource_ids[i];
       resource.mailbox_holder.texture_target = GL_TEXTURE_2D;
       frame_data->resource_list.push_back(resource);
     }
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->delegated_frame_data = std::move(frame_data);
     factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
                                     SurfaceFactory::DrawCallback());
@@ -118,7 +118,7 @@
  protected:
   SurfaceManager manager_;
   TestSurfaceFactoryClient client_;
-  scoped_ptr<SurfaceFactory> factory_;
+  std::unique_ptr<SurfaceFactory> factory_;
   SurfaceId surface_id_;
 };
 
@@ -394,7 +394,7 @@
   Surface* surface = manager_.GetSurfaceForId(surface_id);
   ASSERT_NE(nullptr, surface);
   EXPECT_EQ(2, surface->frame_index());
-  scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
   frame->delegated_frame_data.reset(new DelegatedFrameData);
 
   factory_->SubmitCompositorFrame(surface_id, std::move(frame),
@@ -415,12 +415,12 @@
   SurfaceId id(7);
   factory_->Create(id);
 
-  scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+  std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
   TransferableResource resource;
   resource.id = 1;
   resource.mailbox_holder.texture_target = GL_TEXTURE_2D;
   frame_data->resource_list.push_back(resource);
-  scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
   frame->delegated_frame_data = std::move(frame_data);
   uint32_t execute_count = 0;
   SurfaceDrawStatus drawn = SurfaceDrawStatus::DRAW_SKIPPED;
@@ -445,8 +445,8 @@
       ->AddDestructionDependency(SurfaceSequence(0, 4));
   factory_->Destroy(id2);
 
-  scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
-  scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+  std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+  std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
   frame->metadata.satisfies_sequences.push_back(6);
   frame->metadata.satisfies_sequences.push_back(4);
   frame->delegated_frame_data = std::move(frame_data);
@@ -497,10 +497,10 @@
 
   // Give id2 a frame that references surface_id_.
   {
-    scoped_ptr<RenderPass> render_pass(RenderPass::Create());
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     frame_data->render_pass_list.push_back(std::move(render_pass));
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->metadata.referenced_surfaces.push_back(surface_id_);
     frame->delegated_frame_data = std::move(frame_data);
     factory_->SubmitCompositorFrame(id2, std::move(frame),
@@ -510,10 +510,10 @@
 
   // Give surface_id_ a frame that references id2.
   {
-    scoped_ptr<RenderPass> render_pass(RenderPass::Create());
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     frame_data->render_pass_list.push_back(std::move(render_pass));
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->metadata.referenced_surfaces.push_back(id2);
     frame->delegated_frame_data = std::move(frame_data);
     factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
@@ -538,16 +538,16 @@
 }
 
 void CopyRequestTestCallback(bool* called,
-                             scoped_ptr<CopyOutputResult> result) {
+                             std::unique_ptr<CopyOutputResult> result) {
   *called = true;
 }
 
 TEST_F(SurfaceFactoryTest, DuplicateCopyRequest) {
   {
-    scoped_ptr<RenderPass> render_pass(RenderPass::Create());
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
     frame_data->render_pass_list.push_back(std::move(render_pass));
-    scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
     frame->metadata.referenced_surfaces.push_back(surface_id_);
     frame->delegated_frame_data = std::move(frame_data);
     factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
@@ -557,7 +557,7 @@
   void* source2 = &source2;
 
   bool called1 = false;
-  scoped_ptr<CopyOutputRequest> request;
+  std::unique_ptr<CopyOutputRequest> request;
   request = CopyOutputRequest::CreateRequest(
       base::Bind(&CopyRequestTestCallback, &called1));
   request->set_source(source1);
diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
index 9c1309c4..fec6509 100644
--- a/cc/surfaces/surface_hittest_unittest.cc
+++ b/cc/surfaces/surface_hittest_unittest.cc
@@ -66,7 +66,7 @@
   // Creates a root surface.
   gfx::Rect root_rect(300, 300);
   RenderPass* root_pass = nullptr;
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrame(root_rect, &root_pass);
 
   // Add a reference to a non-existant child surface on the root surface.
@@ -107,7 +107,7 @@
   // Creates a root surface.
   gfx::Rect root_rect(300, 300);
   RenderPass* root_pass = nullptr;
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrame(root_rect, &root_pass);
 
   // Submit the root frame.
@@ -138,7 +138,7 @@
   // Creates a root surface.
   gfx::Rect root_rect(300, 300);
   RenderPass* root_pass = nullptr;
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrame(root_rect, &root_pass);
 
   // Add a reference to the child surface on the root surface.
@@ -163,7 +163,7 @@
 
   // Creates a child surface.
   RenderPass* child_pass = nullptr;
-  scoped_ptr<CompositorFrame> child_frame =
+  std::unique_ptr<CompositorFrame> child_frame =
       CreateCompositorFrame(child_rect, &child_pass);
 
   // Add a solid quad in the child surface.
@@ -271,7 +271,7 @@
   // Creates a root surface.
   gfx::Rect root_rect(300, 300);
   RenderPass* root_pass = nullptr;
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrame(root_rect, &root_pass);
 
   // Create a RenderPassDrawQuad to a non-existant RenderPass.
@@ -303,7 +303,7 @@
 
   // Creates a child surface.
   RenderPass* child_pass = nullptr;
-  scoped_ptr<CompositorFrame> child_frame =
+  std::unique_ptr<CompositorFrame> child_frame =
       CreateCompositorFrame(child_rect, &child_pass);
 
   // Add a solid quad in the child surface.
@@ -392,7 +392,7 @@
                    &render_pass_list);
 
   RenderPass* root_pass = nullptr;
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrameWithRenderPassList(&render_pass_list);
   root_pass = root_frame->delegated_frame_data->render_pass_list.back().get();
 
@@ -477,7 +477,7 @@
   // Creates a root surface.
   gfx::Rect root_rect(300, 300);
   RenderPass* root_pass = nullptr;
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrame(root_rect, &root_pass);
 
   // Add a reference to the child surface on the root surface.
@@ -501,7 +501,7 @@
 
   // Creates a child surface.
   RenderPass* child_pass = nullptr;
-  scoped_ptr<CompositorFrame> child_frame =
+  std::unique_ptr<CompositorFrame> child_frame =
       CreateCompositorFrame(child_rect, &child_pass);
 
   // Add a solid quad in the child surface.
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
index d22d1e5..babd173 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -57,7 +57,7 @@
   surface_map_.erase(it);
 }
 
-void SurfaceManager::Destroy(scoped_ptr<Surface> surface) {
+void SurfaceManager::Destroy(std::unique_ptr<Surface> surface) {
   DCHECK(thread_checker_.CalledOnValidThread());
   surface->set_destroyed(true);
   surfaces_to_destroy_.push_back(surface.release());
@@ -127,7 +127,7 @@
   for (SurfaceDestroyList::iterator dest_it = surfaces_to_destroy_.begin();
        dest_it != surfaces_to_destroy_.end();) {
     if (!live_surfaces_set.count((*dest_it)->surface_id())) {
-      scoped_ptr<Surface> surf(*dest_it);
+      std::unique_ptr<Surface> surf(*dest_it);
       DeregisterSurface(surf->surface_id());
       dest_it = surfaces_to_destroy_.erase(dest_it);
     } else {
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index 8bf3df89..c0ee515 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -8,12 +8,12 @@
 #include <stdint.h>
 
 #include <list>
+#include <memory>
 #include <unordered_map>
 #include <unordered_set>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/threading/thread_checker.h"
 #include "cc/surfaces/surface_damage_observer.h"
@@ -36,7 +36,7 @@
   void DeregisterSurface(SurfaceId surface_id);
 
   // Destroy the Surface once a set of sequence numbers has been satisfied.
-  void Destroy(scoped_ptr<Surface> surface);
+  void Destroy(std::unique_ptr<Surface> surface);
 
   Surface* GetSurfaceForId(SurfaceId surface_id);
 
diff --git a/cc/surfaces/surfaces_pixeltest.cc b/cc/surfaces/surfaces_pixeltest.cc
index 405a3d8..9af4ed93 100644
--- a/cc/surfaces/surfaces_pixeltest.cc
+++ b/cc/surfaces/surfaces_pixeltest.cc
@@ -58,7 +58,7 @@
 TEST_F(SurfacesPixelTest, DrawSimpleFrame) {
   gfx::Rect rect(device_viewport_size_);
   RenderPassId id(1, 1);
-  scoped_ptr<RenderPass> pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> pass = RenderPass::Create();
   pass->SetNew(id, rect, rect, gfx::Transform());
 
   CreateAndAppendTestSharedQuadState(
@@ -73,10 +73,11 @@
                      SK_ColorGREEN,
                      force_anti_aliasing_off);
 
-  scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+  std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+      new DelegatedFrameData);
   delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-  scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
   root_frame->delegated_frame_data = std::move(delegated_frame_data);
 
   SurfaceId root_surface_id = allocator_.GenerateId();
@@ -85,7 +86,7 @@
                                  SurfaceFactory::DrawCallback());
 
   SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator.Aggregate(root_surface_id);
   factory_.Destroy(root_surface_id);
 
@@ -108,7 +109,7 @@
   {
     gfx::Rect rect(device_viewport_size_);
     RenderPassId id(1, 1);
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->SetNew(id, rect, rect, gfx::Transform());
 
     CreateAndAppendTestSharedQuadState(
@@ -130,10 +131,11 @@
                        SK_ColorYELLOW,
                        force_anti_aliasing_off);
 
-    scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+        new DelegatedFrameData);
     delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-    scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
     root_frame->delegated_frame_data = std::move(delegated_frame_data);
 
     factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
@@ -143,7 +145,7 @@
   {
     gfx::Rect rect(child_size);
     RenderPassId id(1, 1);
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->SetNew(id, rect, rect, gfx::Transform());
 
     CreateAndAppendTestSharedQuadState(
@@ -158,10 +160,11 @@
                        SK_ColorBLUE,
                        force_anti_aliasing_off);
 
-    scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+        new DelegatedFrameData);
     delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-    scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
     child_frame->delegated_frame_data = std::move(delegated_frame_data);
 
     factory_.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
@@ -169,7 +172,7 @@
   }
 
   SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator.Aggregate(root_surface_id);
 
   bool discard_alpha = false;
@@ -204,7 +207,7 @@
   {
     gfx::Rect rect(device_viewport_size_);
     RenderPassId id(1, 1);
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->SetNew(id, rect, rect, gfx::Transform());
 
     gfx::Transform surface_transform;
@@ -229,10 +232,11 @@
                                gfx::Rect(child_size),
                                right_child_id);
 
-    scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+        new DelegatedFrameData);
     delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-    scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
     root_frame->delegated_frame_data = std::move(delegated_frame_data);
 
     factory_.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
@@ -242,7 +246,7 @@
   {
     gfx::Rect rect(child_size);
     RenderPassId id(1, 1);
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->SetNew(id, rect, rect, gfx::Transform());
 
     CreateAndAppendTestSharedQuadState(
@@ -265,10 +269,11 @@
                               SK_ColorBLUE,
                               force_anti_aliasing_off);
 
-    scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+        new DelegatedFrameData);
     delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-    scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
     child_frame->delegated_frame_data = std::move(delegated_frame_data);
 
     factory_.SubmitCompositorFrame(left_child_id, std::move(child_frame),
@@ -278,7 +283,7 @@
   {
     gfx::Rect rect(child_size);
     RenderPassId id(1, 1);
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->SetNew(id, rect, rect, gfx::Transform());
 
     CreateAndAppendTestSharedQuadState(
@@ -301,10 +306,11 @@
                               SK_ColorGREEN,
                               force_anti_aliasing_off);
 
-    scoped_ptr<DelegatedFrameData> delegated_frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> delegated_frame_data(
+        new DelegatedFrameData);
     delegated_frame_data->render_pass_list.push_back(std::move(pass));
 
-    scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
+    std::unique_ptr<CompositorFrame> child_frame(new CompositorFrame);
     child_frame->delegated_frame_data = std::move(delegated_frame_data);
 
     factory_.SubmitCompositorFrame(right_child_id, std::move(child_frame),
@@ -312,7 +318,7 @@
   }
 
   SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
-  scoped_ptr<CompositorFrame> aggregated_frame =
+  std::unique_ptr<CompositorFrame> aggregated_frame =
       aggregator.Aggregate(root_surface_id);
 
   bool discard_alpha = false;
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index 8bed0ee..58d737e 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -4,6 +4,7 @@
 
 #include "cc/test/animation_test_common.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_host.h"
 #include "cc/animation/animation_id_provider.h"
 #include "cc/animation/animation_player.h"
@@ -31,10 +32,10 @@
                          float start_opacity,
                          float end_opacity,
                          bool use_timing_function) {
-  scoped_ptr<KeyframedFloatAnimationCurve>
-      curve(KeyframedFloatAnimationCurve::Create());
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
+      KeyframedFloatAnimationCurve::Create());
 
-  scoped_ptr<TimingFunction> func;
+  std::unique_ptr<TimingFunction> func;
   if (!use_timing_function)
     func = EaseTimingFunction::Create();
   if (duration > 0.0)
@@ -45,7 +46,7 @@
 
   int id = AnimationIdProvider::NextAnimationId();
 
-  scoped_ptr<Animation> animation(Animation::Create(
+  std::unique_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
       TargetProperty::OPACITY));
   animation->set_needs_synchronized_start_time(true);
@@ -59,8 +60,8 @@
                          double duration,
                          TransformOperations start_operations,
                          TransformOperations operations) {
-  scoped_ptr<KeyframedTransformAnimationCurve>
-      curve(KeyframedTransformAnimationCurve::Create());
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
+      KeyframedTransformAnimationCurve::Create());
 
   if (duration > 0.0) {
     curve->AddKeyframe(TransformKeyframe::Create(base::TimeDelta(),
@@ -72,7 +73,7 @@
 
   int id = AnimationIdProvider::NextAnimationId();
 
-  scoped_ptr<Animation> animation(Animation::Create(
+  std::unique_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
       TargetProperty::TRANSFORM));
   animation->set_needs_synchronized_start_time(true);
@@ -101,8 +102,8 @@
                       double duration,
                       float start_brightness,
                       float end_brightness) {
-  scoped_ptr<KeyframedFilterAnimationCurve>
-      curve(KeyframedFilterAnimationCurve::Create());
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
+      KeyframedFilterAnimationCurve::Create());
 
   if (duration > 0.0) {
     FilterOperations start_filters;
@@ -119,7 +120,7 @@
 
   int id = AnimationIdProvider::NextAnimationId();
 
-  scoped_ptr<Animation> animation(Animation::Create(
+  std::unique_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
       TargetProperty::FILTER));
   animation->set_needs_synchronized_start_time(true);
@@ -146,8 +147,8 @@
   return 0.0f;
 }
 
-scoped_ptr<AnimationCurve> FakeFloatAnimationCurve::Clone() const {
-  return make_scoped_ptr(new FakeFloatAnimationCurve);
+std::unique_ptr<AnimationCurve> FakeFloatAnimationCurve::Clone() const {
+  return base::WrapUnique(new FakeFloatAnimationCurve);
 }
 
 FakeTransformTransition::FakeTransformTransition(double duration)
@@ -189,8 +190,8 @@
   return true;
 }
 
-scoped_ptr<AnimationCurve> FakeTransformTransition::Clone() const {
-  return make_scoped_ptr(new FakeTransformTransition(*this));
+std::unique_ptr<AnimationCurve> FakeTransformTransition::Clone() const {
+  return base::WrapUnique(new FakeTransformTransition(*this));
 }
 
 FakeFloatTransition::FakeFloatTransition(double duration, float from, float to)
@@ -258,8 +259,8 @@
   return scroll_offset_;
 }
 
-scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const {
-  return make_scoped_ptr(new FakeFloatTransition(*this));
+std::unique_ptr<AnimationCurve> FakeFloatTransition::Clone() const {
+  return base::WrapUnique(new FakeFloatTransition(*this));
 }
 
 int AddOpacityTransitionToController(LayerAnimationController* controller,
@@ -327,10 +328,10 @@
                                 float start_opacity,
                                 float end_opacity,
                                 int num_steps) {
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
 
-  scoped_ptr<TimingFunction> func =
+  std::unique_ptr<TimingFunction> func =
       StepsTimingFunction::Create(num_steps, 0.5f);
   if (duration > 0.0)
     curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), start_opacity,
@@ -340,7 +341,7 @@
 
   int id = AnimationIdProvider::NextAnimationId();
 
-  scoped_ptr<Animation> animation(Animation::Create(
+  std::unique_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
       TargetProperty::OPACITY));
   animation->set_needs_synchronized_start_time(true);
@@ -351,7 +352,7 @@
 
 void AddAnimationToLayerWithPlayer(int layer_id,
                                    scoped_refptr<AnimationTimeline> timeline,
-                                   scoped_ptr<Animation> animation) {
+                                   std::unique_ptr<Animation> animation) {
   scoped_refptr<AnimationPlayer> player =
       AnimationPlayer::Create(AnimationIdProvider::NextPlayerId());
   timeline->AttachPlayer(player);
@@ -363,7 +364,7 @@
 void AddAnimationToLayerWithExistingPlayer(
     int layer_id,
     scoped_refptr<AnimationTimeline> timeline,
-    scoped_ptr<Animation> animation) {
+    std::unique_ptr<Animation> animation) {
   LayerAnimationController* controller =
       timeline->animation_host()->GetControllerForLayerId(layer_id);
   DCHECK(controller);
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index 2d47e6d1..b63010e 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -31,7 +31,7 @@
 
   base::TimeDelta Duration() const override;
   float GetValue(base::TimeDelta now) const override;
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
  private:
   base::TimeDelta duration_;
@@ -54,7 +54,7 @@
   bool MaximumTargetScale(bool forward_direction,
                           float* max_scale) const override;
 
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
  private:
   base::TimeDelta duration_;
@@ -68,7 +68,7 @@
   base::TimeDelta Duration() const override;
   float GetValue(base::TimeDelta time) const override;
 
-  scoped_ptr<AnimationCurve> Clone() const override;
+  std::unique_ptr<AnimationCurve> Clone() const override;
 
  private:
   base::TimeDelta duration_;
@@ -173,11 +173,11 @@
 
 void AddAnimationToLayerWithPlayer(int layer_id,
                                    scoped_refptr<AnimationTimeline> timeline,
-                                   scoped_ptr<Animation> animation);
+                                   std::unique_ptr<Animation> animation);
 void AddAnimationToLayerWithExistingPlayer(
     int layer_id,
     scoped_refptr<AnimationTimeline> timeline,
-    scoped_ptr<Animation> animation);
+    std::unique_ptr<Animation> animation);
 
 void RemoveAnimationFromLayerWithExistingPlayer(
     int layer_id,
diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc
index f9417360..8da1721 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -4,6 +4,7 @@
 
 #include "cc/test/animation_timelines_test_common.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_events.h"
 #include "cc/animation/animation_id_provider.h"
 #include "cc/animation/animation_player.h"
@@ -16,8 +17,8 @@
 
 namespace cc {
 
-scoped_ptr<TestLayer> TestLayer::Create() {
-  return make_scoped_ptr(new TestLayer());
+std::unique_ptr<TestLayer> TestLayer::Create() {
+  return base::WrapUnique(new TestLayer());
 }
 
 TestLayer::TestLayer() {
@@ -234,7 +235,7 @@
 void AnimationTimelinesTest::AnimateLayersTransferEvents(
     base::TimeTicks time,
     unsigned expect_events) {
-  scoped_ptr<AnimationEvents> events =
+  std::unique_ptr<AnimationEvents> events =
       host_->animation_registrar()->CreateEvents();
 
   host_impl_->animation_registrar()->AnimateLayers(time);
diff --git a/cc/test/animation_timelines_test_common.h b/cc/test/animation_timelines_test_common.h
index bb409796..e32f13c 100644
--- a/cc/test/animation_timelines_test_common.h
+++ b/cc/test/animation_timelines_test_common.h
@@ -5,9 +5,9 @@
 #ifndef CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_
 #define CC_TEST_ANIMATION_TIMELINES_TEST_COMMON_H_
 
+#include <memory>
 #include <unordered_map>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/animation/animation.h"
 #include "cc/animation/animation_delegate.h"
 #include "cc/animation/animation_host.h"
@@ -19,7 +19,7 @@
 
 class TestLayer {
  public:
-  static scoped_ptr<TestLayer> Create();
+  static std::unique_ptr<TestLayer> Create();
 
   void ClearMutatedProperties();
 
@@ -133,9 +133,10 @@
   TestLayer* FindTestLayer(int layer_id, LayerTreeType tree_type) const;
 
  private:
-  scoped_ptr<AnimationHost> host_;
+  std::unique_ptr<AnimationHost> host_;
 
-  using LayerIdToTestLayer = std::unordered_map<int, scoped_ptr<TestLayer>>;
+  using LayerIdToTestLayer =
+      std::unordered_map<int, std::unique_ptr<TestLayer>>;
   LayerIdToTestLayer layers_in_active_tree_;
   LayerIdToTestLayer layers_in_pending_tree_;
 
@@ -158,7 +159,8 @@
   void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
                                TargetProperty::Type target_property,
                                double animation_start_time,
-                               scoped_ptr<AnimationCurve> curve) override {}
+                               std::unique_ptr<AnimationCurve> curve) override {
+  }
   bool started_;
   bool finished_;
 };
diff --git a/cc/test/cc_test_suite.h b/cc/test/cc_test_suite.h
index 734a256..4e0a114 100644
--- a/cc/test/cc_test_suite.h
+++ b/cc/test/cc_test_suite.h
@@ -5,8 +5,9 @@
 #ifndef CC_TEST_CC_TEST_SUITE_H_
 #define CC_TEST_CC_TEST_SUITE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/test_discardable_memory_allocator.h"
 #include "base/test/test_suite.h"
 
@@ -27,7 +28,7 @@
   void Shutdown() override;
 
  private:
-  scoped_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
 
   base::TestDiscardableMemoryAllocator discardable_memory_allocator_;
   DISALLOW_COPY_AND_ASSIGN(CCTestSuite);
diff --git a/cc/test/fake_channel_impl.cc b/cc/test/fake_channel_impl.cc
index 7d14a70..a694c07 100644
--- a/cc/test/fake_channel_impl.cc
+++ b/cc/test/fake_channel_impl.cc
@@ -9,6 +9,7 @@
 
 FakeChannelImpl::FakeChannelImpl() {}
 
-void FakeChannelImpl::SetAnimationEvents(scoped_ptr<AnimationEvents> queue) {}
+void FakeChannelImpl::SetAnimationEvents(
+    std::unique_ptr<AnimationEvents> queue) {}
 
 }  // namespace cc
diff --git a/cc/test/fake_channel_impl.h b/cc/test/fake_channel_impl.h
index 179cbc5..053a7ad 100644
--- a/cc/test/fake_channel_impl.h
+++ b/cc/test/fake_channel_impl.h
@@ -21,7 +21,7 @@
       const RendererCapabilities& capabilities) override {}
   void BeginMainFrameNotExpectedSoon() override {}
   void DidCommitAndDrawFrame() override {}
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> queue) override;
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> queue) override;
   void DidLoseOutputSurface() override {}
   void RequestNewOutputSurface() override {}
   void DidInitializeOutputSurface(
@@ -29,10 +29,10 @@
       const RendererCapabilities& capabilities) override {}
   void DidCompletePageScaleAnimation() override {}
   void PostFrameTimingEventsOnMain(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override {}
-  void BeginMainFrame(scoped_ptr<BeginMainFrameAndCommitState>
+  void BeginMainFrame(std::unique_ptr<BeginMainFrameAndCommitState>
                           begin_main_frame_state) override {}
 };
 
diff --git a/cc/test/fake_layer_tree_host.cc b/cc/test/fake_layer_tree_host.cc
index 1774f34..2319f95 100644
--- a/cc/test/fake_layer_tree_host.cc
+++ b/cc/test/fake_layer_tree_host.cc
@@ -4,6 +4,7 @@
 
 #include "cc/test/fake_layer_tree_host.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_host.h"
 #include "cc/layers/layer.h"
 #include "cc/test/fake_image_serialization_processor.h"
@@ -29,13 +30,13 @@
   client_->SetLayerTreeHost(this);
 }
 
-scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
+std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
     FakeLayerTreeHostClient* client,
     TestTaskGraphRunner* task_graph_runner) {
   return Create(client, task_graph_runner, LayerTreeSettings());
 }
 
-scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
+std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
     FakeLayerTreeHostClient* client,
     TestTaskGraphRunner* task_graph_runner,
     const LayerTreeSettings& settings) {
@@ -43,7 +44,7 @@
                 CompositorMode::SINGLE_THREADED);
 }
 
-scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
+std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
     FakeLayerTreeHostClient* client,
     TestTaskGraphRunner* task_graph_runner,
     const LayerTreeSettings& settings,
@@ -52,10 +53,10 @@
   params.client = client;
   params.settings = &settings;
   params.task_graph_runner = task_graph_runner;
-  return make_scoped_ptr(new FakeLayerTreeHost(client, &params, mode));
+  return base::WrapUnique(new FakeLayerTreeHost(client, &params, mode));
 }
 
-scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
+std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
     FakeLayerTreeHostClient* client,
     TestTaskGraphRunner* task_graph_runner,
     const LayerTreeSettings& settings,
@@ -66,7 +67,7 @@
   params.settings = &settings;
   params.task_graph_runner = task_graph_runner;
   params.image_serialization_processor = image_serialization_processor;
-  return make_scoped_ptr(new FakeLayerTreeHost(client, &params, mode));
+  return base::WrapUnique(new FakeLayerTreeHost(client, &params, mode));
 }
 
 FakeLayerTreeHost::~FakeLayerTreeHost() {
diff --git a/cc/test/fake_layer_tree_host.h b/cc/test/fake_layer_tree_host.h
index 1218fb48..0255078 100644
--- a/cc/test/fake_layer_tree_host.h
+++ b/cc/test/fake_layer_tree_host.h
@@ -20,25 +20,25 @@
 
 class FakeLayerTreeHost : public LayerTreeHost {
  public:
-  static scoped_ptr<FakeLayerTreeHost> Create(
+  static std::unique_ptr<FakeLayerTreeHost> Create(
       FakeLayerTreeHostClient* client,
       TestTaskGraphRunner* task_graph_runner);
-  static scoped_ptr<FakeLayerTreeHost> Create(
+  static std::unique_ptr<FakeLayerTreeHost> Create(
       FakeLayerTreeHostClient* client,
       TestTaskGraphRunner* task_graph_runner,
       const LayerTreeSettings& settings);
-  static scoped_ptr<FakeLayerTreeHost> Create(
+  static std::unique_ptr<FakeLayerTreeHost> Create(
       FakeLayerTreeHostClient* client,
       TestTaskGraphRunner* task_graph_runner,
       const LayerTreeSettings& settings,
       CompositorMode mode);
-  static scoped_ptr<FakeLayerTreeHost> Create(
+  static std::unique_ptr<FakeLayerTreeHost> Create(
       FakeLayerTreeHostClient* client,
       TestTaskGraphRunner* task_graph_runner,
       const LayerTreeSettings& settings,
       CompositorMode mode,
       InitParams params);
-  static scoped_ptr<FakeLayerTreeHost> Create(
+  static std::unique_ptr<FakeLayerTreeHost> Create(
       FakeLayerTreeHostClient* client,
       TestTaskGraphRunner* task_graph_runner,
       const LayerTreeSettings& settings,
diff --git a/cc/test/fake_layer_tree_host_client.cc b/cc/test/fake_layer_tree_host_client.cc
index 43e6d2ba..6de02bf6 100644
--- a/cc/test/fake_layer_tree_host_client.cc
+++ b/cc/test/fake_layer_tree_host_client.cc
@@ -4,6 +4,7 @@
 
 #include "cc/test/fake_layer_tree_host_client.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/output/context_provider.h"
 #include "cc/test/fake_output_surface.h"
 #include "cc/test/test_web_graphics_context_3d.h"
@@ -23,14 +24,14 @@
 
 void FakeLayerTreeHostClient::RequestNewOutputSurface() {
   DCHECK(host_);
-  scoped_ptr<OutputSurface> surface;
+  std::unique_ptr<OutputSurface> surface;
   if (use_software_rendering_) {
     if (use_delegating_renderer_) {
       surface = FakeOutputSurface::CreateDelegatingSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice));
+          base::WrapUnique(new SoftwareOutputDevice));
     } else {
       surface = FakeOutputSurface::CreateSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice));
+          base::WrapUnique(new SoftwareOutputDevice));
     }
   } else if (use_delegating_renderer_) {
     surface = FakeOutputSurface::CreateDelegating3d();
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h
index 7e2ba030..ecaa8a6 100644
--- a/cc/test/fake_layer_tree_host_client.h
+++ b/cc/test/fake_layer_tree_host_client.h
@@ -5,7 +5,8 @@
 #ifndef CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
 #define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/input/input_handler.h"
 #include "cc/test/test_context_provider.h"
 #include "cc/trees/layer_tree_host_client.h"
@@ -49,8 +50,8 @@
   void DidCompleteSwapBuffers() override {}
   void DidCompletePageScaleAnimation() override {}
   void RecordFrameTimingEvents(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override {}
 
   // LayerTreeHostSingleThreadClient implementation.
diff --git a/cc/test/fake_layer_tree_host_impl_client.cc b/cc/test/fake_layer_tree_host_impl_client.cc
index 29a4d83..dab964f 100644
--- a/cc/test/fake_layer_tree_host_impl_client.cc
+++ b/cc/test/fake_layer_tree_host_impl_client.cc
@@ -12,6 +12,6 @@
 }
 
 void FakeLayerTreeHostImplClient::PostAnimationEventsToMainThreadOnImplThread(
-    scoped_ptr<AnimationEvents> events) {}
+    std::unique_ptr<AnimationEvents> events) {}
 
 }  // namespace cc
diff --git a/cc/test/fake_layer_tree_host_impl_client.h b/cc/test/fake_layer_tree_host_impl_client.h
index cf2525ba..9f0f433 100644
--- a/cc/test/fake_layer_tree_host_impl_client.h
+++ b/cc/test/fake_layer_tree_host_impl_client.h
@@ -31,7 +31,7 @@
   void SetNeedsPrepareTilesOnImplThread() override {}
   void SetVideoNeedsBeginFrames(bool needs_begin_frames) override {}
   void PostAnimationEventsToMainThreadOnImplThread(
-      scoped_ptr<AnimationEvents> events) override;
+      std::unique_ptr<AnimationEvents> events) override;
   bool IsInsideDraw() override;
   void RenewTreePriority() override {}
   void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
@@ -42,8 +42,8 @@
   void DidCompletePageScaleAnimationOnImplThread() override {}
   void OnDrawForOutputSurface(bool resourceless_software_draw) override {}
   void PostFrameTimingEventsOnImplThread(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override {}
 };
 
diff --git a/cc/test/fake_mask_layer_impl.cc b/cc/test/fake_mask_layer_impl.cc
index 96dc672..e76bad2 100644
--- a/cc/test/fake_mask_layer_impl.cc
+++ b/cc/test/fake_mask_layer_impl.cc
@@ -4,15 +4,17 @@
 
 #include "cc/test/fake_mask_layer_impl.h"
 
+#include "base/memory/ptr_util.h"
+
 namespace cc {
 
 FakeMaskLayerImpl::FakeMaskLayerImpl(LayerTreeImpl* tree_impl, int id)
     : LayerImpl(tree_impl, id) {}
 
-scoped_ptr<FakeMaskLayerImpl> FakeMaskLayerImpl::Create(
+std::unique_ptr<FakeMaskLayerImpl> FakeMaskLayerImpl::Create(
     LayerTreeImpl* tree_impl,
     int id) {
-  return make_scoped_ptr(new FakeMaskLayerImpl(tree_impl, id));
+  return base::WrapUnique(new FakeMaskLayerImpl(tree_impl, id));
 }
 
 void FakeMaskLayerImpl::GetContentsResourceId(ResourceId* resource_id,
diff --git a/cc/test/fake_mask_layer_impl.h b/cc/test/fake_mask_layer_impl.h
index 5f3166a1..b4225ba 100644
--- a/cc/test/fake_mask_layer_impl.h
+++ b/cc/test/fake_mask_layer_impl.h
@@ -11,7 +11,8 @@
 
 class FakeMaskLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<FakeMaskLayerImpl> Create(LayerTreeImpl* tree_impl, int id);
+  static std::unique_ptr<FakeMaskLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                   int id);
 
   void GetContentsResourceId(ResourceId* resource_id,
                              gfx::Size* resource_size) const override;
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index a1f77498..f1b59b4 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -42,7 +42,7 @@
 }
 
 FakeOutputSurface::FakeOutputSurface(
-    scoped_ptr<SoftwareOutputDevice> software_device,
+    std::unique_ptr<SoftwareOutputDevice> software_device,
     bool delegated_rendering)
     : OutputSurface(std::move(software_device)),
       client_(NULL),
@@ -56,7 +56,7 @@
 
 FakeOutputSurface::FakeOutputSurface(
     scoped_refptr<ContextProvider> context_provider,
-    scoped_ptr<SoftwareOutputDevice> software_device,
+    std::unique_ptr<SoftwareOutputDevice> software_device,
     bool delegated_rendering)
     : OutputSurface(context_provider, std::move(software_device)),
       client_(NULL),
@@ -145,7 +145,7 @@
 }
 
 void FakeOutputSurface::SetMemoryPolicyToSetAtBind(
-    scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) {
+    std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) {
   memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind);
 }
 
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index a7a68bd..0374a7d4 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/time/time.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/output/compositor_frame.h"
@@ -24,80 +25,80 @@
  public:
   ~FakeOutputSurface() override;
 
-  static scoped_ptr<FakeOutputSurface> Create3d() {
-    return make_scoped_ptr(
+  static std::unique_ptr<FakeOutputSurface> Create3d() {
+    return base::WrapUnique(
         new FakeOutputSurface(TestContextProvider::Create(),
                               TestContextProvider::CreateWorker(), false));
   }
 
-  static scoped_ptr<FakeOutputSurface> Create3d(
+  static std::unique_ptr<FakeOutputSurface> Create3d(
       scoped_refptr<ContextProvider> context_provider) {
-    return make_scoped_ptr(new FakeOutputSurface(
+    return base::WrapUnique(new FakeOutputSurface(
         context_provider, TestContextProvider::CreateWorker(), false));
   }
 
-  static scoped_ptr<FakeOutputSurface> Create3d(
+  static std::unique_ptr<FakeOutputSurface> Create3d(
       scoped_refptr<ContextProvider> context_provider,
       scoped_refptr<ContextProvider> worker_context_provider) {
-    return make_scoped_ptr(new FakeOutputSurface(
+    return base::WrapUnique(new FakeOutputSurface(
         context_provider, worker_context_provider, false));
   }
 
-  static scoped_ptr<FakeOutputSurface> Create3d(
-      scoped_ptr<TestWebGraphicsContext3D> context) {
-    return make_scoped_ptr(
+  static std::unique_ptr<FakeOutputSurface> Create3d(
+      std::unique_ptr<TestWebGraphicsContext3D> context) {
+    return base::WrapUnique(
         new FakeOutputSurface(TestContextProvider::Create(std::move(context)),
                               TestContextProvider::CreateWorker(), false));
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateSoftware(
-      scoped_ptr<SoftwareOutputDevice> software_device) {
-    return make_scoped_ptr(
+  static std::unique_ptr<FakeOutputSurface> CreateSoftware(
+      std::unique_ptr<SoftwareOutputDevice> software_device) {
+    return base::WrapUnique(
         new FakeOutputSurface(std::move(software_device), false));
   }
 
-  static scoped_ptr<FakeOutputSurface>
+  static std::unique_ptr<FakeOutputSurface>
   Create3dWithResourcelessSoftwareSupport() {
-    return make_scoped_ptr(new FakeOutputSurface(
+    return base::WrapUnique(new FakeOutputSurface(
         TestContextProvider::Create(),
-        make_scoped_ptr(new SoftwareOutputDevice), false));
+        base::WrapUnique(new SoftwareOutputDevice), false));
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateDelegating3d() {
-    return make_scoped_ptr(
+  static std::unique_ptr<FakeOutputSurface> CreateDelegating3d() {
+    return base::WrapUnique(
         new FakeOutputSurface(TestContextProvider::Create(),
                               TestContextProvider::CreateWorker(), true));
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateDelegating3d(
+  static std::unique_ptr<FakeOutputSurface> CreateDelegating3d(
       scoped_refptr<TestContextProvider> context_provider) {
-    return make_scoped_ptr(new FakeOutputSurface(
+    return base::WrapUnique(new FakeOutputSurface(
         context_provider, TestContextProvider::CreateWorker(), true));
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateDelegating3d(
-      scoped_ptr<TestWebGraphicsContext3D> context) {
-    return make_scoped_ptr(
+  static std::unique_ptr<FakeOutputSurface> CreateDelegating3d(
+      std::unique_ptr<TestWebGraphicsContext3D> context) {
+    return base::WrapUnique(
         new FakeOutputSurface(TestContextProvider::Create(std::move(context)),
                               TestContextProvider::CreateWorker(), true));
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware(
-      scoped_ptr<SoftwareOutputDevice> software_device) {
-    return make_scoped_ptr(
+  static std::unique_ptr<FakeOutputSurface> CreateDelegatingSoftware(
+      std::unique_ptr<SoftwareOutputDevice> software_device) {
+    return base::WrapUnique(
         new FakeOutputSurface(std::move(software_device), true));
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateNoRequireSyncPoint(
-      scoped_ptr<TestWebGraphicsContext3D> context) {
-    scoped_ptr<FakeOutputSurface> surface(Create3d(std::move(context)));
+  static std::unique_ptr<FakeOutputSurface> CreateNoRequireSyncPoint(
+      std::unique_ptr<TestWebGraphicsContext3D> context) {
+    std::unique_ptr<FakeOutputSurface> surface(Create3d(std::move(context)));
     surface->capabilities_.delegated_sync_points_required = false;
     return surface;
   }
 
-  static scoped_ptr<FakeOutputSurface> CreateOffscreen(
-      scoped_ptr<TestWebGraphicsContext3D> context) {
-    scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface(
+  static std::unique_ptr<FakeOutputSurface> CreateOffscreen(
+      std::unique_ptr<TestWebGraphicsContext3D> context) {
+    std::unique_ptr<FakeOutputSurface> surface(new FakeOutputSurface(
         TestContextProvider::Create(std::move(context)), false));
     surface->capabilities_.uses_default_gl_framebuffer = false;
     return surface;
@@ -144,7 +145,7 @@
   }
 
   void SetMemoryPolicyToSetAtBind(
-      scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind);
+      std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind);
 
   gfx::Rect last_swap_rect() const {
     return last_swap_rect_;
@@ -159,13 +160,12 @@
                     scoped_refptr<ContextProvider> worker_context_provider,
                     bool delegated_rendering);
 
-  FakeOutputSurface(scoped_ptr<SoftwareOutputDevice> software_device,
+  FakeOutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device,
                     bool delegated_rendering);
 
-  FakeOutputSurface(
-      scoped_refptr<ContextProvider> context_provider,
-      scoped_ptr<SoftwareOutputDevice> software_device,
-      bool delegated_rendering);
+  FakeOutputSurface(scoped_refptr<ContextProvider> context_provider,
+                    std::unique_ptr<SoftwareOutputDevice> software_device,
+                    bool delegated_rendering);
 
   OutputSurfaceClient* client_;
   CompositorFrame last_sent_frame_;
@@ -174,7 +174,7 @@
   bool suspended_for_recycle_;
   unsigned framebuffer_;
   TransferableResourceArray resources_held_by_parent_;
-  scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
+  std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
   OverlayCandidateValidator* overlay_candidate_validator_;
   gfx::Rect last_swap_rect_;
 };
diff --git a/cc/test/fake_painted_scrollbar_layer.cc b/cc/test/fake_painted_scrollbar_layer.cc
index 14964eb..3fbd15f 100644
--- a/cc/test/fake_painted_scrollbar_layer.cc
+++ b/cc/test/fake_painted_scrollbar_layer.cc
@@ -5,6 +5,7 @@
 #include "cc/test/fake_painted_scrollbar_layer.h"
 
 #include "base/auto_reset.h"
+#include "base/memory/ptr_util.h"
 #include "cc/test/fake_scrollbar.h"
 
 namespace cc {
@@ -22,7 +23,7 @@
 FakePaintedScrollbarLayer::FakePaintedScrollbarLayer(
     FakeScrollbar* fake_scrollbar,
     int scrolling_layer_id)
-    : PaintedScrollbarLayer(scoped_ptr<Scrollbar>(fake_scrollbar),
+    : PaintedScrollbarLayer(std::unique_ptr<Scrollbar>(fake_scrollbar),
                             scrolling_layer_id),
       update_count_(0),
       push_properties_count_(0),
@@ -44,9 +45,9 @@
   ++push_properties_count_;
 }
 
-scoped_ptr<base::AutoReset<bool>>
+std::unique_ptr<base::AutoReset<bool>>
 FakePaintedScrollbarLayer::IgnoreSetNeedsCommit() {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new base::AutoReset<bool>(&ignore_set_needs_commit_, true));
 }
 
diff --git a/cc/test/fake_painted_scrollbar_layer.h b/cc/test/fake_painted_scrollbar_layer.h
index 3568087..3391797a 100644
--- a/cc/test/fake_painted_scrollbar_layer.h
+++ b/cc/test/fake_painted_scrollbar_layer.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/layers/painted_scrollbar_layer.h"
 #include "cc/test/fake_scrollbar.h"
 
@@ -28,7 +29,7 @@
 
   void PushPropertiesTo(LayerImpl* layer) override;
 
-  scoped_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit();
+  std::unique_ptr<base::AutoReset<bool>> IgnoreSetNeedsCommit();
 
   size_t push_properties_count() const { return push_properties_count_; }
   void reset_push_properties_count() { push_properties_count_ = 0; }
diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc
index 143619a..291342cd 100644
--- a/cc/test/fake_picture_layer.cc
+++ b/cc/test/fake_picture_layer.cc
@@ -18,7 +18,7 @@
 }
 
 FakePictureLayer::FakePictureLayer(ContentLayerClient* client,
-                                   scoped_ptr<RecordingSource> source)
+                                   std::unique_ptr<RecordingSource> source)
     : PictureLayer(client, std::move(source)),
       update_count_(0),
       push_properties_count_(0),
@@ -29,7 +29,7 @@
 
 FakePictureLayer::~FakePictureLayer() {}
 
-scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
   if (is_mask())
     return FakePictureLayerImpl::CreateMask(tree_impl, layer_id_);
diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h
index 91f30f3..038e975 100644
--- a/cc/test/fake_picture_layer.h
+++ b/cc/test/fake_picture_layer.h
@@ -7,8 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/layers/picture_layer.h"
 #include "cc/playback/recording_source.h"
 
@@ -21,11 +22,11 @@
 
   static scoped_refptr<FakePictureLayer> CreateWithRecordingSource(
       ContentLayerClient* client,
-      scoped_ptr<RecordingSource> source) {
+      std::unique_ptr<RecordingSource> source) {
     return make_scoped_refptr(new FakePictureLayer(client, std::move(source)));
   }
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
 
   int update_count() const { return update_count_; }
   void reset_update_count() { update_count_ = 0; }
@@ -44,7 +45,7 @@
  private:
   explicit FakePictureLayer(ContentLayerClient* client);
   FakePictureLayer(ContentLayerClient* client,
-                   scoped_ptr<RecordingSource> source);
+                   std::unique_ptr<RecordingSource> source);
   ~FakePictureLayer() override;
 
   int update_count_;
diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc
index 95e81a7..87631cd 100644
--- a/cc/test/fake_picture_layer_impl.cc
+++ b/cc/test/fake_picture_layer_impl.cc
@@ -7,6 +7,8 @@
 #include <stddef.h>
 
 #include <vector>
+
+#include "base/memory/ptr_util.h"
 #include "cc/tiles/tile.h"
 #include "cc/trees/layer_tree_impl.h"
 
@@ -53,9 +55,9 @@
       use_set_valid_tile_priorities_flag_(false),
       release_resources_count_(0) {}
 
-scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl(
+std::unique_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl(
     LayerTreeImpl* tree_impl) {
-  return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id(), is_mask_));
+  return base::WrapUnique(new FakePictureLayerImpl(tree_impl, id(), is_mask_));
 }
 
 void FakePictureLayerImpl::PushPropertiesTo(LayerImpl* layer_impl) {
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h
index b631635..da825f10 100644
--- a/cc/test/fake_picture_layer_impl.h
+++ b/cc/test/fake_picture_layer_impl.h
@@ -7,7 +7,9 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/layers/picture_layer_impl.h"
 #include "cc/playback/raster_source.h"
 
@@ -15,51 +17,52 @@
 
 class FakePictureLayerImpl : public PictureLayerImpl {
  public:
-  static scoped_ptr<FakePictureLayerImpl> Create(
-      LayerTreeImpl* tree_impl, int id) {
+  static std::unique_ptr<FakePictureLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                                      int id) {
     bool is_mask = false;
-    return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, is_mask));
+    return base::WrapUnique(new FakePictureLayerImpl(tree_impl, id, is_mask));
   }
 
-  static scoped_ptr<FakePictureLayerImpl> CreateMask(LayerTreeImpl* tree_impl,
-                                                     int id) {
+  static std::unique_ptr<FakePictureLayerImpl> CreateMask(
+      LayerTreeImpl* tree_impl,
+      int id) {
     bool is_mask = true;
-    return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, is_mask));
+    return base::WrapUnique(new FakePictureLayerImpl(tree_impl, id, is_mask));
   }
 
   // Create layer from a raster source that covers the entire layer.
-  static scoped_ptr<FakePictureLayerImpl> CreateWithRasterSource(
+  static std::unique_ptr<FakePictureLayerImpl> CreateWithRasterSource(
       LayerTreeImpl* tree_impl,
       int id,
       scoped_refptr<RasterSource> raster_source) {
     bool is_mask = false;
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new FakePictureLayerImpl(tree_impl, id, raster_source, is_mask));
   }
 
   // Create layer from a raster source that only covers part of the layer.
-  static scoped_ptr<FakePictureLayerImpl> CreateWithPartialRasterSource(
+  static std::unique_ptr<FakePictureLayerImpl> CreateWithPartialRasterSource(
       LayerTreeImpl* tree_impl,
       int id,
       scoped_refptr<RasterSource> raster_source,
       const gfx::Size& layer_bounds) {
     bool is_mask = false;
-    return make_scoped_ptr(new FakePictureLayerImpl(
+    return base::WrapUnique(new FakePictureLayerImpl(
         tree_impl, id, raster_source, is_mask, layer_bounds));
   }
 
   // Create layer from a raster source that covers the entire layer and is a
   // mask.
-  static scoped_ptr<FakePictureLayerImpl> CreateMaskWithRasterSource(
+  static std::unique_ptr<FakePictureLayerImpl> CreateMaskWithRasterSource(
       LayerTreeImpl* tree_impl,
       int id,
       scoped_refptr<RasterSource> raster_source) {
     bool is_mask = true;
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new FakePictureLayerImpl(tree_impl, id, raster_source, is_mask));
   }
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+  std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
   void PushPropertiesTo(LayerImpl* layer_impl) override;
   void AppendQuads(RenderPass* render_pass,
                    AppendQuadsData* append_quads_data) override;
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h
index 0c1bc84c..0951a05d0 100644
--- a/cc/test/fake_picture_layer_tiling_client.h
+++ b/cc/test/fake_picture_layer_tiling_client.h
@@ -54,8 +54,8 @@
 
  protected:
   FakeTileManagerClient tile_manager_client_;
-  scoped_ptr<ResourcePool> resource_pool_;
-  scoped_ptr<TileManager> tile_manager_;
+  std::unique_ptr<ResourcePool> resource_pool_;
+  std::unique_ptr<TileManager> tile_manager_;
   scoped_refptr<RasterSource> raster_source_;
   gfx::Size tile_size_;
   PictureLayerTilingSet* twin_set_;
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index cbb3ead..92a7a97 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -35,7 +35,7 @@
   bool BeginMainFrameRequested() const override;
   bool CommitRequested() const override;
   void Start(
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) override {}
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override {}
   void Stop() override {}
   bool SupportsImplScrolling() const override;
   bool MainFrameWillHappenForTesting() override;
diff --git a/cc/test/fake_recording_source.h b/cc/test/fake_recording_source.h
index 69216c70..089deb7 100644
--- a/cc/test/fake_recording_source.h
+++ b/cc/test/fake_recording_source.h
@@ -26,18 +26,20 @@
   FakeRecordingSource();
   ~FakeRecordingSource() override {}
 
-  static scoped_ptr<FakeRecordingSource> CreateRecordingSource(
+  static std::unique_ptr<FakeRecordingSource> CreateRecordingSource(
       const gfx::Rect& recorded_viewport,
       const gfx::Size& layer_bounds) {
-    scoped_ptr<FakeRecordingSource> recording_source(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording_source(
+        new FakeRecordingSource);
     recording_source->SetRecordedViewport(recorded_viewport);
     recording_source->SetLayerBounds(layer_bounds);
     return recording_source;
   }
 
-  static scoped_ptr<FakeRecordingSource> CreateFilledRecordingSource(
+  static std::unique_ptr<FakeRecordingSource> CreateFilledRecordingSource(
       const gfx::Size& layer_bounds) {
-    scoped_ptr<FakeRecordingSource> recording_source(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording_source(
+        new FakeRecordingSource);
     recording_source->SetRecordedViewport(gfx::Rect(layer_bounds));
     recording_source->SetLayerBounds(layer_bounds);
     return recording_source;
diff --git a/cc/test/fake_resource_provider.h b/cc/test/fake_resource_provider.h
index 0279d73..447af56 100644
--- a/cc/test/fake_resource_provider.h
+++ b/cc/test/fake_resource_provider.h
@@ -14,10 +14,10 @@
 
 class FakeResourceProvider : public ResourceProvider {
  public:
-  static scoped_ptr<FakeResourceProvider> Create(
+  static std::unique_ptr<FakeResourceProvider> Create(
       OutputSurface* output_surface,
       SharedBitmapManager* shared_bitmap_manager) {
-    scoped_ptr<FakeResourceProvider> provider(new FakeResourceProvider(
+    std::unique_ptr<FakeResourceProvider> provider(new FakeResourceProvider(
         output_surface, shared_bitmap_manager, nullptr, nullptr, 0, 1, false,
         std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1,
                               GL_TEXTURE_2D)));
@@ -25,11 +25,11 @@
     return provider;
   }
 
-  static scoped_ptr<FakeResourceProvider> Create(
+  static std::unique_ptr<FakeResourceProvider> Create(
       OutputSurface* output_surface,
       SharedBitmapManager* shared_bitmap_manager,
       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
-    scoped_ptr<FakeResourceProvider> provider(new FakeResourceProvider(
+    std::unique_ptr<FakeResourceProvider> provider(new FakeResourceProvider(
         output_surface, shared_bitmap_manager, gpu_memory_buffer_manager,
         nullptr, 0, 1, false,
         std::vector<unsigned>(static_cast<size_t>(gfx::BufferFormat::LAST) + 1,
diff --git a/cc/test/fake_scoped_ui_resource.cc b/cc/test/fake_scoped_ui_resource.cc
index 0631cd8..81e26d9 100644
--- a/cc/test/fake_scoped_ui_resource.cc
+++ b/cc/test/fake_scoped_ui_resource.cc
@@ -4,6 +4,7 @@
 
 #include "cc/test/fake_scoped_ui_resource.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/trees/layer_tree_host.h"
 
 namespace cc {
@@ -17,9 +18,9 @@
 
 }  // anonymous namespace
 
-scoped_ptr<FakeScopedUIResource> FakeScopedUIResource::Create(
+std::unique_ptr<FakeScopedUIResource> FakeScopedUIResource::Create(
     LayerTreeHost* host) {
-  return make_scoped_ptr(new FakeScopedUIResource(host));
+  return base::WrapUnique(new FakeScopedUIResource(host));
 }
 
 FakeScopedUIResource::FakeScopedUIResource(LayerTreeHost* host)
diff --git a/cc/test/fake_scoped_ui_resource.h b/cc/test/fake_scoped_ui_resource.h
index 6590cbc..db27ed6 100644
--- a/cc/test/fake_scoped_ui_resource.h
+++ b/cc/test/fake_scoped_ui_resource.h
@@ -14,7 +14,7 @@
 
 class FakeScopedUIResource : public ScopedUIResource {
  public:
-  static scoped_ptr<FakeScopedUIResource> Create(LayerTreeHost* host);
+  static std::unique_ptr<FakeScopedUIResource> Create(LayerTreeHost* host);
 
   UIResourceBitmap GetBitmap(UIResourceId uid, bool resource_lost) override;
   void ResetCounters();
diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc
index 77b9b0d..b76cd176 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -54,13 +54,13 @@
   }
 
   // Overridden from TileTaskClient:
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override {
     return nullptr;
   }
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {}
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override {}
 
  private:
   RasterTask::Vector completed_tasks_;
diff --git a/cc/test/fake_tile_manager_client.cc b/cc/test/fake_tile_manager_client.cc
index 2c5734f..4f46953a 100644
--- a/cc/test/fake_tile_manager_client.cc
+++ b/cc/test/fake_tile_manager_client.cc
@@ -14,14 +14,14 @@
 FakeTileManagerClient::~FakeTileManagerClient() {
 }
 
-scoped_ptr<RasterTilePriorityQueue> FakeTileManagerClient::BuildRasterQueue(
-    TreePriority tree_priority,
-    RasterTilePriorityQueue::Type type) {
+std::unique_ptr<RasterTilePriorityQueue>
+FakeTileManagerClient::BuildRasterQueue(TreePriority tree_priority,
+                                        RasterTilePriorityQueue::Type type) {
   return nullptr;
 }
 
-scoped_ptr<EvictionTilePriorityQueue> FakeTileManagerClient::BuildEvictionQueue(
-    TreePriority tree_priority) {
+std::unique_ptr<EvictionTilePriorityQueue>
+FakeTileManagerClient::BuildEvictionQueue(TreePriority tree_priority) {
   return nullptr;
 }
 
diff --git a/cc/test/fake_tile_manager_client.h b/cc/test/fake_tile_manager_client.h
index 68d845e6..6c93c37 100644
--- a/cc/test/fake_tile_manager_client.h
+++ b/cc/test/fake_tile_manager_client.h
@@ -21,10 +21,10 @@
   void NotifyReadyToDraw() override {}
   void NotifyAllTileTasksCompleted() override {}
   void NotifyTileStateChanged(const Tile* tile) override {}
-  scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue(
       TreePriority tree_priority,
       RasterTilePriorityQueue::Type type) override;
-  scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
+  std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
       TreePriority tree_priority) override;
   void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override {}
 };
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 0ef1f02a..23b4144 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -125,7 +125,7 @@
       host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)),
       render_pass_(RenderPass::Create()),
       layer_impl_id_(2) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_->host_impl()->active_tree(), 1);
   host_->host_impl()->active_tree()->SetRootLayer(std::move(root));
   root_layer()->SetHasRenderSurface(true);
@@ -207,10 +207,10 @@
       SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1));
 }
 
-void EmptyCopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
+void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
 
 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() {
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_requests;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
   copy_requests.push_back(
       CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
   root_layer()->PassCopyRequests(&copy_requests);
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index 573ba64..7c1a6008 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -7,9 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/animation/animation_timeline.h"
 #include "cc/quads/render_pass.h"
 #include "cc/test/fake_layer_tree_host.h"
@@ -58,7 +58,7 @@
 
     template <typename T>
     T* AddChildToRoot() {
-      scoped_ptr<T> layer =
+      std::unique_ptr<T> layer =
           T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
       T* ptr = layer.get();
       root_layer()->AddChild(std::move(layer));
@@ -67,7 +67,7 @@
 
     template <typename T>
     T* AddChild(LayerImpl* parent) {
-      scoped_ptr<T> layer =
+      std::unique_ptr<T> layer =
           T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
       T* ptr = layer.get();
       parent->AddChild(std::move(layer));
@@ -76,7 +76,7 @@
 
     template <typename T>
     T* AddReplicaLayer(LayerImpl* origin) {
-      scoped_ptr<T> layer =
+      std::unique_ptr<T> layer =
           T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
       T* ptr = layer.get();
       origin->SetReplicaLayer(std::move(layer));
@@ -85,7 +85,7 @@
 
     template <typename T, typename A>
     T* AddChildToRoot(const A& a) {
-      scoped_ptr<T> layer =
+      std::unique_ptr<T> layer =
           T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a);
       T* ptr = layer.get();
       root_layer()->AddChild(std::move(layer));
@@ -94,7 +94,7 @@
 
     template <typename T, typename A, typename B>
     T* AddChildToRoot(const A& a, const B& b) {
-      scoped_ptr<T> layer =
+      std::unique_ptr<T> layer =
           T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b);
       T* ptr = layer.get();
       root_layer()->AddChild(std::move(layer));
@@ -103,8 +103,8 @@
 
     template <typename T, typename A, typename B, typename C, typename D>
     T* AddChildToRoot(const A& a, const B& b, const C& c, const D& d) {
-      scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
-                                      layer_impl_id_++, a, b, c, d);
+      std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
+                                           layer_impl_id_++, a, b, c, d);
       T* ptr = layer.get();
       root_layer()->AddChild(std::move(layer));
       return ptr;
@@ -121,8 +121,8 @@
                       const C& c,
                       const D& d,
                       const E& e) {
-      scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
-                                      layer_impl_id_++, a, b, c, d, e);
+      std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
+                                           layer_impl_id_++, a, b, c, d, e);
       T* ptr = layer.get();
       root_layer()->AddChild(std::move(layer));
       return ptr;
@@ -164,9 +164,9 @@
    private:
     FakeLayerTreeHostClient client_;
     TestTaskGraphRunner task_graph_runner_;
-    scoped_ptr<OutputSurface> output_surface_;
-    scoped_ptr<FakeLayerTreeHost> host_;
-    scoped_ptr<RenderPass> render_pass_;
+    std::unique_ptr<OutputSurface> output_surface_;
+    std::unique_ptr<FakeLayerTreeHost> host_;
+    std::unique_ptr<RenderPass> render_pass_;
     scoped_refptr<AnimationTimeline> timeline_;
     scoped_refptr<AnimationTimeline> timeline_impl_;
     int layer_impl_id_;
diff --git a/cc/test/layer_tree_host_common_test.h b/cc/test/layer_tree_host_common_test.h
index ee08639b..e4be078a 100644
--- a/cc/test/layer_tree_host_common_test.h
+++ b/cc/test/layer_tree_host_common_test.h
@@ -6,9 +6,9 @@
 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
 
 #include <algorithm>
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/layers/layer_collections.h"
 #include "cc/test/fake_layer_tree_host_client.h"
 #include "cc/test/layer_test_common.h"
@@ -143,9 +143,9 @@
   }
 
  private:
-  scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_;
+  std::unique_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_;
   LayerList update_layer_list_;
-  scoped_ptr<LayerImplList> update_layer_list_impl_;
+  std::unique_ptr<LayerImplList> update_layer_list_impl_;
 
   int render_surface_layer_list_count_;
 };
diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc
index 815700b..48c7579 100644
--- a/cc/test/layer_tree_json_parser.cc
+++ b/cc/test/layer_tree_json_parser.cc
@@ -166,7 +166,7 @@
 
 scoped_refptr<Layer> ParseTreeFromJson(std::string json,
                                        ContentLayerClient* content_client) {
-  scoped_ptr<base::Value> val = base::test::ParseJson(json);
+  std::unique_ptr<base::Value> val = base::test::ParseJson(json);
   return ParseTreeFromValue(val.get(), content_client);
 }
 
diff --git a/cc/test/layer_tree_json_parser_unittest.cc b/cc/test/layer_tree_json_parser_unittest.cc
index 7cd1a8b8..3e52c8e84 100644
--- a/cc/test/layer_tree_json_parser_unittest.cc
+++ b/cc/test/layer_tree_json_parser_unittest.cc
@@ -67,9 +67,9 @@
                                   &task_graph_runner);
   LayerTreeImpl* tree = host_impl.active_tree();
 
-  scoped_ptr<LayerImpl> root_impl(LayerImpl::Create(tree, 1));
-  scoped_ptr<LayerImpl> parent(LayerImpl::Create(tree, 2));
-  scoped_ptr<LayerImpl> child(LayerImpl::Create(tree, 3));
+  std::unique_ptr<LayerImpl> root_impl(LayerImpl::Create(tree, 1));
+  std::unique_ptr<LayerImpl> parent(LayerImpl::Create(tree, 2));
+  std::unique_ptr<LayerImpl> child(LayerImpl::Create(tree, 3));
 
   root_impl->SetBounds(gfx::Size(100, 100));
   parent->SetBounds(gfx::Size(50, 50));
@@ -95,8 +95,8 @@
                                   &task_graph_runner);
   LayerTreeImpl* tree = host_impl.active_tree();
 
-  scoped_ptr<LayerImpl> root_impl(LayerImpl::Create(tree, 1));
-  scoped_ptr<LayerImpl> touch_layer(LayerImpl::Create(tree, 2));
+  std::unique_ptr<LayerImpl> root_impl(LayerImpl::Create(tree, 1));
+  std::unique_ptr<LayerImpl> touch_layer(LayerImpl::Create(tree, 2));
 
   root_impl->SetBounds(gfx::Size(100, 100));
   touch_layer->SetBounds(gfx::Size(50, 50));
diff --git a/cc/test/layer_tree_pixel_resource_test.cc b/cc/test/layer_tree_pixel_resource_test.cc
index 5d810ab..7da328f 100644
--- a/cc/test/layer_tree_pixel_resource_test.cc
+++ b/cc/test/layer_tree_pixel_resource_test.cc
@@ -107,8 +107,8 @@
 
 void LayerTreeHostPixelResourceTest::CreateResourceAndTileTaskWorkerPool(
     LayerTreeHostImpl* host_impl,
-    scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-    scoped_ptr<ResourcePool>* resource_pool) {
+    std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+    std::unique_ptr<ResourcePool>* resource_pool) {
   base::SingleThreadTaskRunner* task_runner =
       task_runner_provider()->HasImplThread()
           ? task_runner_provider()->ImplThreadTaskRunner()
diff --git a/cc/test/layer_tree_pixel_resource_test.h b/cc/test/layer_tree_pixel_resource_test.h
index 3e52169..effa9e0d 100644
--- a/cc/test/layer_tree_pixel_resource_test.h
+++ b/cc/test/layer_tree_pixel_resource_test.h
@@ -36,8 +36,8 @@
 
   void CreateResourceAndTileTaskWorkerPool(
       LayerTreeHostImpl* host_impl,
-      scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-      scoped_ptr<ResourcePool>* resource_pool) override;
+      std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+      std::unique_ptr<ResourcePool>* resource_pool) override;
 
   void RunPixelResourceTest(scoped_refptr<Layer> content_root,
                             base::FilePath file_name);
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc
index db86e75..aaf0b5a 100644
--- a/cc/test/layer_tree_pixel_test.cc
+++ b/cc/test/layer_tree_pixel_test.cc
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include "base/command_line.h"
+#include "base/memory/ptr_util.h"
 #include "base/path_service.h"
 #include "cc/base/switches.h"
 #include "cc/layers/solid_color_layer.h"
@@ -38,17 +39,17 @@
 
 LayerTreePixelTest::~LayerTreePixelTest() {}
 
-scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() {
+std::unique_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() {
   gfx::Size surface_expansion_size(40, 60);
-  scoped_ptr<PixelTestOutputSurface> output_surface;
+  std::unique_ptr<PixelTestOutputSurface> output_surface;
 
   switch (test_type_) {
     case PIXEL_TEST_SOFTWARE: {
-      scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device(
+      std::unique_ptr<PixelTestSoftwareOutputDevice> software_output_device(
           new PixelTestSoftwareOutputDevice);
       software_output_device->set_surface_expansion_size(
           surface_expansion_size);
-      output_surface = make_scoped_ptr(
+      output_surface = base::WrapUnique(
           new PixelTestOutputSurface(std::move(software_output_device)));
       break;
     }
@@ -58,7 +59,7 @@
           new TestInProcessContextProvider(nullptr));
       scoped_refptr<TestInProcessContextProvider> worker(
           new TestInProcessContextProvider(compositor.get()));
-      output_surface = make_scoped_ptr(new PixelTestOutputSurface(
+      output_surface = base::WrapUnique(new PixelTestOutputSurface(
           std::move(compositor), std::move(worker), flipped_output_surface));
       break;
     }
@@ -76,12 +77,14 @@
   renderer->SetEnlargePassTextureAmountForTesting(enlarge_texture_amount_);
 }
 
-scoped_ptr<CopyOutputRequest> LayerTreePixelTest::CreateCopyOutputRequest() {
+std::unique_ptr<CopyOutputRequest>
+LayerTreePixelTest::CreateCopyOutputRequest() {
   return CopyOutputRequest::CreateBitmapRequest(
       base::Bind(&LayerTreePixelTest::ReadbackResult, base::Unretained(this)));
 }
 
-void LayerTreePixelTest::ReadbackResult(scoped_ptr<CopyOutputResult> result) {
+void LayerTreePixelTest::ReadbackResult(
+    std::unique_ptr<CopyOutputResult> result) {
   ASSERT_TRUE(result->HasBitmap());
   result_bitmap_ = result->TakeBitmap();
   EndTest();
@@ -206,14 +209,15 @@
   LayerTreeTest::SetupTree();
 }
 
-scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap(
+std::unique_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap(
     const gfx::Size& size,
     const TextureMailbox& texture_mailbox) {
   DCHECK(texture_mailbox.IsTexture());
   if (!texture_mailbox.IsTexture())
     return nullptr;
 
-  scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext();
+  std::unique_ptr<gpu::GLInProcessContext> context =
+      CreateTestInProcessContext();
   GLES2Interface* gl = context->GetImplementation();
 
   if (texture_mailbox.sync_token().HasData())
@@ -237,7 +241,7 @@
   EXPECT_EQ(static_cast<unsigned>(GL_FRAMEBUFFER_COMPLETE),
             gl->CheckFramebufferStatus(GL_FRAMEBUFFER));
 
-  scoped_ptr<uint8_t[]> pixels(new uint8_t[size.GetArea() * 4]);
+  std::unique_ptr<uint8_t[]> pixels(new uint8_t[size.GetArea() * 4]);
   gl->ReadPixels(0,
                  0,
                  size.width(),
@@ -249,7 +253,7 @@
   gl->DeleteFramebuffers(1, &fbo);
   gl->DeleteTextures(1, &texture_id);
 
-  scoped_ptr<SkBitmap> bitmap(new SkBitmap);
+  std::unique_ptr<SkBitmap> bitmap(new SkBitmap);
   bitmap->allocN32Pixels(size.width(), size.height());
 
   uint8_t* out_pixels = static_cast<uint8_t*>(bitmap->getPixels());
@@ -272,7 +276,8 @@
 }
 
 void LayerTreePixelTest::Finish() {
-  scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext();
+  std::unique_ptr<gpu::GLInProcessContext> context =
+      CreateTestInProcessContext();
   GLES2Interface* gl = context->GetImplementation();
   gl->Finish();
 }
diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h
index 199378ef..9a0d5925 100644
--- a/cc/test/layer_tree_pixel_test.h
+++ b/cc/test/layer_tree_pixel_test.h
@@ -5,11 +5,11 @@
 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_
 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/resources/single_release_callback.h"
 #include "cc/test/layer_tree_test.h"
 #include "ui/gl/gl_implementation.h"
@@ -40,12 +40,12 @@
   LayerTreePixelTest();
   ~LayerTreePixelTest() override;
 
-  scoped_ptr<OutputSurface> CreateOutputSurface() override;
+  std::unique_ptr<OutputSurface> CreateOutputSurface() override;
   void WillCommitCompleteOnThread(LayerTreeHostImpl* impl) override;
 
-  virtual scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest();
+  virtual std::unique_ptr<CopyOutputRequest> CreateCopyOutputRequest();
 
-  void ReadbackResult(scoped_ptr<CopyOutputResult> result);
+  void ReadbackResult(std::unique_ptr<CopyOutputResult> result);
 
   void BeginTest() override;
   void SetupTree() override;
@@ -75,7 +75,7 @@
                                       Layer* target,
                                       base::FilePath file_name);
 
-  scoped_ptr<SkBitmap> CopyTextureMailboxToBitmap(
+  std::unique_ptr<SkBitmap> CopyTextureMailboxToBitmap(
       const gfx::Size& size,
       const TextureMailbox& texture_mailbox);
 
@@ -91,12 +91,12 @@
   static const SkColor kCSSGreen = 0xff008000;
 
   gfx::DisableNullDrawGLBindings enable_pixel_output_;
-  scoped_ptr<PixelComparator> pixel_comparator_;
+  std::unique_ptr<PixelComparator> pixel_comparator_;
   PixelTestType test_type_;
   scoped_refptr<Layer> content_root_;
   Layer* readback_target_;
   base::FilePath ref_file_;
-  scoped_ptr<SkBitmap> result_bitmap_;
+  std::unique_ptr<SkBitmap> result_bitmap_;
   std::vector<scoped_refptr<TextureLayer>> texture_layers_;
   int pending_texture_mailbox_callbacks_;
   gfx::Vector2d enlarge_texture_amount_;
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 87a79de..82a9a04a 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -6,6 +6,7 @@
 
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/animation/animation.h"
@@ -90,11 +91,12 @@
 // various actions.
 class SingleThreadProxyForTest : public SingleThreadProxy {
  public:
-  static scoped_ptr<Proxy> Create(TestHooks* test_hooks,
-                                  LayerTreeHost* host,
-                                  LayerTreeHostSingleThreadClient* client,
-                                  TaskRunnerProvider* task_runner_provider) {
-    return make_scoped_ptr(new SingleThreadProxyForTest(
+  static std::unique_ptr<Proxy> Create(
+      TestHooks* test_hooks,
+      LayerTreeHost* host,
+      LayerTreeHostSingleThreadClient* client,
+      TaskRunnerProvider* task_runner_provider) {
+    return base::WrapUnique(new SingleThreadProxyForTest(
         test_hooks, host, client, task_runner_provider));
   }
 
@@ -152,7 +154,7 @@
 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
 class LayerTreeHostImplForTesting : public LayerTreeHostImpl {
  public:
-  static scoped_ptr<LayerTreeHostImplForTesting> Create(
+  static std::unique_ptr<LayerTreeHostImplForTesting> Create(
       TestHooks* test_hooks,
       const LayerTreeSettings& settings,
       LayerTreeHostImplClient* host_impl_client,
@@ -161,7 +163,7 @@
       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
       TaskGraphRunner* task_graph_runner,
       RenderingStatsInstrumentation* stats_instrumentation) {
-    return make_scoped_ptr(new LayerTreeHostImplForTesting(
+    return base::WrapUnique(new LayerTreeHostImplForTesting(
         test_hooks, settings, host_impl_client, task_runner_provider,
         shared_bitmap_manager, gpu_memory_buffer_manager, task_graph_runner,
         stats_instrumentation));
@@ -190,8 +192,8 @@
         notify_ready_to_activate_was_blocked_(false) {}
 
   void CreateResourceAndTileTaskWorkerPool(
-      scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-      scoped_ptr<ResourcePool>* resource_pool) override {
+      std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+      std::unique_ptr<ResourcePool>* resource_pool) override {
     test_hooks_->CreateResourceAndTileTaskWorkerPool(
         this, tile_task_worker_pool, resource_pool);
   }
@@ -335,9 +337,9 @@
 class LayerTreeHostClientForTesting : public LayerTreeHostClient,
                                       public LayerTreeHostSingleThreadClient {
  public:
-  static scoped_ptr<LayerTreeHostClientForTesting> Create(
+  static std::unique_ptr<LayerTreeHostClientForTesting> Create(
       TestHooks* test_hooks) {
-    return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks));
+    return base::WrapUnique(new LayerTreeHostClientForTesting(test_hooks));
   }
   ~LayerTreeHostClientForTesting() override {}
 
@@ -399,8 +401,8 @@
   void BeginMainFrameNotExpectedSoon() override {}
 
   void RecordFrameTimingEvents(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override {}
 
  private:
@@ -413,7 +415,7 @@
 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting.
 class LayerTreeHostForTesting : public LayerTreeHost {
  public:
-  static scoped_ptr<LayerTreeHostForTesting> Create(
+  static std::unique_ptr<LayerTreeHostForTesting> Create(
       TestHooks* test_hooks,
       CompositorMode mode,
       LayerTreeHostClientForTesting* client,
@@ -424,18 +426,18 @@
       const LayerTreeSettings& settings,
       scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
     LayerTreeHost::InitParams params;
     params.client = client;
     params.shared_bitmap_manager = shared_bitmap_manager;
     params.gpu_memory_buffer_manager = gpu_memory_buffer_manager;
     params.task_graph_runner = task_graph_runner;
     params.settings = &settings;
-    scoped_ptr<LayerTreeHostForTesting> layer_tree_host(
+    std::unique_ptr<LayerTreeHostForTesting> layer_tree_host(
         new LayerTreeHostForTesting(test_hooks, &params, mode));
-    scoped_ptr<TaskRunnerProvider> task_runner_provider =
+    std::unique_ptr<TaskRunnerProvider> task_runner_provider =
         TaskRunnerProvider::Create(main_task_runner, impl_task_runner);
-    scoped_ptr<Proxy> proxy;
+    std::unique_ptr<Proxy> proxy;
     switch (mode) {
       case CompositorMode::SINGLE_THREADED:
         proxy = SingleThreadProxyForTest::Create(test_hooks,
@@ -471,7 +473,7 @@
     return layer_tree_host;
   }
 
-  scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
+  std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
       LayerTreeHostImplClient* host_impl_client) override {
     return LayerTreeHostImplForTesting::Create(
         test_hooks_, settings(), host_impl_client, task_runner_provider(),
@@ -662,7 +664,7 @@
 }
 
 void LayerTreeTest::SetOutputSurfaceOnLayerTreeHost(
-    scoped_ptr<OutputSurface> output_surface) {
+    std::unique_ptr<OutputSurface> output_surface) {
   if (IsRemoteTest()) {
     DCHECK(remote_client_layer_tree_host_);
     remote_client_layer_tree_host_->SetOutputSurface(std::move(output_surface));
@@ -671,7 +673,8 @@
   }
 }
 
-scoped_ptr<OutputSurface> LayerTreeTest::ReleaseOutputSurfaceOnLayerTreeHost() {
+std::unique_ptr<OutputSurface>
+LayerTreeTest::ReleaseOutputSurfaceOnLayerTreeHost() {
   if (IsRemoteTest()) {
     DCHECK(remote_client_layer_tree_host_);
     return remote_client_layer_tree_host_->ReleaseOutputSurface();
@@ -695,7 +698,7 @@
 void LayerTreeTest::DoBeginTest() {
   client_ = LayerTreeHostClientForTesting::Create(this);
 
-  scoped_ptr<FakeExternalBeginFrameSource> external_begin_frame_source;
+  std::unique_ptr<FakeExternalBeginFrameSource> external_begin_frame_source;
   if (settings_.use_external_begin_frame_source) {
     DCHECK(!IsRemoteTest());
     external_begin_frame_source.reset(new FakeExternalBeginFrameSource(
@@ -905,8 +908,8 @@
   SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface());
 }
 
-scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
-  scoped_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface();
+std::unique_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
+  std::unique_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface();
   DCHECK_EQ(delegating_renderer_,
             output_surface->capabilities().delegated_rendering);
   output_surface_ = output_surface.get();
@@ -918,7 +921,7 @@
   return std::move(output_surface);
 }
 
-scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() {
+std::unique_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() {
   if (delegating_renderer_)
     return FakeOutputSurface::CreateDelegating3d();
   else
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index 5641357..1f786a4a 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -115,8 +115,8 @@
   void DispatchNextCommitWaitsForActivation();
 
   void SetOutputSurfaceOnLayerTreeHost(
-      scoped_ptr<OutputSurface> output_surface);
-  scoped_ptr<OutputSurface> ReleaseOutputSurfaceOnLayerTreeHost();
+      std::unique_ptr<OutputSurface> output_surface);
+  std::unique_ptr<OutputSurface> ReleaseOutputSurfaceOnLayerTreeHost();
   void SetVisibleOnLayerTreeHost(bool visible);
 
   virtual void AfterTest() = 0;
@@ -169,9 +169,9 @@
   // By default, output surface recreation is synchronous.
   void RequestNewOutputSurface() override;
   // Override this for pixel tests, where you need a real output surface.
-  virtual scoped_ptr<OutputSurface> CreateOutputSurface();
+  virtual std::unique_ptr<OutputSurface> CreateOutputSurface();
   // Override this for unit tests, which should not produce pixel output.
-  virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface();
+  virtual std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface();
 
   TestWebGraphicsContext3D* TestContext();
 
@@ -188,11 +188,11 @@
 
   CompositorMode mode_;
 
-  scoped_ptr<LayerTreeHostClientForTesting> client_;
-  scoped_ptr<LayerTreeHost> layer_tree_host_;
+  std::unique_ptr<LayerTreeHostClientForTesting> client_;
+  std::unique_ptr<LayerTreeHost> layer_tree_host_;
 
   // The LayerTreeHost created by the cc embedder on the client in remote mode.
-  scoped_ptr<LayerTreeHostForTesting> remote_client_layer_tree_host_;
+  std::unique_ptr<LayerTreeHostForTesting> remote_client_layer_tree_host_;
 
   FakeOutputSurface* output_surface_;
   FakeExternalBeginFrameSource* external_begin_frame_source_;
@@ -209,10 +209,10 @@
   int timeout_seconds_;
 
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
-  scoped_ptr<base::Thread> impl_thread_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
-  scoped_ptr<TestTaskGraphRunner> task_graph_runner_;
+  std::unique_ptr<base::Thread> impl_thread_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
+  std::unique_ptr<TestTaskGraphRunner> task_graph_runner_;
   base::CancelableClosure timeout_;
   scoped_refptr<TestContextProvider> compositor_contexts_;
   base::WeakPtr<LayerTreeTest> main_thread_weak_ptr_;
diff --git a/cc/test/ordered_simple_task_runner.cc b/cc/test/ordered_simple_task_runner.cc
index cc211ca..a3d66ee 100644
--- a/cc/test/ordered_simple_task_runner.cc
+++ b/cc/test/ordered_simple_task_runner.cc
@@ -64,9 +64,9 @@
   return ShouldRunBefore(other);
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 TestOrderablePendingTask::AsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   AsValueInto(state.get());
   return std::move(state);
@@ -261,9 +261,9 @@
 }
 
 // base::trace_event tracing functionality
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 OrderedSimpleTaskRunner::AsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   AsValueInto(state.get());
   return std::move(state);
diff --git a/cc/test/ordered_simple_task_runner.h b/cc/test/ordered_simple_task_runner.h
index e312d36d..bcdfa74 100644
--- a/cc/test/ordered_simple_task_runner.h
+++ b/cc/test/ordered_simple_task_runner.h
@@ -8,13 +8,13 @@
 #include <stddef.h>
 
 #include <limits>
+#include <memory>
 #include <set>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/trace_event/trace_event.h"
@@ -38,7 +38,7 @@
   bool operator<(const TestOrderablePendingTask& other) const;
 
   // base::trace_event tracing functionality
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
   void AsValueInto(base::trace_event::TracedValue* state) const;
 
  private:
@@ -107,7 +107,7 @@
   bool RunForPeriod(base::TimeDelta period);
 
   // base::trace_event tracing functionality
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
   virtual void AsValueInto(base::trace_event::TracedValue* state) const;
 
   // Common conditions to run for, exposed publicly to allow external users to
diff --git a/cc/test/ordered_simple_task_runner_unittest.cc b/cc/test/ordered_simple_task_runner_unittest.cc
index cb3c4c54..3ab7ba66 100644
--- a/cc/test/ordered_simple_task_runner_unittest.cc
+++ b/cc/test/ordered_simple_task_runner_unittest.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/test/ordered_simple_task_runner.h"
+
+#include <memory>
 #include <string>
 
 #include "base/cancelable_callback.h"
 #include "base/format_macros.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "base/test/test_pending_task.h"
-#include "cc/test/ordered_simple_task_runner.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 // We pass EXPECT_TRUE / EXPECT_FALSE macros rather than a boolean as on some
@@ -63,7 +64,7 @@
 
  protected:
   std::string executed_tasks_;
-  scoped_ptr<base::SimpleTestTickClock> now_src_;
+  std::unique_ptr<base::SimpleTestTickClock> now_src_;
   scoped_refptr<OrderedSimpleTaskRunner> task_runner_;
 
   void PostTask(int task_num, base::TimeDelta delay) {
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc
index f33a6bf..918eafbf 100644
--- a/cc/test/pixel_test.cc
+++ b/cc/test/pixel_test.cc
@@ -5,6 +5,7 @@
 #include "cc/test/pixel_test.h"
 
 #include "base/command_line.h"
+#include "base/memory/ptr_util.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
@@ -65,10 +66,9 @@
     const gfx::Rect* copy_rect) {
   base::RunLoop run_loop;
 
-  scoped_ptr<CopyOutputRequest> request =
+  std::unique_ptr<CopyOutputRequest> request =
       CopyOutputRequest::CreateBitmapRequest(
-          base::Bind(&PixelTest::ReadbackResult,
-                     base::Unretained(this),
+          base::Bind(&PixelTest::ReadbackResult, base::Unretained(this),
                      run_loop.QuitClosure()));
   if (copy_rect)
     request->set_area(*copy_rect);
@@ -96,7 +96,7 @@
 }
 
 void PixelTest::ReadbackResult(base::Closure quit_run_loop,
-                               scoped_ptr<CopyOutputResult> result) {
+                               std::unique_ptr<CopyOutputResult> result) {
   ASSERT_TRUE(result->HasBitmap());
   result_bitmap_ = result->TakeBitmap();
   quit_run_loop.Run();
@@ -140,7 +140,7 @@
       settings_.renderer_settings.use_gpu_memory_buffer_resources,
       settings_.use_image_texture_targets);
 
-  texture_mailbox_deleter_ = make_scoped_ptr(
+  texture_mailbox_deleter_ = base::WrapUnique(
       new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get()));
 
   renderer_ = GLRenderer::Create(
@@ -172,7 +172,8 @@
 }
 
 void PixelTest::SetUpSoftwareRenderer() {
-  scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice());
+  std::unique_ptr<SoftwareOutputDevice> device(
+      new PixelTestSoftwareOutputDevice());
   output_surface_.reset(new PixelTestOutputSurface(std::move(device)));
   output_surface_->BindToClient(output_surface_client_.get());
   shared_bitmap_manager_.reset(new TestSharedBitmapManager());
diff --git a/cc/test/pixel_test.h b/cc/test/pixel_test.h
index 08bad369..5a8afcd 100644
--- a/cc/test/pixel_test.h
+++ b/cc/test/pixel_test.h
@@ -50,15 +50,15 @@
   gfx::Size device_viewport_size_;
   bool disable_picture_quad_image_filtering_;
   class PixelTestRendererClient;
-  scoped_ptr<FakeOutputSurfaceClient> output_surface_client_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
-  scoped_ptr<BlockingTaskRunner> main_thread_task_runner_;
-  scoped_ptr<ResourceProvider> resource_provider_;
-  scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
-  scoped_ptr<DirectRenderer> renderer_;
-  scoped_ptr<SkBitmap> result_bitmap_;
+  std::unique_ptr<FakeOutputSurfaceClient> output_surface_client_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
+  std::unique_ptr<BlockingTaskRunner> main_thread_task_runner_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
+  std::unique_ptr<DirectRenderer> renderer_;
+  std::unique_ptr<SkBitmap> result_bitmap_;
   gfx::Vector2d external_device_viewport_offset_;
   gfx::Rect external_device_clip_rect_;
 
@@ -75,12 +75,12 @@
 
  private:
   void ReadbackResult(base::Closure quit_run_loop,
-                      scoped_ptr<CopyOutputResult> result);
+                      std::unique_ptr<CopyOutputResult> result);
 
   bool PixelsMatchReference(const base::FilePath& ref_file,
                             const PixelComparator& comparator);
 
-  scoped_ptr<gfx::DisableNullDrawGLBindings> enable_pixel_output_;
+  std::unique_ptr<gfx::DisableNullDrawGLBindings> enable_pixel_output_;
 };
 
 template<typename RendererType>
diff --git a/cc/test/pixel_test_output_surface.cc b/cc/test/pixel_test_output_surface.cc
index 421afc0..883f809 100644
--- a/cc/test/pixel_test_output_surface.cc
+++ b/cc/test/pixel_test_output_surface.cc
@@ -28,7 +28,7 @@
 }
 
 PixelTestOutputSurface::PixelTestOutputSurface(
-    scoped_ptr<SoftwareOutputDevice> software_device)
+    std::unique_ptr<SoftwareOutputDevice> software_device)
     : OutputSurface(std::move(software_device)),
       external_stencil_test_(false) {}
 
diff --git a/cc/test/pixel_test_output_surface.h b/cc/test/pixel_test_output_surface.h
index f2c5f66..e0ddcb5 100644
--- a/cc/test/pixel_test_output_surface.h
+++ b/cc/test/pixel_test_output_surface.h
@@ -19,7 +19,7 @@
       scoped_refptr<ContextProvider> context_provider,
       bool flipped_output_surface);
   explicit PixelTestOutputSurface(
-      scoped_ptr<SoftwareOutputDevice> software_device);
+      std::unique_ptr<SoftwareOutputDevice> software_device);
 
   void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override;
   bool HasExternalStencilTest() const override;
diff --git a/cc/test/proxy_impl_for_test.cc b/cc/test/proxy_impl_for_test.cc
index da0848b..c6fa586 100644
--- a/cc/test/proxy_impl_for_test.cc
+++ b/cc/test/proxy_impl_for_test.cc
@@ -4,14 +4,16 @@
 
 #include "cc/test/proxy_impl_for_test.h"
 
+#include "base/memory/ptr_util.h"
+
 namespace cc {
-scoped_ptr<ProxyImplForTest> ProxyImplForTest::Create(
+std::unique_ptr<ProxyImplForTest> ProxyImplForTest::Create(
     TestHooks* test_hooks,
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
-  return make_scoped_ptr(new ProxyImplForTest(
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
+  return base::WrapUnique(new ProxyImplForTest(
       test_hooks, channel_impl, layer_tree_host, task_runner_provider,
       std::move(external_begin_frame_source)));
 }
@@ -29,7 +31,7 @@
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source)
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source)
     : ProxyImpl(channel_impl,
                 layer_tree_host,
                 task_runner_provider,
diff --git a/cc/test/proxy_impl_for_test.h b/cc/test/proxy_impl_for_test.h
index 4b807cc..8919232 100644
--- a/cc/test/proxy_impl_for_test.h
+++ b/cc/test/proxy_impl_for_test.h
@@ -14,12 +14,12 @@
 // actions.
 class ProxyImplForTest : public ProxyImpl {
  public:
-  static scoped_ptr<ProxyImplForTest> Create(
+  static std::unique_ptr<ProxyImplForTest> Create(
       TestHooks* test_hooks,
       ChannelImpl* channel_impl,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
   using ProxyImpl::PostAnimationEventsToMainThreadOnImplThread;
   using ProxyImpl::DidLoseOutputSurfaceOnImplThread;
@@ -35,11 +35,12 @@
     return last_begin_main_frame_args_;
   }
 
-  ProxyImplForTest(TestHooks* test_hooks,
-                   ChannelImpl* channel_impl,
-                   LayerTreeHost* layer_tree_host,
-                   TaskRunnerProvider* task_runner_provider,
-                   scoped_ptr<BeginFrameSource> external_begin_frame_source);
+  ProxyImplForTest(
+      TestHooks* test_hooks,
+      ChannelImpl* channel_impl,
+      LayerTreeHost* layer_tree_host,
+      TaskRunnerProvider* task_runner_provider,
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
   void ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) override;
   DrawResult ScheduledActionDrawAndSwapIfPossible() override;
diff --git a/cc/test/proxy_main_for_test.cc b/cc/test/proxy_main_for_test.cc
index 6a9fa41..715e997 100644
--- a/cc/test/proxy_main_for_test.cc
+++ b/cc/test/proxy_main_for_test.cc
@@ -10,25 +10,26 @@
 
 namespace cc {
 
-scoped_ptr<ProxyMainForTest> ProxyMainForTest::CreateThreaded(
+std::unique_ptr<ProxyMainForTest> ProxyMainForTest::CreateThreaded(
     TestHooks* test_hooks,
     LayerTreeHost* host,
     TaskRunnerProvider* task_runner_provider) {
-  scoped_ptr<ProxyMainForTest> proxy_main(
+  std::unique_ptr<ProxyMainForTest> proxy_main(
       new ProxyMainForTest(test_hooks, host, task_runner_provider));
-  scoped_ptr<ThreadedChannelForTest> channel = ThreadedChannelForTest::Create(
-      test_hooks, proxy_main.get(), task_runner_provider);
+  std::unique_ptr<ThreadedChannelForTest> channel =
+      ThreadedChannelForTest::Create(test_hooks, proxy_main.get(),
+                                     task_runner_provider);
   proxy_main->threaded_channel_for_test_ = channel.get();
   proxy_main->SetChannel(std::move(channel));
   return proxy_main;
 }
 
-scoped_ptr<ProxyMainForTest> ProxyMainForTest::CreateRemote(
+std::unique_ptr<ProxyMainForTest> ProxyMainForTest::CreateRemote(
     TestHooks* test_hooks,
     RemoteProtoChannel* remote_proto_channel,
     LayerTreeHost* host,
     TaskRunnerProvider* task_runner_provider) {
-  scoped_ptr<ProxyMainForTest> proxy_main(
+  std::unique_ptr<ProxyMainForTest> proxy_main(
       new ProxyMainForTest(test_hooks, host, task_runner_provider));
   proxy_main->SetChannel(RemoteChannelMain::Create(
       remote_proto_channel, proxy_main.get(), task_runner_provider));
@@ -70,7 +71,8 @@
   ProxyMain::DidCommitAndDrawFrame();
 }
 
-void ProxyMainForTest::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
+void ProxyMainForTest::SetAnimationEvents(
+    std::unique_ptr<AnimationEvents> events) {
   test_hooks_->ReceivedSetAnimationEvents();
   ProxyMain::SetAnimationEvents(std::move(events));
 }
@@ -98,15 +100,15 @@
 }
 
 void ProxyMainForTest::PostFrameTimingEventsOnMain(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   test_hooks_->ReceivedPostFrameTimingEventsOnMain();
   ProxyMain::PostFrameTimingEventsOnMain(std::move(composite_events),
                                          std::move(main_frame_events));
 }
 
 void ProxyMainForTest::BeginMainFrame(
-    scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
+    std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
   test_hooks_->ReceivedBeginMainFrame();
   ProxyMain::BeginMainFrame(std::move(begin_main_frame_state));
 }
diff --git a/cc/test/proxy_main_for_test.h b/cc/test/proxy_main_for_test.h
index b324188..c2082116 100644
--- a/cc/test/proxy_main_for_test.h
+++ b/cc/test/proxy_main_for_test.h
@@ -16,12 +16,12 @@
 // actions.
 class ProxyMainForTest : public ProxyMain {
  public:
-  static scoped_ptr<ProxyMainForTest> CreateThreaded(
+  static std::unique_ptr<ProxyMainForTest> CreateThreaded(
       TestHooks* test_hooks,
       LayerTreeHost* host,
       TaskRunnerProvider* task_runner_provider);
 
-  static scoped_ptr<ProxyMainForTest> CreateRemote(
+  static std::unique_ptr<ProxyMainForTest> CreateRemote(
       TestHooks* test_hooks,
       RemoteProtoChannel* remote_proto_channel,
       LayerTreeHost* host,
@@ -43,7 +43,7 @@
       const RendererCapabilities& capabilities) override;
   void BeginMainFrameNotExpectedSoon() override;
   void DidCommitAndDrawFrame() override;
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> events) override;
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> events) override;
   void DidLoseOutputSurface() override;
   void RequestNewOutputSurface() override;
   void DidInitializeOutputSurface(
@@ -51,11 +51,11 @@
       const RendererCapabilities& capabilities) override;
   void DidCompletePageScaleAnimation() override;
   void PostFrameTimingEventsOnMain(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override;
-  void BeginMainFrame(
-      scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override;
+  void BeginMainFrame(std::unique_ptr<BeginMainFrameAndCommitState>
+                          begin_main_frame_state) override;
 
   TestHooks* test_hooks_;
   ThreadedChannelForTest* threaded_channel_for_test_;
diff --git a/cc/test/remote_channel_impl_for_test.cc b/cc/test/remote_channel_impl_for_test.cc
index 440aa54..b57b351 100644
--- a/cc/test/remote_channel_impl_for_test.cc
+++ b/cc/test/remote_channel_impl_for_test.cc
@@ -4,16 +4,17 @@
 
 #include "cc/test/remote_channel_impl_for_test.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/test/proxy_impl_for_test.h"
 
 namespace cc {
 
-scoped_ptr<RemoteChannelImplForTest> RemoteChannelImplForTest::Create(
+std::unique_ptr<RemoteChannelImplForTest> RemoteChannelImplForTest::Create(
     TestHooks* test_hooks,
     LayerTreeHost* layer_tree_host,
     RemoteProtoChannel* remote_proto_channel,
     TaskRunnerProvider* task_runner_provider) {
-  return make_scoped_ptr(new RemoteChannelImplForTest(
+  return base::WrapUnique(new RemoteChannelImplForTest(
       test_hooks, layer_tree_host, remote_proto_channel, task_runner_provider));
 }
 
@@ -28,12 +29,12 @@
       test_hooks_(test_hooks),
       proxy_impl_for_test_(nullptr) {}
 
-scoped_ptr<ProxyImpl> RemoteChannelImplForTest::CreateProxyImpl(
+std::unique_ptr<ProxyImpl> RemoteChannelImplForTest::CreateProxyImpl(
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
-  scoped_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create(
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
+  std::unique_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create(
       test_hooks_, channel_impl, layer_tree_host, task_runner_provider,
       std::move(external_begin_frame_source));
   proxy_impl_for_test_ = proxy_impl.get();
diff --git a/cc/test/remote_channel_impl_for_test.h b/cc/test/remote_channel_impl_for_test.h
index dfe530d..f19a28e 100644
--- a/cc/test/remote_channel_impl_for_test.h
+++ b/cc/test/remote_channel_impl_for_test.h
@@ -14,7 +14,7 @@
 
 class RemoteChannelImplForTest : public RemoteChannelImpl {
  public:
-  static scoped_ptr<RemoteChannelImplForTest> Create(
+  static std::unique_ptr<RemoteChannelImplForTest> Create(
       TestHooks* test_hooks,
       LayerTreeHost* layer_tree_host,
       RemoteProtoChannel* remote_proto_channel,
@@ -28,11 +28,11 @@
                            RemoteProtoChannel* remote_proto_channel,
                            TaskRunnerProvider* task_runner_provider);
 
-  scoped_ptr<ProxyImpl> CreateProxyImpl(
+  std::unique_ptr<ProxyImpl> CreateProxyImpl(
       ChannelImpl* channel_impl,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
 
   TestHooks* test_hooks_;
   ProxyImplForTest* proxy_impl_for_test_;
diff --git a/cc/test/remote_proto_channel_bridge.cc b/cc/test/remote_proto_channel_bridge.cc
index 496479f..3a93c22 100644
--- a/cc/test/remote_proto_channel_bridge.cc
+++ b/cc/test/remote_proto_channel_bridge.cc
@@ -4,8 +4,10 @@
 
 #include "cc/test/remote_proto_channel_bridge.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "cc/proto/compositor_message.pb.h"
 
 namespace cc {
@@ -22,7 +24,7 @@
 }
 
 void FakeRemoteProtoChannel::OnProtoReceived(
-    scoped_ptr<proto::CompositorMessage> proto) {
+    std::unique_ptr<proto::CompositorMessage> proto) {
   DCHECK(receiver_);
 
   receiver_->OnProtoReceived(std::move(proto));
@@ -55,7 +57,7 @@
       return;
     default:
       bridge_->channel_impl.OnProtoReceived(
-          make_scoped_ptr(new proto::CompositorMessage(proto)));
+          base::WrapUnique(new proto::CompositorMessage(proto)));
   }
 }
 
@@ -66,7 +68,7 @@
 void FakeRemoteProtoChannelImpl::SendCompositorProto(
     const proto::CompositorMessage& proto) {
   bridge_->channel_main.OnProtoReceived(
-      make_scoped_ptr(new proto::CompositorMessage(proto)));
+      base::WrapUnique(new proto::CompositorMessage(proto)));
 }
 
 RemoteProtoChannelBridge::RemoteProtoChannelBridge(TestHooks* test_hooks)
diff --git a/cc/test/remote_proto_channel_bridge.h b/cc/test/remote_proto_channel_bridge.h
index 274ee0c..816bd94 100644
--- a/cc/test/remote_proto_channel_bridge.h
+++ b/cc/test/remote_proto_channel_bridge.h
@@ -23,7 +23,7 @@
   // RemoteProtoChannel implementation
   void SetProtoReceiver(ProtoReceiver* receiver) override;
 
-  virtual void OnProtoReceived(scoped_ptr<proto::CompositorMessage> proto);
+  virtual void OnProtoReceived(std::unique_ptr<proto::CompositorMessage> proto);
 
   bool HasReceiver() const;
 
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index 94d0824d6..01b03d60 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -27,7 +27,7 @@
                           RenderPassId id,
                           const gfx::Rect& output_rect,
                           const gfx::Transform& root_transform) {
-  scoped_ptr<RenderPass> pass(RenderPass::Create());
+  std::unique_ptr<RenderPass> pass(RenderPass::Create());
   pass->SetNew(id, output_rect, output_rect, root_transform);
   RenderPass* saved = pass.get();
   pass_list->push_back(std::move(pass));
@@ -196,7 +196,7 @@
   unsigned target = GL_TEXTURE_2D;
   gpu::Mailbox gpu_mailbox;
   memcpy(gpu_mailbox.name, "Hello world", strlen("Hello world") + 1);
-  scoped_ptr<SingleReleaseCallbackImpl> callback =
+  std::unique_ptr<SingleReleaseCallbackImpl> callback =
       SingleReleaseCallbackImpl::Create(base::Bind(&EmptyReleaseCallback));
   TextureMailbox mailbox(gpu_mailbox, kSyncTokenForMailboxTextureQuad, target);
   ResourceId resource8 = resource_provider->CreateResourceFromTextureMailbox(
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index f5033532..d89655bc 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -9,6 +9,7 @@
 #include <string>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "cc/debug/rendering_stats_instrumentation.h"
 
 namespace cc {
@@ -72,18 +73,20 @@
 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() {
 }
 
-scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create(
+std::unique_ptr<FakeCompositorTimingHistory>
+FakeCompositorTimingHistory::Create(
     bool using_synchronous_renderer_compositor) {
-  scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation =
-      RenderingStatsInstrumentation::Create();
-  return make_scoped_ptr(new FakeCompositorTimingHistory(
+  std::unique_ptr<RenderingStatsInstrumentation>
+      rendering_stats_instrumentation = RenderingStatsInstrumentation::Create();
+  return base::WrapUnique(new FakeCompositorTimingHistory(
       using_synchronous_renderer_compositor,
       std::move(rendering_stats_instrumentation)));
 }
 
 FakeCompositorTimingHistory::FakeCompositorTimingHistory(
     bool using_synchronous_renderer_compositor,
-    scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation)
+    std::unique_ptr<RenderingStatsInstrumentation>
+        rendering_stats_instrumentation)
     : CompositorTimingHistory(using_synchronous_renderer_compositor,
                               CompositorTimingHistory::NULL_UMA,
                               rendering_stats_instrumentation.get()),
@@ -193,7 +196,7 @@
     int layer_tree_host_id,
     OrderedSimpleTaskRunner* task_runner,
     BeginFrameSource* begin_frame_source,
-    scoped_ptr<CompositorTimingHistory> compositor_timing_history)
+    std::unique_ptr<CompositorTimingHistory> compositor_timing_history)
     : Scheduler(client,
                 scheduler_settings,
                 layer_tree_host_id,
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index 788b683..dffd71b 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -7,10 +7,11 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/time/time.h"
 #include "cc/scheduler/compositor_timing_history.h"
 #include "cc/scheduler/scheduler.h"
@@ -39,10 +40,11 @@
 
 class FakeDelayBasedTimeSource : public DelayBasedTimeSource {
  public:
-  static scoped_ptr<FakeDelayBasedTimeSource> Create(
+  static std::unique_ptr<FakeDelayBasedTimeSource> Create(
       base::TimeDelta interval,
       base::SingleThreadTaskRunner* task_runner) {
-    return make_scoped_ptr(new FakeDelayBasedTimeSource(interval, task_runner));
+    return base::WrapUnique(
+        new FakeDelayBasedTimeSource(interval, task_runner));
   }
 
   ~FakeDelayBasedTimeSource() override {}
@@ -63,11 +65,11 @@
 
 class TestDelayBasedTimeSource : public DelayBasedTimeSource {
  public:
-  static scoped_ptr<TestDelayBasedTimeSource> Create(
+  static std::unique_ptr<TestDelayBasedTimeSource> Create(
       base::SimpleTestTickClock* now_src,
       base::TimeDelta interval,
       OrderedSimpleTaskRunner* task_runner) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new TestDelayBasedTimeSource(now_src, interval, task_runner));
   }
 
@@ -144,7 +146,7 @@
 
 class FakeCompositorTimingHistory : public CompositorTimingHistory {
  public:
-  static scoped_ptr<FakeCompositorTimingHistory> Create(
+  static std::unique_ptr<FakeCompositorTimingHistory> Create(
       bool using_synchronous_renderer_compositor);
   ~FakeCompositorTimingHistory() override;
 
@@ -172,10 +174,10 @@
 
  protected:
   FakeCompositorTimingHistory(bool using_synchronous_renderer_compositor,
-                              scoped_ptr<RenderingStatsInstrumentation>
+                              std::unique_ptr<RenderingStatsInstrumentation>
                                   rendering_stats_instrumentation_owned);
 
-  scoped_ptr<RenderingStatsInstrumentation>
+  std::unique_ptr<RenderingStatsInstrumentation>
       rendering_stats_instrumentation_owned_;
 
   base::TimeDelta begin_main_frame_to_commit_duration_;
@@ -193,13 +195,14 @@
 
 class TestScheduler : public Scheduler {
  public:
-  TestScheduler(base::SimpleTestTickClock* now_src,
-                SchedulerClient* client,
-                const SchedulerSettings& scheduler_settings,
-                int layer_tree_host_id,
-                OrderedSimpleTaskRunner* task_runner,
-                BeginFrameSource* begin_frame_source,
-                scoped_ptr<CompositorTimingHistory> compositor_timing_history);
+  TestScheduler(
+      base::SimpleTestTickClock* now_src,
+      SchedulerClient* client,
+      const SchedulerSettings& scheduler_settings,
+      int layer_tree_host_id,
+      OrderedSimpleTaskRunner* task_runner,
+      BeginFrameSource* begin_frame_source,
+      std::unique_ptr<CompositorTimingHistory> compositor_timing_history);
 
   // Extra test helper functionality
   bool IsBeginRetroFrameArgsEmpty() const {
diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc
index c237c39e..ca993357 100644
--- a/cc/test/skia_common.cc
+++ b/cc/test/skia_common.cc
@@ -42,8 +42,8 @@
                                       scoped_refptr<DisplayItemList> list_b) {
   const size_t pixel_size = 4 * layer_rect.size().GetArea();
 
-  scoped_ptr<unsigned char[]> pixels_a(new unsigned char[pixel_size]);
-  scoped_ptr<unsigned char[]> pixels_b(new unsigned char[pixel_size]);
+  std::unique_ptr<unsigned char[]> pixels_a(new unsigned char[pixel_size]);
+  std::unique_ptr<unsigned char[]> pixels_b(new unsigned char[pixel_size]);
   memset(pixels_a.get(), 0, pixel_size);
   memset(pixels_b.get(), 0, pixel_size);
   DrawDisplayList(pixels_a.get(), layer_rect, list_a);
diff --git a/cc/test/skia_common.h b/cc/test/skia_common.h
index ba5d969..3ca9727 100644
--- a/cc/test/skia_common.h
+++ b/cc/test/skia_common.h
@@ -5,8 +5,9 @@
 #ifndef CC_TEST_SKIA_COMMON_H_
 #define CC_TEST_SKIA_COMMON_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "skia/ext/refptr.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkImage.h"
diff --git a/cc/test/surface_aggregator_test_helpers.h b/cc/test/surface_aggregator_test_helpers.h
index 356033d..6c876a4 100644
--- a/cc/test/surface_aggregator_test_helpers.h
+++ b/cc/test/surface_aggregator_test_helpers.h
@@ -21,7 +21,7 @@
 class Surface;
 class TestRenderPass;
 
-typedef std::vector<scoped_ptr<RenderPass>> RenderPassList;
+typedef std::vector<std::unique_ptr<RenderPass>> RenderPassList;
 
 namespace test {
 
diff --git a/cc/test/surface_hittest_test_helpers.cc b/cc/test/surface_hittest_test_helpers.cc
index 5766273..4183242 100644
--- a/cc/test/surface_hittest_test_helpers.cc
+++ b/cc/test/surface_hittest_test_helpers.cc
@@ -63,28 +63,29 @@
                       const gfx::Rect& rect,
                       const gfx::Transform& transform_to_root_target,
                       RenderPassList* render_pass_list) {
-  scoped_ptr<RenderPass> render_pass = RenderPass::Create();
+  std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
   render_pass->SetNew(render_pass_id, rect, rect, transform_to_root_target);
   render_pass_list->push_back(std::move(render_pass));
 }
 
-scoped_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList(
+std::unique_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList(
     RenderPassList* render_pass_list) {
-  scoped_ptr<DelegatedFrameData> root_delegated_frame_data(
+  std::unique_ptr<DelegatedFrameData> root_delegated_frame_data(
       new DelegatedFrameData);
   root_delegated_frame_data->render_pass_list.swap(*render_pass_list);
-  scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
+  std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
   root_frame->delegated_frame_data = std::move(root_delegated_frame_data);
   return root_frame;
 }
 
-scoped_ptr<CompositorFrame> CreateCompositorFrame(const gfx::Rect& root_rect,
-                                                  RenderPass** render_pass) {
+std::unique_ptr<CompositorFrame> CreateCompositorFrame(
+    const gfx::Rect& root_rect,
+    RenderPass** render_pass) {
   RenderPassList render_pass_list;
   RenderPassId root_id(1, 1);
   CreateRenderPass(root_id, root_rect, gfx::Transform(), &render_pass_list);
 
-  scoped_ptr<CompositorFrame> root_frame =
+  std::unique_ptr<CompositorFrame> root_frame =
       CreateCompositorFrameWithRenderPassList(&render_pass_list);
 
   *render_pass =
diff --git a/cc/test/surface_hittest_test_helpers.h b/cc/test/surface_hittest_test_helpers.h
index 81b292d0b..46e442d3 100644
--- a/cc/test/surface_hittest_test_helpers.h
+++ b/cc/test/surface_hittest_test_helpers.h
@@ -6,9 +6,9 @@
 #define CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_
 
 #include <map>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/quads/render_pass.h"
 #include "cc/surfaces/surface_factory_client.h"
 #include "cc/surfaces/surface_hittest_delegate.h"
@@ -58,11 +58,12 @@
                       const gfx::Transform& transform_to_root_target,
                       RenderPassList* render_pass_list);
 
-scoped_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList(
+std::unique_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList(
     RenderPassList* render_pass_list);
 
-scoped_ptr<CompositorFrame> CreateCompositorFrame(const gfx::Rect& root_rect,
-                                                  RenderPass** render_pass);
+std::unique_ptr<CompositorFrame> CreateCompositorFrame(
+    const gfx::Rect& root_rect,
+    RenderPass** render_pass);
 
 class TestSurfaceHittestDelegate : public SurfaceHittestDelegate {
  public:
diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc
index fd67a99..9ac2ba5 100644
--- a/cc/test/test_context_provider.cc
+++ b/cc/test/test_context_provider.cc
@@ -40,14 +40,14 @@
 
 // static
 scoped_refptr<TestContextProvider> TestContextProvider::Create(
-    scoped_ptr<TestWebGraphicsContext3D> context) {
+    std::unique_ptr<TestWebGraphicsContext3D> context) {
   if (!context)
     return NULL;
   return new TestContextProvider(std::move(context));
 }
 
 TestContextProvider::TestContextProvider(
-    scoped_ptr<TestWebGraphicsContext3D> context)
+    std::unique_ptr<TestWebGraphicsContext3D> context)
     : context3d_(std::move(context)),
       context_gl_(new TestGLES2Interface(context3d_.get())),
       bound_(false),
diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h
index b0ac88ea..99d15c8 100644
--- a/cc/test/test_context_provider.h
+++ b/cc/test/test_context_provider.h
@@ -8,9 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
@@ -25,15 +26,15 @@
 
 class TestContextProvider : public ContextProvider {
  public:
-  typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)>
-    CreateCallback;
+  typedef base::Callback<std::unique_ptr<TestWebGraphicsContext3D>(void)>
+      CreateCallback;
 
   static scoped_refptr<TestContextProvider> Create();
   // Creates a worker context provider that can be used on any thread. This is
   // equivalent to: Create(); BindToCurrentThread(); SetupLock().
   static scoped_refptr<TestContextProvider> CreateWorker();
   static scoped_refptr<TestContextProvider> Create(
-      scoped_ptr<TestWebGraphicsContext3D> context);
+      std::unique_ptr<TestWebGraphicsContext3D> context);
 
   bool BindToCurrentThread() override;
   void DetachFromThread() override;
@@ -60,7 +61,8 @@
   void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
 
  protected:
-  explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context);
+  explicit TestContextProvider(
+      std::unique_ptr<TestWebGraphicsContext3D> context);
   ~TestContextProvider() override;
 
  private:
@@ -68,8 +70,8 @@
 
   TestContextSupport support_;
 
-  scoped_ptr<TestWebGraphicsContext3D> context3d_;
-  scoped_ptr<TestGLES2Interface> context_gl_;
+  std::unique_ptr<TestWebGraphicsContext3D> context3d_;
+  std::unique_ptr<TestGLES2Interface> context_gl_;
   bool bound_;
 
   base::ThreadChecker main_thread_checker_;
diff --git a/cc/test/test_gpu_memory_buffer_manager.cc b/cc/test/test_gpu_memory_buffer_manager.cc
index 5cef8932..a4a098b8 100644
--- a/cc/test/test_gpu_memory_buffer_manager.cc
+++ b/cc/test/test_gpu_memory_buffer_manager.cc
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/numerics/safe_conversions.h"
 #include "ui/gfx/buffer_format_util.h"
 #include "ui/gfx/gpu_memory_buffer.h"
@@ -19,7 +20,7 @@
  public:
   GpuMemoryBufferImpl(const gfx::Size& size,
                       gfx::BufferFormat format,
-                      scoped_ptr<base::SharedMemory> shared_memory,
+                      std::unique_ptr<base::SharedMemory> shared_memory,
                       size_t offset,
                       size_t stride)
       : size_(size),
@@ -84,7 +85,7 @@
  private:
   const gfx::Size size_;
   gfx::BufferFormat format_;
-  scoped_ptr<base::SharedMemory> shared_memory_;
+  std::unique_ptr<base::SharedMemory> shared_memory_;
   size_t offset_;
   size_t stride_;
   bool mapped_;
@@ -106,22 +107,22 @@
       ->SetIsInUseByMacOSWindowServer(in_use);
 }
 
-scoped_ptr<gfx::GpuMemoryBuffer>
+std::unique_ptr<gfx::GpuMemoryBuffer>
 TestGpuMemoryBufferManager::AllocateGpuMemoryBuffer(const gfx::Size& size,
                                                     gfx::BufferFormat format,
                                                     gfx::BufferUsage usage,
                                                     int32_t surface_id) {
-  scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
+  std::unique_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
   const size_t buffer_size = gfx::BufferSizeForBufferFormat(size, format);
   if (!shared_memory->CreateAnonymous(buffer_size))
     return nullptr;
-  return make_scoped_ptr<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl(
+  return base::WrapUnique<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl(
       size, format, std::move(shared_memory), 0,
       base::checked_cast<int>(
           gfx::RowSizeForBufferFormat(size.width(), format, 0))));
 }
 
-scoped_ptr<gfx::GpuMemoryBuffer>
+std::unique_ptr<gfx::GpuMemoryBuffer>
 TestGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle(
     const gfx::GpuMemoryBufferHandle& handle,
     const gfx::Size& size,
@@ -129,9 +130,9 @@
   if (handle.type != gfx::SHARED_MEMORY_BUFFER)
     return nullptr;
 
-  return make_scoped_ptr<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl(
+  return base::WrapUnique<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl(
       size, format,
-      make_scoped_ptr(new base::SharedMemory(handle.handle, false)),
+      base::WrapUnique(new base::SharedMemory(handle.handle, false)),
       handle.offset, handle.stride));
 }
 
diff --git a/cc/test/test_gpu_memory_buffer_manager.h b/cc/test/test_gpu_memory_buffer_manager.h
index 7448fc3..ac805b86 100644
--- a/cc/test/test_gpu_memory_buffer_manager.h
+++ b/cc/test/test_gpu_memory_buffer_manager.h
@@ -20,12 +20,12 @@
       bool in_use);
 
   // Overridden from gpu::GpuMemoryBufferManager:
-  scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
+  std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
       const gfx::Size& size,
       gfx::BufferFormat format,
       gfx::BufferUsage usage,
       int32_t surface_id) override;
-  scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
+  std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
       const gfx::GpuMemoryBufferHandle& handle,
       const gfx::Size& size,
       gfx::BufferFormat format) override;
diff --git a/cc/test/test_hooks.cc b/cc/test/test_hooks.cc
index 5c913ac..a6b83002 100644
--- a/cc/test/test_hooks.cc
+++ b/cc/test/test_hooks.cc
@@ -19,8 +19,8 @@
 
 void TestHooks::CreateResourceAndTileTaskWorkerPool(
     LayerTreeHostImpl* host_impl,
-    scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-    scoped_ptr<ResourcePool>* resource_pool) {
+    std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+    std::unique_ptr<ResourcePool>* resource_pool) {
   host_impl->LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
       tile_task_worker_pool, resource_pool);
 }
diff --git a/cc/test/test_hooks.h b/cc/test/test_hooks.h
index d8d9e1a..918b0dbc 100644
--- a/cc/test/test_hooks.h
+++ b/cc/test/test_hooks.h
@@ -26,8 +26,8 @@
 
   virtual void CreateResourceAndTileTaskWorkerPool(
       LayerTreeHostImpl* host_impl,
-      scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-      scoped_ptr<ResourcePool>* resource_pool);
+      std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+      std::unique_ptr<ResourcePool>* resource_pool);
   virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
                                           const BeginFrameArgs& args) {}
   virtual void DidFinishImplFrameOnThread(LayerTreeHostImpl* host_impl) {}
@@ -139,7 +139,8 @@
   void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
                                TargetProperty::Type target_property,
                                double animation_start_time,
-                               scoped_ptr<AnimationCurve> curve) override {}
+                               std::unique_ptr<AnimationCurve> curve) override {
+  }
 
   virtual void RequestNewOutputSurface() = 0;
 
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
index ab9c2ab..c3a02ad 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -8,6 +8,7 @@
 
 #include "base/lazy_instance.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/resources/platform_color.h"
 #include "gpu/GLES2/gl2extchromium.h"
 #include "gpu/command_buffer/client/gl_in_process_context.h"
@@ -24,7 +25,7 @@
 namespace cc {
 
 // static
-scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
+std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
     TestGpuMemoryBufferManager* gpu_memory_buffer_manager,
     TestImageFactory* image_factory,
     gpu::GLInProcessContext* shared_context) {
@@ -42,8 +43,8 @@
   attribs.bind_generates_resource = false;
   gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
 
-  scoped_ptr<gpu::GLInProcessContext> context =
-      make_scoped_ptr(gpu::GLInProcessContext::Create(
+  std::unique_ptr<gpu::GLInProcessContext> context =
+      base::WrapUnique(gpu::GLInProcessContext::Create(
           nullptr, nullptr, is_offscreen, gfx::kNullAcceleratedWidget,
           gfx::Size(1, 1), shared_context, attribs, gpu_preference,
           gpu::GLInProcessContextSharedMemoryLimits(),
@@ -53,7 +54,7 @@
   return context;
 }
 
-scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
+std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
   return CreateTestInProcessContext(nullptr, nullptr, nullptr);
 }
 
diff --git a/cc/test/test_in_process_context_provider.h b/cc/test/test_in_process_context_provider.h
index 3303420..3205cc2 100644
--- a/cc/test/test_in_process_context_provider.h
+++ b/cc/test/test_in_process_context_provider.h
@@ -21,8 +21,8 @@
 
 namespace cc {
 
-scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext();
-scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
+std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext();
+std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
     TestGpuMemoryBufferManager* gpu_memory_buffer_manager,
     TestImageFactory* image_factory,
     gpu::GLInProcessContext* shared_context);
@@ -51,7 +51,7 @@
  private:
   TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
   TestImageFactory image_factory_;
-  scoped_ptr<gpu::GLInProcessContext> context_;
+  std::unique_ptr<gpu::GLInProcessContext> context_;
   skia::RefPtr<class GrContext> gr_context_;
   base::Lock context_lock_;
 };
diff --git a/cc/test/test_shared_bitmap_manager.cc b/cc/test/test_shared_bitmap_manager.cc
index 589a782..922c2f34 100644
--- a/cc/test/test_shared_bitmap_manager.cc
+++ b/cc/test/test_shared_bitmap_manager.cc
@@ -6,6 +6,7 @@
 
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 
 namespace cc {
@@ -13,7 +14,7 @@
 namespace {
 class OwnedSharedBitmap : public SharedBitmap {
  public:
-  OwnedSharedBitmap(scoped_ptr<base::SharedMemory> shared_memory,
+  OwnedSharedBitmap(std::unique_ptr<base::SharedMemory> shared_memory,
                     const SharedBitmapId& id)
       : SharedBitmap(static_cast<uint8_t*>(shared_memory->memory()), id),
         shared_memory_(std::move(shared_memory)) {}
@@ -21,7 +22,7 @@
   ~OwnedSharedBitmap() override {}
 
  private:
-  scoped_ptr<base::SharedMemory> shared_memory_;
+  std::unique_ptr<base::SharedMemory> shared_memory_;
 };
 
 }  // namespace
@@ -30,24 +31,24 @@
 
 TestSharedBitmapManager::~TestSharedBitmapManager() {}
 
-scoped_ptr<SharedBitmap> TestSharedBitmapManager::AllocateSharedBitmap(
+std::unique_ptr<SharedBitmap> TestSharedBitmapManager::AllocateSharedBitmap(
     const gfx::Size& size) {
   base::AutoLock lock(lock_);
-  scoped_ptr<base::SharedMemory> memory(new base::SharedMemory);
+  std::unique_ptr<base::SharedMemory> memory(new base::SharedMemory);
   memory->CreateAndMapAnonymous(size.GetArea() * 4);
   SharedBitmapId id = SharedBitmap::GenerateId();
   bitmap_map_[id] = memory.get();
-  return make_scoped_ptr(new OwnedSharedBitmap(std::move(memory), id));
+  return base::WrapUnique(new OwnedSharedBitmap(std::move(memory), id));
 }
 
-scoped_ptr<SharedBitmap> TestSharedBitmapManager::GetSharedBitmapFromId(
+std::unique_ptr<SharedBitmap> TestSharedBitmapManager::GetSharedBitmapFromId(
     const gfx::Size&,
     const SharedBitmapId& id) {
   base::AutoLock lock(lock_);
   if (bitmap_map_.find(id) == bitmap_map_.end())
     return nullptr;
   uint8_t* pixels = static_cast<uint8_t*>(bitmap_map_[id]->memory());
-  return make_scoped_ptr(new SharedBitmap(pixels, id));
+  return base::WrapUnique(new SharedBitmap(pixels, id));
 }
 
 }  // namespace cc
diff --git a/cc/test/test_shared_bitmap_manager.h b/cc/test/test_shared_bitmap_manager.h
index acba096..912d03d 100644
--- a/cc/test/test_shared_bitmap_manager.h
+++ b/cc/test/test_shared_bitmap_manager.h
@@ -21,9 +21,10 @@
   TestSharedBitmapManager();
   ~TestSharedBitmapManager() override;
 
-  scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size) override;
+  std::unique_ptr<SharedBitmap> AllocateSharedBitmap(
+      const gfx::Size& size) override;
 
-  scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
+  std::unique_ptr<SharedBitmap> GetSharedBitmapFromId(
       const gfx::Size&,
       const SharedBitmapId& id) override;
 
diff --git a/cc/test/test_texture.h b/cc/test/test_texture.h
index 6661aed..ae819ec 100644
--- a/cc/test/test_texture.h
+++ b/cc/test/test_texture.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <unordered_map>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/resources/resource_format.h"
 #include "third_party/khronos/GLES2/gl2.h"
 #include "ui/gfx/geometry/size.h"
@@ -28,7 +28,7 @@
 
   gfx::Size size;
   ResourceFormat format;
-  scoped_ptr<uint8_t[]> data;
+  std::unique_ptr<uint8_t[]> data;
 
   using TextureParametersMap = std::unordered_map<GLenum, GLint>;
   TextureParametersMap params;
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index b3cd7b8..0e1ea25 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -13,6 +13,7 @@
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/numerics/safe_conversions.h"
 #include "cc/test/test_context_support.h"
@@ -46,8 +47,8 @@
 }
 
 // static
-scoped_ptr<TestWebGraphicsContext3D> TestWebGraphicsContext3D::Create() {
-  return make_scoped_ptr(new TestWebGraphicsContext3D());
+std::unique_ptr<TestWebGraphicsContext3D> TestWebGraphicsContext3D::Create() {
+  return base::WrapUnique(new TestWebGraphicsContext3D());
 }
 
 TestWebGraphicsContext3D::TestWebGraphicsContext3D()
@@ -526,10 +527,10 @@
   DCHECK_LT(buffer_id, namespace_->next_buffer_id);
   DCHECK_EQ(context_id, context_id_);
 
-  std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
       namespace_->buffers;
   if (buffers.count(bound_buffer_) == 0)
-    buffers[bound_buffer_] = make_scoped_ptr(new Buffer);
+    buffers[bound_buffer_] = base::WrapUnique(new Buffer);
 
   buffers[bound_buffer_]->target = target;
 }
@@ -539,7 +540,7 @@
                                           const void* data,
                                           GLenum usage) {
   base::AutoLock lock(namespace_->lock);
-  std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
       namespace_->buffers;
   DCHECK_GT(buffers.count(bound_buffer_), 0u);
   DCHECK_EQ(target, buffers[bound_buffer_]->target);
@@ -589,7 +590,7 @@
 void* TestWebGraphicsContext3D::mapBufferCHROMIUM(GLenum target,
                                                   GLenum access) {
   base::AutoLock lock(namespace_->lock);
-  std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
       namespace_->buffers;
   DCHECK_GT(buffers.count(bound_buffer_), 0u);
   DCHECK_EQ(target, buffers[bound_buffer_]->target);
@@ -606,7 +607,7 @@
 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM(
     GLenum target) {
   base::AutoLock lock(namespace_->lock);
-  std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
       namespace_->buffers;
   DCHECK_GT(buffers.count(bound_buffer_), 0u);
   DCHECK_EQ(target, buffers[bound_buffer_]->target);
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h
index a913edae..4e14629 100644
--- a/cc/test/test_web_graphics_context_3d.h
+++ b/cc/test/test_web_graphics_context_3d.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <unordered_map>
 #include <unordered_set>
 #include <vector>
@@ -16,7 +17,6 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/stl_util.h"
 #include "base/synchronization/lock.h"
@@ -34,7 +34,7 @@
 
 class TestWebGraphicsContext3D {
  public:
-  static scoped_ptr<TestWebGraphicsContext3D> Create();
+  static std::unique_ptr<TestWebGraphicsContext3D> Create();
 
   virtual ~TestWebGraphicsContext3D();
 
@@ -419,7 +419,7 @@
     ~Buffer();
 
     GLenum target;
-    scoped_ptr<uint8_t[]> pixels;
+    std::unique_ptr<uint8_t[]> pixels;
     size_t size;
 
    private:
@@ -430,7 +430,7 @@
     Image();
     ~Image();
 
-    scoped_ptr<uint8_t[]> pixels;
+    std::unique_ptr<uint8_t[]> pixels;
 
    private:
     DISALLOW_COPY_AND_ASSIGN(Image);
@@ -445,7 +445,7 @@
     unsigned next_image_id;
     unsigned next_texture_id;
     unsigned next_renderbuffer_id;
-    std::unordered_map<unsigned, scoped_ptr<Buffer>> buffers;
+    std::unordered_map<unsigned, std::unique_ptr<Buffer>> buffers;
     std::unordered_set<unsigned> images;
     OrderedTextureMap textures;
     std::unordered_set<unsigned> renderbuffer_set;
diff --git a/cc/test/test_web_graphics_context_3d_unittest.cc b/cc/test/test_web_graphics_context_3d_unittest.cc
index 45766ad1..cc2a8ed 100644
--- a/cc/test/test_web_graphics_context_3d_unittest.cc
+++ b/cc/test/test_web_graphics_context_3d_unittest.cc
@@ -2,8 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/scoped_ptr.h"
 #include "cc/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"
@@ -32,7 +34,7 @@
 }
 
 TEST(TestWebGraphicsContext3DTest, GetDefaultTextureParameterValues) {
-  scoped_ptr<TestWebGraphicsContext3D> context(
+  std::unique_ptr<TestWebGraphicsContext3D> context(
       TestWebGraphicsContext3D::Create());
 
   GLuint texture = context->createTexture();
@@ -42,7 +44,7 @@
 }
 
 TEST(TestWebGraphicsContext3DTest, SetAndGetTextureParameter) {
-  scoped_ptr<TestWebGraphicsContext3D> context(
+  std::unique_ptr<TestWebGraphicsContext3D> context(
       TestWebGraphicsContext3D::Create());
 
   GLuint texture = context->createTexture();
@@ -55,7 +57,7 @@
 
 TEST(TestWebGraphicsContext3DTest,
      SetAndGetMultipleTextureParametersOnMultipleTextures) {
-  scoped_ptr<TestWebGraphicsContext3D> context(
+  std::unique_ptr<TestWebGraphicsContext3D> context(
       TestWebGraphicsContext3D::Create());
 
   // Set and get non-default texture parameters on the first texture.
@@ -94,7 +96,7 @@
 }
 
 TEST(TestWebGraphicsContext3DTest, UseMultipleRenderAndFramebuffers) {
-  scoped_ptr<TestWebGraphicsContext3D> context(
+  std::unique_ptr<TestWebGraphicsContext3D> context(
       TestWebGraphicsContext3D::Create());
 
   GLuint ids[2];
diff --git a/cc/test/threaded_channel_for_test.cc b/cc/test/threaded_channel_for_test.cc
index 468eec3..ecfd5ca 100644
--- a/cc/test/threaded_channel_for_test.cc
+++ b/cc/test/threaded_channel_for_test.cc
@@ -4,15 +4,16 @@
 
 #include "cc/test/threaded_channel_for_test.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/test/proxy_impl_for_test.h"
 
 namespace cc {
 
-scoped_ptr<ThreadedChannelForTest> ThreadedChannelForTest::Create(
+std::unique_ptr<ThreadedChannelForTest> ThreadedChannelForTest::Create(
     TestHooks* test_hooks,
     ProxyMain* proxy_main,
     TaskRunnerProvider* task_runner_provider) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new ThreadedChannelForTest(test_hooks, proxy_main, task_runner_provider));
 }
 
@@ -24,12 +25,12 @@
       test_hooks_(test_hooks),
       proxy_impl_for_test_(nullptr) {}
 
-scoped_ptr<ProxyImpl> ThreadedChannelForTest::CreateProxyImpl(
+std::unique_ptr<ProxyImpl> ThreadedChannelForTest::CreateProxyImpl(
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
-  scoped_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create(
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
+  std::unique_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create(
       test_hooks_, channel_impl, layer_tree_host, task_runner_provider,
       std::move(external_begin_frame_source));
   proxy_impl_for_test_ = proxy_impl.get();
diff --git a/cc/test/threaded_channel_for_test.h b/cc/test/threaded_channel_for_test.h
index 6a47d10c..f48423a 100644
--- a/cc/test/threaded_channel_for_test.h
+++ b/cc/test/threaded_channel_for_test.h
@@ -15,7 +15,7 @@
 // ThreadedChannel that notifies |test_hooks| of internal actions by ProxyImpl.
 class ThreadedChannelForTest : public ThreadedChannel {
  public:
-  static scoped_ptr<ThreadedChannelForTest> Create(
+  static std::unique_ptr<ThreadedChannelForTest> Create(
       TestHooks* test_hooks,
       ProxyMain* proxy_main,
       TaskRunnerProvider* task_runner_provider);
@@ -27,11 +27,11 @@
                          ProxyMain* proxy_main,
                          TaskRunnerProvider* task_runner_provider);
 
-  scoped_ptr<ProxyImpl> CreateProxyImpl(
+  std::unique_ptr<ProxyImpl> CreateProxyImpl(
       ChannelImpl* channel_impl,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
 
   TestHooks* test_hooks_;
   ProxyImplForTest* proxy_impl_for_test_;
diff --git a/cc/tiles/eviction_tile_priority_queue.cc b/cc/tiles/eviction_tile_priority_queue.cc
index 5668f0f..e7fd54e 100644
--- a/cc/tiles/eviction_tile_priority_queue.cc
+++ b/cc/tiles/eviction_tile_priority_queue.cc
@@ -4,6 +4,8 @@
 
 #include "cc/tiles/eviction_tile_priority_queue.h"
 
+#include "base/memory/ptr_util.h"
+
 namespace cc {
 
 namespace {
@@ -13,8 +15,9 @@
   explicit EvictionOrderComparator(TreePriority tree_priority)
       : tree_priority_(tree_priority) {}
 
-  bool operator()(const scoped_ptr<TilingSetEvictionQueue>& a_queue,
-                  const scoped_ptr<TilingSetEvictionQueue>& b_queue) const {
+  bool operator()(
+      const std::unique_ptr<TilingSetEvictionQueue>& a_queue,
+      const std::unique_ptr<TilingSetEvictionQueue>& b_queue) const {
     // Note that in this function, we have to return true if and only if
     // b is strictly lower priority than a.
     const PrioritizedTile& a_tile = a_queue->Top();
@@ -64,11 +67,11 @@
 void CreateTilingSetEvictionQueues(
     const std::vector<PictureLayerImpl*>& layers,
     TreePriority tree_priority,
-    std::vector<scoped_ptr<TilingSetEvictionQueue>>* queues) {
+    std::vector<std::unique_ptr<TilingSetEvictionQueue>>* queues) {
   DCHECK(queues->empty());
 
   for (auto* layer : layers) {
-    scoped_ptr<TilingSetEvictionQueue> tiling_set_queue = make_scoped_ptr(
+    std::unique_ptr<TilingSetEvictionQueue> tiling_set_queue = base::WrapUnique(
         new TilingSetEvictionQueue(layer->picture_layer_tiling_set()));
     // Queues will only contain non empty tiling sets.
     if (!tiling_set_queue->IsEmpty())
@@ -125,16 +128,16 @@
   }
 }
 
-std::vector<scoped_ptr<TilingSetEvictionQueue>>&
+std::vector<std::unique_ptr<TilingSetEvictionQueue>>&
 EvictionTilePriorityQueue::GetNextQueues() {
   const EvictionTilePriorityQueue* const_this =
       static_cast<const EvictionTilePriorityQueue*>(this);
   const auto& const_queues = const_this->GetNextQueues();
-  return const_cast<std::vector<scoped_ptr<TilingSetEvictionQueue>>&>(
+  return const_cast<std::vector<std::unique_ptr<TilingSetEvictionQueue>>&>(
       const_queues);
 }
 
-const std::vector<scoped_ptr<TilingSetEvictionQueue>>&
+const std::vector<std::unique_ptr<TilingSetEvictionQueue>>&
 EvictionTilePriorityQueue::GetNextQueues() const {
   DCHECK(!IsEmpty());
 
diff --git a/cc/tiles/eviction_tile_priority_queue.h b/cc/tiles/eviction_tile_priority_queue.h
index 558c1fe..d97bee6a 100644
--- a/cc/tiles/eviction_tile_priority_queue.h
+++ b/cc/tiles/eviction_tile_priority_queue.h
@@ -32,11 +32,12 @@
   void Pop();
 
  private:
-  std::vector<scoped_ptr<TilingSetEvictionQueue>>& GetNextQueues();
-  const std::vector<scoped_ptr<TilingSetEvictionQueue>>& GetNextQueues() const;
+  std::vector<std::unique_ptr<TilingSetEvictionQueue>>& GetNextQueues();
+  const std::vector<std::unique_ptr<TilingSetEvictionQueue>>& GetNextQueues()
+      const;
 
-  std::vector<scoped_ptr<TilingSetEvictionQueue>> active_queues_;
-  std::vector<scoped_ptr<TilingSetEvictionQueue>> pending_queues_;
+  std::vector<std::unique_ptr<TilingSetEvictionQueue>> active_queues_;
+  std::vector<std::unique_ptr<TilingSetEvictionQueue>> pending_queues_;
   TreePriority tree_priority_;
 
   DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue);
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 6a555068..9e79f4a4 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -13,6 +13,7 @@
 
 #include "base/containers/small_map.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
@@ -35,7 +36,7 @@
 
 }  // namespace
 
-scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create(
+std::unique_ptr<PictureLayerTiling> PictureLayerTiling::Create(
     WhichTree tree,
     float contents_scale,
     scoped_refptr<RasterSource> raster_source,
@@ -43,7 +44,7 @@
     size_t tiling_interest_area_padding,
     float skewport_target_time_in_seconds,
     int skewport_extrapolation_limit_in_content_pixels) {
-  return make_scoped_ptr(new PictureLayerTiling(
+  return base::WrapUnique(new PictureLayerTiling(
       tree, contents_scale, raster_source, client, tiling_interest_area_padding,
       skewport_target_time_in_seconds,
       skewport_extrapolation_limit_in_content_pixels));
diff --git a/cc/tiles/picture_layer_tiling.h b/cc/tiles/picture_layer_tiling.h
index 816ac8e..c2be058f 100644
--- a/cc/tiles/picture_layer_tiling.h
+++ b/cc/tiles/picture_layer_tiling.h
@@ -9,12 +9,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <unordered_map>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/region.h"
 #include "cc/base/tiling_data.h"
@@ -88,7 +88,7 @@
       float content_to_screen_scale);
 
   // Create a tiling with no tiles. CreateTile() must be called to add some.
-  static scoped_ptr<PictureLayerTiling> Create(
+  static std::unique_ptr<PictureLayerTiling> Create(
       WhichTree tree,
       float contents_scale,
       scoped_refptr<RasterSource> raster_source,
diff --git a/cc/tiles/picture_layer_tiling_perftest.cc b/cc/tiles/picture_layer_tiling_perftest.cc
index f612f39..38dde07 100644
--- a/cc/tiles/picture_layer_tiling_perftest.cc
+++ b/cc/tiles/picture_layer_tiling_perftest.cc
@@ -124,15 +124,15 @@
 
  private:
   FakePictureLayerTilingClient picture_layer_tiling_client_;
-  scoped_ptr<PictureLayerTiling> picture_layer_tiling_;
+  std::unique_ptr<PictureLayerTiling> picture_layer_tiling_;
 
   LapTimer timer_;
 
   scoped_refptr<ContextProvider> context_provider_;
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<FakeOutputSurface> output_surface_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
 };
 
 TEST_F(PictureLayerTilingPerfTest, Invalidate) {
diff --git a/cc/tiles/picture_layer_tiling_set.cc b/cc/tiles/picture_layer_tiling_set.cc
index 2c8e930d..865ff09 100644
--- a/cc/tiles/picture_layer_tiling_set.cc
+++ b/cc/tiles/picture_layer_tiling_set.cc
@@ -10,6 +10,7 @@
 #include <set>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "cc/playback/raster_source.h"
 
 namespace cc {
@@ -18,8 +19,8 @@
 
 class LargestToSmallestScaleFunctor {
  public:
-  bool operator()(const scoped_ptr<PictureLayerTiling>& left,
-                  const scoped_ptr<PictureLayerTiling>& right) {
+  bool operator()(const std::unique_ptr<PictureLayerTiling>& left,
+                  const std::unique_ptr<PictureLayerTiling>& right) {
     return left->contents_scale() > right->contents_scale();
   }
 };
@@ -33,13 +34,13 @@
 }  // namespace
 
 // static
-scoped_ptr<PictureLayerTilingSet> PictureLayerTilingSet::Create(
+std::unique_ptr<PictureLayerTilingSet> PictureLayerTilingSet::Create(
     WhichTree tree,
     PictureLayerTilingClient* client,
     size_t tiling_interest_area_padding,
     float skewport_target_time_in_seconds,
     int skewport_extrapolation_limit_in_content_pixels) {
-  return make_scoped_ptr(new PictureLayerTilingSet(
+  return base::WrapUnique(new PictureLayerTilingSet(
       tree, client, tiling_interest_area_padding,
       skewport_target_time_in_seconds,
       skewport_extrapolation_limit_in_content_pixels));
@@ -78,10 +79,11 @@
     float contents_scale = pending_twin_tiling->contents_scale();
     PictureLayerTiling* this_tiling = FindTilingWithScale(contents_scale);
     if (!this_tiling) {
-      scoped_ptr<PictureLayerTiling> new_tiling = PictureLayerTiling::Create(
-          tree_, contents_scale, raster_source, client_,
-          tiling_interest_area_padding_, skewport_target_time_in_seconds_,
-          skewport_extrapolation_limit_in_content_pixels_);
+      std::unique_ptr<PictureLayerTiling> new_tiling =
+          PictureLayerTiling::Create(
+              tree_, contents_scale, raster_source, client_,
+              tiling_interest_area_padding_, skewport_target_time_in_seconds_,
+              skewport_extrapolation_limit_in_content_pixels_);
       tilings_.push_back(std::move(new_tiling));
       this_tiling = tilings_.back().get();
       tiling_sort_required = true;
@@ -144,7 +146,7 @@
   RemoveTilingsAboveScale(maximum_contents_scale);
 
   // Invalidate tiles and update them to the new raster source.
-  for (const scoped_ptr<PictureLayerTiling>& tiling : tilings_) {
+  for (const std::unique_ptr<PictureLayerTiling>& tiling : tilings_) {
     DCHECK(tree_ != PENDING_TREE || !tiling->has_tiles());
     tiling->SetRasterSourceAndResize(raster_source);
 
@@ -236,7 +238,7 @@
 void PictureLayerTilingSet::RemoveNonIdealTilings() {
   auto to_remove =
       std::remove_if(tilings_.begin(), tilings_.end(),
-                     [](const scoped_ptr<PictureLayerTiling>& t) {
+                     [](const std::unique_ptr<PictureLayerTiling>& t) {
                        return t->resolution() == NON_IDEAL_RESOLUTION;
                      });
   tilings_.erase(to_remove, tilings_.end());
@@ -267,7 +269,7 @@
 
 int PictureLayerTilingSet::NumHighResTilings() const {
   return std::count_if(tilings_.begin(), tilings_.end(),
-                       [](const scoped_ptr<PictureLayerTiling>& tiling) {
+                       [](const std::unique_ptr<PictureLayerTiling>& tiling) {
                          return tiling->resolution() == HIGH_RESOLUTION;
                        });
 }
@@ -283,11 +285,11 @@
 
 PictureLayerTiling* PictureLayerTilingSet::FindTilingWithResolution(
     TileResolution resolution) const {
-  auto iter =
-      std::find_if(tilings_.begin(), tilings_.end(),
-                   [resolution](const scoped_ptr<PictureLayerTiling>& tiling) {
-                     return tiling->resolution() == resolution;
-                   });
+  auto iter = std::find_if(
+      tilings_.begin(), tilings_.end(),
+      [resolution](const std::unique_ptr<PictureLayerTiling>& tiling) {
+        return tiling->resolution() == resolution;
+      });
   if (iter == tilings_.end())
     return nullptr;
   return iter->get();
@@ -296,7 +298,7 @@
 void PictureLayerTilingSet::RemoveTilingsBelowScale(float minimum_scale) {
   auto to_remove = std::remove_if(
       tilings_.begin(), tilings_.end(),
-      [minimum_scale](const scoped_ptr<PictureLayerTiling>& tiling) {
+      [minimum_scale](const std::unique_ptr<PictureLayerTiling>& tiling) {
         return tiling->contents_scale() < minimum_scale;
       });
   tilings_.erase(to_remove, tilings_.end());
@@ -305,7 +307,7 @@
 void PictureLayerTilingSet::RemoveTilingsAboveScale(float maximum_scale) {
   auto to_remove = std::remove_if(
       tilings_.begin(), tilings_.end(),
-      [maximum_scale](const scoped_ptr<PictureLayerTiling>& tiling) {
+      [maximum_scale](const std::unique_ptr<PictureLayerTiling>& tiling) {
         return tiling->contents_scale() > maximum_scale;
       });
   tilings_.erase(to_remove, tilings_.end());
@@ -316,11 +318,11 @@
 }
 
 void PictureLayerTilingSet::Remove(PictureLayerTiling* tiling) {
-  auto iter =
-      std::find_if(tilings_.begin(), tilings_.end(),
-                   [tiling](const scoped_ptr<PictureLayerTiling>& candidate) {
-                     return candidate.get() == tiling;
-                   });
+  auto iter = std::find_if(
+      tilings_.begin(), tilings_.end(),
+      [tiling](const std::unique_ptr<PictureLayerTiling>& candidate) {
+        return candidate.get() == tiling;
+      });
   if (iter == tilings_.end())
     return;
   tilings_.erase(iter);
diff --git a/cc/tiles/picture_layer_tiling_set.h b/cc/tiles/picture_layer_tiling_set.h
index 41a2dad0..156f82c 100644
--- a/cc/tiles/picture_layer_tiling_set.h
+++ b/cc/tiles/picture_layer_tiling_set.h
@@ -39,7 +39,7 @@
     size_t end;
   };
 
-  static scoped_ptr<PictureLayerTilingSet> Create(
+  static std::unique_ptr<PictureLayerTilingSet> Create(
       WhichTree tree,
       PictureLayerTilingClient* client,
       size_t tiling_interest_area_padding,
@@ -189,7 +189,7 @@
   void Remove(PictureLayerTiling* tiling);
   void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const;
 
-  std::vector<scoped_ptr<PictureLayerTiling>> tilings_;
+  std::vector<std::unique_ptr<PictureLayerTiling>> tilings_;
 
   const size_t tiling_interest_area_padding_;
   const float skewport_target_time_in_seconds_;
diff --git a/cc/tiles/picture_layer_tiling_set_unittest.cc b/cc/tiles/picture_layer_tiling_set_unittest.cc
index 477c8f5..ceb40dca 100644
--- a/cc/tiles/picture_layer_tiling_set_unittest.cc
+++ b/cc/tiles/picture_layer_tiling_set_unittest.cc
@@ -21,7 +21,7 @@
 namespace cc {
 namespace {
 
-scoped_ptr<PictureLayerTilingSet> CreateTilingSet(
+std::unique_ptr<PictureLayerTilingSet> CreateTilingSet(
     PictureLayerTilingClient* client) {
   LayerTreeSettings defaults;
   return PictureLayerTilingSet::Create(
@@ -33,7 +33,7 @@
 TEST(PictureLayerTilingSetTest, NoResources) {
   FakePictureLayerTilingClient client;
   gfx::Size layer_bounds(1000, 800);
-  scoped_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
+  std::unique_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
   client.SetTileSize(gfx::Size(256, 256));
 
   scoped_refptr<FakeRasterSource> raster_source =
@@ -77,7 +77,7 @@
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
 
-  scoped_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
+  std::unique_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
   set->AddTiling(2.0, raster_source);
   high_res_tiling = set->AddTiling(1.0, raster_source);
   high_res_tiling->set_resolution(HIGH_RESOLUTION);
@@ -109,7 +109,7 @@
   EXPECT_EQ(4u, lower_than_low_res_range.start);
   EXPECT_EQ(5u, lower_than_low_res_range.end);
 
-  scoped_ptr<PictureLayerTilingSet> set_without_low_res =
+  std::unique_ptr<PictureLayerTilingSet> set_without_low_res =
       CreateTilingSet(&client);
   set_without_low_res->AddTiling(2.0, raster_source);
   high_res_tiling = set_without_low_res->AddTiling(1.0, raster_source);
@@ -140,7 +140,7 @@
       PictureLayerTilingSet::LOWER_THAN_LOW_RES);
   EXPECT_EQ(0u, lower_than_low_res_range.end - lower_than_low_res_range.start);
 
-  scoped_ptr<PictureLayerTilingSet> set_with_only_high_and_low_res =
+  std::unique_ptr<PictureLayerTilingSet> set_with_only_high_and_low_res =
       CreateTilingSet(&client);
   high_res_tiling =
       set_with_only_high_and_low_res->AddTiling(1.0, raster_source);
@@ -174,7 +174,7 @@
       PictureLayerTilingSet::LOWER_THAN_LOW_RES);
   EXPECT_EQ(0u, lower_than_low_res_range.end - lower_than_low_res_range.start);
 
-  scoped_ptr<PictureLayerTilingSet> set_with_only_high_res =
+  std::unique_ptr<PictureLayerTilingSet> set_with_only_high_res =
       CreateTilingSet(&client);
   high_res_tiling = set_with_only_high_res->AddTiling(1.0, raster_source);
   high_res_tiling->set_resolution(HIGH_RESOLUTION);
@@ -211,20 +211,20 @@
                float ideal_contents_scale,
                float expected_scale) {
     FakeOutputSurfaceClient output_surface_client;
-    scoped_ptr<FakeOutputSurface> output_surface =
+    std::unique_ptr<FakeOutputSurface> output_surface =
         FakeOutputSurface::Create3d();
     CHECK(output_surface->BindToClient(&output_surface_client));
 
-    scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+    std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
         new TestSharedBitmapManager());
-    scoped_ptr<ResourceProvider> resource_provider =
+    std::unique_ptr<ResourceProvider> resource_provider =
         FakeResourceProvider::Create(output_surface.get(),
                                      shared_bitmap_manager.get());
 
     FakePictureLayerTilingClient client(resource_provider.get());
     client.SetTileSize(gfx::Size(256, 256));
     gfx::Size layer_bounds(1000, 800);
-    scoped_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
+    std::unique_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
     scoped_refptr<FakeRasterSource> raster_source =
         FakeRasterSource::CreateFilled(layer_bounds);
 
@@ -299,10 +299,12 @@
 TEST(PictureLayerTilingSetTest, TileSizeChange) {
   FakePictureLayerTilingClient pending_client;
   FakePictureLayerTilingClient active_client;
-  scoped_ptr<PictureLayerTilingSet> pending_set = PictureLayerTilingSet::Create(
-      PENDING_TREE, &pending_client, 1000, 1.f, 1000);
-  scoped_ptr<PictureLayerTilingSet> active_set = PictureLayerTilingSet::Create(
-      ACTIVE_TREE, &active_client, 1000, 1.f, 1000);
+  std::unique_ptr<PictureLayerTilingSet> pending_set =
+      PictureLayerTilingSet::Create(PENDING_TREE, &pending_client, 1000, 1.f,
+                                    1000);
+  std::unique_ptr<PictureLayerTilingSet> active_set =
+      PictureLayerTilingSet::Create(ACTIVE_TREE, &active_client, 1000, 1.f,
+                                    1000);
 
   gfx::Size layer_bounds(100, 100);
   scoped_refptr<FakeRasterSource> raster_source =
@@ -406,10 +408,12 @@
 TEST(PictureLayerTilingSetTest, MaxContentScale) {
   FakePictureLayerTilingClient pending_client;
   FakePictureLayerTilingClient active_client;
-  scoped_ptr<PictureLayerTilingSet> pending_set = PictureLayerTilingSet::Create(
-      PENDING_TREE, &pending_client, 1000, 1.f, 1000);
-  scoped_ptr<PictureLayerTilingSet> active_set = PictureLayerTilingSet::Create(
-      ACTIVE_TREE, &active_client, 1000, 1.f, 1000);
+  std::unique_ptr<PictureLayerTilingSet> pending_set =
+      PictureLayerTilingSet::Create(PENDING_TREE, &pending_client, 1000, 1.f,
+                                    1000);
+  std::unique_ptr<PictureLayerTilingSet> active_set =
+      PictureLayerTilingSet::Create(ACTIVE_TREE, &active_client, 1000, 1.f,
+                                    1000);
 
   gfx::Size layer_bounds(100, 105);
   scoped_refptr<FakeRasterSource> raster_source =
diff --git a/cc/tiles/picture_layer_tiling_unittest.cc b/cc/tiles/picture_layer_tiling_unittest.cc
index bb4de4e..631845f9 100644
--- a/cc/tiles/picture_layer_tiling_unittest.cc
+++ b/cc/tiles/picture_layer_tiling_unittest.cc
@@ -2,12 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "cc/tiles/picture_layer_tiling.h"
+
 #include <stddef.h>
 
 #include <limits>
 #include <set>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/base/math_util.h"
 #include "cc/test/fake_output_surface.h"
 #include "cc/test/fake_output_surface_client.h"
@@ -15,7 +18,6 @@
 #include "cc/test/fake_raster_source.h"
 #include "cc/test/test_context_provider.h"
 #include "cc/test/test_shared_bitmap_manager.h"
-#include "cc/tiles/picture_layer_tiling.h"
 #include "cc/tiles/picture_layer_tiling_set.h"
 #include "cc/trees/layer_tree_settings.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -43,13 +45,13 @@
   using PictureLayerTiling::SetLiveTilesRect;
   using PictureLayerTiling::TileAt;
 
-  static scoped_ptr<TestablePictureLayerTiling> Create(
+  static std::unique_ptr<TestablePictureLayerTiling> Create(
       WhichTree tree,
       float contents_scale,
       scoped_refptr<RasterSource> raster_source,
       PictureLayerTilingClient* client,
       const LayerTreeSettings& settings) {
-    return make_scoped_ptr(new TestablePictureLayerTiling(
+    return base::WrapUnique(new TestablePictureLayerTiling(
         tree, contents_scale, raster_source, client,
         settings.tiling_interest_area_padding,
         settings.skewport_target_time_in_seconds,
@@ -197,7 +199,7 @@
 
  protected:
   FakePictureLayerTilingClient client_;
-  scoped_ptr<TestablePictureLayerTiling> tiling_;
+  std::unique_ptr<TestablePictureLayerTiling> tiling_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingIteratorTest);
@@ -583,7 +585,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, settings);
 
@@ -667,7 +669,7 @@
   LayerTreeSettings settings;
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, settings);
 
@@ -700,7 +702,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
 
@@ -762,7 +764,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
 
@@ -836,7 +838,7 @@
   // tiling.
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 0.25f, raster_source,
                                          &client, settings);
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1146,7 +1148,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1201,7 +1203,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1266,7 +1268,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1325,7 +1327,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1409,7 +1411,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1503,7 +1505,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, LayerTreeSettings());
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1567,7 +1569,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(current_layer_bounds);
-  scoped_ptr<TestablePictureLayerTiling> tiling =
+  std::unique_ptr<TestablePictureLayerTiling> tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &client, settings);
   tiling->set_resolution(HIGH_RESOLUTION);
@@ -1613,7 +1615,7 @@
   // layer space and screen space.
 
   FakePictureLayerTilingClient client;
-  scoped_ptr<TestablePictureLayerTiling> tiling;
+  std::unique_ptr<TestablePictureLayerTiling> tiling;
 
   gfx::Size device_viewport(800, 600);
   gfx::Rect visible_layer_rect(0, 0, 0, 0);  // offscren.
@@ -1696,7 +1698,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(gfx::Size(10000, 10000));
-  scoped_ptr<TestablePictureLayerTiling> active_tiling =
+  std::unique_ptr<TestablePictureLayerTiling> active_tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &active_client, settings);
   active_tiling->set_resolution(HIGH_RESOLUTION);
@@ -1709,7 +1711,7 @@
   recycle_client.set_twin_tiling(active_tiling.get());
 
   raster_source = FakeRasterSource::CreateFilled(gfx::Size(10000, 10000));
-  scoped_ptr<TestablePictureLayerTiling> recycle_tiling =
+  std::unique_ptr<TestablePictureLayerTiling> recycle_tiling =
       TestablePictureLayerTiling::Create(PENDING_TREE, 1.0f, raster_source,
                                          &recycle_client, settings);
   recycle_tiling->set_resolution(HIGH_RESOLUTION);
@@ -1747,7 +1749,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(gfx::Size(100, 100));
-  scoped_ptr<TestablePictureLayerTiling> active_tiling =
+  std::unique_ptr<TestablePictureLayerTiling> active_tiling =
       TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, raster_source,
                                          &active_client, LayerTreeSettings());
   active_tiling->set_resolution(HIGH_RESOLUTION);
@@ -1762,7 +1764,7 @@
   LayerTreeSettings settings;
 
   raster_source = FakeRasterSource::CreateFilled(gfx::Size(100, 100));
-  scoped_ptr<TestablePictureLayerTiling> recycle_tiling =
+  std::unique_ptr<TestablePictureLayerTiling> recycle_tiling =
       TestablePictureLayerTiling::Create(PENDING_TREE, 1.0f, raster_source,
                                          &recycle_client, settings);
   recycle_tiling->set_resolution(HIGH_RESOLUTION);
@@ -1790,7 +1792,7 @@
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(gfx::Size(100, 100));
-  scoped_ptr<TestablePictureLayerTiling> pending_tiling =
+  std::unique_ptr<TestablePictureLayerTiling> pending_tiling =
       TestablePictureLayerTiling::Create(PENDING_TREE, 1.0f, raster_source,
                                          &pending_client, LayerTreeSettings());
   pending_tiling->set_resolution(HIGH_RESOLUTION);
diff --git a/cc/tiles/raster_tile_priority_queue.cc b/cc/tiles/raster_tile_priority_queue.cc
index 0b47407..2c010df 100644
--- a/cc/tiles/raster_tile_priority_queue.cc
+++ b/cc/tiles/raster_tile_priority_queue.cc
@@ -10,21 +10,21 @@
 namespace cc {
 
 // static
-scoped_ptr<RasterTilePriorityQueue> RasterTilePriorityQueue::Create(
+std::unique_ptr<RasterTilePriorityQueue> RasterTilePriorityQueue::Create(
     const std::vector<PictureLayerImpl*>& active_layers,
     const std::vector<PictureLayerImpl*>& pending_layers,
     TreePriority tree_priority,
     Type type) {
   switch (type) {
     case Type::ALL: {
-      scoped_ptr<RasterTilePriorityQueueAll> queue(
+      std::unique_ptr<RasterTilePriorityQueueAll> queue(
           new RasterTilePriorityQueueAll);
       queue->Build(active_layers, pending_layers, tree_priority);
       return std::move(queue);
     }
     case Type::REQUIRED_FOR_ACTIVATION:
     case Type::REQUIRED_FOR_DRAW: {
-      scoped_ptr<RasterTilePriorityQueueRequired> queue(
+      std::unique_ptr<RasterTilePriorityQueueRequired> queue(
           new RasterTilePriorityQueueRequired);
       queue->Build(active_layers, pending_layers, type);
       return std::move(queue);
diff --git a/cc/tiles/raster_tile_priority_queue.h b/cc/tiles/raster_tile_priority_queue.h
index 828f3cf..5a41827f 100644
--- a/cc/tiles/raster_tile_priority_queue.h
+++ b/cc/tiles/raster_tile_priority_queue.h
@@ -19,7 +19,7 @@
  public:
   enum class Type { ALL, REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW };
 
-  static scoped_ptr<RasterTilePriorityQueue> Create(
+  static std::unique_ptr<RasterTilePriorityQueue> Create(
       const std::vector<PictureLayerImpl*>& active_layers,
       const std::vector<PictureLayerImpl*>& pending_layers,
       TreePriority tree_priority,
diff --git a/cc/tiles/raster_tile_priority_queue_all.cc b/cc/tiles/raster_tile_priority_queue_all.cc
index 09c5c78..d0c95807 100644
--- a/cc/tiles/raster_tile_priority_queue_all.cc
+++ b/cc/tiles/raster_tile_priority_queue_all.cc
@@ -4,6 +4,7 @@
 
 #include "cc/tiles/raster_tile_priority_queue_all.h"
 
+#include "base/memory/ptr_util.h"
 #include "cc/tiles/tiling_set_raster_queue_all.h"
 
 namespace cc {
@@ -15,8 +16,9 @@
   explicit RasterOrderComparator(TreePriority tree_priority)
       : tree_priority_(tree_priority) {}
 
-  bool operator()(const scoped_ptr<TilingSetRasterQueueAll>& a_queue,
-                  const scoped_ptr<TilingSetRasterQueueAll>& b_queue) const {
+  bool operator()(
+      const std::unique_ptr<TilingSetRasterQueueAll>& a_queue,
+      const std::unique_ptr<TilingSetRasterQueueAll>& b_queue) const {
     // Note that in this function, we have to return true if and only if
     // a is strictly lower priority than b.
     const TilePriority& a_priority = a_queue->Top().priority();
@@ -51,7 +53,7 @@
 void CreateTilingSetRasterQueues(
     const std::vector<PictureLayerImpl*>& layers,
     TreePriority tree_priority,
-    std::vector<scoped_ptr<TilingSetRasterQueueAll>>* queues) {
+    std::vector<std::unique_ptr<TilingSetRasterQueueAll>>* queues) {
   DCHECK(queues->empty());
 
   for (auto* layer : layers) {
@@ -60,8 +62,9 @@
 
     PictureLayerTilingSet* tiling_set = layer->picture_layer_tiling_set();
     bool prioritize_low_res = tree_priority == SMOOTHNESS_TAKES_PRIORITY;
-    scoped_ptr<TilingSetRasterQueueAll> tiling_set_queue = make_scoped_ptr(
-        new TilingSetRasterQueueAll(tiling_set, prioritize_low_res));
+    std::unique_ptr<TilingSetRasterQueueAll> tiling_set_queue =
+        base::WrapUnique(
+            new TilingSetRasterQueueAll(tiling_set, prioritize_low_res));
     // Queues will only contain non empty tiling sets.
     if (!tiling_set_queue->IsEmpty())
       queues->push_back(std::move(tiling_set_queue));
@@ -116,15 +119,15 @@
   }
 }
 
-std::vector<scoped_ptr<TilingSetRasterQueueAll>>&
+std::vector<std::unique_ptr<TilingSetRasterQueueAll>>&
 RasterTilePriorityQueueAll::GetNextQueues() {
   const auto* const_this = static_cast<const RasterTilePriorityQueueAll*>(this);
   const auto& const_queues = const_this->GetNextQueues();
-  return const_cast<std::vector<scoped_ptr<TilingSetRasterQueueAll>>&>(
+  return const_cast<std::vector<std::unique_ptr<TilingSetRasterQueueAll>>&>(
       const_queues);
 }
 
-const std::vector<scoped_ptr<TilingSetRasterQueueAll>>&
+const std::vector<std::unique_ptr<TilingSetRasterQueueAll>>&
 RasterTilePriorityQueueAll::GetNextQueues() const {
   DCHECK(!IsEmpty());
 
diff --git a/cc/tiles/raster_tile_priority_queue_all.h b/cc/tiles/raster_tile_priority_queue_all.h
index 275a731..af4983a 100644
--- a/cc/tiles/raster_tile_priority_queue_all.h
+++ b/cc/tiles/raster_tile_priority_queue_all.h
@@ -34,11 +34,12 @@
              const std::vector<PictureLayerImpl*>& pending_layers,
              TreePriority tree_priority);
 
-  std::vector<scoped_ptr<TilingSetRasterQueueAll>>& GetNextQueues();
-  const std::vector<scoped_ptr<TilingSetRasterQueueAll>>& GetNextQueues() const;
+  std::vector<std::unique_ptr<TilingSetRasterQueueAll>>& GetNextQueues();
+  const std::vector<std::unique_ptr<TilingSetRasterQueueAll>>& GetNextQueues()
+      const;
 
-  std::vector<scoped_ptr<TilingSetRasterQueueAll>> active_queues_;
-  std::vector<scoped_ptr<TilingSetRasterQueueAll>> pending_queues_;
+  std::vector<std::unique_ptr<TilingSetRasterQueueAll>> active_queues_;
+  std::vector<std::unique_ptr<TilingSetRasterQueueAll>> pending_queues_;
   TreePriority tree_priority_;
 
   DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueueAll);
diff --git a/cc/tiles/raster_tile_priority_queue_required.cc b/cc/tiles/raster_tile_priority_queue_required.cc
index 24d9789..c5969b94 100644
--- a/cc/tiles/raster_tile_priority_queue_required.cc
+++ b/cc/tiles/raster_tile_priority_queue_required.cc
@@ -12,12 +12,12 @@
 
 void AppendTilingSetRequiredQueues(
     const std::vector<PictureLayerImpl*>& layers,
-    std::vector<scoped_ptr<TilingSetRasterQueueRequired>>* queues) {
+    std::vector<std::unique_ptr<TilingSetRasterQueueRequired>>* queues) {
   for (auto* layer : layers) {
     if (!layer->HasValidTilePriorities())
       continue;
 
-    scoped_ptr<TilingSetRasterQueueRequired> tiling_set_queue(
+    std::unique_ptr<TilingSetRasterQueueRequired> tiling_set_queue(
         new TilingSetRasterQueueRequired(
             layer->picture_layer_tiling_set(),
             RasterTilePriorityQueueRequired::Type::REQUIRED_FOR_ACTIVATION));
@@ -51,7 +51,7 @@
     if (!layer->HasValidTilePriorities())
       continue;
 
-    scoped_ptr<TilingSetRasterQueueRequired> tiling_set_queue(
+    std::unique_ptr<TilingSetRasterQueueRequired> tiling_set_queue(
         new TilingSetRasterQueueRequired(layer->picture_layer_tiling_set(),
                                          Type::REQUIRED_FOR_DRAW));
     if (!tiling_set_queue->IsEmpty())
diff --git a/cc/tiles/raster_tile_priority_queue_required.h b/cc/tiles/raster_tile_priority_queue_required.h
index f88993f..a45a4ba 100644
--- a/cc/tiles/raster_tile_priority_queue_required.h
+++ b/cc/tiles/raster_tile_priority_queue_required.h
@@ -36,7 +36,7 @@
       const std::vector<PictureLayerImpl*>& active_layers,
       const std::vector<PictureLayerImpl*>& pending_layers);
 
-  std::vector<scoped_ptr<TilingSetRasterQueueRequired>> tiling_set_queues_;
+  std::vector<std::unique_ptr<TilingSetRasterQueueRequired>> tiling_set_queues_;
 
   DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueueRequired);
 };
diff --git a/cc/tiles/software_image_decode_controller.cc b/cc/tiles/software_image_decode_controller.cc
index b6e84de7..3f52af5 100644
--- a/cc/tiles/software_image_decode_controller.cc
+++ b/cc/tiles/software_image_decode_controller.cc
@@ -8,8 +8,13 @@
 
 #include <functional>
 
+#include "base/format_macros.h"
 #include "base/macros.h"
 #include "base/memory/discardable_memory.h"
+#include "base/memory/ptr_util.h"
+#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
+#include "base/trace_event/memory_dump_manager.h"
 #include "cc/debug/devtools_instrumentation.h"
 #include "cc/raster/tile_task_runner.h"
 #include "third_party/skia/include/core/SkCanvas.h"
@@ -144,7 +149,15 @@
     : decoded_images_(ImageMRUCache::NO_AUTO_EVICT),
       at_raster_decoded_images_(ImageMRUCache::NO_AUTO_EVICT),
       locked_images_budget_(kLockedMemoryLimitBytes),
-      format_(format) {}
+      format_(format) {
+  // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
+  // Don't register a dump provider in these cases.
+  if (base::ThreadTaskRunnerHandle::IsSet()) {
+    base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
+        this, "cc::SoftwareImageDecodeController",
+        base::ThreadTaskRunnerHandle::Get());
+  }
+}
 
 SoftwareImageDecodeController::SoftwareImageDecodeController()
     : SoftwareImageDecodeController(RGBA_8888) {}
@@ -152,6 +165,10 @@
 SoftwareImageDecodeController::~SoftwareImageDecodeController() {
   DCHECK_EQ(0u, decoded_images_ref_counts_.size());
   DCHECK_EQ(0u, at_raster_decoded_images_ref_counts_.size());
+
+  // It is safe to unregister, even if we didn't register in the constructor.
+  base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
+      this);
 }
 
 bool SoftwareImageDecodeController::GetTaskForImageAndRef(
@@ -331,7 +348,7 @@
     decoded_images_.Erase(image_it);
   }
 
-  scoped_ptr<DecodedImage> decoded_image;
+  std::unique_ptr<DecodedImage> decoded_image;
   {
     base::AutoUnlock unlock(lock_);
     decoded_image = DecodeImageInternal(key, image);
@@ -367,7 +384,7 @@
   SanityCheckState(__LINE__, true);
 }
 
-scoped_ptr<SoftwareImageDecodeController::DecodedImage>
+std::unique_ptr<SoftwareImageDecodeController::DecodedImage>
 SoftwareImageDecodeController::DecodeImageInternal(
     const ImageKey& key,
     const DrawImage& draw_image) {
@@ -381,7 +398,7 @@
   if (key.can_use_original_decode()) {
     SkImageInfo decoded_info =
         CreateImageInfo(image->width(), image->height(), format_);
-    scoped_ptr<base::DiscardableMemory> decoded_pixels;
+    std::unique_ptr<base::DiscardableMemory> decoded_pixels;
     {
       TRACE_EVENT0(
           "disabled-by-default-cc.debug",
@@ -406,8 +423,9 @@
       }
     }
 
-    return make_scoped_ptr(new DecodedImage(
-        decoded_info, std::move(decoded_pixels), SkSize::Make(0, 0)));
+    return base::WrapUnique(
+        new DecodedImage(decoded_info, std::move(decoded_pixels),
+                         SkSize::Make(0, 0), next_tracing_id_.GetNext()));
   }
 
   // If we get here, that means we couldn't use the original sized decode for
@@ -452,7 +470,7 @@
   DCHECK(!key.target_size().IsEmpty());
   SkImageInfo scaled_info = CreateImageInfo(
       key.target_size().width(), key.target_size().height(), format_);
-  scoped_ptr<base::DiscardableMemory> scaled_pixels;
+  std::unique_ptr<base::DiscardableMemory> scaled_pixels;
   {
     TRACE_EVENT0(
         "disabled-by-default-cc.debug",
@@ -476,13 +494,14 @@
   }
 
   // Release the original sized decode. Any other intermediate result to release
-  // would be the subrect memory. However, that's in a scoped_ptr and will be
+  // would be the subrect memory. However, that's in a unique_ptr and will be
   // deleted automatically when we return.
   DrawWithImageFinished(original_size_draw_image, decoded_draw_image);
 
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new DecodedImage(scaled_info, std::move(scaled_pixels),
-                       SkSize::Make(-key.src_rect().x(), -key.src_rect().y())));
+                       SkSize::Make(-key.src_rect().x(), -key.src_rect().y()),
+                       next_tracing_id_.GetNext()));
 }
 
 DecodedDrawImage SoftwareImageDecodeController::GetDecodedImageForDraw(
@@ -511,7 +530,7 @@
   auto decoded_images_it = decoded_images_.Get(key);
   // If we found the image and it's locked, then return it. If it's not locked,
   // erase it from the cache since it might be put into the at-raster cache.
-  scoped_ptr<DecodedImage> scoped_decoded_image;
+  std::unique_ptr<DecodedImage> scoped_decoded_image;
   DecodedImage* decoded_image = nullptr;
   if (decoded_images_it != decoded_images_.end()) {
     decoded_image = decoded_images_it->second.get();
@@ -696,6 +715,42 @@
   pending_image_tasks_.erase(key);
 }
 
+bool SoftwareImageDecodeController::OnMemoryDump(
+    const base::trace_event::MemoryDumpArgs& args,
+    base::trace_event::ProcessMemoryDump* pmd) {
+  base::AutoLock lock(lock_);
+
+  // Dump each of our caches.
+  DumpImageMemoryForCache(decoded_images_, "cached", pmd);
+  DumpImageMemoryForCache(at_raster_decoded_images_, "at_raster", pmd);
+
+  // Memory dump can't fail, always return true.
+  return true;
+}
+
+void SoftwareImageDecodeController::DumpImageMemoryForCache(
+    const ImageMRUCache& cache,
+    const char* cache_name,
+    base::trace_event::ProcessMemoryDump* pmd) const {
+  lock_.AssertAcquired();
+
+  for (const auto& image_pair : cache) {
+    std::string dump_name = base::StringPrintf(
+        "cc/image_memory/controller_%p/%s/image_%" PRIu64 "_id_%d", this,
+        cache_name, image_pair.second->tracing_id(),
+        image_pair.first.image_id());
+    base::trace_event::MemoryAllocatorDump* dump =
+        image_pair.second->memory()->CreateMemoryAllocatorDump(
+            dump_name.c_str(), pmd);
+    DCHECK(dump);
+    if (image_pair.second->is_locked()) {
+      dump->AddScalar("locked_size",
+                      base::trace_event::MemoryAllocatorDump::kUnitsBytes,
+                      image_pair.first.locked_bytes());
+    }
+  }
+}
+
 void SoftwareImageDecodeController::SanityCheckState(int line,
                                                      bool lock_acquired) {
 #if DCHECK_IS_ON()
@@ -839,12 +894,14 @@
 // DecodedImage
 SoftwareImageDecodeController::DecodedImage::DecodedImage(
     const SkImageInfo& info,
-    scoped_ptr<base::DiscardableMemory> memory,
-    const SkSize& src_rect_offset)
+    std::unique_ptr<base::DiscardableMemory> memory,
+    const SkSize& src_rect_offset,
+    uint64_t tracing_id)
     : locked_(true),
       image_info_(info),
       memory_(std::move(memory)),
-      src_rect_offset_(src_rect_offset) {
+      src_rect_offset_(src_rect_offset),
+      tracing_id_(tracing_id) {
   image_ = skia::AdoptRef(SkImage::NewFromRaster(
       image_info_, memory_->data(), image_info_.minRowBytes(),
       [](const void* pixels, void* context) {}, nullptr));
diff --git a/cc/tiles/software_image_decode_controller.h b/cc/tiles/software_image_decode_controller.h
index 4e959c7f..a6262e9d 100644
--- a/cc/tiles/software_image_decode_controller.h
+++ b/cc/tiles/software_image_decode_controller.h
@@ -7,15 +7,18 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <unordered_map>
 #include <unordered_set>
 
+#include "base/atomic_sequence_num.h"
 #include "base/containers/mru_cache.h"
 #include "base/hash.h"
 #include "base/memory/discardable_memory_allocator.h"
 #include "base/memory/ref_counted.h"
 #include "base/numerics/safe_math.h"
 #include "base/threading/thread_checker.h"
+#include "base/trace_event/memory_dump_provider.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/decoded_draw_image.h"
 #include "cc/playback/draw_image.h"
@@ -93,7 +96,9 @@
   }
 };
 
-class CC_EXPORT SoftwareImageDecodeController : public ImageDecodeController {
+class CC_EXPORT SoftwareImageDecodeController
+    : public ImageDecodeController,
+      public base::trace_event::MemoryDumpProvider {
  public:
   using ImageKey = ImageDecodeControllerKey;
   using ImageKeyHash = ImageDecodeControllerKeyHash;
@@ -118,14 +123,19 @@
 
   void RemovePendingTask(const ImageKey& key);
 
+  // MemoryDumpProvider overrides.
+  bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+                    base::trace_event::ProcessMemoryDump* pmd) override;
+
  private:
   // DecodedImage is a convenience storage for discardable memory. It can also
   // construct an image out of SkImageInfo and stored discardable memory.
   class DecodedImage {
    public:
     DecodedImage(const SkImageInfo& info,
-                 scoped_ptr<base::DiscardableMemory> memory,
-                 const SkSize& src_rect_offset);
+                 std::unique_ptr<base::DiscardableMemory> memory,
+                 const SkSize& src_rect_offset,
+                 uint64_t tracing_id);
     ~DecodedImage();
 
     SkImage* image() const {
@@ -139,17 +149,23 @@
     bool Lock();
     void Unlock();
 
+    const base::DiscardableMemory* memory() const { return memory_.get(); }
+
+    // An ID which uniquely identifies this DecodedImage within the image decode
+    // controller. Used in memory tracing.
+    uint64_t tracing_id() const { return tracing_id_; }
+
    private:
     bool locked_;
     SkImageInfo image_info_;
-    scoped_ptr<base::DiscardableMemory> memory_;
+    std::unique_ptr<base::DiscardableMemory> memory_;
     skia::RefPtr<SkImage> image_;
     SkSize src_rect_offset_;
+    uint64_t tracing_id_;
   };
 
   // MemoryBudget is a convenience class for memory bookkeeping and ensuring
   // that we don't go over the limit when pre-decoding.
-  // TODO(vmpstr): Add memory infra to keep track of memory usage of this class.
   class MemoryBudget {
    public:
     explicit MemoryBudget(size_t limit_bytes);
@@ -166,6 +182,10 @@
     base::CheckedNumeric<size_t> current_usage_bytes_;
   };
 
+  using ImageMRUCache = base::HashingMRUCache<ImageKey,
+                                              std::unique_ptr<DecodedImage>,
+                                              ImageKeyHash>;
+
   // Looks for the key in the cache and returns true if it was found and was
   // successfully locked (or if it was already locked). Note that if this
   // function returns true, then a ref count is increased for the image.
@@ -174,8 +194,9 @@
   // Actually decode the image. Note that this function can (and should) be
   // called with no lock acquired, since it can do a lot of work. Note that it
   // can also return nullptr to indicate the decode failed.
-  scoped_ptr<DecodedImage> DecodeImageInternal(const ImageKey& key,
-                                               const DrawImage& draw_image);
+  std::unique_ptr<DecodedImage> DecodeImageInternal(
+      const ImageKey& key,
+      const DrawImage& draw_image);
 
   // Get the decoded draw image for the given key and draw_image. Note that this
   // function has to be called with no lock acquired, since it will acquire its
@@ -199,6 +220,11 @@
   // more of them.
   bool CanHandleImage(const ImageKey& key);
 
+  // Helper function which dumps all images in a specific ImageMRUCache.
+  void DumpImageMemoryForCache(const ImageMRUCache& cache,
+                               const char* cache_name,
+                               base::trace_event::ProcessMemoryDump* pmd) const;
+
   std::unordered_map<ImageKey, scoped_refptr<ImageDecodeTask>, ImageKeyHash>
       pending_image_tasks_;
 
@@ -206,9 +232,6 @@
   // ensure that they are safe to access on multiple threads.
   base::Lock lock_;
 
-  using ImageMRUCache =
-      base::HashingMRUCache<ImageKey, scoped_ptr<DecodedImage>, ImageKeyHash>;
-
   // Decoded images and ref counts (predecode path).
   ImageMRUCache decoded_images_;
   std::unordered_map<ImageKey, int, ImageKeyHash> decoded_images_ref_counts_;
@@ -226,6 +249,9 @@
   std::unordered_set<uint32_t> prerolled_images_;
 
   ResourceFormat format_;
+
+  // Used to uniquely identify DecodedImages for memory traces.
+  base::AtomicSequenceNumber next_tracing_id_;
 };
 
 }  // namespace cc
diff --git a/cc/tiles/tile.h b/cc/tiles/tile.h
index 99497f3..f6dd675 100644
--- a/cc/tiles/tile.h
+++ b/cc/tiles/tile.h
@@ -149,7 +149,7 @@
   DISALLOW_COPY_AND_ASSIGN(Tile);
 };
 
-using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>;
+using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>;
 
 }  // namespace cc
 
diff --git a/cc/tiles/tile_draw_info.h b/cc/tiles/tile_draw_info.h
index 6d694eb..4178383 100644
--- a/cc/tiles/tile_draw_info.h
+++ b/cc/tiles/tile_draw_info.h
@@ -5,7 +5,8 @@
 #ifndef CC_TILES_TILE_DRAW_INFO_H_
 #define CC_TILES_TILE_DRAW_INFO_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/raster/tile_task_runner.h"
 #include "cc/resources/platform_color.h"
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index 68408e4d..2af48b5 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -15,6 +15,7 @@
 #include "base/json/json_writer.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/trace_event/trace_event_argument.h"
@@ -126,7 +127,7 @@
   uint64_t resource_content_id_;
   int source_frame_number_;
   const base::Callback<void(bool)> reply_;
-  scoped_ptr<RasterBuffer> raster_buffer_;
+  std::unique_ptr<RasterBuffer> raster_buffer_;
 
   DISALLOW_COPY_AND_ASSIGN(RasterTaskImpl);
 };
@@ -255,9 +256,9 @@
 RasterTaskCompletionStats::RasterTaskCompletionStats()
     : completed_count(0u), canceled_count(0u) {}
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats) {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   state->SetInteger("completed_count",
                     base::saturated_cast<int>(stats.completed_count));
@@ -267,7 +268,7 @@
 }
 
 // static
-scoped_ptr<TileManager> TileManager::Create(
+std::unique_ptr<TileManager> TileManager::Create(
     TileManagerClient* client,
     base::SequencedTaskRunner* task_runner,
     size_t scheduled_raster_task_limit,
@@ -275,7 +276,7 @@
   // TODO(vmpstr): |task_runner| is a raw pointer that is implicitly converted
   // into a scoped_refptr. Figure out whether to plumb a ref pointer or whether
   // tile manager can have a non-owning pointer and fix.
-  return make_scoped_ptr(new TileManager(
+  return base::WrapUnique(new TileManager(
       client, task_runner, scheduled_raster_task_limit, use_partial_raster));
 }
 
@@ -444,7 +445,7 @@
   CleanUpReleasedTiles();
 
   PrioritizedTileVector tiles_that_need_to_be_rasterized;
-  scoped_ptr<RasterTilePriorityQueue> raster_priority_queue(
+  std::unique_ptr<RasterTilePriorityQueue> raster_priority_queue(
       client_->BuildRasterQueue(global_state_.tree_priority,
                                 RasterTilePriorityQueue::Type::ALL));
   AssignGpuMemoryToTiles(raster_priority_queue.get(),
@@ -482,9 +483,9 @@
   flush_stats_ = RasterTaskCompletionStats();
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 TileManager::BasicStateAsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> value(
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   BasicStateAsValueInto(value.get());
   return std::move(value);
@@ -499,9 +500,9 @@
   state->EndDictionary();
 }
 
-scoped_ptr<EvictionTilePriorityQueue>
+std::unique_ptr<EvictionTilePriorityQueue>
 TileManager::FreeTileResourcesUntilUsageIsWithinLimit(
-    scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
+    std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
     const MemoryUsage& limit,
     MemoryUsage* usage) {
   while (usage->Exceeds(limit)) {
@@ -520,9 +521,9 @@
   return eviction_priority_queue;
 }
 
-scoped_ptr<EvictionTilePriorityQueue>
+std::unique_ptr<EvictionTilePriorityQueue>
 TileManager::FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
-    scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
+    std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
     const MemoryUsage& limit,
     const TilePriority& other_priority,
     MemoryUsage* usage) {
@@ -591,7 +592,7 @@
   MemoryUsage memory_usage(resource_pool_->memory_usage_bytes(),
                            resource_pool_->resource_count());
 
-  scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue;
+  std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue;
   for (; !raster_priority_queue->IsEmpty(); raster_priority_queue->Pop()) {
     const PrioritizedTile& prioritized_tile = raster_priority_queue->Top();
     Tile* tile = prioritized_tile.tile();
@@ -953,7 +954,7 @@
 
 bool TileManager::AreRequiredTilesReadyToDraw(
     RasterTilePriorityQueue::Type type) const {
-  scoped_ptr<RasterTilePriorityQueue> raster_priority_queue(
+  std::unique_ptr<RasterTilePriorityQueue> raster_priority_queue(
       client_->BuildRasterQueue(global_state_.tree_priority, type));
   // It is insufficient to check whether the raster queue we constructed is
   // empty. The reason for this is that there are situations (rasterize on
@@ -966,7 +967,7 @@
   }
 
 #if DCHECK_IS_ON()
-  scoped_ptr<RasterTilePriorityQueue> all_queue(
+  std::unique_ptr<RasterTilePriorityQueue> all_queue(
       client_->BuildRasterQueue(global_state_.tree_priority, type));
   for (; !all_queue->IsEmpty(); all_queue->Pop()) {
     Tile* tile = all_queue->Top().tile();
@@ -1037,7 +1038,7 @@
   // When OOM, keep re-assigning memory until we reach a steady state
   // where top-priority tiles are initialized.
   PrioritizedTileVector tiles_that_need_to_be_rasterized;
-  scoped_ptr<RasterTilePriorityQueue> raster_priority_queue(
+  std::unique_ptr<RasterTilePriorityQueue> raster_priority_queue(
       client_->BuildRasterQueue(global_state_.tree_priority,
                                 RasterTilePriorityQueue::Type::ALL));
   AssignGpuMemoryToTiles(raster_priority_queue.get(),
@@ -1102,7 +1103,7 @@
 }
 
 bool TileManager::MarkTilesOutOfMemory(
-    scoped_ptr<RasterTilePriorityQueue> queue) const {
+    std::unique_ptr<RasterTilePriorityQueue> queue) const {
   // Mark required tiles as OOM so that we can activate/draw without them.
   if (queue->IsEmpty())
     return false;
@@ -1125,9 +1126,9 @@
   return tile_task_runner_->GetResourceRequiresSwizzle(!tile->is_opaque());
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 TileManager::ScheduledTasksStateAsValue() const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   state->BeginDictionary("tasks_pending");
   state->SetBoolean("ready_to_activate", signals_.ready_to_activate);
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index 6b5745e..94eac03 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -8,13 +8,13 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <unordered_map>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "cc/base/unique_notifier.h"
 #include "cc/playback/raster_source.h"
@@ -60,14 +60,14 @@
   // Given an empty raster tile priority queue, this will build a priority queue
   // that will return tiles in order in which they should be rasterized.
   // Note if the queue was previous built, Reset must be called on it.
-  virtual scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
+  virtual std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue(
       TreePriority tree_priority,
       RasterTilePriorityQueue::Type type) = 0;
 
   // Given an empty eviction tile priority queue, this will build a priority
   // queue that will return tiles in order in which they should be evicted.
   // Note if the queue was previous built, Reset must be called on it.
-  virtual scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
+  virtual std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
       TreePriority tree_priority) = 0;
 
   // Informs the client that due to the currently rasterizing (or scheduled to
@@ -85,7 +85,7 @@
   size_t completed_count;
   size_t canceled_count;
 };
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats);
 
 // This class manages tiles, deciding which should get rasterized and which
@@ -94,10 +94,11 @@
 // created, and unregister from the manager when they are deleted.
 class CC_EXPORT TileManager {
  public:
-  static scoped_ptr<TileManager> Create(TileManagerClient* client,
-                                        base::SequencedTaskRunner* task_runner,
-                                        size_t scheduled_raster_task_limit,
-                                        bool use_partial_raster);
+  static std::unique_ptr<TileManager> Create(
+      TileManagerClient* client,
+      base::SequencedTaskRunner* task_runner,
+      size_t scheduled_raster_task_limit,
+      bool use_partial_raster);
   virtual ~TileManager();
 
   // Assigns tile memory and schedules work to prepare tiles for drawing.
@@ -133,8 +134,8 @@
   bool IsReadyToActivate() const;
   bool IsReadyToDraw() const;
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> BasicStateAsValue()
-      const;
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+  BasicStateAsValue() const;
   void BasicStateAsValueInto(base::trace_event::TracedValue* dict) const;
   const MemoryHistory::Entry& memory_stats_from_last_assign() const {
     return memory_stats_from_last_assign_;
@@ -251,14 +252,14 @@
   scoped_refptr<RasterTask> CreateRasterTask(
       const PrioritizedTile& prioritized_tile);
 
-  scoped_ptr<EvictionTilePriorityQueue>
+  std::unique_ptr<EvictionTilePriorityQueue>
   FreeTileResourcesUntilUsageIsWithinLimit(
-      scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
+      std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
       const MemoryUsage& limit,
       MemoryUsage* usage);
-  scoped_ptr<EvictionTilePriorityQueue>
+  std::unique_ptr<EvictionTilePriorityQueue>
   FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
-      scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
+      std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
       const MemoryUsage& limit,
       const TilePriority& oother_priority,
       MemoryUsage* usage);
@@ -266,7 +267,8 @@
   bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const;
   void CheckIfMoreTilesNeedToBePrepared();
   void CheckAndIssueSignals();
-  bool MarkTilesOutOfMemory(scoped_ptr<RasterTilePriorityQueue> queue) const;
+  bool MarkTilesOutOfMemory(
+      std::unique_ptr<RasterTilePriorityQueue> queue) const;
 
   ResourceFormat DetermineResourceFormat(const Tile* tile) const;
   bool DetermineResourceRequiresSwizzle(const Tile* tile) const;
@@ -278,7 +280,7 @@
   scoped_refptr<TileTask> CreateTaskSetFinishedTask(
       void (TileManager::*callback)());
 
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
   ScheduledTasksStateAsValue() const;
 
   TileManagerClient* client_;
diff --git a/cc/tiles/tile_manager_perftest.cc b/cc/tiles/tile_manager_perftest.cc
index cc0a414..d4ef597 100644
--- a/cc/tiles/tile_manager_perftest.cc
+++ b/cc/tiles/tile_manager_perftest.cc
@@ -71,13 +71,13 @@
   }
 
   // Overridden from TileTaskClient:
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t new_content_id,
       uint64_t previous_content_id) override {
     return nullptr;
   }
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {}
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override {}
 
  private:
   TileTask::Vector completed_tasks_;
@@ -166,7 +166,7 @@
     // Clear recycled tree.
     pending_tree->ClearLayers();
 
-    scoped_ptr<FakePictureLayerImpl> pending_layer =
+    std::unique_ptr<FakePictureLayerImpl> pending_layer =
         FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_,
                                                      raster_source);
     pending_layer->SetDrawsContent(true);
@@ -191,8 +191,9 @@
 
     timer_.Reset();
     do {
-      scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
-          priorities[priority_count], RasterTilePriorityQueue::Type::ALL));
+      std::unique_ptr<RasterTilePriorityQueue> queue(
+          host_impl_.BuildRasterQueue(priorities[priority_count],
+                                      RasterTilePriorityQueue::Type::ALL));
       priority_count = (priority_count + 1) % arraysize(priorities);
       timer_.NextLap();
     } while (!timer_.HasTimeLimitExpired());
@@ -220,8 +221,9 @@
     timer_.Reset();
     do {
       int count = tile_count;
-      scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
-          priorities[priority_count], RasterTilePriorityQueue::Type::ALL));
+      std::unique_ptr<RasterTilePriorityQueue> queue(
+          host_impl_.BuildRasterQueue(priorities[priority_count],
+                                      RasterTilePriorityQueue::Type::ALL));
       while (count--) {
         ASSERT_FALSE(queue->IsEmpty());
         ASSERT_TRUE(queue->Top().tile());
@@ -258,7 +260,7 @@
 
     timer_.Reset();
     do {
-      scoped_ptr<EvictionTilePriorityQueue> queue(
+      std::unique_ptr<EvictionTilePriorityQueue> queue(
           host_impl_.BuildEvictionQueue(priorities[priority_count]));
       priority_count = (priority_count + 1) % arraysize(priorities);
       timer_.NextLap();
@@ -293,7 +295,7 @@
     timer_.Reset();
     do {
       int count = tile_count;
-      scoped_ptr<EvictionTilePriorityQueue> queue(
+      std::unique_ptr<EvictionTilePriorityQueue> queue(
           host_impl_.BuildEvictionQueue(priorities[priority_count]));
       while (count--) {
         ASSERT_FALSE(queue->IsEmpty());
@@ -350,7 +352,7 @@
     scoped_refptr<FakeRasterSource> raster_source =
         FakeRasterSource::CreateFilled(layer_bounds);
     while (static_cast<int>(layers.size()) < layer_count) {
-      scoped_ptr<FakePictureLayerImpl> layer =
+      std::unique_ptr<FakePictureLayerImpl> layer =
           FakePictureLayerImpl::CreateWithRasterSource(
               host_impl_.pending_tree(), next_id, raster_source);
       layer->SetBounds(layer_bounds);
@@ -417,7 +419,7 @@
   int max_tiles_;
   int id_;
   FakeImplTaskRunnerProvider task_runner_provider_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   FakeLayerTreeHostImpl host_impl_;
   FakePictureLayerImpl* pending_root_layer_;
   FakePictureLayerImpl* active_root_layer_;
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index ba8f369..7a12156 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -5,6 +5,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/playback/raster_source.h"
@@ -134,7 +135,7 @@
       pending_layer = static_cast<FakePictureLayerImpl*>(old_pending_root);
       pending_layer->SetRasterSourceOnPending(raster_source, Region());
     } else {
-      scoped_ptr<FakePictureLayerImpl> new_root =
+      std::unique_ptr<FakePictureLayerImpl> new_root =
           FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_,
                                                        raster_source);
       pending_layer = new_root.get();
@@ -167,7 +168,7 @@
   bool ready_to_activate_;
   int id_;
   FakeImplTaskRunnerProvider task_runner_provider_;
-  scoped_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<OutputSurface> output_surface_;
   FakeLayerTreeHostImpl host_impl_;
   FakePictureLayerImpl* pending_layer_;
   FakePictureLayerImpl* active_layer_;
@@ -178,7 +179,7 @@
   host_impl_.SetViewportSize(layer_bounds);
   SetupDefaultTrees(layer_bounds);
 
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -479,7 +480,7 @@
     }
   }
 
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SMOOTHNESS_TAKES_PRIORITY, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -546,7 +547,7 @@
     }
   }
 
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -632,7 +633,7 @@
 
   // The actual test will now build different queues and verify that the queues
   // return the same information as computed manually above.
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   std::set<Tile*> actual_now_tiles;
   std::set<Tile*> actual_all_tiles;
@@ -679,7 +680,7 @@
   // Create a pending child layer.
   scoped_refptr<FakeRasterSource> pending_raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
-  scoped_ptr<FakePictureLayerImpl> pending_child =
+  std::unique_ptr<FakePictureLayerImpl> pending_child =
       FakePictureLayerImpl::CreateWithRasterSource(
           host_impl_.pending_tree(), id_ + 1, pending_raster_source);
   FakePictureLayerImpl* pending_child_raw = pending_child.get();
@@ -695,7 +696,7 @@
   host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text);
 
   host_impl_.SetRequiresHighResToDraw();
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SMOOTHNESS_TAKES_PRIORITY, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -727,14 +728,15 @@
   ASSERT_TRUE(pending_layer_->HighResTiling());
   EXPECT_FALSE(pending_layer_->LowResTiling());
 
-  scoped_ptr<EvictionTilePriorityQueue> empty_queue(
+  std::unique_ptr<EvictionTilePriorityQueue> empty_queue(
       host_impl_.BuildEvictionQueue(SAME_PRIORITY_FOR_BOTH_TREES));
   EXPECT_TRUE(empty_queue->IsEmpty());
   std::set<Tile*> all_tiles;
   size_t tile_count = 0;
 
-  scoped_ptr<RasterTilePriorityQueue> raster_queue(host_impl_.BuildRasterQueue(
-      SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
+  std::unique_ptr<RasterTilePriorityQueue> raster_queue(
+      host_impl_.BuildRasterQueue(SAME_PRIORITY_FOR_BOTH_TREES,
+                                  RasterTilePriorityQueue::Type::ALL));
   while (!raster_queue->IsEmpty()) {
     ++tile_count;
     EXPECT_TRUE(raster_queue->Top().tile());
@@ -748,7 +750,7 @@
   tile_manager()->InitializeTilesWithResourcesForTesting(
       std::vector<Tile*>(all_tiles.begin(), all_tiles.end()));
 
-  scoped_ptr<EvictionTilePriorityQueue> queue(
+  std::unique_ptr<EvictionTilePriorityQueue> queue(
       host_impl_.BuildEvictionQueue(SMOOTHNESS_TAKES_PRIORITY));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -902,7 +904,7 @@
       FakeRasterSource::CreateFilled(layer_bounds);
   SetupPendingTree(pending_raster_source);
 
-  scoped_ptr<FakePictureLayerImpl> pending_child =
+  std::unique_ptr<FakePictureLayerImpl> pending_child =
       FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2,
                                                    pending_raster_source);
   pending_layer_->AddChild(std::move(pending_child));
@@ -925,8 +927,9 @@
 
   std::set<Tile*> all_tiles;
   size_t tile_count = 0;
-  scoped_ptr<RasterTilePriorityQueue> raster_queue(host_impl_.BuildRasterQueue(
-      SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
+  std::unique_ptr<RasterTilePriorityQueue> raster_queue(
+      host_impl_.BuildRasterQueue(SAME_PRIORITY_FOR_BOTH_TREES,
+                                  RasterTilePriorityQueue::Type::ALL));
   while (!raster_queue->IsEmpty()) {
     ++tile_count;
     EXPECT_TRUE(raster_queue->Top().tile());
@@ -973,7 +976,7 @@
   TreePriority tree_priority = NEW_CONTENT_TAKES_PRIORITY;
   size_t occluded_count = 0u;
   PrioritizedTile last_tile;
-  scoped_ptr<EvictionTilePriorityQueue> queue(
+  std::unique_ptr<EvictionTilePriorityQueue> queue(
       host_impl_.BuildEvictionQueue(tree_priority));
   while (!queue->IsEmpty()) {
     PrioritizedTile prioritized_tile = queue->Top();
@@ -1018,7 +1021,7 @@
       FakeRasterSource::CreateFilled(layer_bounds);
   SetupPendingTree(pending_raster_source);
 
-  scoped_ptr<FakePictureLayerImpl> pending_child =
+  std::unique_ptr<FakePictureLayerImpl> pending_child =
       FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2,
                                                    pending_raster_source);
   FakePictureLayerImpl* pending_child_layer = pending_child.get();
@@ -1078,7 +1081,7 @@
   TreePriority tree_priority = NEW_CONTENT_TAKES_PRIORITY;
   std::set<Tile*> new_content_tiles;
   size_t tile_count = 0;
-  scoped_ptr<EvictionTilePriorityQueue> queue(
+  std::unique_ptr<EvictionTilePriorityQueue> queue(
       host_impl_.BuildEvictionQueue(tree_priority));
   while (!queue->IsEmpty()) {
     PrioritizedTile prioritized_tile = queue->Top();
@@ -1103,7 +1106,7 @@
   host_impl_.SetViewportSize(layer_bounds);
   SetupDefaultTrees(layer_bounds);
 
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -1120,7 +1123,7 @@
   EXPECT_EQ(16u, tile_count);
 
   for (int i = 1; i < 10; ++i) {
-    scoped_ptr<FakePictureLayerImpl> pending_layer =
+    std::unique_ptr<FakePictureLayerImpl> pending_layer =
         FakePictureLayerImpl::Create(host_impl_.pending_tree(), id_ + i);
     pending_layer->SetDrawsContent(true);
     pending_layer->set_has_valid_tile_priorities(true);
@@ -1148,8 +1151,9 @@
   host_impl_.SetViewportSize(layer_bounds);
   SetupDefaultTrees(layer_bounds);
 
-  scoped_ptr<RasterTilePriorityQueue> raster_queue(host_impl_.BuildRasterQueue(
-      SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
+  std::unique_ptr<RasterTilePriorityQueue> raster_queue(
+      host_impl_.BuildRasterQueue(SAME_PRIORITY_FOR_BOTH_TREES,
+                                  RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(raster_queue->IsEmpty());
 
   size_t tile_count = 0;
@@ -1167,14 +1171,14 @@
   host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(tiles);
 
   for (int i = 1; i < 10; ++i) {
-    scoped_ptr<FakePictureLayerImpl> pending_layer =
+    std::unique_ptr<FakePictureLayerImpl> pending_layer =
         FakePictureLayerImpl::Create(host_impl_.pending_tree(), id_ + i);
     pending_layer->SetDrawsContent(true);
     pending_layer->set_has_valid_tile_priorities(true);
     pending_layer_->AddChild(std::move(pending_layer));
   }
 
-  scoped_ptr<EvictionTilePriorityQueue> queue(
+  std::unique_ptr<EvictionTilePriorityQueue> queue(
       host_impl_.BuildEvictionQueue(SAME_PRIORITY_FOR_BOTH_TREES));
   EXPECT_FALSE(queue->IsEmpty());
 
@@ -1204,10 +1208,11 @@
   client.SetTileSize(gfx::Size(30, 30));
   LayerTreeSettings settings;
 
-  scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create(
-      ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
-      settings.skewport_target_time_in_seconds,
-      settings.skewport_extrapolation_limit_in_content_pixels);
+  std::unique_ptr<PictureLayerTilingSet> tiling_set =
+      PictureLayerTilingSet::Create(
+          ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
+          settings.skewport_target_time_in_seconds,
+          settings.skewport_extrapolation_limit_in_content_pixels);
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
@@ -1227,7 +1232,7 @@
   // 3. Third iteration ensures that no tiles are returned, since they were all
   //    marked as ready to draw.
   for (int i = 0; i < 3; ++i) {
-    scoped_ptr<TilingSetRasterQueueAll> queue(
+    std::unique_ptr<TilingSetRasterQueueAll> queue(
         new TilingSetRasterQueueAll(tiling_set.get(), false));
 
     // There are 3 bins in TilePriority.
@@ -1313,10 +1318,11 @@
   client.SetTileSize(gfx::Size(30, 30));
   LayerTreeSettings settings;
 
-  scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create(
-      ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
-      settings.skewport_target_time_in_seconds,
-      settings.skewport_extrapolation_limit_in_content_pixels);
+  std::unique_ptr<PictureLayerTilingSet> tiling_set =
+      PictureLayerTilingSet::Create(
+          ACTIVE_TREE, &client, settings.tiling_interest_area_padding,
+          settings.skewport_target_time_in_seconds,
+          settings.skewport_extrapolation_limit_in_content_pixels);
 
   scoped_refptr<FakeRasterSource> raster_source =
       FakeRasterSource::CreateFilled(layer_bounds);
@@ -1337,7 +1343,7 @@
   PrioritizedTile last_tile;
   int eventually_bin_order_correct_count = 0;
   int eventually_bin_order_incorrect_count = 0;
-  scoped_ptr<TilingSetRasterQueueAll> queue(
+  std::unique_ptr<TilingSetRasterQueueAll> queue(
       new TilingSetRasterQueueAll(tiling_set.get(), false));
   for (; !queue->IsEmpty(); queue->Pop()) {
     if (!last_tile.tile())
@@ -1382,7 +1388,7 @@
   SetupDefaultTrees(layer_bounds);
 
   // Verify that the queue has a required for draw tile at Top.
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
   EXPECT_TRUE(queue->Top().tile()->required_for_draw());
@@ -1399,7 +1405,7 @@
   SetupDefaultTrees(layer_bounds);
 
   // Verify that the queue has a required for draw tile at Top.
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
   EXPECT_TRUE(queue->Top().tile()->required_for_draw());
@@ -1420,7 +1426,7 @@
   SetupDefaultTrees(layer_bounds);
 
   // Verify that the queue has a required for draw tile at Top.
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
   EXPECT_TRUE(queue->Top().tile()->required_for_draw());
@@ -1472,8 +1478,9 @@
   FakePictureLayerTilingClient pending_client;
   pending_client.SetTileSize(gfx::Size(64, 64));
 
-  scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create(
-      WhichTree::ACTIVE_TREE, &pending_client, 1.0f, 1.0f, 1000);
+  std::unique_ptr<PictureLayerTilingSet> tiling_set =
+      PictureLayerTilingSet::Create(WhichTree::ACTIVE_TREE, &pending_client,
+                                    1.0f, 1.0f, 1000);
   pending_client.set_twin_tiling_set(tiling_set.get());
 
   auto* tiling = tiling_set->AddTiling(1.0f, raster_source);
@@ -1493,7 +1500,7 @@
         intersecting_rect,      // Skewport rect.
         intersecting_rect,      // Soon rect.
         intersecting_rect);     // Eventually rect.
-    scoped_ptr<TilingSetRasterQueueAll> queue(
+    std::unique_ptr<TilingSetRasterQueueAll> queue(
         new TilingSetRasterQueueAll(tiling_set.get(), false));
     EXPECT_FALSE(queue->IsEmpty());
   }
@@ -1503,7 +1510,7 @@
         non_intersecting_rect,  // Skewport rect.
         intersecting_rect,      // Soon rect.
         intersecting_rect);     // Eventually rect.
-    scoped_ptr<TilingSetRasterQueueAll> queue(
+    std::unique_ptr<TilingSetRasterQueueAll> queue(
         new TilingSetRasterQueueAll(tiling_set.get(), false));
     EXPECT_FALSE(queue->IsEmpty());
   }
@@ -1513,7 +1520,7 @@
         non_intersecting_rect,  // Skewport rect.
         non_intersecting_rect,  // Soon rect.
         intersecting_rect);     // Eventually rect.
-    scoped_ptr<TilingSetRasterQueueAll> queue(
+    std::unique_ptr<TilingSetRasterQueueAll> queue(
         new TilingSetRasterQueueAll(tiling_set.get(), false));
     EXPECT_FALSE(queue->IsEmpty());
   }
@@ -1523,7 +1530,7 @@
   gfx::Size size(10, 10);
   const gfx::Size layer_bounds(1000, 1000);
 
-  scoped_ptr<FakeRecordingSource> recording_source =
+  std::unique_ptr<FakeRecordingSource> recording_source =
       FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
 
   SkPaint solid_paint;
@@ -1547,7 +1554,7 @@
   FakePictureLayerTilingClient tiling_client;
   tiling_client.SetTileSize(size);
 
-  scoped_ptr<PictureLayerImpl> layer_impl =
+  std::unique_ptr<PictureLayerImpl> layer_impl =
       PictureLayerImpl::Create(host_impl_.active_tree(), 1, false);
   PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set();
 
@@ -1582,7 +1589,7 @@
  public:
   TileManagerTest()
       : output_surface_(FakeOutputSurface::CreateSoftware(
-            make_scoped_ptr(new SoftwareOutputDevice))) {}
+            base::WrapUnique(new SoftwareOutputDevice))) {}
 
   void SetUp() override {
     LayerTreeSettings settings;
@@ -1630,7 +1637,7 @@
       pending_layer->SetRasterSourceOnPending(raster_source, Region());
     } else {
       int id = 7;
-      scoped_ptr<FakePictureLayerImpl> new_root =
+      std::unique_ptr<FakePictureLayerImpl> new_root =
           FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id,
                                                        raster_source);
       pending_layer = new_root.get();
@@ -1670,8 +1677,8 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
   FakeImplTaskRunnerProvider task_runner_provider_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<MockLayerTreeHostImpl> host_impl_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<MockLayerTreeHostImpl> host_impl_;
 };
 
 // Test to ensure that we call NotifyAllTileTasksCompleted when PrepareTiles is
@@ -1751,7 +1758,7 @@
     skia::RefPtr<SkImage> blue_image =
         skia::AdoptRef(surface->newImageSnapshot());
 
-    scoped_ptr<FakeRecordingSource> recording_source =
+    std::unique_ptr<FakeRecordingSource> recording_source =
         FakeRecordingSource::CreateFilledRecordingSource(size);
     recording_source->SetBackgroundColor(SK_ColorTRANSPARENT);
     recording_source->SetRequiresClear(true);
@@ -1767,7 +1774,7 @@
     FakePictureLayerTilingClient tiling_client;
     tiling_client.SetTileSize(size);
 
-    scoped_ptr<PictureLayerImpl> layer =
+    std::unique_ptr<PictureLayerImpl> layer =
         PictureLayerImpl::Create(host_impl_->active_tree(), 1, false);
     PictureLayerTilingSet* tiling_set = layer->picture_layer_tiling_set();
 
@@ -1839,14 +1846,14 @@
   void ScheduleTasks(TaskGraph* graph) override {}
 
   // TileTaskClient methods.
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override {
     NOTREACHED();
     return nullptr;
   }
-  void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {}
+  void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override {}
 };
 
 // Fake TileTaskRunner that just cancels all scheduled tasks immediately.
@@ -1890,7 +1897,7 @@
   LayerTreeImpl* pending_tree = host_impl_->pending_tree();
 
   // Steal from the recycled tree.
-  scoped_ptr<FakePictureLayerImpl> pending_layer =
+  std::unique_ptr<FakePictureLayerImpl> pending_layer =
       FakePictureLayerImpl::CreateWithRasterSource(pending_tree, kLayerId,
                                                    pending_raster_source);
   pending_layer->SetDrawsContent(true);
@@ -1905,7 +1912,7 @@
   host_impl_->pending_tree()->UpdateDrawProperties(false /* update_lcd_text */);
 
   // Build the raster queue and invalidate the top tile.
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl_->BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl_->BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
   queue->Top().tile()->SetInvalidated(gfx::Rect(), kInvalidatedId);
@@ -1943,7 +1950,7 @@
   }
 
   // TileTaskClient methods.
-  scoped_ptr<RasterBuffer> AcquireBufferForRaster(
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
       const Resource* resource,
       uint64_t resource_content_id,
       uint64_t previous_content_id) override {
@@ -1958,7 +1965,7 @@
 // Runs a test to ensure that partial raster is either enabled or disabled,
 // depending on |partial_raster_enabled|'s value. Takes ownership of host_impl
 // so that cleanup order can be controlled.
-void RunPartialRasterCheck(scoped_ptr<LayerTreeHostImpl> host_impl,
+void RunPartialRasterCheck(std::unique_ptr<LayerTreeHostImpl> host_impl,
                            bool partial_raster_enabled) {
   // Pick arbitrary IDs - they don't really matter as long as they're constant.
   const int kLayerId = 7;
@@ -1983,7 +1990,7 @@
   LayerTreeImpl* pending_tree = host_impl->pending_tree();
 
   // Steal from the recycled tree.
-  scoped_ptr<FakePictureLayerImpl> pending_layer =
+  std::unique_ptr<FakePictureLayerImpl> pending_layer =
       FakePictureLayerImpl::CreateWithRasterSource(pending_tree, kLayerId,
                                                    pending_raster_source);
   pending_layer->SetDrawsContent(true);
@@ -1998,7 +2005,7 @@
   host_impl->pending_tree()->UpdateDrawProperties(false /* update_lcd_text */);
 
   // Build the raster queue and invalidate the top tile.
-  scoped_ptr<RasterTilePriorityQueue> queue(host_impl->BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> queue(host_impl->BuildRasterQueue(
       SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL));
   EXPECT_FALSE(queue->IsEmpty());
   queue->Top().tile()->SetInvalidated(gfx::Rect(), kInvalidatedId);
diff --git a/cc/tiles/tile_priority.h b/cc/tiles/tile_priority.h
index 023fac53..cf0bbd1 100644
--- a/cc/tiles/tile_priority.h
+++ b/cc/tiles/tile_priority.h
@@ -9,9 +9,9 @@
 
 #include <algorithm>
 #include <limits>
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/base/cc_export.h"
 
@@ -29,7 +29,7 @@
   LAST_TREE = 1
   // Be sure to update WhichTreeAsValue when adding new fields.
 };
-scoped_ptr<base::Value> WhichTreeAsValue(WhichTree tree);
+std::unique_ptr<base::Value> WhichTreeAsValue(WhichTree tree);
 
 enum TileResolution {
   LOW_RESOLUTION = 0 ,
diff --git a/cc/trees/blocking_task_runner.cc b/cc/trees/blocking_task_runner.cc
index c276044..78ef04e 100644
--- a/cc/trees/blocking_task_runner.cc
+++ b/cc/trees/blocking_task_runner.cc
@@ -10,13 +10,14 @@
 
 #include "base/callback.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 
 namespace cc {
 
 // static
-scoped_ptr<BlockingTaskRunner> BlockingTaskRunner::Create(
+std::unique_ptr<BlockingTaskRunner> BlockingTaskRunner::Create(
     scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
-  return make_scoped_ptr(new BlockingTaskRunner(task_runner));
+  return base::WrapUnique(new BlockingTaskRunner(task_runner));
 }
 
 BlockingTaskRunner::BlockingTaskRunner(
diff --git a/cc/trees/blocking_task_runner.h b/cc/trees/blocking_task_runner.h
index a0101766..515cb25 100644
--- a/cc/trees/blocking_task_runner.h
+++ b/cc/trees/blocking_task_runner.h
@@ -5,11 +5,11 @@
 #ifndef CC_TREES_BLOCKING_TASK_RUNNER_H_
 #define CC_TREES_BLOCKING_TASK_RUNNER_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/platform_thread.h"
@@ -48,7 +48,7 @@
   // |task_runner| will be used to run the tasks which are posted while we are
   // not capturing. |task_runner| should belong to same the thread on which
   // capturing is done.
-  static scoped_ptr<BlockingTaskRunner> Create(
+  static std::unique_ptr<BlockingTaskRunner> Create(
       scoped_refptr<base::SingleThreadTaskRunner> task_runner);
 
   ~BlockingTaskRunner();
diff --git a/cc/trees/blocking_task_runner_unittest.cc b/cc/trees/blocking_task_runner_unittest.cc
index f837a7cc..86bde3d 100644
--- a/cc/trees/blocking_task_runner_unittest.cc
+++ b/cc/trees/blocking_task_runner_unittest.cc
@@ -21,7 +21,7 @@
 
 TEST(BlockingTaskRunnerTest, NoCapture) {
   bool did_run = false;
-  scoped_ptr<BlockingTaskRunner> runner(
+  std::unique_ptr<BlockingTaskRunner> runner(
       BlockingTaskRunner::Create(base::ThreadTaskRunnerHandle::Get()));
   runner->PostTask(FROM_HERE, base::Bind(&TestTask, &did_run));
   EXPECT_FALSE(did_run);
@@ -31,7 +31,7 @@
 
 TEST(BlockingTaskRunnerTest, Capture) {
   bool did_run = false;
-  scoped_ptr<BlockingTaskRunner> runner(
+  std::unique_ptr<BlockingTaskRunner> runner(
       BlockingTaskRunner::Create(base::ThreadTaskRunnerHandle::Get()));
   {
     BlockingTaskRunner::CapturePostTasks capture(runner.get());
diff --git a/cc/trees/channel_impl.h b/cc/trees/channel_impl.h
index d5d3159c..f2c2933 100644
--- a/cc/trees/channel_impl.h
+++ b/cc/trees/channel_impl.h
@@ -26,7 +26,7 @@
       const RendererCapabilities& capabilities) = 0;
   virtual void BeginMainFrameNotExpectedSoon() = 0;
   virtual void DidCommitAndDrawFrame() = 0;
-  virtual void SetAnimationEvents(scoped_ptr<AnimationEvents> queue) = 0;
+  virtual void SetAnimationEvents(std::unique_ptr<AnimationEvents> queue) = 0;
   virtual void DidLoseOutputSurface() = 0;
   virtual void RequestNewOutputSurface() = 0;
   virtual void DidInitializeOutputSurface(
@@ -34,10 +34,11 @@
       const RendererCapabilities& capabilities) = 0;
   virtual void DidCompletePageScaleAnimation() = 0;
   virtual void PostFrameTimingEventsOnMain(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0;
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events) = 0;
   virtual void BeginMainFrame(
-      scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) = 0;
+      std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) = 0;
 
  protected:
   virtual ~ChannelImpl() {}
diff --git a/cc/trees/channel_main.h b/cc/trees/channel_main.h
index 277507f..96fbb54 100644
--- a/cc/trees/channel_main.h
+++ b/cc/trees/channel_main.h
@@ -56,7 +56,7 @@
   // Must be called before using the channel.
   virtual void SynchronouslyInitializeImpl(
       LayerTreeHost* layer_tree_host,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) = 0;
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) = 0;
 
   // Must be called before deleting the channel.
   virtual void SynchronouslyCloseImpl() = 0;
diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
index f534c73..3103485 100644
--- a/cc/trees/damage_tracker.cc
+++ b/cc/trees/damage_tracker.cc
@@ -8,6 +8,7 @@
 
 #include <algorithm>
 
+#include "base/memory/ptr_util.h"
 #include "cc/base/math_util.h"
 #include "cc/layers/heads_up_display_layer_impl.h"
 #include "cc/layers/layer_impl.h"
@@ -19,8 +20,8 @@
 
 namespace cc {
 
-scoped_ptr<DamageTracker> DamageTracker::Create() {
-  return make_scoped_ptr(new DamageTracker());
+std::unique_ptr<DamageTracker> DamageTracker::Create() {
+  return base::WrapUnique(new DamageTracker());
 }
 
 DamageTracker::DamageTracker()
diff --git a/cc/trees/damage_tracker.h b/cc/trees/damage_tracker.h
index bded662e..1de19a3d 100644
--- a/cc/trees/damage_tracker.h
+++ b/cc/trees/damage_tracker.h
@@ -5,9 +5,10 @@
 #ifndef CC_TREES_DAMAGE_TRACKER_H_
 #define CC_TREES_DAMAGE_TRACKER_H_
 
+#include <memory>
 #include <vector>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_collections.h"
 #include "ui/gfx/geometry/rect.h"
@@ -29,7 +30,7 @@
 // the screen to save GPU computation and bandwidth.
 class CC_EXPORT DamageTracker {
  public:
-  static scoped_ptr<DamageTracker> Create();
+  static std::unique_ptr<DamageTracker> Create();
   ~DamageTracker();
 
   void DidDrawDamagedArea() { current_damage_rect_ = gfx::Rect(); }
diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc
index b776ef8..cc5c9a5 100644
--- a/cc/trees/damage_tracker_unittest.cc
+++ b/cc/trees/damage_tracker_unittest.cc
@@ -89,10 +89,10 @@
 
   LayerImpl* CreateTestTreeWithOneSurface() {
     host_impl_.active_tree()->ClearLayers();
-    scoped_ptr<LayerImpl> root =
-            LayerImpl::Create(host_impl_.active_tree(), 1);
-    scoped_ptr<LayerImpl> child =
-            LayerImpl::Create(host_impl_.active_tree(), 2);
+    std::unique_ptr<LayerImpl> root =
+        LayerImpl::Create(host_impl_.active_tree(), 1);
+    std::unique_ptr<LayerImpl> child =
+        LayerImpl::Create(host_impl_.active_tree(), 2);
 
     root->SetPosition(gfx::PointF());
     root->SetBounds(gfx::Size(500, 500));
@@ -114,16 +114,16 @@
     // two children of its own.
 
     host_impl_.active_tree()->ClearLayers();
-    scoped_ptr<LayerImpl> root =
-            LayerImpl::Create(host_impl_.active_tree(), 1);
-    scoped_ptr<LayerImpl> child1 =
-            LayerImpl::Create(host_impl_.active_tree(), 2);
-    scoped_ptr<LayerImpl> child2 =
-            LayerImpl::Create(host_impl_.active_tree(), 3);
-    scoped_ptr<LayerImpl> grand_child1 =
-            LayerImpl::Create(host_impl_.active_tree(), 4);
-    scoped_ptr<LayerImpl> grand_child2 =
-            LayerImpl::Create(host_impl_.active_tree(), 5);
+    std::unique_ptr<LayerImpl> root =
+        LayerImpl::Create(host_impl_.active_tree(), 1);
+    std::unique_ptr<LayerImpl> child1 =
+        LayerImpl::Create(host_impl_.active_tree(), 2);
+    std::unique_ptr<LayerImpl> child2 =
+        LayerImpl::Create(host_impl_.active_tree(), 3);
+    std::unique_ptr<LayerImpl> grand_child1 =
+        LayerImpl::Create(host_impl_.active_tree(), 4);
+    std::unique_ptr<LayerImpl> grand_child2 =
+        LayerImpl::Create(host_impl_.active_tree(), 5);
 
     root->SetPosition(gfx::PointF());
     root->SetBounds(gfx::Size(500, 500));
@@ -752,8 +752,8 @@
   //
   ClearDamageForAllSurfaces(root);
   {
-    scoped_ptr<LayerImpl> child2 =
-            LayerImpl::Create(host_impl_.active_tree(), 3);
+    std::unique_ptr<LayerImpl> child2 =
+        LayerImpl::Create(host_impl_.active_tree(), 3);
     child2->SetPosition(gfx::PointF(400.f, 380.f));
     child2->SetBounds(gfx::Size(6, 8));
     child2->SetDrawsContent(true);
@@ -803,8 +803,8 @@
 
   ClearDamageForAllSurfaces(root);
   {
-    scoped_ptr<LayerImpl> child2 =
-            LayerImpl::Create(host_impl_.active_tree(), 3);
+    std::unique_ptr<LayerImpl> child2 =
+        LayerImpl::Create(host_impl_.active_tree(), 3);
     child2->SetPosition(gfx::PointF(400.f, 380.f));
     child2->SetBounds(gfx::Size(6, 8));
     child2->SetDrawsContent(true);
@@ -838,8 +838,8 @@
   // part of the same frame.
   ClearDamageForAllSurfaces(root);
   {
-    scoped_ptr<LayerImpl> child2 =
-            LayerImpl::Create(host_impl_.active_tree(), 3);
+    std::unique_ptr<LayerImpl> child2 =
+        LayerImpl::Create(host_impl_.active_tree(), 3);
     child2->SetPosition(gfx::PointF(400.f, 380.f));
     child2->SetBounds(gfx::Size(6, 8));
     child2->SetDrawsContent(true);
@@ -1106,8 +1106,8 @@
   // without changing content_bounds of the surface.
   grand_child2->SetPosition(gfx::PointF(180.f, 180.f));
   {
-    scoped_ptr<LayerImpl> grand_child3 =
-            LayerImpl::Create(host_impl_.active_tree(), 6);
+    std::unique_ptr<LayerImpl> grand_child3 =
+        LayerImpl::Create(host_impl_.active_tree(), 6);
     grand_child3->SetPosition(gfx::PointF(240.f, 240.f));
     grand_child3->SetBounds(gfx::Size(10, 10));
     grand_child3->SetDrawsContent(true);
@@ -1121,8 +1121,8 @@
   //
   ClearDamageForAllSurfaces(root);
   {
-    scoped_ptr<LayerImpl> grand_child1_replica =
-            LayerImpl::Create(host_impl_.active_tree(), 7);
+    std::unique_ptr<LayerImpl> grand_child1_replica =
+        LayerImpl::Create(host_impl_.active_tree(), 7);
     grand_child1_replica->SetPosition(gfx::PointF());
     gfx::Transform reflection;
     reflection.Scale3d(-1.0, 1.0, 1.0);
@@ -1212,8 +1212,8 @@
 
   // Set up the mask layer.
   {
-    scoped_ptr<LayerImpl> mask_layer =
-            LayerImpl::Create(host_impl_.active_tree(), 3);
+    std::unique_ptr<LayerImpl> mask_layer =
+        LayerImpl::Create(host_impl_.active_tree(), 3);
     mask_layer->SetPosition(child->position());
     mask_layer->SetBounds(child->bounds());
     child->SetMaskLayer(std::move(mask_layer));
@@ -1224,8 +1224,8 @@
   // Add opacity and a grand_child so that the render surface persists even
   // after we remove the mask.
   {
-    scoped_ptr<LayerImpl> grand_child =
-            LayerImpl::Create(host_impl_.active_tree(), 4);
+    std::unique_ptr<LayerImpl> grand_child =
+        LayerImpl::Create(host_impl_.active_tree(), 4);
     grand_child->SetPosition(gfx::PointF(2.f, 2.f));
     grand_child->SetBounds(gfx::Size(2, 2));
     grand_child->SetDrawsContent(true);
@@ -1306,8 +1306,8 @@
 
   // Create a reflection about the left edge of grand_child1.
   {
-    scoped_ptr<LayerImpl> grand_child1_replica =
-            LayerImpl::Create(host_impl_.active_tree(), 6);
+    std::unique_ptr<LayerImpl> grand_child1_replica =
+        LayerImpl::Create(host_impl_.active_tree(), 6);
     grand_child1_replica->SetPosition(gfx::PointF());
     gfx::Transform reflection;
     reflection.Scale3d(-1.0, 1.0, 1.0);
@@ -1319,8 +1319,8 @@
 
   // Set up the mask layer on the replica layer
   {
-    scoped_ptr<LayerImpl> replica_mask_layer =
-            LayerImpl::Create(host_impl_.active_tree(), 7);
+    std::unique_ptr<LayerImpl> replica_mask_layer =
+        LayerImpl::Create(host_impl_.active_tree(), 7);
     replica_mask_layer->SetPosition(gfx::PointF());
     replica_mask_layer->SetBounds(grand_child1->bounds());
     grand_child1_replica->SetMaskLayer(std::move(replica_mask_layer));
@@ -1382,8 +1382,8 @@
       gfx::Point3F(grand_child1->bounds().width(), 0.f, 0.f));
 
   {
-    scoped_ptr<LayerImpl> grand_child1_replica =
-            LayerImpl::Create(host_impl_.active_tree(), 6);
+    std::unique_ptr<LayerImpl> grand_child1_replica =
+        LayerImpl::Create(host_impl_.active_tree(), 6);
     grand_child1_replica->SetPosition(gfx::PointF());
 
     // This is the anchor being tested.
@@ -1401,8 +1401,8 @@
 
   // Set up the mask layer on the replica layer
   {
-    scoped_ptr<LayerImpl> replica_mask_layer =
-            LayerImpl::Create(host_impl_.active_tree(), 7);
+    std::unique_ptr<LayerImpl> replica_mask_layer =
+        LayerImpl::Create(host_impl_.active_tree(), 7);
     replica_mask_layer->SetPosition(gfx::PointF());
     // Note: this is not the transform origin being tested.
     replica_mask_layer->SetBounds(grand_child1->bounds());
@@ -1465,7 +1465,8 @@
   // Though it should never happen, its a good idea to verify that the damage
   // tracker does not crash when it receives an empty layer_list.
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_.active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_.active_tree(), 1);
   root->SetForceRenderSurface(true);
   host_impl_.active_tree()->SetRootLayer(std::move(root));
   LayerImpl* root_ptr = host_impl_.active_tree()->root_layer();
diff --git a/cc/trees/latency_info_swap_promise_monitor.cc b/cc/trees/latency_info_swap_promise_monitor.cc
index 23635cd..96a6d77 100644
--- a/cc/trees/latency_info_swap_promise_monitor.cc
+++ b/cc/trees/latency_info_swap_promise_monitor.cc
@@ -53,14 +53,16 @@
 
 void LatencyInfoSwapPromiseMonitor::OnSetNeedsCommitOnMain() {
   if (AddRenderingScheduledComponent(latency_, true /* on_main */)) {
-    scoped_ptr<SwapPromise> swap_promise(new LatencyInfoSwapPromise(*latency_));
+    std::unique_ptr<SwapPromise> swap_promise(
+        new LatencyInfoSwapPromise(*latency_));
     layer_tree_host_->QueueSwapPromise(std::move(swap_promise));
   }
 }
 
 void LatencyInfoSwapPromiseMonitor::OnSetNeedsRedrawOnImpl() {
   if (AddRenderingScheduledComponent(latency_, false /* on_main */)) {
-    scoped_ptr<SwapPromise> swap_promise(new LatencyInfoSwapPromise(*latency_));
+    std::unique_ptr<SwapPromise> swap_promise(
+        new LatencyInfoSwapPromise(*latency_));
     // Queue a pinned swap promise on the active tree. This will allow
     // measurement of the time to the next SwapBuffers(). The swap
     // promise is pinned so that it is not interrupted by new incoming
@@ -95,7 +97,7 @@
     new_latency.CopyLatencyFrom(
         *latency_,
         ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT);
-    scoped_ptr<SwapPromise> swap_promise(
+    std::unique_ptr<SwapPromise> swap_promise(
         new LatencyInfoSwapPromise(new_latency));
     layer_tree_host_impl_->QueueSwapPromiseForMainThreadScrollUpdate(
         std::move(swap_promise));
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 7882bef4..95c2d52 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -81,9 +81,9 @@
   return layer_it->second;
 }
 
-scoped_ptr<base::trace_event::TracedValue>
+std::unique_ptr<base::trace_event::TracedValue>
 ComputeLayerTreeHostProtoSizeSplitAsValue(proto::LayerTreeHost* proto) {
-  scoped_ptr<base::trace_event::TracedValue> value(
+  std::unique_ptr<base::trace_event::TracedValue> value(
       new base::trace_event::TracedValue());
   base::CheckedNumeric<int> base_layer_properties_size = 0;
   base::CheckedNumeric<int> picture_layer_properties_size = 0;
@@ -140,13 +140,13 @@
 LayerTreeHost::InitParams::~InitParams() {
 }
 
-scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
+std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
     scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
     InitParams* params) {
   DCHECK(params->main_task_runner.get());
   DCHECK(impl_task_runner.get());
   DCHECK(params->settings);
-  scoped_ptr<LayerTreeHost> layer_tree_host(
+  std::unique_ptr<LayerTreeHost> layer_tree_host(
       new LayerTreeHost(params, CompositorMode::THREADED));
   layer_tree_host->InitializeThreaded(
       params->main_task_runner, impl_task_runner,
@@ -154,11 +154,11 @@
   return layer_tree_host;
 }
 
-scoped_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded(
+std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded(
     LayerTreeHostSingleThreadClient* single_thread_client,
     InitParams* params) {
   DCHECK(params->settings);
-  scoped_ptr<LayerTreeHost> layer_tree_host(
+  std::unique_ptr<LayerTreeHost> layer_tree_host(
       new LayerTreeHost(params, CompositorMode::SINGLE_THREADED));
   layer_tree_host->InitializeSingleThreaded(
       single_thread_client, params->main_task_runner,
@@ -166,7 +166,7 @@
   return layer_tree_host;
 }
 
-scoped_ptr<LayerTreeHost> LayerTreeHost::CreateRemoteServer(
+std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateRemoteServer(
     RemoteProtoChannel* remote_proto_channel,
     InitParams* params) {
   DCHECK(params->main_task_runner.get());
@@ -179,14 +179,14 @@
   DCHECK(!params->external_begin_frame_source);
   DCHECK(params->image_serialization_processor);
 
-  scoped_ptr<LayerTreeHost> layer_tree_host(
+  std::unique_ptr<LayerTreeHost> layer_tree_host(
       new LayerTreeHost(params, CompositorMode::REMOTE));
   layer_tree_host->InitializeRemoteServer(remote_proto_channel,
                                           params->main_task_runner);
   return layer_tree_host;
 }
 
-scoped_ptr<LayerTreeHost> LayerTreeHost::CreateRemoteClient(
+std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateRemoteClient(
     RemoteProtoChannel* remote_proto_channel,
     scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
     InitParams* params) {
@@ -201,7 +201,7 @@
   DCHECK(!params->external_begin_frame_source);
   DCHECK(params->image_serialization_processor);
 
-  scoped_ptr<LayerTreeHost> layer_tree_host(
+  std::unique_ptr<LayerTreeHost> layer_tree_host(
       new LayerTreeHost(params, CompositorMode::REMOTE));
   layer_tree_host->InitializeRemoteClient(
       remote_proto_channel, params->main_task_runner, impl_task_runner);
@@ -259,10 +259,10 @@
 void LayerTreeHost::InitializeThreaded(
     scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
     scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   task_runner_provider_ =
       TaskRunnerProvider::Create(main_task_runner, impl_task_runner);
-  scoped_ptr<ProxyMain> proxy_main =
+  std::unique_ptr<ProxyMain> proxy_main =
       ProxyMain::CreateThreaded(this, task_runner_provider_.get());
   InitializeProxy(std::move(proxy_main),
                   std::move(external_begin_frame_source));
@@ -271,7 +271,7 @@
 void LayerTreeHost::InitializeSingleThreaded(
     LayerTreeHostSingleThreadClient* single_thread_client,
     scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   task_runner_provider_ = TaskRunnerProvider::Create(main_task_runner, nullptr);
   InitializeProxy(SingleThreadProxy::Create(this, single_thread_client,
                                             task_runner_provider_.get()),
@@ -313,23 +313,23 @@
 }
 
 void LayerTreeHost::InitializeForTesting(
-    scoped_ptr<TaskRunnerProvider> task_runner_provider,
-    scoped_ptr<Proxy> proxy_for_testing,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<TaskRunnerProvider> task_runner_provider,
+    std::unique_ptr<Proxy> proxy_for_testing,
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   task_runner_provider_ = std::move(task_runner_provider);
   InitializeProxy(std::move(proxy_for_testing),
                   std::move(external_begin_frame_source));
 }
 
 void LayerTreeHost::SetTaskRunnerProviderForTesting(
-    scoped_ptr<TaskRunnerProvider> task_runner_provider) {
+    std::unique_ptr<TaskRunnerProvider> task_runner_provider) {
   DCHECK(!task_runner_provider_);
   task_runner_provider_ = std::move(task_runner_provider);
 }
 
 void LayerTreeHost::InitializeProxy(
-    scoped_ptr<Proxy> proxy,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<Proxy> proxy,
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   TRACE_EVENT0("cc", "LayerTreeHost::InitializeForReal");
   DCHECK(task_runner_provider_);
 
@@ -574,7 +574,7 @@
   }
 }
 
-void LayerTreeHost::SetOutputSurface(scoped_ptr<OutputSurface> surface) {
+void LayerTreeHost::SetOutputSurface(std::unique_ptr<OutputSurface> surface) {
   TRACE_EVENT0("cc", "LayerTreeHost::SetOutputSurface");
   DCHECK(output_surface_lost_);
   DCHECK(surface);
@@ -584,7 +584,7 @@
   proxy_->SetOutputSurface(new_output_surface_.get());
 }
 
-scoped_ptr<OutputSurface> LayerTreeHost::ReleaseOutputSurface() {
+std::unique_ptr<OutputSurface> LayerTreeHost::ReleaseOutputSurface() {
   DCHECK(!visible_);
   DCHECK(!output_surface_lost_);
 
@@ -615,11 +615,11 @@
   client_->DidFailToInitializeOutputSurface();
 }
 
-scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
+std::unique_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
     LayerTreeHostImplClient* client) {
   DCHECK(!IsRemoteServer());
   DCHECK(task_runner_provider_->IsImplThread());
-  scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
+  std::unique_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
       settings_, client, task_runner_provider_.get(),
       rendering_stats_instrumentation_.get(), shared_bitmap_manager_,
       gpu_memory_buffer_manager_, task_graph_runner_, id_);
@@ -731,7 +731,8 @@
   proxy_->SetNeedsUpdateLayers();
 }
 
-void LayerTreeHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
+void LayerTreeHost::SetAnimationEvents(
+    std::unique_ptr<AnimationEvents> events) {
   DCHECK(task_runner_provider_->IsMainThread());
   animation_host_->SetAnimationEvents(std::move(events));
 }
@@ -1101,7 +1102,7 @@
 }
 
 void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) {
-  scoped_ptr<AnimationEvents> events = animation_host_->CreateEvents();
+  std::unique_ptr<AnimationEvents> events = animation_host_->CreateEvents();
 
   if (animation_host_->AnimateLayers(monotonic_time))
     animation_host_->UpdateAnimationState(true, events.get());
@@ -1206,14 +1207,15 @@
 
 int LayerTreeHost::ScheduleMicroBenchmark(
     const std::string& benchmark_name,
-    scoped_ptr<base::Value> value,
+    std::unique_ptr<base::Value> value,
     const MicroBenchmark::DoneCallback& callback) {
   return micro_benchmark_controller_.ScheduleRun(benchmark_name,
                                                  std::move(value), callback);
 }
 
-bool LayerTreeHost::SendMessageToMicroBenchmark(int id,
-                                                scoped_ptr<base::Value> value) {
+bool LayerTreeHost::SendMessageToMicroBenchmark(
+    int id,
+    std::unique_ptr<base::Value> value) {
   return micro_benchmark_controller_.SendMessage(id, std::move(value));
 }
 
@@ -1231,7 +1233,8 @@
     (*it)->OnSetNeedsCommitOnMain();
 }
 
-void LayerTreeHost::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
+void LayerTreeHost::QueueSwapPromise(
+    std::unique_ptr<SwapPromise> swap_promise) {
   DCHECK(swap_promise);
   swap_promise_list_.push_back(std::move(swap_promise));
 }
@@ -1271,8 +1274,8 @@
 }
 
 void LayerTreeHost::RecordFrameTimingEvents(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   client_->RecordFrameTimingEvents(std::move(composite_events),
                                    std::move(main_frame_events));
 }
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index e8bbf5b..755e527b 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -9,6 +9,7 @@
 #include <stdint.h>
 
 #include <limits>
+#include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
@@ -17,7 +18,6 @@
 #include "base/cancelable_callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/target_property.h"
@@ -91,7 +91,7 @@
     TaskGraphRunner* task_graph_runner = nullptr;
     LayerTreeSettings const* settings = nullptr;
     scoped_refptr<base::SingleThreadTaskRunner> main_task_runner;
-    scoped_ptr<BeginFrameSource> external_begin_frame_source;
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source;
     ImageSerializationProcessor* image_serialization_processor = nullptr;
 
     InitParams();
@@ -99,15 +99,15 @@
   };
 
   // The SharedBitmapManager will be used on the compositor thread.
-  static scoped_ptr<LayerTreeHost> CreateThreaded(
+  static std::unique_ptr<LayerTreeHost> CreateThreaded(
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
       InitParams* params);
 
-  static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
+  static std::unique_ptr<LayerTreeHost> CreateSingleThreaded(
       LayerTreeHostSingleThreadClient* single_thread_client,
       InitParams* params);
 
-  static scoped_ptr<LayerTreeHost> CreateRemoteServer(
+  static std::unique_ptr<LayerTreeHost> CreateRemoteServer(
       RemoteProtoChannel* remote_proto_channel,
       InitParams* params);
 
@@ -117,7 +117,7 @@
   // a CompositorMessageToImpl::CloseImpl message from the server. This ensures
   // that the client will not send any compositor messages once the
   // LayerTreeHost on the server is destroyed.
-  static scoped_ptr<LayerTreeHost> CreateRemoteClient(
+  static std::unique_ptr<LayerTreeHost> CreateRemoteClient(
       RemoteProtoChannel* remote_proto_channel,
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
       InitParams* params);
@@ -135,12 +135,12 @@
   void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl);
   void WillCommit();
   void CommitComplete();
-  void SetOutputSurface(scoped_ptr<OutputSurface> output_surface);
-  scoped_ptr<OutputSurface> ReleaseOutputSurface();
+  void SetOutputSurface(std::unique_ptr<OutputSurface> output_surface);
+  std::unique_ptr<OutputSurface> ReleaseOutputSurface();
   void RequestNewOutputSurface();
   void DidInitializeOutputSurface();
   void DidFailToInitializeOutputSurface();
-  virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
+  virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
       LayerTreeHostImplClient* client);
   void DidLoseOutputSurface();
   bool output_surface_lost() const { return output_surface_lost_; }
@@ -206,7 +206,7 @@
 
   void SetNextCommitForcesRedraw();
 
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> events);
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> events);
 
   void SetRootLayer(scoped_refptr<Layer> root_layer);
   Layer* root_layer() { return root_layer_.get(); }
@@ -320,10 +320,10 @@
 
   // Returns the id of the benchmark on success, 0 otherwise.
   int ScheduleMicroBenchmark(const std::string& benchmark_name,
-                             scoped_ptr<base::Value> value,
+                             std::unique_ptr<base::Value> value,
                              const MicroBenchmark::DoneCallback& callback);
   // Returns true if the message was successfully delivered and handled.
-  bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value);
+  bool SendMessageToMicroBenchmark(int id, std::unique_ptr<base::Value> value);
 
   // When a SwapPromiseMonitor is created on the main thread, it calls
   // InsertSwapPromiseMonitor() to register itself with LayerTreeHost.
@@ -334,7 +334,7 @@
 
   // Call this function when you expect there to be a swap buffer.
   // See swap_promise.h for how to use SwapPromise.
-  void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
+  void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise);
 
   void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
 
@@ -354,8 +354,9 @@
   }
 
   void RecordFrameTimingEvents(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events);
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events);
 
   Layer* LayerById(int id) const;
 
@@ -430,11 +431,11 @@
   void InitializeThreaded(
       scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
   void InitializeSingleThreaded(
       LayerTreeHostSingleThreadClient* single_thread_client,
       scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
   void InitializeRemoteServer(
       RemoteProtoChannel* remote_proto_channel,
       scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
@@ -443,14 +444,14 @@
       scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
   void InitializeForTesting(
-      scoped_ptr<TaskRunnerProvider> task_runner_provider,
-      scoped_ptr<Proxy> proxy_for_testing,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<TaskRunnerProvider> task_runner_provider,
+      std::unique_ptr<Proxy> proxy_for_testing,
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
   void SetOutputSurfaceLostForTesting(bool is_lost) {
     output_surface_lost_ = is_lost;
   }
   void SetTaskRunnerProviderForTesting(
-      scoped_ptr<TaskRunnerProvider> task_runner_provider);
+      std::unique_ptr<TaskRunnerProvider> task_runner_provider);
 
   // shared_bitmap_manager(), gpu_memory_buffer_manager(), and
   // task_graph_runner() return valid values only until the LayerTreeHostImpl is
@@ -473,8 +474,8 @@
   friend class LayerTreeHostSerializationTest;
 
   void InitializeProxy(
-      scoped_ptr<Proxy> proxy,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<Proxy> proxy,
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
   bool DoUpdateLayers(Layer* root_layer);
   void UpdateHudLayer();
@@ -506,20 +507,21 @@
   bool needs_meta_info_recomputation_;
 
   LayerTreeHostClient* client_;
-  scoped_ptr<Proxy> proxy_;
-  scoped_ptr<TaskRunnerProvider> task_runner_provider_;
+  std::unique_ptr<Proxy> proxy_;
+  std::unique_ptr<TaskRunnerProvider> task_runner_provider_;
 
   int source_frame_number_;
   int meta_information_sequence_number_;
-  scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_;
+  std::unique_ptr<RenderingStatsInstrumentation>
+      rendering_stats_instrumentation_;
 
   // |current_output_surface_| can't be updated until we've successfully
   // initialized a new output surface. |new_output_surface_| contains the
   // new output surface that is currently being initialized. If initialization
   // is successful then |new_output_surface_| replaces
   // |current_output_surface_|.
-  scoped_ptr<OutputSurface> new_output_surface_;
-  scoped_ptr<OutputSurface> current_output_surface_;
+  std::unique_ptr<OutputSurface> new_output_surface_;
+  std::unique_ptr<OutputSurface> current_output_surface_;
   bool output_surface_lost_;
 
   scoped_refptr<Layer> root_layer_;
@@ -554,9 +556,9 @@
   EventListenerProperties event_listener_properties_[static_cast<size_t>(
       EventListenerClass::kNumClasses)];
 
-  scoped_ptr<AnimationHost> animation_host_;
+  std::unique_ptr<AnimationHost> animation_host_;
 
-  scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
+  std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
 
   // If set, then page scale animation has completed, but the client hasn't been
   // notified about it yet.
@@ -580,7 +582,7 @@
 
   ImageSerializationProcessor* image_serialization_processor_;
 
-  std::vector<scoped_ptr<SwapPromise>> swap_promise_list_;
+  std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_;
   std::set<SwapPromiseMonitor*> swap_promise_monitor_;
 
   PropertyTrees property_trees_;
diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h
index e37d8e02..d871647 100644
--- a/cc/trees/layer_tree_host_client.h
+++ b/cc/trees/layer_tree_host_client.h
@@ -5,8 +5,9 @@
 #ifndef CC_TREES_LAYER_TREE_HOST_CLIENT_H_
 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/debug/frame_timing_tracker.h"
 
@@ -59,8 +60,9 @@
   virtual void DidCommitAndDrawFrame() = 0;
   virtual void DidCompleteSwapBuffers() = 0;
   virtual void RecordFrameTimingEvents(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0;
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events) = 0;
 
   // Called when page scale animation has completed.
   virtual void DidCompletePageScaleAnimation() = 0;
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index f1a5fc4..9485a64 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -542,28 +542,29 @@
                                                 property_trees->transform_tree,
                                                 property_trees->effect_tree)) {
     layer->draw_properties().render_target = nullptr;
+    return;
+  }
+
+  bool render_to_separate_surface =
+      IsRootLayer(layer) ||
+      (can_render_to_separate_surface && layer->render_surface());
+
+  if (render_to_separate_surface) {
+    DCHECK(layer->render_surface()) << IsRootLayer(layer)
+                                    << can_render_to_separate_surface
+                                    << layer->has_render_surface();
+    layer->draw_properties().render_target = layer;
+
+    if (layer->mask_layer())
+      layer->mask_layer()->draw_properties().render_target = layer;
+
+    if (layer->replica_layer() && layer->replica_layer()->mask_layer())
+      layer->replica_layer()->mask_layer()->draw_properties().render_target =
+          layer;
+
   } else {
-    bool render_to_separate_surface =
-        IsRootLayer(layer) ||
-        (can_render_to_separate_surface && layer->render_surface());
-
-    if (render_to_separate_surface) {
-      DCHECK(layer->render_surface()) << IsRootLayer(layer)
-                                      << can_render_to_separate_surface
-                                      << layer->has_render_surface();
-      layer->draw_properties().render_target = layer;
-
-      if (layer->mask_layer())
-        layer->mask_layer()->draw_properties().render_target = layer;
-
-      if (layer->replica_layer() && layer->replica_layer()->mask_layer())
-        layer->replica_layer()->mask_layer()->draw_properties().render_target =
-            layer;
-
-    } else {
-      DCHECK(!IsRootLayer(layer));
-      layer->draw_properties().render_target = layer->parent()->render_target();
-    }
+    DCHECK(!IsRootLayer(layer));
+    layer->draw_properties().render_target = layer->parent()->render_target();
   }
   for (size_t i = 0; i < layer->children().size(); ++i) {
     CalculateRenderTarget(
@@ -610,13 +611,6 @@
     if (layer->render_surface())
       layer->ClearRenderSurfaceLayerList();
     layer->draw_properties().render_target = nullptr;
-    for (auto* child_layer : layer->children()) {
-      CalculateRenderSurfaceLayerList(
-          child_layer, property_trees, render_surface_layer_list, descendants,
-          nearest_occlusion_immune_ancestor, layer_is_drawn,
-          can_render_to_separate_surface, current_render_surface_layer_list_id,
-          max_texture_size);
-    }
     return;
   }
 
@@ -663,10 +657,11 @@
     descendants = &(layer->render_surface()->layer_list());
   }
 
+  size_t descendants_size = descendants->size();
+
   bool layer_should_be_skipped = !draw_property_utils::LayerNeedsUpdate(
       layer, layer_is_drawn, property_trees->transform_tree);
   if (!layer_should_be_skipped) {
-    DCHECK(layer->draw_properties().render_target);
     MarkLayerWithRenderSurfaceLayerListId(layer,
                                           current_render_surface_layer_list_id);
     descendants->push_back(layer);
@@ -745,7 +740,7 @@
       layer->render_surface()->SetContentRect(surface_content_rect);
     }
     const LayerImpl* parent_target = layer->parent()->render_target();
-    if (parent_target && !IsRootLayer(parent_target)) {
+    if (!IsRootLayer(parent_target)) {
       gfx::Rect surface_content_rect =
           parent_target->render_surface()->accumulated_content_rect();
       if (render_to_separate_surface) {
@@ -773,6 +768,13 @@
   if (render_to_separate_surface && !IsRootLayer(layer) &&
       layer->render_surface()->DrawableContentRect().IsEmpty()) {
     RemoveSurfaceForEarlyExit(layer, render_surface_layer_list);
+    return;
+  }
+
+  // If neither this layer nor any of its children were added, early out.
+  if (descendants_size == descendants->size()) {
+    DCHECK(!render_to_separate_surface || IsRootLayer(layer));
+    return;
   }
 }
 
@@ -873,6 +875,8 @@
   DCHECK(inputs->can_render_to_separate_surface ==
          inputs->property_trees->non_root_surfaces_enabled);
   const bool subtree_visible_from_ancestor = true;
+  for (auto* layer : *inputs->root_layer->layer_tree_impl())
+    layer->draw_properties().render_target = nullptr;
   CalculateRenderTarget(inputs->root_layer, inputs->property_trees,
                         subtree_visible_from_ancestor,
                         inputs->can_render_to_separate_surface);
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index fa1e600..59acad1b 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -184,7 +184,7 @@
   float page_scale_delta;
   gfx::Vector2dF elastic_overscroll_delta;
   float top_controls_delta;
-  std::vector<scoped_ptr<SwapPromise>> swap_promises;
+  std::vector<std::unique_ptr<SwapPromise>> swap_promises;
 
   bool EqualsForTesting(const ScrollAndScaleSet& other) const;
   void ToProtobuf(proto::ScrollAndScaleSet* proto) const;
diff --git a/cc/trees/layer_tree_host_common_perftest.cc b/cc/trees/layer_tree_host_common_perftest.cc
index 3b61768..1ec7292 100644
--- a/cc/trees/layer_tree_host_common_perftest.cc
+++ b/cc/trees/layer_tree_host_common_perftest.cc
@@ -2,16 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/trees/layer_tree_host_common.h"
-
 #include <stddef.h>
 
 #include <deque>
+#include <memory>
 #include <sstream>
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/path_service.h"
 #include "base/strings/string_piece.h"
 #include "base/threading/thread.h"
@@ -26,6 +24,7 @@
 #include "cc/test/layer_tree_json_parser.h"
 #include "cc/test/layer_tree_test.h"
 #include "cc/test/paths.h"
+#include "cc/trees/layer_tree_host_common.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "testing/perf/perf_test.h"
 
@@ -154,18 +153,18 @@
     BuildLayerImplList(active_tree->root_layer(), &base_list);
 
     int polygon_counter = 0;
-    std::vector<scoped_ptr<DrawPolygon>> polygon_list;
+    std::vector<std::unique_ptr<DrawPolygon>> polygon_list;
     for (LayerImplList::iterator it = base_list.begin(); it != base_list.end();
          ++it) {
       DrawPolygon* draw_polygon = new DrawPolygon(
           NULL, gfx::RectF(gfx::SizeF((*it)->bounds())),
           (*it)->draw_properties().target_space_transform, polygon_counter++);
-      polygon_list.push_back(scoped_ptr<DrawPolygon>(draw_polygon));
+      polygon_list.push_back(std::unique_ptr<DrawPolygon>(draw_polygon));
     }
 
     timer_.Reset();
     do {
-      std::deque<scoped_ptr<DrawPolygon>> test_list;
+      std::deque<std::unique_ptr<DrawPolygon>> test_list;
       for (int i = 0; i < num_duplicates_; i++) {
         for (size_t i = 0; i < polygon_list.size(); i++) {
           test_list.push_back(polygon_list[i]->CreateCopy());
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 2260536..618e621 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -10,6 +10,7 @@
 #include <set>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_host.h"
 #include "cc/animation/animation_id_provider.h"
 #include "cc/animation/animation_player.h"
@@ -266,7 +267,7 @@
                                   &task_graph_runner);
 
   gfx::Transform identity_matrix;
-  scoped_ptr<LayerImpl> sublayer_scoped_ptr(
+  std::unique_ptr<LayerImpl> sublayer_scoped_ptr(
       LayerImpl::Create(host_impl.active_tree(), 1));
   LayerImpl* sublayer = sublayer_scoped_ptr.get();
   sublayer->SetDrawsContent(true);
@@ -274,13 +275,13 @@
                                gfx::PointF(), gfx::Size(500, 500), true, false,
                                false);
 
-  scoped_ptr<LayerImpl> scroll_layer_scoped_ptr(
+  std::unique_ptr<LayerImpl> scroll_layer_scoped_ptr(
       LayerImpl::Create(host_impl.active_tree(), 2));
   LayerImpl* scroll_layer = scroll_layer_scoped_ptr.get();
   SetLayerPropertiesForTesting(scroll_layer, identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(10, 20), true, false,
                                false);
-  scoped_ptr<LayerImpl> clip_layer_scoped_ptr(
+  std::unique_ptr<LayerImpl> clip_layer_scoped_ptr(
       LayerImpl::Create(host_impl.active_tree(), 4));
   LayerImpl* clip_layer = clip_layer_scoped_ptr.get();
 
@@ -299,7 +300,8 @@
       ->scroll_tree.UpdateScrollOffsetBaseForTesting(scroll_layer_raw_ptr->id(),
                                                      kScrollOffset);
 
-  scoped_ptr<LayerImpl> root(LayerImpl::Create(host_impl.active_tree(), 3));
+  std::unique_ptr<LayerImpl> root(
+      LayerImpl::Create(host_impl.active_tree(), 3));
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(3, 4), true, false,
                                false);
@@ -619,7 +621,7 @@
   LayerImpl* child = AddChild<LayerImpl>(parent);
   LayerImpl* grand_child = AddChild<LayerImpl>(child);
   grand_child->SetDrawsContent(true);
-  scoped_ptr<LayerImpl> child_replica =
+  std::unique_ptr<LayerImpl> child_replica =
       LayerImpl::Create(host_impl()->active_tree(), 100);
 
   // One-time setup of root layer
@@ -716,9 +718,9 @@
   LayerImpl* grand_child_of_rs2 = AddChild<LayerImpl>(child_of_rs2);
   grand_child_of_rs2->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> replica_of_rs1 =
+  std::unique_ptr<LayerImpl> replica_of_rs1 =
       LayerImpl::Create(host_impl()->active_tree(), 101);
-  scoped_ptr<LayerImpl> replica_of_rs2 =
+  std::unique_ptr<LayerImpl> replica_of_rs2 =
       LayerImpl::Create(host_impl()->active_tree(), 102);
 
   // In combination with descendant draws content, opacity != 1 forces the layer
@@ -2696,8 +2698,8 @@
                                false);
 
   // Add a transform animation with a start delay to |grand_child|.
-  scoped_ptr<Animation> animation = Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 0, 1,
+  std::unique_ptr<Animation> animation = Animation::Create(
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 0, 1,
       TargetProperty::TRANSFORM);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
@@ -3541,14 +3543,16 @@
   FakeImplTaskRunnerProvider task_runner_provider;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.active_tree(), 2);
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.active_tree(), 2);
+  std::unique_ptr<LayerImpl> grand_child =
       LayerImpl::Create(host_impl.active_tree(), 3);
-  scoped_ptr<LayerImpl> occluding_child =
+  std::unique_ptr<LayerImpl> occluding_child =
       LayerImpl::Create(host_impl.active_tree(), 4);
   child->SetDrawsContent(true);
   grand_child->SetDrawsContent(true);
@@ -3780,7 +3784,7 @@
 
   clip_child->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -3817,7 +3821,7 @@
   render_surface2->SetDrawsContent(true);
   clip_child->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -3857,7 +3861,7 @@
   render_surface2->SetDrawsContent(true);
   clip_child->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -3927,7 +3931,7 @@
   unclipped_desc_surface->SetDrawsContent(true);
   clipped_surface->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -3973,7 +3977,7 @@
   unclipped_desc_surface->SetDrawsContent(true);
   clipped_surface->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -4931,7 +4935,7 @@
   gfx::Transform replica_transform;
   replica_transform.Scale(1.0, -1.0);
 
-  scoped_ptr<LayerImpl> replica =
+  std::unique_ptr<LayerImpl> replica =
       LayerImpl::Create(host_impl()->active_tree(), 7);
   SetLayerPropertiesForTesting(replica.get(), replica_transform, gfx::Point3F(),
                                gfx::PointF(2.f, 2.f), gfx::Size(10, 10), false,
@@ -5044,7 +5048,7 @@
 
   gfx::Transform replica_transform;
   replica_transform.Scale(1.0, -1.0);
-  scoped_ptr<LayerImpl> replica =
+  std::unique_ptr<LayerImpl> replica =
       LayerImpl::Create(host_impl()->active_tree(), 7);
   SetLayerPropertiesForTesting(replica.get(), replica_transform, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(13, 11), false, true,
@@ -5149,7 +5153,8 @@
   FakeLayerTreeHostImpl host_impl(host()->settings(), &task_runner_provider,
                                   &shared_bitmap_manager, &task_graph_runner);
   host_impl.CreatePendingTree();
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.pending_tree(), 1);
 
   const gfx::Transform identity_matrix;
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
@@ -5157,7 +5162,8 @@
                                false);
   root->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.pending_tree(), 2);
   SetLayerPropertiesForTesting(child.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(50, 50), true, false,
                                false);
@@ -5252,11 +5258,11 @@
     can_use_lcd_text_ = std::tr1::get<0>(GetParam());
     layers_always_allowed_lcd_text_ = std::tr1::get<1>(GetParam());
 
-    scoped_ptr<LayerImpl> root_ptr =
+    std::unique_ptr<LayerImpl> root_ptr =
         LayerImpl::Create(host_impl_.active_tree(), 1);
-    scoped_ptr<LayerImpl> child_ptr =
+    std::unique_ptr<LayerImpl> child_ptr =
         LayerImpl::Create(host_impl_.active_tree(), 2);
-    scoped_ptr<LayerImpl> grand_child_ptr =
+    std::unique_ptr<LayerImpl> grand_child_ptr =
         LayerImpl::Create(host_impl_.active_tree(), 3);
 
     // Stash raw pointers to look at later.
@@ -5468,20 +5474,22 @@
   host_impl.CreatePendingTree();
   const gfx::Transform identity_matrix;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.pending_tree(), 1);
   LayerImpl* root_layer = root.get();
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(50, 50), true, false,
                                false);
   root->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.pending_tree(), 2);
   SetLayerPropertiesForTesting(child.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(40, 40), true, false,
                                false);
   child->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       LayerImpl::Create(host_impl.pending_tree(), 3);
   SetLayerPropertiesForTesting(grand_child.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
@@ -5519,21 +5527,23 @@
   host_impl.CreatePendingTree();
   const gfx::Transform identity_matrix;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.pending_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(50, 50), true, false,
                                true);
   root->SetDrawsContent(true);
   LayerImpl* root_layer = root.get();
 
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.pending_tree(), 2);
   SetLayerPropertiesForTesting(child.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(40, 40), true, false,
                                false);
   child->SetDrawsContent(true);
   child->SetHideLayerAndSubtree(true);
 
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       LayerImpl::Create(host_impl.pending_tree(), 3);
   SetLayerPropertiesForTesting(grand_child.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
@@ -5559,7 +5569,7 @@
   EXPECT_EQ(1, root_layer->render_surface()->layer_list().at(0)->id());
 }
 
-void EmptyCopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
+void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
 
 TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
   FakeImplTaskRunnerProvider task_runner_provider;
@@ -5570,14 +5580,15 @@
   host_impl.CreatePendingTree();
   const gfx::Transform identity_matrix;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.pending_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(50, 50), true, false,
                                true);
   root->SetDrawsContent(true);
   LayerImpl* root_layer = root.get();
 
-  scoped_ptr<LayerImpl> copy_grand_parent =
+  std::unique_ptr<LayerImpl> copy_grand_parent =
       LayerImpl::Create(host_impl.pending_tree(), 2);
   SetLayerPropertiesForTesting(copy_grand_parent.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40),
@@ -5585,7 +5596,7 @@
   copy_grand_parent->SetDrawsContent(true);
   LayerImpl* copy_grand_parent_layer = copy_grand_parent.get();
 
-  scoped_ptr<LayerImpl> copy_parent =
+  std::unique_ptr<LayerImpl> copy_parent =
       LayerImpl::Create(host_impl.pending_tree(), 3);
   SetLayerPropertiesForTesting(copy_parent.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
@@ -5593,7 +5604,7 @@
   copy_parent->SetDrawsContent(true);
   LayerImpl* copy_parent_layer = copy_parent.get();
 
-  scoped_ptr<LayerImpl> copy_request =
+  std::unique_ptr<LayerImpl> copy_request =
       LayerImpl::Create(host_impl.pending_tree(), 4);
   SetLayerPropertiesForTesting(copy_request.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20),
@@ -5601,7 +5612,7 @@
   copy_request->SetDrawsContent(true);
   LayerImpl* copy_layer = copy_request.get();
 
-  scoped_ptr<LayerImpl> copy_child =
+  std::unique_ptr<LayerImpl> copy_child =
       LayerImpl::Create(host_impl.pending_tree(), 5);
   SetLayerPropertiesForTesting(copy_child.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20),
@@ -5609,7 +5620,7 @@
   copy_child->SetDrawsContent(true);
   LayerImpl* copy_child_layer = copy_child.get();
 
-  scoped_ptr<LayerImpl> copy_grand_child =
+  std::unique_ptr<LayerImpl> copy_grand_child =
       LayerImpl::Create(host_impl.pending_tree(), 6);
   SetLayerPropertiesForTesting(copy_grand_child.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20),
@@ -5617,7 +5628,7 @@
   copy_child->SetDrawsContent(true);
   LayerImpl* copy_grand_child_layer = copy_grand_child.get();
 
-  scoped_ptr<LayerImpl> copy_grand_parent_sibling_before =
+  std::unique_ptr<LayerImpl> copy_grand_parent_sibling_before =
       LayerImpl::Create(host_impl.pending_tree(), 7);
   SetLayerPropertiesForTesting(copy_grand_parent_sibling_before.get(),
                                identity_matrix, gfx::Point3F(), gfx::PointF(),
@@ -5626,7 +5637,7 @@
   LayerImpl* copy_grand_parent_sibling_before_layer =
       copy_grand_parent_sibling_before.get();
 
-  scoped_ptr<LayerImpl> copy_grand_parent_sibling_after =
+  std::unique_ptr<LayerImpl> copy_grand_parent_sibling_after =
       LayerImpl::Create(host_impl.pending_tree(), 8);
   SetLayerPropertiesForTesting(copy_grand_parent_sibling_after.get(),
                                identity_matrix, gfx::Point3F(), gfx::PointF(),
@@ -5652,7 +5663,7 @@
   copy_grand_parent_sibling_after_layer->SetHideLayerAndSubtree(true);
   copy_grand_child_layer->SetHideLayerAndSubtree(true);
 
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_requests;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
   copy_requests.push_back(
       CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
   copy_layer->PassCopyRequests(&copy_requests);
@@ -5732,13 +5743,14 @@
   host_impl.CreatePendingTree();
   const gfx::Transform identity_matrix;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.pending_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(50, 50), true, false,
                                true);
   root->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> copy_parent =
+  std::unique_ptr<LayerImpl> copy_parent =
       LayerImpl::Create(host_impl.pending_tree(), 2);
   SetLayerPropertiesForTesting(copy_parent.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(), true,
@@ -5746,21 +5758,21 @@
   copy_parent->SetDrawsContent(true);
   copy_parent->SetMasksToBounds(true);
 
-  scoped_ptr<LayerImpl> copy_layer =
+  std::unique_ptr<LayerImpl> copy_layer =
       LayerImpl::Create(host_impl.pending_tree(), 3);
   SetLayerPropertiesForTesting(copy_layer.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
                                true, false, true);
   copy_layer->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> copy_child =
+  std::unique_ptr<LayerImpl> copy_child =
       LayerImpl::Create(host_impl.pending_tree(), 4);
   SetLayerPropertiesForTesting(copy_child.get(), identity_matrix,
                                gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20),
                                true, false, false);
   copy_child->SetDrawsContent(true);
 
-  std::vector<scoped_ptr<CopyOutputRequest>> copy_requests;
+  std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
   copy_requests.push_back(
       CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
   copy_layer->PassCopyRequests(&copy_requests);
@@ -5837,7 +5849,7 @@
   LayerImpl* clip_child = AddChild<LayerImpl>(intervening);
   clip_child->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -6087,7 +6099,7 @@
   child->SetDrawsContent(true);
 
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -6148,7 +6160,7 @@
   non_clip_child->SetDrawsContent(true);
 
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -6256,13 +6268,13 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
 
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl.active_tree(), 12345);
-  scoped_ptr<LayerImpl> child1 =
+  std::unique_ptr<LayerImpl> child1 =
       LayerImpl::Create(host_impl.active_tree(), 123456);
-  scoped_ptr<LayerImpl> child2 =
+  std::unique_ptr<LayerImpl> child2 =
       LayerImpl::Create(host_impl.active_tree(), 1234567);
-  scoped_ptr<LayerImpl> child3 =
+  std::unique_ptr<LayerImpl> child3 =
       LayerImpl::Create(host_impl.active_tree(), 12345678);
 
   gfx::Transform identity_matrix;
@@ -6551,7 +6563,8 @@
   scroll_parent_clip->SetMasksToBounds(true);
 
   scroll_child->SetScrollParent(scroll_parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child);
   scroll_parent->SetScrollChildren(scroll_children.release());
 
@@ -6593,7 +6606,8 @@
   scroll_child->SetDrawsContent(true);
 
   scroll_child->SetScrollParent(scroll_parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child);
   scroll_parent->SetScrollChildren(scroll_children.release());
 
@@ -6700,7 +6714,8 @@
   scroll_parent_clip->SetMasksToBounds(true);
 
   scroll_child->SetScrollParent(scroll_parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child);
   scroll_parent->SetScrollChildren(scroll_children.release());
 
@@ -6760,7 +6775,8 @@
   scroll_grandparent_clip->SetMasksToBounds(true);
 
   scroll_child->SetScrollParent(scroll_parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child);
   scroll_parent->SetScrollChildren(scroll_children.release());
 
@@ -6849,7 +6865,8 @@
   scroll_grandparent_clip->SetMasksToBounds(true);
 
   scroll_child->SetScrollParent(scroll_parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child);
   scroll_parent->SetScrollChildren(scroll_children.release());
 
@@ -6988,16 +7005,17 @@
   FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
                                   &task_graph_runner);
   host_impl.CreatePendingTree();
-  scoped_ptr<LayerImpl> root_ptr =
+  std::unique_ptr<LayerImpl> root_ptr =
       LayerImpl::Create(host_impl.active_tree(), 1);
   LayerImpl* root = root_ptr.get();
-  scoped_ptr<LayerImpl> container =
+  std::unique_ptr<LayerImpl> container =
       LayerImpl::Create(host_impl.active_tree(), 2);
   LayerImpl* container_layer = container.get();
-  scoped_ptr<LayerImpl> scroller =
+  std::unique_ptr<LayerImpl> scroller =
       LayerImpl::Create(host_impl.active_tree(), 3);
   LayerImpl* scroll_layer = scroller.get();
-  scoped_ptr<LayerImpl> fixed = LayerImpl::Create(host_impl.active_tree(), 4);
+  std::unique_ptr<LayerImpl> fixed =
+      LayerImpl::Create(host_impl.active_tree(), 4);
   LayerImpl* fixed_layer = fixed.get();
 
   container->SetIsContainerForFixedPositionLayers(true);
@@ -7178,10 +7196,10 @@
 
 class AnimationScaleFactorTrackingLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<AnimationScaleFactorTrackingLayerImpl> Create(
+  static std::unique_ptr<AnimationScaleFactorTrackingLayerImpl> Create(
       LayerTreeImpl* tree_impl,
       int id) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new AnimationScaleFactorTrackingLayerImpl(tree_impl, id));
   }
 
@@ -7204,13 +7222,13 @@
   FakeLayerTreeHostImpl host_impl(settings, &task_runner_provider,
                                   &shared_bitmap_manager, &task_graph_runner);
   gfx::Transform identity_matrix;
-  scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_parent =
+  std::unique_ptr<AnimationScaleFactorTrackingLayerImpl> grand_parent =
       AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 1);
-  scoped_ptr<AnimationScaleFactorTrackingLayerImpl> parent =
+  std::unique_ptr<AnimationScaleFactorTrackingLayerImpl> parent =
       AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 2);
-  scoped_ptr<AnimationScaleFactorTrackingLayerImpl> child =
+  std::unique_ptr<AnimationScaleFactorTrackingLayerImpl> child =
       AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 3);
-  scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_child =
+  std::unique_ptr<AnimationScaleFactorTrackingLayerImpl> grand_child =
       AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 4);
 
   AnimationScaleFactorTrackingLayerImpl* parent_raw = parent.get();
@@ -7561,13 +7579,15 @@
                                   &task_graph_runner);
   gfx::Transform identity_matrix;
 
-  scoped_ptr<LayerImpl> grand_parent =
+  std::unique_ptr<LayerImpl> grand_parent =
       LayerImpl::Create(host_impl.active_tree(), 1);
-  scoped_ptr<LayerImpl> parent = LayerImpl::Create(host_impl.active_tree(), 3);
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.active_tree(), 5);
-  scoped_ptr<LayerImpl> grand_child1 =
+  std::unique_ptr<LayerImpl> parent =
+      LayerImpl::Create(host_impl.active_tree(), 3);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.active_tree(), 5);
+  std::unique_ptr<LayerImpl> grand_child1 =
       LayerImpl::Create(host_impl.active_tree(), 7);
-  scoped_ptr<LayerImpl> grand_child2 =
+  std::unique_ptr<LayerImpl> grand_child2 =
       LayerImpl::Create(host_impl.active_tree(), 9);
 
   LayerImpl* grand_parent_raw = grand_parent.get();
@@ -7706,7 +7726,7 @@
   EXPECT_EQ(expected, actual);
 
   // Add replica mask layer.
-  scoped_ptr<LayerImpl> replica_layer =
+  std::unique_ptr<LayerImpl> replica_layer =
       LayerImpl::Create(host_impl.active_tree(), 20);
   replica_layer->SetMaskLayer(LayerImpl::Create(host_impl.active_tree(), 21));
   child_raw->SetReplicaLayer(std::move(replica_layer));
@@ -7813,11 +7833,14 @@
   FakeLayerTreeHostImpl host_impl(settings, &task_runner_provider,
                                   &shared_bitmap_manager, &task_graph_runner);
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.active_tree(), 1);
   LayerImpl* root_layer = root.get();
-  scoped_ptr<LayerImpl> child1 = LayerImpl::Create(host_impl.active_tree(), 2);
+  std::unique_ptr<LayerImpl> child1 =
+      LayerImpl::Create(host_impl.active_tree(), 2);
   LayerImpl* child1_layer = child1.get();
-  scoped_ptr<LayerImpl> child2 = LayerImpl::Create(host_impl.active_tree(), 3);
+  std::unique_ptr<LayerImpl> child2 =
+      LayerImpl::Create(host_impl.active_tree(), 3);
   LayerImpl* child2_layer = child2.get();
 
   root->AddChild(std::move(child1));
@@ -7841,7 +7864,7 @@
   child1_layer->SetMaskLayer(LayerImpl::Create(host_impl.active_tree(), 4));
   child1_layer->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> replica_layer =
+  std::unique_ptr<LayerImpl> replica_layer =
       LayerImpl::Create(host_impl.active_tree(), 5);
   replica_layer->SetMaskLayer(LayerImpl::Create(host_impl.active_tree(), 6));
   child1_layer->SetReplicaLayer(std::move(replica_layer));
@@ -8283,7 +8306,7 @@
                                true, false);
   host()->SetRootLayer(root);
 
-  scoped_ptr<KeyframedFilterAnimationCurve> curve(
+  std::unique_ptr<KeyframedFilterAnimationCurve> curve(
       KeyframedFilterAnimationCurve::Create());
   FilterOperations start_filters;
   start_filters.Append(FilterOperation::CreateBrightnessFilter(0.1f));
@@ -8293,7 +8316,7 @@
       FilterKeyframe::Create(base::TimeDelta(), start_filters, nullptr));
   curve->AddKeyframe(FilterKeyframe::Create(
       base::TimeDelta::FromMilliseconds(100), end_filters, nullptr));
-  scoped_ptr<Animation> animation =
+  std::unique_ptr<Animation> animation =
       Animation::Create(std::move(curve), 0, 1, TargetProperty::FILTER);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
@@ -8568,7 +8591,8 @@
 
   scroll_child->SetDrawsContent(true);
   scroll_child->SetScrollParent(scroll_parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child);
   scroll_parent->SetScrollChildren(scroll_children.release());
   scroll_parent->SetDrawsContent(true);
@@ -8596,8 +8620,7 @@
   EXPECT_EQ(gfx::Rect(0, 5, 25, 25), scroll_child->visible_layer_rect());
 }
 
-static void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
-}
+static void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
 
 TEST_F(LayerTreeHostCommonTest, NumCopyRequestsInTargetSubtree) {
   // If the layer has a node in effect_tree, the return value of
@@ -8688,8 +8711,8 @@
   // Add a transform animation with a start delay. Now, even though |child| has
   // a singular transform, the subtree should still get processed.
   int animation_id = 0;
-  scoped_ptr<Animation> animation = Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)),
+  std::unique_ptr<Animation> animation = Animation::Create(
+      std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1.0)),
       animation_id, 1, TargetProperty::TRANSFORM);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
@@ -8717,7 +8740,7 @@
   // Add an opacity animation with a start delay.
   animation_id = 1;
   animation = Animation::Create(
-      scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
+      std::unique_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
       animation_id, 1, TargetProperty::OPACITY);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
@@ -8735,12 +8758,14 @@
                                   &task_graph_runner);
 
   gfx::Transform identity;
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.active_tree(), 1);
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.active_tree(), 2);
-  scoped_ptr<LayerImpl> grandchild =
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.active_tree(), 1);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.active_tree(), 2);
+  std::unique_ptr<LayerImpl> grandchild =
       LayerImpl::Create(host_impl.active_tree(), 3);
 
-  scoped_ptr<FakePictureLayerImpl> greatgrandchild(
+  std::unique_ptr<FakePictureLayerImpl> greatgrandchild(
       FakePictureLayerImpl::Create(host_impl.active_tree(), 4));
 
   child->SetDrawsContent(true);
@@ -8825,7 +8850,7 @@
   // Now, even though child has zero opacity, we will configure |grandchild| and
   // |greatgrandchild| in several ways that should force the subtree to be
   // processed anyhow.
-  std::vector<scoped_ptr<CopyOutputRequest>> requests;
+  std::vector<std::unique_ptr<CopyOutputRequest>> requests;
   requests.push_back(CopyOutputRequest::CreateEmptyRequest());
 
   grandchild_ptr->PassCopyRequests(&requests);
@@ -8846,7 +8871,7 @@
   EXPECT_EQ(gfx::Rect(10, 10), grandchild_ptr->visible_layer_rect());
   child_ptr->SetTransform(identity);
 
-  scoped_ptr<KeyframedTransformAnimationCurve> curve(
+  std::unique_ptr<KeyframedTransformAnimationCurve> curve(
       KeyframedTransformAnimationCurve::Create());
   TransformOperations start;
   start.AppendTranslate(1.f, 2.f, 3.f);
@@ -8858,7 +8883,7 @@
       TransformKeyframe::Create(base::TimeDelta(), start, nullptr));
   curve->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operation, nullptr));
-  scoped_ptr<Animation> transform_animation(
+  std::unique_ptr<Animation> transform_animation(
       Animation::Create(std::move(curve), 3, 3, TargetProperty::TRANSFORM));
   scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1));
   host_impl.active_tree()->animation_host()->RegisterPlayerForLayer(
@@ -8888,12 +8913,14 @@
 
   gfx::Transform identity;
   host_impl.CreatePendingTree();
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
-  scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
-  scoped_ptr<LayerImpl> grandchild =
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl.pending_tree(), 1);
+  std::unique_ptr<LayerImpl> child =
+      LayerImpl::Create(host_impl.pending_tree(), 2);
+  std::unique_ptr<LayerImpl> grandchild =
       LayerImpl::Create(host_impl.pending_tree(), 3);
 
-  scoped_ptr<FakePictureLayerImpl> greatgrandchild(
+  std::unique_ptr<FakePictureLayerImpl> greatgrandchild(
       FakePictureLayerImpl::Create(host_impl.pending_tree(), 4));
 
   child->SetDrawsContent(true);
@@ -8922,14 +8949,14 @@
   ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr);
   EXPECT_EQ(gfx::Rect(10, 10), grandchild_ptr->visible_layer_rect());
 
-  scoped_ptr<KeyframedFloatAnimationCurve> curve(
+  std::unique_ptr<KeyframedFloatAnimationCurve> curve(
       KeyframedFloatAnimationCurve::Create());
-  scoped_ptr<TimingFunction> func = EaseTimingFunction::Create();
+  std::unique_ptr<TimingFunction> func = EaseTimingFunction::Create();
   curve->AddKeyframe(
       FloatKeyframe::Create(base::TimeDelta(), 0.9f, std::move(func)));
   curve->AddKeyframe(
       FloatKeyframe::Create(base::TimeDelta::FromSecondsD(1.0), 0.3f, nullptr));
-  scoped_ptr<Animation> animation(
+  std::unique_ptr<Animation> animation(
       Animation::Create(std::move(curve), 3, 3, TargetProperty::OPACITY));
   scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1));
   host_impl.active_tree()->animation_host()->RegisterPlayerForLayer(
@@ -9186,7 +9213,7 @@
   clip_parent->SetMasksToBounds(true);
   test_layer->SetDrawsContent(true);
   render_surface->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(render_surface);
   clip_parent->SetClipChildren(clip_children.release());
   SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
@@ -9229,7 +9256,7 @@
   clip_child->SetDrawsContent(true);
   child->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
   SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
@@ -9269,7 +9296,7 @@
   test_layer1->SetDrawsContent(true);
   test_layer2->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -9312,7 +9339,7 @@
   clip_child->SetDrawsContent(true);
 
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -9356,7 +9383,7 @@
   unclipped_desc_surface2->SetDrawsContent(true);
   clipped_surface->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -9410,7 +9437,7 @@
   clip_child->SetDrawsContent(true);
   unclipped_desc_surface->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -9455,7 +9482,7 @@
   clip_child->SetDrawsContent(true);
   unclipped_desc_surface->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -9526,7 +9553,7 @@
   render_surface->SetDrawsContent(true);
   clip_child->SetDrawsContent(true);
   clip_child->SetClipParent(clip_parent);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   clip_parent->SetClipChildren(clip_children.release());
 
@@ -9610,7 +9637,7 @@
 
   const gfx::Transform identity_matrix;
   clip_child->SetClipParent(root);
-  scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
   clip_children->insert(clip_child);
   root->SetClipChildren(clip_children.release());
   root->SetMasksToBounds(true);
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 0e7a580..a993e6e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -17,6 +17,7 @@
 #include "base/auto_reset.h"
 #include "base/containers/small_map.h"
 #include "base/json/json_writer.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/stl_util.h"
@@ -164,7 +165,7 @@
 
 LayerTreeHostImpl::FrameData::~FrameData() {}
 
-scoped_ptr<LayerTreeHostImpl> LayerTreeHostImpl::Create(
+std::unique_ptr<LayerTreeHostImpl> LayerTreeHostImpl::Create(
     const LayerTreeSettings& settings,
     LayerTreeHostImplClient* client,
     TaskRunnerProvider* task_runner_provider,
@@ -173,7 +174,7 @@
     gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
     TaskGraphRunner* task_graph_runner,
     int id) {
-  return make_scoped_ptr(new LayerTreeHostImpl(
+  return base::WrapUnique(new LayerTreeHostImpl(
       settings, client, task_runner_provider, rendering_stats_instrumentation,
       shared_bitmap_manager, gpu_memory_buffer_manager, task_graph_runner, id));
 }
@@ -494,7 +495,7 @@
       gfx::SizeF(active_tree_->InnerViewportContainerLayer()->bounds());
 
   // Easing constants experimentally determined.
-  scoped_ptr<TimingFunction> timing_function =
+  std::unique_ptr<TimingFunction> timing_function =
       CubicBezierTimingFunction::Create(.8, 0, .3, .9);
 
   // TODO(miletus) : Pass in ScrollOffset.
@@ -587,10 +588,10 @@
   return layer_impl != NULL;
 }
 
-scoped_ptr<SwapPromiseMonitor>
+std::unique_ptr<SwapPromiseMonitor>
 LayerTreeHostImpl::CreateLatencyInfoSwapPromiseMonitor(
     ui::LatencyInfo* latency) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new LatencyInfoSwapPromiseMonitor(latency, NULL, this));
 }
 
@@ -604,7 +605,7 @@
 }
 
 void LayerTreeHostImpl::QueueSwapPromiseForMainThreadScrollUpdate(
-    scoped_ptr<SwapPromise> swap_promise) {
+    std::unique_ptr<SwapPromise> swap_promise) {
   swap_promises_for_main_thread_scroll_update_.push_back(
       std::move(swap_promise));
 }
@@ -653,7 +654,7 @@
 }
 
 void LayerTreeHostImpl::FrameData::AppendRenderPass(
-    scoped_ptr<RenderPass> render_pass) {
+    std::unique_ptr<RenderPass> render_pass) {
   render_passes.push_back(std::move(render_pass));
 }
 
@@ -757,7 +758,7 @@
                                       RenderPassId id) {
   auto it = std::find_if(
       list.begin(), list.end(),
-      [id](const scoped_ptr<RenderPass>& p) { return p->id == id; });
+      [id](const std::unique_ptr<RenderPass>& p) { return p->id == id; });
   return it == list.end() ? nullptr : it->get();
 }
 
@@ -982,7 +983,7 @@
 
   // Any copy requests left in the tree are not going to get serviced, and
   // should be aborted.
-  std::vector<scoped_ptr<CopyOutputRequest>> requests_to_abort;
+  std::vector<std::unique_ptr<CopyOutputRequest>> requests_to_abort;
   while (!active_tree_->LayersWithCopyOutputRequest().empty()) {
     LayerImpl* layer = active_tree_->LayersWithCopyOutputRequest().back();
     layer->TakeCopyRequestsAndTransformToTarget(&requests_to_abort);
@@ -1265,7 +1266,7 @@
   client_->SetNeedsPrepareTilesOnImplThread();
 }
 
-scoped_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue(
+std::unique_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue(
     TreePriority tree_priority,
     RasterTilePriorityQueue::Type type) {
   TRACE_EVENT0("disabled-by-default-cc.debug",
@@ -1278,12 +1279,13 @@
                                          tree_priority, type);
 }
 
-scoped_ptr<EvictionTilePriorityQueue> LayerTreeHostImpl::BuildEvictionQueue(
-    TreePriority tree_priority) {
+std::unique_ptr<EvictionTilePriorityQueue>
+LayerTreeHostImpl::BuildEvictionQueue(TreePriority tree_priority) {
   TRACE_EVENT0("disabled-by-default-cc.debug",
                "LayerTreeHostImpl::BuildEvictionQueue");
 
-  scoped_ptr<EvictionTilePriorityQueue> queue(new EvictionTilePriorityQueue);
+  std::unique_ptr<EvictionTilePriorityQueue> queue(
+      new EvictionTilePriorityQueue);
   queue->Build(active_tree_->picture_layers(),
                pending_tree_ ? pending_tree_->picture_layers()
                              : std::vector<PictureLayerImpl*>(),
@@ -1656,7 +1658,7 @@
     bool disable_picture_quad_image_filtering =
         IsActivelyScrolling() || animation_host_->NeedsAnimateLayers();
 
-    scoped_ptr<SoftwareRenderer> temp_software_renderer =
+    std::unique_ptr<SoftwareRenderer> temp_software_renderer =
         SoftwareRenderer::Create(this, &settings_.renderer_settings,
                                  output_surface_, NULL);
     temp_software_renderer->DrawFrame(
@@ -2011,7 +2013,7 @@
   if (!tree_activation_callback_.is_null())
     tree_activation_callback_.Run();
 
-  scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation =
+  std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation =
       active_tree_->TakePendingPageScaleAnimation();
   if (pending_page_scale_animation) {
     StartPageScaleAnimation(
@@ -2137,10 +2139,10 @@
   CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_);
 
   if (use_gpu_rasterization_) {
-    image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController);
+    image_decode_controller_ = base::WrapUnique(new GpuImageDecodeController);
   } else {
     image_decode_controller_ =
-        make_scoped_ptr(new SoftwareImageDecodeController(
+        base::WrapUnique(new SoftwareImageDecodeController(
             settings_.renderer_settings.preferred_tile_format));
   }
 
@@ -2155,8 +2157,8 @@
 }
 
 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
-    scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-    scoped_ptr<ResourcePool>* resource_pool) {
+    std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+    std::unique_ptr<ResourcePool>* resource_pool) {
   DCHECK(GetTaskRunner());
   // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is
   // resolved.
@@ -2246,8 +2248,8 @@
 }
 
 void LayerTreeHostImpl::PostFrameTimingEvents(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   client_->PostFrameTimingEventsOnImplThread(std::move(composite_events),
                                              std::move(main_frame_events));
 }
@@ -3318,8 +3320,8 @@
       ->scroll_tree.CollectScrollDeltas(scroll_info);
 }
 
-scoped_ptr<ScrollAndScaleSet> LayerTreeHostImpl::ProcessScrollDeltas() {
-  scoped_ptr<ScrollAndScaleSet> scroll_info(new ScrollAndScaleSet());
+std::unique_ptr<ScrollAndScaleSet> LayerTreeHostImpl::ProcessScrollDeltas() {
+  std::unique_ptr<ScrollAndScaleSet> scroll_info(new ScrollAndScaleSet());
 
   CollectScrollDeltas(scroll_info.get(), active_tree_->root_layer());
   scroll_info->page_scale_delta =
@@ -3432,7 +3434,7 @@
 }
 
 void LayerTreeHostImpl::UpdateAnimationState(bool start_ready_animations) {
-  scoped_ptr<AnimationEvents> events = animation_host_->CreateEvents();
+  std::unique_ptr<AnimationEvents> events = animation_host_->CreateEvents();
 
   const bool has_active_animations = animation_host_->UpdateAnimationState(
       start_ready_animations, events.get());
@@ -3459,7 +3461,8 @@
 std::string LayerTreeHostImpl::LayerTreeAsJson() const {
   std::string str;
   if (active_tree_->root_layer()) {
-    scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson());
+    std::unique_ptr<base::Value> json(
+        active_tree_->root_layer()->LayerTreeAsJson());
     base::JSONWriter::WriteWithOptions(
         *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str);
   }
@@ -3558,9 +3561,9 @@
   return current_begin_frame_tracker_.Interval();
 }
 
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
 LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const {
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   AsValueWithFrameInto(frame, state.get());
   return std::move(state);
@@ -3726,7 +3729,7 @@
 }
 
 void LayerTreeHostImpl::ScheduleMicroBenchmark(
-    scoped_ptr<MicroBenchmarkImpl> benchmark) {
+    std::unique_ptr<MicroBenchmarkImpl> benchmark) {
   micro_benchmark_controller_.ScheduleRun(std::move(benchmark));
 }
 
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 9366c22..8cca3e9 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -7,13 +7,13 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/synced_property.h"
@@ -111,7 +111,7 @@
   virtual void SetNeedsPrepareTilesOnImplThread() = 0;
   virtual void SetVideoNeedsBeginFrames(bool needs_begin_frames) = 0;
   virtual void PostAnimationEventsToMainThreadOnImplThread(
-      scoped_ptr<AnimationEvents> events) = 0;
+      std::unique_ptr<AnimationEvents> events) = 0;
   virtual bool IsInsideDraw() = 0;
   virtual void RenewTreePriority() = 0;
   virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
@@ -127,8 +127,9 @@
   virtual void OnDrawForOutputSurface(bool resourceless_software_draw) = 0;
 
   virtual void PostFrameTimingEventsOnImplThread(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0;
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events) = 0;
 
  protected:
   virtual ~LayerTreeHostImplClient() {}
@@ -147,7 +148,7 @@
       public MutatorHostClient,
       public base::SupportsWeakPtr<LayerTreeHostImpl> {
  public:
-  static scoped_ptr<LayerTreeHostImpl> Create(
+  static std::unique_ptr<LayerTreeHostImpl> Create(
       const LayerTreeSettings& settings,
       LayerTreeHostImplClient* client,
       TaskRunnerProvider* task_runner_provider,
@@ -196,7 +197,7 @@
   EventListenerProperties GetEventListenerProperties(
       EventListenerClass event_class) const override;
   bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override;
-  scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
+  std::unique_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
       ui::LatencyInfo* latency) override;
   ScrollElasticityHelper* CreateScrollElasticityHelper() override;
 
@@ -223,7 +224,7 @@
     bool has_no_damage;
 
     // RenderPassSink implementation.
-    void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override;
+    void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override;
 
    private:
     DISALLOW_COPY_AND_ASSIGN(FrameData);
@@ -328,10 +329,10 @@
   void NotifyReadyToDraw() override;
   void NotifyAllTileTasksCompleted() override;
   void NotifyTileStateChanged(const Tile* tile) override;
-  scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
+  std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue(
       TreePriority tree_priority,
       RasterTilePriorityQueue::Type type) override;
-  scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
+  std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
       TreePriority tree_priority) override;
   void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override;
 
@@ -441,7 +442,7 @@
     return scroll_affects_scroll_handler_;
   }
   void QueueSwapPromiseForMainThreadScrollUpdate(
-      scoped_ptr<SwapPromise> swap_promise);
+      std::unique_ptr<SwapPromise> swap_promise);
 
   bool IsActivelyScrolling() const;
 
@@ -461,7 +462,7 @@
 
   const gfx::Transform& DrawTransform() const;
 
-  scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> ProcessScrollDeltas();
 
   void set_max_memory_needed_bytes(size_t bytes) {
     max_memory_needed_bytes_ = bytes;
@@ -513,7 +514,7 @@
 
   void AsValueWithFrameInto(FrameData* frame,
                             base::trace_event::TracedValue* value) const;
-  scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValueWithFrame(
+  std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValueWithFrame(
       FrameData* frame) const;
   void ActivationStateAsValueInto(base::trace_event::TracedValue* value) const;
 
@@ -541,7 +542,7 @@
   gfx::Vector2dF ComputeScrollDelta(ScrollNode* scroll_node,
                                     const gfx::Vector2dF& delta);
 
-  void ScheduleMicroBenchmark(scoped_ptr<MicroBenchmarkImpl> benchmark);
+  void ScheduleMicroBenchmark(std::unique_ptr<MicroBenchmarkImpl> benchmark);
 
   CompositorFrameMetadata MakeCompositorFrameMetadata() const;
   // Viewport rectangle and clip in nonflipped window space.  These rects
@@ -570,8 +571,8 @@
   bool CommitToActiveTree() const;
 
   virtual void CreateResourceAndTileTaskWorkerPool(
-      scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
-      scoped_ptr<ResourcePool>* resource_pool);
+      std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
+      std::unique_ptr<ResourcePool>* resource_pool);
 
   bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
 
@@ -606,8 +607,9 @@
 
   // Post the given frame timing events to the requester.
   void PostFrameTimingEvents(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events);
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events);
 
   base::SingleThreadTaskRunner* GetTaskRunner() const {
     DCHECK(task_runner_provider_);
@@ -737,42 +739,42 @@
 
   OutputSurface* output_surface_;
 
-  scoped_ptr<ResourceProvider> resource_provider_;
+  std::unique_ptr<ResourceProvider> resource_provider_;
   bool content_is_suitable_for_gpu_rasterization_;
   bool has_gpu_rasterization_trigger_;
   bool use_gpu_rasterization_;
   bool use_msaa_;
   GpuRasterizationStatus gpu_rasterization_status_;
   bool tree_resources_for_gpu_rasterization_dirty_;
-  scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
-  scoped_ptr<ResourcePool> resource_pool_;
-  scoped_ptr<Renderer> renderer_;
-  scoped_ptr<ImageDecodeController> image_decode_controller_;
+  std::unique_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
+  std::unique_ptr<ResourcePool> resource_pool_;
+  std::unique_ptr<Renderer> renderer_;
+  std::unique_ptr<ImageDecodeController> image_decode_controller_;
 
   GlobalStateThatImpactsTilePriority global_tile_state_;
 
   // Tree currently being drawn.
-  scoped_ptr<LayerTreeImpl> active_tree_;
+  std::unique_ptr<LayerTreeImpl> active_tree_;
 
   // In impl-side painting mode, tree with possibly incomplete rasterized
   // content. May be promoted to active by ActivatePendingTree().
-  scoped_ptr<LayerTreeImpl> pending_tree_;
+  std::unique_ptr<LayerTreeImpl> pending_tree_;
 
   // In impl-side painting mode, inert tree with layers that can be recycled
   // by the next sync from the main thread.
-  scoped_ptr<LayerTreeImpl> recycle_tree_;
+  std::unique_ptr<LayerTreeImpl> recycle_tree_;
 
   InputHandlerClient* input_handler_client_;
   bool did_lock_scrolling_layer_;
   bool wheel_scrolling_;
   bool scroll_affects_scroll_handler_;
   int scroll_layer_id_when_mouse_over_scrollbar_;
-  std::vector<scoped_ptr<SwapPromise>>
+  std::vector<std::unique_ptr<SwapPromise>>
       swap_promises_for_main_thread_scroll_update_;
 
   // An object to implement the ScrollElasticityHelper interface and
   // hold all state related to elasticity. May be NULL if never requested.
-  scoped_ptr<ScrollElasticityHelper> scroll_elasticity_helper_;
+  std::unique_ptr<ScrollElasticityHelper> scroll_elasticity_helper_;
 
   bool tile_priorities_dirty_;
 
@@ -782,22 +784,22 @@
   ManagedMemoryPolicy cached_managed_memory_policy_;
 
   const bool is_synchronous_single_threaded_;
-  scoped_ptr<TileManager> tile_manager_;
+  std::unique_ptr<TileManager> tile_manager_;
 
   gfx::Vector2dF accumulated_root_overscroll_;
 
   bool pinch_gesture_active_;
   bool pinch_gesture_end_should_clear_scrolling_layer_;
 
-  scoped_ptr<TopControlsManager> top_controls_manager_;
+  std::unique_ptr<TopControlsManager> top_controls_manager_;
 
-  scoped_ptr<PageScaleAnimation> page_scale_animation_;
+  std::unique_ptr<PageScaleAnimation> page_scale_animation_;
 
-  scoped_ptr<FrameRateCounter> fps_counter_;
-  scoped_ptr<MemoryHistory> memory_history_;
-  scoped_ptr<DebugRectHistory> debug_rect_history_;
+  std::unique_ptr<FrameRateCounter> fps_counter_;
+  std::unique_ptr<MemoryHistory> memory_history_;
+  std::unique_ptr<DebugRectHistory> debug_rect_history_;
 
-  scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
+  std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
 
   // The maximum memory that would be used by the prioritized resource
   // manager, if there were no limit on memory usage.
@@ -826,17 +828,17 @@
 
   gfx::Rect viewport_damage_rect_;
 
-  scoped_ptr<AnimationHost> animation_host_;
+  std::unique_ptr<AnimationHost> animation_host_;
   std::set<VideoFrameController*> video_frame_controllers_;
 
   // Map from scroll layer ID to scrollbar animation controller.
   // There is one animation controller per pair of overlay scrollbars.
-  std::unordered_map<int, scoped_ptr<ScrollbarAnimationController>>
+  std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>>
       scrollbar_animation_controllers_;
 
   RenderingStatsInstrumentation* rendering_stats_instrumentation_;
   MicroBenchmarkControllerImpl micro_benchmark_controller_;
-  scoped_ptr<SynchronousTaskGraphRunner>
+  std::unique_ptr<SynchronousTaskGraphRunner>
       single_thread_synchronous_task_graph_runner_;
 
   // Optional callback to notify of new tree activations.
@@ -852,9 +854,9 @@
   bool requires_high_res_to_draw_;
   bool is_likely_to_require_a_draw_;
 
-  scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
+  std::unique_ptr<FrameTimingTracker> frame_timing_tracker_;
 
-  scoped_ptr<Viewport> viewport_;
+  std::unique_ptr<Viewport> viewport_;
 
   DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
 };
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 31b8f56d..6266def 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -13,6 +13,7 @@
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/animation/animation_events.h"
 #include "cc/animation/animation_host.h"
@@ -148,7 +149,7 @@
   void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; }
   void SetVideoNeedsBeginFrames(bool needs_begin_frames) override {}
   void PostAnimationEventsToMainThreadOnImplThread(
-      scoped_ptr<AnimationEvents> events) override {}
+      std::unique_ptr<AnimationEvents> events) override {}
   bool IsInsideDraw() override { return false; }
   void RenewTreePriority() override {}
   void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
@@ -163,7 +164,7 @@
     did_complete_page_scale_animation_ = true;
   }
   void OnDrawForOutputSurface(bool resourceless_software_draw) override {
-    scoped_ptr<LayerTreeHostImpl::FrameData> frame(
+    std::unique_ptr<LayerTreeHostImpl::FrameData> frame(
         new LayerTreeHostImpl::FrameData);
     EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(frame.get()));
     last_on_draw_render_passes_.clear();
@@ -175,8 +176,8 @@
     last_on_draw_frame_ = std::move(frame);
   }
   void PostFrameTimingEventsOnImplThread(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override {}
 
   void set_reduce_memory_result(bool reduce_memory_result) {
@@ -184,14 +185,14 @@
   }
 
   virtual bool CreateHostImpl(const LayerTreeSettings& settings,
-                              scoped_ptr<OutputSurface> output_surface) {
+                              std::unique_ptr<OutputSurface> output_surface) {
     return CreateHostImplWithTaskRunnerProvider(
         settings, std::move(output_surface), &task_runner_provider_);
   }
 
   virtual bool CreateHostImplWithTaskRunnerProvider(
       const LayerTreeSettings& settings,
-      scoped_ptr<OutputSurface> output_surface,
+      std::unique_ptr<OutputSurface> output_surface,
       TaskRunnerProvider* task_runner_provider) {
     host_impl_ = LayerTreeHostImpl::Create(
         settings, this, task_runner_provider, &stats_instrumentation_,
@@ -215,7 +216,7 @@
     return init;
   }
 
-  void SetupRootLayerImpl(scoped_ptr<LayerImpl> root) {
+  void SetupRootLayerImpl(std::unique_ptr<LayerImpl> root) {
     root->SetPosition(gfx::PointF());
     root->SetBounds(gfx::Size(10, 10));
     root->SetDrawsContent(true);
@@ -285,13 +286,12 @@
     const int kInnerViewportClipLayerId = 4;
     const int kPageScaleLayerId = 5;
 
-    scoped_ptr<LayerImpl> root =
-        LayerImpl::Create(layer_tree_impl, 1);
+    std::unique_ptr<LayerImpl> root = LayerImpl::Create(layer_tree_impl, 1);
     root->SetBounds(content_size);
     root->SetPosition(gfx::PointF());
     root->SetForceRenderSurface(true);
 
-    scoped_ptr<LayerImpl> inner_scroll =
+    std::unique_ptr<LayerImpl> inner_scroll =
         LayerImpl::Create(layer_tree_impl, kInnerViewportScrollLayerId);
     inner_scroll->SetIsContainerForFixedPositionLayers(true);
     inner_scroll->layer_tree_impl()
@@ -299,24 +299,24 @@
         ->scroll_tree.UpdateScrollOffsetBaseForTesting(inner_scroll->id(),
                                                        gfx::ScrollOffset());
 
-    scoped_ptr<LayerImpl> inner_clip =
+    std::unique_ptr<LayerImpl> inner_clip =
         LayerImpl::Create(layer_tree_impl, kInnerViewportClipLayerId);
     inner_clip->SetBounds(
         gfx::Size(content_size.width() / 2, content_size.height() / 2));
 
-    scoped_ptr<LayerImpl> page_scale =
+    std::unique_ptr<LayerImpl> page_scale =
         LayerImpl::Create(layer_tree_impl, kPageScaleLayerId);
 
     inner_scroll->SetScrollClipLayer(inner_clip->id());
     inner_scroll->SetBounds(content_size);
     inner_scroll->SetPosition(gfx::PointF());
 
-    scoped_ptr<LayerImpl> outer_clip =
+    std::unique_ptr<LayerImpl> outer_clip =
         LayerImpl::Create(layer_tree_impl, kOuterViewportClipLayerId);
     outer_clip->SetBounds(content_size);
     outer_clip->SetIsContainerForFixedPositionLayers(true);
 
-    scoped_ptr<LayerImpl> outer_scroll =
+    std::unique_ptr<LayerImpl> outer_scroll =
         LayerImpl::Create(layer_tree_impl, kOuterViewportScrollLayerId);
     outer_scroll->SetScrollClipLayer(outer_clip->id());
     outer_scroll->layer_tree_impl()
@@ -326,7 +326,7 @@
     outer_scroll->SetBounds(content_size);
     outer_scroll->SetPosition(gfx::PointF());
 
-    scoped_ptr<LayerImpl> contents =
+    std::unique_ptr<LayerImpl> contents =
         LayerImpl::Create(layer_tree_impl, kContentLayerId);
     contents->SetDrawsContent(true);
     contents->SetBounds(content_size);
@@ -386,12 +386,12 @@
     return content_layer;
   }
 
-  scoped_ptr<LayerImpl> CreateScrollableLayer(int id,
-                                              const gfx::Size& size,
-                                              LayerImpl* clip_layer) {
+  std::unique_ptr<LayerImpl> CreateScrollableLayer(int id,
+                                                   const gfx::Size& size,
+                                                   LayerImpl* clip_layer) {
     DCHECK(clip_layer);
     DCHECK(id != clip_layer->id());
-    scoped_ptr<LayerImpl> layer =
+    std::unique_ptr<LayerImpl> layer =
         LayerImpl::Create(host_impl_->active_tree(), id);
     layer->SetScrollClipLayer(clip_layer->id());
     layer->SetDrawsContent(true);
@@ -400,30 +400,33 @@
     return layer;
   }
 
-  scoped_ptr<ScrollState> BeginState(const gfx::Point& point) {
+  std::unique_ptr<ScrollState> BeginState(const gfx::Point& point) {
     ScrollStateData scroll_state_data;
     scroll_state_data.is_beginning = true;
     scroll_state_data.start_position_x = point.x();
     scroll_state_data.start_position_y = point.y();
-    scoped_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
+    std::unique_ptr<ScrollState> scroll_state(
+        new ScrollState(scroll_state_data));
     return scroll_state;
   }
 
-  scoped_ptr<ScrollState> UpdateState(const gfx::Point& point,
-                                      const gfx::Vector2dF& delta) {
+  std::unique_ptr<ScrollState> UpdateState(const gfx::Point& point,
+                                           const gfx::Vector2dF& delta) {
     ScrollStateData scroll_state_data;
     scroll_state_data.delta_x = delta.x();
     scroll_state_data.delta_y = delta.y();
     scroll_state_data.start_position_x = point.x();
     scroll_state_data.start_position_y = point.y();
-    scoped_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
+    std::unique_ptr<ScrollState> scroll_state(
+        new ScrollState(scroll_state_data));
     return scroll_state;
   }
 
-  scoped_ptr<ScrollState> EndState() {
+  std::unique_ptr<ScrollState> EndState() {
     ScrollStateData scroll_state_data;
     scroll_state_data.is_ending = true;
-    scoped_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
+    std::unique_ptr<ScrollState> scroll_state(
+        new ScrollState(scroll_state_data));
     return scroll_state;
   }
 
@@ -460,7 +463,7 @@
   scoped_refptr<AnimationTimeline> timeline() { return timeline_; }
 
  protected:
-  virtual scoped_ptr<OutputSurface> CreateOutputSurface() {
+  virtual std::unique_ptr<OutputSurface> CreateOutputSurface() {
     return FakeOutputSurface::Create3d();
   }
 
@@ -495,8 +498,8 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<LayerTreeHostImpl> host_impl_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<LayerTreeHostImpl> host_impl_;
   FakeRenderingStatsInstrumentation stats_instrumentation_;
   bool on_can_draw_state_changed_called_;
   bool did_notify_ready_to_activate_;
@@ -509,7 +512,7 @@
   base::Closure animation_task_;
   base::TimeDelta requested_animation_delay_;
   bool skip_draw_layers_in_on_draw_;
-  scoped_ptr<LayerTreeHostImpl::FrameData> last_on_draw_frame_;
+  std::unique_ptr<LayerTreeHostImpl::FrameData> last_on_draw_frame_;
   RenderPassList last_on_draw_render_passes_;
   scoped_refptr<AnimationTimeline> timeline_;
 };
@@ -561,7 +564,7 @@
 TEST_F(LayerTreeHostImplTest, ResourcelessDrawWithEmptyViewport) {
   CreateHostImpl(DefaultSettings(),
                  FakeOutputSurface::CreateSoftware(
-                     make_scoped_ptr(new SoftwareOutputDevice())));
+                     base::WrapUnique(new SoftwareOutputDevice())));
   SetupScrollAndContentsLayers(gfx::Size(100, 100));
   EXPECT_TRUE(host_impl_->CanDraw());
   host_impl_->SetViewportSize(gfx::Size());
@@ -582,13 +585,14 @@
 TEST_F(LayerTreeHostImplTest, ScrollDeltaNoLayers) {
   ASSERT_FALSE(host_impl_->active_tree()->root_layer());
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   ASSERT_EQ(scroll_info->scrolls.size(), 0u);
 }
 
 TEST_F(LayerTreeHostImplTest, ScrollDeltaTreeButNoChanges) {
   {
-    scoped_ptr<LayerImpl> root =
+    std::unique_ptr<LayerImpl> root =
         LayerImpl::Create(host_impl_->active_tree(), 1);
     root->AddChild(LayerImpl::Create(host_impl_->active_tree(), 2));
     root->AddChild(LayerImpl::Create(host_impl_->active_tree(), 3));
@@ -604,7 +608,7 @@
 
   ExpectClearedScrollDeltasRecursive(root);
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info;
+  std::unique_ptr<ScrollAndScaleSet> scroll_info;
 
   scroll_info = host_impl_->ProcessScrollDeltas();
   ASSERT_EQ(scroll_info->scrolls.size(), 0u);
@@ -619,9 +623,9 @@
   gfx::ScrollOffset scroll_offset(20, 30);
   gfx::Vector2d scroll_delta(11, -15);
   {
-    scoped_ptr<LayerImpl> root_clip =
+    std::unique_ptr<LayerImpl> root_clip =
         LayerImpl::Create(host_impl_->active_tree(), 2);
-    scoped_ptr<LayerImpl> root =
+    std::unique_ptr<LayerImpl> root =
         LayerImpl::Create(host_impl_->active_tree(), 1);
     root_clip->SetBounds(gfx::Size(10, 10));
     LayerImpl* root_layer = root.get();
@@ -639,7 +643,7 @@
 
   LayerImpl* root = host_impl_->active_tree()->root_layer()->children()[0];
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info;
+  std::unique_ptr<ScrollAndScaleSet> scroll_info;
 
   scroll_info = host_impl_->ProcessScrollDeltas();
   ASSERT_EQ(scroll_info->scrolls.size(), 1u);
@@ -709,7 +713,7 @@
 }
 
 TEST_F(LayerTreeHostImplTest, ScrollWithoutRenderer) {
-  scoped_ptr<TestWebGraphicsContext3D> context_owned =
+  std::unique_ptr<TestWebGraphicsContext3D> context_owned =
       TestWebGraphicsContext3D::Create();
   context_owned->set_context_lost(true);
 
@@ -748,7 +752,8 @@
   gfx::Vector2d scroll_delta(0, 10);
   host_impl_->ScrollBy(UpdateState(gfx::Point(), scroll_delta).get());
   host_impl_->ScrollEnd(EndState().get());
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_TRUE(
       ScrollInfoContains(*scroll_info, scroll_layer->id(), scroll_delta));
 }
@@ -806,7 +811,7 @@
 
   LayerImpl* child = 0;
   {
-    scoped_ptr<LayerImpl> child_layer =
+    std::unique_ptr<LayerImpl> child_layer =
         LayerImpl::Create(host_impl_->active_tree(), 6);
     child = child_layer.get();
     child_layer->SetDrawsContent(true);
@@ -1405,7 +1410,7 @@
   root->SetBounds(gfx::Size(50, 50));
   root->SetHasRenderSurface(true);
 
-  root->AddChild(scoped_ptr<MissingTilesLayer>(
+  root->AddChild(std::unique_ptr<MissingTilesLayer>(
       new MissingTilesLayer(host_impl_->active_tree(), 2)));
   MissingTilesLayer* child =
       static_cast<MissingTilesLayer*>(root->children()[0]);
@@ -1513,7 +1518,7 @@
     EXPECT_TRUE(did_request_commit_);
     EXPECT_EQ(gfx::Size(50, 50), container_layer->bounds());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, page_scale_delta);
 
@@ -1545,7 +1550,7 @@
     host_impl_->ScrollBy(UpdateState(gfx::Point(), scroll_delta).get());
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_TRUE(ScrollInfoContains(
         *scroll_info.get(), scroll_layer->id(),
@@ -1886,7 +1891,7 @@
   ui::LatencyInfo latency_info;
   latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0,
                                 1234);
-  scoped_ptr<SwapPromise> swap_promise(
+  std::unique_ptr<SwapPromise> swap_promise(
       new LatencyInfoSwapPromise(latency_info));
 
   SetupScrollAndContentsLayers(gfx::Size(100, 100));
@@ -1900,7 +1905,8 @@
       std::move(swap_promise));
   host_impl_->ScrollEnd(EndState().get());
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_EQ(1u, scroll_info->swap_promises.size());
   EXPECT_EQ(latency_info.trace_id(), scroll_info->swap_promises[0]->TraceId());
 }
@@ -1918,19 +1924,19 @@
   LayerImpl *child;
   LayerImpl *child_clip;
 
-  scoped_ptr<LayerImpl> scroll_parent_clip =
+  std::unique_ptr<LayerImpl> scroll_parent_clip =
       LayerImpl::Create(host_impl_->active_tree(), 6);
-  scoped_ptr<LayerImpl> scroll_parent = CreateScrollableLayer(
-      7, gfx::Size(10, 10), scroll_parent_clip.get());
+  std::unique_ptr<LayerImpl> scroll_parent =
+      CreateScrollableLayer(7, gfx::Size(10, 10), scroll_parent_clip.get());
   parent = scroll_parent.get();
   scroll_parent_clip->AddChild(std::move(scroll_parent));
 
   viewport_scroll->AddChild(std::move(scroll_parent_clip));
 
-  scoped_ptr<LayerImpl> scroll_child_clip =
+  std::unique_ptr<LayerImpl> scroll_child_clip =
       LayerImpl::Create(host_impl_->active_tree(), 8);
-  scoped_ptr<LayerImpl> scroll_child = CreateScrollableLayer(
-      9, gfx::Size(10, 10), scroll_child_clip.get());
+  std::unique_ptr<LayerImpl> scroll_child =
+      CreateScrollableLayer(9, gfx::Size(10, 10), scroll_child_clip.get());
   child = scroll_child.get();
   scroll_child->SetPosition(gfx::PointF(20.f, 20.f));
   scroll_child_clip->AddChild(std::move(scroll_child));
@@ -1939,7 +1945,8 @@
   viewport_scroll->AddChild(std::move(scroll_child_clip));
 
   child_clip->SetScrollParent(parent);
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(child_clip);
   parent->SetScrollChildren(scroll_children.release());
 
@@ -2025,7 +2032,7 @@
     EXPECT_TRUE(did_request_redraw_);
     EXPECT_TRUE(did_request_commit_);
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, page_scale_delta);
   }
@@ -2044,7 +2051,7 @@
     host_impl_->PinchGestureEnd();
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, max_page_scale);
   }
@@ -2070,7 +2077,7 @@
     host_impl_->PinchGestureEnd();
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, min_page_scale);
 
@@ -2099,7 +2106,7 @@
     host_impl_->PinchGestureEnd();
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, page_scale_delta);
     EXPECT_TRUE(scroll_info->scrolls.empty());
@@ -2129,7 +2136,7 @@
     host_impl_->PinchGestureEnd();
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, page_scale_delta);
     EXPECT_TRUE(ScrollInfoContains(*scroll_info, scroll_layer->id(),
@@ -2163,7 +2170,7 @@
     host_impl_->PinchGestureEnd();
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, 2.f);
     EXPECT_TRUE(ScrollInfoContains(*scroll_info, scroll_layer->id(),
@@ -2202,11 +2209,9 @@
     did_request_redraw_ = false;
     did_request_next_frame_ = false;
     host_impl_->active_tree()->SetPendingPageScaleAnimation(
-        scoped_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
-            gfx::Vector2d(),
-            false,
-            2.f,
-            duration)));
+        std::unique_ptr<PendingPageScaleAnimation>(
+            new PendingPageScaleAnimation(gfx::Vector2d(), false, 2.f,
+                                          duration)));
     host_impl_->ActivateSyncTree();
     EXPECT_FALSE(did_request_redraw_);
     EXPECT_TRUE(did_request_next_frame_);
@@ -2239,7 +2244,7 @@
     EXPECT_FALSE(did_request_next_frame_);
     host_impl_->DidFinishImplFrame();
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, 2);
     EXPECT_TRUE(ScrollInfoContains(*scroll_info, scroll_layer->id(),
@@ -2262,11 +2267,9 @@
     did_request_redraw_ = false;
     did_request_next_frame_ = false;
     host_impl_->active_tree()->SetPendingPageScaleAnimation(
-        scoped_ptr<PendingPageScaleAnimation> (new PendingPageScaleAnimation(
-            gfx::Vector2d(25, 25),
-            true,
-            min_page_scale,
-            duration)));
+        std::unique_ptr<PendingPageScaleAnimation>(
+            new PendingPageScaleAnimation(gfx::Vector2d(25, 25), true,
+                                          min_page_scale, duration)));
     host_impl_->ActivateSyncTree();
     EXPECT_FALSE(did_request_redraw_);
     EXPECT_TRUE(did_request_next_frame_);
@@ -2291,7 +2294,7 @@
     EXPECT_TRUE(did_request_commit_);
     host_impl_->DidFinishImplFrame();
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, min_page_scale);
     // Pushed to (0,0) via clamping against contents layer size.
@@ -2329,11 +2332,9 @@
             scroll_layer->id(), gfx::ScrollOffset(50, 50));
 
     host_impl_->active_tree()->SetPendingPageScaleAnimation(
-        scoped_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
-            gfx::Vector2d(),
-            true,
-            1.f,
-            duration)));
+        std::unique_ptr<PendingPageScaleAnimation>(
+            new PendingPageScaleAnimation(gfx::Vector2d(), true, 1.f,
+                                          duration)));
     host_impl_->ActivateSyncTree();
     begin_frame_args.frame_time = start_time;
     host_impl_->WillBeginImplFrame(begin_frame_args);
@@ -2352,7 +2353,7 @@
     EXPECT_TRUE(did_request_commit_);
     host_impl_->DidFinishImplFrame();
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_EQ(scroll_info->page_scale_delta, 1);
     ExpectNone(*scroll_info, scroll_layer->id());
@@ -2397,12 +2398,9 @@
   // Make sure TakePageScaleAnimation works properly.
 
   host_impl_->sync_tree()->SetPendingPageScaleAnimation(
-      scoped_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
-          gfx::Vector2d(),
-          false,
-          target_scale,
-          duration)));
-  scoped_ptr<PendingPageScaleAnimation> psa =
+      std::unique_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
+          gfx::Vector2d(), false, target_scale, duration)));
+  std::unique_ptr<PendingPageScaleAnimation> psa =
       host_impl_->sync_tree()->TakePendingPageScaleAnimation();
   EXPECT_EQ(target_scale, psa->scale);
   EXPECT_EQ(duration, psa->duration);
@@ -2413,11 +2411,8 @@
   did_request_redraw_ = false;
   did_request_next_frame_ = false;
   host_impl_->sync_tree()->SetPendingPageScaleAnimation(
-      scoped_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
-          gfx::Vector2d(),
-          false,
-          target_scale,
-          duration)));
+      std::unique_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
+          gfx::Vector2d(), false, target_scale, duration)));
   begin_frame_args.frame_time = halfway_through_animation;
   host_impl_->WillBeginImplFrame(begin_frame_args);
   host_impl_->Animate();
@@ -2479,7 +2474,7 @@
   EXPECT_FALSE(did_request_next_frame_);
   host_impl_->DidFinishImplFrame();
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info =
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
       host_impl_->ProcessScrollDeltas();
   EXPECT_EQ(scroll_info->page_scale_delta, target_scale);
   EXPECT_TRUE(ScrollInfoContains(*scroll_info, scroll_layer->id(),
@@ -2511,7 +2506,7 @@
 
   did_complete_page_scale_animation_ = false;
   host_impl_->active_tree()->SetPendingPageScaleAnimation(
-      scoped_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
+      std::unique_ptr<PendingPageScaleAnimation>(new PendingPageScaleAnimation(
           gfx::Vector2d(), false, 2.f, duration)));
   host_impl_->ActivateSyncTree();
   begin_frame_args.frame_time = start_time;
@@ -2600,7 +2595,7 @@
         new LayerTreeHostImplOverridePhysicalTime(
             settings, this, &task_runner_provider_, &shared_bitmap_manager_,
             &task_graph_runner_, &stats_instrumentation_);
-    host_impl_ = make_scoped_ptr(host_impl_override_time);
+    host_impl_ = base::WrapUnique(host_impl_override_time);
     output_surface_ = CreateOutputSurface();
     host_impl_->SetVisible(true);
     host_impl_->InitializeRenderer(output_surface_.get());
@@ -2610,7 +2605,7 @@
     host_impl_->SetViewportSize(
         gfx::Size(content_size.width() / 2, content_size.height() / 2));
 
-    scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar =
+    std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar =
         SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), 400,
                                              VERTICAL, 10, 0, false, true);
     EXPECT_FLOAT_EQ(0.f, scrollbar->opacity());
@@ -2794,7 +2789,7 @@
     CreateHostImpl(settings, CreateOutputSurface());
     host_impl_->CreatePendingTree();
     CreateScrollAndContentsLayers(host_impl_->pending_tree(), content_size);
-    scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar =
+    std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar =
         SolidColorScrollbarLayerImpl::Create(host_impl_->pending_tree(), 400,
                                              VERTICAL, 10, 0, false, true);
     LayerImpl* scroll = host_impl_->pending_tree()->OuterViewportScrollLayer();
@@ -2861,13 +2856,13 @@
       outer_viewport_size);
   LayerImpl* root_scroll =
       host_impl_->active_tree()->OuterViewportScrollLayer();
-  scoped_ptr<SolidColorScrollbarLayerImpl> horiz_scrollbar =
+  std::unique_ptr<SolidColorScrollbarLayerImpl> horiz_scrollbar =
       SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), horiz_id,
                                            HORIZONTAL, 5, 5, true, true);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       LayerImpl::Create(host_impl_->active_tree(), child_scroll_id);
   child->SetBounds(content_size);
-  scoped_ptr<LayerImpl> child_clip =
+  std::unique_ptr<LayerImpl> child_clip =
       LayerImpl::Create(host_impl_->active_tree(), child_clip_id);
   child->SetBounds(inner_viewport_size);
 
@@ -2898,22 +2893,22 @@
       viewport_size);
   LayerImpl* root_scroll =
       host_impl_->active_tree()->OuterViewportScrollLayer();
-  scoped_ptr<SolidColorScrollbarLayerImpl> vert_1_scrollbar =
+  std::unique_ptr<SolidColorScrollbarLayerImpl> vert_1_scrollbar =
       SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), vert_1_id,
                                            VERTICAL, 5, 5, true, true);
-  scoped_ptr<SolidColorScrollbarLayerImpl> horiz_1_scrollbar =
+  std::unique_ptr<SolidColorScrollbarLayerImpl> horiz_1_scrollbar =
       SolidColorScrollbarLayerImpl::Create(
           host_impl_->active_tree(), horiz_1_id, HORIZONTAL, 5, 5, true, true);
-  scoped_ptr<SolidColorScrollbarLayerImpl> vert_2_scrollbar =
+  std::unique_ptr<SolidColorScrollbarLayerImpl> vert_2_scrollbar =
       SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), vert_2_id,
                                            VERTICAL, 5, 5, true, true);
-  scoped_ptr<SolidColorScrollbarLayerImpl> horiz_2_scrollbar =
+  std::unique_ptr<SolidColorScrollbarLayerImpl> horiz_2_scrollbar =
       SolidColorScrollbarLayerImpl::Create(
           host_impl_->active_tree(), horiz_2_id, HORIZONTAL, 5, 5, true, true);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       LayerImpl::Create(host_impl_->active_tree(), child_scroll_id);
   child->SetBounds(content_size);
-  scoped_ptr<LayerImpl> child_clip =
+  std::unique_ptr<LayerImpl> child_clip =
       LayerImpl::Create(host_impl_->active_tree(), child_clip_id);
   child->SetBounds(viewport_size);
   LayerImpl* child_ptr = child.get();
@@ -3019,7 +3014,7 @@
   LayerImpl* root_scroll =
       host_impl_->active_tree()->OuterViewportScrollLayer();
   // The scrollbar is on the left side.
-  scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar =
+  std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar =
       SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), 6,
                                            VERTICAL, 5, 5, true, true);
   scrollbar->SetScrollLayerId(root_scroll->id());
@@ -3195,8 +3190,8 @@
 
 class DidDrawCheckLayer : public LayerImpl {
  public:
-  static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new DidDrawCheckLayer(tree_impl, id));
+  static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
+    return base::WrapUnique(new DidDrawCheckLayer(tree_impl, id));
   }
 
   bool WillDraw(DrawMode draw_mode, ResourceProvider* provider) override {
@@ -3229,10 +3224,10 @@
     did_draw_called_ = false;
   }
 
-  static void IgnoreResult(scoped_ptr<CopyOutputResult> result) {}
+  static void IgnoreResult(std::unique_ptr<CopyOutputResult> result) {}
 
   void AddCopyRequest() {
-    std::vector<scoped_ptr<CopyOutputRequest>> requests;
+    std::vector<std::unique_ptr<CopyOutputRequest>> requests;
     requests.push_back(
         CopyOutputRequest::CreateRequest(base::Bind(&IgnoreResult)));
     SetForceRenderSurface(true);
@@ -3427,7 +3422,7 @@
 
 class MissingTextureAnimatingLayer : public DidDrawCheckLayer {
  public:
-  static scoped_ptr<LayerImpl> Create(
+  static std::unique_ptr<LayerImpl> Create(
       LayerTreeImpl* tree_impl,
       int id,
       bool tile_missing,
@@ -3435,7 +3430,7 @@
       bool animating,
       ResourceProvider* resource_provider,
       scoped_refptr<AnimationTimeline> timeline) {
-    return make_scoped_ptr(new MissingTextureAnimatingLayer(
+    return base::WrapUnique(new MissingTextureAnimatingLayer(
         tree_impl, id, tile_missing, had_incomplete_tile, animating,
         resource_provider, timeline));
   }
@@ -3629,7 +3624,7 @@
        PrepareToDrawWhenDrawAndSwapFullViewportEveryFrame) {
   CreateHostImpl(DefaultSettings(),
                  FakeOutputSurface::CreateSoftware(
-                     make_scoped_ptr(new SoftwareOutputDevice())));
+                     base::WrapUnique(new SoftwareOutputDevice())));
 
   const gfx::Transform external_transform;
   const gfx::Rect external_viewport;
@@ -3717,7 +3712,8 @@
 }
 
 TEST_F(LayerTreeHostImplTest, ScrollRootIgnored) {
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetScrollClipLayer(Layer::INVALID_ID);
   root->SetForceRenderSurface(true);
   host_impl_->active_tree()->SetRootLayer(std::move(root));
@@ -3771,7 +3767,7 @@
   }
 
   bool CreateHostImpl(const LayerTreeSettings& settings,
-                      scoped_ptr<OutputSurface> output_surface) override {
+                      std::unique_ptr<OutputSurface> output_surface) override {
     bool init = LayerTreeHostImplTest::CreateHostImpl(
         settings, std::move(output_surface));
     if (init) {
@@ -3804,12 +3800,12 @@
     tree_impl->PushPageScaleFromMainThread(1.f, 1.f, 1.f);
     host_impl_->DidChangeTopControlsPosition();
 
-    scoped_ptr<LayerImpl> root = LayerImpl::Create(tree_impl, 1);
-    scoped_ptr<LayerImpl> root_clip = LayerImpl::Create(tree_impl, 2);
-    scoped_ptr<LayerImpl> page_scale = LayerImpl::Create(tree_impl, 3);
+    std::unique_ptr<LayerImpl> root = LayerImpl::Create(tree_impl, 1);
+    std::unique_ptr<LayerImpl> root_clip = LayerImpl::Create(tree_impl, 2);
+    std::unique_ptr<LayerImpl> page_scale = LayerImpl::Create(tree_impl, 3);
 
-    scoped_ptr<LayerImpl> outer_scroll = LayerImpl::Create(tree_impl, 4);
-    scoped_ptr<LayerImpl> outer_clip = LayerImpl::Create(tree_impl, 5);
+    std::unique_ptr<LayerImpl> outer_scroll = LayerImpl::Create(tree_impl, 4);
+    std::unique_ptr<LayerImpl> outer_clip = LayerImpl::Create(tree_impl, 5);
 
     root_clip->SetBounds(inner_viewport_size);
     root->SetScrollClipLayer(root_clip->id());
@@ -4131,9 +4127,9 @@
       host_impl_->active_tree()->OuterViewportScrollLayer();
   int id = outer_viewport_scroll_layer->id();
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       LayerImpl::Create(host_impl_->active_tree(), id + 2);
-  scoped_ptr<LayerImpl> child_clip =
+  std::unique_ptr<LayerImpl> child_clip =
       LayerImpl::Create(host_impl_->active_tree(), id + 3);
 
   child_clip->SetBounds(sub_content_layer_size);
@@ -4609,17 +4605,17 @@
   gfx::Size surface_size(10, 10);
   gfx::Size contents_size(20, 20);
 
-  scoped_ptr<LayerImpl> content_layer =
+  std::unique_ptr<LayerImpl> content_layer =
       LayerImpl::Create(host_impl_->active_tree(), 1);
   content_layer->SetDrawsContent(true);
   content_layer->SetPosition(gfx::PointF());
   content_layer->SetBounds(contents_size);
 
-  scoped_ptr<LayerImpl> scroll_clip_layer =
+  std::unique_ptr<LayerImpl> scroll_clip_layer =
       LayerImpl::Create(host_impl_->active_tree(), 3);
   scroll_clip_layer->SetBounds(surface_size);
 
-  scoped_ptr<LayerImpl> scroll_layer =
+  std::unique_ptr<LayerImpl> scroll_layer =
       LayerImpl::Create(host_impl_->active_tree(), 2);
   scroll_layer->SetScrollClipLayer(3);
   scroll_layer->SetBounds(contents_size);
@@ -4646,7 +4642,8 @@
 TEST_F(LayerTreeHostImplTest, ScrollChildCallsCommitAndRedraw) {
   gfx::Size surface_size(10, 10);
   gfx::Size contents_size(20, 20);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetBounds(surface_size);
   root->AddChild(CreateScrollableLayer(2, contents_size, root.get()));
   root->SetForceRenderSurface(true);
@@ -4667,7 +4664,8 @@
 
 TEST_F(LayerTreeHostImplTest, ScrollMissesChild) {
   gfx::Size surface_size(10, 10);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_->active_tree(), 1);
   root->AddChild(CreateScrollableLayer(2, surface_size, root.get()));
   root->SetForceRenderSurface(true);
   host_impl_->active_tree()->SetRootLayer(std::move(root));
@@ -4689,9 +4687,10 @@
 
 TEST_F(LayerTreeHostImplTest, ScrollMissesBackfacingChild) {
   gfx::Size surface_size(10, 10);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(2, surface_size, root.get());
   host_impl_->SetViewportSize(surface_size);
 
@@ -4719,9 +4718,9 @@
 
 TEST_F(LayerTreeHostImplTest, ScrollBlockedByContentLayer) {
   gfx::Size surface_size(10, 10);
-  scoped_ptr<LayerImpl> clip_layer =
+  std::unique_ptr<LayerImpl> clip_layer =
       LayerImpl::Create(host_impl_->active_tree(), 3);
-  scoped_ptr<LayerImpl> content_layer =
+  std::unique_ptr<LayerImpl> content_layer =
       CreateScrollableLayer(1, surface_size, clip_layer.get());
   content_layer->set_main_thread_scrolling_reasons(
       MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
@@ -4729,7 +4728,7 @@
 
   // Note: we can use the same clip layer for both since both calls to
   // CreateScrollableLayer() use the same surface size.
-  scoped_ptr<LayerImpl> scroll_layer =
+  std::unique_ptr<LayerImpl> scroll_layer =
       CreateScrollableLayer(2, surface_size, clip_layer.get());
   scroll_layer->AddChild(std::move(content_layer));
   clip_layer->AddChild(std::move(scroll_layer));
@@ -4782,7 +4781,8 @@
   // Set new page scale from main thread.
   host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 2.f);
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), inner_scroll->id(),
                                  expected_scroll_delta));
 
@@ -4834,7 +4834,8 @@
   DrawOneFrame();
 
   // The scroll delta is not scaled because the main thread did not scale.
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), inner_scroll->id(),
                                  expected_scroll_delta));
 
@@ -4863,9 +4864,9 @@
   LayerImpl* child = scroll->children()[0];
   child->SetDrawsContent(true);
 
-  scoped_ptr<LayerImpl> scrollable_child_clip =
+  std::unique_ptr<LayerImpl> scrollable_child_clip =
       LayerImpl::Create(host_impl_->active_tree(), 6);
-  scoped_ptr<LayerImpl> scrollable_child =
+  std::unique_ptr<LayerImpl> scrollable_child =
       CreateScrollableLayer(7, surface_size, scrollable_child_clip.get());
   scrollable_child_clip->AddChild(std::move(scrollable_child));
   child->AddChild(std::move(scrollable_child_clip));
@@ -4929,7 +4930,8 @@
 
   DrawOneFrame();
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), inner_scroll->id(),
                                  expected_scroll_delta));
 
@@ -4946,13 +4948,14 @@
   // parent layer isn't scrolled.
   gfx::Size surface_size(10, 10);
   gfx::Size content_size(20, 20);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetBounds(surface_size);
   root->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       CreateScrollableLayer(3, content_size, root.get());
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(2, content_size, root.get());
   LayerImpl* grand_child_layer = grand_child.get();
   child->AddChild(std::move(grand_child));
@@ -4982,7 +4985,7 @@
     host_impl_->ScrollBy(UpdateState(gfx::Point(), scroll_delta).get());
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
 
     // The grand child should have scrolled up to its limit.
@@ -5001,19 +5004,19 @@
   // the scroll doesn't bubble up to the parent layer.
   gfx::Size surface_size(20, 20);
   gfx::Size viewport_size(10, 10);
-  scoped_ptr<LayerImpl> root_ptr =
+  std::unique_ptr<LayerImpl> root_ptr =
       LayerImpl::Create(host_impl_->active_tree(), 1);
-  scoped_ptr<LayerImpl> root_clip =
+  std::unique_ptr<LayerImpl> root_clip =
       LayerImpl::Create(host_impl_->active_tree(), 2);
   root_clip->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> root_scrolling =
+  std::unique_ptr<LayerImpl> root_scrolling =
       CreateScrollableLayer(3, surface_size, root_clip.get());
   root_scrolling->SetIsContainerForFixedPositionLayers(true);
 
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       CreateScrollableLayer(5, surface_size, root_clip.get());
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(4, surface_size, root_clip.get());
   LayerImpl* grand_child_layer = grand_child.get();
   child->AddChild(std::move(grand_child));
@@ -5049,7 +5052,7 @@
     host_impl_->ScrollBy(UpdateState(gfx::Point(), scroll_delta).get());
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
 
     // The grand child should have scrolled up to its limit.
@@ -5133,16 +5136,16 @@
   // should be applied to one of its ancestors if possible.
   gfx::Size surface_size(10, 10);
   gfx::Size content_size(20, 20);
-  scoped_ptr<LayerImpl> root_ptr =
+  std::unique_ptr<LayerImpl> root_ptr =
       LayerImpl::Create(host_impl_->active_tree(), 4);
-  scoped_ptr<LayerImpl> root_clip =
+  std::unique_ptr<LayerImpl> root_clip =
       LayerImpl::Create(host_impl_->active_tree(), 3);
   root_clip->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> root_scroll =
+  std::unique_ptr<LayerImpl> root_scroll =
       CreateScrollableLayer(1, content_size, root_clip.get());
   // Make 'root' the clip layer for child: since they have the same sizes the
   // child will have zero max_scroll_offset and scrolls will bubble.
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(2, content_size, root_scroll.get());
   child->SetIsContainerForFixedPositionLayers(true);
   root_scroll->SetBounds(content_size);
@@ -5168,7 +5171,7 @@
     host_impl_->ScrollBy(UpdateState(gfx::Point(), scroll_delta).get());
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
 
     // Only the root scroll should have scrolled.
@@ -5180,11 +5183,11 @@
 
 TEST_F(LayerTreeHostImplTest, ScrollBeforeRedraw) {
   gfx::Size surface_size(10, 10);
-  scoped_ptr<LayerImpl> root_ptr =
+  std::unique_ptr<LayerImpl> root_ptr =
       LayerImpl::Create(host_impl_->active_tree(), 1);
-  scoped_ptr<LayerImpl> root_clip =
+  std::unique_ptr<LayerImpl> root_clip =
       LayerImpl::Create(host_impl_->active_tree(), 2);
-  scoped_ptr<LayerImpl> root_scroll =
+  std::unique_ptr<LayerImpl> root_scroll =
       CreateScrollableLayer(3, surface_size, root_clip.get());
   root_scroll->SetIsContainerForFixedPositionLayers(true);
   root_clip->SetForceRenderSurface(true);
@@ -5201,11 +5204,11 @@
   SetNeedsRebuildPropertyTrees();
   DrawFrame();
   host_impl_->active_tree()->ClearLayers();
-  scoped_ptr<LayerImpl> root_ptr2 =
+  std::unique_ptr<LayerImpl> root_ptr2 =
       LayerImpl::Create(host_impl_->active_tree(), 4);
-  scoped_ptr<LayerImpl> root_clip2 =
+  std::unique_ptr<LayerImpl> root_clip2 =
       LayerImpl::Create(host_impl_->active_tree(), 5);
-  scoped_ptr<LayerImpl> root_scroll2 =
+  std::unique_ptr<LayerImpl> root_scroll2 =
       CreateScrollableLayer(6, surface_size, root_clip2.get());
   root_scroll2->SetIsContainerForFixedPositionLayers(true);
   root_clip2->AddChild(std::move(root_scroll2));
@@ -5250,7 +5253,8 @@
   host_impl_->ScrollEnd(EndState().get());
 
   // The layer should have scrolled down in its local coordinates.
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), scroll_layer->id(),
                                  gfx::Vector2d(0, gesture_scroll_delta.x())));
 
@@ -5277,9 +5281,9 @@
   float child_layer_angle = -20.f;
 
   // Create a child layer that is rotated to a non-axis-aligned angle.
-  scoped_ptr<LayerImpl> clip_layer =
+  std::unique_ptr<LayerImpl> clip_layer =
       LayerImpl::Create(host_impl_->active_tree(), child_clip_layer_id);
-  scoped_ptr<LayerImpl> child = CreateScrollableLayer(
+  std::unique_ptr<LayerImpl> child = CreateScrollableLayer(
       child_layer_id, scroll_layer->bounds(), clip_layer.get());
   gfx::Transform rotate_transform;
   rotate_transform.Translate(-50.0, -50.0);
@@ -5319,7 +5323,7 @@
     gfx::Vector2d expected_scroll_delta(
         0, gesture_scroll_delta.y() *
                std::cos(MathUtil::Deg2Rad(child_layer_angle)));
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), child_layer_id,
                                    expected_scroll_delta));
@@ -5344,7 +5348,7 @@
     gfx::Vector2d expected_scroll_delta(
         0, -gesture_scroll_delta.x() *
                std::sin(MathUtil::Deg2Rad(child_layer_angle)));
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
     EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), child_layer_id,
                                    expected_scroll_delta));
@@ -5362,9 +5366,9 @@
   int child_layer_id = 7;
 
   // Create a child layer that is rotated on its x axis, with perspective.
-  scoped_ptr<LayerImpl> clip_layer =
+  std::unique_ptr<LayerImpl> clip_layer =
       LayerImpl::Create(host_impl_->active_tree(), child_clip_layer_id);
-  scoped_ptr<LayerImpl> child = CreateScrollableLayer(
+  std::unique_ptr<LayerImpl> child = CreateScrollableLayer(
       child_layer_id, scroll_layer->bounds(), clip_layer.get());
   LayerImpl* child_ptr = child.get();
   gfx::Transform perspective_transform;
@@ -5387,7 +5391,7 @@
   gfx::Size surface_size(50, 50);
   host_impl_->SetViewportSize(surface_size);
 
-  scoped_ptr<ScrollAndScaleSet> scroll_info;
+  std::unique_ptr<ScrollAndScaleSet> scroll_info;
 
   gfx::Vector2d gesture_scroll_deltas[4];
   gesture_scroll_deltas[0] = gfx::Vector2d(4, 10);
@@ -5461,7 +5465,8 @@
 
   // The layer should have scrolled down in its local coordinates, but half the
   // amount.
-  scoped_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas();
+  std::unique_ptr<ScrollAndScaleSet> scroll_info =
+      host_impl_->ProcessScrollDeltas();
   EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), scroll_layer->id(),
                                  gfx::Vector2d(0, scroll_delta.y() / scale)));
 
@@ -5832,17 +5837,17 @@
   // overscroll does not accumulate.
   InputHandlerScrollResult scroll_result;
   gfx::Size surface_size(10, 10);
-  scoped_ptr<LayerImpl> root_clip =
+  std::unique_ptr<LayerImpl> root_clip =
       LayerImpl::Create(host_impl_->active_tree(), 4);
   root_clip->SetForceRenderSurface(true);
 
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       CreateScrollableLayer(1, surface_size, root_clip.get());
 
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       CreateScrollableLayer(3, surface_size, root_clip.get());
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(2, surface_size, root_clip.get());
   LayerImpl* grand_child_layer = grand_child.get();
   child->AddChild(std::move(grand_child));
@@ -6036,10 +6041,11 @@
 
 class BlendStateCheckLayer : public LayerImpl {
  public:
-  static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl,
-                                      int id,
-                                      ResourceProvider* resource_provider) {
-    return make_scoped_ptr(
+  static std::unique_ptr<LayerImpl> Create(
+      LayerTreeImpl* tree_impl,
+      int id,
+      ResourceProvider* resource_provider) {
+    return base::WrapUnique(
         new BlendStateCheckLayer(tree_impl, id, resource_provider));
   }
 
@@ -6118,7 +6124,7 @@
 
 TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) {
   {
-    scoped_ptr<LayerImpl> root =
+    std::unique_ptr<LayerImpl> root =
         LayerImpl::Create(host_impl_->active_tree(), 1);
     root->SetBounds(gfx::Size(10, 10));
     root->SetDrawsContent(false);
@@ -6376,10 +6382,10 @@
       child_(NULL),
       did_activate_pending_tree_(false) {}
 
-  scoped_ptr<OutputSurface> CreateFakeOutputSurface(bool software) {
+  std::unique_ptr<OutputSurface> CreateFakeOutputSurface(bool software) {
     if (software) {
       return FakeOutputSurface::CreateSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice()));
+          base::WrapUnique(new SoftwareOutputDevice()));
     }
     return FakeOutputSurface::Create3d();
   }
@@ -6670,8 +6676,8 @@
 
 class FakeDrawableLayerImpl: public LayerImpl {
  public:
-  static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new FakeDrawableLayerImpl(tree_impl, id));
+  static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
+    return base::WrapUnique(new FakeDrawableLayerImpl(tree_impl, id));
   }
  protected:
   FakeDrawableLayerImpl(LayerTreeImpl* tree_impl, int id)
@@ -6683,11 +6689,11 @@
 // viewport size is never set.
 TEST_F(LayerTreeHostImplTest, ReshapeNotCalledUntilDraw) {
   scoped_refptr<TestContextProvider> provider(TestContextProvider::Create());
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(provider));
   CreateHostImpl(DefaultSettings(), std::move(output_surface));
 
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetBounds(gfx::Size(10, 10));
   root->SetDrawsContent(true);
@@ -6737,7 +6743,7 @@
   context_provider->BindToCurrentThread();
   context_provider->TestContext3d()->set_have_post_sub_buffer(true);
 
-  scoped_ptr<FakeOutputSurface> output_surface(
+  std::unique_ptr<FakeOutputSurface> output_surface(
       FakeOutputSurface::Create3d(context_provider));
   FakeOutputSurface* fake_output_surface = output_surface.get();
 
@@ -6745,7 +6751,7 @@
   // that we can force partial swap enabled.
   LayerTreeSettings settings = DefaultSettings();
   settings.renderer_settings.partial_swap_enabled = true;
-  scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl =
+  std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl =
       LayerTreeHostImpl::Create(
           settings, this, &task_runner_provider_, &stats_instrumentation_,
           &shared_bitmap_manager_, NULL, &task_graph_runner_, 0);
@@ -6755,10 +6761,10 @@
       CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE));
   layer_tree_host_impl->SetViewportSize(gfx::Size(500, 500));
 
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       FakeDrawableLayerImpl::Create(layer_tree_host_impl->active_tree(), 1);
   root->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       FakeDrawableLayerImpl::Create(layer_tree_host_impl->active_tree(), 2);
   child->SetPosition(gfx::PointF(12.f, 13.f));
   child->SetBounds(gfx::Size(14, 15));
@@ -6819,9 +6825,9 @@
 }
 
 TEST_F(LayerTreeHostImplTest, RootLayerDoesntCreateExtraSurface) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 1);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 2);
   child->SetBounds(gfx::Size(10, 10));
   child->SetDrawsContent(true);
@@ -6842,8 +6848,8 @@
 
 class FakeLayerWithQuads : public LayerImpl {
  public:
-  static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new FakeLayerWithQuads(tree_impl, id));
+  static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
+    return base::WrapUnique(new FakeLayerWithQuads(tree_impl, id));
   }
 
   void AppendQuads(RenderPass* render_pass,
@@ -6954,7 +6960,7 @@
 };
 
 TEST_F(LayerTreeHostImplTest, NoPartialSwap) {
-  scoped_ptr<MockContext> mock_context_owned(new MockContext);
+  std::unique_ptr<MockContext> mock_context_owned(new MockContext);
   MockContext* mock_context = mock_context_owned.get();
   MockContextHarness harness(mock_context);
 
@@ -6994,7 +7000,7 @@
 }
 
 TEST_F(LayerTreeHostImplTest, PartialSwap) {
-  scoped_ptr<MockContext> context_owned(new MockContext);
+  std::unique_ptr<MockContext> context_owned(new MockContext);
   MockContext* mock_context = context_owned.get();
   MockContextHarness harness(mock_context);
 
@@ -7031,7 +7037,7 @@
   Mock::VerifyAndClearExpectations(&mock_context);
 }
 
-static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity(
+static std::unique_ptr<LayerTreeHostImpl> SetupLayersForOpacity(
     LayerTreeSettings settings,
     bool partial_swap,
     LayerTreeHostImplClient* client,
@@ -7041,7 +7047,7 @@
     RenderingStatsInstrumentation* stats_instrumentation,
     OutputSurface* output_surface) {
   settings.renderer_settings.partial_swap_enabled = partial_swap;
-  scoped_ptr<LayerTreeHostImpl> my_host_impl = LayerTreeHostImpl::Create(
+  std::unique_ptr<LayerTreeHostImpl> my_host_impl = LayerTreeHostImpl::Create(
       settings, client, task_runner_provider, stats_instrumentation, manager,
       nullptr, task_graph_runner, 0);
   my_host_impl->SetVisible(true);
@@ -7068,11 +7074,11 @@
 
     Layers 1, 2 have render surfaces
   */
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(my_host_impl->active_tree(), 1);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       LayerImpl::Create(my_host_impl->active_tree(), 2);
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       FakeLayerWithQuads::Create(my_host_impl->active_tree(), 3);
 
   gfx::Rect root_rect(0, 0, 100, 100);
@@ -7111,9 +7117,9 @@
   scoped_refptr<TestContextProvider> provider(TestContextProvider::Create());
   provider->BindToCurrentThread();
   provider->TestContext3d()->set_have_post_sub_buffer(true);
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(provider));
-  scoped_ptr<LayerTreeHostImpl> my_host_impl = SetupLayersForOpacity(
+  std::unique_ptr<LayerTreeHostImpl> my_host_impl = SetupLayersForOpacity(
       DefaultSettings(), true, this, &task_runner_provider_,
       &shared_bitmap_manager, &task_graph_runner, &stats_instrumentation_,
       output_surface.get());
@@ -7141,9 +7147,9 @@
   scoped_refptr<TestContextProvider> provider(TestContextProvider::Create());
   provider->BindToCurrentThread();
   provider->TestContext3d()->set_have_post_sub_buffer(true);
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(provider));
-  scoped_ptr<LayerTreeHostImpl> my_host_impl = SetupLayersForOpacity(
+  std::unique_ptr<LayerTreeHostImpl> my_host_impl = SetupLayersForOpacity(
       DefaultSettings(), false, this, &task_runner_provider_,
       &shared_bitmap_manager, &task_graph_runner, &stats_instrumentation_,
       output_surface.get());
@@ -7166,14 +7172,14 @@
 }
 
 TEST_F(LayerTreeHostImplTest, LayersFreeTextures) {
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   TestWebGraphicsContext3D* context3d = context.get();
-  scoped_ptr<OutputSurface> output_surface(
+  std::unique_ptr<OutputSurface> output_surface(
       FakeOutputSurface::Create3d(std::move(context)));
   CreateHostImpl(DefaultSettings(), std::move(output_surface));
 
-  scoped_ptr<LayerImpl> root_layer =
+  std::unique_ptr<LayerImpl> root_layer =
       LayerImpl::Create(host_impl_->active_tree(), 1);
   root_layer->SetBounds(gfx::Size(10, 10));
   root_layer->SetForceRenderSurface(true);
@@ -7183,13 +7189,13 @@
           gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
   FakeVideoFrameProvider provider;
   provider.set_frame(softwareFrame);
-  scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create(
+  std::unique_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create(
       host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0);
   video_layer->SetBounds(gfx::Size(10, 10));
   video_layer->SetDrawsContent(true);
   root_layer->AddChild(std::move(video_layer));
 
-  scoped_ptr<IOSurfaceLayerImpl> io_surface_layer =
+  std::unique_ptr<IOSurfaceLayerImpl> io_surface_layer =
       IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5);
   io_surface_layer->SetBounds(gfx::Size(10, 10));
   io_surface_layer->SetDrawsContent(true);
@@ -7225,7 +7231,7 @@
 };
 
 TEST_F(LayerTreeHostImplTest, HasTransparentBackground) {
-  scoped_ptr<MockDrawQuadsToFillScreenContext> mock_context_owned(
+  std::unique_ptr<MockDrawQuadsToFillScreenContext> mock_context_owned(
       new MockDrawQuadsToFillScreenContext);
   MockDrawQuadsToFillScreenContext* mock_context = mock_context_owned.get();
 
@@ -7261,7 +7267,7 @@
 class LayerTreeHostImplTestWithDelegatingRenderer
     : public LayerTreeHostImplTest {
  protected:
-  scoped_ptr<OutputSurface> CreateOutputSurface() override {
+  std::unique_ptr<OutputSurface> CreateOutputSurface() override {
     return FakeOutputSurface::CreateDelegating3d();
   }
 
@@ -7303,7 +7309,7 @@
 };
 
 TEST_F(LayerTreeHostImplTestWithDelegatingRenderer, FrameIncludesDamageRect) {
-  scoped_ptr<SolidColorLayerImpl> root =
+  std::unique_ptr<SolidColorLayerImpl> root =
       SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetPosition(gfx::PointF());
   root->SetBounds(gfx::Size(10, 10));
@@ -7311,7 +7317,7 @@
   root->SetForceRenderSurface(true);
 
   // Child layer is in the bottom right corner.
-  scoped_ptr<SolidColorLayerImpl> child =
+  std::unique_ptr<SolidColorLayerImpl> child =
       SolidColorLayerImpl::Create(host_impl_->active_tree(), 2);
   child->SetPosition(gfx::PointF(9.f, 9.f));
   child->SetBounds(gfx::Size(1, 1));
@@ -7362,14 +7368,14 @@
   host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f / 16.f,
                                                           16.f);
 
-  scoped_ptr<LayerImpl> scoped_root =
+  std::unique_ptr<LayerImpl> scoped_root =
       LayerImpl::Create(host_impl_->pending_tree(), 1);
   LayerImpl* root = scoped_root.get();
   root->SetForceRenderSurface(true);
 
   host_impl_->pending_tree()->SetRootLayer(std::move(scoped_root));
 
-  scoped_ptr<LayerImpl> scoped_scrolling_layer =
+  std::unique_ptr<LayerImpl> scoped_scrolling_layer =
       LayerImpl::Create(host_impl_->pending_tree(), 2);
   LayerImpl* scrolling_layer = scoped_scrolling_layer.get();
   root->AddChild(std::move(scoped_scrolling_layer));
@@ -7378,7 +7384,7 @@
   scoped_refptr<FakeRasterSource> raster_source(
       FakeRasterSource::CreateFilled(content_layer_bounds));
 
-  scoped_ptr<FakePictureLayerImpl> scoped_content_layer =
+  std::unique_ptr<FakePictureLayerImpl> scoped_content_layer =
       FakePictureLayerImpl::CreateWithRasterSource(host_impl_->pending_tree(),
                                                    3, raster_source);
   LayerImpl* content_layer = scoped_content_layer.get();
@@ -7473,7 +7479,7 @@
   CountingSoftwareDevice* software_device = new CountingSoftwareDevice();
   EXPECT_TRUE(CreateHostImpl(
       DefaultSettings(),
-      FakeOutputSurface::CreateSoftware(make_scoped_ptr(software_device))));
+      FakeOutputSurface::CreateSoftware(base::WrapUnique(software_device))));
   host_impl_->SetViewportSize(gfx::Size(50, 50));
 
   SetupScrollAndContentsLayers(gfx::Size(100, 100));
@@ -7495,7 +7501,7 @@
   EXPECT_EQ(1, software_device->frames_ended_);
 
   // Call another API method that is likely to hit nullptr in this mode.
-  scoped_ptr<base::trace_event::TracedValue> state(
+  std::unique_ptr<base::trace_event::TracedValue> state(
       new base::trace_event::TracedValue());
   host_impl_->ActivationStateAsValueInto(state.get());
 }
@@ -7503,9 +7509,9 @@
 TEST_F(LayerTreeHostImplTest,
        ForcedDrawToSoftwareDeviceSkipsUnsupportedLayers) {
   set_reduce_memory_result(false);
-  EXPECT_TRUE(CreateHostImpl(DefaultSettings(),
-                             FakeOutputSurface::CreateSoftware(
-                                 make_scoped_ptr(new CountingSoftwareDevice))));
+  EXPECT_TRUE(CreateHostImpl(
+      DefaultSettings(), FakeOutputSurface::CreateSoftware(
+                             base::WrapUnique(new CountingSoftwareDevice))));
 
   const gfx::Transform external_transform;
   const gfx::Rect external_viewport;
@@ -7515,12 +7521,12 @@
                                                  external_transform);
 
   // SolidColorLayerImpl will be drawn.
-  scoped_ptr<SolidColorLayerImpl> root_layer =
+  std::unique_ptr<SolidColorLayerImpl> root_layer =
       SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
 
   // VideoLayerImpl will not be drawn.
   FakeVideoFrameProvider provider;
-  scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create(
+  std::unique_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create(
       host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0);
   video_layer->SetBounds(gfx::Size(10, 10));
   video_layer->SetDrawsContent(true);
@@ -7626,10 +7632,11 @@
 }
 
 TEST_F(LayerTreeHostImplTest, UIResourceManagement) {
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   TestWebGraphicsContext3D* context3d = context.get();
-  scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<FakeOutputSurface> output_surface =
+      FakeOutputSurface::Create3d();
   CreateHostImpl(DefaultSettings(), std::move(output_surface));
 
   EXPECT_EQ(0u, context3d->NumTextures());
@@ -7669,7 +7676,7 @@
 }
 
 TEST_F(LayerTreeHostImplTest, CreateETC1UIResource) {
-  scoped_ptr<TestWebGraphicsContext3D> context =
+  std::unique_ptr<TestWebGraphicsContext3D> context =
       TestWebGraphicsContext3D::Create();
   TestWebGraphicsContext3D* context3d = context.get();
   CreateHostImpl(DefaultSettings(), FakeOutputSurface::Create3d());
@@ -7693,8 +7700,8 @@
   EXPECT_NE(0u, id1);
 }
 
-void ShutdownReleasesContext_Callback(scoped_ptr<CopyOutputResult> result) {
-}
+void ShutdownReleasesContext_Callback(
+    std::unique_ptr<CopyOutputResult> result) {}
 
 TEST_F(LayerTreeHostImplTest, ShutdownReleasesContext) {
   scoped_refptr<TestContextProvider> context_provider =
@@ -7705,7 +7712,7 @@
 
   SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1));
 
-  std::vector<scoped_ptr<CopyOutputRequest>> requests;
+  std::vector<std::unique_ptr<CopyOutputRequest>> requests;
   requests.push_back(CopyOutputRequest::CreateRequest(
       base::Bind(&ShutdownReleasesContext_Callback)));
 
@@ -7735,16 +7742,16 @@
   // bubble).
   gfx::Size surface_size(10, 10);
   gfx::Size content_size(20, 20);
-  scoped_ptr<LayerImpl> root_ptr =
+  std::unique_ptr<LayerImpl> root_ptr =
       LayerImpl::Create(host_impl_->active_tree(), 4);
-  scoped_ptr<LayerImpl> root_clip =
+  std::unique_ptr<LayerImpl> root_clip =
       LayerImpl::Create(host_impl_->active_tree(), 3);
   root_clip->SetForceRenderSurface(true);
 
-  scoped_ptr<LayerImpl> root_scroll =
+  std::unique_ptr<LayerImpl> root_scroll =
       CreateScrollableLayer(1, content_size, root_clip.get());
   root_scroll->SetIsContainerForFixedPositionLayers(true);
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(2, content_size, root_clip.get());
 
   root_scroll->AddChild(std::move(child));
@@ -7775,7 +7782,7 @@
 
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
 
     // Only the child should have scrolled.
@@ -7788,19 +7795,20 @@
   // Scroll a child layer beyond its maximum scroll range and make sure the
   // the scroll doesn't bubble up to the parent layer.
   gfx::Size surface_size(10, 10);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> root_scrolling =
+  std::unique_ptr<LayerImpl> root_scrolling =
       CreateScrollableLayer(2, surface_size, root.get());
 
-  scoped_ptr<LayerImpl> grand_child =
+  std::unique_ptr<LayerImpl> grand_child =
       CreateScrollableLayer(4, surface_size, root.get());
   grand_child->layer_tree_impl()
       ->property_trees()
       ->scroll_tree.UpdateScrollOffsetBaseForTesting(grand_child->id(),
                                                      gfx::ScrollOffset(0, 2));
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(3, surface_size, root.get());
   child->layer_tree_impl()
       ->property_trees()
@@ -7816,7 +7824,7 @@
   SetNeedsRebuildPropertyTrees();
   DrawFrame();
   {
-    scoped_ptr<ScrollAndScaleSet> scroll_info;
+    std::unique_ptr<ScrollAndScaleSet> scroll_info;
     LayerImpl* child =
         host_impl_->active_tree()->root_layer()->children()[0]->children()[0];
     LayerImpl* grand_child = child->children()[0];
@@ -7876,13 +7884,13 @@
   // When flinging via wheel, we shouldn't bubble.
   gfx::Size surface_size(10, 10);
   gfx::Size content_size(20, 20);
-  scoped_ptr<LayerImpl> root_clip =
+  std::unique_ptr<LayerImpl> root_clip =
       LayerImpl::Create(host_impl_->active_tree(), 3);
   root_clip->SetForceRenderSurface(true);
-  scoped_ptr<LayerImpl> root_scroll =
+  std::unique_ptr<LayerImpl> root_scroll =
       CreateScrollableLayer(1, content_size, root_clip.get());
   int root_scroll_id = root_scroll->id();
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(2, content_size, root_clip.get());
 
   root_scroll->AddChild(std::move(child));
@@ -7908,7 +7916,7 @@
 
     host_impl_->ScrollEnd(EndState().get());
 
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         host_impl_->ProcessScrollDeltas();
 
     // The root shouldn't have scrolled.
@@ -7933,7 +7941,7 @@
       host_impl_->active_tree()->LayerById(page_scale_layer_id);
 
   int occluder_layer_id = 6;
-  scoped_ptr<LayerImpl> occluder_layer =
+  std::unique_ptr<LayerImpl> occluder_layer =
       LayerImpl::Create(host_impl_->active_tree(), occluder_layer_id);
   occluder_layer->SetDrawsContent(true);
   occluder_layer->SetBounds(content_size);
@@ -7965,18 +7973,18 @@
   scroll_layer->SetDrawsContent(true);
 
   int occluder_layer_id = 6;
-  scoped_ptr<LayerImpl> occluder_layer =
+  std::unique_ptr<LayerImpl> occluder_layer =
       LayerImpl::Create(host_impl_->active_tree(), occluder_layer_id);
   occluder_layer->SetDrawsContent(true);
   occluder_layer->SetBounds(content_size);
   occluder_layer->SetPosition(gfx::PointF(-10.f, -10.f));
 
   int child_scroll_clip_layer_id = 7;
-  scoped_ptr<LayerImpl> child_scroll_clip =
+  std::unique_ptr<LayerImpl> child_scroll_clip =
       LayerImpl::Create(host_impl_->active_tree(), child_scroll_clip_layer_id);
 
   int child_scroll_layer_id = 8;
-  scoped_ptr<LayerImpl> child_scroll = CreateScrollableLayer(
+  std::unique_ptr<LayerImpl> child_scroll = CreateScrollableLayer(
       child_scroll_layer_id, content_size, child_scroll_clip.get());
 
   child_scroll->SetPosition(gfx::PointF(10.f, 10.f));
@@ -8006,7 +8014,7 @@
       host_impl_->active_tree()->LayerById(scroll_layer_id);
 
   int child_scroll_layer_id = 7;
-  scoped_ptr<LayerImpl> child_scroll =
+  std::unique_ptr<LayerImpl> child_scroll =
       CreateScrollableLayer(child_scroll_layer_id, content_size, root);
   child_scroll->SetDrawsContent(false);
 
@@ -8036,15 +8044,15 @@
   LayerImpl* root = host_impl_->active_tree()->LayerById(1);
   LayerImpl* root_scroll_layer = host_impl_->active_tree()->LayerById(2);
 
-  scoped_ptr<LayerImpl> invisible_scroll_layer =
+  std::unique_ptr<LayerImpl> invisible_scroll_layer =
       CreateScrollableLayer(7, content_size, root);
   invisible_scroll_layer->SetDrawsContent(false);
 
-  scoped_ptr<LayerImpl> child_layer =
+  std::unique_ptr<LayerImpl> child_layer =
       LayerImpl::Create(host_impl_->active_tree(), 8);
   child_layer->SetDrawsContent(false);
 
-  scoped_ptr<LayerImpl> grand_child_layer =
+  std::unique_ptr<LayerImpl> grand_child_layer =
       LayerImpl::Create(host_impl_->active_tree(), 9);
   grand_child_layer->SetDrawsContent(true);
   grand_child_layer->SetBounds(content_size);
@@ -8083,7 +8091,7 @@
       host_impl_->active_tree()->LayerById(scroll_layer_id);
 
   int scroll_child_id = 6;
-  scoped_ptr<LayerImpl> scroll_child =
+  std::unique_ptr<LayerImpl> scroll_child =
       LayerImpl::Create(host_impl_->active_tree(), scroll_child_id);
   scroll_child->SetDrawsContent(true);
   scroll_child->SetBounds(content_size);
@@ -8091,15 +8099,16 @@
   scroll_child->SetPosition(gfx::PointF(10.f, 10.f));
 
   int invisible_scroll_layer_id = 7;
-  scoped_ptr<LayerImpl> invisible_scroll =
+  std::unique_ptr<LayerImpl> invisible_scroll =
       CreateScrollableLayer(invisible_scroll_layer_id, content_size, root);
   invisible_scroll->SetDrawsContent(false);
 
   int container_id = 8;
-  scoped_ptr<LayerImpl> container =
+  std::unique_ptr<LayerImpl> container =
       LayerImpl::Create(host_impl_->active_tree(), container_id);
 
-  scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+  std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+      new std::set<LayerImpl*>);
   scroll_children->insert(scroll_child.get());
   invisible_scroll->SetScrollChildren(scroll_children.release());
 
@@ -8127,7 +8136,7 @@
 // Make sure LatencyInfo carried by LatencyInfoSwapPromise are passed
 // to CompositorFrameMetadata after SwapBuffers();
 TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) {
-  scoped_ptr<SolidColorLayerImpl> root =
+  std::unique_ptr<SolidColorLayerImpl> root =
       SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
   root->SetPosition(gfx::PointF());
   root->SetBounds(gfx::Size(10, 10));
@@ -8146,7 +8155,7 @@
   ui::LatencyInfo latency_info;
   latency_info.AddLatencyNumber(
       ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, 0);
-  scoped_ptr<SwapPromise> swap_promise(
+  std::unique_ptr<SwapPromise> swap_promise(
       new LatencyInfoSwapPromise(latency_info));
   host_impl_->active_tree()->QueuePinnedSwapPromise(std::move(swap_promise));
   host_impl_->SetNeedsRedraw();
@@ -8167,7 +8176,7 @@
 
 TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) {
   int root_layer_id = 1;
-  scoped_ptr<SolidColorLayerImpl> root =
+  std::unique_ptr<SolidColorLayerImpl> root =
       SolidColorLayerImpl::Create(host_impl_->active_tree(), root_layer_id);
   root->SetPosition(gfx::PointF());
   root->SetBounds(gfx::Size(10, 10));
@@ -8250,12 +8259,10 @@
   int forward_to_main_count = 0;
 
   {
-    scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-        new SimpleSwapPromiseMonitor(NULL,
-                                     host_impl_.get(),
-                                     &set_needs_commit_count,
-                                     &set_needs_redraw_count,
-                                     &forward_to_main_count));
+    std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+        new SimpleSwapPromiseMonitor(
+            NULL, host_impl_.get(), &set_needs_commit_count,
+            &set_needs_redraw_count, &forward_to_main_count));
     host_impl_->SetNeedsRedraw();
     EXPECT_EQ(0, set_needs_commit_count);
     EXPECT_EQ(1, set_needs_redraw_count);
@@ -8270,12 +8277,10 @@
   EXPECT_EQ(0, forward_to_main_count);
 
   {
-    scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-        new SimpleSwapPromiseMonitor(NULL,
-                                     host_impl_.get(),
-                                     &set_needs_commit_count,
-                                     &set_needs_redraw_count,
-                                     &forward_to_main_count));
+    std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+        new SimpleSwapPromiseMonitor(
+            NULL, host_impl_.get(), &set_needs_commit_count,
+            &set_needs_redraw_count, &forward_to_main_count));
     host_impl_->SetNeedsRedrawRect(gfx::Rect(10, 10));
     EXPECT_EQ(0, set_needs_commit_count);
     EXPECT_EQ(2, set_needs_redraw_count);
@@ -8283,12 +8288,10 @@
   }
 
   {
-    scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-        new SimpleSwapPromiseMonitor(NULL,
-                                     host_impl_.get(),
-                                     &set_needs_commit_count,
-                                     &set_needs_redraw_count,
-                                     &forward_to_main_count));
+    std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+        new SimpleSwapPromiseMonitor(
+            NULL, host_impl_.get(), &set_needs_commit_count,
+            &set_needs_redraw_count, &forward_to_main_count));
     // Empty damage rect won't signal the monitor.
     host_impl_->SetNeedsRedrawRect(gfx::Rect());
     EXPECT_EQ(0, set_needs_commit_count);
@@ -8300,12 +8303,10 @@
     set_needs_commit_count = 0;
     set_needs_redraw_count = 0;
     forward_to_main_count = 0;
-    scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-        new SimpleSwapPromiseMonitor(NULL,
-                                     host_impl_.get(),
-                                     &set_needs_commit_count,
-                                     &set_needs_redraw_count,
-                                     &forward_to_main_count));
+    std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+        new SimpleSwapPromiseMonitor(
+            NULL, host_impl_.get(), &set_needs_commit_count,
+            &set_needs_redraw_count, &forward_to_main_count));
     SetupScrollAndContentsLayers(gfx::Size(100, 100));
 
     // Scrolling normally should not trigger any forwarding.
@@ -8831,7 +8832,7 @@
     const int kInnerViewportClipLayerId = 4;
     const int kPageScaleLayerId = 5;
 
-    scoped_ptr<LayerImpl> inner_scroll =
+    std::unique_ptr<LayerImpl> inner_scroll =
         LayerImpl::Create(layer_tree_impl, kInnerViewportScrollLayerId);
     inner_scroll->SetIsContainerForFixedPositionLayers(true);
     inner_scroll->layer_tree_impl()
@@ -8839,23 +8840,23 @@
         ->scroll_tree.UpdateScrollOffsetBaseForTesting(inner_scroll->id(),
                                                        gfx::ScrollOffset());
 
-    scoped_ptr<LayerImpl> inner_clip =
+    std::unique_ptr<LayerImpl> inner_clip =
         LayerImpl::Create(layer_tree_impl, kInnerViewportClipLayerId);
     inner_clip->SetBounds(inner_viewport);
 
-    scoped_ptr<LayerImpl> page_scale =
+    std::unique_ptr<LayerImpl> page_scale =
         LayerImpl::Create(layer_tree_impl, kPageScaleLayerId);
 
     inner_scroll->SetScrollClipLayer(inner_clip->id());
     inner_scroll->SetBounds(outer_viewport);
     inner_scroll->SetPosition(gfx::PointF());
 
-    scoped_ptr<LayerImpl> outer_clip =
+    std::unique_ptr<LayerImpl> outer_clip =
         LayerImpl::Create(layer_tree_impl, kOuterViewportClipLayerId);
     outer_clip->SetBounds(outer_viewport);
     outer_clip->SetIsContainerForFixedPositionLayers(true);
 
-    scoped_ptr<LayerImpl> outer_scroll =
+    std::unique_ptr<LayerImpl> outer_scroll =
         LayerImpl::Create(layer_tree_impl, kOuterViewportScrollLayerId);
     outer_scroll->SetScrollClipLayer(outer_clip->id());
     outer_scroll->layer_tree_impl()
@@ -8865,8 +8866,7 @@
     outer_scroll->SetBounds(content_size);
     outer_scroll->SetPosition(gfx::PointF());
 
-    scoped_ptr<LayerImpl> contents =
-        LayerImpl::Create(layer_tree_impl, 8);
+    std::unique_ptr<LayerImpl> contents = LayerImpl::Create(layer_tree_impl, 8);
     contents->SetDrawsContent(true);
     contents->SetBounds(content_size);
     contents->SetPosition(gfx::PointF());
@@ -9056,7 +9056,7 @@
   LayerImpl* outer_scroll = host_impl_->OuterViewportScrollLayer();
   LayerImpl* inner_scroll = host_impl_->InnerViewportScrollLayer();
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(10, outer_viewport, outer_scroll);
   LayerImpl* child_scroll = child.get();
   outer_scroll->children()[0]->AddChild(std::move(child));
@@ -9064,7 +9064,7 @@
   SetNeedsRebuildPropertyTrees();
   DrawFrame();
   {
-    scoped_ptr<ScrollAndScaleSet> scroll_info;
+    std::unique_ptr<ScrollAndScaleSet> scroll_info;
 
     gfx::Vector2d scroll_delta(0, inner_viewport.height());
     EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD,
@@ -9124,7 +9124,7 @@
   LayerImpl* outer_scroll = host_impl_->OuterViewportScrollLayer();
   LayerImpl* inner_scroll = host_impl_->InnerViewportScrollLayer();
 
-  scoped_ptr<LayerImpl> child =
+  std::unique_ptr<LayerImpl> child =
       CreateScrollableLayer(10, outer_viewport, outer_scroll);
   LayerImpl* child_scroll = child.get();
   outer_scroll->children()[0]->AddChild(std::move(child));
@@ -9291,7 +9291,7 @@
 
 class ResourcelessSoftwareLayerTreeHostImplTest : public LayerTreeHostImplTest {
  protected:
-  scoped_ptr<OutputSurface> CreateOutputSurface() override {
+  std::unique_ptr<OutputSurface> CreateOutputSurface() override {
     return FakeOutputSurface::Create3dWithResourcelessSoftwareSupport();
   }
 };
@@ -9335,7 +9335,7 @@
   host_impl_->CreatePendingTree();
   scoped_refptr<FakeRasterSource> raster_source(
       FakeRasterSource::CreateFilled(viewport_size));
-  scoped_ptr<FakePictureLayerImpl> layer(
+  std::unique_ptr<FakePictureLayerImpl> layer(
       FakePictureLayerImpl::CreateWithRasterSource(host_impl_->pending_tree(),
                                                    11, raster_source));
   layer->SetBounds(viewport_size);
@@ -9646,7 +9646,7 @@
       UpdateState(gfx::Point(0, y), gfx::Vector2d(0, 50)).get());
   EXPECT_TRUE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(0, y + 50),
                                                       InputHandler::WHEEL));
-  scoped_ptr<ScrollState> scroll_state_end = EndState();
+  std::unique_ptr<ScrollState> scroll_state_end = EndState();
   host_impl_->ScrollEnd(scroll_state_end.get());
   EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(),
                                                        InputHandler::WHEEL));
@@ -10012,7 +10012,7 @@
   scoped_refptr<RasterSource> raster_source_with_tiles(
       FakeRasterSource::CreateFilled(gfx::Size(10, 10)));
 
-  scoped_ptr<FakePictureLayerImpl> layer =
+  std::unique_ptr<FakePictureLayerImpl> layer =
       FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11);
   layer->SetBounds(gfx::Size(10, 10));
   layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size());
@@ -10031,13 +10031,13 @@
       host_impl_->pending_tree()->root_layer());
 
   root_layer->set_has_valid_tile_priorities(true);
-  scoped_ptr<RasterTilePriorityQueue> non_empty_raster_priority_queue_all =
+  std::unique_ptr<RasterTilePriorityQueue> non_empty_raster_priority_queue_all =
       host_impl_->BuildRasterQueue(TreePriority::SAME_PRIORITY_FOR_BOTH_TREES,
                                    RasterTilePriorityQueue::Type::ALL);
   EXPECT_FALSE(non_empty_raster_priority_queue_all->IsEmpty());
 
   root_layer->set_has_valid_tile_priorities(false);
-  scoped_ptr<RasterTilePriorityQueue> empty_raster_priority_queue_all =
+  std::unique_ptr<RasterTilePriorityQueue> empty_raster_priority_queue_all =
       host_impl_->BuildRasterQueue(TreePriority::SAME_PRIORITY_FOR_BOTH_TREES,
                                    RasterTilePriorityQueue::Type::ALL);
   EXPECT_TRUE(empty_raster_priority_queue_all->IsEmpty());
@@ -10050,7 +10050,7 @@
 
   LayerTreeImpl* pending_tree = host_impl_->pending_tree();
 
-  scoped_ptr<FakePictureLayerImpl> pending_layer =
+  std::unique_ptr<FakePictureLayerImpl> pending_layer =
       FakePictureLayerImpl::Create(pending_tree, 10);
   FakePictureLayerImpl* raw_pending_layer = pending_layer.get();
   pending_tree->SetRootLayer(std::move(pending_layer));
@@ -10060,7 +10060,7 @@
   pending_tree->DidBecomeActive();
   EXPECT_EQ(1u, raw_pending_layer->did_become_active_call_count());
 
-  scoped_ptr<FakePictureLayerImpl> mask_layer =
+  std::unique_ptr<FakePictureLayerImpl> mask_layer =
       FakePictureLayerImpl::Create(pending_tree, 11);
   FakePictureLayerImpl* raw_mask_layer = mask_layer.get();
   raw_pending_layer->SetMaskLayer(std::move(mask_layer));
@@ -10072,9 +10072,9 @@
   EXPECT_EQ(2u, raw_pending_layer->did_become_active_call_count());
   EXPECT_EQ(1u, raw_mask_layer->did_become_active_call_count());
 
-  scoped_ptr<FakePictureLayerImpl> replica_layer =
+  std::unique_ptr<FakePictureLayerImpl> replica_layer =
       FakePictureLayerImpl::Create(pending_tree, 12);
-  scoped_ptr<FakePictureLayerImpl> replica_mask_layer =
+  std::unique_ptr<FakePictureLayerImpl> replica_mask_layer =
       FakePictureLayerImpl::Create(pending_tree, 13);
   FakePictureLayerImpl* raw_replica_mask_layer = replica_mask_layer.get();
   replica_layer->SetMaskLayer(std::move(replica_mask_layer));
@@ -10153,7 +10153,7 @@
 size_t CountRenderPassesWithId(const RenderPassList& list, RenderPassId id) {
   return std::count_if(
       list.begin(), list.end(),
-      [id](const scoped_ptr<RenderPass>& p) { return p->id == id; });
+      [id](const std::unique_ptr<RenderPass>& p) { return p->id == id; });
 }
 
 TEST_F(LayerTreeHostImplTest, RemoveUnreferencedRenderPass) {
@@ -10372,7 +10372,7 @@
   EXPECT_FALSE(host_impl_->use_gpu_rasterization());
   EXPECT_FALSE(host_impl_->use_msaa());
 
-  scoped_ptr<TestWebGraphicsContext3D> context_with_msaa =
+  std::unique_ptr<TestWebGraphicsContext3D> context_with_msaa =
       TestWebGraphicsContext3D::Create();
   context_with_msaa->SetMaxSamples(8);
 
@@ -10445,8 +10445,8 @@
 // A mock output surface which lets us detect calls to ForceReclaimResources.
 class MockReclaimResourcesOutputSurface : public FakeOutputSurface {
  public:
-  static scoped_ptr<MockReclaimResourcesOutputSurface> Create3d() {
-    return make_scoped_ptr(new MockReclaimResourcesOutputSurface(
+  static std::unique_ptr<MockReclaimResourcesOutputSurface> Create3d() {
+    return base::WrapUnique(new MockReclaimResourcesOutputSurface(
         TestContextProvider::Create(), TestContextProvider::CreateWorker(),
         false));
   }
@@ -10468,7 +10468,7 @@
 // ensures that BeginCommit triggers ForceReclaimResources. See
 // crbug.com/489515.
 TEST_F(LayerTreeHostImplTest, BeginCommitReclaimsResources) {
-  scoped_ptr<MockReclaimResourcesOutputSurface> output_surface(
+  std::unique_ptr<MockReclaimResourcesOutputSurface> output_surface(
       MockReclaimResourcesOutputSurface::Create3d());
   // Hold an unowned pointer to the output surface to use for mock expectations.
   MockReclaimResourcesOutputSurface* mock_output_surface = output_surface.get();
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index 278c7c51..9923f24 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -284,8 +284,8 @@
     name_stream << "name" << next_fence_sync_;
     gpu_mailbox.SetName(
         reinterpret_cast<const int8_t*>(name_stream.str().c_str()));
-    scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create(
-        base::Bind(&EmptyReleaseCallback));
+    std::unique_ptr<SingleReleaseCallback> callback =
+        SingleReleaseCallback::Create(base::Bind(&EmptyReleaseCallback));
 
     gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
                                    gpu::CommandBufferId::FromUnsafeValue(1),
diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc
index 3b6dc81..3466a63 100644
--- a/cc/trees/layer_tree_host_pixeltest_readback.cc
+++ b/cc/trees/layer_tree_host_pixeltest_readback.cc
@@ -60,8 +60,8 @@
     RunPixelTestWithReadbackTarget(type, content_root, target, file_name);
   }
 
-  scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest() override {
-    scoped_ptr<CopyOutputRequest> request;
+  std::unique_ptr<CopyOutputRequest> CreateCopyOutputRequest() override {
+    std::unique_ptr<CopyOutputRequest> request;
 
     if (readback_type_ == READBACK_BITMAP) {
       request = CopyOutputRequest::CreateBitmapRequest(
@@ -104,24 +104,24 @@
     }
   }
 
-  void ReadbackResultAsBitmap(scoped_ptr<CopyOutputResult> result) {
+  void ReadbackResultAsBitmap(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(task_runner_provider()->IsMainThread());
     EXPECT_TRUE(result->HasBitmap());
     result_bitmap_ = result->TakeBitmap();
     EndTest();
   }
 
-  void ReadbackResultAsTexture(scoped_ptr<CopyOutputResult> result) {
+  void ReadbackResultAsTexture(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(task_runner_provider()->IsMainThread());
     EXPECT_TRUE(result->HasTexture());
 
     TextureMailbox texture_mailbox;
-    scoped_ptr<SingleReleaseCallback> release_callback;
+    std::unique_ptr<SingleReleaseCallback> release_callback;
     result->TakeTexture(&texture_mailbox, &release_callback);
     EXPECT_TRUE(texture_mailbox.IsValid());
     EXPECT_TRUE(texture_mailbox.IsTexture());
 
-    scoped_ptr<SkBitmap> bitmap =
+    std::unique_ptr<SkBitmap> bitmap =
         CopyTextureMailboxToBitmap(result->size(), texture_mailbox);
     release_callback->Run(gpu::SyncToken(), false);
 
@@ -134,8 +134,7 @@
   int insert_copy_request_after_frame_count_;
 };
 
-void IgnoreReadbackResult(scoped_ptr<CopyOutputResult> result) {
-}
+void IgnoreReadbackResult(std::unique_ptr<CopyOutputResult> result) {}
 
 TEST_P(LayerTreeHostReadbackPixelTest, ReadbackRootLayer) {
   scoped_refptr<SolidColorLayer> background =
diff --git a/cc/trees/layer_tree_host_pixeltest_tiles.cc b/cc/trees/layer_tree_host_pixeltest_tiles.cc
index 764e37d..292c3ed 100644
--- a/cc/trees/layer_tree_host_pixeltest_tiles.cc
+++ b/cc/trees/layer_tree_host_pixeltest_tiles.cc
@@ -98,7 +98,7 @@
   }
 
   base::FilePath ref_file_;
-  scoped_ptr<SkBitmap> result_bitmap_;
+  std::unique_ptr<SkBitmap> result_bitmap_;
   RasterMode raster_mode_;
 };
 
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 89f65808..bfa8a382 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -11,6 +11,7 @@
 
 #include "base/auto_reset.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
 #include "base/thread_task_runner_handle.h"
@@ -430,10 +431,11 @@
 
 class LayerTreeHostFreeWorkerContextResourcesTest : public LayerTreeHostTest {
  public:
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
-    auto output_surface = make_scoped_ptr(new testing::StrictMock<
-        MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface>(
-        delegating_renderer()));
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+    auto output_surface = base::WrapUnique(
+        new testing::StrictMock<
+            MockSetWorkerContextShouldAggressivelyFreeResourcesOutputSurface>(
+            delegating_renderer()));
 
     // At init, we expect one call to set visibility to true.
     testing::Expectation visibility_true =
@@ -1387,7 +1389,7 @@
   void SetupTree() override {
     client_.set_fill_with_nonsolid_color(true);
 
-    scoped_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
     root_layer_ = FakePictureLayer::CreateWithRecordingSource(
         &client_, std::move(recording));
     root_layer_->SetBounds(gfx::Size(50, 50));
@@ -2308,8 +2310,8 @@
 
 class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest {
  protected:
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
-    scoped_ptr<MockIOSurfaceWebGraphicsContext3D> mock_context_owned(
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+    std::unique_ptr<MockIOSurfaceWebGraphicsContext3D> mock_context_owned(
         new MockIOSurfaceWebGraphicsContext3D);
     mock_context_ = mock_context_owned.get();
 
@@ -2495,13 +2497,13 @@
     client_.set_bounds(root_layer_->bounds());
   }
 
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     if (delegating_renderer()) {
       return FakeOutputSurface::CreateDelegatingSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice));
+          base::WrapUnique(new SoftwareOutputDevice));
     } else {
       return FakeOutputSurface::CreateSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice));
+          base::WrapUnique(new SoftwareOutputDevice));
     }
   }
 
@@ -2660,7 +2662,7 @@
         FakeScopedUIResource::Create(layer_tree_host());
   }
 
-  scoped_ptr<FakeScopedUIResource> ui_resources_[5];
+  std::unique_ptr<FakeScopedUIResource> ui_resources_[5];
   int num_ui_resources_;
 };
 
@@ -2668,9 +2670,10 @@
 
 class PushPropertiesCountingLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<PushPropertiesCountingLayerImpl> Create(
-      LayerTreeImpl* tree_impl, int id) {
-    return make_scoped_ptr(new PushPropertiesCountingLayerImpl(tree_impl, id));
+  static std::unique_ptr<PushPropertiesCountingLayerImpl> Create(
+      LayerTreeImpl* tree_impl,
+      int id) {
+    return base::WrapUnique(new PushPropertiesCountingLayerImpl(tree_impl, id));
   }
 
   ~PushPropertiesCountingLayerImpl() override {}
@@ -2683,7 +2686,8 @@
         layer)->push_properties_count_ = push_properties_count_;
   }
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
+  std::unique_ptr<LayerImpl> CreateLayerImpl(
+      LayerTreeImpl* tree_impl) override {
     return PushPropertiesCountingLayerImpl::Create(tree_impl, id());
   }
 
@@ -2717,7 +2721,8 @@
   // Something to make this layer push properties, but no other layer.
   void MakePushProperties() { SetContentsOpaque(!contents_opaque()); }
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
+  std::unique_ptr<LayerImpl> CreateLayerImpl(
+      LayerTreeImpl* tree_impl) override {
     return PushPropertiesCountingLayerImpl::Create(tree_impl, id());
   }
 
@@ -3175,7 +3180,7 @@
         // avoid causing a second commit to be scheduled. If a property change
         // is made during this, however, it needs to be pushed in the upcoming
         // commit.
-        scoped_ptr<base::AutoReset<bool>> ignore =
+        std::unique_ptr<base::AutoReset<bool>> ignore =
             scrollbar_layer_->IgnoreSetNeedsCommit();
 
         scrollbar_layer_->SetBounds(gfx::Size(30, 30));
@@ -4007,7 +4012,7 @@
       : first_output_surface_memory_limit_(4321234),
         second_output_surface_memory_limit_(1234321) {}
 
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     if (!first_context_provider_.get()) {
       first_context_provider_ = TestContextProvider::Create();
     } else {
@@ -4018,13 +4023,13 @@
     scoped_refptr<TestContextProvider> provider(second_context_provider_.get()
                                                     ? second_context_provider_
                                                     : first_context_provider_);
-    scoped_ptr<FakeOutputSurface> output_surface;
+    std::unique_ptr<FakeOutputSurface> output_surface;
     if (delegating_renderer())
       output_surface = FakeOutputSurface::CreateDelegating3d(provider);
     else
       output_surface = FakeOutputSurface::Create3d(provider);
     output_surface->SetMemoryPolicyToSetAtBind(
-        make_scoped_ptr(new ManagedMemoryPolicy(
+        base::WrapUnique(new ManagedMemoryPolicy(
             second_context_provider_.get() ? second_output_surface_memory_limit_
                                            : first_output_surface_memory_limit_,
             gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
@@ -4149,12 +4154,12 @@
   void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
     int frame = host_impl->active_tree()->source_frame_number();
     if (frame == -1) {
-      host_impl->active_tree()->QueuePinnedSwapPromise(make_scoped_ptr(
+      host_impl->active_tree()->QueuePinnedSwapPromise(base::WrapUnique(
           new TestSwapPromise(&pinned_active_swap_promise_result_)));
       host_impl->pending_tree()->QueueSwapPromise(
-          make_scoped_ptr(new TestSwapPromise(&pending_swap_promise_result_)));
+          base::WrapUnique(new TestSwapPromise(&pending_swap_promise_result_)));
       host_impl->active_tree()->QueueSwapPromise(
-          make_scoped_ptr(new TestSwapPromise(&active_swap_promise_result_)));
+          base::WrapUnique(new TestSwapPromise(&active_swap_promise_result_)));
     }
   }
 
@@ -4193,7 +4198,7 @@
 
   void WillBeginMainFrame() override {
     ASSERT_LE(commit_count_, 2);
-    scoped_ptr<SwapPromise> swap_promise(
+    std::unique_ptr<SwapPromise> swap_promise(
         new TestSwapPromise(&swap_promise_result_[commit_count_]));
     layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
   }
@@ -4307,7 +4312,7 @@
       case 1:
         layer_->SetBounds(gfx::Size(10, 11));
         layer_tree_host()->QueueSwapPromise(
-            make_scoped_ptr(new TestSwapPromise(&swap_promise_result_)));
+            base::WrapUnique(new TestSwapPromise(&swap_promise_result_)));
         break;
       case 2:
         break;
@@ -4380,7 +4385,7 @@
 
   void SetVisibleFalseAndQueueSwapPromise() {
     layer_tree_host()->SetVisible(false);
-    scoped_ptr<SwapPromise> swap_promise(
+    std::unique_ptr<SwapPromise> swap_promise(
         new TestSwapPromise(&swap_promise_result_));
     layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
   }
@@ -4424,7 +4429,7 @@
 
   void LoseOutputSurfaceAndQueueSwapPromise() {
     layer_tree_host()->DidLoseOutputSurface();
-    scoped_ptr<SwapPromise> swap_promise(
+    std::unique_ptr<SwapPromise> swap_promise(
         new TestSwapPromise(&swap_promise_result_));
     layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
   }
@@ -4503,9 +4508,8 @@
     int set_needs_redraw_count = 0;
 
     {
-      scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-          new SimpleSwapPromiseMonitor(layer_tree_host(),
-                                       NULL,
+      std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+          new SimpleSwapPromiseMonitor(layer_tree_host(), NULL,
                                        &set_needs_commit_count,
                                        &set_needs_redraw_count));
       layer_tree_host()->SetNeedsCommit();
@@ -4520,9 +4524,8 @@
     EXPECT_EQ(0, set_needs_redraw_count);
 
     {
-      scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-          new SimpleSwapPromiseMonitor(layer_tree_host(),
-                                       NULL,
+      std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+          new SimpleSwapPromiseMonitor(layer_tree_host(), NULL,
                                        &set_needs_commit_count,
                                        &set_needs_redraw_count));
       layer_tree_host()->SetNeedsUpdateLayers();
@@ -4531,9 +4534,8 @@
     }
 
     {
-      scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
-          new SimpleSwapPromiseMonitor(layer_tree_host(),
-                                       NULL,
+      std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
+          new SimpleSwapPromiseMonitor(layer_tree_host(), NULL,
                                        &set_needs_commit_count,
                                        &set_needs_redraw_count));
       layer_tree_host()->SetNeedsAnimate();
@@ -4585,7 +4587,7 @@
   void AfterTest() override {}
 
   FakeContentLayerClient client_;
-  scoped_ptr<FakeScopedUIResource> ui_resource_;
+  std::unique_ptr<FakeScopedUIResource> ui_resource_;
 };
 
 // This test is flaky, see http://crbug.com/386199
@@ -4601,7 +4603,8 @@
   void SetupTree() override {
     LayerTreeHostTest::SetupTree();
 
-    scoped_ptr<FakeRecordingSource> recording_source(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording_source(
+        new FakeRecordingSource);
     recording_source_ = recording_source.get();
 
     scoped_refptr<FakePictureLayer> layer =
@@ -4656,7 +4659,8 @@
   void SetupTree() override {
     LayerTreeHostTest::SetupTree();
 
-    scoped_ptr<FakeRecordingSource> recording_source(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording_source(
+        new FakeRecordingSource);
     recording_source_ = recording_source.get();
 
     scoped_refptr<FakePictureLayer> layer =
@@ -4713,7 +4717,8 @@
   void SetupTree() override {
     LayerTreeHostTest::SetupTree();
 
-    scoped_ptr<FakeRecordingSource> recording_source(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording_source(
+        new FakeRecordingSource);
     recording_source_ = recording_source.get();
 
     scoped_refptr<FakePictureLayer> layer =
@@ -4782,7 +4787,8 @@
   void SetupTree() override {
     LayerTreeHostTest::SetupTree();
 
-    scoped_ptr<FakeRecordingSource> recording_source(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording_source(
+        new FakeRecordingSource);
     recording_source_ = recording_source.get();
 
     scoped_refptr<FakePictureLayer> layer =
@@ -5097,20 +5103,20 @@
 
   void BeginTest() override {
     // Successful composite.
-    scoped_ptr<SwapPromise> swap_promise0(
+    std::unique_ptr<SwapPromise> swap_promise0(
         new TestSwapPromise(&swap_promise_result_[0]));
     layer_tree_host()->QueueSwapPromise(std::move(swap_promise0));
     layer_tree_host()->Composite(base::TimeTicks::Now());
 
     // Fail to swap (no damage).
-    scoped_ptr<SwapPromise> swap_promise1(
+    std::unique_ptr<SwapPromise> swap_promise1(
         new TestSwapPromise(&swap_promise_result_[1]));
     layer_tree_host()->QueueSwapPromise(std::move(swap_promise1));
     layer_tree_host()->SetNeedsCommit();
     layer_tree_host()->Composite(base::TimeTicks::Now());
 
     // Fail to draw (not visible).
-    scoped_ptr<SwapPromise> swap_promise2(
+    std::unique_ptr<SwapPromise> swap_promise2(
         new TestSwapPromise(&swap_promise_result_[2]));
     layer_tree_host()->QueueSwapPromise(std::move(swap_promise2));
     layer_tree_host()->SetNeedsDisplayOnAllLayers();
@@ -5228,7 +5234,7 @@
     page_scale_layer->AddChild(pinch);
     root_clip->AddChild(page_scale_layer);
 
-    scoped_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
     recording->SetPlaybackAllowedEvent(&playback_allowed_event_);
     scoped_refptr<FakePictureLayer> layer =
         FakePictureLayer::CreateWithRecordingSource(&client_,
@@ -5398,8 +5404,8 @@
 class LayerTreeHostTestCrispUpAfterPinchEndsWithOneCopy
     : public LayerTreeHostTestCrispUpAfterPinchEnds {
  protected:
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
-    scoped_ptr<TestWebGraphicsContext3D> context3d =
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+    std::unique_ptr<TestWebGraphicsContext3D> context3d =
         TestWebGraphicsContext3D::Create();
     context3d->set_support_image(true);
     context3d->set_support_sync_query(true);
@@ -5433,7 +5439,7 @@
     root->SetBounds(gfx::Size(500, 500));
     client_.set_bounds(root->bounds());
 
-    scoped_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
     scoped_refptr<FakePictureLayer> layer =
         FakePictureLayer::CreateWithRecordingSource(&client_,
                                                     std::move(recording));
@@ -5474,7 +5480,7 @@
   void SetupTree() override {
     client_.set_fill_with_nonsolid_color(true);
 
-    scoped_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
     scoped_refptr<FakePictureLayer> root =
         FakePictureLayer::CreateWithRecordingSource(&client_,
                                                     std::move(recording));
@@ -5530,7 +5536,7 @@
     page_scale_layer->AddChild(pinch);
     root_clip->AddChild(page_scale_layer);
 
-    scoped_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
+    std::unique_ptr<FakeRecordingSource> recording(new FakeRecordingSource);
     recording->SetPlaybackAllowedEvent(&playback_allowed_event_);
     scoped_refptr<FakePictureLayer> layer =
         FakePictureLayer::CreateWithRecordingSource(&client_,
@@ -5785,7 +5791,7 @@
 
     // Check composite events.
     {
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> timing_set =
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> timing_set =
           tracker->GroupCompositeCountsByRectId();
       EXPECT_EQ(1u, timing_set->size());
       auto rect_1_it = timing_set->find(1);
@@ -5799,7 +5805,7 @@
 
     // Check main frame events.
     {
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> timing_set =
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> timing_set =
           tracker->GroupMainFrameCountsByRectId();
       EXPECT_EQ(2u, timing_set->size());
       auto rect_1_it = timing_set->find(1);
@@ -5924,7 +5930,7 @@
     LayerTreeHostTest::SetupTree();
   }
 
-  static void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
+  static void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
 
   void BeginTest() override { PostSetNeedsCommitToMainThread(); }
 
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index b8a63e35..657068c 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -486,8 +486,8 @@
       player_->set_layer_animation_delegate(this);
 
       // Any valid AnimationCurve will do here.
-      scoped_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
-      scoped_ptr<Animation> animation(
+      std::unique_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
+      std::unique_ptr<Animation> animation(
           Animation::Create(std::move(curve), 1, 1, TargetProperty::OPACITY));
       player_->AddAnimation(std::move(animation));
 
@@ -730,11 +730,11 @@
   void DidCommit() override {
     switch (layer_tree_host()->source_frame_number()) {
       case 1: {
-        scoped_ptr<ScrollOffsetAnimationCurve> curve(
+        std::unique_ptr<ScrollOffsetAnimationCurve> curve(
             ScrollOffsetAnimationCurve::Create(
                 gfx::ScrollOffset(500.f, 550.f),
                 EaseInOutTimingFunction::Create()));
-        scoped_ptr<Animation> animation(Animation::Create(
+        std::unique_ptr<Animation> animation(Animation::Create(
             std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
         animation->set_needs_synchronized_start_time(true);
         bool impl_scrolling_supported =
@@ -782,10 +782,10 @@
     scroll_layer_->SetScrollOffset(gfx::ScrollOffset(100.0, 200.0));
     layer_tree_host()->root_layer()->AddChild(scroll_layer_);
 
-    scoped_ptr<ScrollOffsetAnimationCurve> curve(
+    std::unique_ptr<ScrollOffsetAnimationCurve> curve(
         ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f),
                                            EaseInOutTimingFunction::Create()));
-    scoped_ptr<Animation> animation(Animation::Create(
+    std::unique_ptr<Animation> animation(Animation::Create(
         std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
     animation->set_needs_synchronized_start_time(true);
 
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 7f17e0f9..787e9f8 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -2,11 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/trees/layer_tree_host.h"
-
 #include <stddef.h>
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "cc/layers/heads_up_display_layer.h"
 #include "cc/layers/io_surface_layer.h"
 #include "cc/layers/layer_impl.h"
@@ -35,6 +34,7 @@
 #include "cc/test/test_context_provider.h"
 #include "cc/test/test_shared_bitmap_manager.h"
 #include "cc/test/test_web_graphics_context_3d.h"
+#include "cc/trees/layer_tree_host.h"
 #include "cc/trees/layer_tree_host_impl.h"
 #include "cc/trees/layer_tree_impl.h"
 #include "cc/trees/single_thread_proxy.h"
@@ -77,18 +77,18 @@
     context3d_ = NULL;
   }
 
-  virtual scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() {
+  virtual std::unique_ptr<TestWebGraphicsContext3D> CreateContext3d() {
     return TestWebGraphicsContext3D::Create();
   }
 
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     if (times_to_fail_create_) {
       --times_to_fail_create_;
       ExpectCreateToFail();
-      return make_scoped_ptr(new FailureOutputSurface(delegating_renderer()));
+      return base::WrapUnique(new FailureOutputSurface(delegating_renderer()));
     }
 
-    scoped_ptr<TestWebGraphicsContext3D> context3d = CreateContext3d();
+    std::unique_ptr<TestWebGraphicsContext3D> context3d = CreateContext3d();
     base::AutoLock lock(context3d_lock_);
     context3d_ = context3d.get();
 
@@ -189,7 +189,7 @@
   }
 
   void CreateAndSetOutputSurface() {
-    scoped_ptr<OutputSurface> surface(
+    std::unique_ptr<OutputSurface> surface(
         LayerTreeHostContextTest::CreateOutputSurface());
     CHECK(surface);
     layer_tree_host()->SetOutputSurface(std::move(surface));
@@ -368,7 +368,7 @@
     EndTest();
   }
 
-  scoped_ptr<OutputSurface> CreateOutputSurface() override {
+  std::unique_ptr<OutputSurface> CreateOutputSurface() override {
     EXPECT_TRUE(false);
     return nullptr;
   }
@@ -402,7 +402,7 @@
   }
 
   void CreateAndSetOutputSurface() {
-    scoped_ptr<OutputSurface> surface =
+    std::unique_ptr<OutputSurface> surface =
         LayerTreeHostContextTest::CreateOutputSurface();
     CHECK(surface);
     setos_counter_++;
@@ -412,7 +412,7 @@
   void HideAndReleaseOutputSurface() {
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
     layer_tree_host()->SetVisible(false);
-    scoped_ptr<OutputSurface> surface =
+    std::unique_ptr<OutputSurface> surface =
         layer_tree_host()->ReleaseOutputSurface();
     CHECK(surface);
     MainThreadTaskRunner()->PostTask(
@@ -466,7 +466,7 @@
     layer_tree_host()->Composite(base::TimeTicks::FromInternalValue(2));
   }
 
-  scoped_ptr<OutputSurface> CreateOutputSurface() override {
+  std::unique_ptr<OutputSurface> CreateOutputSurface() override {
     EXPECT_TRUE(false);
     return nullptr;
   }
@@ -505,7 +505,7 @@
       return;
     ExpectCreateToFail();
     layer_tree_host()->SetOutputSurface(
-        make_scoped_ptr(new FailureOutputSurface(false)));
+        base::WrapUnique(new FailureOutputSurface(false)));
   }
 
   void BeginTest() override {
@@ -918,9 +918,9 @@
     gpu::gles2::GLES2Interface* gl =
         child_output_surface_->context_provider()->ContextGL();
 
-    scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+    std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
 
-    scoped_ptr<RenderPass> pass_for_quad = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass_for_quad = RenderPass::Create();
     pass_for_quad->SetNew(
         // AppendOneOfEveryQuadType() makes a RenderPass quad with this id.
         RenderPassId(2, 1),
@@ -928,7 +928,7 @@
         gfx::Rect(0, 0, 10, 10),
         gfx::Transform());
 
-    scoped_ptr<RenderPass> pass = RenderPass::Create();
+    std::unique_ptr<RenderPass> pass = RenderPass::Create();
     pass->SetNew(RenderPassId(1, 1),
                  gfx::Rect(0, 0, 10, 10),
                  gfx::Rect(0, 0, 10, 10),
@@ -1034,8 +1034,8 @@
     layer_tree_host()->SetDebugState(debug_state);
 
     scoped_refptr<PaintedScrollbarLayer> scrollbar =
-        PaintedScrollbarLayer::Create(scoped_ptr<Scrollbar>(new FakeScrollbar),
-                                      layer->id());
+        PaintedScrollbarLayer::Create(
+            std::unique_ptr<Scrollbar>(new FakeScrollbar), layer->id());
     scrollbar->SetBounds(gfx::Size(10, 10));
     scrollbar->SetIsDrawable(true);
     root->AddChild(scrollbar);
@@ -1069,7 +1069,7 @@
     return draw_result;
   }
 
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     // This will get called twice:
     // First when we create the initial output surface...
     if (layer_tree_host()->source_frame_number() > 0) {
@@ -1097,9 +1097,9 @@
   bool lost_context_;
 
   FakeOutputSurfaceClient output_surface_client_;
-  scoped_ptr<FakeOutputSurface> child_output_surface_;
-  scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
-  scoped_ptr<ResourceProvider> child_resource_provider_;
+  std::unique_ptr<FakeOutputSurface> child_output_surface_;
+  std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ResourceProvider> child_resource_provider_;
 
   scoped_refptr<VideoFrame> color_video_frame_;
   scoped_refptr<VideoFrame> hw_video_frame_;
@@ -1228,7 +1228,7 @@
 
  protected:
   int time_step_;
-  scoped_ptr<FakeScopedUIResource> ui_resource_;
+  std::unique_ptr<FakeScopedUIResource> ui_resource_;
 
  private:
   void StepCompleteOnMainThreadInternal(int step) {
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
index ab4a456..4248dd5 100644
--- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -4,6 +4,7 @@
 
 #include <stddef.h>
 
+#include "base/memory/ptr_util.h"
 #include "cc/layers/layer_iterator.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/output/copy_output_result.h"
@@ -111,10 +112,10 @@
     }
   }
 
-  void CopyOutputCallback(size_t id, scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(size_t id, std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
     EXPECT_TRUE(result->HasBitmap());
-    scoped_ptr<SkBitmap> bitmap = result->TakeBitmap();
+    std::unique_ptr<SkBitmap> bitmap = result->TakeBitmap();
     EXPECT_EQ(result->size().ToString(),
               gfx::Size(bitmap->width(), bitmap->height()).ToString());
     callbacks_[id] = result->size();
@@ -122,12 +123,12 @@
 
   void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); }
 
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     if (!use_gl_renderer_) {
       return FakeOutputSurface::CreateSoftware(
-          make_scoped_ptr(new SoftwareOutputDevice));
+          base::WrapUnique(new SoftwareOutputDevice));
     }
-    scoped_ptr<FakeOutputSurface> output_surface =
+    std::unique_ptr<FakeOutputSurface> output_surface =
         FakeOutputSurface::Create3d();
     TestContextSupport* context_support = static_cast<TestContextSupport*>(
         output_surface->context_provider()->ContextSupport());
@@ -223,7 +224,7 @@
     }
   }
 
-  static void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  static void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_FALSE(result->IsEmpty());
   }
 
@@ -313,7 +314,7 @@
     }
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
     EXPECT_TRUE(result->IsEmpty());
     ++callback_count_;
@@ -370,7 +371,7 @@
     AddCopyRequest(copy_layer_.get());
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     ++callback_count_;
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
     EXPECT_EQ(copy_layer_->bounds().ToString(), result->size().ToString())
@@ -468,7 +469,7 @@
             base::Unretained(this))));
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
     EXPECT_EQ(copy_layer_->bounds().ToString(), result->size().ToString());
     EndTest();
@@ -545,7 +546,7 @@
                    base::Unretained(this))));
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     // We should still get the content even if the copy requested layer was
     // completely clipped away.
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
@@ -591,7 +592,7 @@
   void BeginTest() override {
     PostSetNeedsCommitToMainThread();
 
-    scoped_ptr<CopyOutputRequest> request =
+    std::unique_ptr<CopyOutputRequest> request =
         CopyOutputRequest::CreateBitmapRequest(base::Bind(
             &LayerTreeHostCopyRequestTestScaledLayer::CopyOutputCallback,
             base::Unretained(this)));
@@ -599,7 +600,7 @@
     copy_layer_->RequestCopyOfOutput(std::move(request));
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     // The request area is expressed in layer space, but the result's size takes
     // into account the transform from layer space to surface space.
     EXPECT_EQ(gfx::Size(10, 10), result->size());
@@ -668,7 +669,7 @@
     }
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
 
     // The first frame can't be drawn.
@@ -705,7 +706,7 @@
 class LayerTreeHostCopyRequestTestLostOutputSurface
     : public LayerTreeHostCopyRequestTest {
  protected:
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     if (!first_context_provider_) {
       first_context_provider_ = TestContextProvider::Create();
       return FakeOutputSurface::Create3d(first_context_provider_);
@@ -731,7 +732,8 @@
 
   void BeginTest() override { PostSetNeedsCommitToMainThread(); }
 
-  void ReceiveCopyRequestOutputAndCommit(scoped_ptr<CopyOutputResult> result) {
+  void ReceiveCopyRequestOutputAndCommit(
+      std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
     EXPECT_EQ(gfx::Size(10, 10).ToString(), result->size().ToString());
     EXPECT_TRUE(result->HasTexture());
@@ -830,7 +832,7 @@
   FakeContentLayerClient client_;
   scoped_refptr<FakePictureLayer> root_;
   scoped_refptr<FakePictureLayer> copy_layer_;
-  scoped_ptr<CopyOutputResult> result_;
+  std::unique_ptr<CopyOutputResult> result_;
 };
 
 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
@@ -839,7 +841,7 @@
 class LayerTreeHostCopyRequestTestCountTextures
     : public LayerTreeHostCopyRequestTest {
  protected:
-  scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+  std::unique_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
     context_provider_ = TestContextProvider::Create();
     return FakeOutputSurface::Create3d(context_provider_);
   }
@@ -922,12 +924,12 @@
             base::Unretained(this))));
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_FALSE(result->IsEmpty());
     EXPECT_TRUE(result->HasTexture());
 
     TextureMailbox mailbox;
-    scoped_ptr<SingleReleaseCallback> release;
+    std::unique_ptr<SingleReleaseCallback> release;
     result->TakeTexture(&mailbox, &release);
     EXPECT_TRUE(release);
 
@@ -954,12 +956,12 @@
     LayerTreeHostCopyRequestTestCountTextures::BeginTest();
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_FALSE(result->IsEmpty());
     EXPECT_TRUE(result->HasTexture());
 
     TextureMailbox mailbox;
-    scoped_ptr<SingleReleaseCallback> release;
+    std::unique_ptr<SingleReleaseCallback> release;
     result->TakeTexture(&mailbox, &release);
     EXPECT_FALSE(release);
   }
@@ -967,7 +969,7 @@
   void RequestCopy(Layer* layer) override {
     // Request a copy to a provided texture. This should not create a new
     // texture.
-    scoped_ptr<CopyOutputRequest> request =
+    std::unique_ptr<CopyOutputRequest> request =
         CopyOutputRequest::CreateRequest(base::Bind(
             &LayerTreeHostCopyRequestTestProvideTexture::CopyOutputCallback,
             base::Unretained(this)));
@@ -1023,7 +1025,7 @@
     PostSetNeedsCommitToMainThread();
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(result->IsEmpty());
     ++callback_count_;
   }
@@ -1041,10 +1043,10 @@
         EXPECT_EQ(0, callback_count_);
         // Put a copy request on the layer, but then don't allow any
         // drawing to take place.
-        scoped_ptr<CopyOutputRequest> request =
+        std::unique_ptr<CopyOutputRequest> request =
             CopyOutputRequest::CreateRequest(
                 base::Bind(&LayerTreeHostCopyRequestTestDestroyBeforeCopy::
-                                CopyOutputCallback,
+                               CopyOutputCallback,
                            base::Unretained(this)));
         copy_layer_->RequestCopyOfOutput(std::move(request));
 
@@ -1101,7 +1103,7 @@
     PostSetNeedsCommitToMainThread();
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_TRUE(result->IsEmpty());
     ++callback_count_;
   }
@@ -1119,10 +1121,10 @@
         EXPECT_EQ(0, callback_count_);
         // Put a copy request on the layer, but then don't allow any
         // drawing to take place.
-        scoped_ptr<CopyOutputRequest> request =
+        std::unique_ptr<CopyOutputRequest> request =
             CopyOutputRequest::CreateRequest(
                 base::Bind(&LayerTreeHostCopyRequestTestShutdownBeforeCopy::
-                                CopyOutputCallback,
+                               CopyOutputCallback,
                            base::Unretained(this)));
         copy_layer_->RequestCopyOfOutput(std::move(request));
 
@@ -1245,7 +1247,7 @@
     return draw_result;
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
     EXPECT_FALSE(TestEnded());
     copy_happened_ = true;
     TryEndTest();
diff --git a/cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc b/cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc
index 5240130..f56109b0 100644
--- a/cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc
+++ b/cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc
@@ -15,7 +15,7 @@
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
   LayerTreeSettings settings;
-  scoped_ptr<FakeLayerTreeHost> host =
+  std::unique_ptr<FakeLayerTreeHost> host =
       FakeLayerTreeHost::Create(&host_client, &task_graph_runner, settings,
                                 CompositorMode::SINGLE_THREADED);
   host->RecordGpuRasterizationHistogram();
@@ -26,7 +26,7 @@
   FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
   TestTaskGraphRunner task_graph_runner;
   LayerTreeSettings settings;
-  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
+  std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
       &host_client, &task_graph_runner, settings, CompositorMode::THREADED);
   host->RecordGpuRasterizationHistogram();
   EXPECT_TRUE(host->gpu_rasterization_histogram_recorded());
diff --git a/cc/trees/layer_tree_host_unittest_remote_server.cc b/cc/trees/layer_tree_host_unittest_remote_server.cc
index 9873dca..b563fa4c 100644
--- a/cc/trees/layer_tree_host_unittest_remote_server.cc
+++ b/cc/trees/layer_tree_host_unittest_remote_server.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "cc/trees/layer_tree_host.h"
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/test/fake_image_serialization_processor.h"
 #include "cc/test/test_task_graph_runner.h"
+#include "cc/trees/layer_tree_host.h"
 #include "cc/trees/layer_tree_host_client.h"
 #include "cc/trees/proxy_common.h"
 #include "cc/trees/proxy_main.h"
@@ -24,7 +25,7 @@
   LayerTreeHostTestRemoteServer()
       : calls_received_(0),
         image_serialization_processor_(
-            make_scoped_ptr(new FakeImageSerializationProcessor)) {
+            base::WrapUnique(new FakeImageSerializationProcessor)) {
     LayerTreeHost::InitParams params;
     params.client = this;
     params.task_graph_runner = &task_graph_runner_;
@@ -55,8 +56,8 @@
   void DidCommitAndDrawFrame() override {}
   void DidCompleteSwapBuffers() override {}
   void RecordFrameTimingEvents(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override{};
   void DidCompletePageScaleAnimation() override {}
   void SendBeginFramesToChildren(const BeginFrameArgs& args) override {}
@@ -70,9 +71,10 @@
   int calls_received_;
   TestTaskGraphRunner task_graph_runner_;
   LayerTreeSettings settings_;
-  scoped_ptr<LayerTreeHost> layer_tree_host_;
+  std::unique_ptr<LayerTreeHost> layer_tree_host_;
   RemoteProtoChannel::ProtoReceiver* receiver_;
-  scoped_ptr<FakeImageSerializationProcessor> image_serialization_processor_;
+  std::unique_ptr<FakeImageSerializationProcessor>
+      image_serialization_processor_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(LayerTreeHostTestRemoteServer);
@@ -91,7 +93,7 @@
 TEST_F(LayerTreeHostTestRemoteServerBeginMainFrame, BeginMainFrameNotAborted) {
   layer_tree_host_->SetVisible(true);
 
-  scoped_ptr<BeginMainFrameAndCommitState> begin_frame_state;
+  std::unique_ptr<BeginMainFrameAndCommitState> begin_frame_state;
   begin_frame_state.reset(new BeginMainFrameAndCommitState());
   begin_frame_state->scroll_info.reset(new ScrollAndScaleSet());
 
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index b5fce20..9280dd3 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -29,30 +29,30 @@
 namespace cc {
 namespace {
 
-scoped_ptr<ScrollState> BeginState(const gfx::Point& point) {
+std::unique_ptr<ScrollState> BeginState(const gfx::Point& point) {
   ScrollStateData scroll_state_data;
   scroll_state_data.is_beginning = true;
   scroll_state_data.start_position_x = point.x();
   scroll_state_data.start_position_y = point.y();
-  scoped_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
+  std::unique_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
   return scroll_state;
 }
 
-scoped_ptr<ScrollState> UpdateState(const gfx::Point& point,
-                                    const gfx::Vector2dF& delta) {
+std::unique_ptr<ScrollState> UpdateState(const gfx::Point& point,
+                                         const gfx::Vector2dF& delta) {
   ScrollStateData scroll_state_data;
   scroll_state_data.delta_x = delta.x();
   scroll_state_data.delta_y = delta.y();
   scroll_state_data.start_position_x = point.x();
   scroll_state_data.start_position_y = point.y();
-  scoped_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
+  std::unique_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
   return scroll_state;
 }
 
-scoped_ptr<ScrollState> EndState() {
+std::unique_ptr<ScrollState> EndState() {
   ScrollStateData scroll_state_data;
   scroll_state_data.is_ending = true;
-  scoped_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
+  std::unique_ptr<ScrollState> scroll_state(new ScrollState(scroll_state_data));
   return scroll_state;
 }
 
@@ -1305,7 +1305,7 @@
   params.task_graph_runner = &task_graph_runner;
   params.settings = &settings;
   params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
-  scoped_ptr<LayerTreeHost> layer_tree_host =
+  std::unique_ptr<LayerTreeHost> layer_tree_host =
       LayerTreeHost::CreateThreaded(impl_thread.task_runner(), &params);
 
   impl_thread.task_runner()->PostTask(
diff --git a/cc/trees/layer_tree_host_unittest_serialization.cc b/cc/trees/layer_tree_host_unittest_serialization.cc
index c78700e..da18690 100644
--- a/cc/trees/layer_tree_host_unittest_serialization.cc
+++ b/cc/trees/layer_tree_host_unittest_serialization.cc
@@ -353,11 +353,11 @@
  private:
   TestTaskGraphRunner task_graph_runner_src_;
   FakeLayerTreeHostClient client_src_;
-  scoped_ptr<LayerTreeHost> layer_tree_host_src_;
+  std::unique_ptr<LayerTreeHost> layer_tree_host_src_;
 
   TestTaskGraphRunner task_graph_runner_dst_;
   FakeLayerTreeHostClient client_dst_;
-  scoped_ptr<LayerTreeHost> layer_tree_host_dst_;
+  std::unique_ptr<LayerTreeHost> layer_tree_host_dst_;
 };
 
 TEST_F(LayerTreeHostSerializationTest, AllMembersChanged) {
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 5c2b9c64..1ccef5f 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -275,7 +275,7 @@
   }
 }
 
-void LayerTreeImpl::SetRootLayer(scoped_ptr<LayerImpl> layer) {
+void LayerTreeImpl::SetRootLayer(std::unique_ptr<LayerImpl> layer) {
   if (root_layer_ && layer.get() != root_layer_)
     RemoveLayer(root_layer_->id());
   root_layer_ = layer.get();
@@ -320,11 +320,11 @@
   return offset;
 }
 
-scoped_ptr<OwnedLayerImplList> LayerTreeImpl::DetachLayers() {
+std::unique_ptr<OwnedLayerImplList> LayerTreeImpl::DetachLayers() {
   root_layer_ = nullptr;
   render_surface_layer_list_.clear();
   set_needs_update_draw_properties();
-  scoped_ptr<OwnedLayerImplList> ret = std::move(layers_);
+  std::unique_ptr<OwnedLayerImplList> ret = std::move(layers_);
   layers_.reset(new OwnedLayerImplList);
   return ret;
 }
@@ -1047,19 +1047,19 @@
 }
 
 // These manage ownership of the LayerImpl.
-void LayerTreeImpl::AddLayer(scoped_ptr<LayerImpl> layer) {
+void LayerTreeImpl::AddLayer(std::unique_ptr<LayerImpl> layer) {
   DCHECK(std::find(layers_->begin(), layers_->end(), layer) == layers_->end());
   layers_->push_back(std::move(layer));
   set_needs_update_draw_properties();
 }
 
-scoped_ptr<LayerImpl> LayerTreeImpl::RemoveLayer(int id) {
+std::unique_ptr<LayerImpl> LayerTreeImpl::RemoveLayer(int id) {
   if (root_layer_ && root_layer_->id() == id)
     root_layer_ = nullptr;
   for (auto it = layers_->begin(); it != layers_->end(); ++it) {
     if ((*it) && (*it)->id() != id)
       continue;
-    scoped_ptr<LayerImpl> ret = std::move(*it);
+    std::unique_ptr<LayerImpl> ret = std::move(*it);
     set_needs_update_draw_properties();
     layers_->erase(it);
     return ret;
@@ -1217,7 +1217,7 @@
   return layer_tree_host_impl_->ViewportRectForTilePriority();
 }
 
-scoped_ptr<ScrollbarAnimationController>
+std::unique_ptr<ScrollbarAnimationController>
 LayerTreeImpl::CreateScrollbarAnimationController(int scroll_layer_id) {
   DCHECK(settings().scrollbar_fade_delay_ms);
   DCHECK(settings().scrollbar_fade_duration_ms);
@@ -1338,20 +1338,21 @@
   return true;
 }
 
-void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
+void LayerTreeImpl::QueueSwapPromise(
+    std::unique_ptr<SwapPromise> swap_promise) {
   DCHECK(swap_promise);
   swap_promise_list_.push_back(std::move(swap_promise));
 }
 
 void LayerTreeImpl::QueuePinnedSwapPromise(
-    scoped_ptr<SwapPromise> swap_promise) {
+    std::unique_ptr<SwapPromise> swap_promise) {
   DCHECK(IsActiveTree());
   DCHECK(swap_promise);
   pinned_swap_promise_list_.push_back(std::move(swap_promise));
 }
 
 void LayerTreeImpl::PassSwapPromises(
-    std::vector<scoped_ptr<SwapPromise>>* new_swap_promise) {
+    std::vector<std::unique_ptr<SwapPromise>>* new_swap_promise) {
   for (const auto& swap_promise : swap_promise_list_)
     swap_promise->DidNotSwap(SwapPromise::SWAP_FAILS);
   swap_promise_list_.clear();
@@ -1948,11 +1949,11 @@
 }
 
 void LayerTreeImpl::SetPendingPageScaleAnimation(
-    scoped_ptr<PendingPageScaleAnimation> pending_animation) {
+    std::unique_ptr<PendingPageScaleAnimation> pending_animation) {
   pending_page_scale_animation_ = std::move(pending_animation);
 }
 
-scoped_ptr<PendingPageScaleAnimation>
+std::unique_ptr<PendingPageScaleAnimation>
 LayerTreeImpl::TakePendingPageScaleAnimation() {
   return std::move(pending_page_scale_animation_);
 }
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 8bda30b4..6ad246ac 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "cc/base/synced_property.h"
 #include "cc/input/event_listener_properties.h"
@@ -64,12 +65,12 @@
   // This is the number of times a fixed point has to be hit contiuously by a
   // layer to consider it as jittering.
   const int kFixedPointHitsThreshold = 3;
-  static scoped_ptr<LayerTreeImpl> create(
+  static std::unique_ptr<LayerTreeImpl> create(
       LayerTreeHostImpl* layer_tree_host_impl,
       scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor,
       scoped_refptr<SyncedTopControls> top_controls_shown_ratio,
       scoped_refptr<SyncedElasticOverscroll> elastic_overscroll) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new LayerTreeImpl(layer_tree_host_impl, page_scale_factor,
                           top_controls_shown_ratio, elastic_overscroll));
   }
@@ -105,8 +106,8 @@
   gfx::Rect DeviceViewport() const;
   gfx::Size DrawViewportSize() const;
   const gfx::Rect ViewportRectForTilePriority() const;
-  scoped_ptr<ScrollbarAnimationController> CreateScrollbarAnimationController(
-      int scroll_layer_id);
+  std::unique_ptr<ScrollbarAnimationController>
+  CreateScrollbarAnimationController(int scroll_layer_id);
   void DidAnimateScrollOffset();
   bool use_gpu_rasterization() const;
   GpuRasterizationStatus GetGpuRasterizationStatus() const;
@@ -131,9 +132,9 @@
   // Other public methods
   // ---------------------------------------------------------------------------
   LayerImpl* root_layer() const { return root_layer_; }
-  void SetRootLayer(scoped_ptr<LayerImpl>);
+  void SetRootLayer(std::unique_ptr<LayerImpl>);
   bool IsRootLayer(const LayerImpl* layer) const;
-  scoped_ptr<OwnedLayerImplList> DetachLayers();
+  std::unique_ptr<OwnedLayerImplList> DetachLayers();
   void ClearLayers();
 
   void SetPropertyTrees(const PropertyTrees property_trees) {
@@ -310,8 +311,8 @@
   void UnregisterLayer(LayerImpl* layer);
 
   // These manage ownership of the LayerImpl.
-  void AddLayer(scoped_ptr<LayerImpl> layer);
-  scoped_ptr<LayerImpl> RemoveLayer(int id);
+  void AddLayer(std::unique_ptr<LayerImpl> layer);
+  std::unique_ptr<LayerImpl> RemoveLayer(int id);
 
   size_t NumLayers();
 
@@ -343,7 +344,7 @@
   // active tree along with the layer information. Similarly, when a
   // new activation overwrites layer information on the active tree,
   // queued swap promises are broken.
-  void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
+  void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise);
 
   // Queue a swap promise, pinned to this tree. Pinned swap promises
   // may only be queued on the active tree.
@@ -354,10 +355,11 @@
   //
   // Pinned active tree swap promises will not be broken prematurely
   // on the active tree if a new tree is activated.
-  void QueuePinnedSwapPromise(scoped_ptr<SwapPromise> swap_promise);
+  void QueuePinnedSwapPromise(std::unique_ptr<SwapPromise> swap_promise);
 
   // Take the |new_swap_promise| and append it to |swap_promise_list_|.
-  void PassSwapPromises(std::vector<scoped_ptr<SwapPromise>>* new_swap_promise);
+  void PassSwapPromises(
+      std::vector<std::unique_ptr<SwapPromise>>* new_swap_promise);
   void FinishSwapPromises(CompositorFrameMetadata* metadata);
   void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
 
@@ -424,8 +426,8 @@
   void PushTopControlsFromMainThread(float top_controls_shown_ratio);
 
   void SetPendingPageScaleAnimation(
-      scoped_ptr<PendingPageScaleAnimation> pending_animation);
-  scoped_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation();
+      std::unique_ptr<PendingPageScaleAnimation> pending_animation);
+  std::unique_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation();
 
   void GatherFrameTimingRequestIds(std::vector<int64_t>* request_ids);
 
@@ -527,7 +529,7 @@
 
   scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_;
 
-  scoped_ptr<OwnedLayerImplList> layers_;
+  std::unique_ptr<OwnedLayerImplList> layers_;
   LayerImplMap layer_id_map_;
   // Set of layers that need to push properties.
   std::unordered_set<LayerImpl*> layers_that_should_push_properties_;
@@ -566,8 +568,8 @@
 
   bool has_ever_been_drawn_;
 
-  std::vector<scoped_ptr<SwapPromise>> swap_promise_list_;
-  std::vector<scoped_ptr<SwapPromise>> pinned_swap_promise_list_;
+  std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_;
+  std::vector<std::unique_ptr<SwapPromise>> pinned_swap_promise_list_;
 
   UIResourceRequestQueue ui_resource_request_queue_;
 
@@ -586,7 +588,7 @@
   // shown).
   scoped_refptr<SyncedTopControls> top_controls_shown_ratio_;
 
-  scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
+  std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index 8781d2f..7a12335 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -54,12 +54,12 @@
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
   FakeImplTaskRunnerProvider task_runner_provider_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<FakeLayerTreeHostImpl> host_impl_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<FakeLayerTreeHostImpl> host_impl_;
 };
 
 TEST_F(LayerTreeImplTest, HitTestingForSingleLayer) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -109,14 +109,14 @@
   TestTaskGraphRunner task_graph_runner;
   FakeImplTaskRunnerProvider task_runner_provider;
   LayerTreeSettings settings;
-  scoped_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
-  scoped_ptr<FakeLayerTreeHostImpl> host_impl;
+  std::unique_ptr<OutputSurface> output_surface = FakeOutputSurface::Create3d();
+  std::unique_ptr<FakeLayerTreeHostImpl> host_impl;
   host_impl.reset(new FakeLayerTreeHostImpl(settings, &task_runner_provider,
                                             &shared_bitmap_manager,
                                             &task_graph_runner));
   host_impl->SetVisible(true);
   EXPECT_TRUE(host_impl->InitializeRenderer(output_surface.get()));
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl->active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -147,9 +147,9 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForSingleLayerAndHud) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
-  scoped_ptr<HeadsUpDisplayLayerImpl> hud =
+  std::unique_ptr<HeadsUpDisplayLayerImpl> hud =
       HeadsUpDisplayLayerImpl::Create(host_impl().active_tree(), 11111);
 
   gfx::Transform identity_matrix;
@@ -204,7 +204,7 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForUninvertibleTransform) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform uninvertible_transform;
@@ -271,7 +271,7 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForSinglePositionedLayer) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -320,7 +320,7 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForSingleRotatedLayer) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -381,13 +381,14 @@
   // Tests hit testing on a layer whose clip node has different transform and
   // target id.
   gfx::Transform identity_matrix;
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(500, 500), true, false,
                                true);
   gfx::Transform translation;
   translation.Translate(100, 100);
-  scoped_ptr<LayerImpl> render_surface =
+  std::unique_ptr<LayerImpl> render_surface =
       LayerImpl::Create(host_impl().active_tree(), 2);
   SetLayerPropertiesForTesting(render_surface.get(), translation,
                                gfx::Point3F(), gfx::PointF(),
@@ -395,18 +396,21 @@
 
   gfx::Transform scale_matrix;
   scale_matrix.Scale(2, 2);
-  scoped_ptr<LayerImpl> scale = LayerImpl::Create(host_impl().active_tree(), 3);
+  std::unique_ptr<LayerImpl> scale =
+      LayerImpl::Create(host_impl().active_tree(), 3);
   SetLayerPropertiesForTesting(scale.get(), scale_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(50, 50), true, false,
                                false);
 
-  scoped_ptr<LayerImpl> clip = LayerImpl::Create(host_impl().active_tree(), 4);
+  std::unique_ptr<LayerImpl> clip =
+      LayerImpl::Create(host_impl().active_tree(), 4);
   SetLayerPropertiesForTesting(clip.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(25, 25), true, false,
                                false);
   clip->SetMasksToBounds(true);
 
-  scoped_ptr<LayerImpl> test = LayerImpl::Create(host_impl().active_tree(), 5);
+  std::unique_ptr<LayerImpl> test =
+      LayerImpl::Create(host_impl().active_tree(), 5);
   SetLayerPropertiesForTesting(test.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(100, 100), true, false,
                                false);
@@ -440,18 +444,19 @@
 TEST_F(LayerTreeImplTest, HitTestingSiblings) {
   // This tests hit testing when the test point hits only one of the siblings.
   gfx::Transform identity_matrix;
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(100, 100), true, false,
                                true);
-  scoped_ptr<LayerImpl> child1 =
+  std::unique_ptr<LayerImpl> child1 =
       LayerImpl::Create(host_impl().active_tree(), 2);
   SetLayerPropertiesForTesting(child1.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(25, 25), true, false,
                                false);
   child1->SetMasksToBounds(true);
   child1->SetDrawsContent(true);
-  scoped_ptr<LayerImpl> child2 =
+  std::unique_ptr<LayerImpl> child2 =
       LayerImpl::Create(host_impl().active_tree(), 3);
   SetLayerPropertiesForTesting(child2.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), gfx::Size(75, 75), true, false,
@@ -478,11 +483,12 @@
       host_impl().active_tree()->resource_provider()->max_texture_size();
   gfx::Size bounds(max_texture_size + 100, max_texture_size + 100);
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), bounds, true, false, true);
 
-  scoped_ptr<LayerImpl> surface =
+  std::unique_ptr<LayerImpl> surface =
       LayerImpl::Create(host_impl().active_tree(), 2);
   SetLayerPropertiesForTesting(surface.get(), identity_matrix, gfx::Point3F(),
                                gfx::PointF(), bounds, true, false, true);
@@ -506,7 +512,7 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForSinglePerspectiveLayer) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -570,12 +576,13 @@
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, transform_origin,
                                gfx::PointF(), gfx::Size(100, 100), true, false,
                                true);
   {
-    scoped_ptr<LayerImpl> clipping_layer =
+    std::unique_ptr<LayerImpl> clipping_layer =
         LayerImpl::Create(host_impl().active_tree(), 123);
     // this layer is positioned, and hit testing should correctly know where the
     // layer is located.
@@ -586,7 +593,7 @@
                                  false, false);
     clipping_layer->SetMasksToBounds(true);
 
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), 456);
     position = gfx::PointF(-50.f, -50.f);
     bounds = gfx::Size(300, 300);
@@ -646,7 +653,7 @@
   // the root + child clips combined create a triangle. The rotated_leaf will
   // only be visible where it overlaps this triangle.
   //
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 123);
   LayerImpl* root_layer = root.get();
 
@@ -658,11 +665,11 @@
                                position, bounds, true, false, true);
   root->SetMasksToBounds(true);
   {
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), 456);
-    scoped_ptr<LayerImpl> grand_child =
+    std::unique_ptr<LayerImpl> grand_child =
         LayerImpl::Create(host_impl().active_tree(), 789);
-    scoped_ptr<LayerImpl> rotated_leaf =
+    std::unique_ptr<LayerImpl> rotated_leaf =
         LayerImpl::Create(host_impl().active_tree(), 2468);
 
     position = gfx::PointF(10.f, 10.f);
@@ -763,12 +770,13 @@
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, transform_origin,
                                gfx::PointF(), gfx::Size(100, 100), true, false,
                                true);
   {
-    scoped_ptr<LayerImpl> intermediate_layer =
+    std::unique_ptr<LayerImpl> intermediate_layer =
         LayerImpl::Create(host_impl().active_tree(), 123);
     // this layer is positioned, and hit testing should correctly know where the
     // layer is located.
@@ -784,7 +792,7 @@
     // The child of the intermediate_layer is translated so that it does not
     // overlap intermediate_layer at all.  If child is incorrectly clipped, we
     // would not be able to hit it successfully.
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), 456);
     position = gfx::PointF(60.f, 60.f);  // 70, 70 in screen space
     bounds = gfx::Size(20, 20);
@@ -830,7 +838,8 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   LayerImpl* root_layer = root.get();
 
   gfx::Transform identity_matrix;
@@ -847,11 +856,11 @@
     // grand_child, (third) child1, and (back) the root layer behind all other
     // layers.
 
-    scoped_ptr<LayerImpl> child1 =
+    std::unique_ptr<LayerImpl> child1 =
         LayerImpl::Create(host_impl().active_tree(), 2);
-    scoped_ptr<LayerImpl> child2 =
+    std::unique_ptr<LayerImpl> child2 =
         LayerImpl::Create(host_impl().active_tree(), 3);
-    scoped_ptr<LayerImpl> grand_child1 =
+    std::unique_ptr<LayerImpl> grand_child1 =
         LayerImpl::Create(host_impl().active_tree(), 4);
 
     position = gfx::PointF(10.f, 10.f);
@@ -963,11 +972,11 @@
                                          float root_depth,
                                          float left_child_depth,
                                          float right_child_depth) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), root_id);
-  scoped_ptr<LayerImpl> left_child =
+  std::unique_ptr<LayerImpl> left_child =
       LayerImpl::Create(host_impl().active_tree(), left_child_id);
-  scoped_ptr<LayerImpl> right_child =
+  std::unique_ptr<LayerImpl> right_child =
       LayerImpl::Create(host_impl().active_tree(), right_child_id);
 
   gfx::Point3F transform_origin;
@@ -1053,7 +1062,8 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
 
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
@@ -1071,11 +1081,11 @@
     // grand_child, (third) child1, and (back) the root layer behind all other
     // layers.
 
-    scoped_ptr<LayerImpl> child1 =
+    std::unique_ptr<LayerImpl> child1 =
         LayerImpl::Create(host_impl().active_tree(), 2);
-    scoped_ptr<LayerImpl> child2 =
+    std::unique_ptr<LayerImpl> child2 =
         LayerImpl::Create(host_impl().active_tree(), 3);
-    scoped_ptr<LayerImpl> grand_child1 =
+    std::unique_ptr<LayerImpl> grand_child1 =
         LayerImpl::Create(host_impl().active_tree(), 4);
 
     position = gfx::PointF(10.f, 10.f);
@@ -1177,7 +1187,8 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingRespectsClipParents) {
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
   gfx::PointF position;
@@ -1186,9 +1197,9 @@
                                position, bounds, true, false, true);
   root->SetDrawsContent(true);
   {
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), 2);
-    scoped_ptr<LayerImpl> grand_child =
+    std::unique_ptr<LayerImpl> grand_child =
         LayerImpl::Create(host_impl().active_tree(), 4);
 
     position = gfx::PointF(10.f, 10.f);
@@ -1208,7 +1219,8 @@
 
     // This should let |grand_child| "escape" |child|'s clip.
     grand_child->SetClipParent(root.get());
-    scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+    std::unique_ptr<std::set<LayerImpl*>> clip_children(
+        new std::set<LayerImpl*>);
     clip_children->insert(grand_child.get());
     root->SetClipChildren(clip_children.release());
 
@@ -1228,7 +1240,8 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingRespectsScrollParents) {
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
   gfx::PointF position;
@@ -1237,11 +1250,11 @@
                                position, bounds, true, false, true);
   root->SetDrawsContent(true);
   {
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), 2);
-    scoped_ptr<LayerImpl> scroll_child =
+    std::unique_ptr<LayerImpl> scroll_child =
         LayerImpl::Create(host_impl().active_tree(), 3);
-    scoped_ptr<LayerImpl> grand_child =
+    std::unique_ptr<LayerImpl> grand_child =
         LayerImpl::Create(host_impl().active_tree(), 4);
 
     position = gfx::PointF(10.f, 10.f);
@@ -1261,7 +1274,8 @@
     // This should cause scroll child and its descendants to be affected by
     // |child|'s clip.
     scroll_child->SetScrollParent(child.get());
-    scoped_ptr<std::set<LayerImpl*>> scroll_children(new std::set<LayerImpl*>);
+    std::unique_ptr<std::set<LayerImpl*>> scroll_children(
+        new std::set<LayerImpl*>);
     scroll_children->insert(scroll_child.get());
     child->SetScrollChildren(scroll_children.release());
 
@@ -1293,7 +1307,8 @@
   // The geometry is set up similarly to the previous case, but
   // all layers are forced to be render surfaces now.
   //
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   LayerImpl* root_layer = root.get();
 
   gfx::Transform identity_matrix;
@@ -1310,11 +1325,11 @@
     // grand_child, (third) child1, and (back) the root layer behind all other
     // layers.
 
-    scoped_ptr<LayerImpl> child1 =
+    std::unique_ptr<LayerImpl> child1 =
         LayerImpl::Create(host_impl().active_tree(), 2);
-    scoped_ptr<LayerImpl> child2 =
+    std::unique_ptr<LayerImpl> child2 =
         LayerImpl::Create(host_impl().active_tree(), 3);
-    scoped_ptr<LayerImpl> grand_child1 =
+    std::unique_ptr<LayerImpl> grand_child1 =
         LayerImpl::Create(host_impl().active_tree(), 4);
 
     position = gfx::PointF(10.f, 10.f);
@@ -1428,7 +1443,7 @@
 }
 
 TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSingleLayer) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -1504,7 +1519,7 @@
 
 TEST_F(LayerTreeImplTest,
        HitCheckingTouchHandlerRegionsForUninvertibleTransform) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform uninvertible_transform;
@@ -1583,7 +1598,7 @@
 
 TEST_F(LayerTreeImplTest,
        HitCheckingTouchHandlerRegionsForSinglePositionedLayer) {
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), 12345);
 
   gfx::Transform identity_matrix;
@@ -1651,7 +1666,8 @@
   // The layer's device_scale_factor and page_scale_factor should scale the
   // content rect and we should be able to hit the touch handler region by
   // scaling the points accordingly.
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
 
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
@@ -1663,7 +1679,7 @@
     Region touch_handler_region(gfx::Rect(10, 10, 30, 30));
     gfx::PointF position(25.f, 25.f);
     gfx::Size bounds(50, 50);
-    scoped_ptr<LayerImpl> test_layer =
+    std::unique_ptr<LayerImpl> test_layer =
         LayerImpl::Create(host_impl().active_tree(), 12345);
     SetLayerPropertiesForTesting(test_layer.get(), identity_matrix,
                                  transform_origin, position, bounds, true,
@@ -1800,12 +1816,13 @@
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, transform_origin,
                                gfx::PointF(), gfx::Size(100, 100), true, false,
                                true);
   {
-    scoped_ptr<LayerImpl> clipping_layer =
+    std::unique_ptr<LayerImpl> clipping_layer =
         LayerImpl::Create(host_impl().active_tree(), 123);
     // this layer is positioned, and hit testing should correctly know where the
     // layer is located.
@@ -1816,7 +1833,7 @@
                                  false, false);
     clipping_layer->SetMasksToBounds(true);
 
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), 456);
     Region touch_handler_region(gfx::Rect(10, 10, 50, 50));
     position = gfx::PointF(-50.f, -50.f);
@@ -1882,12 +1899,13 @@
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
 
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   SetLayerPropertiesForTesting(root.get(), identity_matrix, transform_origin,
                                gfx::PointF(), gfx::Size(100, 100), true, false,
                                true);
   {
-    scoped_ptr<LayerImpl> touch_layer =
+    std::unique_ptr<LayerImpl> touch_layer =
         LayerImpl::Create(host_impl().active_tree(), 123);
     // this layer is positioned, and hit testing should correctly know where the
     // layer is located.
@@ -1902,7 +1920,7 @@
   }
 
   {
-    scoped_ptr<LayerImpl> notouch_layer =
+    std::unique_ptr<LayerImpl> notouch_layer =
         LayerImpl::Create(host_impl().active_tree(), 1234);
     // this layer is positioned, and hit testing should correctly know where the
     // layer is located.
@@ -1960,7 +1978,8 @@
 }
 
 TEST_F(LayerTreeImplTest, HitTestingTouchHandlerRegionsForLayerThatIsNotDrawn) {
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
 
   gfx::Transform identity_matrix;
   gfx::Point3F transform_origin;
@@ -1972,7 +1991,7 @@
     Region touch_handler_region(gfx::Rect(10, 10, 30, 30));
     gfx::PointF position;
     gfx::Size bounds(50, 50);
-    scoped_ptr<LayerImpl> test_layer =
+    std::unique_ptr<LayerImpl> test_layer =
         LayerImpl::Create(host_impl().active_tree(), 12345);
     SetLayerPropertiesForTesting(test_layer.get(), identity_matrix,
                                  transform_origin, position, bounds, true,
@@ -2041,7 +2060,7 @@
 
 TEST_F(LayerTreeImplTest, SelectionBoundsForSingleLayer) {
   int root_layer_id = 12345;
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), root_layer_id);
 
   gfx::Transform identity_matrix;
@@ -2120,7 +2139,7 @@
   int root_layer_id = 12345;
   int clip_layer_id = 1234;
   int clipped_layer_id = 123;
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), root_layer_id);
   root->SetDrawsContent(true);
 
@@ -2133,7 +2152,7 @@
 
   gfx::Vector2dF clipping_offset(10, 10);
   {
-    scoped_ptr<LayerImpl> clipping_layer =
+    std::unique_ptr<LayerImpl> clipping_layer =
         LayerImpl::Create(host_impl().active_tree(), clip_layer_id);
     // The clipping layer should occlude the right selection bound.
     gfx::PointF position = gfx::PointF() + clipping_offset;
@@ -2143,7 +2162,7 @@
                                  false, false);
     clipping_layer->SetMasksToBounds(true);
 
-    scoped_ptr<LayerImpl> clipped_layer =
+    std::unique_ptr<LayerImpl> clipped_layer =
         LayerImpl::Create(host_impl().active_tree(), clipped_layer_id);
     position = gfx::PointF();
     bounds = gfx::Size(100, 100);
@@ -2218,7 +2237,7 @@
 TEST_F(LayerTreeImplTest, SelectionBoundsForScaledLayers) {
   int root_layer_id = 1;
   int sub_layer_id = 2;
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), root_layer_id);
   root->SetDrawsContent(true);
 
@@ -2231,7 +2250,7 @@
 
   gfx::Vector2dF sub_layer_offset(10, 0);
   {
-    scoped_ptr<LayerImpl> sub_layer =
+    std::unique_ptr<LayerImpl> sub_layer =
         LayerImpl::Create(host_impl().active_tree(), sub_layer_id);
     gfx::PointF position = gfx::PointF() + sub_layer_offset;
     gfx::Size bounds(50, 50);
@@ -2304,7 +2323,7 @@
   int child_id = 2;
   int grand_child_id = 3;
 
-  scoped_ptr<LayerImpl> root =
+  std::unique_ptr<LayerImpl> root =
       LayerImpl::Create(host_impl().active_tree(), root_id);
   gfx::Size bounds(100, 100);
   gfx::Transform identity_matrix;
@@ -2319,12 +2338,12 @@
   large_transform.RotateAboutYAxis(30);
 
   {
-    scoped_ptr<LayerImpl> child =
+    std::unique_ptr<LayerImpl> child =
         LayerImpl::Create(host_impl().active_tree(), child_id);
     SetLayerPropertiesForTesting(child.get(), large_transform, transform_origin,
                                  position, bounds, true, false, false);
 
-    scoped_ptr<LayerImpl> grand_child =
+    std::unique_ptr<LayerImpl> grand_child =
         LayerImpl::Create(host_impl().active_tree(), grand_child_id);
     SetLayerPropertiesForTesting(grand_child.get(), large_transform,
                                  transform_origin, position, bounds, true,
@@ -2364,13 +2383,15 @@
 
 TEST_F(LayerTreeImplTest, NumLayersTestOne) {
   EXPECT_EQ(0u, host_impl().active_tree()->NumLayers());
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   EXPECT_EQ(1u, host_impl().active_tree()->NumLayers());
 }
 
 TEST_F(LayerTreeImplTest, NumLayersSmallTree) {
   EXPECT_EQ(0u, host_impl().active_tree()->NumLayers());
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
   root->AddChild(LayerImpl::Create(host_impl().active_tree(), 2));
   root->AddChild(LayerImpl::Create(host_impl().active_tree(), 3));
   root->child_at(1)->AddChild(LayerImpl::Create(host_impl().active_tree(), 4));
@@ -2388,10 +2409,11 @@
 TEST_F(LayerTreeImplTest, HitTestingCorrectLayerWheelListener) {
   host_impl().active_tree()->set_event_listener_properties(
       EventListenerClass::kMouseWheel, EventListenerProperties::kBlocking);
-  scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
-  scoped_ptr<LayerImpl> left_child =
+  std::unique_ptr<LayerImpl> root =
+      LayerImpl::Create(host_impl().active_tree(), 1);
+  std::unique_ptr<LayerImpl> left_child =
       LayerImpl::Create(host_impl().active_tree(), 2);
-  scoped_ptr<LayerImpl> right_child =
+  std::unique_ptr<LayerImpl> right_child =
       LayerImpl::Create(host_impl().active_tree(), 3);
 
   gfx::Point3F transform_origin;
diff --git a/cc/trees/occlusion_tracker_perftest.cc b/cc/trees/occlusion_tracker_perftest.cc
index ccaa75ae..d6fe6c3 100644
--- a/cc/trees/occlusion_tracker_perftest.cc
+++ b/cc/trees/occlusion_tracker_perftest.cc
@@ -46,7 +46,7 @@
     host_impl_->SetVisible(true);
     host_impl_->InitializeRenderer(output_surface_.get());
 
-    scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1);
+    std::unique_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1);
     root_layer->SetForceRenderSurface(true);
     active_tree()->SetRootLayer(std::move(root_layer));
   }
@@ -73,8 +73,8 @@
   FakeRenderingStatsInstrumentation stats_;
   TestSharedBitmapManager shared_bitmap_manager_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<OutputSurface> output_surface_;
-  scoped_ptr<LayerTreeHostImpl> host_impl_;
+  std::unique_ptr<OutputSurface> output_surface_;
+  std::unique_ptr<LayerTreeHostImpl> host_impl_;
 };
 
 TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_FullyOccluded) {
@@ -86,7 +86,7 @@
   CreateHost();
   host_impl_->SetViewportSize(viewport_rect.size());
 
-  scoped_ptr<SolidColorLayerImpl> opaque_layer =
+  std::unique_ptr<SolidColorLayerImpl> opaque_layer =
       SolidColorLayerImpl::Create(active_tree(), 2);
   opaque_layer->SetBackgroundColor(SK_ColorRED);
   opaque_layer->SetContentsOpaque(true);
@@ -154,7 +154,7 @@
   host_impl_->SetViewportSize(viewport_rect.size());
 
   for (int i = 0; i < kNumOpaqueLayers; ++i) {
-    scoped_ptr<SolidColorLayerImpl> opaque_layer =
+    std::unique_ptr<SolidColorLayerImpl> opaque_layer =
         SolidColorLayerImpl::Create(active_tree(), 2 + i);
     opaque_layer->SetBackgroundColor(SK_ColorRED);
     opaque_layer->SetContentsOpaque(true);
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index e32134e..35c29f7d 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -101,7 +101,8 @@
                                    const gfx::Size& bounds) {
     LayerTreeImpl* tree = host_->host_impl()->active_tree();
     int id = next_layer_impl_id_++;
-    scoped_ptr<TestContentLayerImpl> layer(new TestContentLayerImpl(tree, id));
+    std::unique_ptr<TestContentLayerImpl> layer(
+        new TestContentLayerImpl(tree, id));
     TestContentLayerImpl* layer_ptr = layer.get();
     SetProperties(layer_ptr, transform, position, bounds);
 
@@ -119,7 +120,7 @@
                          const gfx::Size& bounds) {
     LayerTreeImpl* tree = host_->host_impl()->active_tree();
     int id = next_layer_impl_id_++;
-    scoped_ptr<LayerImpl> layer = LayerImpl::Create(tree, id);
+    std::unique_ptr<LayerImpl> layer = LayerImpl::Create(tree, id);
     LayerImpl* layer_ptr = layer.get();
     SetProperties(layer_ptr, transform, position, bounds);
     parent->AddChild(std::move(layer));
@@ -142,7 +143,8 @@
                                            bool opaque) {
     LayerTreeImpl* tree = host_->host_impl()->active_tree();
     int id = next_layer_impl_id_++;
-    scoped_ptr<TestContentLayerImpl> layer(new TestContentLayerImpl(tree, id));
+    std::unique_ptr<TestContentLayerImpl> layer(
+        new TestContentLayerImpl(tree, id));
     TestContentLayerImpl* layer_ptr = layer.get();
     SetProperties(layer_ptr, transform, position, bounds);
 
@@ -166,7 +168,8 @@
                                 const gfx::Size& bounds) {
     LayerTreeImpl* tree = host_->host_impl()->active_tree();
     int id = next_layer_impl_id_++;
-    scoped_ptr<TestContentLayerImpl> layer(new TestContentLayerImpl(tree, id));
+    std::unique_ptr<TestContentLayerImpl> layer(
+        new TestContentLayerImpl(tree, id));
     TestContentLayerImpl* layer_ptr = layer.get();
     SetProperties(layer_ptr, transform, position, bounds);
     SetReplica(owning_layer, std::move(layer));
@@ -176,7 +179,8 @@
   LayerImpl* CreateMaskLayer(LayerImpl* owning_layer, const gfx::Size& bounds) {
     LayerTreeImpl* tree = host_->host_impl()->active_tree();
     int id = next_layer_impl_id_++;
-    scoped_ptr<TestContentLayerImpl> layer(new TestContentLayerImpl(tree, id));
+    std::unique_ptr<TestContentLayerImpl> layer(
+        new TestContentLayerImpl(tree, id));
     TestContentLayerImpl* layer_ptr = layer.get();
     SetProperties(layer_ptr, identity_matrix, gfx::PointF(), bounds);
     SetMask(owning_layer, std::move(layer));
@@ -202,7 +206,7 @@
     ResetLayerIterator();
   }
 
-  void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
+  void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
 
   void AddCopyRequest(Layer* layer) {
     layer->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest(
@@ -211,7 +215,7 @@
   }
 
   void AddCopyRequest(LayerImpl* layer) {
-    std::vector<scoped_ptr<CopyOutputRequest>> requests;
+    std::vector<std::unique_ptr<CopyOutputRequest>> requests;
     requests.push_back(CopyOutputRequest::CreateBitmapRequest(base::Bind(
         &OcclusionTrackerTest::CopyOutputCallback, base::Unretained(this))));
     layer->PassCopyRequests(&requests);
@@ -297,20 +301,20 @@
     layer->SetBounds(bounds);
   }
 
-  void SetReplica(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) {
+  void SetReplica(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) {
     // We need to set parent on replica layer for property tree building.
     layer->SetParent(owning_layer);
     owning_layer->SetReplicaLayer(std::move(layer));
   }
 
-  void SetMask(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) {
+  void SetMask(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) {
     owning_layer->SetMaskLayer(std::move(layer));
   }
 
   bool opaque_layers_;
   FakeLayerTreeHostClient client_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> host_;
+  std::unique_ptr<FakeLayerTreeHost> host_;
   // These hold ownership of the layers for the duration of the test.
   LayerImplList render_surface_layer_list_impl_;
   LayerIterator layer_iterator_begin_;
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index 27144aa..5c39d70 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -5,11 +5,11 @@
 #ifndef CC_TREES_PROXY_H_
 #define CC_TREES_PROXY_H_
 
+#include <memory>
 #include <string>
 
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
 #include "base/values.h"
@@ -69,7 +69,7 @@
 
   // Must be called before using the proxy.
   virtual void Start(
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) = 0;
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) = 0;
   virtual void Stop() = 0;   // Must be called before deleting the proxy.
 
   virtual bool SupportsImplScrolling() const = 0;
diff --git a/cc/trees/proxy_common.h b/cc/trees/proxy_common.h
index 046f105..2516ecd 100644
--- a/cc/trees/proxy_common.h
+++ b/cc/trees/proxy_common.h
@@ -25,7 +25,7 @@
 
   unsigned int begin_frame_id;
   BeginFrameArgs begin_frame_args;
-  scoped_ptr<ScrollAndScaleSet> scroll_info;
+  std::unique_ptr<ScrollAndScaleSet> scroll_info;
   size_t memory_allocation_limit_bytes;
   bool evicted_ui_resources;
 
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index a994e85..de9052e 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/auto_reset.h"
+#include "base/memory/ptr_util.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "base/trace_event/trace_event_synthetic_delay.h"
@@ -34,20 +35,21 @@
 
 }  // namespace
 
-scoped_ptr<ProxyImpl> ProxyImpl::Create(
+std::unique_ptr<ProxyImpl> ProxyImpl::Create(
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
-  return make_scoped_ptr(new ProxyImpl(channel_impl, layer_tree_host,
-                                       task_runner_provider,
-                                       std::move(external_begin_frame_source)));
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
+  return base::WrapUnique(
+      new ProxyImpl(channel_impl, layer_tree_host, task_runner_provider,
+                    std::move(external_begin_frame_source)));
 }
 
-ProxyImpl::ProxyImpl(ChannelImpl* channel_impl,
-                     LayerTreeHost* layer_tree_host,
-                     TaskRunnerProvider* task_runner_provider,
-                     scoped_ptr<BeginFrameSource> external_begin_frame_source)
+ProxyImpl::ProxyImpl(
+    ChannelImpl* channel_impl,
+    LayerTreeHost* layer_tree_host,
+    TaskRunnerProvider* task_runner_provider,
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source)
     : layer_tree_host_id_(layer_tree_host->id()),
       next_commit_waits_for_activation_(false),
       commit_completion_event_(nullptr),
@@ -73,7 +75,7 @@
   SchedulerSettings scheduler_settings(
       layer_tree_host->settings().ToSchedulerSettings());
 
-  scoped_ptr<CompositorTimingHistory> compositor_timing_history(
+  std::unique_ptr<CompositorTimingHistory> compositor_timing_history(
       new CompositorTimingHistory(
           scheduler_settings.using_synchronous_renderer_compositor,
           CompositorTimingHistory::RENDERER_UMA,
@@ -375,7 +377,7 @@
 }
 
 void ProxyImpl::PostAnimationEventsToMainThreadOnImplThread(
-    scoped_ptr<AnimationEvents> events) {
+    std::unique_ptr<AnimationEvents> events) {
   TRACE_EVENT0("cc", "ProxyImpl::PostAnimationEventsToMainThreadOnImplThread");
   DCHECK(IsImplThread());
   channel_impl_->SetAnimationEvents(std::move(events));
@@ -473,8 +475,8 @@
 }
 
 void ProxyImpl::PostFrameTimingEventsOnImplThread(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   DCHECK(IsImplThread());
   channel_impl_->PostFrameTimingEventsOnMain(std::move(composite_events),
                                              std::move(main_frame_events));
@@ -504,7 +506,7 @@
   unsigned int begin_frame_id = nextBeginFrameId++;
   benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task(
       benchmark_instrumentation::kSendBeginFrame, begin_frame_id);
-  scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state(
+  std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state(
       new BeginMainFrameAndCommitState);
   begin_main_frame_state->begin_frame_id = begin_frame_id;
   begin_main_frame_state->begin_frame_args = args;
diff --git a/cc/trees/proxy_impl.h b/cc/trees/proxy_impl.h
index a335d8a..5aa4655 100644
--- a/cc/trees/proxy_impl.h
+++ b/cc/trees/proxy_impl.h
@@ -5,8 +5,9 @@
 #ifndef CC_TREES_PROXY_IMPL_H_
 #define CC_TREES_PROXY_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/completion_event.h"
 #include "cc/base/delayed_unique_notifier.h"
 #include "cc/input/top_controls_state.h"
@@ -22,11 +23,11 @@
 class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
                             public NON_EXPORTED_BASE(SchedulerClient) {
  public:
-  static scoped_ptr<ProxyImpl> Create(
+  static std::unique_ptr<ProxyImpl> Create(
       ChannelImpl* channel_impl,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
   ~ProxyImpl() override;
 
@@ -60,7 +61,7 @@
   ProxyImpl(ChannelImpl* channel_impl,
             LayerTreeHost* layer_tree_host,
             TaskRunnerProvider* task_runner_provider,
-            scoped_ptr<BeginFrameSource> external_begin_frame_source);
+            std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
  private:
   // The members of this struct should be accessed on the impl thread only when
@@ -94,7 +95,7 @@
   void SetNeedsCommitOnImplThread() override;
   void SetVideoNeedsBeginFrames(bool needs_begin_frames) override;
   void PostAnimationEventsToMainThreadOnImplThread(
-      scoped_ptr<AnimationEvents> events) override;
+      std::unique_ptr<AnimationEvents> events) override;
   bool IsInsideDraw() override;
   void RenewTreePriority() override;
   void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
@@ -106,8 +107,8 @@
   void OnDrawForOutputSurface(bool resourceless_software_draw) override;
   // This should only be called by LayerTreeHostImpl::PostFrameTimingEvents.
   void PostFrameTimingEventsOnImplThread(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override;
 
   // SchedulerClient implementation
@@ -131,7 +132,7 @@
 
   const int layer_tree_host_id_;
 
-  scoped_ptr<Scheduler> scheduler_;
+  std::unique_ptr<Scheduler> scheduler_;
 
   // Set when the main thread is waiting on a pending tree activation.
   bool next_commit_waits_for_activation_;
@@ -151,9 +152,9 @@
 
   DelayedUniqueNotifier smoothness_priority_expiration_notifier_;
 
-  scoped_ptr<BeginFrameSource> external_begin_frame_source_;
-  scoped_ptr<BeginFrameSource> unthrottled_begin_frame_source_;
-  scoped_ptr<SyntheticBeginFrameSource> synthetic_begin_frame_source_;
+  std::unique_ptr<BeginFrameSource> external_begin_frame_source_;
+  std::unique_ptr<BeginFrameSource> unthrottled_begin_frame_source_;
+  std::unique_ptr<SyntheticBeginFrameSource> synthetic_begin_frame_source_;
 
   RenderingStatsInstrumentation* rendering_stats_instrumentation_;
 
@@ -161,7 +162,7 @@
   BeginFrameArgs last_begin_main_frame_args_;
   BeginFrameArgs last_processed_begin_main_frame_args_;
 
-  scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
+  std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
 
   ChannelImpl* channel_impl_;
 
diff --git a/cc/trees/proxy_impl_unittest.cc b/cc/trees/proxy_impl_unittest.cc
index 1be6acd..9ff15f13 100644
--- a/cc/trees/proxy_impl_unittest.cc
+++ b/cc/trees/proxy_impl_unittest.cc
@@ -45,8 +45,8 @@
   FakeLayerTreeHostClient host_client_;
   FakeChannelImpl channel_impl_;
   TaskRunnerProvider* task_runner_provider_;
-  scoped_ptr<ProxyImplForTest> proxy_impl_;
-  scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+  std::unique_ptr<ProxyImplForTest> proxy_impl_;
+  std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
 };
 
 // This is a regression test. See crbug/568120.
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index c5821f3..3a98ff59 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -23,21 +23,21 @@
 
 namespace cc {
 
-scoped_ptr<ProxyMain> ProxyMain::CreateThreaded(
+std::unique_ptr<ProxyMain> ProxyMain::CreateThreaded(
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider) {
-  scoped_ptr<ProxyMain> proxy_main(
+  std::unique_ptr<ProxyMain> proxy_main(
       new ProxyMain(layer_tree_host, task_runner_provider));
   proxy_main->SetChannel(
       ThreadedChannel::Create(proxy_main.get(), task_runner_provider));
   return proxy_main;
 }
 
-scoped_ptr<ProxyMain> ProxyMain::CreateRemote(
+std::unique_ptr<ProxyMain> ProxyMain::CreateRemote(
     RemoteProtoChannel* remote_proto_channel,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider) {
-  scoped_ptr<ProxyMain> proxy_main(
+  std::unique_ptr<ProxyMain> proxy_main(
       new ProxyMain(layer_tree_host, task_runner_provider));
   proxy_main->SetChannel(RemoteChannelMain::Create(
       remote_proto_channel, proxy_main.get(), task_runner_provider));
@@ -66,7 +66,7 @@
   DCHECK(!started_);
 }
 
-void ProxyMain::SetChannel(scoped_ptr<ChannelMain> channel_main) {
+void ProxyMain::SetChannel(std::unique_ptr<ChannelMain> channel_main) {
   DCHECK(!channel_main_);
   channel_main_ = std::move(channel_main);
 }
@@ -93,7 +93,7 @@
   layer_tree_host_->DidCommitAndDrawFrame();
 }
 
-void ProxyMain::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
+void ProxyMain::SetAnimationEvents(std::unique_ptr<AnimationEvents> events) {
   TRACE_EVENT0("cc", "ProxyMain::SetAnimationEvents");
   DCHECK(IsMainThread());
   layer_tree_host_->SetAnimationEvents(std::move(events));
@@ -130,15 +130,15 @@
 }
 
 void ProxyMain::PostFrameTimingEventsOnMain(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   DCHECK(IsMainThread());
   layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events),
                                             std::move(main_frame_events));
 }
 
 void ProxyMain::BeginMainFrame(
-    scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
+    std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
   benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task(
       benchmark_instrumentation::kDoBeginFrame,
       begin_main_frame_state->begin_frame_id);
@@ -382,7 +382,7 @@
 }
 
 void ProxyMain::Start(
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DCHECK(IsMainThread());
   DCHECK(layer_tree_host_->IsThreaded() || layer_tree_host_->IsRemoteServer());
   DCHECK(channel_main_);
diff --git a/cc/trees/proxy_main.h b/cc/trees/proxy_main.h
index 1b627dd..29a71132 100644
--- a/cc/trees/proxy_main.h
+++ b/cc/trees/proxy_main.h
@@ -28,11 +28,11 @@
 // The class is created and lives on the main thread.
 class CC_EXPORT ProxyMain : public Proxy {
  public:
-  static scoped_ptr<ProxyMain> CreateThreaded(
+  static std::unique_ptr<ProxyMain> CreateThreaded(
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider);
 
-  static scoped_ptr<ProxyMain> CreateRemote(
+  static std::unique_ptr<ProxyMain> CreateRemote(
       RemoteProtoChannel* remote_proto_channel,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider);
@@ -55,7 +55,7 @@
       const RendererCapabilities& capabilities);
   virtual void BeginMainFrameNotExpectedSoon();
   virtual void DidCommitAndDrawFrame();
-  virtual void SetAnimationEvents(scoped_ptr<AnimationEvents> events);
+  virtual void SetAnimationEvents(std::unique_ptr<AnimationEvents> events);
   virtual void DidLoseOutputSurface();
   virtual void RequestNewOutputSurface();
   virtual void DidInitializeOutputSurface(
@@ -63,10 +63,11 @@
       const RendererCapabilities& capabilities);
   virtual void DidCompletePageScaleAnimation();
   virtual void PostFrameTimingEventsOnMain(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events);
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events);
   virtual void BeginMainFrame(
-      scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state);
+      std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state);
 
   ChannelMain* channel_main() const { return channel_main_.get(); }
   CommitPipelineStage max_requested_pipeline_stage() const {
@@ -103,7 +104,8 @@
   bool CommitRequested() const override;
   bool BeginMainFrameRequested() const override;
   void MainThreadHasStoppedFlinging() override;
-  void Start(scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+  void Start(
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
   void Stop() override;
   bool SupportsImplScrolling() const override;
   bool MainFrameWillHappenForTesting() override;
@@ -116,7 +118,7 @@
   void SetOutputIsSecure(bool output_is_secure) override;
 
   // This sets the channel used by ProxyMain to communicate with ProxyImpl.
-  void SetChannel(scoped_ptr<ChannelMain> channel_main);
+  void SetChannel(std::unique_ptr<ChannelMain> channel_main);
 
   // Returns |true| if the request was actually sent, |false| if one was
   // already outstanding.
@@ -150,7 +152,7 @@
 
   RendererCapabilities renderer_capabilities_;
 
-  scoped_ptr<ChannelMain> channel_main_;
+  std::unique_ptr<ChannelMain> channel_main_;
 
   DISALLOW_COPY_AND_ASSIGN(ProxyMain);
 };
diff --git a/cc/trees/remote_channel_impl.cc b/cc/trees/remote_channel_impl.cc
index 58fdca78..e5e97628 100644
--- a/cc/trees/remote_channel_impl.cc
+++ b/cc/trees/remote_channel_impl.cc
@@ -5,6 +5,7 @@
 #include "cc/trees/remote_channel_impl.h"
 
 #include "base/bind_helpers.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "cc/animation/animation_events.h"
 #include "cc/proto/compositor_message.pb.h"
@@ -16,11 +17,11 @@
 
 namespace cc {
 
-scoped_ptr<RemoteChannelImpl> RemoteChannelImpl::Create(
+std::unique_ptr<RemoteChannelImpl> RemoteChannelImpl::Create(
     LayerTreeHost* layer_tree_host,
     RemoteProtoChannel* remote_proto_channel,
     TaskRunnerProvider* task_runner_provider) {
-  return make_scoped_ptr(new RemoteChannelImpl(
+  return base::WrapUnique(new RemoteChannelImpl(
       layer_tree_host, remote_proto_channel, task_runner_provider));
 }
 
@@ -43,11 +44,11 @@
   main().remote_proto_channel->SetProtoReceiver(nullptr);
 }
 
-scoped_ptr<ProxyImpl> RemoteChannelImpl::CreateProxyImpl(
+std::unique_ptr<ProxyImpl> RemoteChannelImpl::CreateProxyImpl(
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DCHECK(task_runner_provider_->IsImplThread());
   DCHECK(!external_begin_frame_source);
   return ProxyImpl::Create(channel_impl, layer_tree_host, task_runner_provider,
@@ -55,7 +56,7 @@
 }
 
 void RemoteChannelImpl::OnProtoReceived(
-    scoped_ptr<proto::CompositorMessage> proto) {
+    std::unique_ptr<proto::CompositorMessage> proto) {
   DCHECK(task_runner_provider_->IsMainThread());
   DCHECK(main().started);
   DCHECK(proto->has_to_impl());
@@ -253,7 +254,7 @@
 }
 
 void RemoteChannelImpl::Start(
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DCHECK(task_runner_provider_->IsMainThread());
   DCHECK(!main().started);
   DCHECK(!external_begin_frame_source);
@@ -343,7 +344,8 @@
 
 void RemoteChannelImpl::DidCommitAndDrawFrame() {}
 
-void RemoteChannelImpl::SetAnimationEvents(scoped_ptr<AnimationEvents> queue) {}
+void RemoteChannelImpl::SetAnimationEvents(
+    std::unique_ptr<AnimationEvents> queue) {}
 
 void RemoteChannelImpl::DidLoseOutputSurface() {
   DCHECK(task_runner_provider_->IsImplThread());
@@ -375,12 +377,13 @@
 void RemoteChannelImpl::DidCompletePageScaleAnimation() {}
 
 void RemoteChannelImpl::PostFrameTimingEventsOnMain(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {}
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+}
 
 void RemoteChannelImpl::BeginMainFrame(
-    scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
-  scoped_ptr<proto::CompositorMessage> proto;
+    std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
+  std::unique_ptr<proto::CompositorMessage> proto;
   proto.reset(new proto::CompositorMessage);
   proto::CompositorMessageToMain* to_main_proto = proto->mutable_to_main();
 
@@ -395,7 +398,7 @@
 }
 
 void RemoteChannelImpl::SendMessageProto(
-    scoped_ptr<proto::CompositorMessage> proto) {
+    std::unique_ptr<proto::CompositorMessage> proto) {
   DCHECK(task_runner_provider_->IsImplThread());
 
   MainThreadTaskRunner()->PostTask(
@@ -447,7 +450,7 @@
 }
 
 void RemoteChannelImpl::SendMessageProtoOnMain(
-    scoped_ptr<proto::CompositorMessage> proto) {
+    std::unique_ptr<proto::CompositorMessage> proto) {
   DCHECK(task_runner_provider_->IsMainThread());
   VLOG(1) << "Sending BeginMainFrame request to the engine.";
 
@@ -470,7 +473,7 @@
 
   impl().proxy_impl =
       CreateProxyImpl(this, layer_tree_host, task_runner_provider_, nullptr);
-  impl().proxy_impl_weak_factory = make_scoped_ptr(
+  impl().proxy_impl_weak_factory = base::WrapUnique(
       new base::WeakPtrFactory<ProxyImpl>(impl().proxy_impl.get()));
   proxy_impl_weak_ptr_ = impl().proxy_impl_weak_factory->GetWeakPtr();
   completion->Signal();
diff --git a/cc/trees/remote_channel_impl.h b/cc/trees/remote_channel_impl.h
index acd44aa..122e790b 100644
--- a/cc/trees/remote_channel_impl.h
+++ b/cc/trees/remote_channel_impl.h
@@ -78,7 +78,7 @@
                                     public RemoteProtoChannel::ProtoReceiver,
                                     public Proxy {
  public:
-  static scoped_ptr<RemoteChannelImpl> Create(
+  static std::unique_ptr<RemoteChannelImpl> Create(
       LayerTreeHost* layer_tree_host,
       RemoteProtoChannel* remote_proto_channel,
       TaskRunnerProvider* task_runner_provider);
@@ -91,11 +91,11 @@
                     TaskRunnerProvider* task_runner_provider);
 
   // virtual for testing.
-  virtual scoped_ptr<ProxyImpl> CreateProxyImpl(
+  virtual std::unique_ptr<ProxyImpl> CreateProxyImpl(
       ChannelImpl* channel_impl,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
  private:
   struct MainThreadOnly {
@@ -123,8 +123,8 @@
   };
 
   struct CompositorThreadOnly {
-    scoped_ptr<ProxyImpl> proxy_impl;
-    scoped_ptr<base::WeakPtrFactory<ProxyImpl>> proxy_impl_weak_factory;
+    std::unique_ptr<ProxyImpl> proxy_impl;
+    std::unique_ptr<base::WeakPtrFactory<ProxyImpl>> proxy_impl_weak_factory;
     base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr;
 
     CompositorThreadOnly(
@@ -134,7 +134,8 @@
 
   // called on main thread.
   // RemoteProtoChannel::ProtoReceiver implementation.
-  void OnProtoReceived(scoped_ptr<proto::CompositorMessage> proto) override;
+  void OnProtoReceived(
+      std::unique_ptr<proto::CompositorMessage> proto) override;
 
   // Proxy implementation
   void FinishAllRendering() override;
@@ -154,7 +155,8 @@
   void MainThreadHasStoppedFlinging() override;
   bool CommitRequested() const override;
   bool BeginMainFrameRequested() const override;
-  void Start(scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+  void Start(
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
   void Stop() override;
   bool SupportsImplScrolling() const override;
   void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override;
@@ -172,7 +174,7 @@
       const RendererCapabilities& capabilities) override;
   void BeginMainFrameNotExpectedSoon() override;
   void DidCommitAndDrawFrame() override;
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> queue) override;
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> queue) override;
   void DidLoseOutputSurface() override;
   void RequestNewOutputSurface() override;
   void DidInitializeOutputSurface(
@@ -180,13 +182,13 @@
       const RendererCapabilities& capabilities) override;
   void DidCompletePageScaleAnimation() override;
   void PostFrameTimingEventsOnMain(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override;
-  void BeginMainFrame(
-      scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override;
+  void BeginMainFrame(std::unique_ptr<BeginMainFrameAndCommitState>
+                          begin_main_frame_state) override;
 
-  void SendMessageProto(scoped_ptr<proto::CompositorMessage> proto);
+  void SendMessageProto(std::unique_ptr<proto::CompositorMessage> proto);
 
   // called on main thread.
   void HandleProto(const proto::CompositorMessageToImpl& proto);
@@ -195,7 +197,7 @@
   void DidInitializeOutputSurfaceOnMain(
       bool success,
       const RendererCapabilities& capabilities);
-  void SendMessageProtoOnMain(scoped_ptr<proto::CompositorMessage> proto);
+  void SendMessageProtoOnMain(std::unique_ptr<proto::CompositorMessage> proto);
   void PostSetNeedsRedrawToImpl(const gfx::Rect& damaged_rect);
 
   void InitializeImplOnImpl(CompletionEvent* completion,
diff --git a/cc/trees/remote_channel_main.cc b/cc/trees/remote_channel_main.cc
index a5e9483..0156928 100644
--- a/cc/trees/remote_channel_main.cc
+++ b/cc/trees/remote_channel_main.cc
@@ -4,7 +4,9 @@
 
 #include "cc/trees/remote_channel_main.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "cc/proto/base_conversions.h"
 #include "cc/proto/compositor_message.pb.h"
 #include "cc/proto/compositor_message_to_impl.pb.h"
@@ -15,12 +17,12 @@
 
 namespace cc {
 
-scoped_ptr<RemoteChannelMain> RemoteChannelMain::Create(
+std::unique_ptr<RemoteChannelMain> RemoteChannelMain::Create(
     RemoteProtoChannel* remote_proto_channel,
     ProxyMain* proxy_main,
     TaskRunnerProvider* task_runner_provider) {
-  return make_scoped_ptr(new RemoteChannelMain(remote_proto_channel, proxy_main,
-                                               task_runner_provider));
+  return base::WrapUnique(new RemoteChannelMain(
+      remote_proto_channel, proxy_main, task_runner_provider));
 }
 
 RemoteChannelMain::RemoteChannelMain(RemoteProtoChannel* remote_proto_channel,
@@ -46,7 +48,7 @@
 }
 
 void RemoteChannelMain::OnProtoReceived(
-    scoped_ptr<proto::CompositorMessage> proto) {
+    std::unique_ptr<proto::CompositorMessage> proto) {
   DCHECK(task_runner_provider_->IsMainThread());
   DCHECK(proto->has_to_main());
 
@@ -191,7 +193,7 @@
 
 void RemoteChannelMain::SynchronouslyInitializeImpl(
     LayerTreeHost* layer_tree_host,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DCHECK(!initialized_);
 
   proto::CompositorMessage proto;
@@ -237,7 +239,7 @@
       VLOG(1) << "Received BeginMainFrame request from client.";
       const proto::BeginMainFrame& begin_main_frame_message =
           proto.begin_main_frame_message();
-      scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state;
+      std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state;
       begin_main_frame_state.reset(new BeginMainFrameAndCommitState);
       begin_main_frame_state->FromProtobuf(
           begin_main_frame_message.begin_main_frame_state());
diff --git a/cc/trees/remote_channel_main.h b/cc/trees/remote_channel_main.h
index 7b2b9c7..1848f5c 100644
--- a/cc/trees/remote_channel_main.h
+++ b/cc/trees/remote_channel_main.h
@@ -22,7 +22,7 @@
 class CC_EXPORT RemoteChannelMain : public ChannelMain,
                                     public RemoteProtoChannel::ProtoReceiver {
  public:
-  static scoped_ptr<RemoteChannelMain> Create(
+  static std::unique_ptr<RemoteChannelMain> Create(
       RemoteProtoChannel* remote_proto_channel,
       ProxyMain* proxy_main,
       TaskRunnerProvider* task_runner_provider);
@@ -54,11 +54,12 @@
                          bool hold_commit_for_activation) override;
   void SynchronouslyInitializeImpl(
       LayerTreeHost* layer_tree_host,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
   void SynchronouslyCloseImpl() override;
 
   // RemoteProtoChannel::ProtoReceiver implementation
-  void OnProtoReceived(scoped_ptr<proto::CompositorMessage> proto) override;
+  void OnProtoReceived(
+      std::unique_ptr<proto::CompositorMessage> proto) override;
 
  protected:
   RemoteChannelMain(RemoteProtoChannel* remote_proto_channel,
diff --git a/cc/trees/remote_proto_channel.h b/cc/trees/remote_proto_channel.h
index 76141a9..8f7ad09 100644
--- a/cc/trees/remote_proto_channel.h
+++ b/cc/trees/remote_proto_channel.h
@@ -5,7 +5,8 @@
 #ifndef CC_TREES_REMOTE_PROTO_CHANNEL_H_
 #define CC_TREES_REMOTE_PROTO_CHANNEL_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "cc/base/cc_export.h"
 
 namespace cc {
@@ -25,7 +26,7 @@
     // TODO(khushalsagar): This should probably include a closure that returns
     // the status of processing this proto. See crbug/576974
     virtual void OnProtoReceived(
-        scoped_ptr<proto::CompositorMessage> proto) = 0;
+        std::unique_ptr<proto::CompositorMessage> proto) = 0;
 
    protected:
     virtual ~ProtoReceiver() {}
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 32fc307..8194f38 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -5,6 +5,7 @@
 #include "cc/trees/single_thread_proxy.h"
 
 #include "base/auto_reset.h"
+#include "base/memory/ptr_util.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/animation/animation_events.h"
@@ -24,11 +25,11 @@
 
 namespace cc {
 
-scoped_ptr<Proxy> SingleThreadProxy::Create(
+std::unique_ptr<Proxy> SingleThreadProxy::Create(
     LayerTreeHost* layer_tree_host,
     LayerTreeHostSingleThreadClient* client,
     TaskRunnerProvider* task_runner_provider) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new SingleThreadProxy(layer_tree_host, client, task_runner_provider));
 }
 
@@ -56,7 +57,7 @@
 }
 
 void SingleThreadProxy::Start(
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DebugScopedSetImplThread impl(task_runner_provider_);
   external_begin_frame_source_ = std::move(external_begin_frame_source);
 
@@ -66,7 +67,7 @@
         layer_tree_host_->settings().ToSchedulerSettings());
     scheduler_settings.commit_to_active_tree = CommitToActiveTree();
 
-    scoped_ptr<CompositorTimingHistory> compositor_timing_history(
+    std::unique_ptr<CompositorTimingHistory> compositor_timing_history(
         new CompositorTimingHistory(
             scheduler_settings.using_synchronous_renderer_compositor,
             CompositorTimingHistory::BROWSER_UMA,
@@ -250,7 +251,7 @@
 #if DCHECK_IS_ON()
     // In the single-threaded case, the scale and scroll deltas should never be
     // touched on the impl layer tree.
-    scoped_ptr<ScrollAndScaleSet> scroll_info =
+    std::unique_ptr<ScrollAndScaleSet> scroll_info =
         layer_tree_host_impl_->ProcessScrollDeltas();
     DCHECK(!scroll_info->scrolls.size());
     DCHECK_EQ(1.f, scroll_info->page_scale_delta);
@@ -423,7 +424,7 @@
 }
 
 void SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread(
-    scoped_ptr<AnimationEvents> events) {
+    std::unique_ptr<AnimationEvents> events) {
   TRACE_EVENT0(
       "cc", "SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread");
   DCHECK(task_runner_provider_->IsImplThread());
@@ -516,8 +517,8 @@
 }
 
 void SingleThreadProxy::PostFrameTimingEventsOnImplThread(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events),
                                             std::move(main_frame_events));
 }
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index b5477f2..e3ee4f1 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -29,9 +29,10 @@
                                     NON_EXPORTED_BASE(LayerTreeHostImplClient),
                                     SchedulerClient {
  public:
-  static scoped_ptr<Proxy> Create(LayerTreeHost* layer_tree_host,
-                                  LayerTreeHostSingleThreadClient* client,
-                                  TaskRunnerProvider* task_runner_provider_);
+  static std::unique_ptr<Proxy> Create(
+      LayerTreeHost* layer_tree_host,
+      LayerTreeHostSingleThreadClient* client,
+      TaskRunnerProvider* task_runner_provider_);
   ~SingleThreadProxy() override;
 
   // Proxy implementation
@@ -52,7 +53,8 @@
   bool CommitRequested() const override;
   bool BeginMainFrameRequested() const override;
   void MainThreadHasStoppedFlinging() override {}
-  void Start(scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+  void Start(
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
   void Stop() override;
   bool SupportsImplScrolling() const override;
   bool MainFrameWillHappenForTesting() override;
@@ -95,7 +97,7 @@
   void SetNeedsCommitOnImplThread() override;
   void SetVideoNeedsBeginFrames(bool needs_begin_frames) override;
   void PostAnimationEventsToMainThreadOnImplThread(
-      scoped_ptr<AnimationEvents> events) override;
+      std::unique_ptr<AnimationEvents> events) override;
   bool IsInsideDraw() override;
   void RenewTreePriority() override {}
   void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
@@ -106,8 +108,8 @@
   void DidCompletePageScaleAnimationOnImplThread() override;
   void OnDrawForOutputSurface(bool resourceless_software_draw) override;
   void PostFrameTimingEventsOnImplThread(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override;
 
   void RequestNewOutputSurface();
@@ -141,19 +143,20 @@
 
   // Used on the Thread, but checked on main thread during
   // initialization/shutdown.
-  scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
+  std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
   RendererCapabilities renderer_capabilities_for_main_thread_;
 
   // Accessed from both threads.
-  scoped_ptr<BeginFrameSource> external_begin_frame_source_;
-  scoped_ptr<BeginFrameSource> unthrottled_begin_frame_source_;
-  scoped_ptr<SyntheticBeginFrameSource> synthetic_begin_frame_source_;
-  scoped_ptr<Scheduler> scheduler_on_impl_thread_;
+  std::unique_ptr<BeginFrameSource> external_begin_frame_source_;
+  std::unique_ptr<BeginFrameSource> unthrottled_begin_frame_source_;
+  std::unique_ptr<SyntheticBeginFrameSource> synthetic_begin_frame_source_;
+  std::unique_ptr<Scheduler> scheduler_on_impl_thread_;
 
   base::TimeDelta authoritative_vsync_interval_;
   base::TimeTicks last_vsync_timebase_;
 
-  scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_;
+  std::unique_ptr<BlockingTaskRunner::CapturePostTasks>
+      commit_blocking_task_runner_;
   bool next_frame_is_newly_committed_frame_;
 
 #if DCHECK_IS_ON()
diff --git a/cc/trees/task_runner_provider.h b/cc/trees/task_runner_provider.h
index cab850e5..12fa51dd 100644
--- a/cc/trees/task_runner_provider.h
+++ b/cc/trees/task_runner_provider.h
@@ -5,12 +5,13 @@
 #ifndef CC_TREES_TASK_RUNNER_PROVIDER_H_
 #define CC_TREES_TASK_RUNNER_PROVIDER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
@@ -31,10 +32,10 @@
 // Useful for assertion checks.
 class CC_EXPORT TaskRunnerProvider {
  public:
-  static scoped_ptr<TaskRunnerProvider> Create(
+  static std::unique_ptr<TaskRunnerProvider> Create(
       scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new TaskRunnerProvider(main_task_runner, impl_task_runner));
   }
 
@@ -69,7 +70,7 @@
  private:
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
-  scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
+  std::unique_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
 
 #if DCHECK_IS_ON()
   const base::PlatformThreadId main_thread_id_;
diff --git a/cc/trees/threaded_channel.cc b/cc/trees/threaded_channel.cc
index 7d1d728..eacfabb 100644
--- a/cc/trees/threaded_channel.cc
+++ b/cc/trees/threaded_channel.cc
@@ -5,6 +5,7 @@
 #include "cc/trees/threaded_channel.h"
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/animation/animation_events.h"
@@ -12,10 +13,11 @@
 
 namespace cc {
 
-scoped_ptr<ThreadedChannel> ThreadedChannel::Create(
+std::unique_ptr<ThreadedChannel> ThreadedChannel::Create(
     ProxyMain* proxy_main,
     TaskRunnerProvider* task_runner_provider) {
-  return make_scoped_ptr(new ThreadedChannel(proxy_main, task_runner_provider));
+  return base::WrapUnique(
+      new ThreadedChannel(proxy_main, task_runner_provider));
 }
 
 ThreadedChannel::ThreadedChannel(ProxyMain* proxy_main,
@@ -141,7 +143,7 @@
 
 void ThreadedChannel::SynchronouslyInitializeImpl(
     LayerTreeHost* layer_tree_host,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   TRACE_EVENT0("cc", "ThreadChannel::SynchronouslyInitializeImpl");
   DCHECK(IsMainThread());
   {
@@ -214,7 +216,8 @@
                                               impl().proxy_main_weak_ptr));
 }
 
-void ThreadedChannel::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
+void ThreadedChannel::SetAnimationEvents(
+    std::unique_ptr<AnimationEvents> events) {
   DCHECK(IsImplThread());
   MainThreadTaskRunner()->PostTask(
       FROM_HERE, base::Bind(&ProxyMain::SetAnimationEvents,
@@ -252,8 +255,8 @@
 }
 
 void ThreadedChannel::PostFrameTimingEventsOnMain(
-    scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+    std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
   DCHECK(IsImplThread());
   MainThreadTaskRunner()->PostTask(
       FROM_HERE, base::Bind(&ProxyMain::PostFrameTimingEventsOnMain,
@@ -263,7 +266,7 @@
 }
 
 void ThreadedChannel::BeginMainFrame(
-    scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
+    std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
   DCHECK(IsImplThread());
   MainThreadTaskRunner()->PostTask(
       FROM_HERE,
@@ -271,11 +274,11 @@
                  base::Passed(&begin_main_frame_state)));
 }
 
-scoped_ptr<ProxyImpl> ThreadedChannel::CreateProxyImpl(
+std::unique_ptr<ProxyImpl> ThreadedChannel::CreateProxyImpl(
     ChannelImpl* channel_impl,
     LayerTreeHost* layer_tree_host,
     TaskRunnerProvider* task_runner_provider,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DCHECK(IsImplThread());
   return ProxyImpl::Create(channel_impl, layer_tree_host, task_runner_provider,
                            std::move(external_begin_frame_source));
@@ -284,12 +287,12 @@
 void ThreadedChannel::InitializeImplOnImpl(
     CompletionEvent* completion,
     LayerTreeHost* layer_tree_host,
-    scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+    std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
   DCHECK(IsImplThread());
   impl().proxy_impl =
       CreateProxyImpl(this, layer_tree_host, task_runner_provider_,
                       std::move(external_begin_frame_source));
-  impl().proxy_impl_weak_factory = make_scoped_ptr(
+  impl().proxy_impl_weak_factory = base::WrapUnique(
       new base::WeakPtrFactory<ProxyImpl>(impl().proxy_impl.get()));
   proxy_impl_weak_ptr_ = impl().proxy_impl_weak_factory->GetWeakPtr();
   completion->Signal();
diff --git a/cc/trees/threaded_channel.h b/cc/trees/threaded_channel.h
index 2a669d4..46b7d5f4 100644
--- a/cc/trees/threaded_channel.h
+++ b/cc/trees/threaded_channel.h
@@ -5,9 +5,10 @@
 #ifndef CC_TREES_THREADED_CHANNEL_H_
 #define CC_TREES_THREADED_CHANNEL_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/trees/channel_impl.h"
@@ -76,7 +77,7 @@
 
 class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
  public:
-  static scoped_ptr<ThreadedChannel> Create(
+  static std::unique_ptr<ThreadedChannel> Create(
       ProxyMain* proxy_main,
       TaskRunnerProvider* task_runner_provider);
 
@@ -109,7 +110,7 @@
                          bool hold_commit_for_activation) override;
   void SynchronouslyInitializeImpl(
       LayerTreeHost* layer_tree_host,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
   void SynchronouslyCloseImpl() override;
 
   // ChannelImpl Implementation
@@ -118,7 +119,7 @@
       const RendererCapabilities& capabilities) override;
   void BeginMainFrameNotExpectedSoon() override;
   void DidCommitAndDrawFrame() override;
-  void SetAnimationEvents(scoped_ptr<AnimationEvents> events) override;
+  void SetAnimationEvents(std::unique_ptr<AnimationEvents> events) override;
   void DidLoseOutputSurface() override;
   void RequestNewOutputSurface() override;
   void DidInitializeOutputSurface(
@@ -126,22 +127,22 @@
       const RendererCapabilities& capabilities) override;
   void DidCompletePageScaleAnimation() override;
   void PostFrameTimingEventsOnMain(
-      scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+      std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+      std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
       override;
-  void BeginMainFrame(
-      scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override;
+  void BeginMainFrame(std::unique_ptr<BeginMainFrameAndCommitState>
+                          begin_main_frame_state) override;
 
  protected:
   ThreadedChannel(ProxyMain* proxy_main,
                   TaskRunnerProvider* task_runner_provider);
 
   // Virtual for testing.
-  virtual scoped_ptr<ProxyImpl> CreateProxyImpl(
+  virtual std::unique_ptr<ProxyImpl> CreateProxyImpl(
       ChannelImpl* channel_impl,
       LayerTreeHost* layer_tree_host,
       TaskRunnerProvider* task_runner_provider,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
 
  private:
   // The members of this struct should be accessed on the main thread only.
@@ -158,15 +159,15 @@
     explicit CompositorThreadOnly(base::WeakPtr<ProxyMain> proxy_main_weak_ptr);
     ~CompositorThreadOnly();
 
-    scoped_ptr<ProxyImpl> proxy_impl;
+    std::unique_ptr<ProxyImpl> proxy_impl;
 
-    // We use a scoped_ptr for the weak ptr factory here since the factory is
+    // We use a unique_ptr for the weak ptr factory here since the factory is
     // created after ProxyImpl is created in InitializeImplOnImpl. Since the
     // weak ptrs are needed only by the ThreadedChannel to safely post tasks on
     // ProxyImpl to be run on the impl thread, we avoid creating it in ProxyImpl
     // and ensure that it is destroyed before ProxyImpl during the impl-thread
     // tear down in CloseImplOnImpl.
-    scoped_ptr<base::WeakPtrFactory<ProxyImpl>> proxy_impl_weak_factory;
+    std::unique_ptr<base::WeakPtrFactory<ProxyImpl>> proxy_impl_weak_factory;
 
     // Used on the impl thread to queue calls to ProxyMain to be run on the main
     // thread. Since the weak pointer is invalidated after the impl-thread tear
@@ -180,7 +181,7 @@
   void InitializeImplOnImpl(
       CompletionEvent* completion,
       LayerTreeHost* layer_tree_host,
-      scoped_ptr<BeginFrameSource> external_begin_frame_source);
+      std::unique_ptr<BeginFrameSource> external_begin_frame_source);
   void CloseImplOnImpl(CompletionEvent* completion);
 
   bool IsInitialized() const;
diff --git a/cc/trees/threaded_channel_unittest.cc b/cc/trees/threaded_channel_unittest.cc
index 81d28de..08d532aa 100644
--- a/cc/trees/threaded_channel_unittest.cc
+++ b/cc/trees/threaded_channel_unittest.cc
@@ -5,6 +5,7 @@
 #include "cc/trees/threaded_channel.h"
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "cc/animation/animation_events.h"
 #include "cc/test/layer_tree_test.h"
 #include "cc/trees/single_thread_proxy.h"
@@ -243,7 +244,8 @@
   void BeginChannelTest() override { PostOnImplThread(); }
 
   void StartTestOnImplThread() override {
-    scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
+    std::unique_ptr<AnimationEvents> events(
+        base::WrapUnique(new AnimationEvents));
     GetProxyImplForTest()->PostAnimationEventsToMainThreadOnImplThread(
         std::move(events));
   }
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index c7e42ea..1bd19bf5 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -23,7 +23,7 @@
   DCHECK(tree_impl);
 
   TRACE_EVENT0("cc", "TreeSynchronizer::SynchronizeTrees");
-  scoped_ptr<OwnedLayerImplList> old_layers(tree_impl->DetachLayers());
+  std::unique_ptr<OwnedLayerImplList> old_layers(tree_impl->DetachLayers());
 
   OwnedLayerImplMap old_layer_map;
   for (auto& it : *old_layers)
@@ -57,26 +57,26 @@
 }
 
 template <typename LayerType>
-scoped_ptr<LayerImpl> ReuseOrCreateLayerImpl(OwnedLayerImplMap* old_layers,
-                                             LayerType* layer,
-                                             LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> ReuseOrCreateLayerImpl(OwnedLayerImplMap* old_layers,
+                                                  LayerType* layer,
+                                                  LayerTreeImpl* tree_impl) {
   if (!layer)
     return nullptr;
-  scoped_ptr<LayerImpl> layer_impl = std::move((*old_layers)[layer->id()]);
+  std::unique_ptr<LayerImpl> layer_impl = std::move((*old_layers)[layer->id()]);
   if (!layer_impl)
     layer_impl = layer->CreateLayerImpl(tree_impl);
   return layer_impl;
 }
 
 template <typename LayerType>
-scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
+std::unique_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
     OwnedLayerImplMap* old_layers,
     LayerType* layer,
     LayerTreeImpl* tree_impl) {
   if (!layer)
     return nullptr;
 
-  scoped_ptr<LayerImpl> layer_impl(
+  std::unique_ptr<LayerImpl> layer_impl(
       ReuseOrCreateLayerImpl(old_layers, layer, tree_impl));
 
   layer_impl->children().clear();
@@ -85,7 +85,7 @@
         old_layers, layer->child_at(i), tree_impl));
   }
 
-  scoped_ptr<LayerImpl> mask_layer = SynchronizeTreesRecursiveInternal(
+  std::unique_ptr<LayerImpl> mask_layer = SynchronizeTreesRecursiveInternal(
       old_layers, layer->mask_layer(), tree_impl);
   if (layer_impl->mask_layer() && mask_layer &&
       layer_impl->mask_layer() == mask_layer.get()) {
@@ -96,7 +96,7 @@
     layer_impl->SetMaskLayer(std::move(mask_layer));
   }
 
-  scoped_ptr<LayerImpl> replica_layer = SynchronizeTreesRecursiveInternal(
+  std::unique_ptr<LayerImpl> replica_layer = SynchronizeTreesRecursiveInternal(
       old_layers, layer->replica_layer(), tree_impl);
   if (layer_impl->replica_layer() && replica_layer &&
       layer_impl->replica_layer() == replica_layer.get()) {
diff --git a/cc/trees/tree_synchronizer.h b/cc/trees/tree_synchronizer.h
index 260bd7b4..be2e743 100644
--- a/cc/trees/tree_synchronizer.h
+++ b/cc/trees/tree_synchronizer.h
@@ -5,8 +5,9 @@
 #ifndef CC_TREES_TREE_SYNCHRONIZER_H_
 #define CC_TREES_TREE_SYNCHRONIZER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc
index f625cca..4f21270 100644
--- a/cc/trees/tree_synchronizer_unittest.cc
+++ b/cc/trees/tree_synchronizer_unittest.cc
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "base/format_macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "cc/animation/layer_animation_controller.h"
 #include "cc/layers/layer.h"
@@ -31,9 +32,9 @@
 
 class MockLayerImpl : public LayerImpl {
  public:
-  static scoped_ptr<MockLayerImpl> Create(LayerTreeImpl* tree_impl,
-                                          int layer_id) {
-    return make_scoped_ptr(new MockLayerImpl(tree_impl, layer_id));
+  static std::unique_ptr<MockLayerImpl> Create(LayerTreeImpl* tree_impl,
+                                               int layer_id) {
+    return base::WrapUnique(new MockLayerImpl(tree_impl, layer_id));
   }
   ~MockLayerImpl() override {
     if (layer_impl_destruction_list_)
@@ -58,7 +59,8 @@
     return make_scoped_refptr(new MockLayer(layer_impl_destruction_list));
   }
 
-  scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override {
+  std::unique_ptr<LayerImpl> CreateLayerImpl(
+      LayerTreeImpl* tree_impl) override {
     return MockLayerImpl::Create(tree_impl, layer_id_);
   }
 
@@ -172,7 +174,7 @@
  protected:
   FakeLayerTreeHostClient client_;
   TestTaskGraphRunner task_graph_runner_;
-  scoped_ptr<FakeLayerTreeHost> host_;
+  std::unique_ptr<FakeLayerTreeHost> host_;
 
   bool is_equal(ScrollTree::ScrollOffsetMap map,
                 ScrollTree::ScrollOffsetMap other) {
@@ -536,7 +538,7 @@
   FakeLayerTreeHostImplClient impl_client;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
+  std::unique_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
       settings, &impl_client, &task_runner_provider, &stats_instrumentation,
       &shared_bitmap_manager, nullptr, &task_graph_runner, 0);
 
@@ -597,7 +599,7 @@
   FakeLayerTreeHostImplClient impl_client;
   TestSharedBitmapManager shared_bitmap_manager;
   TestTaskGraphRunner task_graph_runner;
-  scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
+  std::unique_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
       settings, &impl_client, &task_runner_provider, &stats_instrumentation,
       &shared_bitmap_manager, nullptr, &task_graph_runner, 0);
 
@@ -773,7 +775,7 @@
                               gfx::ScrollOffset(20, 30));
 
   // Pull ScrollOffset delta for main thread, and change offset on main thread
-  scoped_ptr<ScrollAndScaleSet> scroll_info(new ScrollAndScaleSet());
+  std::unique_ptr<ScrollAndScaleSet> scroll_info(new ScrollAndScaleSet());
   scroll_tree.CollectScrollDeltas(scroll_info.get());
   host_->proxy()->SetNeedsCommit();
   host_->ApplyScrollAndScale(scroll_info.get());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
index af46032..81df71c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
@@ -63,7 +63,6 @@
 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations;
 import org.chromium.chrome.browser.physicalweb.PhysicalWebBleClient;
 import org.chromium.chrome.browser.policy.PolicyAuditor;
-import org.chromium.chrome.browser.preferences.AccessibilityPreferences;
 import org.chromium.chrome.browser.preferences.LocationSettings;
 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 import org.chromium.chrome.browser.preferences.Preferences;
@@ -118,7 +117,6 @@
             "com.google.android.apps.chrome.ChromeMobileApplication.BOOT_TIMESTAMP";
     private static final long BOOT_TIMESTAMP_MARGIN_MS = 1000;
     private static final String PREF_LOCALE = "locale";
-    private static final float FLOAT_EPSILON = 0.001f;
     private static final String DEV_TOOLS_SERVER_SOCKET_PREFIX = "chrome";
     private static final String SESSIONS_UUID_PREF_KEY = "chromium.sync.sessions.id";
 
@@ -268,7 +266,7 @@
         ChildProcessLauncher.onBroughtToForeground();
         mBackgroundProcessing.startTimers();
         updatePasswordEchoState();
-        updateFontSize();
+        FontSizePrefs.getInstance(this).onSystemFontScaleChanged();
         updateAcceptLanguages();
         mVariationsSession.start(getApplicationContext());
         mPowerBroadcastReceiver.onForegroundSessionStart();
@@ -774,41 +772,6 @@
     }
 
     /**
-     * Update the font size after changing the Android accessibility system setting.  Doing so kills
-     * the Activities but it doesn't kill the ChromeApplication, so this should be called in
-     * {@link #onStart} instead of {@link #initialize}.
-     */
-    private void updateFontSize() {
-        // This method is currently broken. http://crbug.com/439108
-        // Skip it (with the consequence of not updating the text scaling factor when the user
-        // changes system font size) rather than incurring the broken behavior.
-        // TODO(newt): fix this.
-        if (true) return;
-
-        FontSizePrefs fontSizePrefs = FontSizePrefs.getInstance(getApplicationContext());
-
-        // Set font scale factor as the product of the system and browser scale settings.
-        float browserTextScale = PreferenceManager
-                .getDefaultSharedPreferences(this)
-                .getFloat(AccessibilityPreferences.PREF_TEXT_SCALE, 1.0f);
-        float fontScale = getResources().getConfiguration().fontScale * browserTextScale;
-
-        float scaleDelta = Math.abs(fontScale - fontSizePrefs.getFontScaleFactor());
-        if (scaleDelta >= FLOAT_EPSILON) {
-            fontSizePrefs.setFontScaleFactor(fontScale);
-        }
-
-        // If force enable zoom has not been manually set, set it automatically based on
-        // font scale factor.
-        boolean shouldForceZoom =
-                fontScale >= AccessibilityPreferences.FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER;
-        if (!fontSizePrefs.getUserSetForceEnableZoom()
-                && fontSizePrefs.getForceEnableZoom() != shouldForceZoom) {
-            fontSizePrefs.setForceEnableZoom(shouldForceZoom);
-        }
-    }
-
-    /**
      * Update the accept languages after changing Android locale setting. Doing so kills the
      * Activities but it doesn't kill the ChromeApplication, so this should be called in
      * {@link #onStart} instead of {@link #initialize}.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
index 3dd097a..1f67786 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
@@ -14,10 +14,12 @@
 import org.chromium.base.ThreadUtils;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.annotations.SuppressFBWarnings;
+import org.chromium.base.library_loader.LibraryLoader;
 import org.chromium.base.library_loader.ProcessInitException;
 import org.chromium.chrome.browser.init.ChromeBrowserInitializer;
 import org.chromium.chrome.browser.ntp.snippets.SnippetsBridge;
 import org.chromium.chrome.browser.ntp.snippets.SnippetsLauncher;
+import org.chromium.chrome.browser.offlinepages.OfflinePageUtils;
 import org.chromium.chrome.browser.precache.PrecacheController;
 
 /**
@@ -41,6 +43,10 @@
                         handleBackgroundSyncEvent(context);
                         break;
 
+                    case OfflinePageUtils.TASK_TAG:
+                        handleOfflinePageBackgroundLoad(context);
+                        break;
+
                     case SnippetsLauncher.TASK_TAG_WIFI_CHARGING:
                     case SnippetsLauncher.TASK_TAG_WIFI:
                     case SnippetsLauncher.TASK_TAG_FALLBACK:
@@ -102,6 +108,14 @@
         PrecacheController.get(context).precache(tag);
     }
 
+    private void handleOfflinePageBackgroundLoad(Context context) {
+        // Gather UMA data to measure how often the user's machine is amenable to background
+        // loading when we wake to do a task.
+        if (LibraryLoader.isInitialized()) {
+            OfflinePageUtils.recordWakeupUMA(context);
+        }
+    }
+
     @VisibleForTesting
     @SuppressFBWarnings("DM_EXIT")
     protected void launchBrowser(Context context) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
index 2905511..6c8c6fb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
@@ -119,12 +119,7 @@
         }
 
         // Start or stop Physical Web
-        if (PhysicalWeb.shouldStartOnLaunch(application)) {
-            PhysicalWeb.startPhysicalWeb(application);
-            PhysicalWeb.uploadDeferredMetrics(application);
-        } else {
-            PhysicalWeb.stopPhysicalWeb(application);
-        }
+        PhysicalWeb.onChromeStart(application);
 
         mDeferredStartupComplete = true;
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java
index 48a229a..2ed12ea 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java
@@ -6,93 +6,62 @@
 
 import android.content.Context;
 import android.content.SharedPreferences;
-import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.preference.PreferenceManager;
 
+import org.chromium.base.ObserverList;
 import org.chromium.base.ThreadUtils;
+import org.chromium.base.VisibleForTesting;
 import org.chromium.base.annotations.CalledByNative;
-import org.chromium.base.annotations.NativeCall;
-
-import java.util.HashMap;
-import java.util.Map;
+import org.chromium.chrome.browser.util.MathUtils;
 
 /**
- * Singleton wrapper class for native FontSizePrefs. Provides support for preferences for Font
- * Scale Factor, Force Enable Zoom, and User Set Force Enable Zoom. User Set Force Enable Zoom
- * tracks whether the user  has manually set the force enable zoom button, while Force Enable Zoom
- * tracks whether force enable zoom is on or off. Font Scale Factor reflects the global font scale.
+ * Singleton class for accessing these font size-related preferences:
+ *  - User Font Scale Factor: the font scale value that the user sees and can set. This is a value
+ *        between 50% and 200% (i.e. 0.5 and 2).
+ *  - Font Scale Factor: the font scale factor applied to webpage text during font boosting. This
+ *        equals the user font scale factor times the Android system font scale factor, which
+ *        reflects the font size indicated in Android settings > Display > Font size.
+ *  - Force Enable Zoom: whether force enable zoom is on or off
+ *  - User Set Force Enable Zoom: whether the user has manually set the force enable zoom button
  */
-public class FontSizePrefs implements OnSharedPreferenceChangeListener {
-    public static final String PREF_FORCE_ENABLE_ZOOM = "force_enable_zoom";
-    public static final String PREF_TEXT_SCALE = "text_scale";
-    public static final String PREF_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
+public class FontSizePrefs {
+    /**
+     * The font scale threshold beyond which force enable zoom is automatically turned on. It
+     * is chosen such that force enable zoom will be activated when the accessibility large text
+     * setting is on (i.e. this value should be the same as or lesser than the font size scale used
+     * by accessiblity large text).
+     */
+    public static final float FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER = 1.3f;
+
+    static final String PREF_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
+    static final String PREF_USER_FONT_SCALE_FACTOR = "user_font_scale_factor";
 
     private static FontSizePrefs sFontSizePrefs;
+
     private final long mFontSizePrefsAndroidPtr;
+    private final Context mApplicationContext;
     private final SharedPreferences mSharedPreferences;
-    private final Map<Observer, FontSizePrefsObserverWrapper> mObserverMap;
+    private final ObserverList<FontSizePrefsObserver> mObserverList;
+
+    private Float mSystemFontScaleForTests = null;
 
     /**
-     * Observer interface for observing changes in FontScaleFactor, ForceEnableZoom and
-     * UserSetForceEnableZoom.
+     * Interface for observing changes in font size-related preferences.
      */
-    public interface Observer {
-        void onChangeFontSize(float newFontSize);
-        void onChangeForceEnableZoom(boolean enabled);
-        void onChangeUserSetForceEnableZoom(boolean enabled);
-    }
-
-    /**
-     * Wrapper for FontSizePrefsObserverAndroid.
-     */
-    private static class FontSizePrefsObserverWrapper {
-        private final Observer mFontSizePrefsObserver;
-        private final long mNativeFontSizePrefsObserverWrapperPtr;
-
-        public FontSizePrefsObserverWrapper(Observer observer) {
-            mNativeFontSizePrefsObserverWrapperPtr = nativeInitObserverAndroid();
-            mFontSizePrefsObserver = observer;
-        }
-
-        public long getNativePtr() {
-            return mNativeFontSizePrefsObserverWrapperPtr;
-        }
-
-        public void destroy() {
-            nativeDestroyObserverAndroid(mNativeFontSizePrefsObserverWrapperPtr);
-        }
-
-        @CalledByNative("FontSizePrefsObserverWrapper")
-        public void onChangeFontSize(float newFontSize) {
-            mFontSizePrefsObserver.onChangeFontSize(newFontSize);
-        }
-
-        @CalledByNative("FontSizePrefsObserverWrapper")
-        public void onChangeForceEnableZoom(boolean enabled) {
-            mFontSizePrefsObserver.onChangeForceEnableZoom(enabled);
-        }
-
-        public void onChangeUserSetForceEnableZoom(boolean enabled) {
-            mFontSizePrefsObserver.onChangeUserSetForceEnableZoom(enabled);
-        }
-
-        @NativeCall("FontSizePrefsObserverWrapper")
-        private native long nativeInitObserverAndroid();
-
-        @NativeCall("FontSizePrefsObserverWrapper")
-        private native void nativeDestroyObserverAndroid(long nativeFontSizePrefsObserverAndroid);
+    public interface FontSizePrefsObserver {
+        void onFontScaleFactorChanged(float fontScaleFactor, float userFontScaleFactor);
+        void onForceEnableZoomChanged(boolean enabled);
     }
 
     private FontSizePrefs(Context context) {
-        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
-        mSharedPreferences.registerOnSharedPreferenceChangeListener(this);
         mFontSizePrefsAndroidPtr = nativeInit();
-        mObserverMap = new HashMap<Observer, FontSizePrefsObserverWrapper>();
+        mApplicationContext = context.getApplicationContext();
+        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
+        mObserverList = new ObserverList<FontSizePrefsObserver>();
     }
 
     /**
-     * Returns the FontSizePrefs corresponding to the inputted Profile. If no FontSizePrefs existed,
-     * this method will create one.
+     * Returns the singleton FontSizePrefs, constructing it if it doesn't already exist.
      */
     public static FontSizePrefs getInstance(Context context) {
         ThreadUtils.assertOnUiThread();
@@ -103,86 +72,144 @@
     }
 
     /**
-     * Adds the observer to listen for Font Scale and Force Enable Zoom preferences.
-     * @return true if the observerMap was changed as a result of the call.
+     * Adds an observer to listen for changes to font scale-related preferences.
      */
-    public boolean addObserver(Observer obs) {
-        if (mObserverMap.containsKey(obs)) return false;
-        FontSizePrefsObserverWrapper wrappedObserver =
-                new FontSizePrefsObserverWrapper(obs);
-        nativeAddObserver(mFontSizePrefsAndroidPtr, wrappedObserver.getNativePtr());
-        mObserverMap.put(obs, wrappedObserver);
-        return true;
+    public void addObserver(FontSizePrefsObserver observer) {
+        mObserverList.addObserver(observer);
     }
 
     /**
-     * Removes the observer and unregisters it from Font Scale and Force Enable Zoom changes.
-     * @return true if an observer was removed as a result of the call.
+     * Removes an observer so it will no longer receive updates for changes to font scale-related
+     * preferences.
      */
-    public boolean removeObserver(Observer obs) {
-        FontSizePrefsObserverWrapper wrappedObserver = mObserverMap.remove(obs);
-        if (wrappedObserver == null) return false;
-        nativeRemoveObserver(mFontSizePrefsAndroidPtr, wrappedObserver.getNativePtr());
-        wrappedObserver.destroy();
-        return true;
+    public void removeObserver(FontSizePrefsObserver observer) {
+        mObserverList.removeObserver(observer);
     }
 
     /**
-     * Sets UserSetForceEnableZoom. This is the only one of three preferences stored through
-     * SharedPreferences.
+     * Updates the fontScaleFactor based on the userFontScaleFactor and the system-wide font scale.
+     *
+     * This should be called during application start-up and whenever the system font size changes.
      */
-    public void setUserSetForceEnableZoom(boolean enabled) {
-        SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
-        sharedPreferencesEditor.putBoolean(PREF_USER_SET_FORCE_ENABLE_ZOOM, enabled);
-        sharedPreferencesEditor.apply();
-    }
-
-    /**
-     * Returns true if user has manually set ForceEnableZoom and false otherwise.
-     */
-    public boolean getUserSetForceEnableZoom() {
-        return mSharedPreferences.getBoolean(PREF_USER_SET_FORCE_ENABLE_ZOOM,
-                false);
-    }
-
-    public void setFontScaleFactor(float fontScaleFactor) {
-        nativeSetFontScaleFactor(mFontSizePrefsAndroidPtr, fontScaleFactor);
-    }
-
-    @Override
-    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
-        if (PREF_USER_SET_FORCE_ENABLE_ZOOM.equals(key)) {
-            for (FontSizePrefsObserverWrapper obsWrapper : mObserverMap.values()) {
-                obsWrapper.onChangeUserSetForceEnableZoom(getUserSetForceEnableZoom());
-            }
+    public void onSystemFontScaleChanged() {
+        float userFontScaleFactor = getUserFontScaleFactor();
+        if (userFontScaleFactor != 0f) {
+            setFontScaleFactor(userFontScaleFactor * getSystemFontScale());
         }
     }
 
+    /**
+     * Sets the userFontScaleFactor. This should be a value between .5 and 2.
+     */
+    public void setUserFontScaleFactor(float userFontScaleFactor) {
+        SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
+        sharedPreferencesEditor.putFloat(PREF_USER_FONT_SCALE_FACTOR, userFontScaleFactor);
+        sharedPreferencesEditor.apply();
+        setFontScaleFactor(userFontScaleFactor * getSystemFontScale());
+    }
+
+    /**
+     * Returns the userFontScaleFactor. This is the value that should be displayed to the user.
+     */
+    public float getUserFontScaleFactor() {
+        float userFontScaleFactor = mSharedPreferences.getFloat(PREF_USER_FONT_SCALE_FACTOR, 0f);
+        if (userFontScaleFactor == 0f) {
+            // Initialize userFontScaleFactor based on fontScaleFactor, since userFontScaleFactor
+            // was added long after fontScaleFactor.
+            userFontScaleFactor = MathUtils.clamp(getFontScaleFactor() / getSystemFontScale(),
+                    0.5f, 2f);
+            SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
+            sharedPreferencesEditor.putFloat(PREF_USER_FONT_SCALE_FACTOR, userFontScaleFactor);
+            sharedPreferencesEditor.apply();
+        }
+        return userFontScaleFactor;
+    }
+
+    /**
+     * Returns the fontScaleFactor. This is the produce of the userFontScaleFactor and the system
+     * fon scale, and is the amount by which webpage text will be scaled during font boosting.
+     */
     public float getFontScaleFactor() {
         return nativeGetFontScaleFactor(mFontSizePrefsAndroidPtr);
     }
 
-    public void setForceEnableZoom(boolean enabled) {
-        nativeSetForceEnableZoom(mFontSizePrefsAndroidPtr, enabled);
+    /**
+     * Sets forceEnableZoom due to a user request (e.g. checking a checkbox). This implicitly sets
+     * userSetForceEnableZoom.
+     */
+    public void setForceEnableZoomFromUser(boolean enabled) {
+        setForceEnableZoom(enabled, true);
     }
 
+    /**
+     * Returns whether forceEnableZoom is enabled.
+     */
     public boolean getForceEnableZoom() {
         return nativeGetForceEnableZoom(mFontSizePrefsAndroidPtr);
     }
 
-    private native void nativeAddObserver(long nativeFontSizePrefsAndroid,
-            long nativeObserverPtr);
+    /**
+     * Sets a mock value for the system-wide font scale. Use only in tests.
+     */
+    @VisibleForTesting
+    void setSystemFontScaleForTest(float fontScale) {
+        mSystemFontScaleForTests = fontScale;
+    }
 
-    private native void nativeRemoveObserver(long nativeFontSizePrefsAndroid,
-            long nativeObserverPtr);
+    private float getSystemFontScale() {
+        if (mSystemFontScaleForTests != null) return mSystemFontScaleForTests;
+        return mApplicationContext.getResources().getConfiguration().fontScale;
+    }
+
+    private void setForceEnableZoom(boolean enabled, boolean fromUser) {
+        SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
+        sharedPreferencesEditor.putBoolean(PREF_USER_SET_FORCE_ENABLE_ZOOM, fromUser);
+        sharedPreferencesEditor.apply();
+        nativeSetForceEnableZoom(mFontSizePrefsAndroidPtr, enabled);
+    }
+
+    private boolean getUserSetForceEnableZoom() {
+        return mSharedPreferences.getBoolean(PREF_USER_SET_FORCE_ENABLE_ZOOM, false);
+    }
+
+    private void setFontScaleFactor(float fontScaleFactor) {
+        float previousFontScaleFactor = getFontScaleFactor();
+        nativeSetFontScaleFactor(mFontSizePrefsAndroidPtr, fontScaleFactor);
+
+        if (previousFontScaleFactor < FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER
+                && fontScaleFactor >= FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER
+                && !getForceEnableZoom()) {
+            // If the font scale factor just crossed above the threshold, set force enable zoom even
+            // if the user has previously unset it.
+            setForceEnableZoom(true, false);
+        } else if (previousFontScaleFactor >= FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER
+                && fontScaleFactor < FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER
+                && !getUserSetForceEnableZoom()) {
+            // If the font scale factor just crossed below the threshold and the user didn't set
+            // force enable zoom manually, then unset force enable zoom.
+            setForceEnableZoom(false, false);
+        }
+    }
+
+    @CalledByNative
+    private void onFontScaleFactorChanged(float fontScaleFactor) {
+        float userFontScaleFactor = getUserFontScaleFactor();
+        for (FontSizePrefsObserver observer : mObserverList) {
+            observer.onFontScaleFactorChanged(fontScaleFactor, userFontScaleFactor);
+        }
+    }
+
+    @CalledByNative
+    private void onForceEnableZoomChanged(boolean enabled) {
+        for (FontSizePrefsObserver observer : mObserverList) {
+            observer.onForceEnableZoomChanged(enabled);
+        }
+    }
 
     private native long nativeInit();
-
-    private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid, float font);
-
+    private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid,
+            float fontScaleFactor);
     private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroid);
-
     private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndroid);
-
     private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid, boolean enabled);
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
index 026a87e..8aea926 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -526,6 +526,16 @@
         getSearchBarControl().animateSearchTermResolution();
     }
 
+    // ============================================================================================
+    // Panel Metrics
+    // ============================================================================================
+
+    // TODO(pedrosimonetti): replace proxy methods with direct PanelMetrics usage
+
+    public ContextualSearchPanelMetrics getPanelMetrics() {
+        return mPanelMetrics;
+    }
+
     /**
      * Sets that the contextual search involved the promo.
      */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java
index 050662a9..2e4759ff 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java
@@ -6,6 +6,7 @@
 
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.PanelState;
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
+import org.chromium.chrome.browser.contextualsearch.ContextualSearchBlacklist.BlacklistReason;
 import org.chromium.chrome.browser.contextualsearch.ContextualSearchUma;
 
 /**
@@ -15,6 +16,7 @@
     private static final int MILLISECONDS_TO_NANOSECONDS = 1000000;
 
     // Flags for logging.
+    private BlacklistReason mBlacklistReason;
     private boolean mDidSearchInvolvePromo;
     private boolean mWasSearchContentViewSeen;
     private boolean mIsPromoActive;
@@ -90,6 +92,8 @@
                         mWasActivatedByTap);
             }
 
+            ContextualSearchUma.logBlacklistSeen(mBlacklistReason, mWasSearchContentViewSeen);
+
             ContextualSearchUma.logIconSpriteAnimated(mWasIconSpriteAnimated,
                     mWasSearchContentViewSeen, mWasActivatedByTap);
         }
@@ -108,6 +112,7 @@
             mContentFirstViewTimeNs = 0;
             mIsSearchPanelFullyPreloaded = false;
             mWasActivatedByTap = reason == StateChangeReason.TEXT_SELECT_TAP;
+            mBlacklistReason = BlacklistReason.NONE;
         }
         if (isFirstSearchView) {
             onSearchPanelFirstView();
@@ -171,6 +176,14 @@
     }
 
     /**
+     * Sets the reason why the current selection was blacklisted.
+     * @param reason The given reason.
+     */
+    public void setBlacklistReason(BlacklistReason reason) {
+        mBlacklistReason = reason;
+    }
+
+    /**
      * Sets that the contextual search involved the promo.
      */
     public void setDidSearchInvolvePromo() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/ContextualSearchLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/ContextualSearchLayout.java
index 75a26d84..918858f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/ContextualSearchLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/ContextualSearchLayout.java
@@ -131,13 +131,13 @@
     public boolean handlesTabCreating() {
         // Prevents the new Tab animation from happening when promoting to a new Tab.
         startHiding(mBaseTab.getId(), false);
-        doneHiding();
         // Updates TopControls' State so the Toolbar becomes visible.
         // TODO(pedrosimonetti): The transition when promoting to a new tab is only smooth
         // if the SearchContentView's vertical scroll position is zero. Otherwise the
         // ContentView will appear to jump in the screen. Coordinate with @dtrainor to solve
         // this problem.
         mPanelManager.getActivePanel().updateTopControlsState(TopControlsState.BOTH, false);
+        doneHiding();
         return true;
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchBlacklist.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchBlacklist.java
new file mode 100644
index 0000000..656ed2b
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchBlacklist.java
@@ -0,0 +1,223 @@
+// 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.
+
+package org.chromium.chrome.browser.contextualsearch;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * Blacklist used to suppress selections.
+ */
+public class ContextualSearchBlacklist {
+
+    /**
+     * Reasons that may cause a selection to be blacklisted.
+     */
+    public enum BlacklistReason {
+        NONE,
+        NUMBER,
+        DETERMINER,
+        PREPOSITION,
+        NAVIGATION,
+        MISC
+    }
+
+    // Number pattern.
+    private static final String DIGITS_PATTERN = "^\\d+$";
+    private static final Pattern mDigitsPattern = Pattern.compile(DIGITS_PATTERN);
+
+    // Blacklist.
+    private static final Map<String, BlacklistReason> BLACKLIST;
+    static {
+        Map<String, BlacklistReason> codes = new HashMap<>();
+
+        codes.put("a", BlacklistReason.DETERMINER);
+        codes.put("el", BlacklistReason.DETERMINER);
+        codes.put("la", BlacklistReason.DETERMINER);
+        codes.put("that", BlacklistReason.DETERMINER);
+        codes.put("the", BlacklistReason.DETERMINER);
+        codes.put("this", BlacklistReason.DETERMINER);
+        codes.put("un", BlacklistReason.DETERMINER);
+        codes.put("your", BlacklistReason.DETERMINER);
+
+        codes.put("by", BlacklistReason.PREPOSITION);
+        codes.put("con", BlacklistReason.PREPOSITION);
+        codes.put("del", BlacklistReason.PREPOSITION);
+        codes.put("en", BlacklistReason.PREPOSITION);
+        codes.put("for", BlacklistReason.PREPOSITION);
+        codes.put("from", BlacklistReason.PREPOSITION);
+        codes.put("in", BlacklistReason.PREPOSITION);
+        codes.put("of", BlacklistReason.PREPOSITION);
+        codes.put("on", BlacklistReason.PREPOSITION);
+        codes.put("para", BlacklistReason.PREPOSITION);
+        codes.put("por", BlacklistReason.PREPOSITION);
+        codes.put("to", BlacklistReason.PREPOSITION);
+        codes.put("with", BlacklistReason.PREPOSITION);
+
+        codes.put("account", BlacklistReason.NAVIGATION);
+        codes.put("com", BlacklistReason.NAVIGATION);
+        codes.put("continuar", BlacklistReason.NAVIGATION);
+        codes.put("continue", BlacklistReason.NAVIGATION);
+        codes.put("download", BlacklistReason.NAVIGATION);
+        codes.put("descargar", BlacklistReason.NAVIGATION);
+        codes.put("facebook", BlacklistReason.NAVIGATION);
+        codes.put("google", BlacklistReason.NAVIGATION);
+        codes.put("here1234567891011", BlacklistReason.NAVIGATION);
+        codes.put("https", BlacklistReason.NAVIGATION);
+        codes.put("lanjutkan", BlacklistReason.NAVIGATION);
+        codes.put("menu", BlacklistReason.NAVIGATION);
+        codes.put("more", BlacklistReason.NAVIGATION);
+        codes.put("next", BlacklistReason.NAVIGATION);
+        codes.put("play", BlacklistReason.NAVIGATION);
+        codes.put("prevnext", BlacklistReason.NAVIGATION);
+        codes.put("search", BlacklistReason.NAVIGATION);
+        codes.put("video", BlacklistReason.NAVIGATION);
+        codes.put("videos", BlacklistReason.NAVIGATION);
+        codes.put("whatsapp", BlacklistReason.NAVIGATION);
+        codes.put("www", BlacklistReason.NAVIGATION);
+        codes.put("youtube", BlacklistReason.NAVIGATION);
+        codes.put("دانلود", BlacklistReason.NAVIGATION);
+
+        codes.put("and", BlacklistReason.MISC);
+        codes.put("android", BlacklistReason.MISC);
+        codes.put("are", BlacklistReason.MISC);
+        codes.put("available", BlacklistReason.MISC);
+        codes.put("de", BlacklistReason.MISC);
+        codes.put("do", BlacklistReason.MISC);
+        codes.put("e", BlacklistReason.MISC);
+        codes.put("have", BlacklistReason.MISC);
+        codes.put("is", BlacklistReason.MISC);
+        codes.put("m", BlacklistReason.MISC);
+        codes.put("mobile", BlacklistReason.MISC);
+        codes.put("no", BlacklistReason.MISC);
+        codes.put("offline", BlacklistReason.MISC);
+        codes.put("online", BlacklistReason.MISC);
+        codes.put("or", BlacklistReason.MISC);
+        codes.put("page", BlacklistReason.MISC);
+        codes.put("que", BlacklistReason.MISC);
+        codes.put("se", BlacklistReason.MISC);
+        codes.put("videollamadas", BlacklistReason.MISC);
+        codes.put("waiting", BlacklistReason.MISC);
+        codes.put("was", BlacklistReason.MISC);
+        codes.put("x", BlacklistReason.MISC);
+        codes.put("y", BlacklistReason.MISC);
+        codes.put("you", BlacklistReason.MISC);
+
+        BLACKLIST = Collections.unmodifiableMap(codes);
+    }
+
+    // Metrics codes.
+    private static final int NONE_SEEN = 0;
+    private static final int NONE_NOT_SEEN = 1;
+    private static final int NUMBER_SEEN = 2;
+    private static final int NUMBER_NOT_SEEN = 3;
+    private static final int DETERMINER_SEEN = 4;
+    private static final int DETERMINER_NOT_SEEN = 5;
+    private static final int PREPOSITION_SEEN = 6;
+    private static final int PREPOSITION_NOT_SEEN = 7;
+    private static final int NAVIGATION_SEEN = 8;
+    private static final int NAVIGATION_NOT_SEEN = 9;
+    private static final int MISC_SEEN = 10;
+    private static final int MISC_NOT_SEEN = 11;
+    public static final int BLACKLIST_BOUNDARY = 12;
+
+    // Blacklist Metrics Code map.
+    // TODO(pedrosimonetti): Design better solution for getting metrics codes and use it elsewhere.
+    private static final Map<BlacklistSeenKey, Integer> BLACKLIST_METRICS_CODE;
+    static {
+        Map<BlacklistSeenKey, Integer> codes = new HashMap<>();
+
+        codes.put(new BlacklistSeenKey(BlacklistReason.NONE, true), NONE_SEEN);
+        codes.put(new BlacklistSeenKey(BlacklistReason.NONE, false), NONE_NOT_SEEN);
+
+        codes.put(new BlacklistSeenKey(BlacklistReason.NUMBER, true), NUMBER_SEEN);
+        codes.put(new BlacklistSeenKey(BlacklistReason.NUMBER, false), NUMBER_NOT_SEEN);
+
+        codes.put(new BlacklistSeenKey(BlacklistReason.DETERMINER, true), DETERMINER_SEEN);
+        codes.put(new BlacklistSeenKey(BlacklistReason.DETERMINER, false), DETERMINER_NOT_SEEN);
+
+        codes.put(new BlacklistSeenKey(BlacklistReason.PREPOSITION, true), PREPOSITION_SEEN);
+        codes.put(new BlacklistSeenKey(BlacklistReason.PREPOSITION, false), PREPOSITION_NOT_SEEN);
+
+        codes.put(new BlacklistSeenKey(BlacklistReason.NAVIGATION, true), NAVIGATION_SEEN);
+        codes.put(new BlacklistSeenKey(BlacklistReason.NAVIGATION, false), NAVIGATION_NOT_SEEN);
+
+        codes.put(new BlacklistSeenKey(BlacklistReason.MISC, true), MISC_SEEN);
+        codes.put(new BlacklistSeenKey(BlacklistReason.MISC, false), MISC_NOT_SEEN);
+
+        BLACKLIST_METRICS_CODE = Collections.unmodifiableMap(codes);
+    }
+
+    // Key used in the Blacklist Metrics Code map.
+    static class BlacklistSeenKey {
+        final BlacklistReason mReason;
+        final boolean mWasSeen;
+        final int mHashCode;
+
+        BlacklistSeenKey(BlacklistReason reason, boolean wasSeen) {
+            mReason = reason;
+            mWasSeen = wasSeen;
+            mHashCode = 31 * reason.hashCode() + (wasSeen ? 1231 : 1237);
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (!(obj instanceof BlacklistSeenKey)) {
+                return false;
+            }
+            if (obj == this) {
+                return true;
+            }
+            BlacklistSeenKey other = (BlacklistSeenKey) obj;
+            return mReason.equals(other.mReason) && mWasSeen == other.mWasSeen;
+        }
+
+        @Override
+        public int hashCode() {
+            return mHashCode;
+        }
+    }
+
+    /**
+     * Tests the selection against the blacklist heuristics, returning a reason to suppress the
+     * selection, or BlacklistReason.NONE, if no reason was found to suppress it.
+     * @param selection The given selection.
+     * @return The reason to suppress or not the selection.
+     */
+    public static BlacklistReason findReasonToSuppressSelection(String selection) {
+        selection = selection.toLowerCase(Locale.getDefault());
+
+        if (isNumber(selection)) {
+            return BlacklistReason.NUMBER;
+        }
+
+        BlacklistReason blacklistReason = BLACKLIST.get(selection);
+        if (blacklistReason != null) {
+            return blacklistReason;
+        }
+
+        return BlacklistReason.NONE;
+    }
+
+    /**
+     * @param reason The reason for blacklisting.
+     * @param wasSeen Whether the results were seen.
+     * @return The code used to log the blacklist metrics.
+     */
+    public static Integer getBlacklistMetricsCode(BlacklistReason reason, boolean wasSeen) {
+        return BLACKLIST_METRICS_CODE.get(new BlacklistSeenKey(reason, wasSeen));
+    }
+
+    /**
+     * @param selection A given selection.
+     * @return Whether the given |selection| represents a number.
+     */
+    private static boolean isNumber(String selection) {
+        return mDigitsPattern.matcher(selection).find();
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
index ef55554..e5fe1ef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
@@ -34,7 +34,7 @@
     private static final String DISABLE_SEARCH_TERM_RESOLUTION = "disable_search_term_resolution";
     private static final String DISABLE_EXTRA_SEARCH_BAR_ANIMATIONS =
             "disable_extra_search_bar_animations";
-    private static final String ENABLE_DIGIT_BLACKLIST = "enable_digit_blacklist";
+    private static final String ENABLE_BLACKLIST = "enable_blacklist";
 
     // Translation.  All these members are private, except for usage by testing.
     // Master switch, needed to enable any translate code for Contextual Search.
@@ -192,10 +192,10 @@
     }
 
     /**
-     * @return Whether the digit blacklist is enabled.
+     * @return Whether the blacklist is enabled.
      */
-    static boolean isDigitBlacklistEnabled() {
-        return getBooleanParam(ENABLE_DIGIT_BLACKLIST);
+    static boolean isBlacklistEnabled() {
+        return getBooleanParam(ENABLE_BLACKLIST);
     }
 
     /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
index 767b4aa..ca4a77ba 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
@@ -21,6 +21,7 @@
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanelContentViewDelegate;
 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel;
+import org.chromium.chrome.browser.contextualsearch.ContextualSearchBlacklist.BlacklistReason;
 import org.chromium.chrome.browser.contextualsearch.ContextualSearchSelectionController.SelectionType;
 import org.chromium.chrome.browser.externalnav.ExternalNavigationHandler;
 import org.chromium.chrome.browser.externalnav.ExternalNavigationHandler.OverrideUrlLoadingResult;
@@ -1238,6 +1239,13 @@
         }
     }
 
+    @Override
+    public void handleSelectionSuppression(BlacklistReason reason) {
+        if (mIsAccessibilityModeEnabled) return;
+
+        mSearchPanel.getPanelMetrics().setBlacklistReason(reason);
+    }
+
     // ============================================================================================
     // Test helpers
     // ============================================================================================
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
index c79c532..db851ca 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
@@ -9,6 +9,7 @@
 import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.browser.ChromeActivity;
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel;
+import org.chromium.chrome.browser.contextualsearch.ContextualSearchBlacklist.BlacklistReason;
 import org.chromium.chrome.browser.tab.Tab;
 import org.chromium.content.browser.ContentViewCore;
 import org.chromium.content_public.browser.GestureStateListener;
@@ -42,7 +43,6 @@
     private static final int TAP_NAVIGATION_DETECTION_DELAY = 16;
 
     private static final String CONTAINS_WORD_PATTERN = "(\\w|\\p{L}|\\p{N})+";
-    private static final String SINGLE_DIGIT_PATTERN = "^\\d$";
     // A URL is:
     //   0-1:  schema://
     //   1+:   any word char, _ or -
@@ -61,7 +61,6 @@
     private final Handler mRunnableHandler;
     private final float mPxToDp;
     private final Pattern mContainsWordPattern;
-    private final Pattern mSingleDigitPattern;
 
     private String mSelectedText;
     private SelectionType mSelectionType;
@@ -118,7 +117,6 @@
         };
 
         mContainsWordPattern = Pattern.compile(CONTAINS_WORD_PATTERN);
-        mSingleDigitPattern = Pattern.compile(SINGLE_DIGIT_PATTERN);
     }
 
     /**
@@ -213,7 +211,8 @@
             handleSelection(selection, mSelectionType);
             mWasTapGestureDetected = false;
         } else {
-            mHandler.handleSelectionModification(selection, isValidSelection(selection), mX, mY);
+            boolean isValidSelection = validateSelectionSuppression(selection);
+            mHandler.handleSelectionModification(selection, isValidSelection, mX, mY);
         }
     }
 
@@ -271,7 +270,8 @@
      */
     private void handleSelection(String selection, SelectionType type) {
         mShouldHandleSelectionModification = true;
-        mHandler.handleSelection(selection, isValidSelection(selection), type, mX, mY);
+        boolean isValidSelection = validateSelectionSuppression(selection);
+        mHandler.handleSelection(selection, isValidSelection, type, mX, mY);
     }
 
     /**
@@ -436,6 +436,34 @@
         return mIsSelectionEstablished;
     }
 
+    /**
+     * Evaluates whether the given selection is valid and notifies the handler about potential
+     * selection suppression.
+     * TODO(pedrosimonetti): substitute this once the system supports suppressing selections.
+     * @param selection The given selection.
+     * @return Whether the selection is valid.
+     */
+    private boolean validateSelectionSuppression(String selection) {
+        boolean isValid = isValidSelection(selection);
+
+        if (mSelectionType == SelectionType.TAP) {
+            BlacklistReason reason =
+                    ContextualSearchBlacklist.findReasonToSuppressSelection(selection);
+
+            mHandler.handleSelectionSuppression(reason);
+
+            // Only really suppress if enabled by field trial. Currently we can't prevent a
+            // selection from being issued, so we end up clearing the selection immediately
+            // afterwards, which does not look great.
+            // TODO(pedrosimonetti): actually suppress selection once the system supports it.
+            if (ContextualSearchFieldTrial.isBlacklistEnabled() && reason != BlacklistReason.NONE) {
+                isValid = false;
+            }
+        }
+
+        return isValid;
+    }
+
     /** Determines if the given selection is valid or not.
      * @param selection The selection portion of the context.
      * @return whether the given selection is considered a valid target for a search.
@@ -458,11 +486,6 @@
             return false;
         }
 
-        if (ContextualSearchFieldTrial.isDigitBlacklistEnabled()
-                && isBlacklistedWord(selection)) {
-            return false;
-        }
-
         return true;
     }
 
@@ -499,12 +522,4 @@
 
         return false;
     }
-
-    /**
-     * @param word A given word.
-     * @return Whether the given word is blacklisted.
-     */
-    private boolean isBlacklistedWord(String word) {
-        return mSingleDigitPattern.matcher(word).find();
-    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionHandler.java
index f7bc157..3d763bb4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionHandler.java
@@ -4,6 +4,7 @@
 
 package org.chromium.chrome.browser.contextualsearch;
 
+import org.chromium.chrome.browser.contextualsearch.ContextualSearchBlacklist.BlacklistReason;
 import org.chromium.chrome.browser.contextualsearch.ContextualSearchSelectionController.SelectionType;
 
 /**
@@ -46,4 +47,11 @@
      * Handle a dismissal of the selection on the base page.
      */
     public void handleSelectionDismissal();
+
+    /**
+     * Handles the suppression of the current selection.
+     * @param reason The reason why the selection was blacklisted. If the returned reason
+     *               is BlacklistReason.NONE, it means the selection was not blacklisted.
+     */
+    public void handleSelectionSuppression(BlacklistReason reason);
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
index 1bb7186..1172435 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
@@ -9,6 +9,7 @@
 import org.chromium.base.metrics.RecordHistogram;
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.PanelState;
 import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
+import org.chromium.chrome.browser.contextualsearch.ContextualSearchBlacklist.BlacklistReason;
 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 
 import java.util.Collections;
@@ -942,6 +943,20 @@
     }
 
     /**
+     * Logs whether a certain category of a blacklisted term resulted in the search results
+     * being seen.
+     * @param reason The given reason.
+     * @param wasSeen Whether the search results were seen.
+     */
+    public static void logBlacklistSeen(BlacklistReason reason, boolean wasSeen) {
+        if (reason == null) reason = BlacklistReason.NONE;
+        int code = ContextualSearchBlacklist.getBlacklistMetricsCode(reason, wasSeen);
+        RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchBlacklistSeen",
+                code, ContextualSearchBlacklist.BLACKLIST_BOUNDARY);
+
+    }
+
+    /**
      * Gets the state-change code for the given parameters by doing a lookup in the given map.
      * @param state The panel state.
      * @param reason The reason the state changed.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
index c6bb14a..5bf35e1d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
@@ -6,9 +6,13 @@
 
 import android.app.Activity;
 import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.BatteryManager;
 import android.os.Environment;
 
 import org.chromium.base.Log;
+import org.chromium.base.metrics.RecordHistogram;
 import org.chromium.base.metrics.RecordUserAction;
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.ChromeActivity;
@@ -19,6 +23,7 @@
 import org.chromium.chrome.browser.tabmodel.TabModelSelector;
 import org.chromium.components.offlinepages.FeatureMode;
 import org.chromium.content_public.browser.LoadUrlParams;
+import org.chromium.net.ConnectionType;
 import org.chromium.net.NetworkChangeNotifier;
 import org.chromium.ui.base.PageTransition;
 
@@ -27,6 +32,8 @@
  */
 public class OfflinePageUtils {
     private static final String TAG = "OfflinePageUtils";
+    /** Background task tag to differentiate from other task types */
+    public static final String TASK_TAG = "OfflinePageUtils";
 
     private static final int SNACKBAR_DURATION = 6 * 1000; // 6 second
 
@@ -274,4 +281,48 @@
             }
         };
     }
+
+    /**
+     * Records UMA data when the Offline Pages Background Load service awakens.
+     * @param context android context
+     */
+    public static void recordWakeupUMA(Context context) {
+        IntentFilter filter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+        // Note this is a sticky intent, so we aren't really registering a receiver, just getting
+        // the sticky intent.  That means that we don't need to unregister the filter later.
+        Intent batteryStatus = context.registerReceiver(null, filter);
+        if (batteryStatus == null) return;
+
+        // Report charging state.
+        RecordHistogram.recordBooleanHistogram(
+                "OfflinePages.Wakeup.ConnectedToPower", isPowerConnected(batteryStatus));
+
+        // Report battery percentage.
+        RecordHistogram.recordPercentageHistogram(
+                "OfflinePages.Wakeup.BatteryPercentage", batteryPercentage(batteryStatus));
+
+        // Report the default network found (or none, if we aren't connected).
+        int connectionType = NetworkChangeNotifier.getInstance().getCurrentConnectionType();
+        Log.d(TAG, "Found single network of type " + connectionType);
+        RecordHistogram.recordEnumeratedHistogram("OfflinePages.Wakeup.NetworkAvailable",
+                connectionType, ConnectionType.CONNECTION_LAST + 1);
+    }
+
+    private static boolean isPowerConnected(Intent batteryStatus) {
+        int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
+        boolean isConnected = (status == BatteryManager.BATTERY_STATUS_CHARGING
+                || status == BatteryManager.BATTERY_STATUS_FULL);
+        Log.d(TAG, "Power connected is " + isConnected);
+        return isConnected;
+    }
+
+    private static int batteryPercentage(Intent batteryStatus) {
+        int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+        int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
+        if (scale == 0) return 0;
+
+        int percentage = (int) Math.round(100 * level / (float) scale);
+        Log.d(TAG, "Battery Percentage is " + percentage);
+        return percentage;
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
index f50e743..95bc2647 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -1264,10 +1264,10 @@
             case OFFLINE:
                 Drawable bolt = ApiCompatibilityUtils.getDrawable(
                         getResources(), R.drawable.offline_bolt);
-                bolt.setColorFilter(ApiCompatibilityUtils.getColor(getResources(), mUseDarkColors
-                        ? R.color.locationbar_status_color
-                        : R.color.locationbar_status_color_light), PorterDuff.Mode.SRC_IN);
-                bolt.mutate();
+                bolt.mutate().setColorFilter(
+                        ApiCompatibilityUtils.getColor(getResources(), mUseDarkColors
+                                ? R.color.locationbar_status_color
+                                : R.color.locationbar_status_color_light), PorterDuff.Mode.SRC_IN);
                 mNavigationButton.setImageDrawable(bolt);
                 break;
             default:
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
index 6ee89bb..d1f7dba 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
@@ -807,7 +807,7 @@
 
         private int getUrlBarLeftOffset() {
             if (DeviceFormFactor.isTablet(getContext())) {
-                mUrlBar.getLocationOnScreen(mViewPositionHolder);
+                mUrlBar.getLocationInWindow(mViewPositionHolder);
                 return mViewPositionHolder[0];
             } else {
                 return ApiCompatibilityUtils.isLayoutRtl(this) ? mPhoneUrlBarLeftOffsetRtlPx
@@ -822,7 +822,7 @@
             if (mLocationBar == null) return 0;
 
             int leftOffset = getUrlBarLeftOffset();
-            getLocationOnScreen(mViewPositionHolder);
+            getLocationInWindow(mViewPositionHolder);
             return leftOffset + mUrlBar.getPaddingLeft() - mViewPositionHolder[0];
         }
 
@@ -833,7 +833,7 @@
             if (mLocationBar == null) return 0;
 
             int leftOffset = getUrlBarLeftOffset();
-            getLocationOnScreen(mViewPositionHolder);
+            getLocationInWindow(mViewPositionHolder);
             return leftOffset + mUrlBar.getWidth() - mUrlBar.getPaddingRight()
                     - mViewPositionHolder[0];
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
index 0ae107c..ac46a85 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
@@ -55,17 +55,6 @@
     }
 
     /**
-     * Evaluate whether the Physical Web should be enabled when the application starts.
-     *
-     * @param context An instance of android.content.Context
-     * @return true if the Physical Web should be started at launch
-     */
-    public static boolean shouldStartOnLaunch(Context context) {
-        return featureIsEnabled()
-                && (isPhysicalWebPreferenceEnabled(context) || isOnboarding(context));
-    }
-
-    /**
      * Start the Physical Web feature.
      * At the moment, this only enables URL discovery over BLE.
      * @param application An instance of {@link ChromeApplication}, used to get the
@@ -89,15 +78,6 @@
     }
 
     /**
-     * Upload the collected UMA stats.
-     * This method should be called only when the native library is loaded.
-     * @param context A valid instance of Context.
-     */
-    public static void uploadDeferredMetrics(final Context context) {
-        PhysicalWebUma.uploadDeferredMetrics(context);
-    }
-
-    /**
      * Increments a value tracking how many times we've shown the Physical Web
      * opt-in notification.
      *
@@ -123,6 +103,23 @@
         return sharedPreferences.getInt(PREF_PHYSICAL_WEB_NOTIFY_COUNT, 0);
     }
 
+    /**
+     * Perform various Physical Web operations that should happen on startup.
+     * @param application An instance of {@link ChromeApplication}.
+     */
+    public static void onChromeStart(ChromeApplication application) {
+        // The PhysicalWebUma calls in this method should be called only when the native library is
+        // loaded.  This is always the case on chrome startup.
+        PhysicalWebUma.onChromeStart(application);
+        if (featureIsEnabled()
+                && (isPhysicalWebPreferenceEnabled(application) || isOnboarding(application))) {
+            startPhysicalWeb(application);
+            PhysicalWebUma.uploadDeferredMetrics(application);
+        } else {
+            stopPhysicalWeb(application);
+        }
+    }
+
     private static void clearUrlsAsync(final Context context) {
         Runnable task = new Runnable() {
             @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
index 1488189..29e7846a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
@@ -4,16 +4,10 @@
 
 package org.chromium.chrome.browser.physicalweb;
 
-import android.Manifest;
-import android.bluetooth.BluetoothAdapter;
 import android.content.Context;
 import android.content.Intent;
-import android.content.pm.PackageManager;
 import android.content.res.Resources;
-import android.location.LocationManager;
-import android.net.ConnectivityManager;
 import android.os.Build;
-import android.support.v4.content.PermissionChecker;
 import android.text.Html;
 import android.text.util.Linkify;
 import android.view.LayoutInflater;
@@ -33,10 +27,6 @@
  * Provides diagnostic information about the Physical Web feature.
  */
 public class PhysicalWebDiagnosticsPage implements NativePage {
-    private static final int RESULT_FAILURE = 0;
-    private static final int RESULT_SUCCESS = 1;
-    private static final int RESULT_INDETERMINATE = 2;
-
     private final Context mContext;
     private final int mBackgroundColor;
     private final int mThemeColor;
@@ -78,7 +68,7 @@
 
     private void appendResult(StringBuilder sb, boolean success, String successMessage,
             String failureMessage) {
-        int successValue = (success ? RESULT_SUCCESS : RESULT_FAILURE);
+        int successValue = (success ? Utils.RESULT_SUCCESS : Utils.RESULT_FAILURE);
         appendResult(sb, successValue, successMessage, failureMessage, null);
     }
 
@@ -86,17 +76,21 @@
             String failureMessage, String indeterminateMessage) {
         String color;
         String message;
-        if (successValue == RESULT_SUCCESS) {
-            color = mSuccessColor;
-            message = successMessage;
-        } else if (successValue == RESULT_FAILURE) {
-            color = mFailureColor;
-            message = failureMessage;
-        } else if (successValue == RESULT_INDETERMINATE) {
-            color = mIndeterminateColor;
-            message = indeterminateMessage;
-        } else {
-            return;
+        switch (successValue) {
+            case Utils.RESULT_SUCCESS:
+                color = mSuccessColor;
+                message = successMessage;
+                break;
+            case Utils.RESULT_FAILURE:
+                color = mFailureColor;
+                message = failureMessage;
+                break;
+            case Utils.RESULT_INDETERMINATE:
+                color = mIndeterminateColor;
+                message = indeterminateMessage;
+                break;
+            default:
+                return;
         }
 
         sb.append(String.format("<font color=\"%s\">%s</font><br/>", color, message));
@@ -104,26 +98,29 @@
 
     private void appendPrerequisitesReport(StringBuilder sb) {
         boolean isSdkVersionCorrect = isSdkVersionCorrect();
-        boolean isDataConnectionActive = isDataConnectionActive();
-        int bluetoothStatus = getBluetoothEnabledStatus();
-        boolean isLocationServicesEnabled = isLocationServicesEnabled();
-        boolean isLocationPermissionGranted = isLocationPermissionGranted();
+        boolean isDataConnectionActive = Utils.isDataConnectionActive(mContext);
+        int bluetoothStatus = Utils.getBluetoothEnabledStatus(mContext);
+        boolean isLocationServicesEnabled = Utils.isLocationServicesEnabled(mContext);
+        boolean isLocationPermissionGranted = Utils.isLocationPermissionGranted(mContext);
         boolean isPreferenceEnabled = PhysicalWeb.isPhysicalWebPreferenceEnabled(mContext);
         boolean isOnboarding = PhysicalWeb.isOnboarding(mContext);
 
-        int prerequisitesResult = RESULT_SUCCESS;
-        if (!isSdkVersionCorrect || !isDataConnectionActive || (bluetoothStatus == RESULT_FAILURE)
-                || !isLocationServicesEnabled || !isLocationPermissionGranted
+        int prerequisitesResult = Utils.RESULT_SUCCESS;
+        if (!isSdkVersionCorrect
+                || !isDataConnectionActive
+                || bluetoothStatus == Utils.RESULT_FAILURE
+                || !isLocationServicesEnabled
+                || !isLocationPermissionGranted
                 || !isPreferenceEnabled) {
-            prerequisitesResult = RESULT_FAILURE;
-        } else if (bluetoothStatus == RESULT_INDETERMINATE) {
-            prerequisitesResult = RESULT_INDETERMINATE;
+            prerequisitesResult = Utils.RESULT_FAILURE;
+        } else if (bluetoothStatus == Utils.RESULT_INDETERMINATE) {
+            prerequisitesResult = Utils.RESULT_INDETERMINATE;
         }
 
         sb.append("<h2>Status</h2>");
 
         sb.append("Physical Web is ");
-        appendResult(sb, prerequisitesResult != RESULT_FAILURE, "ON", "OFF");
+        appendResult(sb, prerequisitesResult != Utils.RESULT_FAILURE, "ON", "OFF");
 
         sb.append("<h2>Prerequisites</h2>");
 
@@ -150,7 +147,7 @@
 
         // Append instructions for how to verify Bluetooth is enabled when we are unable to check
         // programmatically.
-        if (bluetoothStatus == RESULT_INDETERMINATE) {
+        if (bluetoothStatus == Utils.RESULT_INDETERMINATE) {
             sb.append("<br/>To verify Bluetooth is enabled on this device, check that the "
                     + "Bluetooth icon is shown in the status bar.");
         }
@@ -196,42 +193,6 @@
         return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT);
     }
 
-    private boolean isDataConnectionActive() {
-        ConnectivityManager cm =
-                (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
-        return (cm.getActiveNetworkInfo() != null
-                && cm.getActiveNetworkInfo().isConnectedOrConnecting());
-    }
-
-    private boolean isBluetoothPermissionGranted() {
-        return PermissionChecker.checkSelfPermission(mContext, Manifest.permission.BLUETOOTH)
-                == PackageManager.PERMISSION_GRANTED;
-    }
-
-    private int getBluetoothEnabledStatus() {
-        int statusResult = RESULT_INDETERMINATE;
-        if (isBluetoothPermissionGranted()) {
-            BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter();
-            statusResult = (bt != null && bt.isEnabled()) ? RESULT_SUCCESS : RESULT_FAILURE;
-        }
-        return statusResult;
-    }
-
-    private boolean isLocationServicesEnabled() {
-        LocationManager lm = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
-        boolean isGpsProviderEnabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
-        boolean isNetworkProviderEnabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
-        return isGpsProviderEnabled || isNetworkProviderEnabled;
-    }
-
-    private boolean isLocationPermissionGranted() {
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
-            return true;
-        }
-        return PermissionChecker.checkSelfPermission(mContext,
-                Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
-    }
-
     private static Intent createListUrlsIntent(Context context) {
         Intent intent = new Intent(context, ListUrlsActivity.class);
         intent.putExtra(ListUrlsActivity.REFERER_KEY, ListUrlsActivity.DIAGNOSTICS_REFERER);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
index 867f56f..8f6d964 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
@@ -53,6 +53,17 @@
     private static final String TOTAL_URLS_REFRESH_COUNTS =
             "PhysicalWeb.TotalUrls.OnRefresh";
     private static final String ACTIVITY_REFERRALS = "PhysicalWeb.ActivityReferral";
+    private static final String PHYSICAL_WEB_STATE = "PhysicalWeb.State";
+    private static final String CHROME_START = "ChromeStart";
+    private static final String LAUNCH_FROM_PREFERENCES = "LaunchFromPreferences";
+    private static final String LAUNCH_FROM_DIAGNOSTICS = "LaunchFromDiagnostics";
+    private static final String BLUETOOTH = "Bluetooth";
+    private static final String DATA_CONNECTION = "DataConnection";
+    private static final String LOCATION_PERMISSION = "LocationPermission";
+    private static final String LOCATION_SERVICES = "LocationServices";
+    private static final String PREFERENCE = "Preference";
+    private static final int BOOLEAN_BOUNDARY = 2;
+    private static final int TRISTATE_BOUNDARY = 3;
     private static boolean sUploadAllowed = false;
 
     /**
@@ -173,30 +184,63 @@
      *     histograms.xml.
      */
     public static void onActivityReferral(Context context, int referer) {
-        if (sUploadAllowed) {
-            RecordHistogram.recordEnumeratedHistogram(
-                    ACTIVITY_REFERRALS, referer, ListUrlsActivity.REFERER_BOUNDARY);
-        } else {
-            storeValue(context, ACTIVITY_REFERRALS, referer);
-        }
-        long delay;
+        handleEnum(context, ACTIVITY_REFERRALS, referer, ListUrlsActivity.REFERER_BOUNDARY);
         switch (referer) {
             case ListUrlsActivity.NOTIFICATION_REFERER:
-                delay = UrlManager.getInstance(context).getTimeSinceNotificationUpdate();
-                handleTime(context, STANDARD_NOTIFICATION_PRESS_DELAYS, delay,
+                handleTime(context, STANDARD_NOTIFICATION_PRESS_DELAYS,
+                        UrlManager.getInstance(context).getTimeSinceNotificationUpdate(),
                         TimeUnit.MILLISECONDS);
                 break;
             case ListUrlsActivity.OPTIN_REFERER:
-                delay = UrlManager.getInstance(context).getTimeSinceNotificationUpdate();
-                handleTime(context, OPT_IN_NOTIFICATION_PRESS_DELAYS, delay,
+                handleTime(context, OPT_IN_NOTIFICATION_PRESS_DELAYS,
+                        UrlManager.getInstance(context).getTimeSinceNotificationUpdate(),
                         TimeUnit.MILLISECONDS);
                 break;
+            case ListUrlsActivity.PREFERENCE_REFERER:
+                recordPhysicalWebState(context, LAUNCH_FROM_PREFERENCES);
+                break;
+            case ListUrlsActivity.DIAGNOSTICS_REFERER:
+                recordPhysicalWebState(context, LAUNCH_FROM_DIAGNOSTICS);
+                break;
             default:
                 break;
         }
     }
 
     /**
+     * Records the Physical Web state on Chrome startup.
+     */
+    public static void onChromeStart(Context context) {
+        recordPhysicalWebState(context, CHROME_START);
+    }
+
+    /**
+     * Calculate a Physical Web state.
+     * The Physical Web state includes:
+     * - The location provider
+     * - The location permission
+     * - The bluetooth status
+     * - The data connection status
+     * - The Physical Web preference status
+     */
+    public static void recordPhysicalWebState(Context context, String actionName) {
+        handleEnum(context, createStateString(LOCATION_SERVICES, actionName),
+                Utils.isLocationServicesEnabled(context) ? 1 : 0, BOOLEAN_BOUNDARY);
+        handleEnum(context, createStateString(LOCATION_PERMISSION, actionName),
+                Utils.isLocationPermissionGranted(context) ? 1 : 0, BOOLEAN_BOUNDARY);
+        handleEnum(context, createStateString(BLUETOOTH, actionName),
+                Utils.getBluetoothEnabledStatus(context), TRISTATE_BOUNDARY);
+        handleEnum(context, createStateString(DATA_CONNECTION, actionName),
+                Utils.isDataConnectionActive(context) ? 1 : 0, BOOLEAN_BOUNDARY);
+        int preferenceState = 2;
+        if (!PhysicalWeb.isOnboarding(context)) {
+            preferenceState = PhysicalWeb.isPhysicalWebPreferenceEnabled(context) ? 1 : 0;
+        }
+        handleEnum(context, createStateString(PREFERENCE, actionName),
+                preferenceState, TRISTATE_BOUNDARY);
+    }
+
+    /**
      * Uploads metrics that we have deferred for uploading.
      * Additionally, this method will cause future stat records not to be deferred and instead
      * uploaded immediately.
@@ -212,6 +256,10 @@
         }
     }
 
+    private static String createStateString(String stateName, String actionName) {
+        return PHYSICAL_WEB_STATE + "." + stateName + "." + actionName;
+    }
+
     private static void storeAction(Context context, String key) {
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
         int count = prefs.getInt(key, 0);
@@ -256,6 +304,14 @@
         }
     }
 
+    private static void handleEnum(Context context, String key, int value, int boundary) {
+        if (sUploadAllowed) {
+            RecordHistogram.recordEnumeratedHistogram(key, value, boundary);
+        } else {
+            storeValue(context, key, value);
+        }
+    }
+
     private static class UmaUploader implements Runnable {
         SharedPreferences mPrefs;
 
@@ -282,6 +338,27 @@
             uploadCounts(TOTAL_URLS_INITIAL_COUNTS);
             uploadCounts(TOTAL_URLS_REFRESH_COUNTS);
             uploadEnums(ACTIVITY_REFERRALS, ListUrlsActivity.REFERER_BOUNDARY);
+            uploadEnums(createStateString(LOCATION_SERVICES, CHROME_START), BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(LOCATION_PERMISSION, CHROME_START), BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(BLUETOOTH, CHROME_START), TRISTATE_BOUNDARY);
+            uploadEnums(createStateString(DATA_CONNECTION, CHROME_START), BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(PREFERENCE, CHROME_START), TRISTATE_BOUNDARY);
+            uploadEnums(createStateString(LOCATION_SERVICES, LAUNCH_FROM_DIAGNOSTICS),
+                    BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(LOCATION_PERMISSION, LAUNCH_FROM_DIAGNOSTICS),
+                    BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(BLUETOOTH, LAUNCH_FROM_DIAGNOSTICS), TRISTATE_BOUNDARY);
+            uploadEnums(createStateString(DATA_CONNECTION, LAUNCH_FROM_DIAGNOSTICS),
+                    BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(PREFERENCE, LAUNCH_FROM_DIAGNOSTICS), TRISTATE_BOUNDARY);
+            uploadEnums(createStateString(LOCATION_SERVICES, LAUNCH_FROM_PREFERENCES),
+                    BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(LOCATION_PERMISSION, LAUNCH_FROM_PREFERENCES),
+                    BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(BLUETOOTH, LAUNCH_FROM_PREFERENCES), TRISTATE_BOUNDARY);
+            uploadEnums(createStateString(DATA_CONNECTION, LAUNCH_FROM_PREFERENCES),
+                    BOOLEAN_BOUNDARY);
+            uploadEnums(createStateString(PREFERENCE, LAUNCH_FROM_PREFERENCES), TRISTATE_BOUNDARY);
             removePref(HAS_DEFERRED_METRICS_KEY);
         }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/Utils.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/Utils.java
new file mode 100644
index 0000000..638f66fb
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/Utils.java
@@ -0,0 +1,61 @@
+// 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.
+
+package org.chromium.chrome.browser.physicalweb;
+
+import android.Manifest;
+import android.bluetooth.BluetoothAdapter;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.location.LocationManager;
+import android.net.ConnectivityManager;
+import android.os.Build;
+import android.support.v4.content.PermissionChecker;
+
+
+/**
+ * This class provides basic static utilities for the Physical Web.
+ */
+class Utils {
+    public static final int RESULT_FAILURE = 0;
+    public static final int RESULT_SUCCESS = 1;
+    public static final int RESULT_INDETERMINATE = 2;
+
+    public static boolean isDataConnectionActive(Context context) {
+        ConnectivityManager cm =
+                (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
+        return (cm.getActiveNetworkInfo() != null
+                && cm.getActiveNetworkInfo().isConnectedOrConnecting());
+    }
+
+    public static boolean isBluetoothPermissionGranted(Context context) {
+        return PermissionChecker.checkSelfPermission(context, Manifest.permission.BLUETOOTH)
+                == PackageManager.PERMISSION_GRANTED;
+    }
+
+    public static int getBluetoothEnabledStatus(Context context) {
+        int statusResult = RESULT_INDETERMINATE;
+        if (isBluetoothPermissionGranted(context)) {
+            BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter();
+            statusResult = (bt != null && bt.isEnabled()) ? RESULT_SUCCESS : RESULT_FAILURE;
+        }
+        return statusResult;
+    }
+
+    public static boolean isLocationServicesEnabled(Context context) {
+        LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
+        boolean isGpsProviderEnabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
+        boolean isNetworkProviderEnabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
+        return isGpsProviderEnabled || isNetworkProviderEnabled;
+    }
+
+    public static boolean isLocationPermissionGranted(Context context) {
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+            return true;
+        }
+        return PermissionChecker.checkSelfPermission(context,
+                Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
+    }
+
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/AccessibilityPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AccessibilityPreferences.java
index e64b024..e75c41d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/AccessibilityPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AccessibilityPreferences.java
@@ -11,6 +11,7 @@
 
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.accessibility.FontSizePrefs;
+import org.chromium.chrome.browser.accessibility.FontSizePrefs.FontSizePrefsObserver;
 
 import java.text.NumberFormat;
 
@@ -20,43 +21,26 @@
 public class AccessibilityPreferences extends PreferenceFragment
         implements OnPreferenceChangeListener {
 
-    /**
-     * This value gives the threshold beyond which force enable zoom is automatically turned on. It
-     * is chosen such that force enable zoom will be activated when the accessibility large text
-     * setting is on (i.e. this value should be the same as or lesser than the font size scale used
-     * by accessiblity large text).
-     */
-    public static final float FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER = 1.3f;
-
-    public static final String PREF_TEXT_SCALE = "text_scale";
-    public static final String PREF_FORCE_ENABLE_ZOOM = "force_enable_zoom";
+    static final String PREF_TEXT_SCALE = "text_scale";
+    static final String PREF_FORCE_ENABLE_ZOOM = "force_enable_zoom";
 
     private NumberFormat mFormat;
-    private FontPrefsObserver mFontPrefsObserver;
     private FontSizePrefs mFontSizePrefs;
 
     private TextScalePreference mTextScalePref;
     private SeekBarLinkedCheckBoxPreference mForceEnableZoomPref;
 
-    // Saves the previous font scale factor because AccessibilityPreferences no longer has access
-    // to it after the font scale factor change notification.
-    private float mPreviousFontScaleFactor;
-
-    private class FontPrefsObserver implements FontSizePrefs.Observer {
+    private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() {
         @Override
-        public void onChangeFontSize(float font) {
-            processFontWithForceEnableZoom(font);
-            updateTextScaleSummary(font);
+        public void onFontScaleFactorChanged(float fontScaleFactor, float userFontScaleFactor) {
+            updateTextScaleSummary(userFontScaleFactor);
         }
 
         @Override
-        public void onChangeForceEnableZoom(boolean enabled) {
+        public void onForceEnableZoomChanged(boolean enabled) {
             mForceEnableZoomPref.setChecked(enabled);
         }
-
-        @Override
-        public void onChangeUserSetForceEnableZoom(boolean enabled) {}
-    }
+    };
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -66,7 +50,6 @@
 
         mFormat = NumberFormat.getPercentInstance();
         mFontSizePrefs = FontSizePrefs.getInstance(getActivity());
-        mFontPrefsObserver = new FontPrefsObserver();
 
         mTextScalePref = (TextScalePreference) findPreference(PREF_TEXT_SCALE);
         mTextScalePref.setOnPreferenceChangeListener(this);
@@ -82,52 +65,34 @@
         super.onStart();
         updateValues();
         mTextScalePref.startObservingFontPrefs();
-        mFontSizePrefs.addObserver(mFontPrefsObserver);
+        mFontSizePrefs.addObserver(mFontSizePrefsObserver);
     }
 
     @Override
     public void onStop() {
         mTextScalePref.stopObservingFontPrefs();
-        mFontSizePrefs.removeObserver(mFontPrefsObserver);
+        mFontSizePrefs.removeObserver(mFontSizePrefsObserver);
         super.onStop();
     }
 
     private void updateValues() {
-        float fontScaleFactor = mFontSizePrefs.getFontScaleFactor();
-        mTextScalePref.setValue(fontScaleFactor);
-        updateTextScaleSummary(fontScaleFactor);
+        float userFontScaleFactor = mFontSizePrefs.getUserFontScaleFactor();
+        mTextScalePref.setValue(userFontScaleFactor);
+        updateTextScaleSummary(userFontScaleFactor);
 
         mForceEnableZoomPref.setChecked(mFontSizePrefs.getForceEnableZoom());
     }
 
-    private void updateTextScaleSummary(float fontScaleFactor) {
-        mTextScalePref.setSummary(mFormat.format(fontScaleFactor));
-        mPreviousFontScaleFactor = fontScaleFactor;
-    }
-
-    private void processFontWithForceEnableZoom(float fontScaleFactor) {
-        float threshold = FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER;
-        if (mPreviousFontScaleFactor < threshold && fontScaleFactor >= threshold
-                && !mFontSizePrefs.getForceEnableZoom()) {
-            // If the slider is moved from below the threshold to above the threshold, we check
-            // force enable zoom even if the user has previously set it.
-            mFontSizePrefs.setForceEnableZoom(true);
-            mFontSizePrefs.setUserSetForceEnableZoom(false);
-        } else if (mPreviousFontScaleFactor >= threshold && fontScaleFactor < threshold
-                && !mFontSizePrefs.getUserSetForceEnableZoom()) {
-            // If the slider is moved from above the threshold to below it, we only uncheck force
-            // enable zoom if it was not set manually.
-            mFontSizePrefs.setForceEnableZoom(false);
-        }
+    private void updateTextScaleSummary(float userFontScaleFactor) {
+        mTextScalePref.setSummary(mFormat.format(userFontScaleFactor));
     }
 
     @Override
     public boolean onPreferenceChange(Preference preference, Object newValue) {
         if (PREF_TEXT_SCALE.equals(preference.getKey())) {
-            mFontSizePrefs.setFontScaleFactor((Float) newValue);
+            mFontSizePrefs.setUserFontScaleFactor((Float) newValue);
         } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) {
-            mFontSizePrefs.setUserSetForceEnableZoom(true);
-            mFontSizePrefs.setForceEnableZoom((Boolean) newValue);
+            mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue);
         }
         return true;
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index 381b475..25953f9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -72,6 +72,33 @@
         }
     }
 
+    /**
+     * Interface for a class that is listening to clear browser data events.
+     */
+    public interface OnClearBrowsingDataListener {
+        public abstract void onBrowsingDataCleared();
+    }
+
+    /**
+     * Interface to a class that receives callbacks instructing it to inform the user about other
+     * forms of browsing history.
+     */
+    public interface OtherFormsOfBrowsingHistoryListener {
+        /**
+         * Called by the web history service when it discovers that other forms of browsing history
+         * exist.
+         */
+        @CalledByNative("OtherFormsOfBrowsingHistoryListener")
+        public abstract void enableDialogAboutOtherFormsOfBrowsingHistory();
+
+        /**
+         * Called by the web history service when the conditions for showing the dialog about
+         * other forms of browsing history are met.
+         */
+        @CalledByNative("OtherFormsOfBrowsingHistoryListener")
+        public abstract void showNoticeAboutOtherFormsOfBrowsingHistory();
+    }
+
     @CalledByNative
     private static AboutVersionStrings createAboutVersionStrings(String applicationVersion,
             String osVersion) {
@@ -653,13 +680,6 @@
     }
 
     /**
-     * Interface for a class that is listening to clear browser data events.
-     */
-    public interface OnClearBrowsingDataListener {
-        public abstract void onBrowsingDataCleared();
-    }
-
-    /**
      * Checks the state of deletion preference for a certain browsing data type.
      * @param dataType The requested browsing data type (from the shared enum
      *      {@link org.chromium.chrome.browser.BrowsingDataType}).
@@ -730,6 +750,16 @@
         }
     }
 
+    /**
+     * Requests that the web history service finds out if we should inform the user about the
+     * existence of other forms of browsing history. The response will be asynchronous, through
+     * {@link OtherFormsOfBrowsingHistoryListener}.
+     */
+    public void requestInfoAboutOtherFormsOfBrowsingHistory(
+            OtherFormsOfBrowsingHistoryListener listener) {
+        nativeRequestInfoAboutOtherFormsOfBrowsingHistory(listener);
+    }
+
     public void setAllowCookiesEnabled(boolean allow) {
         nativeSetAllowCookiesEnabled(allow);
     }
@@ -1021,6 +1051,8 @@
     private native int nativeGetBrowsingDataDeletionTimePeriod();
     private native void nativeSetBrowsingDataDeletionTimePeriod(int timePeriod);
     private native void nativeClearBrowsingData(int[] dataTypes, int timePeriod);
+    private native void nativeRequestInfoAboutOtherFormsOfBrowsingHistory(
+            OtherFormsOfBrowsingHistoryListener listener);
     private native boolean nativeCanDeleteBrowsingHistory();
     private native void nativeSetAllowCookiesEnabled(boolean allow);
     private native void nativeSetBackgroundSyncEnabled(boolean allow);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/TextScalePreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/TextScalePreference.java
index d0a1320..d409d921 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/TextScalePreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/TextScalePreference.java
@@ -12,6 +12,7 @@
 
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.accessibility.FontSizePrefs;
+import org.chromium.chrome.browser.accessibility.FontSizePrefs.FontSizePrefsObserver;
 
 /**
  * Preference that allows the user to change the scaling factor that's applied to web page text.
@@ -20,21 +21,17 @@
 public class TextScalePreference extends SeekBarPreference {
     private TextView mPreview;
     private View mView;
-    private FontSizeObserver mFontSizeObserver;
-    private FontSizePrefs mFontSizePrefs;
+    private final FontSizePrefs mFontSizePrefs;
 
-    private class FontSizeObserver implements FontSizePrefs.Observer {
+    private final FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() {
         @Override
-        public void onChangeFontSize(float font) {
+        public void onFontScaleFactorChanged(float fontScaleFactor, float userFontScaleFactor) {
             updatePreview();
         }
 
         @Override
-        public void onChangeForceEnableZoom(boolean enabled) {}
-
-        @Override
-        public void onChangeUserSetForceEnableZoom(boolean enabled) {}
-    }
+        public void onForceEnableZoomChanged(boolean enabled) {}
+    };
 
     /**
      * Constructor for inflating from XML.
@@ -43,7 +40,6 @@
         super(context, attrs);
 
         mFontSizePrefs = FontSizePrefs.getInstance(getContext());
-        mFontSizeObserver = new FontSizeObserver();
 
         setLayoutResource(R.layout.custom_preference);
         setWidgetLayoutResource(R.layout.preference_text_scale);
@@ -65,18 +61,19 @@
     }
 
     /**
-     * startObservingFont must be called when FontSizePreview's parent fragment is initialized.
+     * Listens for changes to the text scale and updates the preview text as needed. This must be
+     * matched with a call to stopObservingFontPrefs().
      */
     public void startObservingFontPrefs() {
-        mFontSizePrefs.addObserver(mFontSizeObserver);
+        mFontSizePrefs.addObserver(mFontSizePrefsObserver);
         updatePreview();
     }
 
     /**
-     * stopObservingFont must be called when FontSizePreview's parent fragment is destroyed.
+     * Stops listening for changes to the text scale.
      */
     public void stopObservingFontPrefs() {
-        mFontSizePrefs.removeObserver(mFontSizeObserver);
+        mFontSizePrefs.removeObserver(mFontSizePrefsObserver);
     }
 
     private void updatePreview() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
index 864685a..85b635d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
@@ -37,8 +37,9 @@
  */
 public class ClearBrowsingDataPreferences extends PreferenceFragment
         implements PrefServiceBridge.OnClearBrowsingDataListener,
+                   PrefServiceBridge.OtherFormsOfBrowsingHistoryListener,
                    Preference.OnPreferenceClickListener,
-                   Preference.OnPreferenceChangeListener{
+                   Preference.OnPreferenceChangeListener {
     /**
      * Represents a single item in the dialog.
      */
@@ -131,9 +132,6 @@
     private static final String WEB_HISTORY_URL =
             "https://history.google.com/history/?utm_source=chrome_cbd";
 
-    private OtherFormsOfHistoryDialogFragment mDialogAboutOtherFormsOfBrowsingHistory;
-    private boolean mIsDialogAboutOtherFormsOfBrowsingHistoryEnabled;
-
     /**
      * The various data types that can be cleared via this screen.
      */
@@ -195,6 +193,9 @@
         }
     }
 
+    private OtherFormsOfHistoryDialogFragment mDialogAboutOtherFormsOfBrowsingHistory;
+    private boolean mIsDialogAboutOtherFormsOfBrowsingHistoryEnabled;
+
     private ProgressDialog mProgressDialog;
     private Item[] mItems;
 
@@ -339,6 +340,7 @@
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        PrefServiceBridge.getInstance().requestInfoAboutOtherFormsOfBrowsingHistory(this);
         getActivity().setTitle(R.string.clear_browsing_data_title);
         addPreferencesFromResource(R.xml.clear_browsing_data_preferences);
         DialogOption[] options = getDialogOptions();
@@ -460,12 +462,10 @@
         return mProgressDialog;
     }
 
-    /**
-     * Shows a notice about other forms of browsing history. To be called by the web history
-     * service when it discovers that they exist.
-     */
-    @VisibleForTesting
+    @Override
     public void showNoticeAboutOtherFormsOfBrowsingHistory() {
+        if (getActivity() == null) return;
+
         TextMessageWithLinkAndIconPreference google_summary =
                 (TextMessageWithLinkAndIconPreference) findPreference(PREF_GOOGLE_SUMMARY);
         if (google_summary == null) return;
@@ -473,13 +473,10 @@
                 R.string.clear_browsing_data_footnote_signed_and_other_forms_of_history);
     }
 
-    /**
-     * Enables the dialog about other forms of browsing history that will be shown to the user
-     * after deleting their Chrome history. To be called by the web history service when the
-     * conditions for showing the dialog are met.
-     */
-    @VisibleForTesting
+    @Override
     public void enableDialogAboutOtherFormsOfBrowsingHistory() {
+        if (getActivity() == null) return;
+
         mIsDialogAboutOtherFormsOfBrowsingHistoryEnabled = true;
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index f0d54629..e97b46e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -1469,6 +1469,10 @@
         setInterceptNavigationDelegate(mDelegateFactory.createInterceptNavigationDelegate(this));
         mAppBannerManager = mDelegateFactory.createAppBannerManager(this);
 
+        // Reload the NativePage (if any), since the old NativePage has a reference to the old
+        // activity.
+        maybeShowNativePage(getUrl(), true);
+
         reparentingParams.finalizeTabReparenting();
     }
 
@@ -1776,11 +1780,12 @@
     /**
      * Shows a native page for url if it's a valid chrome-native URL. Otherwise, does nothing.
      * @param url The url of the current navigation.
-     * @param isReload Whether the current navigation is a reload.
+     * @param forceReload If true, the current native page (if any) will not be reused, even if it
+     *                    matches the URL.
      * @return True, if a native page was displayed for url.
      */
-    boolean maybeShowNativePage(String url, boolean isReload) {
-        NativePage candidateForReuse = isReload ? null : getNativePage();
+    boolean maybeShowNativePage(String url, boolean forceReload) {
+        NativePage candidateForReuse = forceReload ? null : getNativePage();
         NativePage nativePage = NativePageFactory.createNativePageForURL(url, candidateForReuse,
                 this, getTabModelSelector(), getActivity());
         if (nativePage != null) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
index 8245334..eceb3d6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
@@ -48,6 +48,8 @@
 import org.chromium.components.security_state.ConnectionSecurityLevel;
 import org.chromium.ui.base.WindowAndroid;
 
+import java.util.List;
+
 /**
  * The Toolbar layout to be used for a custom tab. This is used for both phone and tablet UIs.
  */
@@ -598,9 +600,14 @@
     private static String parsePublisherNameFromUrl(String url) {
         // TODO(ianwen): Make it generic to parse url from URI path. http://crbug.com/599298
         // The url should look like: https://www.google.com/amp/s/www.nyt.com/ampthml/blogs.html
+        // or https://www.google.com/amp/www.nyt.com/ampthml/blogs.html.
         Uri uri = Uri.parse(url);
-        String path = uri.getPathSegments().get(2);
-        return path;
+        List<String> segments = uri.getPathSegments();
+        if (segments.size() >= 3) {
+            if (segments.get(1).length() > 1) return segments.get(1);
+            return segments.get(2);
+        }
+        return url;
     }
 
     // Toolbar and LocationBar calls that are not relevant here.
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 628f0f3..7219dec7 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -219,6 +219,7 @@
   "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuParams.java",
   "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulator.java",
   "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuTitleView.java",
+  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchBlacklist.java",
   "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java",
   "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.java",
   "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
@@ -584,6 +585,7 @@
   "java/src/org/chromium/chrome/browser/physicalweb/PwsResult.java",
   "java/src/org/chromium/chrome/browser/physicalweb/SwipeRefreshWidget.java",
   "java/src/org/chromium/chrome/browser/physicalweb/UrlManager.java",
+  "java/src/org/chromium/chrome/browser/physicalweb/Utils.java",
   "java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java",
   "java/src/org/chromium/chrome/browser/precache/FailureReason.java",
   "java/src/org/chromium/chrome/browser/precache/PrecacheBootReceiver.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java
index 0e1b8974..ddce5eee 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java
@@ -10,220 +10,218 @@
 import android.test.suitebuilder.annotation.SmallTest;
 
 import org.chromium.base.ThreadUtils;
-import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.Feature;
+import org.chromium.chrome.browser.accessibility.FontSizePrefs.FontSizePrefsObserver;
 import org.chromium.content.browser.test.NativeLibraryTestBase;
-import org.chromium.content.browser.test.util.UiUtils;
 
 import java.util.concurrent.Callable;
 
 /**
- * Test class for {@link FontSizePrefs}.
+ * Tests for {@link FontSizePrefs}.
  */
 public class FontSizePrefsTest extends NativeLibraryTestBase {
 
+    private static final float EPSILON = 0.001f;
     private FontSizePrefs mFontSizePrefs;
-    private SharedPreferences.Editor mSharedPreferencesEditor;
 
     @Override
     public void setUp() throws Exception {
         super.setUp();
         loadNativeLibraryAndInitBrowserProcess();
+        resetSharedPrefs();
         Context context = getInstrumentation().getTargetContext();
-        getFontSizePrefs(context);
-        mSharedPreferencesEditor = PreferenceManager.getDefaultSharedPreferences(context).edit();
+        mFontSizePrefs = getFontSizePrefs(context);
+        setSystemFontScaleForTest(1.0f);
     }
 
     @Override
     protected void tearDown() throws Exception {
-        mSharedPreferencesEditor.remove(FontSizePrefs.PREF_USER_SET_FORCE_ENABLE_ZOOM).commit();
         super.tearDown();
+        resetSharedPrefs();
+    }
+
+    private void resetSharedPrefs() {
+        SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(
+                getInstrumentation().getTargetContext()).edit();
+        editor.remove(FontSizePrefs.PREF_USER_SET_FORCE_ENABLE_ZOOM);
+        editor.remove(FontSizePrefs.PREF_USER_FONT_SCALE_FACTOR);
+        editor.apply();
     }
 
     @SmallTest
     @Feature({"Accessibility"})
-    public void testGetAndSetFontAndForceEnableZoom() {
-        // Check default font.
-        assertEquals(1f, getFontScale());
-        // Check that setting the value of font scale factor works.
-        float newTextScale = 1.2f;
-        setFontScale(newTextScale);
-        assertEquals(newTextScale, getFontScale());
+    public void testForceEnableZoom() {
+        assertEquals(false, getForceEnableZoom());
 
-        // Check the default value of force enable zoom.
-        assertFalse(getForceEnableZoom());
-        // Check that setting the value of force enable zoom works.
-        setForceEnableZoom(true);
-        assertTrue(getForceEnableZoom());
+        TestingObserver observer = createAndAddFontSizePrefsObserver();
+
+        setUserFontScaleFactor(1.5f);
+        assertEquals(true, getForceEnableZoom());
+        observer.assertConsistent();
+        setUserFontScaleFactor(0.7f);
+        assertEquals(false, getForceEnableZoom());
+        observer.assertConsistent();
+
+        setForceEnableZoomFromUser(true);
+        assertEquals(true, getForceEnableZoom());
+        observer.assertConsistent();
+        setUserFontScaleFactor(1.5f);
+        assertEquals(true, getForceEnableZoom());
+        observer.assertConsistent();
+        setUserFontScaleFactor(0.7f);
+        assertEquals(true, getForceEnableZoom());
+        observer.assertConsistent();
+
+        setForceEnableZoomFromUser(false);
+        assertEquals(false, getForceEnableZoom());
+        observer.assertConsistent();
+        setUserFontScaleFactor(1.5f);
+        assertEquals(true, getForceEnableZoom());
+        observer.assertConsistent();
+        setUserFontScaleFactor(0.7f);
+        assertEquals(false, getForceEnableZoom());
+        observer.assertConsistent();
+
+        // Force enable zoom should depend on fontScaleFactor, not on userFontScaleFactor.
+        setSystemFontScaleForTest(2.0f);
+        assertEquals(true, getForceEnableZoom());
+        observer.assertConsistent();
+        setSystemFontScaleForTest(1.0f);
+        assertEquals(false, getForceEnableZoom());
+        observer.assertConsistent();
     }
 
     @SmallTest
     @Feature({"Accessibility"})
-    public void testGetAndSetUserSetForceEnableZoom() {
-        // Check the default value of user set force enable zoom.
-        assertFalse(mFontSizePrefs.getUserSetForceEnableZoom());
-        // Check that setting the value of user set force enable zoom works.
-        setUserSetForceEnableZoom(true);
-        assertTrue(mFontSizePrefs.getUserSetForceEnableZoom());
-    }
+    public void testFontScaleFactor() {
+        assertEquals(1f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(1f, getFontScaleFactor(), EPSILON);
 
-    /*
-    @SmallTest
-    @Feature({"Accessibility"})
-    crbug.com/458200
-    */
-    @DisabledTest
-    public void testObserversForceEnableZoom() throws InterruptedException {
-        TestingObserver test1 = new TestingObserver();
-        TestingObserver test2 = new TestingObserver();
-        mFontSizePrefs.addObserver(test1);
-        mFontSizePrefs.addObserver(test2);
+        TestingObserver observer = createAndAddFontSizePrefsObserver();
 
-        // Checks that force enable zoom for both observers is correctly changed.
-        setForceEnableZoom(true);
-        UiUtils.settleDownUI(getInstrumentation());
-        assertTrue(test1.getForceEnableZoom());
-        assertTrue(test2.getForceEnableZoom());
+        setUserFontScaleFactor(1.5f);
+        assertEquals(1.5f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(1.5f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
 
-        // Checks that removing observer and setting force enable zoom works.
-        mFontSizePrefs.removeObserver(test1);
-        setForceEnableZoom(false);
-        UiUtils.settleDownUI(getInstrumentation());
-        assertTrue(test1.getForceEnableZoom());
-        assertFalse(test2.getForceEnableZoom());
-        mFontSizePrefs.removeObserver(test2);
-    }
+        setUserFontScaleFactor(0.7f);
+        assertEquals(0.7f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(0.7f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
 
-    /*
-    @SmallTest
-    @Feature({"Accessibility"})
-    crbug.com/458200
-    */
-    @DisabledTest
-    public void testObserversFontScale() throws InterruptedException {
-        TestingObserver test1 = new TestingObserver();
-        TestingObserver test2 = new TestingObserver();
-        mFontSizePrefs.addObserver(test1);
-        mFontSizePrefs.addObserver(test2);
+        // Force enable zoom shouldn't affect font scale factor.
+        setForceEnableZoomFromUser(true);
+        assertEquals(0.7f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(0.7f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
 
-        // Checks that font scale for both observers is correctly changed.
-        float newTextScale = 1.2f;
-        setFontScale(newTextScale);
-        UiUtils.settleDownUI(getInstrumentation());
-        assertEquals(newTextScale, test1.getFontScaleFactor());
-        assertEquals(newTextScale, test2.getFontScaleFactor());
+        setForceEnableZoomFromUser(false);
+        assertEquals(0.7f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(0.7f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
 
-        // Checks that removing observer and setting font works.
-        float newerTextScale = 1.4f;
-        mFontSizePrefs.removeObserver(test1);
-        setFontScale(newerTextScale);
-        UiUtils.settleDownUI(getInstrumentation());
-        assertEquals(newTextScale, test1.getFontScaleFactor());
-        assertEquals(newerTextScale, test2.getFontScaleFactor());
-        mFontSizePrefs.removeObserver(test2);
-    }
+        // System font scale should affect fontScaleFactor, but not userFontScaleFactor.
+        setSystemFontScaleForTest(1.3f);
+        assertEquals(0.7f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(0.7f * 1.3f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
 
-    /*
-    @SmallTest
-    @Feature({"Accessibility"})
-    crbug.com/458200
-    */
-    @DisabledTest
-    public void testObserversUserSetForceEnableZoom() throws InterruptedException {
-        TestingObserver test1 = new TestingObserver();
-        TestingObserver test2 = new TestingObserver();
-        mFontSizePrefs.addObserver(test1);
-        mFontSizePrefs.addObserver(test2);
+        setUserFontScaleFactor(1.5f);
+        assertEquals(1.5f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(1.5f * 1.3f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
 
-        // Checks that force enable zoom for both observers is correctly changed.
-        setUserSetForceEnableZoom(true);
-        UiUtils.settleDownUI(getInstrumentation());
-        assertTrue(test1.getUserSetForceEnableZoom());
-        assertTrue(test2.getUserSetForceEnableZoom());
-
-        // Checks that removing observer and setting force enable zoom works.
-        mFontSizePrefs.removeObserver(test1);
-        setUserSetForceEnableZoom(false);
-        UiUtils.settleDownUI(getInstrumentation());
-        assertTrue(test1.getUserSetForceEnableZoom());
-        assertFalse(test2.getUserSetForceEnableZoom());
-        mFontSizePrefs.removeObserver(test2);
+        setSystemFontScaleForTest(0.8f);
+        assertEquals(1.5f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(1.5f * 0.8f, getFontScaleFactor(), EPSILON);
+        observer.assertConsistent();
     }
 
     @SmallTest
     @Feature({"Accessibility"})
-    public void testMultipleAddMultipleDeleteObservers() {
-        TestingObserver test = new TestingObserver();
+    public void testUpgradeToUserFontScaleFactor() {
+        setSystemFontScaleForTest(1.3f);
+        setUserFontScaleFactor(1.5f);
 
-        // Should successfully add the observer the first time.
-        assertTrue(mFontSizePrefs.addObserver(test));
-        // Observer cannot be added again, should return false.
-        assertFalse(mFontSizePrefs.addObserver(test));
+        // Delete PREF_USER_FONT_SCALE_FACTOR. This simulates the condition just after upgrading to
+        // M51, when userFontScaleFactor was added.
+        SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(
+                getInstrumentation().getTargetContext()).edit();
+        editor.remove(FontSizePrefs.PREF_USER_FONT_SCALE_FACTOR);
+        editor.commit();
 
-        // Delete the observer the first time.
-        assertTrue(mFontSizePrefs.removeObserver(test));
-        // Observer cannot be deleted again, should return false.
-        assertFalse(mFontSizePrefs.removeObserver(test));
+        // Intial userFontScaleFactor should be set to fontScaleFactor / systemFontScale.
+        assertEquals(1.5f, getUserFontScaleFactor(), EPSILON);
+        assertEquals(1.5f * 1.3f, getFontScaleFactor(), EPSILON);
     }
 
-    private static class TestingObserver implements FontSizePrefs.Observer {
-        private float mFontSize;
-        private boolean mForceEnableZoom;
-        private boolean mUserSetForceEnableZoom;
+    private class TestingObserver implements FontSizePrefsObserver {
+        private float mUserFontScaleFactor = getUserFontScaleFactor();
+        private float mFontScaleFactor = getFontScaleFactor();
+        private boolean mForceEnableZoom = getForceEnableZoom();
 
-        public TestingObserver() {
-            mFontSize = 1;
-            mForceEnableZoom = false;
-            mUserSetForceEnableZoom = false;
-        }
-
-        public float getFontScaleFactor() {
-            return mFontSize;
+        @Override
+        public void onFontScaleFactorChanged(float fontScaleFactor, float userFontScaleFactor) {
+            mFontScaleFactor = fontScaleFactor;
+            mUserFontScaleFactor = userFontScaleFactor;
         }
 
         @Override
-        public void onChangeFontSize(float font) {
-            mFontSize = font;
-        }
-
-        public boolean getForceEnableZoom() {
-            return mForceEnableZoom;
-        }
-
-        @Override
-        public void onChangeForceEnableZoom(boolean enabled) {
+        public void onForceEnableZoomChanged(boolean enabled) {
             mForceEnableZoom = enabled;
         }
 
-        @Override
-        public void onChangeUserSetForceEnableZoom(boolean enabled) {
-            mUserSetForceEnableZoom = enabled;
-        }
-
-        public boolean getUserSetForceEnableZoom() {
-            return mUserSetForceEnableZoom;
+        private void assertConsistent() {
+            ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+                @Override
+                public void run() {
+                    assertEquals(getUserFontScaleFactor(), mUserFontScaleFactor, EPSILON);
+                    assertEquals(getFontScaleFactor(), mFontScaleFactor, EPSILON);
+                    assertEquals(getForceEnableZoom(), mForceEnableZoom);
+                }
+            });
         }
     }
 
-    private void getFontSizePrefs(final Context context) {
-        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+    private FontSizePrefs getFontSizePrefs(final Context context) {
+        return ThreadUtils.runOnUiThreadBlockingNoException(new Callable<FontSizePrefs>() {
             @Override
-            public void run() {
-                mFontSizePrefs = FontSizePrefs.getInstance(context);
+            public FontSizePrefs call() {
+                return FontSizePrefs.getInstance(context);
             }
         });
     }
 
-    private void setFontScale(final float fontsize) {
-        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+    private TestingObserver createAndAddFontSizePrefsObserver() {
+        return ThreadUtils.runOnUiThreadBlockingNoException(new Callable<TestingObserver>() {
             @Override
-            public void run() {
-                mFontSizePrefs.setFontScaleFactor(fontsize);
+            public TestingObserver call() {
+                TestingObserver observer = new TestingObserver();
+                mFontSizePrefs.addObserver(observer);
+                return observer;
             }
         });
     }
 
-    private float getFontScale() {
+    private void setUserFontScaleFactor(final float fontsize) {
+        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+            @Override
+            public void run() {
+                mFontSizePrefs.setUserFontScaleFactor(fontsize);
+            }
+        });
+    }
+
+    private float getUserFontScaleFactor() {
+        return ThreadUtils.runOnUiThreadBlockingNoException(new Callable<Float>() {
+            @Override
+            public Float call() {
+                return mFontSizePrefs.getUserFontScaleFactor();
+            }
+        });
+    }
+
+    private float getFontScaleFactor() {
         return ThreadUtils.runOnUiThreadBlockingNoException(new Callable<Float>() {
             @Override
             public Float call() {
@@ -232,11 +230,11 @@
         });
     }
 
-    private void setForceEnableZoom(final boolean enabled) {
+    private void setForceEnableZoomFromUser(final boolean enabled) {
         ThreadUtils.runOnUiThreadBlocking(new Runnable() {
             @Override
             public void run() {
-                mFontSizePrefs.setForceEnableZoom(enabled);
+                mFontSizePrefs.setForceEnableZoomFromUser(enabled);
             }
         });
     }
@@ -250,11 +248,12 @@
         });
     }
 
-    private void setUserSetForceEnableZoom(final boolean enabled) {
+    private void setSystemFontScaleForTest(final float systemFontScale) {
         ThreadUtils.runOnUiThreadBlocking(new Runnable() {
             @Override
             public void run() {
-                mFontSizePrefs.setUserSetForceEnableZoom(enabled);
+                mFontSizePrefs.setSystemFontScaleForTest(systemFontScale);
+                mFontSizePrefs.onSystemFontScaleChanged();
             }
         });
     }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java
index bc20d283..35fa0e7 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java
@@ -231,9 +231,9 @@
         NumberFormat percentFormat = NumberFormat.getPercentInstance();
         // Arbitrary value 0.4f to be larger and smaller than threshold.
         float fontSmallerThanThreshold =
-                AccessibilityPreferences.FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER - 0.4f;
+                FontSizePrefs.FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER - 0.4f;
         float fontBiggerThanThreshold =
-                AccessibilityPreferences.FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER + 0.4f;
+                FontSizePrefs.FORCE_ENABLE_ZOOM_THRESHOLD_MULTIPLIER + 0.4f;
 
         // Set the textScaleFactor above the threshold.
         userSetTextScale(accessibilityPref, textScalePref, fontBiggerThanThreshold);
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn
index 1a88d73..2c0c46e 100644
--- a/chrome/app/BUILD.gn
+++ b/chrome/app/BUILD.gn
@@ -382,7 +382,7 @@
 }
 
 group("mojo_manifests") {
-  deps = [
+  data_deps = [
     ":chrome_manifest",
     ":chrome_renderer_manifest",
   ]
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp
index 3897837..93b8d1c6 100644
--- a/chrome/app/chromeos_strings.grdp
+++ b/chrome/app/chromeos_strings.grdp
@@ -6432,7 +6432,7 @@
   <message name="IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION" desc="Label for checkbox to allow automatic timezone update by user geolocation.">
     Set time zone automatically using your location
   </message>
-  <message name="IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_TITLE" desc="Title of a prompt dialog for granting permissions to a volume (eg. USB drive, SD card, MTP device) with the specified name.">
+  <message name="IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_TITLE" desc="Title of a prompt dialog for granting permissions to a volume (eg. USB drive, SD card, MTP device) with the specified name. Only used for screen readers (a11y); not visible.">
     Permission requested
   </message>
   <message name="IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_MESSAGE" desc="Message in a prompt dialog for granting read-only permissions to a volume (eg. USB drive, SD card, MTP device) with the specified name to the extension.">
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 016747e..b80ff6b2 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5538,6 +5538,12 @@
       <message name="IDS_FLAGS_WEBRTC_DTLS12_DESCRIPTION" desc="Description of chrome:flags option to enable DTLS 1.2 for WebRTC">
         When enabled, WebRTC will try to negotiate DTLS 1.2.
       </message>
+      <message name="IDS_FLAGS_WEBRTC_ECDSA_NAME" desc="Name of chrome:flags option to generate ECDSA certificates for WebRTC by default">
+        Use ECDSA certificates for WebRTC
+      </message>
+      <message name="IDS_FLAGS_WEBRTC_ECDSA_DESCRIPTION" desc="Description of chrome:flags option to generate ECDSA certificates for WebRTC by default">
+        When enabled, WebRTC will use ECDSA certificates.
+      </message>
       <message name="IDS_FLAGS_WEBRTC_STUN_ORIGIN_NAME" desc="Name of chrome:flags option to turn on Origin header for WebRTC STUN messages">
         WebRTC Stun origin header
       </message>
@@ -10801,15 +10807,18 @@
       </message>
       <message name="IDS_SYNC_CONFIRMATION_CHROME_SYNC_BODY" desc="Body of the chrome sync section of the sync confirmation dialog in the tab modal signin flow">
         Your bookmarks, history, passwords and other settings will be synced to your Google Account so you can use them on all your devices. Control what to sync in <ph name="BEGIN_LINK">&lt;a id="settingsLink" href="#"&gt;Settings&lt;/a&gt;.</ph>
+       </message>
+      <message name="IDS_SYNC_CONFIRMATION_CHROME_SYNC_MESSAGE" desc="Body of the chrome sync section of the sync confirmation dialog in the tab modal signin flow">
+        Your bookmarks, history, passwords, and other settings will be synced to your Google Account so you can use them on all your devices
       </message>
-      <message name="IDS_SYNC_CONFIRMATION_ACTIVITY_CONTROLS_TITLE" desc="Title of the activity controls section of the sync confirmation dialog in the tab modal signin flow">
+      <message name="IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_TITLE" desc="Title of the personalize services section of the sync confirmation dialog in the tab modal signin flow">
         Personalize Google services
       </message>
-      <message name="IDS_SYNC_CONFIRMATION_ACTIVITY_CONTROLS_BODY" desc="Body of the activity controls section of the sync confirmation dialog in the tab modal signin flow">
-        Google may use your browsing history to personalize Search and other Google services. You can control this at myaccount.google.com.
+      <message name="IDS_SYNC_CONFIRMATION_PERSONALIZE_SERVICES_BODY" desc="Body of the personalize services section of the sync confirmation dialog in the tab modal signin flow">
+        Google may use your browsing history to personalize Search and other Google services
       </message>
-      <message name="IDS_SYNC_CONFIRMATION_ACTIVITY_CONTROLS_CHECKBOX_LABEL" desc="Label of the checkbox for managing user's privacy settings.">
-        Open myaccount.google.com after signing in
+      <message name="IDS_SYNC_CONFIRMATION_SYNC_SETTINGS_LINK_BODY" desc="Label of the section containing the link to go to the sync setting page.">
+        Control how this works in <ph name="BEGIN_LINK">&lt;a id="settingsLink" href="#"&gt;Settings&lt;/a&gt;.</ph>
       </message>
       <message name="IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL" desc="Label of the confirmation button in the sync confirmation dialog of the tab modal signin flow">
         Ok, got it
@@ -11441,6 +11450,11 @@
           <ph name="TIME">$1<ex>Sept 1, 2012</ex></ph>
         </message>
 
+        <!-- Personalize Google Services section of the configure sync dialog -->
+        <message name="IDS_SYNC_PERSONALIZE_GOOGLE_SERVICES_MESSAGE" desc="Text of the section containing a link to the Google Activity Controls.">
+          Control how Google uses your browsing history to personalize Search and other Google services from <ph name="BEGIN_LINK">&lt;a href="$1" target=&quot;_blank&quot;&gt;</ph>Google Activity Controls<ph name="END_LINK">&lt;/a&gt;</ph>.
+        </message>
+
         <!-- Passphrase dialog strings -->
         <message name="IDS_SYNC_CONFIRM_PASSPHRASE_LABEL" desc="Label for the confirm-passphrase field.">
           Confirm passphrase
@@ -13683,6 +13697,9 @@
       <message name="IDS_TOOLTIP_TAB_ALERT_STATE_BLUETOOTH_CONNECTED" desc="Extra tool tip text, when tab is connected to a Bluetooth device.">
         This tab is connected to a Bluetooth Device.
       </message>
+      <message name="IDS_TOOLTIP_TAB_ALERT_STATE_USB_CONNECTED" desc="Extra tool tip text, when tab is connected to a USB device.">
+        This tab is connected to a USB device.
+      </message>
 
       <!-- ProcessSingleton -->
       <message name="IDS_PROFILE_IN_USE_LINUX_QUIT" desc="Text of button in profile in use dialog to quit without doing anything.">
diff --git a/chrome/app/theme/default_100_percent/legacy/tab_usb_indicator.png b/chrome/app/theme/default_100_percent/legacy/tab_usb_indicator.png
new file mode 100644
index 0000000..966065f
--- /dev/null
+++ b/chrome/app/theme/default_100_percent/legacy/tab_usb_indicator.png
Binary files differ
diff --git a/chrome/app/theme/default_200_percent/legacy/tab_usb_indicator.png b/chrome/app/theme/default_200_percent/legacy/tab_usb_indicator.png
new file mode 100644
index 0000000..b9c2c08
--- /dev/null
+++ b/chrome/app/theme/default_200_percent/legacy/tab_usb_indicator.png
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index c412a2b8..74c3af7e 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -823,6 +823,7 @@
         <structure type="chrome_scaled_image" name="IDR_TAB_RECORDING_INDICATOR" file="legacy/tab_recording_indicator.png" />
         <structure type="chrome_scaled_image" name="IDR_TAB_CAPTURE_INDICATOR" file="legacy/tab_capture_indicator.png" />
         <structure type="chrome_scaled_image" name="IDR_TAB_BLUETOOTH_INDICATOR" file="legacy/tab_bluetooth_indicator.png" />
+        <structure type="chrome_scaled_image" name="IDR_TAB_USB_INDICATOR" file="legacy/tab_usb_indicator.png" />
       </if>
       <structure type="chrome_scaled_image" name="IDR_TAB_DROP_DOWN" file="tab_drop_down.png" />
       <structure type="chrome_scaled_image" name="IDR_TAB_DROP_UP" file="tab_drop_up.png" />
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index b724b1f..c3803360 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1519,6 +1519,12 @@
      IDS_FLAGS_WEBRTC_DTLS12_DESCRIPTION, kOsAll,
      SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12)},
 #endif
+#if defined(ENABLE_WEBRTC)
+    {"enable-webrtc-ecdsa",
+     IDS_FLAGS_WEBRTC_ECDSA_NAME,
+     IDS_FLAGS_WEBRTC_ECDSA_DESCRIPTION, kOsAll,
+     FEATURE_VALUE_TYPE(features::kWebRtcEcdsaDefault)},
+#endif
 #if defined(OS_MACOSX)
     {"app-info-dialog", IDS_FLAGS_APP_INFO_DIALOG_NAME,
      IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION, kOsMac,
diff --git a/chrome/browser/android/accessibility/font_size_prefs_android.cc b/chrome/browser/android/accessibility/font_size_prefs_android.cc
index 27450bdb..ca2ab10 100644
--- a/chrome/browser/android/accessibility/font_size_prefs_android.cc
+++ b/chrome/browser/android/accessibility/font_size_prefs_android.cc
@@ -21,11 +21,11 @@
   pref_change_registrar_->Init(pref_service_);
   pref_change_registrar_->Add(
       prefs::kWebKitFontScaleFactor,
-      base::Bind(&FontSizePrefsAndroid::OnFontScaleFactorPrefsChanged,
+      base::Bind(&FontSizePrefsAndroid::OnFontScaleFactorChanged,
                  base::Unretained(this)));
   pref_change_registrar_->Add(
       prefs::kWebKitForceEnableZoom,
-      base::Bind(&FontSizePrefsAndroid::OnForceEnableZoomPrefsChanged,
+      base::Bind(&FontSizePrefsAndroid::OnForceEnableZoomChanged,
                  base::Unretained(this)));
 }
 
@@ -57,22 +57,7 @@
   return pref_service_->GetBoolean(prefs::kWebKitForceEnableZoom);
 }
 
-void FontSizePrefsAndroid::AddObserver(JNIEnv* env,
-                                       const JavaRef<jobject>& obj,
-                                       jlong observer_ptr) {
-  FontSizePrefsObserverAndroid* font_size_prefs_observer_android =
-      reinterpret_cast<FontSizePrefsObserverAndroid*>(observer_ptr);
-  observers_.AddObserver(font_size_prefs_observer_android);
-}
-
-void FontSizePrefsAndroid::RemoveObserver(JNIEnv* env,
-                                          const JavaRef<jobject>& obj,
-                                          jlong observer_ptr) {
-  FontSizePrefsObserverAndroid* font_size_prefs_observer_android =
-      reinterpret_cast<FontSizePrefsObserverAndroid*>(observer_ptr);
-  observers_.RemoveObserver(font_size_prefs_observer_android);
-}
-
+// static
 bool FontSizePrefsAndroid::Register(JNIEnv* env) {
   return RegisterNativesImpl(env);
 }
@@ -83,53 +68,14 @@
   return reinterpret_cast<intptr_t>(font_size_prefs_android);
 }
 
-void FontSizePrefsAndroid::OnFontScaleFactorPrefsChanged() {
+void FontSizePrefsAndroid::OnFontScaleFactorChanged() {
   JNIEnv* env = base::android::AttachCurrentThread();
-  FOR_EACH_OBSERVER(Observer,
-                    observers_,
-                    OnChangeFontSize(GetFontScaleFactor(env, java_ref_)));
+  float factor = GetFontScaleFactor(env, java_ref_);
+  Java_FontSizePrefs_onFontScaleFactorChanged(env, java_ref_.obj(), factor);
 }
 
-void FontSizePrefsAndroid::OnForceEnableZoomPrefsChanged() {
+void FontSizePrefsAndroid::OnForceEnableZoomChanged() {
   JNIEnv* env = base::android::AttachCurrentThread();
-  FOR_EACH_OBSERVER(
-      Observer,
-      observers_,
-      OnChangeForceEnableZoom(GetForceEnableZoom(env, java_ref_)));
-}
-
-FontSizePrefsObserverAndroid::FontSizePrefsObserverAndroid(JNIEnv* env,
-                                                           jobject obj) {
-  java_ref_.Reset(env, obj);
-}
-
-FontSizePrefsObserverAndroid::~FontSizePrefsObserverAndroid() {
-}
-
-bool FontSizePrefsObserverAndroid::Register(JNIEnv* env) {
-  return RegisterNativesImpl(env);
-}
-
-void FontSizePrefsObserverAndroid::DestroyObserverAndroid(
-    JNIEnv* env,
-    const JavaParamRef<jobject>& obj) {
-  delete this;
-}
-
-jlong InitObserverAndroid(JNIEnv* env, const JavaParamRef<jobject>& obj) {
-  FontSizePrefsObserverAndroid* observer_wrapper =
-      new FontSizePrefsObserverAndroid(env, obj);
-  return reinterpret_cast<intptr_t>(observer_wrapper);
-}
-
-void FontSizePrefsObserverAndroid::OnChangeFontSize(float font_size) {
-  JNIEnv* env = base::android::AttachCurrentThread();
-  Java_FontSizePrefsObserverWrapper_onChangeFontSize(
-      env, java_ref_.obj(), font_size);
-}
-
-void FontSizePrefsObserverAndroid::OnChangeForceEnableZoom(bool enabled) {
-  JNIEnv* env = base::android::AttachCurrentThread();
-  Java_FontSizePrefsObserverWrapper_onChangeForceEnableZoom(
-      env, java_ref_.obj(), enabled);
+  bool enabled = GetForceEnableZoom(env, java_ref_);
+  Java_FontSizePrefs_onForceEnableZoomChanged(env, java_ref_.obj(), enabled);
 }
diff --git a/chrome/browser/android/accessibility/font_size_prefs_android.h b/chrome/browser/android/accessibility/font_size_prefs_android.h
index 3af85f1..014e4f3 100644
--- a/chrome/browser/android/accessibility/font_size_prefs_android.h
+++ b/chrome/browser/android/accessibility/font_size_prefs_android.h
@@ -11,7 +11,6 @@
 
 #include "base/android/scoped_java_ref.h"
 #include "base/macros.h"
-#include "base/observer_list.h"
 
 class PrefChangeRegistrar;
 class PrefService;
@@ -22,12 +21,6 @@
  */
 class FontSizePrefsAndroid {
  public:
-  class Observer {
-   public:
-    virtual void OnChangeFontSize(float font) = 0;
-    virtual void OnChangeForceEnableZoom(bool enabled) = 0;
-  };
-
   FontSizePrefsAndroid(JNIEnv* env, jobject obj);
   ~FontSizePrefsAndroid();
 
@@ -42,48 +35,19 @@
   bool GetForceEnableZoom(JNIEnv* env,
                           const base::android::JavaRef<jobject>& obj);
 
-  void AddObserver(JNIEnv* env,
-                   const base::android::JavaRef<jobject>& obj,
-                   jlong obs);
-  void RemoveObserver(JNIEnv* env,
-                      const base::android::JavaRef<jobject>& obj,
-                      jlong obs);
-
   static bool Register(JNIEnv* env);
 
  private:
   // Callback for FontScaleFactor changes from pref change registrar.
-  void OnFontScaleFactorPrefsChanged();
+  void OnFontScaleFactorChanged();
   // Callback for ForceEnableZoom changes from pref change registrar.
-  void OnForceEnableZoomPrefsChanged();
+  void OnForceEnableZoomChanged();
 
   std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
   PrefService* const pref_service_;
-  base::ObserverList<Observer> observers_;
   base::android::ScopedJavaGlobalRef<jobject> java_ref_;
 
   DISALLOW_COPY_AND_ASSIGN(FontSizePrefsAndroid);
 };
 
-/*
- * Native implementation of FontSizePrefsObserverWrapper. Adds observer support
- * for FontSizePrefs.
- */
-class FontSizePrefsObserverAndroid : public FontSizePrefsAndroid::Observer {
- public:
-  FontSizePrefsObserverAndroid(JNIEnv* env, jobject obj);
-  virtual ~FontSizePrefsObserverAndroid();
-  void DestroyObserverAndroid(JNIEnv* env,
-                              const base::android::JavaParamRef<jobject>& obj);
-
-  static bool Register(JNIEnv* env);
-
-  // FontSizePrefs::Observer implementation.
-  void OnChangeFontSize(float font) override;
-  void OnChangeForceEnableZoom(bool enabled) override;
-
- private:
-  base::android::ScopedJavaGlobalRef<jobject> java_ref_;
-};
-
 #endif  // CHROME_BROWSER_ANDROID_ACCESSIBILITY_FONT_SIZE_PREFS_ANDROID_H_
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index 6b1fe806..65eff4b9 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -26,13 +26,16 @@
 #include "chrome/browser/browsing_data/browsing_data_remover.h"
 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
+#include "chrome/browser/history/web_history_service_factory.h"
 #include "chrome/browser/net/prediction_options.h"
 #include "chrome/browser/prefs/incognito_mode_prefs.h"
 #include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
 #include "chrome/browser/translate/chrome_translate_client.h"
 #include "chrome/browser/ui/android/android_about_app_info.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/locale_settings.h"
+#include "components/browsing_data_ui/history_notice_utils.h"
 #include "components/content_settings/core/browser/host_content_settings_map.h"
 #include "components/content_settings/core/common/content_settings.h"
 #include "components/content_settings/core/common/content_settings_pattern.h"
@@ -607,6 +610,45 @@
   return GetPrefService()->GetBoolean(prefs::kAllowDeletingBrowserHistory);
 }
 
+static void ShowNoticeAboutOtherFormsOfBrowsingHistory(
+    ScopedJavaGlobalRef<jobject>* listener,
+    bool show) {
+  JNIEnv* env = AttachCurrentThread();
+  if (!show)
+    return;
+  Java_OtherFormsOfBrowsingHistoryListener_showNoticeAboutOtherFormsOfBrowsingHistory(
+      env, listener->obj());
+}
+
+static void EnableDialogAboutOtherFormsOfBrowsingHistory(
+    ScopedJavaGlobalRef<jobject>* listener,
+    bool enabled) {
+  JNIEnv* env = AttachCurrentThread();
+  if (!enabled)
+    return;
+  Java_OtherFormsOfBrowsingHistoryListener_enableDialogAboutOtherFormsOfBrowsingHistory(
+      env, listener->obj());
+}
+
+static void RequestInfoAboutOtherFormsOfBrowsingHistory(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj,
+    const JavaParamRef<jobject>& listener) {
+  // The permanent notice in the footer.
+  browsing_data_ui::ShouldShowNoticeAboutOtherFormsOfBrowsingHistory(
+      ProfileSyncServiceFactory::GetForProfile(GetOriginalProfile()),
+      WebHistoryServiceFactory::GetForProfile(GetOriginalProfile()),
+      base::Bind(&ShowNoticeAboutOtherFormsOfBrowsingHistory,
+                 base::Owned(new ScopedJavaGlobalRef<jobject>(env, listener))));
+
+  // The one-time notice in the dialog.
+  browsing_data_ui::ShouldPopupDialogAboutOtherFormsOfBrowsingHistory(
+      ProfileSyncServiceFactory::GetForProfile(GetOriginalProfile()),
+      WebHistoryServiceFactory::GetForProfile(GetOriginalProfile()),
+      base::Bind(&EnableDialogAboutOtherFormsOfBrowsingHistory,
+                 base::Owned(new ScopedJavaGlobalRef<jobject>(env, listener))));
+}
+
 static void SetAllowCookiesEnabled(JNIEnv* env,
                                    const JavaParamRef<jobject>& obj,
                                    jboolean allow) {
diff --git a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
index c1b40697..9cbd71dd 100644
--- a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
+++ b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
@@ -4,7 +4,6 @@
 
 #include <string>
 
-#include "ash/shell.h"
 #include "base/command_line.h"
 #include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
@@ -24,11 +23,17 @@
 #include "ui/app_list/views/contents_view.h"
 #include "ui/app_list/views/custom_launcher_page_view.h"
 #include "ui/app_list/views/search_box_view.h"
+#include "ui/aura/window.h"
 #include "ui/events/test/event_generator.h"
 #include "ui/views/controls/textfield/textfield.h"
 #include "ui/views/controls/webview/webview.h"
 #include "ui/views/focus/focus_manager.h"
 
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
+#include "ui/app_list/shower/app_list_shower_impl.h"
+#endif
+
 namespace {
 
 // The path of the test application within the "platform_apps" directory.
@@ -74,9 +79,9 @@
   app_list::AppListView* GetAppListView() {
     app_list::AppListView* app_list_view = nullptr;
 #if defined(OS_CHROMEOS)
-    ash::Shell* shell = ash::Shell::GetInstance();
-    app_list_view = shell->GetAppListView();
-    EXPECT_TRUE(shell->GetAppListTargetVisibility());
+    AppListServiceAshTestApi service_test;
+    app_list_view = service_test.GetAppListView();
+    EXPECT_TRUE(service_test.GetAppListShower()->GetTargetVisibility());
 #else
     AppListServiceViews* service =
         static_cast<AppListServiceViews*>(AppListService::Get());
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 52fc09ca..27e12cc 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -48,7 +48,7 @@
 #include "chrome/browser/chrome_browser_main_extra_parts.h"
 #include "chrome/browser/component_updater/cld_component_installer.h"
 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
-#include "chrome/browser/component_updater/flash_component_installer.h"
+#include "chrome/browser/component_updater/pepper_flash_component_installer.h"
 #include "chrome/browser/component_updater/recovery_component_installer.h"
 #include "chrome/browser/component_updater/sth_set_component_installer.h"
 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h"
@@ -1270,12 +1270,7 @@
 #endif  // defined(ENABLE_WEBRTC)
 
 #if !defined(OS_ANDROID)
-  // WebUSB is an experimental web API. The sites these notifications will link
-  // to will only work if the experiment is enabled and WebUSB feature is
-  // enabled.
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableExperimentalWebPlatformFeatures) &&
-      base::FeatureList::IsEnabled(features::kWebUsb)) {
+  if (base::FeatureList::IsEnabled(features::kWebUsb)) {
     webusb_browser_client_.reset(new ChromeWebUsbBrowserClient());
     webusb_detector_.reset(
         new webusb::WebUsbDetector(webusb_browser_client_.get()));
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 5ae5889..8bb7ef2 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2761,11 +2761,7 @@
 void ChromeContentBrowserClient::RegisterRenderFrameMojoServices(
     content::ServiceRegistry* registry,
     content::RenderFrameHost* render_frame_host) {
-  // WebUSB is an experimental web API. It will only work if the experiment
-  // is enabled and WebUSB feature is enabled.
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableExperimentalWebPlatformFeatures) &&
-      base::FeatureList::IsEnabled(features::kWebUsb)) {
+  if (base::FeatureList::IsEnabled(features::kWebUsb)) {
     registry->AddService(
         base::Bind(&CreateUsbDeviceManager, render_frame_host));
     registry->AddService(
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
index 535596a..8a6d7b0 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -188,6 +188,8 @@
       is_loading(false),
       was_auto_launched_with_zero_delay(false) {}
 
+KioskAppManager::App::App(const App& other) = default;
+
 KioskAppManager::App::~App() {}
 
 std::string KioskAppManager::GetAutoLaunchApp() const {
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h
index c9d042a6..7d45ad6 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h
@@ -67,6 +67,7 @@
         bool is_extension_pending,
         bool was_auto_launched_with_zero_delay);
     App();
+    App(const App& other);
     ~App();
 
     std::string app_id;
diff --git a/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc b/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc
index a753217..247a0922 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_external_updater.cc
@@ -95,6 +95,9 @@
 KioskExternalUpdater::ExternalUpdate::ExternalUpdate() {
 }
 
+KioskExternalUpdater::ExternalUpdate::ExternalUpdate(
+    const ExternalUpdate& other) = default;
+
 KioskExternalUpdater::ExternalUpdate::~ExternalUpdate() {
 }
 
diff --git a/chrome/browser/chromeos/app_mode/kiosk_external_updater.h b/chrome/browser/chromeos/app_mode/kiosk_external_updater.h
index 869a1dff..5342266 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_external_updater.h
+++ b/chrome/browser/chromeos/app_mode/kiosk_external_updater.h
@@ -46,6 +46,7 @@
   };
   struct ExternalUpdate {
     ExternalUpdate();
+    ExternalUpdate(const ExternalUpdate& other);
     ~ExternalUpdate();
 
     std::string app_name;
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index 224242c9..7cd3f41 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -9,7 +9,9 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
+#include "base/lazy_instance.h"
 #include "base/strings/stringprintf.h"
+#include "base/threading/thread_checker.h"
 #include "chrome/browser/chromeos/arc/arc_auth_notification.h"
 #include "chrome/browser/chromeos/arc/arc_optin_uma.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
@@ -47,6 +49,9 @@
 // Weak pointer.  This class is owned by ArcServiceManager.
 ArcAuthService* arc_auth_service = nullptr;
 
+base::LazyInstance<base::ThreadChecker> thread_checker =
+    LAZY_INSTANCE_INITIALIZER;
+
 const char kArcSupportExtensionId[] = "cnbgggchhmkkdmeppjobngjoejnihlei";
 const char kArcSupportStorageId[] = "arc_support";
 
@@ -61,23 +66,26 @@
 ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service)
     : ArcService(bridge_service), binding_(this) {
   DCHECK(!arc_auth_service);
+  DCHECK(thread_checker.Get().CalledOnValidThread());
+
   arc_auth_service = this;
 
   arc_bridge_service()->AddObserver(this);
 }
 
 ArcAuthService::~ArcAuthService() {
-  DCHECK(!profile_);
+  DCHECK(thread_checker.Get().CalledOnValidThread());
+  DCHECK(arc_auth_service == this);
+
+  Shutdown();
   arc_bridge_service()->RemoveObserver(this);
 
-  DCHECK(arc_auth_service == this);
   arc_auth_service = nullptr;
 }
 
 // static
 ArcAuthService* ArcAuthService::Get() {
-  DCHECK(arc_auth_service);
-  DCHECK(arc_auth_service->thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   return arc_auth_service;
 }
 
@@ -107,7 +115,7 @@
 }
 
 std::string ArcAuthService::GetAndResetAuthCode() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   std::string auth_code;
   auth_code_.swap(auth_code);
   return auth_code;
@@ -115,13 +123,13 @@
 
 void ArcAuthService::GetAuthCodeDeprecated(
     const GetAuthCodeDeprecatedCallback& callback) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   DCHECK(!IsOptInVerificationDisabled());
   callback.Run(mojo::String(GetAndResetAuthCode()));
 }
 
 void ArcAuthService::GetAuthCode(const GetAuthCodeCallback& callback) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   const std::string auth_code = GetAndResetAuthCode();
   const bool verification_disabled = IsOptInVerificationDisabled();
@@ -136,7 +144,7 @@
 }
 
 void ArcAuthService::OnSignInComplete() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   DCHECK_EQ(state_, State::ACTIVE);
 
   profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, true);
@@ -144,7 +152,7 @@
 }
 
 void ArcAuthService::OnSignInFailed(arc::ArcSignInFailureReason reason) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   DCHECK_EQ(state_, State::ACTIVE);
 
   int error_message_id;
@@ -181,7 +189,7 @@
 
 void ArcAuthService::GetIsAccountManaged(
     const GetIsAccountManagedCallback& callback) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   const user_manager::User* const primary_user =
       user_manager::UserManager::Get()->GetPrimaryUser();
@@ -202,7 +210,7 @@
 
 void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) {
   DCHECK(profile && profile != profile_);
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   Shutdown();
 
@@ -294,7 +302,7 @@
 }
 
 void ArcAuthService::OnMergeSessionSuccess(const std::string& data) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   DCHECK(!initial_opt_in_);
   context_prepared_ = true;
@@ -303,13 +311,13 @@
 
 void ArcAuthService::OnMergeSessionFailure(
     const GoogleServiceAuthError& error) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   VLOG(2) << "Failed to merge gaia session " << error.ToString() << ".";
   OnPrepareContextFailed();
 }
 
 void ArcAuthService::OnUbertokenSuccess(const std::string& token) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   merger_fetcher_.reset(
       new GaiaAuthFetcher(this, GaiaConstants::kChromeOSSource,
                           storage_partition_->GetURLRequestContext()));
@@ -317,14 +325,14 @@
 }
 
 void ArcAuthService::OnUbertokenFailure(const GoogleServiceAuthError& error) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   VLOG(2) << "Failed to get ubertoken " << error.ToString() << ".";
   OnPrepareContextFailed();
 }
 
 void ArcAuthService::OnSyncedPrefChanged(const std::string& path,
                                          bool from_sync) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   // Update UMA only for local changes
   if (!from_sync) {
@@ -335,7 +343,7 @@
 }
 
 void ArcAuthService::OnOptInPreferenceChanged() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   DCHECK(profile_);
 
   if (profile_->GetPrefs()->GetBoolean(prefs::kArcEnabled)) {
@@ -365,7 +373,7 @@
   auth_callback_.reset();
   ubertoken_fethcher_.reset();
   merger_fetcher_.reset();
-  ArcBridgeService::Get()->Shutdown();
+  arc_bridge_service()->Shutdown();
   SetState(State::STOPPED);
 }
 
@@ -381,17 +389,19 @@
 }
 
 void ArcAuthService::AddObserver(Observer* observer) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   observer_list_.AddObserver(observer);
 }
 
 void ArcAuthService::RemoveObserver(Observer* observer) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   observer_list_.RemoveObserver(observer);
 }
 
 void ArcAuthService::CloseUI() {
   FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInUIClose());
+  if (!disable_ui_for_testing)
+    ArcAuthNotification::Hide();
 }
 
 void ArcAuthService::SetUIPage(UIPage page, const base::string16& status) {
@@ -402,13 +412,13 @@
 }
 
 void ArcAuthService::StartArc() {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  ArcBridgeService::Get()->HandleStartup();
+  DCHECK(thread_checker.Get().CalledOnValidThread());
+  arc_bridge_service()->HandleStartup();
   SetState(State::ACTIVE);
 }
 
 void ArcAuthService::SetAuthCodeAndStartArc(const std::string& auth_code) {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   DCHECK(!auth_code.empty());
 
   if (!auth_callback_.is_null()) {
@@ -432,7 +442,7 @@
 }
 
 void ArcAuthService::StartLso() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   // Update UMA only if error is currently shown.
   if (ui_page_ == UIPage::ERROR)
@@ -443,7 +453,7 @@
 }
 
 void ArcAuthService::CancelAuthCode() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   if (state_ != State::FETCHING_CODE)
     return;
@@ -456,17 +466,17 @@
 }
 
 void ArcAuthService::EnableArc() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   profile_->GetPrefs()->SetBoolean(prefs::kArcEnabled, true);
 }
 
 void ArcAuthService::DisableArc() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
   profile_->GetPrefs()->SetBoolean(prefs::kArcEnabled, false);
 }
 
 void ArcAuthService::PrepareContext() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   // Get auth token to continue.
   ProfileOAuth2TokenService* token_service =
@@ -482,7 +492,7 @@
 }
 
 void ArcAuthService::StartUI() {
-  DCHECK(thread_checker_.CalledOnValidThread());
+  DCHECK(thread_checker.Get().CalledOnValidThread());
 
   SetState(State::FETCHING_CODE);
 
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.h b/chrome/browser/chromeos/arc/arc_auth_service.h
index 3f275eb..236d418 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.h
+++ b/chrome/browser/chromeos/arc/arc_auth_service.h
@@ -9,7 +9,6 @@
 
 #include "base/macros.h"
 #include "base/observer_list.h"
-#include "base/threading/thread_checker.h"
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_service.h"
 #include "components/arc/common/auth.mojom.h"
@@ -171,7 +170,6 @@
   PrefChangeRegistrar pref_change_registrar_;
 
   mojo::Binding<AuthHost> binding_;
-  base::ThreadChecker thread_checker_;
   State state_ = State::STOPPED;
   base::ObserverList<Observer> observer_list_;
   std::unique_ptr<GaiaAuthFetcher> merger_fetcher_;
diff --git a/chrome/browser/chromeos/arc/arc_support_host.cc b/chrome/browser/chromeos/arc/arc_support_host.cc
index a2643d2..e076d71 100644
--- a/chrome/browser/chromeos/arc/arc_support_host.cc
+++ b/chrome/browser/chromeos/arc/arc_support_host.cc
@@ -41,11 +41,15 @@
 }
 
 ArcSupportHost::ArcSupportHost() {
-  arc::ArcAuthService::Get()->AddObserver(this);
+  arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
+  DCHECK(arc_auth_service);
+  arc_auth_service->AddObserver(this);
 }
 
 ArcSupportHost::~ArcSupportHost() {
-  arc::ArcAuthService::Get()->RemoveObserver(this);
+  arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
+  if (arc_auth_service)
+    arc_auth_service->RemoveObserver(this);
 }
 
 void ArcSupportHost::Start(Client* client) {
@@ -55,6 +59,7 @@
   SendLocalization();
 
   arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
+  DCHECK(arc_auth_service);
   OnOptInUIShowPage(arc_auth_service->ui_page(),
                     arc_auth_service->ui_page_status());
 }
@@ -141,17 +146,20 @@
     return;
   }
 
+  arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
+  DCHECK(arc_auth_service);
+
   if (action == kActionStartLso) {
-    arc::ArcAuthService::Get()->StartLso();
+    arc_auth_service->StartLso();
   } else if (action == kActionSetAuthCode) {
     std::string code;
     if (!request->GetString(kCode, &code)) {
       NOTREACHED();
       return;
     }
-    arc::ArcAuthService::Get()->SetAuthCodeAndStartArc(code);
+    arc_auth_service->SetAuthCodeAndStartArc(code);
   } else if (action == kActionCancelAuthCode) {
-    arc::ArcAuthService::Get()->CancelAuthCode();
+    arc_auth_service->CancelAuthCode();
   } else {
     NOTREACHED();
   }
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.cc b/chrome/browser/chromeos/attestation/platform_verification_flow.cc
index 2788f04..e52214e 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow.cc
@@ -147,6 +147,9 @@
       challenge(challenge),
       callback(callback) {}
 
+PlatformVerificationFlow::ChallengeContext::ChallengeContext(
+    const ChallengeContext& other) = default;
+
 PlatformVerificationFlow::ChallengeContext::~ChallengeContext() {}
 
 PlatformVerificationFlow::PlatformVerificationFlow()
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.h b/chrome/browser/chromeos/attestation/platform_verification_flow.h
index 3261145..be975d42 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow.h
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow.h
@@ -161,6 +161,7 @@
                      const std::string& service_id,
                      const std::string& challenge,
                      const ChallengeCallback& callback);
+    ChallengeContext(const ChallengeContext& other);
     ~ChallengeContext();
 
     content::WebContents* web_contents;
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_info.cc b/chrome/browser/chromeos/certificate_provider/certificate_info.cc
index 3b4a863..1e56c15b 100644
--- a/chrome/browser/chromeos/certificate_provider/certificate_info.cc
+++ b/chrome/browser/chromeos/certificate_provider/certificate_info.cc
@@ -9,6 +9,8 @@
 
 CertificateInfo::CertificateInfo() {}
 
+CertificateInfo::CertificateInfo(const CertificateInfo& other) = default;
+
 CertificateInfo::~CertificateInfo() {}
 
 }  // namespace certificate_provider
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_info.h b/chrome/browser/chromeos/certificate_provider/certificate_info.h
index ea7c6a5..59eb7b5 100644
--- a/chrome/browser/chromeos/certificate_provider/certificate_info.h
+++ b/chrome/browser/chromeos/certificate_provider/certificate_info.h
@@ -19,6 +19,7 @@
 // to implement net::SSLPrivateKey.
 struct CertificateInfo {
   CertificateInfo();
+  CertificateInfo(const CertificateInfo& other);
   ~CertificateInfo();
 
   net::SSLPrivateKey::Type type = net::SSLPrivateKey::Type::RSA;
diff --git a/chrome/browser/chromeos/certificate_provider/sign_requests.cc b/chrome/browser/chromeos/certificate_provider/sign_requests.cc
index 092077c..3d3ecfc8 100644
--- a/chrome/browser/chromeos/certificate_provider/sign_requests.cc
+++ b/chrome/browser/chromeos/certificate_provider/sign_requests.cc
@@ -11,6 +11,9 @@
 
 SignRequests::RequestsState::RequestsState() {}
 
+SignRequests::RequestsState::RequestsState(const RequestsState& other) =
+    default;
+
 SignRequests::RequestsState::~RequestsState() {}
 
 SignRequests::SignRequests() {}
diff --git a/chrome/browser/chromeos/certificate_provider/sign_requests.h b/chrome/browser/chromeos/certificate_provider/sign_requests.h
index df0b078c..dcb47d5 100644
--- a/chrome/browser/chromeos/certificate_provider/sign_requests.h
+++ b/chrome/browser/chromeos/certificate_provider/sign_requests.h
@@ -41,6 +41,7 @@
   // Holds state of all sign requests to a single extension.
   struct RequestsState {
     RequestsState();
+    RequestsState(const RequestsState& other);
     ~RequestsState();
 
     // Maps from request id to the SignCallback that must be called with the
diff --git a/chrome/browser/chromeos/extensions/install_limiter.cc b/chrome/browser/chromeos/extensions/install_limiter.cc
index 7990a846..5a7de5d2 100644
--- a/chrome/browser/chromeos/extensions/install_limiter.cc
+++ b/chrome/browser/chromeos/extensions/install_limiter.cc
@@ -42,6 +42,9 @@
       path(path) {
 }
 
+InstallLimiter::DeferredInstall::DeferredInstall(const DeferredInstall& other) =
+    default;
+
 InstallLimiter::DeferredInstall::~DeferredInstall() {
 }
 
diff --git a/chrome/browser/chromeos/extensions/install_limiter.h b/chrome/browser/chromeos/extensions/install_limiter.h
index 32c1e28..94b7b78 100644
--- a/chrome/browser/chromeos/extensions/install_limiter.h
+++ b/chrome/browser/chromeos/extensions/install_limiter.h
@@ -45,6 +45,7 @@
   struct DeferredInstall {
     DeferredInstall(const scoped_refptr<CrxInstaller>& installer,
                    const base::FilePath& path);
+    DeferredInstall(const DeferredInstall& other);
     ~DeferredInstall();
 
     const scoped_refptr<CrxInstaller> installer;
diff --git a/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.cc b/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.cc
index 5c82c98..a01759e 100644
--- a/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.cc
+++ b/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.cc
@@ -20,6 +20,9 @@
       type(type) {
 }
 
+FakeDiskMountManager::MountRequest::MountRequest(const MountRequest& other) =
+    default;
+
 FakeDiskMountManager::UnmountRequest::UnmountRequest(
     const std::string& mount_path,
     chromeos::UnmountOptions options)
diff --git a/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h b/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h
index f4f1226fc..0439a86 100644
--- a/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h
+++ b/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h
@@ -23,6 +23,7 @@
                  const std::string& source_format,
                  const std::string& mount_label,
                  chromeos::MountType type);
+    MountRequest(const MountRequest& other);
 
     std::string source_path;
     std::string source_format;
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.cc b/chrome/browser/chromeos/file_manager/file_tasks.cc
index b1d4cee..b17197d 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc
@@ -150,6 +150,9 @@
       is_generic_file_handler_(is_generic_file_handler) {
 }
 
+FullTaskDescriptor::FullTaskDescriptor(const FullTaskDescriptor& other) =
+    default;
+
 void UpdateDefaultTask(PrefService* pref_service,
                        const std::string& task_id,
                        const std::set<std::string>& suffixes,
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.h b/chrome/browser/chromeos/file_manager/file_tasks.h
index b357cc2..5a4f2466 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks.h
+++ b/chrome/browser/chromeos/file_manager/file_tasks.h
@@ -171,6 +171,7 @@
                      const GURL& icon_url,
                      bool is_default,
                      bool is_generic_file_handler);
+  FullTaskDescriptor(const FullTaskDescriptor& other);
   const TaskDescriptor& task_descriptor() const { return task_descriptor_; }
 
   // The title of the task.
diff --git a/chrome/browser/chromeos/file_manager/fileapi_util.cc b/chrome/browser/chromeos/file_manager/fileapi_util.cc
index 4da23f15..5de3560 100644
--- a/chrome/browser/chromeos/file_manager/fileapi_util.cc
+++ b/chrome/browser/chromeos/file_manager/fileapi_util.cc
@@ -414,6 +414,8 @@
 EntryDefinition::EntryDefinition() {
 }
 
+EntryDefinition::EntryDefinition(const EntryDefinition& other) = default;
+
 EntryDefinition::~EntryDefinition() {
 }
 
diff --git a/chrome/browser/chromeos/file_manager/fileapi_util.h b/chrome/browser/chromeos/file_manager/fileapi_util.h
index 4d70e16..06004fd 100644
--- a/chrome/browser/chromeos/file_manager/fileapi_util.h
+++ b/chrome/browser/chromeos/file_manager/fileapi_util.h
@@ -45,6 +45,7 @@
 // Contains all information needed to create an Entry object in custom bindings.
 struct EntryDefinition {
   EntryDefinition();
+  EntryDefinition(const EntryDefinition& other);
   ~EntryDefinition();
 
   std::string file_system_root_url;  // Used to create DOMFileSystem.
diff --git a/chrome/browser/chromeos/file_manager/snapshot_manager.cc b/chrome/browser/chromeos/file_manager/snapshot_manager.cc
index 3cf5f7d5..f33fdfdf9 100644
--- a/chrome/browser/chromeos/file_manager/snapshot_manager.cc
+++ b/chrome/browser/chromeos/file_manager/snapshot_manager.cc
@@ -105,6 +105,9 @@
     int64_t size)
     : file_ref(ref), file_size(size) {}
 
+SnapshotManager::FileReferenceWithSizeInfo::FileReferenceWithSizeInfo(
+    const FileReferenceWithSizeInfo& other) = default;
+
 SnapshotManager::FileReferenceWithSizeInfo::~FileReferenceWithSizeInfo() {
 }
 
diff --git a/chrome/browser/chromeos/file_manager/snapshot_manager.h b/chrome/browser/chromeos/file_manager/snapshot_manager.h
index 5525afca..e530ddf64 100644
--- a/chrome/browser/chromeos/file_manager/snapshot_manager.h
+++ b/chrome/browser/chromeos/file_manager/snapshot_manager.h
@@ -54,6 +54,7 @@
     FileReferenceWithSizeInfo(
         scoped_refptr<storage::ShareableFileReference> ref,
         int64_t size);
+    FileReferenceWithSizeInfo(const FileReferenceWithSizeInfo& other);
     ~FileReferenceWithSizeInfo();
     scoped_refptr<storage::ShareableFileReference> file_ref;
     int64_t file_size;
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.cc b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.cc
index 607133b..c5d6fd8 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.cc
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.cc
@@ -52,6 +52,9 @@
   DCHECK_LE(0, mount_options.opened_files_limit);
 }
 
+ProvidedFileSystemInfo::ProvidedFileSystemInfo(
+    const ProvidedFileSystemInfo& other) = default;
+
 ProvidedFileSystemInfo::~ProvidedFileSystemInfo() {}
 
 }  // namespace file_system_provider
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
index d6ea5e1..6d158ecc 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
@@ -40,6 +40,8 @@
                          bool watchable,
                          extensions::FileSystemProviderSource source);
 
+  ProvidedFileSystemInfo(const ProvidedFileSystemInfo& other);
+
   ~ProvidedFileSystemInfo();
 
   const std::string& extension_id() const { return extension_id_; }
diff --git a/chrome/browser/chromeos/file_system_provider/queue.cc b/chrome/browser/chromeos/file_system_provider/queue.cc
index dca78ea..0db07255 100644
--- a/chrome/browser/chromeos/file_system_provider/queue.cc
+++ b/chrome/browser/chromeos/file_system_provider/queue.cc
@@ -19,6 +19,8 @@
     : token(token), callback(callback) {
 }
 
+Queue::Task::Task(const Task& other) = default;
+
 Queue::Task::~Task() {
 }
 
diff --git a/chrome/browser/chromeos/file_system_provider/queue.h b/chrome/browser/chromeos/file_system_provider/queue.h
index ca40efc..ed8c938 100644
--- a/chrome/browser/chromeos/file_system_provider/queue.h
+++ b/chrome/browser/chromeos/file_system_provider/queue.h
@@ -68,6 +68,7 @@
   struct Task {
     Task();
     Task(size_t token, const AbortableCallback& callback);
+    Task(const Task& other);
     ~Task();
 
     size_t token;
diff --git a/chrome/browser/chromeos/file_system_provider/registry_interface.cc b/chrome/browser/chromeos/file_system_provider/registry_interface.cc
index be64abc..b5b3f2fd 100644
--- a/chrome/browser/chromeos/file_system_provider/registry_interface.cc
+++ b/chrome/browser/chromeos/file_system_provider/registry_interface.cc
@@ -13,6 +13,9 @@
 RegistryInterface::RestoredFileSystem::RestoredFileSystem() {
 }
 
+RegistryInterface::RestoredFileSystem::RestoredFileSystem(
+    const RestoredFileSystem& other) = default;
+
 RegistryInterface::RestoredFileSystem::~RestoredFileSystem() {
 }
 
diff --git a/chrome/browser/chromeos/file_system_provider/registry_interface.h b/chrome/browser/chromeos/file_system_provider/registry_interface.h
index ff34b5b1..d4f63b3 100644
--- a/chrome/browser/chromeos/file_system_provider/registry_interface.h
+++ b/chrome/browser/chromeos/file_system_provider/registry_interface.h
@@ -27,6 +27,7 @@
   // Information about a file system to be restored.
   struct RestoredFileSystem {
     RestoredFileSystem();
+    RestoredFileSystem(const RestoredFileSystem& other);
     ~RestoredFileSystem();
 
     std::string extension_id;
diff --git a/chrome/browser/chromeos/file_system_provider/watcher.cc b/chrome/browser/chromeos/file_system_provider/watcher.cc
index c2dc9a8..f2ae1288 100644
--- a/chrome/browser/chromeos/file_system_provider/watcher.cc
+++ b/chrome/browser/chromeos/file_system_provider/watcher.cc
@@ -24,12 +24,16 @@
 Subscriber::Subscriber() : persistent(false) {
 }
 
+Subscriber::Subscriber(const Subscriber& other) = default;
+
 Subscriber::~Subscriber() {
 }
 
 Watcher::Watcher() : recursive(false) {
 }
 
+Watcher::Watcher(const Watcher& other) = default;
+
 Watcher::~Watcher() {
 }
 
diff --git a/chrome/browser/chromeos/file_system_provider/watcher.h b/chrome/browser/chromeos/file_system_provider/watcher.h
index 2964c97..6c7538e 100644
--- a/chrome/browser/chromeos/file_system_provider/watcher.h
+++ b/chrome/browser/chromeos/file_system_provider/watcher.h
@@ -44,6 +44,7 @@
 // one subscriber per origin for the same watcher.
 struct Subscriber {
   Subscriber();
+  Subscriber(const Subscriber& other);
   ~Subscriber();
 
   // Origin of the subscriber.
@@ -62,6 +63,7 @@
 // Represents a watcher on a file system.
 struct Watcher {
   Watcher();
+  Watcher(const Watcher& other);
   ~Watcher();
 
   // Map of subscribers for notifications of the watcher.
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
index 6a01673..bb90b09 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
@@ -56,6 +56,8 @@
 
 InputMethodEngine::Candidate::Candidate() {}
 
+InputMethodEngine::Candidate::Candidate(const Candidate& other) = default;
+
 InputMethodEngine::Candidate::~Candidate() {}
 
 // When the default values are changed, please modify
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.h b/chrome/browser/chromeos/input_method/input_method_engine.h
index d20b53a3..ca152a3 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.h
+++ b/chrome/browser/chromeos/input_method/input_method_engine.h
@@ -60,6 +60,7 @@
 
   struct Candidate {
     Candidate();
+    Candidate(const Candidate& other);
     virtual ~Candidate();
 
     std::string value;
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.cc
index 783a31e..d955330 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.cc
@@ -16,6 +16,9 @@
 EasyUnlockDeviceKeyData::EasyUnlockDeviceKeyData()
     : bluetooth_type(BLUETOOTH_CLASSIC) {}
 
+EasyUnlockDeviceKeyData::EasyUnlockDeviceKeyData(
+    const EasyUnlockDeviceKeyData& other) = default;
+
 EasyUnlockDeviceKeyData::~EasyUnlockDeviceKeyData() {
 }
 
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h
index 55bc4e4..3a3b894 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h
@@ -23,6 +23,7 @@
   enum BluetoothType { BLUETOOTH_CLASSIC, BLUETOOTH_LE, NUM_BLUETOOTH_TYPES };
 
   EasyUnlockDeviceKeyData();
+  EasyUnlockDeviceKeyData(const EasyUnlockDeviceKeyData& other);
   ~EasyUnlockDeviceKeyData();
 
   // Bluetooth address of the remote device.
diff --git a/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.cc b/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.cc
index 3262593b..a1eadf1 100644
--- a/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.cc
+++ b/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.cc
@@ -47,6 +47,8 @@
 ScreenshotTester::Result::Result() {
 }
 
+ScreenshotTester::Result::Result(const Result& other) = default;
+
 ScreenshotTester::Result::~Result() {
 }
 
diff --git a/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h b/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h
index 7f9938f4..52f2d351 100644
--- a/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h
+++ b/chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h
@@ -29,6 +29,7 @@
   // Contains the results of comparison
   struct Result {
     Result();
+    Result(const Result& other);
     ~Result();
 
     // Is true if screenshots are considered to be equal, false otherwise.
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 65e3240..afec5519 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -1158,7 +1158,9 @@
       DCHECK(arc::ArcServiceManager::Get());
       arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(
           multi_user_util::GetAccountIdFromProfile(profile));
-      arc::ArcAuthService::Get()->OnPrimaryUserProfilePrepared(profile);
+      arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
+      DCHECK(arc_auth_service);
+      arc_auth_service->OnPrimaryUserProfilePrepared(profile);
     }
   }
 
@@ -1812,7 +1814,9 @@
   if (arc::ArcBridgeService::GetEnabled(
           base::CommandLine::ForCurrentProcess())) {
     DCHECK(arc::ArcServiceManager::Get());
-    arc::ArcAuthService::Get()->Shutdown();
+    arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
+    if (arc_auth_service)
+      arc_auth_service->Shutdown();
   }
   token_handle_fetcher_.reset();
   token_handle_util_.reset();
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.cc b/chrome/browser/chromeos/platform_keys/platform_keys.cc
index f026447c..ea709640 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys.cc
+++ b/chrome/browser/chromeos/platform_keys/platform_keys.cc
@@ -53,6 +53,9 @@
 ClientCertificateRequest::ClientCertificateRequest() {
 }
 
+ClientCertificateRequest::ClientCertificateRequest(
+    const ClientCertificateRequest& other) = default;
+
 ClientCertificateRequest::~ClientCertificateRequest() {
 }
 
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.h b/chrome/browser/chromeos/platform_keys/platform_keys.h
index 52d65a5fd..9bccd63 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys.h
+++ b/chrome/browser/chromeos/platform_keys/platform_keys.h
@@ -44,6 +44,7 @@
 
 struct ClientCertificateRequest {
   ClientCertificateRequest();
+  ClientCertificateRequest(const ClientCertificateRequest& other);
   ~ClientCertificateRequest();
 
   // The list of the types of certificates requested, sorted in order of the
diff --git a/chrome/browser/chromeos/policy/device_local_account.cc b/chrome/browser/chromeos/policy/device_local_account.cc
index 7f9672f..194868a5 100644
--- a/chrome/browser/chromeos/policy/device_local_account.cc
+++ b/chrome/browser/chromeos/policy/device_local_account.cc
@@ -42,6 +42,9 @@
       kiosk_app_update_url(kiosk_app_update_url) {
 }
 
+DeviceLocalAccount::DeviceLocalAccount(const DeviceLocalAccount& other) =
+    default;
+
 DeviceLocalAccount::~DeviceLocalAccount() {
 }
 
diff --git a/chrome/browser/chromeos/policy/device_local_account.h b/chrome/browser/chromeos/policy/device_local_account.h
index 8827119..35440af 100644
--- a/chrome/browser/chromeos/policy/device_local_account.h
+++ b/chrome/browser/chromeos/policy/device_local_account.h
@@ -31,6 +31,7 @@
                      const std::string& account_id,
                      const std::string& kiosk_app_id,
                      const std::string& kiosk_app_update_url);
+  DeviceLocalAccount(const DeviceLocalAccount& other);
   ~DeviceLocalAccount();
 
   Type type;
diff --git a/chrome/browser/chromeos/power/cpu_data_collector.cc b/chrome/browser/chromeos/power/cpu_data_collector.cc
index 94fec3195..f8867ab 100644
--- a/chrome/browser/chromeos/power/cpu_data_collector.cc
+++ b/chrome/browser/chromeos/power/cpu_data_collector.cc
@@ -442,6 +442,9 @@
     : cpu_online(false) {
 }
 
+CpuDataCollector::StateOccupancySample::StateOccupancySample(
+    const StateOccupancySample& other) = default;
+
 CpuDataCollector::StateOccupancySample::~StateOccupancySample() {
 }
 
diff --git a/chrome/browser/chromeos/power/cpu_data_collector.h b/chrome/browser/chromeos/power/cpu_data_collector.h
index f4213a56..8693411 100644
--- a/chrome/browser/chromeos/power/cpu_data_collector.h
+++ b/chrome/browser/chromeos/power/cpu_data_collector.h
@@ -29,6 +29,7 @@
  public:
   struct StateOccupancySample {
     StateOccupancySample();
+    StateOccupancySample(const StateOccupancySample& other);
     ~StateOccupancySample();
 
     // The time when the data was sampled.
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.cc b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
index 63701db..c8096af 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.cc
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
@@ -191,6 +191,9 @@
 DeviceSettingsTestHelper::PolicyState::PolicyState()
     : store_result_(true) {}
 
+DeviceSettingsTestHelper::PolicyState::PolicyState(const PolicyState& other) =
+    default;
+
 DeviceSettingsTestHelper::PolicyState::~PolicyState() {}
 
 ScopedDeviceSettingsTestHelper::ScopedDeviceSettingsTestHelper() {
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.h b/chrome/browser/chromeos/settings/device_settings_test_helper.h
index d39bff66f..9782cdd 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.h
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.h
@@ -132,6 +132,7 @@
     std::vector<RetrievePolicyCallback> retrieve_callbacks_;
 
     PolicyState();
+    PolicyState(const PolicyState& other);
     ~PolicyState();
 
     bool HasPendingOperations() const {
diff --git a/chrome/browser/chromeos/system/input_device_settings.cc b/chrome/browser/chromeos/system/input_device_settings.cc
index 980f0fc..a666ba5e 100644
--- a/chrome/browser/chromeos/system/input_device_settings.cc
+++ b/chrome/browser/chromeos/system/input_device_settings.cc
@@ -18,6 +18,8 @@
 TouchpadSettings::TouchpadSettings() {
 }
 
+TouchpadSettings::TouchpadSettings(const TouchpadSettings& other) = default;
+
 TouchpadSettings& TouchpadSettings::operator=(const TouchpadSettings& other) {
   if (&other != this) {
     sensitivity_ = other.sensitivity_;
@@ -137,6 +139,8 @@
 MouseSettings::MouseSettings() {
 }
 
+MouseSettings::MouseSettings(const MouseSettings& other) = default;
+
 MouseSettings& MouseSettings::operator=(const MouseSettings& other) {
   if (&other != this) {
     sensitivity_ = other.sensitivity_;
diff --git a/chrome/browser/chromeos/system/input_device_settings.h b/chrome/browser/chromeos/system/input_device_settings.h
index 99fa69c..da19458 100644
--- a/chrome/browser/chromeos/system/input_device_settings.h
+++ b/chrome/browser/chromeos/system/input_device_settings.h
@@ -78,6 +78,7 @@
 class TouchpadSettings {
  public:
   TouchpadSettings();
+  TouchpadSettings(const TouchpadSettings& other);
   TouchpadSettings& operator=(const TouchpadSettings& other);
 
   void SetSensitivity(int value);
@@ -125,6 +126,7 @@
 class MouseSettings {
  public:
   MouseSettings();
+  MouseSettings(const MouseSettings& other);
   MouseSettings& operator=(const MouseSettings& other);
 
   void SetSensitivity(int value);
diff --git a/chrome/browser/component_updater/caps_installer_win.cc b/chrome/browser/component_updater/caps_installer_win.cc
index cd4cd9b..a02bf53 100644
--- a/chrome/browser/component_updater/caps_installer_win.cc
+++ b/chrome/browser/component_updater/caps_installer_win.cc
@@ -110,6 +110,8 @@
 
   // This string is shown in chrome://components.
   std::string GetName() const override { return "Chrome Crash Service"; }
+
+  std::string GetAp() const override { return std::string(); }
 };
 
 }  // namespace
diff --git a/chrome/browser/component_updater/chrome_component_updater_configurator.cc b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
index 97e99e7..dd32dad33 100644
--- a/chrome/browser/component_updater/chrome_component_updater_configurator.cc
+++ b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
@@ -13,6 +13,7 @@
 #if defined(OS_WIN)
 #include "base/win/win_util.h"
 #endif
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/component_updater/component_patcher_operation_out_of_process.h"
 #include "chrome/browser/google/google_brand.h"
 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
@@ -21,6 +22,7 @@
 #include "chrome/installer/util/google_update_settings.h"
 #endif
 #include "components/component_updater/configurator_impl.h"
+#include "components/prefs/pref_service.h"
 #include "content/public/browser/browser_thread.h"
 
 namespace component_updater {
@@ -55,6 +57,7 @@
   bool UseCupSigning() const override;
   scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
       const override;
+  PrefService* GetPrefService() const override;
 
  private:
   friend class base::RefCountedThreadSafe<ChromeConfigurator>;
@@ -172,6 +175,10 @@
           base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
 }
 
+PrefService* ChromeConfigurator::GetPrefService() const {
+  return g_browser_process->local_state();
+}
+
 }  // namespace
 
 scoped_refptr<update_client::Configurator>
diff --git a/chrome/browser/component_updater/cld_component_installer.cc b/chrome/browser/component_updater/cld_component_installer.cc
index e96e001..672848fc 100644
--- a/chrome/browser/component_updater/cld_component_installer.cc
+++ b/chrome/browser/component_updater/cld_component_installer.cc
@@ -113,6 +113,10 @@
   return kCldManifestName;
 }
 
+std::string CldComponentInstallerTraits::GetAp() const {
+  return std::string();
+}
+
 // static
 void RegisterCldComponent(ComponentUpdateService* cus) {
   if (!translate::CldDataSource::IsUsingComponentDataSource()) {
diff --git a/chrome/browser/component_updater/cld_component_installer.h b/chrome/browser/component_updater/cld_component_installer.h
index 7fc25d1..7a27976 100644
--- a/chrome/browser/component_updater/cld_component_installer.h
+++ b/chrome/browser/component_updater/cld_component_installer.h
@@ -53,6 +53,7 @@
   base::FilePath GetBaseDirectory() const override;
   void GetHash(std::vector<uint8_t>* hash) const override;
   std::string GetName() const override;
+  std::string GetAp() const override;
 
   static base::FilePath GetInstalledPath(const base::FilePath& base);
 
diff --git a/chrome/browser/component_updater/component_installers_unittest.cc b/chrome/browser/component_updater/component_installers_unittest.cc
index 57db885..e56b51c 100644
--- a/chrome/browser/component_updater/component_installers_unittest.cc
+++ b/chrome/browser/component_updater/component_installers_unittest.cc
@@ -10,7 +10,7 @@
 #include "base/path_service.h"
 #include "base/version.h"
 #include "build/build_config.h"
-#include "chrome/browser/component_updater/flash_component_installer.h"
+#include "chrome/browser/component_updater/pepper_flash_component_installer.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/pepper_flash.h"
 #include "content/public/test/test_browser_thread.h"
diff --git a/chrome/browser/component_updater/ev_whitelist_component_installer.cc b/chrome/browser/component_updater/ev_whitelist_component_installer.cc
index db98433..c543611 100644
--- a/chrome/browser/component_updater/ev_whitelist_component_installer.cc
+++ b/chrome/browser/component_updater/ev_whitelist_component_installer.cc
@@ -132,6 +132,10 @@
   return kEVWhitelistManifestName;
 }
 
+std::string EVWhitelistComponentInstallerTraits::GetAp() const {
+  return std::string();
+}
+
 void RegisterEVWhitelistComponent(ComponentUpdateService* cus,
                                   const base::FilePath& user_data_dir) {
   VLOG(1) << "Registering EV whitelist component.";
diff --git a/chrome/browser/component_updater/ev_whitelist_component_installer.h b/chrome/browser/component_updater/ev_whitelist_component_installer.h
index 933c345..99b5d18 100644
--- a/chrome/browser/component_updater/ev_whitelist_component_installer.h
+++ b/chrome/browser/component_updater/ev_whitelist_component_installer.h
@@ -41,6 +41,7 @@
   base::FilePath GetBaseDirectory() const override;
   void GetHash(std::vector<uint8_t>* hash) const override;
   std::string GetName() const override;
+  std::string GetAp() const override;
 
   static base::FilePath GetInstalledPath(const base::FilePath& base);
 
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc
index d2124ed..4072febc 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -2,8 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include <stdint.h>
-#include <string.h>
+#include "chrome/browser/component_updater/pepper_flash_component_installer.h"
+
+#include <stddef.h>
+
+#include <memory>
+#include <string>
 #include <vector>
 
 #include "base/base_paths.h"
@@ -12,6 +16,7 @@
 #include "base/files/file_enumerator.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
+#include "base/json/json_reader.h"
 #include "base/logging.h"
 #include "base/path_service.h"
 #include "base/stl_util.h"
@@ -20,7 +25,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/version.h"
 #include "build/build_config.h"
-#include "chrome/browser/component_updater/flash_component_installer.h"
 #include "chrome/browser/plugins/plugin_prefs.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths.h"
@@ -289,6 +293,25 @@
     NOTREACHED() << "Pepper Flash component registration failed.";
 }
 
+bool ValidatePepperFlashManifest(const base::FilePath& path) {
+  base::FilePath manifest_path(path.DirName().AppendASCII("manifest.json"));
+
+  std::string manifest_data;
+  if (!base::ReadFileToString(manifest_path, &manifest_data))
+    return false;
+  std::unique_ptr<base::Value> manifest_value(
+      base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS));
+  if (!manifest_value.get())
+    return false;
+  base::DictionaryValue* manifest = NULL;
+  if (!manifest_value->GetAsDictionary(&manifest))
+    return false;
+  Version version;
+  if (!chrome::CheckPepperFlashManifest(*manifest, &version))
+    return false;
+  return true;
+}
+
 void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   base::FilePath path;
@@ -309,10 +332,17 @@
   if (GetPepperFlashDirectory(&path, &version, &older_dirs)) {
     path = path.Append(chrome::kPepperFlashPluginFilename);
     if (base::PathExists(path)) {
-      BrowserThread::PostTask(
-          BrowserThread::UI,
-          FROM_HERE,
-          base::Bind(&RegisterPepperFlashWithChrome, path, version));
+      // Only register component pepper flash if it validates manifest check.
+      if (ValidatePepperFlashManifest(path)) {
+        BrowserThread::PostTask(
+            BrowserThread::UI,
+            FROM_HERE,
+            base::Bind(&RegisterPepperFlashWithChrome, path, version));
+      } else {
+        // Queue this version to be deleted.
+        older_dirs.push_back(path.DirName());
+        version = Version(kNullVersion);
+      }
     } else {
       version = Version(kNullVersion);
     }
diff --git a/chrome/browser/component_updater/flash_component_installer.h b/chrome/browser/component_updater/pepper_flash_component_installer.h
similarity index 73%
rename from chrome/browser/component_updater/flash_component_installer.h
rename to chrome/browser/component_updater/pepper_flash_component_installer.h
index b4e54754c..3f81ffc 100644
--- a/chrome/browser/component_updater/flash_component_installer.h
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.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.
 
-#ifndef CHROME_BROWSER_COMPONENT_UPDATER_FLASH_COMPONENT_INSTALLER_H_
-#define CHROME_BROWSER_COMPONENT_UPDATER_FLASH_COMPONENT_INSTALLER_H_
+#ifndef CHROME_BROWSER_COMPONENT_UPDATER_PEPPER_FLASH_COMPONENT_INSTALLER_H_
+#define CHROME_BROWSER_COMPONENT_UPDATER_PEPPER_FLASH_COMPONENT_INSTALLER_H_
 
 namespace base {
 class DictionaryValue;
@@ -21,4 +21,4 @@
 
 }  // namespace component_updater
 
-#endif  // CHROME_BROWSER_COMPONENT_UPDATER_FLASH_COMPONENT_INSTALLER_H_
+#endif  // CHROME_BROWSER_COMPONENT_UPDATER_PEPPER_FLASH_COMPONENT_INSTALLER_H_
diff --git a/chrome/browser/component_updater/sth_set_component_installer.cc b/chrome/browser/component_updater/sth_set_component_installer.cc
index 7b1bf7b..d26c8784 100644
--- a/chrome/browser/component_updater/sth_set_component_installer.cc
+++ b/chrome/browser/component_updater/sth_set_component_installer.cc
@@ -104,6 +104,10 @@
   return kSTHSetFetcherManifestName;
 }
 
+std::string STHSetComponentInstallerTraits::GetAp() const {
+  return std::string();
+}
+
 void STHSetComponentInstallerTraits::LoadSTHsFromDisk(
     const base::FilePath& sths_path,
     const base::Version& version) {
diff --git a/chrome/browser/component_updater/sth_set_component_installer.h b/chrome/browser/component_updater/sth_set_component_installer.h
index 0b99544c..d02061f0 100644
--- a/chrome/browser/component_updater/sth_set_component_installer.h
+++ b/chrome/browser/component_updater/sth_set_component_installer.h
@@ -60,6 +60,7 @@
   base::FilePath GetBaseDirectory() const override;
   void GetHash(std::vector<uint8_t>* hash) const override;
   std::string GetName() const override;
+  std::string GetAp() const override;
 
   // Reads and parses the on-disk json.
   void LoadSTHsFromDisk(const base::FilePath& sths_file_path,
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
index 42f3ed6..323bfbc 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
@@ -258,6 +258,7 @@
   base::FilePath GetBaseDirectory() const override;
   void GetHash(std::vector<uint8_t>* hash) const override;
   std::string GetName() const override;
+  std::string GetAp() const override;
 
   std::string crx_id_;
   std::string name_;
@@ -318,6 +319,10 @@
   return name_;
 }
 
+std::string SupervisedUserWhitelistComponentInstallerTraits::GetAp() const {
+  return std::string();
+}
+
 class SupervisedUserWhitelistInstallerImpl
     : public SupervisedUserWhitelistInstaller,
       public ProfileAttributesStorage::Observer {
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc
index f69c808..7d930fc 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -137,6 +137,8 @@
 
   std::string GetName() const override { return "Software Reporter Tool"; }
 
+  std::string GetAp() const override { return std::string(); }
+
   static base::FilePath install_dir() {
     // The base directory on windows looks like:
     // <profile>\AppData\Local\Google\Chrome\User Data\SwReporter\.
diff --git a/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
index f7b135e9..8458acf 100644
--- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc
+++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc
@@ -249,6 +249,7 @@
   base::FilePath GetBaseDirectory() const override;
   void GetHash(std::vector<uint8_t>* hash) const override;
   std::string GetName() const override;
+  std::string GetAp() const override;
 
   // Checks and updates CDM adapter if necessary to make sure the latest CDM
   // adapter is always used.
@@ -323,6 +324,10 @@
   return kWidevineCdmDisplayName;
 }
 
+std::string WidevineCdmComponentInstallerTraits::GetAp() const {
+  return std::string();
+}
+
 void WidevineCdmComponentInstallerTraits::UpdateCdmAdapter(
     const base::Version& cdm_version,
     const base::FilePath& cdm_install_dir,
diff --git a/chrome/browser/extensions/api/developer_private/extension_info_generator.h b/chrome/browser/extensions/api/developer_private/extension_info_generator.h
index 54f770b..8fb11cc 100644
--- a/chrome/browser/extensions/api/developer_private/extension_info_generator.h
+++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.h
@@ -7,9 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/linked_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/common/extensions/api/developer_private.h"
 
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
index 6593ceb1..ac2fbd1a 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
@@ -74,6 +74,9 @@
       require_user_consent(require_user_consent),
       callback(callback) {}
 
+EPKPChallengeKeyBase::PrepareKeyContext::PrepareKeyContext(
+    const PrepareKeyContext& other) = default;
+
 EPKPChallengeKeyBase::PrepareKeyContext::~PrepareKeyContext() {
 }
 
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h
index 24adc2d8..074bdde6 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h
+++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h
@@ -132,6 +132,7 @@
                           certificate_profile,
                       bool require_user_consent,
                       const base::Callback<void(PrepareKeyResult)>& callback);
+    PrepareKeyContext(const PrepareKeyContext& other);
     ~PrepareKeyContext();
 
     chromeos::attestation::AttestationKeyType key_type;
diff --git a/chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h b/chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h
index 0283c444..30f6a68f 100644
--- a/chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h
+++ b/chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_SAMPLING_H_
 #define CHROME_BROWSER_EXTENSIONS_API_EXPERIENCE_SAMPLING_PRIVATE_EXPERIENCE_SAMPLING_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "chrome/common/extensions/api/experience_sampling_private.h"
 
diff --git a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc b/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc
index 28c787b3..5ddebb39 100644
--- a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc
+++ b/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.cc
@@ -42,7 +42,7 @@
 RequestFileSystemDialogView::~RequestFileSystemDialogView() {
 }
 
-base::string16 RequestFileSystemDialogView::GetDialogTitle() const {
+base::string16 RequestFileSystemDialogView::GetAccessibleWindowTitle() const {
   return l10n_util::GetStringUTF16(
       IDS_FILE_SYSTEM_REQUEST_FILE_SYSTEM_DIALOG_TITLE);
 }
diff --git a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h b/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h
index 46c60e7a..f113f0b7 100644
--- a/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h
+++ b/chrome/browser/extensions/api/file_system/request_file_system_dialog_view.h
@@ -40,7 +40,7 @@
       const base::Callback<void(ui::DialogButton)>& callback);
 
   // views::DialogDelegate overrides:
-  base::string16 GetDialogTitle() const override;
+  base::string16 GetAccessibleWindowTitle() const override;
   int GetDefaultDialogButton() const override;
   base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
   ui::ModalType GetModalType() const override;
diff --git a/chrome/browser/extensions/api/image_writer_private/operation.h b/chrome/browser/extensions/api/image_writer_private/operation.h
index c524d255..6710298c 100644
--- a/chrome/browser/extensions/api/image_writer_private/operation.h
+++ b/chrome/browser/extensions/api/image_writer_private/operation.h
@@ -7,6 +7,8 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/files/file.h"
 #include "base/files/scoped_temp_dir.h"
diff --git a/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_win.cc b/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_win.cc
index 86038b3..a48c2b7e 100644
--- a/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_win.cc
+++ b/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_win.cc
@@ -3,15 +3,18 @@
 // found in the LICENSE file.
 
 // devguid requires Windows.h be imported first.
+#include "chrome/browser/extensions/api/image_writer_private/removable_storage_provider.h"
+
 #include <windows.h>
 #include <setupapi.h>
 #include <winioctl.h>
 
+#include <memory>
+
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/win/scoped_handle.h"
-#include "chrome/browser/extensions/api/image_writer_private/removable_storage_provider.h"
 
 namespace extensions {
 
diff --git a/chrome/browser/extensions/api/log_private/filter_handler.cc b/chrome/browser/extensions/api/log_private/filter_handler.cc
index 62b9d25..10e60068 100644
--- a/chrome/browser/extensions/api/log_private/filter_handler.cc
+++ b/chrome/browser/extensions/api/log_private/filter_handler.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/extensions/api/log_private/filter_handler.h"
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <vector>
 
diff --git a/chrome/browser/extensions/api/networking_private/crypto_verify_impl.cc b/chrome/browser/extensions/api/networking_private/crypto_verify_impl.cc
index bc51164..1c2834d 100644
--- a/chrome/browser/extensions/api/networking_private/crypto_verify_impl.cc
+++ b/chrome/browser/extensions/api/networking_private/crypto_verify_impl.cc
@@ -178,6 +178,8 @@
   public_key = properties.public_key;
 }
 
+CryptoVerifyImpl::Credentials::Credentials(const Credentials& other) = default;
+
 CryptoVerifyImpl::Credentials::~Credentials() {
 }
 
diff --git a/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h b/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h
index 799be28a..fe8ed7d 100644
--- a/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h
+++ b/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h
@@ -26,6 +26,7 @@
     // VerificationProperties are not copyable so define a struct that can be
     // passed to tasks on the worker thread.
     explicit Credentials(const VerificationProperties& properties);
+    Credentials(const Credentials& other);
     ~Credentials();
 
     std::string certificate;
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h
index 3b570b8..7ec1ade 100644
--- a/chrome/browser/extensions/extension_tab_util.h
+++ b/chrome/browser/extensions/extension_tab_util.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_
 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
diff --git a/chrome/browser/extensions/updater/chrome_update_client_config.cc b/chrome/browser/extensions/updater/chrome_update_client_config.cc
index 4dfb696..bbc38547 100644
--- a/chrome/browser/extensions/updater/chrome_update_client_config.cc
+++ b/chrome/browser/extensions/updater/chrome_update_client_config.cc
@@ -9,6 +9,7 @@
 #include "chrome/browser/google/google_brand.h"
 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
 #include "chrome/common/channel_info.h"
+#include "components/prefs/pref_service.h"
 #include "content/public/browser/browser_context.h"
 
 namespace extensions {
@@ -100,6 +101,10 @@
   return impl_.UseCupSigning();
 }
 
+PrefService* ChromeUpdateClientConfig::GetPrefService() const {
+  return nullptr;
+}
+
 ChromeUpdateClientConfig::~ChromeUpdateClientConfig() {}
 
 }  // namespace extensions
diff --git a/chrome/browser/extensions/updater/chrome_update_client_config.h b/chrome/browser/extensions/updater/chrome_update_client_config.h
index 36318c5..0b5bd70f 100644
--- a/chrome/browser/extensions/updater/chrome_update_client_config.h
+++ b/chrome/browser/extensions/updater/chrome_update_client_config.h
@@ -43,6 +43,7 @@
   bool DeltasEnabled() const override;
   bool UseBackgroundDownloader() const override;
   bool UseCupSigning() const override;
+  PrefService* GetPrefService() const override;
 
  protected:
   friend class base::RefCountedThreadSafe<ChromeUpdateClientConfig>;
diff --git a/chrome/browser/extensions/updater/local_extension_cache.cc b/chrome/browser/extensions/updater/local_extension_cache.cc
index 7370999..28f9b65 100644
--- a/chrome/browser/extensions/updater/local_extension_cache.cc
+++ b/chrome/browser/extensions/updater/local_extension_cache.cc
@@ -616,6 +616,9 @@
       size(size),
       file_path(file_path) {}
 
+LocalExtensionCache::CacheItemInfo::CacheItemInfo(const CacheItemInfo& other) =
+    default;
+
 LocalExtensionCache::CacheItemInfo::~CacheItemInfo() {
 }
 
diff --git a/chrome/browser/extensions/updater/local_extension_cache.h b/chrome/browser/extensions/updater/local_extension_cache.h
index acf4e283..0df6692 100644
--- a/chrome/browser/extensions/updater/local_extension_cache.h
+++ b/chrome/browser/extensions/updater/local_extension_cache.h
@@ -118,6 +118,7 @@
                   const base::Time& last_used,
                   uint64_t size,
                   const base::FilePath& file_path);
+    CacheItemInfo(const CacheItemInfo& other);
     ~CacheItemInfo();
   };
   typedef std::multimap<std::string, CacheItemInfo> CacheMap;
diff --git a/chrome/browser/extensions/window_controller.h b/chrome/browser/extensions/window_controller.h
index c54a98b..3a2673f 100644
--- a/chrome/browser/extensions/window_controller.h
+++ b/chrome/browser/extensions/window_controller.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
diff --git a/chrome/browser/internal_auth.cc b/chrome/browser/internal_auth.cc
index 33fed11..a520add 100644
--- a/chrome/browser/internal_auth.cc
+++ b/chrome/browser/internal_auth.cc
@@ -14,6 +14,7 @@
 #include "base/base64.h"
 #include "base/lazy_instance.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/rand_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_split.h"
diff --git a/chrome/browser/media/android/remote/remote_media_player_bridge.h b/chrome/browser/media/android/remote/remote_media_player_bridge.h
index 570737f83..80038bc 100644
--- a/chrome/browser/media/android/remote/remote_media_player_bridge.h
+++ b/chrome/browser/media/android/remote/remote_media_player_bridge.h
@@ -143,7 +143,7 @@
   const std::string user_agent_;
 
   base::android::ScopedJavaGlobalRef<jobject> java_bridge_;
-  scoped_ptr<std::string> casting_message_;
+  std::unique_ptr<std::string> casting_message_;
 
   // NOTE: Weak pointers must be invalidated before all other member variables.
   base::WeakPtrFactory<RemoteMediaPlayerBridge> weak_factory_;
diff --git a/chrome/browser/media/android/remote/remote_media_player_manager.cc b/chrome/browser/media/android/remote/remote_media_player_manager.cc
index 8e6ca8f..90b70ea6 100644
--- a/chrome/browser/media/android/remote/remote_media_player_manager.cc
+++ b/chrome/browser/media/android/remote/remote_media_player_manager.cc
@@ -148,7 +148,8 @@
   if (it == alternative_players_.end())
     return;
   MediaPlayerAndroid* new_player = *it;
-  scoped_ptr<MediaPlayerAndroid> old_player = SwapPlayer(player_id, new_player);
+  std::unique_ptr<MediaPlayerAndroid> old_player =
+      SwapPlayer(player_id, new_player);
   alternative_players_.weak_erase(it);
   alternative_players_.push_back(old_player.release());
 }
diff --git a/chrome/browser/media/android/remote/remote_media_player_manager.h b/chrome/browser/media/android/remote/remote_media_player_manager.h
index 6276797..3f09b9e 100644
--- a/chrome/browser/media/android/remote/remote_media_player_manager.h
+++ b/chrome/browser/media/android/remote/remote_media_player_manager.h
@@ -5,12 +5,12 @@
 #ifndef CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_
 #define CHROME_BROWSER_MEDIA_ANDROID_REMOTE_REMOTE_MEDIA_PLAYER_MANAGER_H_
 
+#include <memory>
 #include <set>
 #include <unordered_map>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "chrome/browser/media/android/remote/remote_media_player_bridge.h"
 #include "content/browser/media/android/browser_media_player_manager.h"
diff --git a/chrome/browser/media/android/router/media_router_android.cc b/chrome/browser/media/android/router/media_router_android.cc
index 391cfef5..76face5 100644
--- a/chrome/browser/media/android/router/media_router_android.cc
+++ b/chrome/browser/media/android/router/media_router_android.cc
@@ -14,6 +14,7 @@
 #include "base/android/jni_string.h"
 #include "base/guid.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/scoped_vector.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/android/tab_android.h"
@@ -80,7 +81,7 @@
     bool off_the_record) {
   // TODO(avayvod): Implement timeouts (crbug.com/583036).
   if (!origin.is_valid()) {
-    scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
+    std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
         "Invalid origin", RouteRequestResult::INVALID_ORIGIN);
     for (const MediaRouteResponseCallback& callback : callbacks)
       callback.Run(*result);
@@ -152,7 +153,7 @@
     bool off_the_record) {
   // TODO(avayvod): Implement timeouts (crbug.com/583036).
   if (!origin.is_valid()) {
-    scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
+    std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
         "Invalid origin", RouteRequestResult::INVALID_ORIGIN);
     for (const MediaRouteResponseCallback& callback : callbacks)
       callback.Run(*result);
@@ -222,7 +223,7 @@
 
 void MediaRouterAndroid::SendRouteBinaryMessage(
     const MediaRoute::Id& route_id,
-    scoped_ptr<std::vector<uint8_t>> data,
+    std::unique_ptr<std::vector<uint8_t>> data,
     const SendRouteMessageCallback& callback) {
   int callback_id =
       message_callbacks_.Add(new SendRouteMessageCallback(callback));
@@ -262,7 +263,7 @@
       sinks_observers_.get(source_id);
   if (!observer_list) {
     observer_list = new base::ObserverList<MediaSinksObserver>;
-    sinks_observers_.add(source_id, make_scoped_ptr(observer_list));
+    sinks_observers_.add(source_id, base::WrapUnique(observer_list));
   } else {
     DCHECK(!observer_list->HasObserver(observer));
   }
@@ -327,7 +328,7 @@
   auto* observer_list = messages_observers_.get(route_id);
   if (!observer_list) {
     observer_list = new base::ObserverList<PresentationSessionMessagesObserver>;
-    messages_observers_.add(route_id, make_scoped_ptr(observer_list));
+    messages_observers_.add(route_id, base::WrapUnique(observer_list));
   } else {
     DCHECK(!observer_list->HasObserver(observer));
   }
@@ -394,8 +395,8 @@
 
   // TODO(crbug.com/588239): Call OnOffTheRecordRouteCreated() if |route|
   // is OTR
-  scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromSuccess(
-      make_scoped_ptr(new MediaRoute(route)), request->presentation_id);
+  std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromSuccess(
+      base::WrapUnique(new MediaRoute(route)), request->presentation_id);
   for (const MediaRouteResponseCallback& callback : request->callbacks)
     callback.Run(*result);
 
@@ -416,7 +417,7 @@
     return;
 
   // TODO(imcheng): Provide a more specific result code.
-  scoped_ptr<RouteRequestResult> result =
+  std::unique_ptr<RouteRequestResult> result =
       RouteRequestResult::FromError(ConvertJavaStringToUTF8(env, jerror_text),
                                     RouteRequestResult::UNKNOWN_ERROR);
   for (const MediaRouteResponseCallback& callback : request->callbacks)
@@ -460,7 +461,7 @@
     return;
 
   ScopedVector<content::PresentationSessionMessage> session_messages;
-  scoped_ptr<content::PresentationSessionMessage> message(
+  std::unique_ptr<content::PresentationSessionMessage> message(
       new content::PresentationSessionMessage(content::TEXT));
   message->message = ConvertJavaStringToUTF8(env, jmessage);
   session_messages.push_back(std::move(message));
diff --git a/chrome/browser/media/android/router/media_router_android.h b/chrome/browser/media/android/router/media_router_android.h
index dfaf57f..416c2d7 100644
--- a/chrome/browser/media/android/router/media_router_android.h
+++ b/chrome/browser/media/android/router/media_router_android.h
@@ -8,11 +8,12 @@
 #include <jni.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/android/scoped_java_ref.h"
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chrome/browser/media/router/media_router_base.h"
 
@@ -61,7 +62,7 @@
                         const SendRouteMessageCallback& callback) override;
   void SendRouteBinaryMessage(
       const MediaRoute::Id& route_id,
-      scoped_ptr<std::vector<uint8_t>> data,
+      std::unique_ptr<std::vector<uint8_t>> data,
       const SendRouteMessageCallback& callback) override;
   void AddIssue(const Issue& issue) override;
   void ClearIssue(const Issue::Id& issue_id) override;
@@ -131,7 +132,7 @@
 
   using MediaSinkObservers = base::ScopedPtrHashMap<
       MediaSource::Id,
-      scoped_ptr<base::ObserverList<MediaSinksObserver>>>;
+      std::unique_ptr<base::ObserverList<MediaSinksObserver>>>;
   MediaSinkObservers sinks_observers_;
 
   base::ObserverList<MediaRoutesObserver> routes_observers_;
@@ -160,7 +161,7 @@
 
   using MessagesObservers = base::ScopedPtrHashMap<
       MediaRoute::Id,
-      scoped_ptr<base::ObserverList<PresentationSessionMessagesObserver>>>;
+      std::unique_ptr<base::ObserverList<PresentationSessionMessagesObserver>>>;
   MessagesObservers messages_observers_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid);
diff --git a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
index bacba80..ced3e13 100644
--- a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
+++ b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
@@ -40,8 +40,8 @@
     JNIEnv* env,
     const JavaParamRef<jobject>& obj,
     const JavaParamRef<jstring>& jsink_id) {
-  scoped_ptr<CreatePresentationConnectionRequest> create_connection_request =
-      TakeCreateConnectionRequest();
+  std::unique_ptr<CreatePresentationConnectionRequest>
+      create_connection_request = TakeCreateConnectionRequest();
   const PresentationRequest& presentation_request =
       create_connection_request->presentation_request();
   const MediaSource::Id source_id = presentation_request.GetMediaSource().id();
@@ -81,7 +81,7 @@
 }
 
 void MediaRouterDialogControllerAndroid::CancelPresentationRequest() {
-  scoped_ptr<CreatePresentationConnectionRequest> request =
+  std::unique_ptr<CreatePresentationConnectionRequest> request =
       TakeCreateConnectionRequest();
   DCHECK(request);
 
diff --git a/chrome/browser/media/android/router/media_router_dialog_controller_android.h b/chrome/browser/media/android/router/media_router_dialog_controller_android.h
index 65144e8..1d74b1e9 100644
--- a/chrome/browser/media/android/router/media_router_dialog_controller_android.h
+++ b/chrome/browser/media/android/router/media_router_dialog_controller_android.h
@@ -7,9 +7,10 @@
 
 #include <jni.h>
 
+#include <memory>
+
 #include "base/android/scoped_java_ref.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chrome/browser/media/router/media_router_dialog_controller.h"
 #include "content/public/browser/web_contents_user_data.h"
 
diff --git a/chrome/browser/media/cast_transport_host_filter.cc b/chrome/browser/media/cast_transport_host_filter.cc
index c3982da..273d6ffa 100644
--- a/chrome/browser/media/cast_transport_host_filter.cc
+++ b/chrome/browser/media/cast_transport_host_filter.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/media/cast_transport_host_filter.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/common/cast_messages.h"
@@ -25,9 +26,10 @@
 
   void OnStatusChanged(media::cast::CastTransportStatus status) final;
   void OnLoggingEventsReceived(
-      scoped_ptr<std::vector<media::cast::FrameEvent>> frame_events,
-      scoped_ptr<std::vector<media::cast::PacketEvent>> packet_events) final;
-  void ProcessRtpPacket(scoped_ptr<media::cast::Packet> packet) final;
+      std::unique_ptr<std::vector<media::cast::FrameEvent>> frame_events,
+      std::unique_ptr<std::vector<media::cast::PacketEvent>> packet_events)
+      final;
+  void ProcessRtpPacket(std::unique_ptr<media::cast::Packet> packet) final;
 
  private:
   const int32_t channel_id_;
@@ -42,15 +44,16 @@
 }
 
 void TransportClient::OnLoggingEventsReceived(
-    scoped_ptr<std::vector<media::cast::FrameEvent>> frame_events,
-    scoped_ptr<std::vector<media::cast::PacketEvent>> packet_events) {
+    std::unique_ptr<std::vector<media::cast::FrameEvent>> frame_events,
+    std::unique_ptr<std::vector<media::cast::PacketEvent>> packet_events) {
   if (frame_events->empty() && packet_events->empty())
     return;
   cast_transport_host_filter_->Send(
       new CastMsg_RawEvents(channel_id_, *packet_events, *frame_events));
 }
 
-void TransportClient::ProcessRtpPacket(scoped_ptr<media::cast::Packet> packet) {
+void TransportClient::ProcessRtpPacket(
+    std::unique_ptr<media::cast::Packet> packet) {
   cast_transport_host_filter_->Send(
       new CastMsg_ReceivedPacket(channel_id_, *packet));
 }
@@ -135,17 +138,17 @@
     id_map_.Remove(channel_id);
   }
 
-  scoped_ptr<media::cast::UdpTransport> udp_transport(
+  std::unique_ptr<media::cast::UdpTransport> udp_transport(
       new media::cast::UdpTransport(
           g_browser_process->net_log(), base::ThreadTaskRunnerHandle::Get(),
           local_end_point, remote_end_point,
           base::Bind(&CastTransportHostFilter::OnStatusChanged,
                      weak_factory_.GetWeakPtr(), channel_id)));
   udp_transport->SetUdpOptions(options);
-  scoped_ptr<media::cast::CastTransport> sender =
+  std::unique_ptr<media::cast::CastTransport> sender =
       media::cast::CastTransport::Create(
           &clock_, base::TimeDelta::FromSeconds(kSendRawEventsIntervalSecs),
-          make_scoped_ptr(new TransportClient(channel_id, this)),
+          base::WrapUnique(new TransportClient(channel_id, this)),
           std::move(udp_transport), base::ThreadTaskRunnerHandle::Get());
   sender->SetOptions(options);
   id_map_.AddWithID(sender.release(), channel_id);
diff --git a/chrome/browser/media/cast_transport_host_filter.h b/chrome/browser/media/cast_transport_host_filter.h
index 04616f1..4f0c803 100644
--- a/chrome/browser/media/cast_transport_host_filter.h
+++ b/chrome/browser/media/cast_transport_host_filter.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/default_tick_clock.h"
 #include "content/public/browser/browser_message_filter.h"
@@ -98,7 +99,7 @@
   // While |id_map_| is non-empty, hold an instance of
   // content::PowerSaveBlocker.  This prevents Chrome from being suspended while
   // remoting content.
-  scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
+  std::unique_ptr<content::PowerSaveBlocker> power_save_blocker_;
 
   base::WeakPtrFactory<CastTransportHostFilter> weak_factory_;
 
diff --git a/chrome/browser/media/combined_desktop_media_list.cc b/chrome/browser/media/combined_desktop_media_list.cc
index 633af05..8ef6f8c 100644
--- a/chrome/browser/media/combined_desktop_media_list.cc
+++ b/chrome/browser/media/combined_desktop_media_list.cc
@@ -5,7 +5,7 @@
 #include "chrome/browser/media/combined_desktop_media_list.h"
 
 CombinedDesktopMediaList::CombinedDesktopMediaList(
-    std::vector<scoped_ptr<DesktopMediaList>>& media_lists)
+    std::vector<std::unique_ptr<DesktopMediaList>>& media_lists)
     : media_lists_(std::move(media_lists)) {
   DCHECK(media_lists_.size());
 }
diff --git a/chrome/browser/media/combined_desktop_media_list.h b/chrome/browser/media/combined_desktop_media_list.h
index 2df5b9050..263242e 100644
--- a/chrome/browser/media/combined_desktop_media_list.h
+++ b/chrome/browser/media/combined_desktop_media_list.h
@@ -5,9 +5,9 @@
 #ifndef CHROME_BROWSER_MEDIA_COMBINED_DESKTOP_MEDIA_LIST_H_
 #define CHROME_BROWSER_MEDIA_COMBINED_DESKTOP_MEDIA_LIST_H_
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "chrome/browser/media/desktop_media_list.h"
 #include "chrome/browser/media/desktop_media_list_observer.h"
 
@@ -19,7 +19,7 @@
                                  public DesktopMediaListObserver {
  public:
   explicit CombinedDesktopMediaList(
-      std::vector<scoped_ptr<DesktopMediaList>>& media_lists);
+      std::vector<std::unique_ptr<DesktopMediaList>>& media_lists);
   ~CombinedDesktopMediaList() override;
 
   // DesktopMediaList interface.
@@ -40,7 +40,7 @@
   void OnSourceNameChanged(DesktopMediaList* list, int index) override;
   void OnSourceThumbnailChanged(DesktopMediaList* list, int index) override;
 
-  std::vector<scoped_ptr<DesktopMediaList>> media_lists_;
+  std::vector<std::unique_ptr<DesktopMediaList>> media_lists_;
 
   DesktopMediaListObserver* observer_ = nullptr;
 
diff --git a/chrome/browser/media/combined_desktop_media_list_unittest.cc b/chrome/browser/media/combined_desktop_media_list_unittest.cc
index e5da4506..53828e6 100644
--- a/chrome/browser/media/combined_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/combined_desktop_media_list_unittest.cc
@@ -134,10 +134,10 @@
     list1_ = new FakeDesktopMediaListBaseImpl(DesktopMediaID::TYPE_SCREEN);
     list2_ = new FakeDesktopMediaListBaseImpl(DesktopMediaID::TYPE_WINDOW);
 
-    scoped_ptr<DesktopMediaList> list1(list1_);
-    scoped_ptr<DesktopMediaList> list2(list2_);
+    std::unique_ptr<DesktopMediaList> list1(list1_);
+    std::unique_ptr<DesktopMediaList> list2(list2_);
 
-    std::vector<scoped_ptr<DesktopMediaList>> lists;
+    std::vector<std::unique_ptr<DesktopMediaList>> lists;
     lists.push_back(std::move(list1));
     lists.push_back(std::move(list2));
 
@@ -203,7 +203,7 @@
   MockObserver observer_;
   FakeDesktopMediaListBaseImpl* list1_;
   FakeDesktopMediaListBaseImpl* list2_;
-  scoped_ptr<CombinedDesktopMediaList> combined_list_;
+  std::unique_ptr<CombinedDesktopMediaList> combined_list_;
 
   base::MessageLoop message_loop_;
   content::TestBrowserThread ui_thread_;
diff --git a/chrome/browser/media/desktop_capture_access_handler.cc b/chrome/browser/media/desktop_capture_access_handler.cc
index 1875d453..ff396eb 100644
--- a/chrome/browser/media/desktop_capture_access_handler.cc
+++ b/chrome/browser/media/desktop_capture_access_handler.cc
@@ -162,7 +162,7 @@
 // Helper to get list of media stream devices for desktop capture in |devices|.
 // Registers to display notification if |display_notification| is true.
 // Returns an instance of MediaStreamUI to be passed to content layer.
-scoped_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture(
+std::unique_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture(
     content::MediaStreamDevices* devices,
     content::DesktopMediaID media_id,
     bool capture_audio,
@@ -170,7 +170,7 @@
     const base::string16& application_title,
     const base::string16& registered_extension_name) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  scoped_ptr<content::MediaStreamUI> ui;
+  std::unique_ptr<content::MediaStreamUI> ui;
 
   // Add selected desktop source to the list.
   devices->push_back(content::MediaStreamDevice(
@@ -236,7 +236,7 @@
     const content::MediaResponseCallback& callback,
     const extensions::Extension* extension) {
   content::MediaStreamDevices devices;
-  scoped_ptr<content::MediaStreamUI> ui;
+  std::unique_ptr<content::MediaStreamUI> ui;
 
   DCHECK_EQ(request.video_type, content::MEDIA_DESKTOP_VIDEO_CAPTURE);
 
@@ -368,7 +368,7 @@
     const content::MediaResponseCallback& callback,
     const extensions::Extension* extension) {
   content::MediaStreamDevices devices;
-  scoped_ptr<content::MediaStreamUI> ui;
+  std::unique_ptr<content::MediaStreamUI> ui;
 
   if (request.video_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
     callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui));
diff --git a/chrome/browser/media/desktop_media_list_ash_unittest.cc b/chrome/browser/media/desktop_media_list_ash_unittest.cc
index 0d63f6df..06e4172 100644
--- a/chrome/browser/media/desktop_media_list_ash_unittest.cc
+++ b/chrome/browser/media/desktop_media_list_ash_unittest.cc
@@ -47,7 +47,7 @@
 
  protected:
   MockDesktopMediaListObserver observer_;
-  scoped_ptr<DesktopMediaListAsh> list_;
+  std::unique_ptr<DesktopMediaListAsh> list_;
   DISALLOW_COPY_AND_ASSIGN(DesktopMediaListAshTest);
 };
 
@@ -70,7 +70,7 @@
 TEST_F(DesktopMediaListAshTest, OneWindow) {
   CreateList(DesktopMediaListAsh::SCREENS | DesktopMediaListAsh::WINDOWS);
 
-  scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
+  std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
 
   EXPECT_CALL(observer_, OnSourceAdded(list_.get(), 0));
   EXPECT_CALL(observer_, OnSourceAdded(list_.get(), 1));
@@ -91,7 +91,7 @@
 TEST_F(DesktopMediaListAshTest, ScreenOnly) {
   CreateList(DesktopMediaListAsh::SCREENS);
 
-  scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
+  std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
 
   EXPECT_CALL(observer_, OnSourceAdded(list_.get(), 0));
   EXPECT_CALL(observer_, OnSourceThumbnailChanged(list_.get(), 0))
@@ -112,7 +112,7 @@
 TEST_F(DesktopMediaListAshTest, MAYBE_WindowOnly) {
   CreateList(DesktopMediaListAsh::WINDOWS);
 
-  scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
+  std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
 
   EXPECT_CALL(observer_, OnSourceAdded(list_.get(), 0));
   EXPECT_CALL(observer_, OnSourceThumbnailChanged(list_.get(), 0))
diff --git a/chrome/browser/media/desktop_media_picker.h b/chrome/browser/media/desktop_media_picker.h
index 22e9e1a..cb144c5 100644
--- a/chrome/browser/media/desktop_media_picker.h
+++ b/chrome/browser/media/desktop_media_picker.h
@@ -5,9 +5,10 @@
 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_
 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_
 
+#include <memory>
+
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "content/public/browser/desktop_media_id.h"
 #include "ui/gfx/native_widget_types.h"
@@ -26,7 +27,7 @@
 
   // Creates default implementation of DesktopMediaPicker for the current
   // platform.
-  static scoped_ptr<DesktopMediaPicker> Create();
+  static std::unique_ptr<DesktopMediaPicker> Create();
 
   DesktopMediaPicker() {}
   virtual ~DesktopMediaPicker() {}
@@ -39,7 +40,7 @@
                     gfx::NativeWindow parent,
                     const base::string16& app_name,
                     const base::string16& target_name,
-                    scoped_ptr<DesktopMediaList> list,
+                    std::unique_ptr<DesktopMediaList> list,
                     bool request_audio,
                     const DoneCallback& done_callback) = 0;
 
diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc
index 496758fc..ffcf367 100644
--- a/chrome/browser/media/encrypted_media_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_browsertest.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <utility>
 
 #include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/win/windows_version.h"
@@ -196,7 +196,8 @@
   // 'licenseServerURL' query parameter to |query_params|.
   void StartLicenseServerIfNeeded(const std::string& key_system,
                                   base::StringPairs* query_params) {
-    scoped_ptr<TestLicenseServerConfig> config = GetServerConfig(key_system);
+    std::unique_ptr<TestLicenseServerConfig> config =
+        GetServerConfig(key_system);
     if (!config)
       return;
     license_server_.reset(new TestLicenseServer(std::move(config)));
@@ -213,11 +214,12 @@
     return true;
   }
 
-  scoped_ptr<TestLicenseServerConfig> GetServerConfig(
+  std::unique_ptr<TestLicenseServerConfig> GetServerConfig(
       const std::string& key_system) {
 #if defined(WIDEVINE_CDM_AVAILABLE)
     if (IsWidevine(key_system)) {
-      scoped_ptr<TestLicenseServerConfig> config(new WVTestLicenseServerConfig);
+      std::unique_ptr<TestLicenseServerConfig> config(
+          new WVTestLicenseServerConfig);
       if (config->IsPlatformSupported())
         return config;
     }
@@ -226,7 +228,7 @@
   }
 
  protected:
-  scoped_ptr<TestLicenseServer> license_server_;
+  std::unique_ptr<TestLicenseServer> license_server_;
 
   // We want to fail quickly when a test fails because an error is encountered.
   void AddWaitForTitles(content::TitleWatcher* title_watcher) override {
diff --git a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
index a6987c5..29dd138d 100644
--- a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
@@ -173,7 +173,7 @@
 
     // Load the test page needed so that checkKeySystemWithMediaMimeType()
     // is available.
-    scoped_ptr<net::EmbeddedTestServer> http_test_server(
+    std::unique_ptr<net::EmbeddedTestServer> http_test_server(
         new net::EmbeddedTestServer);
     http_test_server->ServeFilesFromSourceDirectory(media::GetTestDataPath());
     CHECK(http_test_server->Start());
diff --git a/chrome/browser/media/extension_media_access_handler.cc b/chrome/browser/media/extension_media_access_handler.cc
index 0aec2bb..719e713 100644
--- a/chrome/browser/media/extension_media_access_handler.cc
+++ b/chrome/browser/media/extension_media_access_handler.cc
@@ -137,7 +137,7 @@
         profile, get_default_audio_device, get_default_video_device, &devices);
   }
 
-  scoped_ptr<content::MediaStreamUI> ui;
+  std::unique_ptr<content::MediaStreamUI> ui;
   if (!devices.empty()) {
     result = content::MEDIA_DEVICE_OK;
     ui = MediaCaptureDevicesDispatcher::GetInstance()
diff --git a/chrome/browser/media/media_browsertest.cc b/chrome/browser/media/media_browsertest.cc
index d02f752..4cbb771c 100644
--- a/chrome/browser/media/media_browsertest.cc
+++ b/chrome/browser/media/media_browsertest.cc
@@ -37,7 +37,7 @@
                                         bool http) {
   GURL gurl;
   std::string query = media::GetURLQueryString(query_params);
-  scoped_ptr<net::EmbeddedTestServer> http_test_server;
+  std::unique_ptr<net::EmbeddedTestServer> http_test_server;
   if (http) {
     DVLOG(0) << base::TimeFormatTimeOfDayWithMilliseconds(base::Time::Now())
              << " Starting HTTP server";
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.h b/chrome/browser/media/media_capture_devices_dispatcher.h
index 13cd57b..306025a 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.h
+++ b/chrome/browser/media/media_capture_devices_dispatcher.h
@@ -8,10 +8,10 @@
 #include <deque>
 #include <list>
 #include <map>
+#include <memory>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/singleton.h"
 #include "base/observer_list.h"
@@ -181,7 +181,7 @@
 
   scoped_refptr<MediaStreamCaptureIndicator> media_stream_capture_indicator_;
 
-  scoped_ptr<DesktopStreamsRegistry> desktop_streams_registry_;
+  std::unique_ptr<DesktopStreamsRegistry> desktop_streams_registry_;
 
   // Handlers for processing media access requests.
   ScopedVector<MediaAccessHandler> media_access_handlers_;
diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc
index 65771d5b..883de483 100644
--- a/chrome/browser/media/media_stream_capture_indicator.cc
+++ b/chrome/browser/media/media_stream_capture_indicator.cc
@@ -5,12 +5,14 @@
 #include "chrome/browser/media/media_stream_capture_indicator.h"
 
 #include <stddef.h>
+
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/browser_process.h"
@@ -108,7 +110,7 @@
   bool IsCapturingVideo() const { return video_ref_count_ > 0; }
   bool IsMirroring() const { return mirroring_ref_count_ > 0; }
 
-  scoped_ptr<content::MediaStreamUI> RegisterMediaStream(
+  std::unique_ptr<content::MediaStreamUI> RegisterMediaStream(
       const content::MediaStreamDevices& devices);
 
   // Increment ref-counts up based on the type of each device provided.
@@ -170,11 +172,10 @@
   DISALLOW_COPY_AND_ASSIGN(UIDelegate);
 };
 
-
-scoped_ptr<content::MediaStreamUI>
+std::unique_ptr<content::MediaStreamUI>
 MediaStreamCaptureIndicator::WebContentsDeviceUsage::RegisterMediaStream(
     const content::MediaStreamDevices& devices) {
-  return make_scoped_ptr(new UIDelegate( weak_factory_.GetWeakPtr(), devices));
+  return base::WrapUnique(new UIDelegate(weak_factory_.GetWeakPtr(), devices));
 }
 
 void MediaStreamCaptureIndicator::WebContentsDeviceUsage::AddDevices(
@@ -239,14 +240,14 @@
          !BrowserThread::IsMessageLoopValid(BrowserThread::UI));
 }
 
-scoped_ptr<content::MediaStreamUI>
+std::unique_ptr<content::MediaStreamUI>
 MediaStreamCaptureIndicator::RegisterMediaStream(
     content::WebContents* web_contents,
     const content::MediaStreamDevices& devices) {
   WebContentsDeviceUsage* usage = usage_map_.get(web_contents);
   if (!usage) {
     usage = new WebContentsDeviceUsage(this, web_contents);
-    usage_map_.add(web_contents, make_scoped_ptr(usage));
+    usage_map_.add(web_contents, base::WrapUnique(usage));
   }
   return usage->RegisterMediaStream(devices);
 }
@@ -364,7 +365,7 @@
 void MediaStreamCaptureIndicator::UpdateNotificationUserInterface() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
-  scoped_ptr<StatusIconMenuModel> menu(new StatusIconMenuModel(this));
+  std::unique_ptr<StatusIconMenuModel> menu(new StatusIconMenuModel(this));
   bool audio = false;
   bool video = false;
   int command_id = IDC_MEDIA_CONTEXT_MEDIA_STREAM_CAPTURE_LIST_FIRST;
diff --git a/chrome/browser/media/media_stream_capture_indicator.h b/chrome/browser/media/media_stream_capture_indicator.h
index d37bd16..6ae3185 100644
--- a/chrome/browser/media/media_stream_capture_indicator.h
+++ b/chrome/browser/media/media_stream_capture_indicator.h
@@ -34,7 +34,7 @@
 
   // Registers a new media stream for |web_contents| and returns UI object
   // that's used by the content layer to notify about state of the stream.
-  scoped_ptr<content::MediaStreamUI> RegisterMediaStream(
+  std::unique_ptr<content::MediaStreamUI> RegisterMediaStream(
       content::WebContents* web_contents,
       const content::MediaStreamDevices& devices);
 
@@ -95,7 +95,8 @@
   // A map that contains the usage counts of the opened capture devices for each
   // WebContents instance.
   base::ScopedPtrHashMap<content::WebContents*,
-                         scoped_ptr<WebContentsDeviceUsage>> usage_map_;
+                         std::unique_ptr<WebContentsDeviceUsage>>
+      usage_map_;
 
   // A vector which maps command IDs to their associated WebContents
   // instance. This is rebuilt each time the status tray icon context menu is
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc
index 109dc542..515cc99 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -9,6 +9,7 @@
 
 #include "base/auto_reset.h"
 #include "base/callback_helpers.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
@@ -91,8 +92,8 @@
 class MediaPermissionRequestLogger : content::WebContentsObserver {
   // Map of <render process id, render frame id> ->
   // MediaPermissionRequestLogger.
-  using RequestMap =
-      std::map<std::pair<int, int>, scoped_ptr<MediaPermissionRequestLogger>>;
+  using RequestMap = std::map<std::pair<int, int>,
+                              std::unique_ptr<MediaPermissionRequestLogger>>;
 
  public:
   static void LogRequest(content::WebContents* contents,
@@ -105,7 +106,7 @@
       UMA_HISTOGRAM_BOOLEAN("Pepper.SecureOrigin.MediaStreamRequest",
                             is_secure);
       GetRequestMap()[key] =
-          make_scoped_ptr(new MediaPermissionRequestLogger(contents, key));
+          base::WrapUnique(new MediaPermissionRequestLogger(contents, key));
     }
   }
 
@@ -202,7 +203,7 @@
         request_, base::Bind(PermissionUmaUtil::PermissionIgnored));
     callback_.Run(content::MediaStreamDevices(),
                   content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN,
-                  scoped_ptr<content::MediaStreamUI>());
+                  std::unique_ptr<content::MediaStreamUI>());
   }
 }
 
@@ -445,7 +446,7 @@
     request_result = content::MEDIA_DEVICE_NO_HARDWARE;
   }
 
-  scoped_ptr<content::MediaStreamUI> ui;
+  std::unique_ptr<content::MediaStreamUI> ui;
   if (!devices.empty()) {
     ui = MediaCaptureDevicesDispatcher::GetInstance()
              ->GetMediaStreamCaptureIndicator()
diff --git a/chrome/browser/media/media_stream_devices_controller_browsertest.cc b/chrome/browser/media/media_stream_devices_controller_browsertest.cc
index 1c341fb2..bb1d9d6 100644
--- a/chrome/browser/media/media_stream_devices_controller_browsertest.cc
+++ b/chrome/browser/media/media_stream_devices_controller_browsertest.cc
@@ -54,7 +54,7 @@
   // Dummy callback for when we deny the current request directly.
   void OnMediaStreamResponse(const content::MediaStreamDevices& devices,
                              content::MediaStreamRequestResult result,
-                             scoped_ptr<content::MediaStreamUI> ui) {
+                             std::unique_ptr<content::MediaStreamUI> ui) {
     media_stream_devices_ = devices;
     media_stream_result_ = result;
   }
@@ -510,9 +510,9 @@
   MediaCaptureDevicesDispatcher* dispatcher =
       MediaCaptureDevicesDispatcher::GetInstance();
   dispatcher->SetTestVideoCaptureDevices(video_devices);
-  scoped_ptr<content::MediaStreamUI> video_stream_ui =
-      dispatcher->GetMediaStreamCaptureIndicator()->
-          RegisterMediaStream(GetWebContents(), video_devices);
+  std::unique_ptr<content::MediaStreamUI> video_stream_ui =
+      dispatcher->GetMediaStreamCaptureIndicator()->RegisterMediaStream(
+          GetWebContents(), video_devices);
   video_stream_ui->OnStarted(base::Closure());
 
   // Request mic and deny.
diff --git a/chrome/browser/media/media_stream_infobar_browsertest.cc b/chrome/browser/media/media_stream_infobar_browsertest.cc
index 5b25b57..1ba1799 100644
--- a/chrome/browser/media/media_stream_infobar_browsertest.cc
+++ b/chrome/browser/media/media_stream_infobar_browsertest.cc
@@ -75,9 +75,10 @@
   }
 
   // Dummy callback for when we deny the current request directly.
-  static void OnMediaStreamResponse(const content::MediaStreamDevices& devices,
-                                    content::MediaStreamRequestResult result,
-                                    scoped_ptr<content::MediaStreamUI> ui) {}
+  static void OnMediaStreamResponse(
+      const content::MediaStreamDevices& devices,
+      content::MediaStreamRequestResult result,
+      std::unique_ptr<content::MediaStreamUI> ui) {}
 
   DISALLOW_COPY_AND_ASSIGN(MediaStreamPermissionTest);
 };
diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.cc b/chrome/browser/media/media_stream_infobar_delegate_android.cc
index ab1c0462..fe04c526 100644
--- a/chrome/browser/media/media_stream_infobar_delegate_android.cc
+++ b/chrome/browser/media/media_stream_infobar_delegate_android.cc
@@ -39,7 +39,7 @@
 // static
 bool MediaStreamInfoBarDelegateAndroid::Create(
     content::WebContents* web_contents,
-    scoped_ptr<MediaStreamDevicesController> controller) {
+    std::unique_ptr<MediaStreamDevicesController> controller) {
   InfoBarService* infobar_service =
       InfoBarService::FromWebContents(web_contents);
   if (!infobar_service) {
@@ -49,9 +49,10 @@
     return false;
   }
 
-  scoped_ptr<infobars::InfoBar> infobar(
-      infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
-          new MediaStreamInfoBarDelegateAndroid(std::move(controller)))));
+  std::unique_ptr<infobars::InfoBar> infobar(
+      infobar_service->CreateConfirmInfoBar(
+          std::unique_ptr<ConfirmInfoBarDelegate>(
+              new MediaStreamInfoBarDelegateAndroid(std::move(controller)))));
   for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
     infobars::InfoBar* old_infobar = infobar_service->infobar_at(i);
     if (old_infobar->delegate()->AsMediaStreamInfoBarDelegateAndroid()) {
@@ -77,7 +78,7 @@
 }
 
 MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid(
-    scoped_ptr<MediaStreamDevicesController> controller)
+    std::unique_ptr<MediaStreamDevicesController> controller)
     : ConfirmInfoBarDelegate(), controller_(std::move(controller)) {
   DCHECK(controller_.get());
   DCHECK(controller_->IsAskingForAudio() || controller_->IsAskingForVideo());
diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.h b/chrome/browser/media/media_stream_infobar_delegate_android.h
index 8e2d8dd..ca82113 100644
--- a/chrome/browser/media/media_stream_infobar_delegate_android.h
+++ b/chrome/browser/media/media_stream_infobar_delegate_android.h
@@ -26,7 +26,7 @@
   // found, or just adds the new infobar otherwise.  Returns whether an infobar
   // was created.
   static bool Create(content::WebContents* web_contents,
-                     scoped_ptr<MediaStreamDevicesController> controller);
+                     std::unique_ptr<MediaStreamDevicesController> controller);
 
   bool IsRequestingVideoAccess() const;
   bool IsRequestingMicrophoneAccess() const;
@@ -35,7 +35,7 @@
   friend class WebRtcTestBase;
 
   explicit MediaStreamInfoBarDelegateAndroid(
-      scoped_ptr<MediaStreamDevicesController> controller);
+      std::unique_ptr<MediaStreamDevicesController> controller);
 
   // ConfirmInfoBarDelegate:
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
@@ -51,7 +51,7 @@
   base::string16 GetLinkText() const override;
   GURL GetLinkURL() const override;
 
-  scoped_ptr<MediaStreamDevicesController> controller_;
+  std::unique_ptr<MediaStreamDevicesController> controller_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegateAndroid);
 };
diff --git a/chrome/browser/media/midi_permission_infobar_delegate_android.cc b/chrome/browser/media/midi_permission_infobar_delegate_android.cc
index d09a25112..9e65adc 100644
--- a/chrome/browser/media/midi_permission_infobar_delegate_android.cc
+++ b/chrome/browser/media/midi_permission_infobar_delegate_android.cc
@@ -16,10 +16,10 @@
     InfoBarService* infobar_service,
     const GURL& requesting_frame,
     const PermissionSetCallback& callback) {
-  return infobar_service->AddInfoBar(
-      infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
-          new MidiPermissionInfoBarDelegateAndroid(
-              requesting_frame, callback))));
+  return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
+      std::unique_ptr<ConfirmInfoBarDelegate>(
+          new MidiPermissionInfoBarDelegateAndroid(requesting_frame,
+                                                   callback))));
 }
 
 MidiPermissionInfoBarDelegateAndroid::MidiPermissionInfoBarDelegateAndroid(
diff --git a/chrome/browser/media/native_desktop_media_list.cc b/chrome/browser/media/native_desktop_media_list.cc
index 36b8a74..0ef0e18 100644
--- a/chrome/browser/media/native_desktop_media_list.cc
+++ b/chrome/browser/media/native_desktop_media_list.cc
@@ -43,7 +43,7 @@
   return base::Hash(reinterpret_cast<char*>(frame->data()), data_size);
 }
 
-gfx::ImageSkia ScaleDesktopFrame(scoped_ptr<webrtc::DesktopFrame> frame,
+gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
                                  gfx::Size size) {
   gfx::Rect scaled_rect = media::ComputeLetterboxRegion(
       gfx::Rect(0, 0, size.width(), size.height()),
@@ -83,8 +83,8 @@
     : public webrtc::DesktopCapturer::Callback {
  public:
   Worker(base::WeakPtr<NativeDesktopMediaList> media_list,
-         scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
-         scoped_ptr<webrtc::WindowCapturer> window_capturer);
+         std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
+         std::unique_ptr<webrtc::WindowCapturer> window_capturer);
   ~Worker() override;
 
   void Refresh(const DesktopMediaID::Id& view_dialog_id);
@@ -100,10 +100,10 @@
 
   base::WeakPtr<NativeDesktopMediaList> media_list_;
 
-  scoped_ptr<webrtc::ScreenCapturer> screen_capturer_;
-  scoped_ptr<webrtc::WindowCapturer> window_capturer_;
+  std::unique_ptr<webrtc::ScreenCapturer> screen_capturer_;
+  std::unique_ptr<webrtc::WindowCapturer> window_capturer_;
 
-  scoped_ptr<webrtc::DesktopFrame> current_frame_;
+  std::unique_ptr<webrtc::DesktopFrame> current_frame_;
 
   ImageHashesMap image_hashes_;
 
@@ -112,8 +112,8 @@
 
 NativeDesktopMediaList::Worker::Worker(
     base::WeakPtr<NativeDesktopMediaList> media_list,
-    scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
-    scoped_ptr<webrtc::WindowCapturer> window_capturer)
+    std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
+    std::unique_ptr<webrtc::WindowCapturer> window_capturer)
     : media_list_(media_list),
       screen_capturer_(std::move(screen_capturer)),
       window_capturer_(std::move(window_capturer)) {
@@ -229,8 +229,8 @@
 }
 
 NativeDesktopMediaList::NativeDesktopMediaList(
-    scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
-    scoped_ptr<webrtc::WindowCapturer> window_capturer)
+    std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
+    std::unique_ptr<webrtc::WindowCapturer> window_capturer)
     : DesktopMediaListBase(
           base::TimeDelta::FromMilliseconds(kDefaultUpdatePeriod)),
       weak_factory_(this) {
@@ -249,9 +249,9 @@
 
 void NativeDesktopMediaList::Refresh() {
 #if defined(USE_AURA)
-  pending_aura_capture_requests_ = 0;
+  DCHECK_EQ(pending_aura_capture_requests_, 0);
+  DCHECK(!pending_native_thumbnail_capture_);
   new_aura_thumbnail_hashes_.clear();
-  pending_native_thumbnail_capture_ = true;
 #endif
 
   capture_task_runner_->PostTask(
@@ -262,7 +262,11 @@
 void NativeDesktopMediaList::RefreshForAuraWindows(
     std::vector<SourceDescription> sources) {
 #if defined(USE_AURA)
+  // Associate aura id with native id.
   for (auto& source : sources) {
+    if (source.id.type != DesktopMediaID::TYPE_WINDOW)
+      continue;
+
     aura::Window* aura_window = NULL;
 #if defined(OS_WIN)
     aura_window = views::DesktopWindowTreeHostWin::GetContentWindowForHWND(
@@ -271,7 +275,6 @@
     aura_window =
         views::DesktopWindowTreeHostX11::GetContentWindowForXID(source.id.id);
 #endif  // defined(USE_X11) && !defined(OS_CHROMEOS)
-    // Associate aura id with native id.
     if (aura_window) {
       DesktopMediaID aura_id = DesktopMediaID::RegisterAuraWindow(
           DesktopMediaID::TYPE_WINDOW, aura_window);
@@ -282,6 +285,13 @@
 
   UpdateSourcesList(sources);
 
+  // OnAuraThumbnailCaptured() and UpdateNativeThumbnailsFinished() are
+  // guaranteed to be excuted after RefreshForAuraWindows() and
+  // CaptureAuraWindowThumbnail() in the browser UI thread.
+  // Therefore pending_aura_capture_requests_ will be set the number of aura
+  // windows to be captured and pending_native_thumbnail_capture_ will be set
+  // true if native thumbnail capture is needed before OnAuraThumbnailCaptured()
+  // or UpdateNativeThumbnailsFinished() are called.
   std::vector<DesktopMediaID> native_ids;
   for (const auto& source : sources) {
 #if defined(USE_AURA)
@@ -293,10 +303,15 @@
     native_ids.push_back(source.id);
   }
 
-  capture_task_runner_->PostTask(
-      FROM_HERE,
-      base::Bind(&Worker::RefreshThumbnails, base::Unretained(worker_.get()),
-                 native_ids, thumbnail_size_));
+  if (native_ids.size() > 0) {
+#if defined(USE_AURA)
+    pending_native_thumbnail_capture_ = true;
+#endif
+    capture_task_runner_->PostTask(
+        FROM_HERE,
+        base::Bind(&Worker::RefreshThumbnails, base::Unretained(worker_.get()),
+                   native_ids, thumbnail_size_));
+  }
 }
 
 void NativeDesktopMediaList::UpdateNativeThumbnailsFinished() {
diff --git a/chrome/browser/media/native_desktop_media_list.h b/chrome/browser/media/native_desktop_media_list.h
index 1da648f56..6dbbe55 100644
--- a/chrome/browser/media/native_desktop_media_list.h
+++ b/chrome/browser/media/native_desktop_media_list.h
@@ -5,7 +5,8 @@
 #ifndef CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
 #define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner.h"
 #include "chrome/browser/media/desktop_media_list_base.h"
@@ -25,8 +26,8 @@
   // types of sources the model should be populated with (e.g. it will only
   // contain windows, if |screen_capturer| is NULL).
   NativeDesktopMediaList(
-      scoped_ptr<webrtc::ScreenCapturer> screen_capturer,
-      scoped_ptr<webrtc::WindowCapturer> window_capturer);
+      std::unique_ptr<webrtc::ScreenCapturer> screen_capturer,
+      std::unique_ptr<webrtc::WindowCapturer> window_capturer);
   ~NativeDesktopMediaList() override;
 
  private:
@@ -54,7 +55,7 @@
   // An object that does all the work of getting list of sources on a background
   // thread (see |capture_task_runner_|). Destroyed on |capture_task_runner_|
   // after the model is destroyed.
-  scoped_ptr<Worker> worker_;
+  std::unique_ptr<Worker> worker_;
 
 #if defined(USE_AURA)
   // previous_aura_thumbnail_hashes_ holds thumbanil hash values of aura windows
@@ -65,9 +66,8 @@
   ImageHashesMap new_aura_thumbnail_hashes_;
 
   int pending_aura_capture_requests_ = 0;
-  bool pending_native_thumbnail_capture_ = true;
+  bool pending_native_thumbnail_capture_ = false;
 #endif
-
   base::WeakPtrFactory<NativeDesktopMediaList> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaList);
diff --git a/chrome/browser/media/native_desktop_media_list_unittest.cc b/chrome/browser/media/native_desktop_media_list_unittest.cc
index 07ba3ecd9..2b2c2c2 100644
--- a/chrome/browser/media/native_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/native_desktop_media_list_unittest.cc
@@ -7,10 +7,10 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
+#include <vector>
 
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/synchronization/lock.h"
@@ -21,12 +21,25 @@
 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
 #include "third_party/webrtc/modules/desktop_capture/window_capturer.h"
+#include "ui/aura/window.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/views/test/views_test_base.h"
+#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
+#include "ui/views/widget/widget.h"
 
+using content::DesktopMediaID;
 using testing::_;
 using testing::DoAll;
 
 namespace {
 
+static const int kDefaultWindowCount = 2;
+#if defined(USE_AURA)
+static const int kDefaultAuraCount = 1;
+#else
+static const int kDefaultAuraCount = 0;
+#endif
+
 class MockObserver : public DesktopMediaListObserver {
  public:
   MOCK_METHOD2(OnSourceAdded, void(DesktopMediaList* list, int index));
@@ -135,6 +148,8 @@
   DISALLOW_COPY_AND_ASSIGN(FakeWindowCapturer);
 };
 
+}  // namespace
+
 ACTION_P2(CheckListSize, model, expected_list_size) {
   EXPECT_EQ(expected_list_size, model->GetSourceCount());
 }
@@ -144,38 +159,149 @@
       FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
 }
 
-class DesktopMediaListTest : public testing::Test {
+class NativeDesktopMediaListTest : public views::ViewsTestBase {
  public:
-  DesktopMediaListTest()
-      : window_capturer_(NULL),
-        ui_thread_(content::BrowserThread::UI,
-                   &message_loop_) {
+  NativeDesktopMediaListTest()
+      : ui_thread_(content::BrowserThread::UI, message_loop()) {}
+
+  void TearDown() override {
+    for (size_t i = 0; i < desktop_widgets_.size(); i++)
+      desktop_widgets_[i].reset();
+
+    ViewsTestBase::TearDown();
   }
 
-  void CreateWithDefaultCapturers() {
-    window_capturer_ = new FakeWindowCapturer();
+  void CreateWithCapturers(bool screen, bool window) {
+    webrtc::ScreenCapturer* screen_capturer = nullptr;
+    if (screen)
+      screen_capturer = new FakeScreenCapturer();
+
+    if (window)
+      window_capturer_ = new FakeWindowCapturer();
+    else
+      window_capturer_ = nullptr;
+
     model_.reset(new NativeDesktopMediaList(
-        scoped_ptr<webrtc::ScreenCapturer>(new FakeScreenCapturer()),
-        scoped_ptr<webrtc::WindowCapturer>(window_capturer_)));
+        std::unique_ptr<webrtc::ScreenCapturer>(screen_capturer),
+        std::unique_ptr<webrtc::WindowCapturer>(window_capturer_)));
 
     // Set update period to reduce the time it takes to run tests.
-    model_->SetUpdatePeriod(base::TimeDelta::FromMilliseconds(0));
+    model_->SetUpdatePeriod(base::TimeDelta::FromMilliseconds(5));
   }
 
-  webrtc::WindowCapturer::WindowList AddWindowsAndVerify(
-      size_t count, bool window_only) {
-    webrtc::WindowCapturer::WindowList list;
-    for (size_t i = 0; i < count; ++i) {
-      webrtc::WindowCapturer::Window window;
-      window.id = i + 1;
-      window.title = "Test window";
-      list.push_back(window);
+  void AddNativeWindow(int id) {
+    webrtc::WindowCapturer::Window window;
+    window.id = id;
+    window.title = "Test window";
+    window_list_.push_back(window);
+  }
+
+#if defined(USE_AURA)
+  std::unique_ptr<views::Widget> CreateDesktopWidget() {
+    std::unique_ptr<views::Widget> widget(new views::Widget);
+    views::Widget::InitParams params;
+    params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
+    params.accept_events = false;
+    params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
+    params.native_widget = new views::DesktopNativeWidgetAura(widget.get());
+    params.bounds = gfx::Rect(0, 0, 20, 20);
+    widget->Init(params);
+    widget->Show();
+    return widget;
+  }
+
+  void AddAuraWindow() {
+    webrtc::WindowCapturer::Window window;
+    window.title = "Test window";
+    // Create a aura native widow through a widget.
+    desktop_widgets_.push_back(CreateDesktopWidget());
+    // Get the native window's id.
+    aura::Window* aura_window = desktop_widgets_.back()->GetNativeWindow();
+    gfx::AcceleratedWidget widget =
+        aura_window->GetHost()->GetAcceleratedWidget();
+#if defined(OS_WIN)
+    window.id = reinterpret_cast<DesktopMediaID::Id>(widget);
+#else
+    window.id = widget;
+#endif
+    // Get the aura window's id.
+    DesktopMediaID aura_id = DesktopMediaID::RegisterAuraWindow(
+        DesktopMediaID::TYPE_WINDOW, aura_window);
+    native_aura_id_map_[window.id] = aura_id.aura_id;
+
+    window_list_.push_back(window);
+  }
+
+  void RemoveAuraWindow(int index) {
+    DCHECK_LT(index, static_cast<int>(desktop_widgets_.size()));
+
+    // Get the native window's id.
+    aura::Window* aura_window = desktop_widgets_[index]->GetNativeWindow();
+    gfx::AcceleratedWidget widget =
+        aura_window->GetHost()->GetAcceleratedWidget();
+#if defined(OS_WIN)
+    int native_id = reinterpret_cast<DesktopMediaID::Id>(widget);
+#else
+    int native_id = widget;
+#endif
+    // Remove the widget and assoicate aura window.
+    desktop_widgets_.erase(desktop_widgets_.begin() + index);
+    // Remove the aura window from the window list.
+    size_t i;
+    for (i = 0; i < window_list_.size(); i++) {
+      if (window_list_[i].id == native_id)
+        break;
     }
-    window_capturer_->SetWindowList(list);
+    DCHECK_LT(i, window_list_.size());
+    window_list_.erase(window_list_.begin() + i);
+    native_aura_id_map_.erase(native_id);
+  }
+
+#endif  // defined(USE_AURA)
+
+  void AddWindowsAndVerify(bool screen,
+                           size_t window_count,
+                           size_t aura_count,
+                           bool has_view_dialog) {
+    // Create model_.
+    CreateWithCapturers(screen, window_count > 0);
+
+#if !defined(USE_AURA)
+    aura_count = 0;
+#endif
+    if (aura_count >= window_count)
+      aura_count = window_count - 1;
+
+    if (window_count == 0)
+      has_view_dialog = false;
+
+    // Set up widows.
+    size_t aura_window_first_index = window_count - aura_count;
+    for (size_t i = 0; i < window_count; ++i) {
+      if (i < aura_window_first_index) {
+        AddNativeWindow(i + 1);
+      } else {
+#if defined(USE_AURA)
+        AddAuraWindow();
+#endif
+      }
+    }
+
+    if (window_capturer_)
+      window_capturer_->SetWindowList(window_list_);
+
+    // Set view dialog window ID as the first window id.
+    if (has_view_dialog) {
+      DesktopMediaID dialog_window_id(DesktopMediaID::TYPE_WINDOW,
+                                      window_list_[0].id);
+      model_->SetViewDialogWindowId(dialog_window_id);
+      window_count--;
+      aura_window_first_index--;
+    }
 
     {
       testing::InSequence dummy;
-      size_t source_count = window_only ? count : count + 1;
+      size_t source_count = screen ? window_count + 1 : window_count;
       for (size_t i = 0; i < source_count; ++i) {
         EXPECT_CALL(observer_, OnSourceAdded(model_.get(), i))
             .WillOnce(CheckListSize(model_.get(), static_cast<int>(i + 1)));
@@ -185,21 +311,32 @@
       }
       EXPECT_CALL(observer_,
                   OnSourceThumbnailChanged(model_.get(), source_count - 1))
-          .WillOnce(QuitMessageLoop(&message_loop_));
+          .WillOnce(QuitMessageLoop(message_loop()));
     }
     model_->StartUpdating(&observer_);
-    message_loop_.Run();
+    message_loop()->Run();
 
-    for (size_t i = 0; i < count; ++i) {
-      size_t source_index = window_only ? i : i + 1;
+    if (screen) {
+      EXPECT_EQ(model_->GetSource(0).id.type, DesktopMediaID::TYPE_SCREEN);
+      EXPECT_EQ(model_->GetSource(0).id.id, 0);
+    }
+
+    for (size_t i = 0; i < window_count; ++i) {
+      size_t source_index = screen ? i + 1 : i;
       EXPECT_EQ(model_->GetSource(source_index).id.type,
-                                  content::DesktopMediaID::TYPE_WINDOW);
-      EXPECT_EQ(model_->GetSource(source_index).id.id, static_cast<int>(i + 1));
+                DesktopMediaID::TYPE_WINDOW);
       EXPECT_EQ(model_->GetSource(source_index).name,
-                                  base::UTF8ToUTF16("Test window"));
+                base::UTF8ToUTF16("Test window"));
+      int index = has_view_dialog ? i + 1 : i;
+      int native_id = window_list_[index].id;
+      EXPECT_EQ(model_->GetSource(source_index).id.id, native_id);
+#if defined(USE_AURA)
+      if (i >= aura_window_first_index)
+        EXPECT_EQ(model_->GetSource(source_index).id.aura_id,
+                  native_aura_id_map_[native_id]);
+#endif
     }
     testing::Mock::VerifyAndClearExpectations(&observer_);
-    return list;
   }
 
  protected:
@@ -209,154 +346,156 @@
   // Owned by |model_|;
   FakeWindowCapturer* window_capturer_;
 
-  scoped_ptr<NativeDesktopMediaList> model_;
+  webrtc::WindowCapturer::WindowList window_list_;
+  std::vector<std::unique_ptr<views::Widget>> desktop_widgets_;
+  std::map<DesktopMediaID::Id, DesktopMediaID::Id> native_aura_id_map_;
+  std::unique_ptr<NativeDesktopMediaList> model_;
 
-  base::MessageLoop message_loop_;
   content::TestBrowserThread ui_thread_;
 
-  DISALLOW_COPY_AND_ASSIGN(DesktopMediaListTest);
+  DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaListTest);
 };
 
-TEST_F(DesktopMediaListTest, InitialSourceList) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(1, false);
+TEST_F(NativeDesktopMediaListTest, WindowsOnly) {
+  AddWindowsAndVerify(false, kDefaultWindowCount, kDefaultAuraCount, false);
+}
 
-  EXPECT_EQ(model_->GetSource(0).id.type, content::DesktopMediaID::TYPE_SCREEN);
-  EXPECT_EQ(model_->GetSource(0).id.id, 0);
+TEST_F(NativeDesktopMediaListTest, ScreenOnly) {
+  AddWindowsAndVerify(true, 0, 0, false);
 }
 
 // Verifies that the window specified with SetViewDialogWindowId() is filtered
 // from the results.
-TEST_F(DesktopMediaListTest, Filtering) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(2, false);
-
-  EXPECT_EQ(model_->GetSource(0).id.type, content::DesktopMediaID::TYPE_SCREEN);
-  EXPECT_EQ(model_->GetSource(0).id.id, 0);
+TEST_F(NativeDesktopMediaListTest, Filtering) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, true);
 }
 
-TEST_F(DesktopMediaListTest, WindowsOnly) {
-  window_capturer_ = new FakeWindowCapturer();
-  model_.reset(new NativeDesktopMediaList(
-      scoped_ptr<webrtc::ScreenCapturer>(),
-      scoped_ptr<webrtc::WindowCapturer>(window_capturer_)));
-  AddWindowsAndVerify(1, true);
-}
+TEST_F(NativeDesktopMediaListTest, AddNativeWindow) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
 
-TEST_F(DesktopMediaListTest, ScreenOnly) {
-  model_.reset(new NativeDesktopMediaList(
-      scoped_ptr<webrtc::ScreenCapturer>(new FakeScreenCapturer),
-      scoped_ptr<webrtc::WindowCapturer>()));
-
-  {
-    testing::InSequence dummy;
-    EXPECT_CALL(observer_, OnSourceAdded(model_.get(), 0))
-        .WillOnce(CheckListSize(model_.get(), 1));
-    EXPECT_CALL(observer_, OnSourceThumbnailChanged(model_.get(), 0))
-        .WillOnce(QuitMessageLoop(&message_loop_));
-  }
-  model_->StartUpdating(&observer_);
-
-  message_loop_.Run();
-
-  EXPECT_EQ(model_->GetSource(0).id.type, content::DesktopMediaID::TYPE_SCREEN);
-}
-
-TEST_F(DesktopMediaListTest, AddWindow) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(1, false);
-
-  EXPECT_CALL(observer_, OnSourceAdded(model_.get(), 2))
-      .WillOnce(DoAll(CheckListSize(model_.get(), 3),
-                      QuitMessageLoop(&message_loop_)));
+  const int index = kDefaultWindowCount + 1;
+  EXPECT_CALL(observer_, OnSourceAdded(model_.get(), index))
+      .WillOnce(DoAll(CheckListSize(model_.get(), index + 1),
+                      QuitMessageLoop(message_loop())));
 
   webrtc::WindowCapturer::Window window;
-  window.id = 10;  // id=0 is invalid.
-  window.title = "Test window 10";
-  list.push_back(window);
-  window_capturer_->SetWindowList(list);
+  AddNativeWindow(index);
+  window_capturer_->SetWindowList(window_list_);
 
-  message_loop_.Run();
+  message_loop()->Run();
 
-  EXPECT_EQ(model_->GetSource(2).id.type, content::DesktopMediaID::TYPE_WINDOW);
-  EXPECT_EQ(model_->GetSource(2).id.id, 10);
+  EXPECT_EQ(model_->GetSource(index).id.type, DesktopMediaID::TYPE_WINDOW);
+  EXPECT_EQ(model_->GetSource(index).id.id, index);
 }
 
-TEST_F(DesktopMediaListTest, RemoveWindow) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(2, false);
+#if defined(USE_AURA)
+TEST_F(NativeDesktopMediaListTest, AddAuraWindow) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
 
-  EXPECT_CALL(observer_, OnSourceRemoved(model_.get(), 2))
-      .WillOnce(DoAll(CheckListSize(model_.get(), 2),
-                      QuitMessageLoop(&message_loop_)));
+  const int index = kDefaultWindowCount + 1;
+  EXPECT_CALL(observer_, OnSourceAdded(model_.get(), index))
+      .WillOnce(DoAll(CheckListSize(model_.get(), index + 1),
+                      QuitMessageLoop(message_loop())));
 
-  list.erase(list.begin() + 1);
-  window_capturer_->SetWindowList(list);
+  AddAuraWindow();
+  window_capturer_->SetWindowList(window_list_);
 
-  message_loop_.Run();
+  message_loop()->Run();
+
+  int native_id = window_list_.back().id;
+  EXPECT_EQ(model_->GetSource(index).id.type, DesktopMediaID::TYPE_WINDOW);
+  EXPECT_EQ(model_->GetSource(index).id.id, native_id);
+  EXPECT_EQ(model_->GetSource(index).id.aura_id,
+            native_aura_id_map_[native_id]);
+}
+#endif  // defined(USE_AURA)
+
+TEST_F(NativeDesktopMediaListTest, RemoveNativeWindow) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
+
+  EXPECT_CALL(observer_, OnSourceRemoved(model_.get(), 1))
+      .WillOnce(DoAll(CheckListSize(model_.get(), kDefaultWindowCount),
+                      QuitMessageLoop(message_loop())));
+
+  window_list_.erase(window_list_.begin());
+  window_capturer_->SetWindowList(window_list_);
+
+  message_loop()->Run();
 }
 
-TEST_F(DesktopMediaListTest, RemoveAllWindows) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(2, false);
+#if defined(USE_AURA)
+TEST_F(NativeDesktopMediaListTest, RemoveAuraWindow) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
+
+  int aura_window_start_index = kDefaultWindowCount - kDefaultAuraCount + 1;
+  EXPECT_CALL(observer_, OnSourceRemoved(model_.get(), aura_window_start_index))
+      .WillOnce(DoAll(CheckListSize(model_.get(), kDefaultWindowCount),
+                      QuitMessageLoop(message_loop())));
+
+  RemoveAuraWindow(0);
+  window_capturer_->SetWindowList(window_list_);
+
+  message_loop()->Run();
+}
+#endif  // defined(USE_AURA)
+
+TEST_F(NativeDesktopMediaListTest, RemoveAllWindows) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
 
   testing::InSequence seq;
-  EXPECT_CALL(observer_, OnSourceRemoved(model_.get(), 1))
-      .WillOnce(CheckListSize(model_.get(), 2));
+  for (int i = 0; i < kDefaultWindowCount - 1; i++) {
+    EXPECT_CALL(observer_, OnSourceRemoved(model_.get(), 1))
+        .WillOnce(CheckListSize(model_.get(), kDefaultWindowCount - i));
+  }
   EXPECT_CALL(observer_, OnSourceRemoved(model_.get(), 1))
       .WillOnce(DoAll(CheckListSize(model_.get(), 1),
-                      QuitMessageLoop(&message_loop_)));
+                      QuitMessageLoop(message_loop())));
 
-  list.erase(list.begin(), list.end());
-  window_capturer_->SetWindowList(list);
+  window_list_.clear();
+  window_capturer_->SetWindowList(window_list_);
 
-  message_loop_.Run();
+  message_loop()->Run();
 }
 
-TEST_F(DesktopMediaListTest, UpdateTitle) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(1, false);
+TEST_F(NativeDesktopMediaListTest, UpdateTitle) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
 
   EXPECT_CALL(observer_, OnSourceNameChanged(model_.get(), 1))
-      .WillOnce(QuitMessageLoop(&message_loop_));
+      .WillOnce(QuitMessageLoop(message_loop()));
 
   const std::string kTestTitle = "New Title";
+  window_list_[0].title = kTestTitle;
+  window_capturer_->SetWindowList(window_list_);
 
-  list[0].title = kTestTitle;
-  window_capturer_->SetWindowList(list);
-
-  message_loop_.Run();
+  message_loop()->Run();
 
   EXPECT_EQ(model_->GetSource(1).name, base::UTF8ToUTF16(kTestTitle));
 }
 
-TEST_F(DesktopMediaListTest, UpdateThumbnail) {
-  CreateWithDefaultCapturers();
-  AddWindowsAndVerify(2, false);
+TEST_F(NativeDesktopMediaListTest, UpdateThumbnail) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
 
   EXPECT_CALL(observer_, OnSourceThumbnailChanged(model_.get(), 1))
-      .WillOnce(QuitMessageLoop(&message_loop_));
-  // Update frame for the window and verify that we get notification about it.
-  window_capturer_->SetNextFrameValue(1, 1);
+      .WillOnce(QuitMessageLoop(message_loop()));
 
-  message_loop_.Run();
+  // Update frame for the window and verify that we get notification about it.
+  window_capturer_->SetNextFrameValue(1, 10);
+
+  message_loop()->Run();
 }
 
-TEST_F(DesktopMediaListTest, MoveWindow) {
-  CreateWithDefaultCapturers();
-  webrtc::WindowCapturer::WindowList list = AddWindowsAndVerify(2, false);
+TEST_F(NativeDesktopMediaListTest, MoveWindow) {
+  AddWindowsAndVerify(true, kDefaultWindowCount, kDefaultAuraCount, false);
 
   EXPECT_CALL(observer_, OnSourceMoved(model_.get(), 2, 1))
-      .WillOnce(DoAll(CheckListSize(model_.get(), 3),
-                      QuitMessageLoop(&message_loop_)));
+      .WillOnce(DoAll(CheckListSize(model_.get(), kDefaultWindowCount + 1),
+                      QuitMessageLoop(message_loop())));
 
   // Swap the two windows.
-  webrtc::WindowCapturer::Window temp = list[0];
-  list[0] = list[1];
-  list[1] = temp;
-  window_capturer_->SetWindowList(list);
+  webrtc::WindowCapturer::Window temp = window_list_[0];
+  window_list_[0] = window_list_[1];
+  window_list_[1] = temp;
+  window_capturer_->SetWindowList(window_list_);
 
-  message_loop_.Run();
+  message_loop()->Run();
 }
-
-}  // namespace
diff --git a/chrome/browser/media/permission_bubble_media_access_handler.cc b/chrome/browser/media/permission_bubble_media_access_handler.cc
index 87d4139..bfb911f 100644
--- a/chrome/browser/media/permission_bubble_media_access_handler.cc
+++ b/chrome/browser/media/permission_bubble_media_access_handler.cc
@@ -35,7 +35,8 @@
 // Callback for the permission update infobar when the site and Chrome
 // permissions are mismatched on Android.
 void OnPermissionConflictResolved(
-    scoped_ptr<MediaStreamDevicesController> controller, bool allowed) {
+    std::unique_ptr<MediaStreamDevicesController> controller,
+    bool allowed) {
   if (allowed)
     controller->PermissionGranted();
   else
@@ -137,7 +138,7 @@
 
   DCHECK(!it->second.empty());
 
-  scoped_ptr<MediaStreamDevicesController> controller(
+  std::unique_ptr<MediaStreamDevicesController> controller(
       new MediaStreamDevicesController(
           web_contents, it->second.front().request,
           base::Bind(
@@ -211,7 +212,7 @@
     content::WebContents* web_contents,
     const content::MediaStreamDevices& devices,
     content::MediaStreamRequestResult result,
-    scoped_ptr<content::MediaStreamUI> ui) {
+    std::unique_ptr<content::MediaStreamUI> ui) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   std::map<content::WebContents*, RequestsQueue>::iterator it =
diff --git a/chrome/browser/media/permission_bubble_media_access_handler.h b/chrome/browser/media/permission_bubble_media_access_handler.h
index 0f6514d..c5a79f69 100644
--- a/chrome/browser/media/permission_bubble_media_access_handler.h
+++ b/chrome/browser/media/permission_bubble_media_access_handler.h
@@ -47,7 +47,7 @@
   void OnAccessRequestResponse(content::WebContents* web_contents,
                                const content::MediaStreamDevices& devices,
                                content::MediaStreamRequestResult result,
-                               scoped_ptr<content::MediaStreamUI> ui);
+                               std::unique_ptr<content::MediaStreamUI> ui);
 
   // content::NotificationObserver implementation.
   void Observe(int type,
diff --git a/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc b/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc
index 6b08049..1054685d 100644
--- a/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc
+++ b/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc
@@ -18,10 +18,10 @@
     InfoBarService* infobar_service,
     const GURL& requesting_frame,
     const PermissionSetCallback& callback) {
-  return infobar_service->AddInfoBar(
-      infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
-          new ProtectedMediaIdentifierInfoBarDelegateAndroid(
-              requesting_frame, callback))));
+  return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
+      std::unique_ptr<ConfirmInfoBarDelegate>(
+          new ProtectedMediaIdentifierInfoBarDelegateAndroid(requesting_frame,
+                                                             callback))));
 }
 
 ProtectedMediaIdentifierInfoBarDelegateAndroid::
diff --git a/chrome/browser/media/router/create_presentation_connection_request.cc b/chrome/browser/media/router/create_presentation_connection_request.cc
index e9d728933..d96d191 100644
--- a/chrome/browser/media/router/create_presentation_connection_request.cc
+++ b/chrome/browser/media/router/create_presentation_connection_request.cc
@@ -57,7 +57,7 @@
 
 // static
 void CreatePresentationConnectionRequest::HandleRouteResponse(
-    scoped_ptr<CreatePresentationConnectionRequest> presentation_request,
+    std::unique_ptr<CreatePresentationConnectionRequest> presentation_request,
     const RouteRequestResult& result) {
   if (!result.route()) {
     presentation_request->InvokeErrorCallback(content::PresentationError(
diff --git a/chrome/browser/media/router/create_presentation_connection_request.h b/chrome/browser/media/router/create_presentation_connection_request.h
index e85f0c0..0a418904 100644
--- a/chrome/browser/media/router/create_presentation_connection_request.h
+++ b/chrome/browser/media/router/create_presentation_connection_request.h
@@ -63,7 +63,7 @@
 
   // Handle route creation/joining response by invoking the right callback.
   static void HandleRouteResponse(
-      scoped_ptr<CreatePresentationConnectionRequest> presentation_request,
+      std::unique_ptr<CreatePresentationConnectionRequest> presentation_request,
       const RouteRequestResult& result);
 
  private:
diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h
index c7b68d4d..9fa22d7 100644
--- a/chrome/browser/media/router/media_router.h
+++ b/chrome/browser/media/router/media_router.h
@@ -57,7 +57,7 @@
 class MediaRouter : public KeyedService {
  public:
   using PresentationSessionMessageCallback = base::Callback<void(
-      scoped_ptr<ScopedVector<content::PresentationSessionMessage>>)>;
+      std::unique_ptr<ScopedVector<content::PresentationSessionMessage>>)>;
   using SendRouteMessageCallback = base::Callback<void(bool sent)>;
 
   ~MediaRouter() override = default;
@@ -145,7 +145,7 @@
   // This is called for Blob / ArrayBuffer / ArrayBufferView types.
   virtual void SendRouteBinaryMessage(
       const MediaRoute::Id& route_id,
-      scoped_ptr<std::vector<uint8_t>> data,
+      std::unique_ptr<std::vector<uint8_t>> data,
       const SendRouteMessageCallback& callback) = 0;
 
   // Adds a new |issue|.
@@ -163,7 +163,7 @@
   // |route_id|. The returned Subscription object is owned by the caller.
   // |callback| will be invoked whenever there are state changes, until the
   // caller destroys the Subscription object.
-  virtual scoped_ptr<PresentationConnectionStateSubscription>
+  virtual std::unique_ptr<PresentationConnectionStateSubscription>
   AddPresentationConnectionStateChangedCallback(
       const MediaRoute::Id& route_id,
       const content::PresentationConnectionStateChangedCallback& callback) = 0;
diff --git a/chrome/browser/media/router/media_router_base.cc b/chrome/browser/media/router/media_router_base.cc
index 4387272..cea5fcd 100644
--- a/chrome/browser/media/router/media_router_base.cc
+++ b/chrome/browser/media/router/media_router_base.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/media/router/media_router_base.h"
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
@@ -15,7 +16,7 @@
 
 MediaRouterBase::~MediaRouterBase() = default;
 
-scoped_ptr<PresentationConnectionStateSubscription>
+std::unique_ptr<PresentationConnectionStateSubscription>
 MediaRouterBase::AddPresentationConnectionStateChangedCallback(
     const MediaRoute::Id& route_id,
     const content::PresentationConnectionStateChangedCallback& callback) {
@@ -28,7 +29,7 @@
         &MediaRouterBase::OnPresentationConnectionStateCallbackRemoved,
         base::Unretained(this), route_id));
     presentation_connection_state_callbacks_.add(route_id,
-                                                 make_scoped_ptr(callbacks));
+                                                 base::WrapUnique(callbacks));
   }
 
   return callbacks->Add(callback);
diff --git a/chrome/browser/media/router/media_router_base.h b/chrome/browser/media/router/media_router_base.h
index 41a7c43..be2a854 100644
--- a/chrome/browser/media/router/media_router_base.h
+++ b/chrome/browser/media/router/media_router_base.h
@@ -23,7 +23,7 @@
   MediaRouterBase();
   ~MediaRouterBase() override;
 
-  scoped_ptr<PresentationConnectionStateSubscription>
+  std::unique_ptr<PresentationConnectionStateSubscription>
   AddPresentationConnectionStateChangedCallback(
       const MediaRoute::Id& route_id,
       const content::PresentationConnectionStateChangedCallback& callback)
@@ -56,7 +56,7 @@
       const content::PresentationConnectionStateChangeInfo&)>;
   base::ScopedPtrHashMap<
       MediaRoute::Id,
-      scoped_ptr<PresentationConnectionStateChangedCallbacks>>
+      std::unique_ptr<PresentationConnectionStateChangedCallbacks>>
       presentation_connection_state_callbacks_;
 
   base::ThreadChecker thread_checker_;
diff --git a/chrome/browser/media/router/media_router_dialog_controller.cc b/chrome/browser/media/router/media_router_dialog_controller.cc
index b0f3208..1c89200c 100644
--- a/chrome/browser/media/router/media_router_dialog_controller.cc
+++ b/chrome/browser/media/router/media_router_dialog_controller.cc
@@ -75,7 +75,7 @@
 }
 
 bool MediaRouterDialogController::ShowMediaRouterDialogForPresentation(
-    scoped_ptr<CreatePresentationConnectionRequest> request) {
+    std::unique_ptr<CreatePresentationConnectionRequest> request) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
   // Check if the media router dialog exists for |initiator| and return if so.
@@ -120,7 +120,7 @@
   initiator_->GetDelegate()->ActivateContents(initiator_);
 }
 
-scoped_ptr<CreatePresentationConnectionRequest>
+std::unique_ptr<CreatePresentationConnectionRequest>
 MediaRouterDialogController::TakeCreateConnectionRequest() {
   return std::move(create_connection_request_);
 }
diff --git a/chrome/browser/media/router/media_router_dialog_controller.h b/chrome/browser/media/router/media_router_dialog_controller.h
index 4c6b26c..faa3409 100644
--- a/chrome/browser/media/router/media_router_dialog_controller.h
+++ b/chrome/browser/media/router/media_router_dialog_controller.h
@@ -5,10 +5,10 @@
 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_
 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_DIALOG_CONTROLLER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "chrome/browser/media/router/create_presentation_connection_request.h"
 #include "content/public/browser/web_contents_observer.h"
@@ -40,7 +40,7 @@
   // If the dialog already exists, brings it to the front but doesn't change the
   // dialog with |request|, returns false and |request| is deleted.
   bool ShowMediaRouterDialogForPresentation(
-      scoped_ptr<CreatePresentationConnectionRequest> request);
+      std::unique_ptr<CreatePresentationConnectionRequest> request);
 
   // Shows the media router dialog modal to |initiator_|.
   // Creates the dialog if it did not exist prior to this call, returns true.
@@ -64,7 +64,8 @@
 
   // Passes the ownership of the CreatePresentationConnectionRequest to the
   // caller.
-  scoped_ptr<CreatePresentationConnectionRequest> TakeCreateConnectionRequest();
+  std::unique_ptr<CreatePresentationConnectionRequest>
+  TakeCreateConnectionRequest();
 
   // Returns the CreatePresentationConnectionRequest to the caller but keeps the
   // ownership with the MediaRouterDialogController.
@@ -89,13 +90,14 @@
 
   // An observer for the |initiator_| that closes the dialog when |initiator_|
   // is destroyed or navigated.
-  scoped_ptr<InitiatorWebContentsObserver> initiator_observer_;
+  std::unique_ptr<InitiatorWebContentsObserver> initiator_observer_;
   content::WebContents* const initiator_;
 
   // Data for dialogs created at the request of the Presentation API.
   // Passed from the caller via ShowMediaRouterDialogForPresentation to the
   // dialog when it is initialized.
-  scoped_ptr<CreatePresentationConnectionRequest> create_connection_request_;
+  std::unique_ptr<CreatePresentationConnectionRequest>
+      create_connection_request_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogController);
 };
diff --git a/chrome/browser/media/router/mock_media_router.h b/chrome/browser/media/router/mock_media_router.h
index e0fc436..b9dd4463 100644
--- a/chrome/browser/media/router/mock_media_router.h
+++ b/chrome/browser/media/router/mock_media_router.h
@@ -57,7 +57,7 @@
                     const SendRouteMessageCallback& callback));
   void SendRouteBinaryMessage(
       const MediaRoute::Id& route_id,
-      scoped_ptr<std::vector<uint8_t>> data,
+      std::unique_ptr<std::vector<uint8_t>> data,
       const SendRouteMessageCallback& callback) override {
     SendRouteBinaryMessageInternal(route_id, data.get(), callback);
   }
@@ -70,7 +70,7 @@
   MOCK_METHOD0(OnUserGesture, void());
   MOCK_METHOD1(OnPresentationSessionDetached,
                void(const MediaRoute::Id& route_id));
-  scoped_ptr<PresentationConnectionStateSubscription>
+  std::unique_ptr<PresentationConnectionStateSubscription>
   AddPresentationConnectionStateChangedCallback(
       const MediaRoute::Id& route_id,
       const content::PresentationConnectionStateChangedCallback& callback)
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
index 20d2f274..d9c822cc 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -5,11 +5,13 @@
 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h"
 
 #include <stddef.h>
+
 #include <utility>
 
 #include "base/bind.h"
 #include "base/guid.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/scoped_vector.h"
 #include "base/observer_list.h"
 #include "base/stl_util.h"
@@ -36,10 +38,10 @@
 
 namespace {
 
-scoped_ptr<content::PresentationSessionMessage>
+std::unique_ptr<content::PresentationSessionMessage>
 ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) {
   DCHECK(!input.is_null());
-  scoped_ptr<content::PresentationSessionMessage> output;
+  std::unique_ptr<content::PresentationSessionMessage> output;
   switch (input->type) {
     case interfaces::RouteMessage::Type::TEXT: {
       DCHECK(!input->message.is_null());
@@ -270,7 +272,7 @@
     interfaces::MediaRoutePtr media_route,
     const mojo::String& error_text,
     interfaces::RouteRequestResultCode result_code) {
-  scoped_ptr<RouteRequestResult> result;
+  std::unique_ptr<RouteRequestResult> result;
   if (media_route.is_null()) {
     // An error occurred.
     DCHECK(!error_text.is_null());
@@ -286,7 +288,7 @@
         error, RouteRequestResult::OFF_THE_RECORD_MISMATCH);
   } else {
     result = RouteRequestResult::FromSuccess(
-        media_route.To<scoped_ptr<MediaRoute>>(), presentation_id);
+        media_route.To<std::unique_ptr<MediaRoute>>(), presentation_id);
     if (result->route()->off_the_record())
       OnOffTheRecordRouteCreated(result->route()->media_route_id());
   }
@@ -308,7 +310,7 @@
 
   if (!origin.is_valid()) {
     DVLOG_WITH_INSTANCE(1) << "Invalid origin: " << origin;
-    scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
+    std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
         "Invalid origin", RouteRequestResult::INVALID_ORIGIN);
     for (const MediaRouteResponseCallback& callback : callbacks)
       callback.Run(*result);
@@ -335,7 +337,7 @@
 
   if (!origin.is_valid()) {
     DVLOG_WITH_INSTANCE(1) << "Invalid origin: " << origin;
-    scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
+    std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
         "Invalid origin", RouteRequestResult::INVALID_ORIGIN);
     for (const MediaRouteResponseCallback& callback : callbacks)
       callback.Run(*result);
@@ -362,7 +364,7 @@
 
   if (!origin.is_valid()) {
     DVLOG_WITH_INSTANCE(1) << "Invalid origin: " << origin;
-    scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
+    std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
         "Invalid origin", RouteRequestResult::INVALID_ORIGIN);
     for (const MediaRouteResponseCallback& callback : callbacks)
       callback.Run(*result);
@@ -406,7 +408,7 @@
 
 void MediaRouterMojoImpl::SendRouteBinaryMessage(
     const MediaRoute::Id& route_id,
-    scoped_ptr<std::vector<uint8_t>> data,
+    std::unique_ptr<std::vector<uint8_t>> data,
     const SendRouteMessageCallback& callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
@@ -444,7 +446,7 @@
   if (!sinks_query) {
     new_query = true;
     sinks_query = new MediaSinksQuery;
-    sinks_queries_.add(source_id, make_scoped_ptr(sinks_query));
+    sinks_queries_.add(source_id, base::WrapUnique(sinks_query));
   } else {
     DCHECK(!sinks_query->observers.HasObserver(observer));
   }
@@ -507,7 +509,7 @@
   auto* routes_query = routes_queries_.get(source_id);
   if (!routes_query) {
     routes_query = new MediaRoutesQuery;
-    routes_queries_.add(source_id, make_scoped_ptr(routes_query));
+    routes_queries_.add(source_id, base::WrapUnique(routes_query));
   } else {
     DCHECK(!routes_query->observers.HasObserver(observer));
   }
@@ -556,7 +558,7 @@
   auto* observer_list = messages_observers_.get(route_id);
   if (!observer_list) {
     observer_list = new base::ObserverList<PresentationSessionMessagesObserver>;
-    messages_observers_.add(route_id, make_scoped_ptr(observer_list));
+    messages_observers_.add(route_id, base::WrapUnique(observer_list));
   } else {
     DCHECK(!observer_list->HasObserver(observer));
   }
@@ -672,7 +674,7 @@
 
 void MediaRouterMojoImpl::DoSendSessionBinaryMessage(
     const MediaRoute::Id& route_id,
-    scoped_ptr<std::vector<uint8_t>> data,
+    std::unique_ptr<std::vector<uint8_t>> data,
     const SendRouteMessageCallback& callback) {
   DVLOG_WITH_INSTANCE(1) << "SendRouteBinaryMessage " << route_id;
   mojo::Array<uint8_t> mojo_array;
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
index 0106bd5..9b14874 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
@@ -9,6 +9,7 @@
 
 #include <deque>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -17,7 +18,6 @@
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/thread_task_runner_handle.h"
@@ -95,7 +95,7 @@
                         const SendRouteMessageCallback& callback) override;
   void SendRouteBinaryMessage(
       const MediaRoute::Id& route_id,
-      scoped_ptr<std::vector<uint8_t>> data,
+      std::unique_ptr<std::vector<uint8_t>> data,
       const SendRouteMessageCallback& callback) override;
   void AddIssue(const Issue& issue) override;
   void ClearIssue(const Issue::Id& issue_id) override;
@@ -245,7 +245,7 @@
                             const std::string& message,
                             const SendRouteMessageCallback& callback);
   void DoSendSessionBinaryMessage(const MediaRoute::Id& route_id,
-                                  scoped_ptr<std::vector<uint8_t>> data,
+                                  std::unique_ptr<std::vector<uint8_t>> data,
                                   const SendRouteMessageCallback& callback);
   void DoListenForRouteMessages(const MediaRoute::Id& route_id);
   void DoStopListeningForRouteMessages(const MediaRoute::Id& route_id);
@@ -339,16 +339,17 @@
   // becomes ready.
   std::deque<base::Closure> pending_requests_;
 
-  base::ScopedPtrHashMap<MediaSource::Id, scoped_ptr<MediaSinksQuery>>
+  base::ScopedPtrHashMap<MediaSource::Id, std::unique_ptr<MediaSinksQuery>>
       sinks_queries_;
 
-  base::ScopedPtrHashMap<MediaSource::Id, scoped_ptr<MediaRoutesQuery>>
+  base::ScopedPtrHashMap<MediaSource::Id, std::unique_ptr<MediaRoutesQuery>>
       routes_queries_;
 
   using PresentationSessionMessagesObserverList =
       base::ObserverList<PresentationSessionMessagesObserver>;
-  base::ScopedPtrHashMap<MediaRoute::Id,
-                         scoped_ptr<PresentationSessionMessagesObserverList>>
+  base::ScopedPtrHashMap<
+      MediaRoute::Id,
+      std::unique_ptr<PresentationSessionMessagesObserverList>>
       messages_observers_;
 
   // IDs of MediaRoutes being listened for messages. Note that this is
@@ -360,7 +361,7 @@
   IssueManager issue_manager_;
 
   // Binds |this| to a Mojo connection stub for interfaces::MediaRouter.
-  scoped_ptr<mojo::Binding<interfaces::MediaRouter>> binding_;
+  std::unique_ptr<mojo::Binding<interfaces::MediaRouter>> binding_;
 
   // Mojo proxy object for the Media Route Provider Manager.
   // Set to null initially, and later set to the Provider Manager proxy object
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
index 764a778..9079344 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
@@ -4,14 +4,16 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/test/histogram_tester.h"
@@ -172,8 +174,9 @@
             extensions::ExtensionRegistry::Get(context)) {}
   ~TestProcessManager() override {}
 
-  static scoped_ptr<KeyedService> Create(content::BrowserContext* context) {
-    return make_scoped_ptr(new TestProcessManager(context));
+  static std::unique_ptr<KeyedService> Create(
+      content::BrowserContext* context) {
+    return base::WrapUnique(new TestProcessManager(context));
   }
 
   MOCK_METHOD1(IsEventPageSuspended, bool(const std::string& ext_id));
@@ -652,13 +655,13 @@
   EXPECT_CALL(mock_media_route_provider_,
               StartObservingMediaSinks(mojo::String(kSource2)));
 
-  scoped_ptr<MockMediaSinksObserver> sinks_observer(
+  std::unique_ptr<MockMediaSinksObserver> sinks_observer(
       new MockMediaSinksObserver(router(), media_source, origin));
   EXPECT_TRUE(sinks_observer->Init());
-  scoped_ptr<MockMediaSinksObserver> extra_sinks_observer(
+  std::unique_ptr<MockMediaSinksObserver> extra_sinks_observer(
       new MockMediaSinksObserver(router(), media_source, origin));
   EXPECT_TRUE(extra_sinks_observer->Init());
-  scoped_ptr<MockMediaSinksObserver> unrelated_sinks_observer(
+  std::unique_ptr<MockMediaSinksObserver> unrelated_sinks_observer(
       new MockMediaSinksObserver(router(), MediaSource(kSource2), origin));
   EXPECT_TRUE(unrelated_sinks_observer->Init());
   ProcessEventLoop();
@@ -696,14 +699,14 @@
   // Since the MediaRouterMojoImpl has already received results for
   // |media_source|, return cached results to observers that are subsequently
   // registered.
-  scoped_ptr<MockMediaSinksObserver> cached_sinks_observer(
+  std::unique_ptr<MockMediaSinksObserver> cached_sinks_observer(
       new MockMediaSinksObserver(router(), media_source, origin));
   EXPECT_CALL(*cached_sinks_observer,
               OnSinksReceived(SequenceEquals(expected_sinks)));
   EXPECT_TRUE(cached_sinks_observer->Init());
 
   // Different origin from cached result. Empty list will be returned.
-  scoped_ptr<MockMediaSinksObserver> cached_sinks_observer2(
+  std::unique_ptr<MockMediaSinksObserver> cached_sinks_observer2(
       new MockMediaSinksObserver(router(), media_source,
                                  GURL("https://youtube.com")));
   EXPECT_CALL(*cached_sinks_observer2, OnSinksReceived(IsEmpty()));
@@ -731,12 +734,12 @@
   router()->OnSinkAvailabilityUpdated(
       interfaces::MediaRouter::SinkAvailability::UNAVAILABLE);
   MediaSource media_source(kSource);
-  scoped_ptr<MockMediaSinksObserver> sinks_observer(
+  std::unique_ptr<MockMediaSinksObserver> sinks_observer(
       new MockMediaSinksObserver(router(), media_source, origin));
   EXPECT_CALL(*sinks_observer, OnSinksReceived(IsEmpty()));
   EXPECT_TRUE(sinks_observer->Init());
   MediaSource media_source2(kSource2);
-  scoped_ptr<MockMediaSinksObserver> sinks_observer2(
+  std::unique_ptr<MockMediaSinksObserver> sinks_observer2(
       new MockMediaSinksObserver(router(), media_source2, origin));
   EXPECT_CALL(*sinks_observer2, OnSinksReceived(IsEmpty()));
   EXPECT_TRUE(sinks_observer2->Init());
@@ -906,7 +909,7 @@
 }
 
 TEST_F(MediaRouterMojoImplTest, SendRouteBinaryMessage) {
-  scoped_ptr<std::vector<uint8_t>> expected_binary_data(
+  std::unique_ptr<std::vector<uint8_t>> expected_binary_data(
       new std::vector<uint8_t>(kBinaryMessage,
                                kBinaryMessage + arraysize(kBinaryMessage)));
 
@@ -941,7 +944,7 @@
   mojo_messages[1]->data.push_back(1);
 
   ScopedVector<content::PresentationSessionMessage> expected_messages;
-  scoped_ptr<content::PresentationSessionMessage> message;
+  std::unique_ptr<content::PresentationSessionMessage> message;
   message.reset(new content::PresentationSessionMessage(
       content::PresentationMessageType::TEXT));
   message->message = "text";
@@ -966,7 +969,7 @@
   EXPECT_CALL(handler, InvokeObserver());
   // Creating PresentationSessionMessagesObserver will register itself to the
   // MediaRouter, which in turn will start listening for route messages.
-  scoped_ptr<PresentationSessionMessagesObserver> observer(
+  std::unique_ptr<PresentationSessionMessagesObserver> observer(
       new PresentationSessionMessagesObserver(
           base::Bind(&ListenForMessagesCallbackHandler::Invoke,
                      base::Unretained(&handler)),
@@ -1009,7 +1012,7 @@
   mojo_messages[1]->data.push_back(1);
 
   ScopedVector<content::PresentationSessionMessage> expected_messages;
-  scoped_ptr<content::PresentationSessionMessage> message;
+  std::unique_ptr<content::PresentationSessionMessage> message;
   message.reset(new content::PresentationSessionMessage(
       content::PresentationMessageType::TEXT));
   message->message = "text";
@@ -1035,12 +1038,12 @@
   EXPECT_CALL(handler, InvokeObserver()).Times(2);
   // Creating PresentationSessionMessagesObserver will register itself to the
   // MediaRouter, which in turn will start listening for route messages.
-  scoped_ptr<PresentationSessionMessagesObserver> observer1(
+  std::unique_ptr<PresentationSessionMessagesObserver> observer1(
       new PresentationSessionMessagesObserver(
           base::Bind(&ListenForMessagesCallbackHandler::Invoke,
                      base::Unretained(&handler)),
           expected_route_id, router()));
-  scoped_ptr<PresentationSessionMessagesObserver> observer2(
+  std::unique_ptr<PresentationSessionMessagesObserver> observer2(
       new PresentationSessionMessagesObserver(
           base::Bind(&ListenForMessagesCallbackHandler::Invoke,
                      base::Unretained(&handler)),
@@ -1088,7 +1091,7 @@
 
   // Creating PresentationSessionMessagesObserver will register itself to the
   // MediaRouter, which in turn will start listening for route messages.
-  scoped_ptr<PresentationSessionMessagesObserver> observer1(
+  std::unique_ptr<PresentationSessionMessagesObserver> observer1(
       new PresentationSessionMessagesObserver(
           base::Bind(&ListenForMessagesCallbackHandler::Invoke,
                      base::Unretained(&handler)),
@@ -1106,7 +1109,7 @@
   content::PresentationSessionInfo connection(kPresentationUrl,
                                               kPresentationId);
   MockPresentationConnectionStateChangedCallback callback;
-  scoped_ptr<PresentationConnectionStateSubscription> subscription =
+  std::unique_ptr<PresentationConnectionStateSubscription> subscription =
       router()->AddPresentationConnectionStateChangedCallback(
           route_id,
           base::Bind(&MockPresentationConnectionStateChangedCallback::Run,
@@ -1146,7 +1149,7 @@
        PresentationConnectionStateChangedCallbackRemoved) {
   MediaRoute::Id route_id("route-id");
   MockPresentationConnectionStateChangedCallback callback;
-  scoped_ptr<PresentationConnectionStateSubscription> subscription =
+  std::unique_ptr<PresentationConnectionStateSubscription> subscription =
       router()->AddPresentationConnectionStateChangedCallback(
           route_id,
           base::Bind(&MockPresentationConnectionStateChangedCallback::Run,
@@ -1270,7 +1273,7 @@
                                         expected_count);
   }
 
-  scoped_ptr<MediaRouterMojoImpl> media_router_;
+  std::unique_ptr<MediaRouterMojoImpl> media_router_;
   RegisterMediaRouteProviderHandler provide_handler_;
   TestProcessManager* process_manager_;
   testing::StrictMock<MockMediaRouteProvider> mock_media_route_provider_;
@@ -1278,10 +1281,10 @@
   scoped_refptr<extensions::Extension> extension_;
 
  private:
-  scoped_ptr<TestingProfile> profile_;
+  std::unique_ptr<TestingProfile> profile_;
   base::MessageLoop message_loop_;
   interfaces::MediaRouteProviderPtr media_route_provider_proxy_;
-  scoped_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_;
+  std::unique_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_;
   base::HistogramTester histogram_tester_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoExtensionTest);
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_test.h b/chrome/browser/media/router/mojo/media_router_mojo_test.h
index 490373f..6bd1ae1 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_test.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_test.h
@@ -128,8 +128,8 @@
  private:
   content::TestBrowserThreadBundle test_thread_bundle_;
   scoped_refptr<extensions::Extension> extension_;
-  scoped_ptr<MediaRouterMojoImpl> mock_media_router_;
-  scoped_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_;
+  std::unique_ptr<MediaRouterMojoImpl> mock_media_router_;
+  std::unique_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest);
 };
diff --git a/chrome/browser/media/router/mojo/media_router_type_converters.cc b/chrome/browser/media/router/mojo/media_router_type_converters.cc
index e3eaa00..e49ebb1 100644
--- a/chrome/browser/media/router/mojo/media_router_type_converters.cc
+++ b/chrome/browser/media/router/mojo/media_router_type_converters.cc
@@ -83,13 +83,14 @@
 }
 
 // static
-scoped_ptr<media_router::MediaRoute>
-TypeConverter<scoped_ptr<media_router::MediaRoute>, MediaRoutePtr>::Convert(
-    const MediaRoutePtr& input) {
-  scoped_ptr<media_router::MediaRoute> media_route(new media_router::MediaRoute(
-      input->media_route_id, media_router::MediaSource(input->media_source),
-      input->media_sink_id, input->description, input->is_local,
-      input->custom_controller_path, input->for_display));
+std::unique_ptr<media_router::MediaRoute>
+TypeConverter<std::unique_ptr<media_router::MediaRoute>,
+              MediaRoutePtr>::Convert(const MediaRoutePtr& input) {
+  std::unique_ptr<media_router::MediaRoute> media_route(
+      new media_router::MediaRoute(
+          input->media_route_id, media_router::MediaSource(input->media_source),
+          input->media_sink_id, input->description, input->is_local,
+          input->custom_controller_path, input->for_display));
   media_route->set_off_the_record(input->off_the_record);
   return media_route;
 }
diff --git a/chrome/browser/media/router/mojo/media_router_type_converters.h b/chrome/browser/media/router/mojo/media_router_type_converters.h
index c484382d..59ad961f 100644
--- a/chrome/browser/media/router/mojo/media_router_type_converters.h
+++ b/chrome/browser/media/router/mojo/media_router_type_converters.h
@@ -5,10 +5,10 @@
 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_TYPE_CONVERTERS_H_
 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_TYPE_CONVERTERS_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "chrome/browser/media/router/issue.h"
 #include "chrome/browser/media/router/media_router.h"
 #include "chrome/browser/media/router/media_sink.h"
@@ -46,9 +46,9 @@
 };
 
 template <>
-struct TypeConverter<scoped_ptr<media_router::MediaRoute>,
+struct TypeConverter<std::unique_ptr<media_router::MediaRoute>,
                      media_router::interfaces::MediaRoutePtr> {
-  static scoped_ptr<media_router::MediaRoute> Convert(
+  static std::unique_ptr<media_router::MediaRoute> Convert(
       const media_router::interfaces::MediaRoutePtr& input);
 };
 
diff --git a/chrome/browser/media/router/presentation_media_sinks_observer.h b/chrome/browser/media/router/presentation_media_sinks_observer.h
index 2111cd8..6ba3d6c7 100644
--- a/chrome/browser/media/router/presentation_media_sinks_observer.h
+++ b/chrome/browser/media/router/presentation_media_sinks_observer.h
@@ -5,8 +5,9 @@
 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_MEDIA_SINKS_OBSERVER_H_
 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_MEDIA_SINKS_OBSERVER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chrome/browser/media/router/media_sinks_observer.h"
 #include "content/public/browser/presentation_service_delegate.h"
 
diff --git a/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc b/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc
index e5edd56..926a617b 100644
--- a/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc
+++ b/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc
@@ -2,13 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chrome/browser/media/router/presentation_media_sinks_observer.h"
+
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/media/router/media_source_helper.h"
 #include "chrome/browser/media/router/mock_media_router.h"
 #include "chrome/browser/media/router/mock_screen_availability_listener.h"
-#include "chrome/browser/media/router/presentation_media_sinks_observer.h"
 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
 #include "content/public/browser/presentation_screen_availability_listener.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -41,7 +43,7 @@
 
   MockMediaRouter router_;
   MockScreenAvailabilityListener listener_;
-  scoped_ptr<PresentationMediaSinksObserver> observer_;
+  std::unique_ptr<PresentationMediaSinksObserver> observer_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(PresentationMediaSinksObserverTest);
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc
index 68b96da..e29a905 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -109,10 +109,11 @@
   base::SmallMap<std::map<std::string, MediaRoute::Id>>
       presentation_id_to_route_id_;
   base::SmallMap<
-      std::map<std::string, scoped_ptr<PresentationMediaSinksObserver>>>
+      std::map<std::string, std::unique_ptr<PresentationMediaSinksObserver>>>
       url_to_sinks_observer_;
-  base::ScopedPtrHashMap<MediaRoute::Id,
-                         scoped_ptr<PresentationConnectionStateSubscription>>
+  base::ScopedPtrHashMap<
+      MediaRoute::Id,
+      std::unique_ptr<PresentationConnectionStateSubscription>>
       connection_state_subscriptions_;
   ScopedVector<PresentationSessionMessagesObserver> session_messages_observers_;
 
@@ -361,11 +362,11 @@
 
   // Maps a frame identifier to a PresentationFrame object for frames
   // that are using presentation API.
-  base::ScopedPtrHashMap<RenderFrameHostId, scoped_ptr<PresentationFrame>>
+  base::ScopedPtrHashMap<RenderFrameHostId, std::unique_ptr<PresentationFrame>>
       presentation_frames_;
 
   // Default presentation request for the owning tab WebContents.
-  scoped_ptr<PresentationRequest> default_presentation_request_;
+  std::unique_ptr<PresentationRequest> default_presentation_request_;
 
   // Callback to invoke when default presentation has started.
   content::PresentationSessionStartedCallback
@@ -559,7 +560,7 @@
   if (!presentation_frames_.contains(render_frame_host_id)) {
     presentation_frames_.add(
         render_frame_host_id,
-        scoped_ptr<PresentationFrame>(new PresentationFrame(
+        std::unique_ptr<PresentationFrame>(new PresentationFrame(
             render_frame_host_id, web_contents_, router_)));
   }
   return presentation_frames_.get(render_frame_host_id);
@@ -723,7 +724,7 @@
   }
 
   RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id);
-  scoped_ptr<CreatePresentationConnectionRequest> request(
+  std::unique_ptr<CreatePresentationConnectionRequest> request(
       new CreatePresentationConnectionRequest(
           render_frame_host_id, presentation_url,
           GetLastCommittedURLForFrame(render_frame_host_id),
@@ -812,7 +813,7 @@
     int render_process_id,
     int render_frame_id,
     const content::PresentationSessionInfo& session,
-    scoped_ptr<content::PresentationSessionMessage> message,
+    std::unique_ptr<content::PresentationSessionMessage> message,
     const SendMessageCallback& send_message_cb) {
   const MediaRoute::Id& route_id = frame_manager_->GetRouteId(
       RenderFrameHostId(render_process_id, render_frame_id),
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.h b/chrome/browser/media/router/presentation_service_delegate_impl.h
index 54d40da..c233b2d 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.h
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.h
@@ -6,12 +6,12 @@
 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chrome/browser/media/router/media_router.h"
@@ -121,7 +121,7 @@
   void SendMessage(int render_process_id,
                    int render_frame_id,
                    const content::PresentationSessionInfo& session,
-                   scoped_ptr<content::PresentationSessionMessage> message,
+                   std::unique_ptr<content::PresentationSessionMessage> message,
                    const SendMessageCallback& send_message_cb) override;
   void ListenForConnectionStateChange(
       int render_process_id,
@@ -201,7 +201,7 @@
   content::WebContents* const web_contents_;
   MediaRouter* router_;
 
-  scoped_ptr<PresentationFrameManager> frame_manager_;
+  std::unique_ptr<PresentationFrameManager> frame_manager_;
 
   base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_;
 
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
index 6f255ec..e08ef510 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
@@ -2,14 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chrome/browser/media/router/presentation_service_delegate_impl.h"
+
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/media/router/media_source.h"
 #include "chrome/browser/media/router/media_source_helper.h"
 #include "chrome/browser/media/router/mock_media_router.h"
 #include "chrome/browser/media/router/mock_screen_availability_listener.h"
-#include "chrome/browser/media/router/presentation_service_delegate_impl.h"
 #include "chrome/browser/media/router/route_request_result.h"
 #include "chrome/browser/media/router/test_helper.h"
 #include "chrome/browser/profiles/profile.h"
@@ -94,7 +96,7 @@
         delegate_impl_->GetDefaultPresentationRequest();
 
     // Should not trigger callback since route response is error.
-    scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
+    std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromError(
         "Error", RouteRequestResult::UNKNOWN_ERROR);
     delegate_impl_->OnRouteResponse(request, *result);
     EXPECT_TRUE(Mock::VerifyAndClearExpectations(this));
@@ -108,7 +110,7 @@
         "differentRouteId", MediaSourceForPresentationUrl(presentation_url2),
         "mediaSinkId", "", true, "", true);
     media_route->set_off_the_record(off_the_record);
-    result = RouteRequestResult::FromSuccess(make_scoped_ptr(media_route),
+    result = RouteRequestResult::FromSuccess(base::WrapUnique(media_route),
                                              "differentPresentationId");
     delegate_impl_->OnRouteResponse(different_request, *result);
     EXPECT_TRUE(Mock::VerifyAndClearExpectations(this));
@@ -119,7 +121,7 @@
         "routeId", MediaSourceForPresentationUrl(presentation_url1),
         "mediaSinkId", "", true, "", true);
     media_route2->set_off_the_record(off_the_record);
-    result = RouteRequestResult::FromSuccess(make_scoped_ptr(media_route2),
+    result = RouteRequestResult::FromSuccess(base::WrapUnique(media_route2),
                                              "presentationId");
     delegate_impl_->OnRouteResponse(request, *result);
   }
@@ -392,8 +394,8 @@
 
   EXPECT_CALL(mock_create_connection_callbacks, OnCreateConnectionSuccess(_))
       .Times(1);
-  scoped_ptr<RouteRequestResult> result = RouteRequestResult::FromSuccess(
-      make_scoped_ptr(new MediaRoute(
+  std::unique_ptr<RouteRequestResult> result = RouteRequestResult::FromSuccess(
+      base::WrapUnique(new MediaRoute(
           "routeId", MediaSourceForPresentationUrl(kPresentationUrl),
           "mediaSinkId", "description", true, "", true)),
       kPresentationId);
@@ -436,7 +438,7 @@
 }
 
 TEST_F(PresentationServiceDelegateImplTest, DelegateObservers) {
-  scoped_ptr<PresentationServiceDelegateImpl> manager(
+  std::unique_ptr<PresentationServiceDelegateImpl> manager(
       new PresentationServiceDelegateImpl(GetWebContents()));
   manager->SetMediaRouterForTest(&router_);
 
diff --git a/chrome/browser/media/router/route_request_result.cc b/chrome/browser/media/router/route_request_result.cc
index 39b3687c..62a257e 100644
--- a/chrome/browser/media/router/route_request_result.cc
+++ b/chrome/browser/media/router/route_request_result.cc
@@ -4,28 +4,29 @@
 
 #include "chrome/browser/media/router/route_request_result.h"
 
+#include "base/memory/ptr_util.h"
 #include "chrome/browser/media/router/media_route.h"
 
 namespace media_router {
 
 // static
-scoped_ptr<RouteRequestResult> RouteRequestResult::FromSuccess(
-    scoped_ptr<MediaRoute> route,
+std::unique_ptr<RouteRequestResult> RouteRequestResult::FromSuccess(
+    std::unique_ptr<MediaRoute> route,
     const std::string& presentation_id) {
   DCHECK(route);
-  return make_scoped_ptr(new RouteRequestResult(
+  return base::WrapUnique(new RouteRequestResult(
       std::move(route), presentation_id, "", RouteRequestResult::OK));
 }
 
 // static
-scoped_ptr<RouteRequestResult> RouteRequestResult::FromError(
+std::unique_ptr<RouteRequestResult> RouteRequestResult::FromError(
     const std::string& error,
     ResultCode result_code) {
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new RouteRequestResult(nullptr, "", error, result_code));
 }
 
-RouteRequestResult::RouteRequestResult(scoped_ptr<MediaRoute> route,
+RouteRequestResult::RouteRequestResult(std::unique_ptr<MediaRoute> route,
                                        const std::string& presentation_id,
                                        const std::string& error,
                                        ResultCode result_code)
diff --git a/chrome/browser/media/router/route_request_result.h b/chrome/browser/media/router/route_request_result.h
index 475f240..29db6992 100644
--- a/chrome/browser/media/router/route_request_result.h
+++ b/chrome/browser/media/router/route_request_result.h
@@ -5,10 +5,10 @@
 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_
 #define CHROME_BROWSER_MEDIA_ROUTER_ROUTE_REQUEST_RESULT_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 
 namespace media_router {
 
@@ -38,11 +38,11 @@
     OFF_THE_RECORD_MISMATCH
   };
 
-  static scoped_ptr<RouteRequestResult> FromSuccess(
-      scoped_ptr<MediaRoute> route,
+  static std::unique_ptr<RouteRequestResult> FromSuccess(
+      std::unique_ptr<MediaRoute> route,
       const std::string& presentation_id);
-  static scoped_ptr<RouteRequestResult> FromError(const std::string& error,
-                                                  ResultCode result_code);
+  static std::unique_ptr<RouteRequestResult> FromError(const std::string& error,
+                                                       ResultCode result_code);
 
   ~RouteRequestResult();
 
@@ -54,12 +54,12 @@
   ResultCode result_code() const { return result_code_; }
 
  private:
-  RouteRequestResult(scoped_ptr<MediaRoute> route,
+  RouteRequestResult(std::unique_ptr<MediaRoute> route,
                      const std::string& presentation_id,
                      const std::string& error,
                      ResultCode result_code);
 
-  scoped_ptr<MediaRoute> route_;
+  std::unique_ptr<MediaRoute> route_;
   std::string presentation_id_;
   std::string error_;
   ResultCode result_code_;
diff --git a/chrome/browser/media/tab_capture_access_handler.cc b/chrome/browser/media/tab_capture_access_handler.cc
index d3a6bc3..50d0542 100644
--- a/chrome/browser/media/tab_capture_access_handler.cc
+++ b/chrome/browser/media/tab_capture_access_handler.cc
@@ -40,7 +40,7 @@
     const content::MediaResponseCallback& callback,
     const extensions::Extension* extension) {
   content::MediaStreamDevices devices;
-  scoped_ptr<content::MediaStreamUI> ui;
+  std::unique_ptr<content::MediaStreamUI> ui;
 
   if (!extension)
     callback.Run(devices, content::MEDIA_DEVICE_TAB_CAPTURE_FAILURE,
diff --git a/chrome/browser/media/tab_desktop_media_list.cc b/chrome/browser/media/tab_desktop_media_list.cc
index a737903..4c5b9e3 100644
--- a/chrome/browser/media/tab_desktop_media_list.cc
+++ b/chrome/browser/media/tab_desktop_media_list.cc
@@ -65,7 +65,8 @@
   SkRect dest_rect =
       SkRect::MakeLTRB(center_rect.x(), center_rect.y(), center_rect.right(),
                        center_rect.bottom());
-  const scoped_ptr<SkImage> bitmap(SkImage::NewFromBitmap(*favicon.bitmap()));
+  const std::unique_ptr<SkImage> bitmap(
+      SkImage::NewFromBitmap(*favicon.bitmap()));
   canvas.drawImageRect(bitmap.get(), dest_rect, nullptr);
 
   return gfx::ImageSkia::CreateFrom1xBitmap(result);
diff --git a/chrome/browser/media/tab_desktop_media_list_unittest.cc b/chrome/browser/media/tab_desktop_media_list_unittest.cc
index d44577dc..386b1025 100644
--- a/chrome/browser/media/tab_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/tab_desktop_media_list_unittest.cc
@@ -115,7 +115,7 @@
   void AddWebcontents(int favicon_greyscale) {
     TabStripModel* tab_strip_model = browser_->tab_strip_model();
     ASSERT_TRUE(tab_strip_model);
-    scoped_ptr<WebContents> contents(
+    std::unique_ptr<WebContents> contents(
         content::WebContentsTester::CreateTestWebContents(
             profile_, content::SiteInstance::Create(profile_)));
     ASSERT_TRUE(contents);
@@ -127,7 +127,7 @@
     content::NavigationEntry* entry =
         contents->GetController().GetTransientEntry();
     if (!entry) {
-      scoped_ptr<content::NavigationEntry> entry_new =
+      std::unique_ptr<content::NavigationEntry> entry_new =
           content::NavigationController::CreateNavigationEntry(
               GURL("chrome://blank"), content::Referrer(),
               ui::PAGE_TRANSITION_LINK, false, std::string(), profile_);
@@ -235,14 +235,14 @@
   base::ScopedTempDir temp_dir_;
   ScopedTestingLocalState local_state_;
 
-  scoped_ptr<content::RenderViewHostTestEnabler> rvh_test_enabler_;
+  std::unique_ptr<content::RenderViewHostTestEnabler> rvh_test_enabler_;
   Profile* profile_;
-  scoped_ptr<Browser> browser_;
-  std::vector<scoped_ptr<WebContents>> contents_array_;
+  std::unique_ptr<Browser> browser_;
+  std::vector<std::unique_ptr<WebContents>> contents_array_;
 
   // Must be listed before |list_|, so it's destroyed last.
   MockObserver observer_;
-  scoped_ptr<TabDesktopMediaList> list_;
+  std::unique_ptr<TabDesktopMediaList> list_;
 
   content::TestBrowserThreadBundle thread_bundle_;
 
diff --git a/chrome/browser/media/test_license_server.cc b/chrome/browser/media/test_license_server.cc
index 0b215f2..feba3cc7 100644
--- a/chrome/browser/media/test_license_server.cc
+++ b/chrome/browser/media/test_license_server.cc
@@ -12,7 +12,7 @@
 #include "chrome/browser/media/test_license_server_config.h"
 
 TestLicenseServer::TestLicenseServer(
-    scoped_ptr<TestLicenseServerConfig> server_config)
+    std::unique_ptr<TestLicenseServerConfig> server_config)
     : server_config_(std::move(server_config)) {}
 
 TestLicenseServer::~TestLicenseServer() {
diff --git a/chrome/browser/media/test_license_server.h b/chrome/browser/media/test_license_server.h
index 2796dcc7..2f6b7cd 100644
--- a/chrome/browser/media/test_license_server.h
+++ b/chrome/browser/media/test_license_server.h
@@ -5,9 +5,10 @@
 #ifndef CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_H_
 #define CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_H_
 
+#include <memory>
 #include <string>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/process/process.h"
 
 class TestLicenseServerConfig;
@@ -15,7 +16,8 @@
 // Class used to start a test license server.
 class TestLicenseServer {
  public:
-  explicit TestLicenseServer(scoped_ptr<TestLicenseServerConfig> server_config);
+  explicit TestLicenseServer(
+      std::unique_ptr<TestLicenseServerConfig> server_config);
   ~TestLicenseServer();
 
   // Returns true if the server started successfully. False otherwise.
@@ -27,7 +29,7 @@
 
  private:
   // License server configuration class used to obtain server paths, etc.
-  scoped_ptr<TestLicenseServerConfig> server_config_;
+  std::unique_ptr<TestLicenseServerConfig> server_config_;
   // Process for the license server.
   base::Process license_server_process_;
 
diff --git a/chrome/browser/media/webrtc_browsertest_audio.cc b/chrome/browser/media/webrtc_browsertest_audio.cc
index e9504ba4..bd15777b 100644
--- a/chrome/browser/media/webrtc_browsertest_audio.cc
+++ b/chrome/browser/media/webrtc_browsertest_audio.cc
@@ -18,8 +18,8 @@
 // bluntly trigger CHECKs if we can't read the file or if it's malformed. The
 // caller takes ownership of the returned data. The size of the data is stored
 // in |read_length|.
-scoped_ptr<char[]> ReadWavFile(const base::FilePath& wav_filename,
-                               size_t* file_length) {
+std::unique_ptr<char[]> ReadWavFile(const base::FilePath& wav_filename,
+                                    size_t* file_length) {
   base::File wav_file(
       wav_filename, base::File::FLAG_OPEN | base::File::FLAG_READ);
   if (!wav_file.IsValid()) {
@@ -29,7 +29,7 @@
 
   size_t wav_file_length = wav_file.GetLength();
 
-  scoped_ptr<char[]> data(new char[wav_file_length]);
+  std::unique_ptr<char[]> data(new char[wav_file_length]);
   size_t read_bytes = wav_file.Read(0, data.get(), wav_file_length);
   if (read_bytes != wav_file_length) {
     LOG(ERROR) << "Failed to read all bytes of " << wav_filename.value();
@@ -46,11 +46,12 @@
                                    media::AudioParameters* file_parameters) {
   // Read the file, and put its data in a scoped_ptr so it gets deleted later.
   size_t file_length = 0;
-  scoped_ptr<char[]> wav_file_data = ReadWavFile(wav_filename, &file_length);
+  std::unique_ptr<char[]> wav_file_data =
+      ReadWavFile(wav_filename, &file_length);
   auto wav_audio_handler = media::WavAudioHandler::Create(
       base::StringPiece(wav_file_data.get(), file_length));
 
-  scoped_ptr<media::AudioBus> audio_bus = media::AudioBus::Create(
+  std::unique_ptr<media::AudioBus> audio_bus = media::AudioBus::Create(
       wav_audio_handler->num_channels(), wav_audio_handler->total_frames());
   base::TimeDelta file_duration = wav_audio_handler->GetDuration();
 
diff --git a/chrome/browser/media/webrtc_getmediadevices_browsertest.cc b/chrome/browser/media/webrtc_getmediadevices_browsertest.cc
index be8d639..7267711 100644
--- a/chrome/browser/media/webrtc_getmediadevices_browsertest.cc
+++ b/chrome/browser/media/webrtc_getmediadevices_browsertest.cc
@@ -90,7 +90,7 @@
 
     int error_code;
     std::string error_message;
-    scoped_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
+    std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
         devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code,
         &error_message);
 
diff --git a/chrome/browser/media/webrtc_log_uploader.cc b/chrome/browser/media/webrtc_log_uploader.cc
index d1412f3..f4dcdc0 100644
--- a/chrome/browser/media/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc_log_uploader.cc
@@ -107,8 +107,8 @@
 }
 
 void WebRtcLogUploader::LoggingStoppedDoUpload(
-    scoped_ptr<WebRtcLogBuffer> log_buffer,
-    scoped_ptr<MetaDataMap> meta_data,
+    std::unique_ptr<WebRtcLogBuffer> log_buffer,
+    std::unique_ptr<MetaDataMap> meta_data,
     const WebRtcLogUploadDoneData& upload_done_data) {
   DCHECK(file_thread_checker_.CalledOnValidThread());
   DCHECK(log_buffer.get());
@@ -143,13 +143,13 @@
 
 void WebRtcLogUploader::PrepareMultipartPostData(
     const std::string& compressed_log,
-    scoped_ptr<MetaDataMap> meta_data,
+    std::unique_ptr<MetaDataMap> meta_data,
     const WebRtcLogUploadDoneData& upload_done_data) {
   DCHECK(file_thread_checker_.CalledOnValidThread());
   DCHECK(!compressed_log.empty());
   DCHECK(meta_data.get());
 
-  scoped_ptr<std::string> post_data(new std::string());
+  std::unique_ptr<std::string> post_data(new std::string());
   SetupMultipart(post_data.get(),
                  compressed_log,
                  upload_done_data.incoming_rtp_dump,
@@ -204,7 +204,7 @@
       upload_data.log_path.AppendASCII(upload_data.local_log_id)
       .AddExtension(FILE_PATH_LITERAL(".rtp_out"));
 
-  scoped_ptr<MetaDataMap> meta_data(new MetaDataMap());
+  std::unique_ptr<MetaDataMap> meta_data(new MetaDataMap());
   {
     std::string meta_data_contents;
     base::FilePath meta_path =
@@ -227,8 +227,8 @@
 void WebRtcLogUploader::LoggingStoppedDoStore(
     const WebRtcLogPaths& log_paths,
     const std::string& log_id,
-    scoped_ptr<WebRtcLogBuffer> log_buffer,
-    scoped_ptr<MetaDataMap> meta_data,
+    std::unique_ptr<WebRtcLogBuffer> log_buffer,
+    std::unique_ptr<MetaDataMap> meta_data,
     const WebRtcLoggingHandlerHost::GenericDoneCallback& done_callback) {
   DCHECK(file_thread_checker_.CalledOnValidThread());
   DCHECK(!log_id.empty());
@@ -435,7 +435,7 @@
 
 void WebRtcLogUploader::UploadCompressedLog(
     const WebRtcLogUploadDoneData& upload_done_data,
-    scoped_ptr<std::string> post_data) {
+    std::unique_ptr<std::string> post_data) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   DecreaseLogCount();
@@ -447,7 +447,7 @@
   content_type.append("; boundary=");
   content_type.append(kMultipartBoundary);
 
-  scoped_ptr<net::URLFetcher> url_fetcher(net::URLFetcher::Create(
+  std::unique_ptr<net::URLFetcher> url_fetcher(net::URLFetcher::Create(
       GURL(chrome::kUploadURL), net::URLFetcher::POST, this));
   url_fetcher->SetUploadData(content_type, *post_data);
   BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
diff --git a/chrome/browser/media/webrtc_log_uploader.h b/chrome/browser/media/webrtc_log_uploader.h
index adb9ac46..ed848150 100644
--- a/chrome/browser/media/webrtc_log_uploader.h
+++ b/chrome/browser/media/webrtc_log_uploader.h
@@ -68,10 +68,9 @@
   // either this function or LoggingStoppedDontUpload().
   // |upload_done_data.local_log_id| is set and used internally and should be
   // left empty.
-  void LoggingStoppedDoUpload(
-      scoped_ptr<WebRtcLogBuffer> log_buffer,
-      scoped_ptr<MetaDataMap> meta_data,
-      const WebRtcLogUploadDoneData& upload_done_data);
+  void LoggingStoppedDoUpload(std::unique_ptr<WebRtcLogBuffer> log_buffer,
+                              std::unique_ptr<MetaDataMap> meta_data,
+                              const WebRtcLogUploadDoneData& upload_done_data);
 
   // Uploads a previously stored log (see LoggingStoppedDoStore()).
   void UploadStoredLog(const WebRtcLogUploadDoneData& upload_data);
@@ -82,8 +81,8 @@
   void LoggingStoppedDoStore(
       const WebRtcLogPaths& log_paths,
       const std::string& log_id,
-      scoped_ptr<WebRtcLogBuffer> log_buffer,
-      scoped_ptr<MetaDataMap> meta_data,
+      std::unique_ptr<WebRtcLogBuffer> log_buffer,
+      std::unique_ptr<MetaDataMap> meta_data,
       const WebRtcLoggingHandlerHost::GenericDoneCallback& done_callback);
 
   // Cancels URL fetcher operation by deleting all URL fetchers. This cancels
@@ -124,9 +123,8 @@
   void ResizeForNextOutput(std::string* compressed_log,
                            z_stream* stream);
 
-  void UploadCompressedLog(
-      const WebRtcLogUploadDoneData& upload_done_data,
-      scoped_ptr<std::string> post_data);
+  void UploadCompressedLog(const WebRtcLogUploadDoneData& upload_done_data,
+                           std::unique_ptr<std::string> post_data);
 
   // A couple of helper functions due to having to hop to the UI thread
   // to fetch the system_request_context and back again to the IO thread.
@@ -145,7 +143,7 @@
 
   void PrepareMultipartPostData(
       const std::string& compressed_log,
-      scoped_ptr<MetaDataMap> meta_data,
+      std::unique_ptr<MetaDataMap> meta_data,
       const WebRtcLogUploadDoneData& upload_done_data);
 
   // Append information (upload time, report ID and local ID) about a log to a
diff --git a/chrome/browser/media/webrtc_log_uploader_unittest.cc b/chrome/browser/media/webrtc_log_uploader_unittest.cc
index 95a58a1a..1271bb3 100644
--- a/chrome/browser/media/webrtc_log_uploader_unittest.cc
+++ b/chrome/browser/media/webrtc_log_uploader_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/media/webrtc_log_uploader.h"
 
 #include <stddef.h>
+
 #include <string>
 #include <utility>
 
@@ -13,6 +14,7 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_split.h"
@@ -188,7 +190,8 @@
   // since that's the normal use case, hence the delete.
   ASSERT_TRUE(base::CreateTemporaryFile(&test_list_path_));
   EXPECT_TRUE(base::DeleteFile(test_list_path_, false));
-  scoped_ptr<WebRtcLogUploader> webrtc_log_uploader(new WebRtcLogUploader());
+  std::unique_ptr<WebRtcLogUploader> webrtc_log_uploader(
+      new WebRtcLogUploader());
 
   webrtc_log_uploader->AddLocallyStoredLogInfoToUploadListFile(test_list_path_,
                                                                kTestLocalId);
@@ -225,7 +228,8 @@
   // since that's the normal use case, hence the delete.
   ASSERT_TRUE(base::CreateTemporaryFile(&test_list_path_));
   EXPECT_TRUE(base::DeleteFile(test_list_path_, false));
-  scoped_ptr<WebRtcLogUploader> webrtc_log_uploader(new WebRtcLogUploader());
+  std::unique_ptr<WebRtcLogUploader> webrtc_log_uploader(
+      new WebRtcLogUploader());
 
   webrtc_log_uploader->AddLocallyStoredLogInfoToUploadListFile(test_list_path_,
                                                                kTestLocalId);
@@ -251,7 +255,8 @@
   base::ScopedTempDir temp_dir;
   ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
 
-  scoped_ptr<WebRtcLogUploader> webrtc_log_uploader(new WebRtcLogUploader());
+  std::unique_ptr<WebRtcLogUploader> webrtc_log_uploader(
+      new WebRtcLogUploader());
 
   std::string post_data;
   webrtc_log_uploader->OverrideUploadWithBufferForTesting(&post_data);
@@ -272,7 +277,7 @@
   WebRtcLogUploadDoneData upload_done_data;
   upload_done_data.log_path = temp_dir.path().AppendASCII("log");
 
-  scoped_ptr<Profile> profile(new TestingProfile());
+  std::unique_ptr<Profile> profile(new TestingProfile());
   scoped_refptr<WebRtcLoggingHandlerHost> host(new WebRtcLoggingHandlerHost(
       -1, profile.get(), webrtc_log_uploader.get()));
 
@@ -280,10 +285,10 @@
   upload_done_data.outgoing_rtp_dump = outgoing_dump;
   upload_done_data.host = host.get();
 
-  scoped_ptr<WebRtcLogBuffer> log(new WebRtcLogBuffer());
+  std::unique_ptr<WebRtcLogBuffer> log(new WebRtcLogBuffer());
   log->SetComplete();
   webrtc_log_uploader->LoggingStoppedDoUpload(
-      std::move(log), make_scoped_ptr(new MetaDataMap()), upload_done_data);
+      std::move(log), base::WrapUnique(new MetaDataMap()), upload_done_data);
 
   VerifyRtpDumpInMultipart(post_data, "rtpdump_recv", incoming_dump_content);
   VerifyRtpDumpInMultipart(post_data, "rtpdump_send", outgoing_dump_content);
diff --git a/chrome/browser/media/webrtc_logging_handler_host.cc b/chrome/browser/media/webrtc_logging_handler_host.cc
index 517f048..3e49559 100644
--- a/chrome/browser/media/webrtc_logging_handler_host.cc
+++ b/chrome/browser/media/webrtc_logging_handler_host.cc
@@ -170,7 +170,7 @@
 }
 
 void WebRtcLoggingHandlerHost::SetMetaData(
-    scoped_ptr<MetaDataMap> meta_data,
+    std::unique_ptr<MetaDataMap> meta_data,
     const GenericDoneCallback& callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(!callback.is_null());
@@ -347,7 +347,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(!callback.is_null());
 
-  scoped_ptr<WebRtcLogPaths> log_paths(new WebRtcLogPaths());
+  std::unique_ptr<WebRtcLogPaths> log_paths(new WebRtcLogPaths());
   ReleaseRtpDumps(log_paths.get());
 
   content::BrowserThread::PostTaskAndReplyWithResult(
@@ -416,10 +416,11 @@
   rtp_dump_handler_->StopDump(type, callback);
 }
 
-void WebRtcLoggingHandlerHost::OnRtpPacket(scoped_ptr<uint8_t[]> packet_header,
-                                           size_t header_length,
-                                           size_t packet_length,
-                                           bool incoming) {
+void WebRtcLoggingHandlerHost::OnRtpPacket(
+    std::unique_ptr<uint8_t[]> packet_header,
+    size_t header_length,
+    size_t packet_length,
+    bool incoming) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   BrowserThread::PostTask(
@@ -434,7 +435,7 @@
 }
 
 void WebRtcLoggingHandlerHost::DumpRtpPacketOnIOThread(
-    scoped_ptr<uint8_t[]> packet_header,
+    std::unique_ptr<uint8_t[]> packet_header,
     size_t header_length,
     size_t packet_length,
     bool incoming) {
@@ -716,7 +717,7 @@
 
 void WebRtcLoggingHandlerHost::StoreLogInDirectory(
     const std::string& log_id,
-    scoped_ptr<WebRtcLogPaths> log_paths,
+    std::unique_ptr<WebRtcLogPaths> log_paths,
     const GenericDoneCallback& done_callback,
     const base::FilePath& directory) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
diff --git a/chrome/browser/media/webrtc_logging_handler_host.h b/chrome/browser/media/webrtc_logging_handler_host.h
index f46d7a7d..66ddd4ab 100644
--- a/chrome/browser/media/webrtc_logging_handler_host.h
+++ b/chrome/browser/media/webrtc_logging_handler_host.h
@@ -93,7 +93,7 @@
   // Sets meta data that will be uploaded along with the log and also written
   // in the beginning of the log. Must be called on the IO thread before calling
   // StartLogging.
-  void SetMetaData(scoped_ptr<MetaDataMap> meta_data,
+  void SetMetaData(std::unique_ptr<MetaDataMap> meta_data,
                    const GenericDoneCallback& callback);
 
   // Opens a log and starts logging. Must be called on the IO thread.
@@ -151,7 +151,7 @@
 
   // Called when an RTP packet is sent or received. Must be called on the UI
   // thread.
-  void OnRtpPacket(scoped_ptr<uint8_t[]> packet_header,
+  void OnRtpPacket(std::unique_ptr<uint8_t[]> packet_header,
                    size_t header_length,
                    size_t packet_length,
                    bool incoming);
@@ -232,7 +232,7 @@
                      const base::FilePath& log_directory);
 
   void StoreLogInDirectory(const std::string& log_id,
-                           scoped_ptr<WebRtcLogPaths> log_paths,
+                           std::unique_ptr<WebRtcLogPaths> log_paths,
                            const GenericDoneCallback& done_callback,
                            const base::FilePath& directory);
 
@@ -254,7 +254,7 @@
   void DoStartRtpDump(RtpDumpType type, const GenericDoneCallback& callback);
 
   // Adds the packet to the dump on IO thread.
-  void DumpRtpPacketOnIOThread(scoped_ptr<uint8_t[]> packet_header,
+  void DumpRtpPacketOnIOThread(std::unique_ptr<uint8_t[]> packet_header,
                                size_t header_length,
                                size_t packet_length,
                                bool incoming);
@@ -283,7 +283,7 @@
       const AudioDebugRecordingsErrorCallback& error_callback,
       const base::FilePath& log_directory);
 
-  scoped_ptr<WebRtcLogBuffer> log_buffer_;
+  std::unique_ptr<WebRtcLogBuffer> log_buffer_;
 
   // The profile associated with our renderer process.
   Profile* const profile_;
@@ -291,7 +291,7 @@
   // These are only accessed on the IO thread, except when in STARTING state. In
   // this state we are protected since entering any function that alters the
   // state is not allowed.
-  scoped_ptr<MetaDataMap> meta_data_;
+  std::unique_ptr<MetaDataMap> meta_data_;
 
   // These are only accessed on the IO thread.
   GenericDoneCallback stop_callback_;
@@ -315,7 +315,7 @@
   base::Time logging_started_time_;
 
   // The RTP dump handler responsible for creating the RTP header dump files.
-  scoped_ptr<WebRtcRtpDumpHandler> rtp_dump_handler_;
+  std::unique_ptr<WebRtcRtpDumpHandler> rtp_dump_handler_;
 
   // The callback to call when StopRtpDump is called.
   content::RenderProcessHost::WebRtcStopRtpDumpCallback stop_rtp_dump_callback_;
diff --git a/chrome/browser/media/webrtc_perf_browsertest.cc b/chrome/browser/media/webrtc_perf_browsertest.cc
index dc3661b..d395785 100644
--- a/chrome/browser/media/webrtc_perf_browsertest.cc
+++ b/chrome/browser/media/webrtc_perf_browsertest.cc
@@ -2,11 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_split.h"
 #include "base/strings/stringprintf.h"
 #include "base/test/test_timeouts.h"
@@ -63,7 +64,7 @@
         "    JSON.stringify(peerConnectionDataStore));",
         webrtc_internals_tab);
 
-    scoped_ptr<base::Value> parsed_json =
+    std::unique_ptr<base::Value> parsed_json =
         base::JSONReader::Read(all_stats_json);
     base::DictionaryValue* result;
     if (parsed_json.get() && parsed_json->GetAsDictionary(&result)) {
@@ -91,7 +92,7 @@
     return NULL;
   }
 
-  scoped_ptr<base::DictionaryValue> MeasureWebRtcInternalsData(
+  std::unique_ptr<base::DictionaryValue> MeasureWebRtcInternalsData(
       int duration_msec) {
     chrome::AddTabAt(browser(), GURL(), -1, true);
     ui_test_utils::NavigateToURL(browser(), GURL("chrome://webrtc-internals"));
@@ -100,7 +101,7 @@
 
     test::SleepInJavascript(webrtc_internals_tab, duration_msec);
 
-    return scoped_ptr<base::DictionaryValue>(
+    return std::unique_ptr<base::DictionaryValue>(
         GetWebrtcInternalsData(webrtc_internals_tab));
   }
 
@@ -133,7 +134,7 @@
     test::SleepInJavascript(left_tab, 60000);
 
     // Start measurements.
-    scoped_ptr<base::DictionaryValue> all_data =
+    std::unique_ptr<base::DictionaryValue> all_data =
         MeasureWebRtcInternalsData(10000);
     ASSERT_TRUE(all_data.get() != NULL);
 
@@ -173,7 +174,7 @@
     // Let values stabilize, bandwidth ramp up, etc.
     test::SleepInJavascript(left_tab, 60000);
 
-    scoped_ptr<base::DictionaryValue> all_data =
+    std::unique_ptr<base::DictionaryValue> all_data =
         MeasureWebRtcInternalsData(10000);
     ASSERT_TRUE(all_data.get() != NULL);
 
@@ -232,4 +233,3 @@
     MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) {
   RunsOneWayCall60SecsAndLogsInternalMetrics("");
 }
-
diff --git a/chrome/browser/media/webrtc_rtp_dump_handler.cc b/chrome/browser/media/webrtc_rtp_dump_handler.cc
index bb22619..d0cc359b 100644
--- a/chrome/browser/media/webrtc_rtp_dump_handler.cc
+++ b/chrome/browser/media/webrtc_rtp_dump_handler.cc
@@ -271,7 +271,7 @@
 }
 
 void WebRtcRtpDumpHandler::SetDumpWriterForTesting(
-    scoped_ptr<WebRtcRtpDumpWriter> writer) {
+    std::unique_ptr<WebRtcRtpDumpWriter> writer) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   dump_writer_ = std::move(writer);
diff --git a/chrome/browser/media/webrtc_rtp_dump_handler.h b/chrome/browser/media/webrtc_rtp_dump_handler.h
index 1bb1b037b..fe70903 100644
--- a/chrome/browser/media/webrtc_rtp_dump_handler.h
+++ b/chrome/browser/media/webrtc_rtp_dump_handler.h
@@ -8,10 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/media/rtp_dump_type.h"
 
@@ -101,7 +102,7 @@
   };
 
   // For unit test to inject a fake writer.
-  void SetDumpWriterForTesting(scoped_ptr<WebRtcRtpDumpWriter> writer);
+  void SetDumpWriterForTesting(std::unique_ptr<WebRtcRtpDumpWriter> writer);
 
   // Callback from the dump writer when the max dump size is reached.
   void OnMaxDumpSizeReached();
@@ -125,7 +126,7 @@
   State outgoing_state_;
 
   // The object used to create and write the dump file.
-  scoped_ptr<WebRtcRtpDumpWriter> dump_writer_;
+  std::unique_ptr<WebRtcRtpDumpWriter> dump_writer_;
 
   base::WeakPtrFactory<WebRtcRtpDumpHandler> weak_ptr_factory_;
 
diff --git a/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc b/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc
index 1934238..9f2a2a7 100644
--- a/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc
+++ b/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc
@@ -6,6 +6,8 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
@@ -13,7 +15,6 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -78,10 +79,9 @@
     handler_.reset(new WebRtcRtpDumpHandler(
         dir.empty() ? base::FilePath(FILE_PATH_LITERAL("dummy")) : dir));
 
-    scoped_ptr<WebRtcRtpDumpWriter> writer(new FakeDumpWriter(
-        10,
-        base::Bind(&WebRtcRtpDumpHandler::OnMaxDumpSizeReached,
-                   base::Unretained(handler_.get())),
+    std::unique_ptr<WebRtcRtpDumpWriter> writer(new FakeDumpWriter(
+        10, base::Bind(&WebRtcRtpDumpHandler::OnMaxDumpSizeReached,
+                       base::Unretained(handler_.get())),
         end_dump_success));
 
     handler_->SetDumpWriterForTesting(std::move(writer));
@@ -106,7 +106,7 @@
 
  protected:
   content::TestBrowserThreadBundle thread_bundle_;
-  scoped_ptr<WebRtcRtpDumpHandler> handler_;
+  std::unique_ptr<WebRtcRtpDumpHandler> handler_;
 };
 
 TEST_F(WebRtcRtpDumpHandlerTest, StateTransition) {
@@ -204,7 +204,7 @@
 
   handler_.reset();
 
-  scoped_ptr<WebRtcRtpDumpHandler> handlers[6];
+  std::unique_ptr<WebRtcRtpDumpHandler> handlers[6];
 
   for (size_t i = 0; i < arraysize(handlers); ++i) {
     handlers[i].reset(new WebRtcRtpDumpHandler(base::FilePath()));
diff --git a/chrome/browser/media/webrtc_rtp_dump_writer.cc b/chrome/browser/media/webrtc_rtp_dump_writer.cc
index 33e34df..b8a71b3 100644
--- a/chrome/browser/media/webrtc_rtp_dump_writer.cc
+++ b/chrome/browser/media/webrtc_rtp_dump_writer.cc
@@ -121,7 +121,7 @@
   // is true, the compression stream will be ended and the dump file cannot be
   // written to any more.
   void CompressAndWriteToFileOnFileThread(
-      scoped_ptr<std::vector<uint8_t>> buffer,
+      std::unique_ptr<std::vector<uint8_t>> buffer,
       bool end_stream,
       FlushResult* result,
       size_t* bytes_written) {
@@ -359,7 +359,7 @@
                                       const FlushDoneCallback& callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  scoped_ptr<std::vector<uint8_t>> new_buffer(new std::vector<uint8_t>());
+  std::unique_ptr<std::vector<uint8_t>> new_buffer(new std::vector<uint8_t>());
 
   if (incoming) {
     new_buffer->reserve(incoming_buffer_.capacity());
@@ -369,9 +369,9 @@
     new_buffer->swap(outgoing_buffer_);
   }
 
-  scoped_ptr<FlushResult> result(new FlushResult(FLUSH_RESULT_FAILURE));
+  std::unique_ptr<FlushResult> result(new FlushResult(FLUSH_RESULT_FAILURE));
 
-  scoped_ptr<size_t> bytes_written(new size_t(0));
+  std::unique_ptr<size_t> bytes_written(new size_t(0));
 
   FileThreadWorker* worker = incoming ? incoming_file_thread_worker_.get()
                                       : outgoing_file_thread_worker_.get();
@@ -403,9 +403,10 @@
   }
 }
 
-void WebRtcRtpDumpWriter::OnFlushDone(const FlushDoneCallback& callback,
-                                      const scoped_ptr<FlushResult>& result,
-                                      const scoped_ptr<size_t>& bytes_written) {
+void WebRtcRtpDumpWriter::OnFlushDone(
+    const FlushDoneCallback& callback,
+    const std::unique_ptr<FlushResult>& result,
+    const std::unique_ptr<size_t>& bytes_written) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
   total_dump_size_on_disk_ += *bytes_written;
diff --git a/chrome/browser/media/webrtc_rtp_dump_writer.h b/chrome/browser/media/webrtc_rtp_dump_writer.h
index 6ac6800..074c771 100644
--- a/chrome/browser/media/webrtc_rtp_dump_writer.h
+++ b/chrome/browser/media/webrtc_rtp_dump_writer.h
@@ -8,10 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
@@ -102,8 +103,8 @@
   // maybe calls the |max_dump_size_reached_callback_|. Also calls |callback|
   // with the flush result.
   void OnFlushDone(const FlushDoneCallback& callback,
-                   const scoped_ptr<FlushResult>& result,
-                   const scoped_ptr<size_t>& bytes_written);
+                   const std::unique_ptr<FlushResult>& result,
+                   const std::unique_ptr<size_t>& bytes_written);
 
   // Called when one type of dump has been ended. It continues to end the other
   // dump if needed based on |context| and |incoming|, or calls the callback in
@@ -127,8 +128,8 @@
   size_t total_dump_size_on_disk_;
 
   // File thread workers must be called and deleted on the FILE thread.
-  scoped_ptr<FileThreadWorker> incoming_file_thread_worker_;
-  scoped_ptr<FileThreadWorker> outgoing_file_thread_worker_;
+  std::unique_ptr<FileThreadWorker> incoming_file_thread_worker_;
+  std::unique_ptr<FileThreadWorker> outgoing_file_thread_worker_;
 
   base::ThreadChecker thread_checker_;
 
diff --git a/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc b/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc
index 0ff08fc..ca1aca7 100644
--- a/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc
+++ b/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc
@@ -2,18 +2,20 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chrome/browser/media/webrtc_rtp_dump_writer.h"
+
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
 
+#include <memory>
+
 #include "base/big_endian.h"
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
-#include "chrome/browser/media/webrtc_rtp_dump_writer.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "content/public/test/test_utils.h"
@@ -224,10 +226,10 @@
   }
 
   content::TestBrowserThreadBundle thread_bundle_;
-  scoped_ptr<base::ScopedTempDir> temp_dir_;
+  std::unique_ptr<base::ScopedTempDir> temp_dir_;
   base::FilePath incoming_dump_path_;
   base::FilePath outgoing_dump_path_;
-  scoped_ptr<WebRtcRtpDumpWriter> writer_;
+  std::unique_ptr<WebRtcRtpDumpWriter> writer_;
 };
 
 TEST_F(WebRtcRtpDumpWriterTest, NoDumpFileIfNoPacketDumped) {
diff --git a/chrome/browser/media/webrtc_video_quality_browsertest.cc b/chrome/browser/media/webrtc_video_quality_browsertest.cc
index 9a09342..5662653 100644
--- a/chrome/browser/media/webrtc_video_quality_browsertest.cc
+++ b/chrome/browser/media/webrtc_video_quality_browsertest.cc
@@ -348,7 +348,7 @@
     return browser_dir;
   }
 
-  scoped_ptr<base::Environment> environment_;
+  std::unique_ptr<base::Environment> environment_;
   base::FilePath webrtc_reference_video_y4m_;
   base::ScopedTempDir temp_working_dir_;
 };
diff --git a/chrome/browser/media/wv_test_license_server_config.cc b/chrome/browser/media/wv_test_license_server_config.cc
index 723da78d..62cd1ce 100644
--- a/chrome/browser/media/wv_test_license_server_config.cc
+++ b/chrome/browser/media/wv_test_license_server_config.cc
@@ -77,7 +77,7 @@
   // Needed to dynamically load .so libraries used by license server.
   // TODO(shadi): Remove need to set env variable once b/12932983 is fixed.
 #if defined(OS_LINUX)
-  scoped_ptr<base::Environment> env(base::Environment::Create());
+  std::unique_ptr<base::Environment> env(base::Environment::Create());
   const char kLibraryPathEnvVarName[] = "LD_LIBRARY_PATH";
   std::string library_paths(license_server_path.DirName().value());
   std::string old_path;
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h
index e9b1715..5a49465 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h
@@ -171,6 +171,7 @@
                     const base::FilePath& snapshot_filename,
                     CreateSnapshotFileSuccessCallback success_cb,
                     ErrorCallback error_cb);
+    ReadFileRequest(const ReadFileRequest& other);
     ~ReadFileRequest();
 
     std::string request_file;
@@ -185,6 +186,7 @@
     ReadDirectoryRequest(const base::FilePath& dir,
                          ReadDirectorySuccessCallback success_cb,
                          ErrorCallback error_cb);
+    ReadDirectoryRequest(const ReadDirectoryRequest& other);
     ~ReadDirectoryRequest();
 
     base::FilePath directory;
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
index 7f331845..ce31c826 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
@@ -541,6 +541,9 @@
 
 MTPDeviceDelegateImplMac::ReadFileRequest::ReadFileRequest() {}
 
+MTPDeviceDelegateImplMac::ReadFileRequest::ReadFileRequest(
+    const ReadFileRequest& other) = default;
+
 MTPDeviceDelegateImplMac::ReadFileRequest::~ReadFileRequest() {}
 
 MTPDeviceDelegateImplMac::ReadDirectoryRequest::ReadDirectoryRequest(
@@ -551,6 +554,9 @@
       success_callback(success_cb),
       error_callback(error_cb) {}
 
+MTPDeviceDelegateImplMac::ReadDirectoryRequest::ReadDirectoryRequest(
+    const ReadDirectoryRequest& other) = default;
+
 MTPDeviceDelegateImplMac::ReadDirectoryRequest::~ReadDirectoryRequest() {}
 
 void CreateMTPDeviceAsyncDelegate(
diff --git a/chrome/browser/metrics/perf/cpu_identity.cc b/chrome/browser/metrics/perf/cpu_identity.cc
index 476285e..0edbcde 100644
--- a/chrome/browser/metrics/perf/cpu_identity.cc
+++ b/chrome/browser/metrics/perf/cpu_identity.cc
@@ -66,6 +66,8 @@
 
 CPUIdentity::CPUIdentity() : family(0), model(0) {}
 
+CPUIdentity::CPUIdentity(const CPUIdentity& other) = default;
+
 CPUIdentity::~CPUIdentity() {}
 
 std::string GetIntelUarch(const CPUIdentity& cpuid) {
diff --git a/chrome/browser/metrics/perf/cpu_identity.h b/chrome/browser/metrics/perf/cpu_identity.h
index 0f63b36..91f8155 100644
--- a/chrome/browser/metrics/perf/cpu_identity.h
+++ b/chrome/browser/metrics/perf/cpu_identity.h
@@ -12,6 +12,7 @@
 // makes things testable.
 struct CPUIdentity {
   CPUIdentity();
+  CPUIdentity(const CPUIdentity& other);
   ~CPUIdentity();
 
   // The system architecture based on uname().
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 07950088..555831ad 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -91,6 +91,7 @@
 #include "components/sync_driver/sync_prefs.h"
 #include "components/syncable_prefs/pref_service_syncable.h"
 #include "components/translate/core/browser/translate_prefs.h"
+#include "components/update_client/update_client.h"
 #include "components/variations/service/variations_service.h"
 #include "components/web_resource/promo_resource_service.h"
 #include "content/public/browser/render_process_host.h"
@@ -309,6 +310,7 @@
   SigninManagerFactory::RegisterPrefs(registry);
   ssl_config::SSLConfigServiceManager::RegisterPrefs(registry);
   startup_metric_utils::RegisterPrefs(registry);
+  update_client::RegisterPrefs(registry);
   web_resource::PromoResourceService::RegisterPrefs(registry);
 
 #if defined(ENABLE_AUTOFILL_DIALOG)
diff --git a/chrome/browser/process_info_snapshot.h b/chrome/browser/process_info_snapshot.h
index a1664a4..ef36d42 100644
--- a/chrome/browser/process_info_snapshot.h
+++ b/chrome/browser/process_info_snapshot.h
@@ -61,6 +61,7 @@
     std::string command;
 
     ProcInfoEntry();
+    ProcInfoEntry(const ProcInfoEntry& other);
   };
 
   // Get process information for a given PID.
diff --git a/chrome/browser/process_info_snapshot_mac.cc b/chrome/browser/process_info_snapshot_mac.cc
index 7bfadc88..48852c5 100644
--- a/chrome/browser/process_info_snapshot_mac.cc
+++ b/chrome/browser/process_info_snapshot_mac.cc
@@ -351,6 +351,9 @@
       vsize(0) {
 }
 
+ProcessInfoSnapshot::ProcInfoEntry::ProcInfoEntry(const ProcInfoEntry& other) =
+    default;
+
 bool ProcessInfoSnapshot::GetProcInfo(int pid,
                                       ProcInfoEntry* proc_info) const {
   std::map<int,ProcInfoEntry>::const_iterator it = proc_info_entries_.find(pid);
diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc
index 9ca6498..acae5daa 100644
--- a/chrome/browser/profiles/gaia_info_update_service.cc
+++ b/chrome/browser/profiles/gaia_info_update_service.cc
@@ -52,9 +52,6 @@
 }
 
 void GAIAInfoUpdateService::Update() {
-  // UMA Profile Metrics should be logged regularly.
-  ProfileMetrics::LogNumberOfProfiles(g_browser_process->profile_manager());
-
   // The user must be logged in.
   SigninManagerBase* signin_manager =
       SigninManagerFactory::GetForProfile(profile_);
@@ -214,6 +211,14 @@
   else
     delta = desired_delta - update_delta;
 
+  // UMA Profile Metrics should be logged regularly.  Logging is not performed
+  // in Update() because it is a public method and may be called at any time.
+  // These metrics should logged only on this schedule.
+  //
+  // In mac perf tests, the browser process pointer may be null.
+  if (g_browser_process)
+    ProfileMetrics::LogNumberOfProfiles(g_browser_process->profile_manager());
+
   timer_.Start(FROM_HERE, delta, this, &GAIAInfoUpdateService::Update);
 }
 
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 186c738..1840ed57 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1115,7 +1115,6 @@
   AddProfileToCache(profile);
   DoFinalInitLogging(profile);
 
-  ProfileMetrics::LogNumberOfProfiles(this);
   content::NotificationService::current()->Notify(
       chrome::NOTIFICATION_PROFILE_ADDED,
       content::Source<Profile>(profile),
diff --git a/chrome/browser/resources/chromeos/chromevox/common/chrome_extension_externs.js b/chrome/browser/resources/chromeos/chromevox/common/chrome_extension_externs.js
index 440f0d5a..4a38240b 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/chrome_extension_externs.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/chrome_extension_externs.js
@@ -539,6 +539,14 @@
 chrome.automation.AutomationNode.prototype.anchorObject;
 
 /**
+ * @param {{anchorObject: !chrome.automation.AutomationNode,
+ *          anchorOffset: number,
+ *          focusObject: !chrome.automation.AutomationNode,
+ *          focusOffset: number}} selectionParams
+ */
+chrome.automation.setDocumentSelection = function(selectionParams) {};
+
+/**
  * @type {(number|undefined)}
  */
 chrome.automation.anchorOffset;
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index ef6b8e9..05f07e1a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -748,6 +748,8 @@
     var prevRange = this.currentRange_;
     this.setCurrentRange(range);
 
+    range.select();
+
     new Output().withRichSpeechAndBraille(
         range, prevRange, Output.EventType.NAVIGATE)
         .withQueueMode(cvox.QueueMode.FLUSH)
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
index 2f85472..84a6898 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
@@ -112,6 +112,28 @@
   },
 
   /**
+   * An index appropriate for making selections.
+   * @return {number}
+   * @private
+   */
+  get selectionIndex_() {
+    if (this.index_ == cursors.NODE_INDEX)
+      return cursors.NODE_INDEX;
+
+    var adjustedIndex = this.index_;
+
+    if (this.node.role == RoleType.inlineTextBox) {
+      var sibling = this.node.previousSibling;
+      while (sibling) {
+        adjustedIndex += sibling.name.length;
+        sibling = sibling.previousSibling;
+      }
+    }
+
+    return adjustedIndex;
+  },
+
+  /**
    * Gets the accessible text of the node associated with this cursor.
    *
    * @param {!AutomationNode=} opt_node Use this node rather than this cursor's
@@ -164,9 +186,10 @@
         break;
       case Unit.WORD:
         if (newNode.role != RoleType.inlineTextBox) {
-          newNode = AutomationUtil.findNodePre(
-              newNode, Dir.FORWARD, AutomationPredicate.inlineTextBox) ||
-                  newNode;
+          newNode = AutomationUtil.findNextNode(newNode,
+              Dir.FORWARD,
+              AutomationPredicate.inlineTextBox,
+              {skipInitialSubtree: false}) || newNode;
         }
         switch (movement) {
           case Movement.BOUND:
@@ -467,6 +490,38 @@
   },
 
   /**
+   * Select the text contained within this range.
+   */
+  select: function() {
+    var start = this.start.node;
+    var end = this.end.node;
+
+    // Find the most common root.
+    var uniqueAncestors = AutomationUtil.getUniqueAncestors(start, end);
+    var mcr = start.root;
+    if (uniqueAncestors)
+      mcr = uniqueAncestors.pop().parent.root;
+
+    if (mcr.role == RoleType.desktop)
+      return;
+
+    if (mcr === start.root && mcr === end.root) {
+      start = start.role == RoleType.inlineTextBox ? start.parent : start;
+      end = end.role == RoleType.inlineTextBox ? end.parent : end;
+
+      if (!start || !end)
+        return;
+
+      chrome.automation.setDocumentSelection(
+          { anchorObject: start,
+            anchorOffset: this.start.selectionIndex_,
+            focusObject: end,
+            focusOffset: this.end.selectionIndex_ }
+      );
+    }
+  },
+
+  /**
    * Returns true if this range has either cursor end on web content.
    * @return {boolean}
   */
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
index c6bde4e6..db1e3106 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -321,3 +321,57 @@
     assertTrue(webRange.isWebRange());
   });
 });
+
+TEST_F('CursorsTest', 'SingleDocSelection', function() {
+  this.runWithLoadedTree(function() {/*!
+    <a href="google.com">google home page</a>
+    <p>some more text</p>
+    <p>end of text</p>
+  */},
+  function(root) {
+    var link = root.firstChild.firstChild;
+    var p1 = root.firstChild.nextSibling;
+    var p2 = p1.nextSibling;
+
+    var singleSel = new cursors.Range(
+        new cursors.Cursor(link, 0),
+        new cursors.Cursor(link, 1));
+
+    var multiSel = new cursors.Range(
+        new cursors.Cursor(p1.firstChild, 2),
+        new cursors.Cursor(p2.firstChild, 4));
+
+    function verifySel() {
+      if (root.anchorObject == link.firstChild) {
+        assertEquals(link.firstChild, root.anchorObject);
+        assertEquals(0, root.anchorOffset);
+        assertEquals(link.firstChild, root.focusObject);
+        assertEquals(16, root.focusOffset);
+        this.listenOnce(root, 'textSelectionChanged', verifySel);
+        multiSel.select();
+      } else {
+        assertEquals(p1.firstChild, root.anchorObject);
+        assertEquals(2, root.anchorOffset);
+        assertEquals(p2.firstChild, root.focusObject);
+        assertEquals(4, root.focusOffset);
+      }
+    }
+
+    this.listenOnce(root, 'textSelectionChanged', verifySel, true);
+    singleSel.select();
+  });
+});
+
+TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
+  this.runWithLoadedTree(this.multiInlineDoc, function(root) {
+    var secondLine = root.firstChild.firstChild.firstChild.nextSibling;
+    assertEquals('inlineTextBox', secondLine.role);
+    assertEquals('diff ', secondLine.name);
+
+    var secondLineCursor = new cursors.Cursor(secondLine, -1);
+    assertEquals(-1, secondLineCursor.selectionIndex_);
+    secondLineCursor = new cursors.Cursor(secondLine, 0);
+    secondLineCursor.index = 0;
+    assertEquals(6, secondLineCursor.selectionIndex_);
+  });
+});
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
index da44d98..ed30dde 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -1375,7 +1375,7 @@
     var outputContextFirst = localStorage['outputContextFirst'] == 'true';
     if (outputContextFirst)
       this.ancestry_(node, prevNode, type, buff);
-    var earcon = this.findEarcon_(node);
+    var earcon = this.findEarcon_(node, prevNode);
     if (earcon)
       options.annotation.push(earcon);
     this.append_(buff, range.start.getText().substring(startIndex, endIndex),
@@ -1540,12 +1540,22 @@
   /**
    * Find the earcon for a given node (including ancestry).
    * @param {!AutomationNode} node
+   * @param {!AutomationNode=} opt_prevNode
    * @return {Output.Action}
    */
-  findEarcon_: function(node) {
+  findEarcon_: function(node, opt_prevNode) {
     if (this.formatOptions_.speech) {
       var earconFinder = node;
-      while (earconFinder) {
+      var ancestors;
+      if (opt_prevNode) {
+        // Don't include the node itself.
+        ancestors = AutomationUtil.getUniqueAncestors(opt_prevNode, node);
+        ancestors.pop();
+      } else {
+        ancestors = AutomationUtil.getAncestors(node);
+      }
+
+      while (earconFinder = ancestors.pop()) {
         var info = Output.ROLE_INFO_[earconFinder.role];
         if (info && info.earconId) {
           return new Output.EarconAction(info.earconId);
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.html b/chrome/browser/resources/settings/appearance_page/appearance_page.html
index 3c74fbd..9bc323e4 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.html
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.html
@@ -22,26 +22,32 @@
   <link rel="import" type="css" href="chrome://resources/css/widgets.css">
   <link rel="import" href="chrome://resources/html/action_link.html">
   <template>
-    <style include="settings-shared"></style>
+    <style include="settings-shared">
+      .settings-box iron-icon {
+        -webkit-margin-end: var(--checkbox-spacing);
+      }
+    </style>
     <settings-animated-pages id="pages" current-route="{{currentRoute}}"
         section="appearance">
       <neon-animatable id="main">
 <if expr="chromeos">
         <div class="settings-box first two-line">
           <iron-icon icon="device:wallpaper"></iron-icon>
-          <paper-button class="primary-button middle">
+          <div class="start">
             <div>[[i18n('setWallpaper')]]</div>
             <div class="secondary">[[i18n('openWallpaperApp')]]</div>
-          </paper-button>
+          </div>
         </div>
+        <div class="settings-box two-line" on-tap="openThemesGallery_">
 </if>
-        <div class="settings-box two-line">
+<if expr="not chromeos">
+        <div class="settings-box two-line first" on-tap="openThemesGallery_">
+</if>
           <iron-icon icon="image:palette"></iron-icon>
-          <paper-button class="primary-button middle" id="get-themes"
-              on-tap="openThemesGallery_">
+          <div class="start">
             <div>[[i18n('getThemes')]]</div>
             <div class="secondary">[[themeSublabel_]]</div>
-          </paper-button>
+          </div>
           <template is="dom-if" if="[[allowResetTheme_]]">
             <paper-button on-tap="resetTheme_" class="secondary-action"
                 >[[i18n('resetToDefaultTheme')]]</paper-button>
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.html b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.html
index 74b0d5e5..7f7d373 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.html
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.html
@@ -51,14 +51,16 @@
             <paper-item id="view" on-tap="onViewTap_">
               $i18n{certificateManagerView}
             </paper-item>
-            <paper-item id="edit" hidden$="[[!canEdit_(certificateType)]]"
+            <paper-item id="edit" hidden$="[[!canEdit_(certificateType, model)]]"
                 on-tap="onEditTap_">
               $i18n{certificateManagerEdit}
             </paper-item>
-            <paper-item id="export" on-tap="onExportTap_">
+            <paper-item id="export"
+                hidden$="[[!canExport_(certificateType, model)]]"
+                on-tap="onExportTap_">
               $i18n{certificateManagerExport}
             </paper-item>
-            <paper-item id="delete" hidden$="[[model.readonly]]"
+            <paper-item id="delete" hidden$="[[!canDelete_(model)]]"
                 on-tap="onDeleteTap_">
               $i18n{certificateManagerDelete}
             </paper-item>
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js
index 934a2242..9405f10 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js
@@ -141,12 +141,35 @@
   },
 
   /**
-   * @param {string} certificateType The type of this certificate.
+   * @param {!settings.CertificateType} certificateType
+   * @param {!CertificateSubnode} model
    * @return {boolean} Whether the certificate can be edited.
    * @private
    */
-  canEdit_: function(certificateType) {
-    return this.certificateType == settings.CertificateType.CA;
+  canEdit_: function(certificateType, model) {
+    return certificateType == settings.CertificateType.CA && !model.policy;
+  },
+
+  /**
+   * @param {!settings.CertificateType} certificateType
+   * @param {!CertificateSubnode} model
+   * @return {boolean} Whether the certificate can be exported.
+   * @private
+   */
+  canExport_: function(certificateType, model) {
+    if (certificateType == settings.CertificateType.PERSONAL) {
+      return model.extractable;
+    }
+    return true;
+  },
+
+  /**
+   * @param {!CertificateSubnode} model
+   * @return {boolean} Whether the certificate can be deleted.
+   * @private
+   */
+  canDelete_: function(model) {
+    return !model.readonly && !model.policy;
   },
 
   /** @private */
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js b/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js
index d683375b..20474685 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js
@@ -15,7 +15,6 @@
  *   policy: boolean,
  *   readonly: boolean,
  *   untrusted: boolean,
- *   urlLocked: boolean
  * }}
  * @see chrome/browser/ui/webui/settings/certificates_handler.cc
  */
diff --git a/chrome/browser/resources/settings/default_browser_page/default_browser_page.html b/chrome/browser/resources/settings/default_browser_page/default_browser_page.html
index c1f59fed..53000ef6 100644
--- a/chrome/browser/resources/settings/default_browser_page/default_browser_page.html
+++ b/chrome/browser/resources/settings/default_browser_page/default_browser_page.html
@@ -8,9 +8,9 @@
   <link rel="import" type="css" href="default_browser_page.css">
   <template>
     <style include="settings-shared"></style>
-    <div class="settings-box first">
+    <div class="settings-box first two-line">
       <template is="dom-if" if="[[showButton_]]">
-        <div on-tap="onSetDefaultBrowserTap_">
+        <div class="start" on-tap="onSetDefaultBrowserTap_">
           <div>[[i18n('defaultBrowser')]]</div>
           <div class="secondary">[[i18n('defaultBrowserMakeDefault')]]</div>
         </div>
diff --git a/chrome/browser/resources/settings/languages_page/compiled_resources2.gyp b/chrome/browser/resources/settings/languages_page/compiled_resources2.gyp
index bc2d34e..bdbbec63 100644
--- a/chrome/browser/resources/settings/languages_page/compiled_resources2.gyp
+++ b/chrome/browser/resources/settings/languages_page/compiled_resources2.gyp
@@ -52,6 +52,7 @@
     {
       'target_name': 'manage_languages_page',
       'dependencies': [
+        '<(DEPTH)/third_party/polymer/v1_0/components-chromium/paper-checkbox/compiled_resources2.gyp:paper-checkbox-extracted',
         'languages_types',
         'languages',
       ],
diff --git a/chrome/browser/resources/settings/languages_page/edit_dictionary_page.html b/chrome/browser/resources/settings/languages_page/edit_dictionary_page.html
index e983d36..447a083e 100644
--- a/chrome/browser/resources/settings/languages_page/edit_dictionary_page.html
+++ b/chrome/browser/resources/settings/languages_page/edit_dictionary_page.html
@@ -20,7 +20,7 @@
       }
 
       #newWord {
-        flex: 1;
+        flex: .5;
       }
 
       iron-list {
diff --git a/chrome/browser/resources/settings/languages_page/language_detail_page.html b/chrome/browser/resources/settings/languages_page/language_detail_page.html
index bb2dccd..0c9203f 100644
--- a/chrome/browser/resources/settings/languages_page/language_detail_page.html
+++ b/chrome/browser/resources/settings/languages_page/language_detail_page.html
@@ -32,39 +32,49 @@
       }
     </style>
     <settings-languages languages="{{languages}}"></settings-languages>
+    <div class="settings-box block first">
 <if expr="chromeos or is_win">
-    <div id="languageSettings">
-      <label hidden$="[[!detail.language.supportsUI]]">
-        <paper-toggle-button
-            checked="[[isProspectiveUILanguage_(detail.language.code, prefs.intl.app_locale.value)]]"
-            on-change="onUILanguageChange_"
-            disabled$="[[isUILanguageChangeDisabled_(detail.language.code, prefs.intl.app_locale.value)]]">
-        </paper-toggle-button>
-        <span i18n-content="isDisplayedInThisLanguage"
-            hidden$="[[!isCurrentUILanguage_(detail.language.code, prefs.intl.app_locale.value)]]">
-        </span>
-        <span hidden$="[[isCurrentUILanguage_(detail.language.code, prefs.intl.app_locale.value)]]">
-          <span i18n-content="displayInThisLanguage"></span>
-          <paper-button i18n-content="restart" on-tap="onRestartTap_"
-              hidden$="[[!isRestartRequired_(detail.language.code, prefs.intl.app_locale.value)]]">
-          </paper-button>
-        </span>
-        <cr-policy-pref-indicator id="policyIndicator">
-        </cr-policy-pref-indicator>
-      </label>
-      <span i18n-content="cannotBeDisplayedInThisLanguage"
-          hidden$="[[detail.language.supportsUI]]"></span>
-    </div>
+      <div id="languageSettings" class="list-item">
+        <label hidden$="[[!detail.language.supportsUI]]">
+          <paper-toggle-button
+              checked="[[isProspectiveUILanguage_(
+                  detail.language.code, prefs.intl.app_locale.value)]]"
+              on-change="onUILanguageChange_"
+              disabled$="[[isUILanguageChangeDisabled_(
+                  detail.language.code, prefs.intl.app_locale.value)]]">
+          </paper-toggle-button>
+          <span i18n-content="isDisplayedInThisLanguage"
+              hidden$="[[!isCurrentUILanguage_(
+                  detail.language.code, prefs.intl.app_locale.value)]]">
+          </span>
+          <span hidden$="[[isCurrentUILanguage_(
+              detail.language.code, prefs.intl.app_locale.value)]]">
+            <span i18n-content="displayInThisLanguage"></span>
+            <paper-button i18n-content="restart" on-tap="onRestartTap_"
+                hidden$="[[!isRestartRequired_(
+                    detail.language.code, prefs.intl.app_locale.value)]]">
+            </paper-button>
+          </span>
+          <cr-policy-pref-indicator id="policyIndicator">
+          </cr-policy-pref-indicator>
+        </label>
+        <span i18n-content="cannotBeDisplayedInThisLanguage"
+            hidden$="[[detail.language.supportsUI]]"></span>
+      </div>
 </if>
-    <div hidden$="[[shouldHideTranslate_(detail.language.code, prefs.translate.enabled.value)]]">
-      <paper-checkbox checked="[[detail.state.translateEnabled]]"
-          on-change="onTranslateEnabledChange_"
-          i18n-content="offerToTranslateInThisLanguage"
-          hidden$="[[!detail.language.supportsTranslate]]"
-          disabled="[[isTranslateDisabled_(detail.language.code, languages.translateTarget)]]">
-      </paper-checkbox>
-      <div i18n-content="cannotTranslateInThisLanguage"
-          hidden$="[[detail.language.supportsTranslate]]"></div>
+      <div class="list-item"
+          hidden$="[[shouldHideTranslate_(
+              detail.language.code, prefs.translate.enabled.value)]]">
+        <paper-checkbox checked="[[detail.state.translateEnabled]]"
+            on-change="onTranslateEnabledChange_"
+            i18n-content="offerToTranslateInThisLanguage"
+            hidden$="[[!detail.language.supportsTranslate]]"
+            disabled="[[isTranslateDisabled_(
+                detail.language.code, languages.translateTarget)]]">
+        </paper-checkbox>
+        <div i18n-content="cannotTranslateInThisLanguage"
+            hidden$="[[detail.language.supportsTranslate]]"></div>
+      </div>
     </div>
   </template>
   <script src="language_detail_page.js"></script>
diff --git a/chrome/browser/resources/settings/languages_page/languages.js b/chrome/browser/resources/settings/languages_page/languages.js
index 5251ac8..cf7a754 100644
--- a/chrome/browser/resources/settings/languages_page/languages.js
+++ b/chrome/browser/resources/settings/languages_page/languages.js
@@ -304,6 +304,7 @@
   resetUILanguage: function() {
     chrome.send('setUILanguage', [navigator.language]);
   },
+</if>
 
   /**
    * Returns the "prospective" UI language, i.e. the one to be used on next
@@ -315,7 +316,6 @@
     return /** @type {string} */(this.getPref('intl.app_locale').value) ||
         navigator.language;
   },
-</if>
 
   /**
    * @param {string} languageCode
diff --git a/chrome/browser/resources/settings/languages_page/languages_page.html b/chrome/browser/resources/settings/languages_page/languages_page.html
index 9c84dbb..2af51df 100644
--- a/chrome/browser/resources/settings/languages_page/languages_page.html
+++ b/chrome/browser/resources/settings/languages_page/languages_page.html
@@ -2,7 +2,6 @@
 <link rel="import" href="chrome://resources/html/cr.html">
 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
 <link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-collapse.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.html">
@@ -30,28 +29,35 @@
         <div class="settings-box first two-line">
           <div class="start">
             <div i18n-content="languagesListTitle"></div>
-            <div class="secondary">[[languagesSecondary_]]</div>
+            <div class="secondary">
+              [[getProspectiveUILanguageName_(prefs.intl.app_locale.value)]]
+            </div>
           </div>
           <cr-expand-button expanded="{{languagesOpened_}}">
           </cr-expand-button>
         </div>
         <iron-collapse id="languagesCollapse" opened="[[languagesOpened_]]">
           <div class="list-frame vertical-list">
-            <array-selector id="languageSelector"
-                selected="{{detailLanguage}}"
-                items="{{languages.enabledLanguages}}"></array-selector>
             <template is="dom-repeat" items="{{languages.enabledLanguages}}">
-              <div class="list-item" on-tap="onLanguageTap_">
-                <div class="start">
-                  <div title="[[item.language.nativeDisplayName]]">
-                      [[item.language.displayName]]
-<if expr="chromeos or is_win">
-                    <iron-icon icon="done"
-                        hidden$="[[!isProspectiveUILanguage_(item.language.code, prefs.intl.app_locale.value)]]">
-                    </iron-icon>
-</if>
-                  </div>
+              <div class$="list-item [[getLanguageItemClass_(
+                      item.language.code, prefs.intl.app_locale.value)]]"
+                  on-tap="onLanguageTap_">
+<if expr="not chromeos and not is_win">
+                <div class="start" title="[[item.language.nativeDisplayName]]">
+                  [[item.language.displayName]]
                 </div>
+</if>
+<if expr="chromeos or is_win">
+                <div title="[[item.language.nativeDisplayName]]">
+                  [[item.language.displayName]]
+                </div>
+                <div class="middle">
+                  <iron-icon icon="done"
+                      hidden$="[[!isProspectiveUILanguage_(
+                          item.language.code, prefs.intl.app_locale.value)]]">
+                  </iron-icon>
+                </div>
+</if>
                 <paper-icon-button icon="settings"
                     on-tap="onShowLanguageDetailTap_"></paper-icon-button>
               </div>
@@ -74,11 +80,13 @@
             opened="[[inputMethodsOpened_]]">
           <div class="list-frame vertical-list">
             <template is="dom-repeat" items="{{languages.inputMethods}}">
-              <div class="list-item">
+              <div class$=
+                  "list-item [[getInputMethodItemClass_(id, currentId)]]">
                 <div class="start">
                   <div>[[item.name]]</div>
                   <iron-icon icon="done"
-                      hidden$="[[!isCurrentInputMethod_(item.id, languages.currentInputMethod)]]">
+                      hidden$="[[!isCurrentInputMethod_(
+                          item.id, languages.currentInputMethod)]]">
                   </iron-icon>
                 </div>
                 <paper-icon-button icon="settings"></paper-icon-button>
@@ -101,14 +109,20 @@
         </div>
         <iron-collapse id="spellCheckCollapse" opened="[[spellCheckOpened_]]">
           <div class="list-frame vertical-list">
-            <div class="list-item">
-              <template is="dom-repeat" items="{{languages.enabledLanguages}}">
-                <paper-checkbox hidden="[[!item.language.supportsSpellcheck]]"
-                    checked="[[item.state.spellCheckEnabled]]"
-                    on-change="onSpellCheckChange_"
-                    >[[item.language.displayName]]</paper-checkbox>
-              </template>
-            </div>
+            <template is="dom-repeat"
+                items="[[spellCheckLanguages_(languages.enabledLanguages.*)]]">
+              <div class="list-item">
+                <div class="start">
+                  <paper-checkbox
+                      checked="[[item.state.spellCheckEnabled]]"
+                      on-change="onSpellCheckChange_">
+                    [[item.language.displayName]]
+                  </paper-checkbox>
+                </div>
+                <paper-icon-button icon="settings"
+                    on-tap="onShowLanguageDetailTap_"></paper-icon-button>
+              </div>
+            </template>
             <div class="list-item list-button" i18n-content="manageSpellCheck"
                 on-tap="onEditDictionaryTap_">
             </div>
@@ -124,9 +138,9 @@
       </template>
       <template is="dom-if" name="language-detail">
         <settings-subpage
-            page-title="[[detailLanguage.language.displayName]]">
+            page-title="[[detailLanguage_.language.displayName]]">
           <settings-language-detail-page id="languageDetailPage"
-              prefs="{{prefs}}" detail="[[detailLanguage]]">
+              prefs="{{prefs}}" detail="[[detailLanguage_]]">
           </settings-language-detail-page>
         </settings-subpage>
       </template>
diff --git a/chrome/browser/resources/settings/languages_page/languages_page.js b/chrome/browser/resources/settings/languages_page/languages_page.js
index 6d7b868..fe4f6a0 100644
--- a/chrome/browser/resources/settings/languages_page/languages_page.js
+++ b/chrome/browser/resources/settings/languages_page/languages_page.js
@@ -44,12 +44,6 @@
     },
 
     /** @private */
-    languagesSecondary_: {
-      type: String,
-      value: 'Placeholder, e.g. English (United States)',
-    },
-
-    /** @private */
     inputMethodsSecondary_: {
       type: String,
       value: 'Placeholder, e.g. US keyboard',
@@ -60,6 +54,13 @@
       type: String,
       value: 'Placeholder, e.g. English (United States)',
     },
+
+    /**
+     * The language to display the details for.
+     * @type {!LanguageInfo|undefined}
+     * @private
+     */
+    detailLanguage_: Object,
   },
 
   /** @private {!LanguageHelper} */
@@ -109,16 +110,26 @@
 
   /**
    * Opens the Language Detail page for the language.
-   * @param {!{model: !{item}}} e
+   * @param {!{model: !{item: !LanguageInfo}}} e
    * @private
    */
   onShowLanguageDetailTap_: function(e) {
-    this.$.languageSelector.select(e.model.item);
+    this.detailLanguage_ = e.model.item;
     this.$.pages.setSubpageChain(['language-detail']);
   },
 
 <if expr="not is_macosx">
   /**
+   * Returns the enabled languages which support spell check.
+   * @private
+   */
+  spellCheckLanguages_: function() {
+    return this.languages.enabledLanguages.filter(function(languageInfo) {
+      return languageInfo.language.supportsSpellcheck;
+    });
+  },
+
+  /**
    * Opens the Custom Dictionary page.
    * @private
    */
@@ -144,6 +155,33 @@
   },
 </if>
 
+   /**
+    * @return {string}
+    * @private
+    */
+  getProspectiveUILanguageName_: function() {
+    return this.languageHelper_.getLanguage(
+        this.languageHelper_.getProspectiveUILanguage()).displayName;
+  },
+
+  /**
+   * Returns either the "selected" class, if the language matches the
+   * prospective UI language, or an empty string. Languages can only be
+   * selected on Chrome OS and Windows.
+   * @param {string} languageCode The language code identifying a language.
+   * @param {string} prospectiveUILanguage The prospective UI language.
+   * @return {string} The class name for the language item.
+   * @private
+   */
+  getLanguageItemClass_: function(languageCode, prospectiveUILanguage) {
+<if expr="chromeos or is_win">
+    if (this.isProspectiveUILanguage_(languageCode, prospectiveUILanguage))
+      return 'selected';
+</if>
+    return '';
+  },
+
+<if expr="chromeos">
   /**
    * @param {string} id The input method ID.
    * @param {string} currentId The ID of the currently enabled input method.
@@ -156,6 +194,17 @@
   },
 
   /**
+   * @param {string} id The input method ID.
+   * @param {string} currentId The ID of the currently enabled input method.
+   * @return {string} The class for the input method item.
+   * @private
+   */
+  getInputMethodItemClass_: function(id, currentId) {
+    return this.isCurrentInputMethod_(id, currentId) ? 'selected' : '';
+  },
+</if>
+
+  /**
    * HACK(michaelpg): This is necessary to show the list when navigating to
    * the sub-page. Remove this function when PolymerElements/neon-animation#60
    * is fixed.
diff --git a/chrome/browser/resources/settings/languages_page/languages_types.js b/chrome/browser/resources/settings/languages_page/languages_types.js
index 895d3469b..0fe9220 100644
--- a/chrome/browser/resources/settings/languages_page/languages_types.js
+++ b/chrome/browser/resources/settings/languages_page/languages_types.js
@@ -55,6 +55,7 @@
 
   /** Resets the prospective UI language back to the actual UI language. */
   resetUILanguage: assertNotReached,
+</if>
 
   /**
    * Returns the "prospective" UI language, i.e. the one to be used on next
@@ -63,7 +64,6 @@
    * @return {string} Language code of the prospective UI language.
    */
   getProspectiveUILanguage: assertNotReached,
-</if>
 
   /**
    * @param {string} languageCode
diff --git a/chrome/browser/resources/settings/languages_page/manage_languages_page.html b/chrome/browser/resources/settings/languages_page/manage_languages_page.html
index cf58c00..d193e59 100644
--- a/chrome/browser/resources/settings/languages_page/manage_languages_page.html
+++ b/chrome/browser/resources/settings/languages_page/manage_languages_page.html
@@ -1,10 +1,9 @@
 <link rel="import" href="chrome://resources/html/assert.html">
 <link rel="import" href="chrome://resources/html/cr.html">
 <link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-checkbox.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
 <link rel="import" href="chrome://md-settings/settings_shared_css.html">
 <link rel="import" href="languages.html">
@@ -12,6 +11,12 @@
 <dom-module id="settings-manage-languages-page">
   <template>
     <style include="settings-shared">
+      .list-frame {
+        display: flex;
+        flex-direction: column;
+        align-items: initial;
+      }
+
       iron-list {
         height: 300px;
       }
@@ -23,12 +28,12 @@
         <div class="list-frame vertical-list">
           <template is="dom-repeat" items="{{languages.enabledLanguages}}">
             <div class="list-item">
-              <div class="language-name start"
-                  title="[[item.language.nativeDisplayName]]">
+              <div class="start" title="[[item.language.nativeDisplayName]]">
                 [[item.language.displayName]]
               </div>
               <paper-icon-button icon="clear" on-tap="onRemoveLanguageTap_"
-                  hidden$="[[!canRemoveLanguage_(item.language.code, prefs.intl.app_locale.value)]]">
+                  hidden$="[[!canRemoveLanguage_(
+                      item.language.code, prefs.intl.app_locale.value)]]">
               </paper-icon-button>
             </div>
           </template>
@@ -37,13 +42,14 @@
         <div class="list-frame vertical-list">
           <iron-list items="{{availableLanguages_}}" as="item">
             <template>
-              <div class="list-item" on-tap="onAddLanguageTap_">
-                <div class="language-name">
-                  <span>[[item.displayName]]</span> -
-                  <span>[[item.nativeDisplayName]]</span>
-                </div>
-                <iron-icon icon="done" hidden$="[[!item.enabled]]">
-                </iron-icon>
+              <div class="list-item">
+                <paper-checkbox checked="[[item.enabled]]"
+                    title$="[[item.nativeDisplayName]]"
+                    disabled="[[!canRemoveLanguage_(
+                        item.code, prefs.intl.app_locale.value)]]"
+                    on-change="onLanguageCheckboxChange_">
+                  [[item.displayName]]
+                </paper-checkbox>
               </div>
             </template>
           </iron-list>
diff --git a/chrome/browser/resources/settings/languages_page/manage_languages_page.js b/chrome/browser/resources/settings/languages_page/manage_languages_page.js
index a806b201..c7e44bf 100644
--- a/chrome/browser/resources/settings/languages_page/manage_languages_page.js
+++ b/chrome/browser/resources/settings/languages_page/manage_languages_page.js
@@ -51,16 +51,22 @@
   },
 
   /**
-   * Handler for adding a language.
-   * @param {!{model: {item: !chrome.languageSettingsPrivate.Language}}} e
+   * Handler for checking or unchecking a language item.
+   * @param {!{model: !{item: !chrome.languageSettingsPrivate.Language},
+   *           target: !PaperCheckboxElement}} e
    * @private
    */
-  onAddLanguageTap_: function(e) {
-    this.languageHelper_.enableLanguage(e.model.item.code);
+  onLanguageCheckboxChange_: function(e) {
+    var code = e.model.item.code;
+    if (e.target.checked)
+      this.languageHelper_.enableLanguage(code);
+    else
+      this.languageHelper_.disableLanguage(code);
   },
 
   /**
-   * True if a language is not the current or prospective UI language.
+   * True if a language is not the current or prospective UI language, ie,
+   * it could be disabled.
    * @param {string} languageCode
    * @param {string} prospectiveUILanguageCode
    * @return {boolean}
@@ -71,7 +77,6 @@
         languageCode == prospectiveUILanguageCode) {
       return false;
     }
-    assert(this.languages.enabledLanguages.length > 1);
     return true;
   },
 
diff --git a/chrome/browser/resources/settings/on_startup_page/on_startup_page.html b/chrome/browser/resources/settings/on_startup_page/on_startup_page.html
index e51905bc..2e00c1e 100644
--- a/chrome/browser/resources/settings/on_startup_page/on_startup_page.html
+++ b/chrome/browser/resources/settings/on_startup_page/on_startup_page.html
@@ -25,8 +25,7 @@
     </div>
     <template is="dom-if"
         if="[[showStartupUrls_(prefs.session.restore_on_startup.value)]]">
-      <settings-startup-urls-page prefs="{{prefs}}">
-      </settings-startup-urls-page>
+      <settings-startup-urls-page></settings-startup-urls-page>
     </template>
   </template>
   <script src="on_startup_page.js"></script>
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.html b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.html
new file mode 100644
index 0000000..0f7f4a6
--- /dev/null
+++ b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.html
@@ -0,0 +1,30 @@
+<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
+<link rel="import" href="chrome://md-settings/i18n_setup.html">
+<link rel="import" href="chrome://md-settings/on_startup_page/startup_urls_page_browser_proxy.html">
+<link rel="import" href="chrome://md-settings/settings_dialog.html">
+
+<dom-module id="settings-startup-url-dialog">
+  <template>
+    <style include="settings-shared"></style>
+    <settings-dialog id="dialog">
+      <div class="title">$i18n{onStartupAddNewPage}</div>
+      <div class="body">
+        <paper-input always-float-label id="url"
+            value="{{url_}}" on-input="validate_">
+          $i18n{onStartupSiteUrl}
+        </paper-input>
+      </div>
+      <div class="button-container">
+        <div class="action-buttons">
+          <paper-button class="cancel-button" on-tap="onCancelTap_"
+              id="cancel">$i18n{cancel}</paper-button>
+          <paper-button id="add" class="action-button" on-tap="onAddTap_"
+            disabled>$i18n{add}</paper-button>
+        </div>
+      </div>
+    </settings-dialog>
+  </template>
+  <script src="startup_url_dialog.js"></script>
+</dom-module>
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
new file mode 100644
index 0000000..363d376
--- /dev/null
+++ b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
@@ -0,0 +1,51 @@
+// 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.
+
+/**
+ * @fileoverview 'settings-startup-url-dialog' is a component for adding
+ * or editing a startup URL entry.
+ */
+Polymer({
+  is: 'settings-startup-url-dialog',
+
+  properties: {
+    /** @private {string} */
+    url_: String,
+  },
+
+  /** @private {!settings.SearchEnginesBrowserProxy} */
+  browserProxy_: null,
+
+  /** @override */
+  ready: function() {
+    this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance();
+  },
+
+  /** @override */
+  attached: function() {
+    this.$.dialog.open();
+  },
+
+  /** @private */
+  onCancelTap_: function() {
+    this.$.dialog.close();
+  },
+
+  /** @private */
+  onAddTap_: function() {
+    this.browserProxy_.addStartupPage(this.url_).then(function(success) {
+      if (success)
+        this.$.dialog.close();
+      // If the URL was invalid, there is nothing to do, just leave the dialog
+      // open and let the user fix the URL or cancel.
+    }.bind(this));
+  },
+
+  /** @private */
+  validate_: function() {
+    this.browserProxy_.validateStartupPage(this.url_).then(function(isValid) {
+      this.$.add.disabled = !isValid;
+    }.bind(this));
+  },
+});
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.html b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.html
index 725325a..6b8ced9 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.html
+++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.html
@@ -1,9 +1,8 @@
 <link rel="import" href="chrome://resources/html/polymer.html">
 <link rel="import" href="chrome://resources/html/util.html">
 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
-<link rel="import" href="chrome://md-settings/settings_dialog.html">
 <link rel="import" href="chrome://md-settings/settings_shared_css.html">
+<link rel="import" href="chrome://md-settings/on_startup_page/startup_url_dialog.html">
 <link rel="import" href="chrome://md-settings/on_startup_page/startup_urls_page_browser_proxy.html">
 
 <dom-module id="settings-startup-urls-page">
@@ -33,27 +32,12 @@
       <div class="list-item list-button" id="addPage" on-tap="onAddPageTap_">
         $i18n{onStartupAddNewPage}
       </div>
-      <div class="list-item list-button" on-tap="onUseCurrentPagesTap_">
-        $i18n{onStartupUseCurrent}
-      </div>
+      <div class="list-item list-button" id="useCurrentPages"
+          on-tap="onUseCurrentPagesTap_">$i18n{onStartupUseCurrent}</div>
     </div>
-
-    <settings-dialog id="addUrlDialog">
-      <div class="title">$i18n{onStartupAddNewPage}</div>
-      <div class="body">
-        <paper-input class="flex" always-float-label id="newUrl"
-            label="$i18n{onStartupSiteUrl}" value="{{newUrl_}}">
-        </paper-input>
-      </div>
-      <div class="button-container">
-        <div class="action-buttons">
-          <paper-button class="cancel-button" on-tap="onCancelTap_"
-              id="cancel">$i18n{cancel}</paper-button>
-          <paper-button id="add" class="action-button" on-tap="onAddTap_"
-              disabled="[[!isNewUrlValid_]]">$i18n{add}</paper-button>
-        </div>
-      </div>
-    </settings-dialog>
+    <template is="dom-if" if="[[showStartupUrlDialog_]]" restamp>
+      <settings-startup-url-dialog></settings-startup-url-dialog>
+    </template>
   </template>
   <script src="startup_urls_page.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
index 5166943..6ec9bc28 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
+++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
@@ -14,14 +14,6 @@
 /**
  * @fileoverview 'settings-startup-urls-page' is the settings page
  * containing the urls that will be opened when chrome is started.
- *
- * Example:
- *
- *    <neon-animated-pages>
- *      <settings-startup-urls-page prefs="{{prefs}}">
- *      </settings-startup-urls-page>
- *      ... other pages ...
- *    </neon-animated-pages>
  */
 Polymer({
   is: 'settings-startup-urls-page',
@@ -29,43 +21,24 @@
   behaviors: [WebUIListenerBehavior],
 
   properties: {
-    /**
-     * Preferences state.
-     */
-    prefs: {
-      type: Object,
-      notify: true,
-    },
-
     /** @type {settings.StartupUrlsPageBrowserProxy} */
     browserProxy_: Object,
 
-    /** @private {string} */
-    newUrl_: {
-      observer: 'newUrlChanged_',
-      type: String,
-      value: '',
-    },
-
-    isNewUrlValid_: {
-      type: Boolean,
-      value: false,
-    },
-
     /**
      * Pages to load upon browser startup.
      * @private {!Array<!StartupPageInfo>}
      */
     startupPages_: Array,
+
+    showStartupUrlDialog_: Boolean,
   },
 
-  created: function() {
-    this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance();
-  },
-
+  /** @override */
   attached: function() {
-    this.addWebUIListener('update-startup-pages',
-                          this.updateStartupPages_.bind(this));
+    this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance();
+    this.addWebUIListener('update-startup-pages', function(startupPages) {
+      this.startupPages_ = startupPages;
+    }.bind(this));
     this.browserProxy_.loadStartupPages();
   },
 
@@ -78,15 +51,20 @@
     return getFaviconImageSet(url);
   },
 
-  /** @private */
-  updateStartupPages_: function(startupPages) {
-    this.startupPages_ = startupPages;
-  },
-
-  /** @private */
+  /**
+   * Opens the dialog and registers a listener for removing the dialog from the
+   * DOM once is closed. The listener is destroyed when the dialog is removed
+   * (because of 'restamp').
+   * @private
+   */
   onAddPageTap_: function() {
-    this.newUrl_ = '';
-    this.$.addUrlDialog.open();
+    this.showStartupUrlDialog_ = true;
+    this.async(function() {
+      var dialog = this.$$('settings-startup-url-dialog');
+      dialog.addEventListener('iron-overlay-closed', function() {
+        this.showStartupUrlDialog_ = false;
+      }.bind(this));
+    }.bind(this));
   },
 
   /** @private */
@@ -94,37 +72,6 @@
     this.browserProxy_.useCurrentPages();
   },
 
-  /** @private */
-  onCancelTap_: function() {
-    this.$.addUrlDialog.close();
-  },
-
-  /**
-   * @param {string} newUrl
-   * @private
-   */
-  newUrlChanged_: function(newUrl) {
-    if (this.validationResolver_)
-      this.validationResolver_.reject(false);
-
-    /** @type {?PromiseResolver<boolean>} */
-    this.validationResolver_ = this.browserProxy_.validateStartupPage(newUrl);
-
-    this.validationResolver_.promise.then(function(isValid) {
-      this.isNewUrlValid_ = isValid;
-      this.validationResolver_ = null;
-    }.bind(this), function() {
-      // Squelchs console errors.
-    });
-  },
-
-  /** @private */
-  onAddTap_: function() {
-    assert(this.isNewUrlValid_);
-    this.browserProxy_.addStartupPage(this.newUrl_);
-    this.$.addUrlDialog.close();
-  },
-
   /**
    * @param {!{model: !{index: number}}} e
    * @private
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js b/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js
index 025748f..d286a2f 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js
+++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js
@@ -13,11 +13,15 @@
 
     /**
      * @param {string} url
-     * @return {!PromiseResolver<boolean>} Whether the URL is valid.
+     * @return {!Promise<boolean>} Whether the URL is valid.
      */
     validateStartupPage: assertNotReached,
 
-    /** @param {string} url */
+    /**
+     * @param {string} url
+     * @return {!Promise<boolean>} Whether the URL was actually added, or
+     *     ignored because it was invalid.
+     */
     addStartupPage: assertNotReached,
 
     /** @param {number} index */
@@ -45,15 +49,12 @@
 
     /** @override */
     validateStartupPage: function(url) {
-      var resolver = new PromiseResolver();
-      resolver.promise = url.trim().length == 0 ? Promise.resolve(false) :
-          cr.sendWithPromise('validateStartupPage', url);
-      return resolver;
+      return cr.sendWithPromise('validateStartupPage', url);
     },
 
     /** @override */
     addStartupPage: function(url) {
-      chrome.send('addStartupPage', [url.trim()]);
+      return cr.sendWithPromise('addStartupPage', url);
     },
 
     /** @override */
diff --git a/chrome/browser/resources/settings/people_page/manage_profile.html b/chrome/browser/resources/settings/people_page/manage_profile.html
index 0764ea8e..3697e5c 100644
--- a/chrome/browser/resources/settings/people_page/manage_profile.html
+++ b/chrome/browser/resources/settings/people_page/manage_profile.html
@@ -44,8 +44,8 @@
       }
     </style>
     <div class="settings-box first">
-      <paper-input value="{{profileName}}" pattern=".*\S.*" auto-validate
-          required on-change="onProfileNameChanged_">
+      <paper-input id="name" value="{{profileName}}" pattern=".*\S.*"
+          auto-validate required on-change="onProfileNameChanged_">
       </paper-input>
     </div>
     <div id="availableIcons">
diff --git a/chrome/browser/resources/settings/settings_resources.grd b/chrome/browser/resources/settings/settings_resources.grd
index 4efe8913..5b424be9 100644
--- a/chrome/browser/resources/settings/settings_resources.grd
+++ b/chrome/browser/resources/settings/settings_resources.grd
@@ -98,6 +98,13 @@
       <structure name="IDR_SETTINGS_STARTUP_URLS_PAGE_BROWSER_PROXY_HTML"
                  file="on_startup_page/startup_urls_page_browser_proxy.html"
                  type="chrome_html" />
+      <structure name="IDR_SETTINGS_STARTUP_URL_DIALOG_JS"
+                 file="on_startup_page/startup_url_dialog.js"
+                 type="chrome_html" />
+      <structure name="IDR_SETTINGS_STARTUP_URL_DIALOG_HTML"
+                 file="on_startup_page/startup_url_dialog.html"
+                 type="chrome_html"
+                 allowexternalscript="true" />
       <structure name="IDR_SETTINGS_CR_SETTINGS_MAIN_CSS"
                  file="settings_main/settings_main.css"
                  type="chrome_html" />
diff --git a/chrome/browser/resources/settings/settings_shared_css.html b/chrome/browser/resources/settings/settings_shared_css.html
index a24b5481..33e504aa 100644
--- a/chrome/browser/resources/settings/settings_shared_css.html
+++ b/chrome/browser/resources/settings/settings_shared_css.html
@@ -152,6 +152,10 @@
         border-bottom: 1px solid var(--paper-grey-300);
       }
 
+      .list-item.selected {
+        font-weight: 500;
+      }
+
       .list-item select {
         -webkit-margin-start: 4px;
       }
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index a85c75a..c9bf1799 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -260,6 +260,7 @@
       "//ash:ash_with_content",
       "//ash/strings",
       "//components/user_manager",
+      "//ui/app_list/shower",
       "//ui/keyboard:mojom",
     ]
     if (!is_chromeos) {
diff --git a/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc b/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
index bd6fdec2..1d16a5f2 100644
--- a/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
@@ -27,14 +27,14 @@
 
 #if defined(OS_CHROMEOS)
 #include "ash/shell.h"
-#include "ash/test/app_list_controller_test_api.h"
+#include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
 #endif
 
 namespace {
 
 app_list::AppListView* GetAppListView(AppListService* service) {
 #if defined(OS_CHROMEOS)
-  return ash::test::AppListControllerTestApi(ash::Shell::GetInstance()).view();
+  return AppListServiceAshTestApi().GetAppListView();
 #else
   return static_cast<AppListServiceViews*>(service)->shower().app_list();
 #endif
diff --git a/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc b/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
index 59e9819d..d2a24240 100644
--- a/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_controller_ash.cc
@@ -10,25 +10,25 @@
 #include "chrome/browser/ui/browser_navigator.h"
 #include "chrome/browser/ui/browser_navigator_params.h"
 #include "extensions/common/extension.h"
+#include "ui/app_list/shower/app_list_shower_impl.h"
 #include "ui/app_list/views/app_list_view.h"
 
-AppListControllerDelegateAsh::AppListControllerDelegateAsh() {}
+AppListControllerDelegateAsh::AppListControllerDelegateAsh(
+    app_list::AppListShowerImpl* app_list_shower)
+    : app_list_shower_(app_list_shower) {}
 
 AppListControllerDelegateAsh::~AppListControllerDelegateAsh() {}
 
 void AppListControllerDelegateAsh::DismissView() {
-  DCHECK(ash::Shell::HasInstance());
-  ash::Shell::GetInstance()->DismissAppList();
+  app_list_shower_->Dismiss();
 }
 
 gfx::NativeWindow AppListControllerDelegateAsh::GetAppListWindow() {
-  DCHECK(ash::Shell::HasInstance());
-  return ash::Shell::GetInstance()->GetAppListWindow();
+  return app_list_shower_->GetWindow();
 }
 
 gfx::Rect AppListControllerDelegateAsh::GetAppListBounds() {
-  app_list::AppListView* app_list_view =
-      ash::Shell::GetInstance()->GetAppListView();
+  app_list::AppListView* app_list_view = app_list_shower_->GetView();
   if (app_list_view)
     return app_list_view->GetBoundsInScreen();
   return gfx::Rect();
@@ -59,15 +59,13 @@
 }
 
 void AppListControllerDelegateAsh::OnShowChildDialog() {
-  app_list::AppListView* app_list_view =
-      ash::Shell::GetInstance()->GetAppListView();
+  app_list::AppListView* app_list_view = app_list_shower_->GetView();
   if (app_list_view)
     app_list_view->SetAppListOverlayVisible(true);
 }
 
 void AppListControllerDelegateAsh::OnCloseChildDialog() {
-  app_list::AppListView* app_list_view =
-      ash::Shell::GetInstance()->GetAppListView();
+  app_list::AppListView* app_list_view = app_list_shower_->GetView();
   if (app_list_view)
     app_list_view->SetAppListOverlayVisible(false);
 }
diff --git a/chrome/browser/ui/ash/app_list/app_list_controller_ash.h b/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
index b426da4..4eff5f2 100644
--- a/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
+++ b/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
@@ -10,9 +10,13 @@
 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
 
+namespace app_list {
+class AppListShowerImpl;
+}
+
 class AppListControllerDelegateAsh : public AppListControllerDelegate {
  public:
-  AppListControllerDelegateAsh();
+  explicit AppListControllerDelegateAsh(app_list::AppListShowerImpl*);
   ~AppListControllerDelegateAsh() override;
 
  private:
@@ -48,6 +52,9 @@
 
   ash::LaunchSource AppListSourceToLaunchSource(AppListSource source);
 
+  // Not owned.
+  app_list::AppListShowerImpl* app_list_shower_;
+
   DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateAsh);
 };
 
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
index fb76d99..b420c882 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
@@ -4,19 +4,49 @@
 
 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
 
+#include "ash/app_list/app_list_shower_delegate.h"
+#include "ash/app_list/app_list_shower_delegate_factory.h"
+#include "ash/app_list/app_list_view_delegate_factory.h"
 #include "ash/shell.h"
 #include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/singleton.h"
 #include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/app_list/app_list_view_delegate.h"
 #include "chrome/browser/ui/app_list/start_page_service.h"
 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
+#include "chrome/browser/ui/ash/session_util.h"
 #include "ui/app_list/app_list_switches.h"
+#include "ui/app_list/shower/app_list_shower_delegate_factory.h"
+#include "ui/app_list/shower/app_list_shower_impl.h"
 #include "ui/app_list/views/app_list_main_view.h"
 #include "ui/app_list/views/app_list_view.h"
 #include "ui/app_list/views/contents_view.h"
 
+namespace {
+
+class ViewDelegateFactoryImpl : public ash::AppListViewDelegateFactory {
+ public:
+  explicit ViewDelegateFactoryImpl(AppListServiceImpl* factory)
+      : factory_(factory) {}
+  ~ViewDelegateFactoryImpl() override {}
+
+  // app_list::AppListViewDelegateFactory:
+  app_list::AppListViewDelegate* GetDelegate() override {
+    return factory_->GetViewDelegate(
+        Profile::FromBrowserContext(GetActiveBrowserContext()));
+  }
+
+ private:
+  AppListServiceImpl* factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(ViewDelegateFactoryImpl);
+};
+
+}  // namespace
+
 // static
 AppListServiceAsh* AppListServiceAsh::GetInstance() {
   return base::Singleton<AppListServiceAsh,
@@ -24,33 +54,19 @@
 }
 
 AppListServiceAsh::AppListServiceAsh()
-    : controller_delegate_(new AppListControllerDelegateAsh()) {
+    : shower_delegate_factory_(new ash::AppListShowerDelegateFactory(
+          base::WrapUnique(new ViewDelegateFactoryImpl(this)))) {
+  app_list_shower_.reset(
+      new app_list::AppListShowerImpl(shower_delegate_factory_.get()));
+  controller_delegate_.reset(
+      new AppListControllerDelegateAsh(app_list_shower_.get()));
 }
 
 AppListServiceAsh::~AppListServiceAsh() {
 }
 
-void AppListServiceAsh::ShowAndSwitchToState(
-    app_list::AppListModel::State state) {
-  bool app_list_was_open = true;
-  app_list::AppListView* app_list_view =
-      ash::Shell::GetInstance()->GetAppListView();
-  if (!app_list_view) {
-    // TODO(calamity): This may cause the app list to show briefly before the
-    // state change. If this becomes an issue, add the ability to ash::Shell to
-    // load the app list without showing it.
-    ash::Shell::GetInstance()->ShowAppList(NULL);
-    app_list_was_open = false;
-    app_list_view = ash::Shell::GetInstance()->GetAppListView();
-    DCHECK(app_list_view);
-  }
-
-  if (state == app_list::AppListModel::INVALID_STATE)
-    return;
-
-  app_list::ContentsView* contents_view =
-      app_list_view->app_list_main_view()->contents_view();
-  contents_view->SetActiveState(state, app_list_was_open /* animate */);
+app_list::AppListShower* AppListServiceAsh::GetAppListShower() {
+  return app_list_shower_.get();
 }
 
 void AppListServiceAsh::Init(Profile* initial_profile) {
@@ -63,7 +79,28 @@
 }
 
 void AppListServiceAsh::OnProfileWillBeRemoved(
-    const base::FilePath& profile_path) {
+    const base::FilePath& profile_path) {}
+
+void AppListServiceAsh::ShowAndSwitchToState(
+    app_list::AppListModel::State state) {
+  bool app_list_was_open = true;
+  app_list::AppListView* app_list_view = app_list_shower_->GetView();
+  if (!app_list_view) {
+    // TODO(calamity): This may cause the app list to show briefly before the
+    // state change. If this becomes an issue, add the ability to ash::Shell to
+    // load the app list without showing it.
+    app_list_shower_->Show(ash::Shell::GetTargetRootWindow());
+    app_list_was_open = false;
+    app_list_view = app_list_shower_->GetView();
+    DCHECK(app_list_view);
+  }
+
+  if (state == app_list::AppListModel::INVALID_STATE)
+    return;
+
+  app_list::ContentsView* contents_view =
+      app_list_view->app_list_main_view()->contents_view();
+  contents_view->SetActiveState(state, app_list_was_open /* animate */);
 }
 
 base::FilePath AppListServiceAsh::GetProfilePath(
@@ -75,7 +112,7 @@
   // This may not work correctly if the profile passed in is different from the
   // one the ash Shell is currently using.
   // TODO(ananta): Handle profile changes correctly when !defined(OS_CHROMEOS).
-  ash::Shell::GetInstance()->ShowAppList(NULL);
+  app_list_shower_->Show(ash::Shell::GetTargetRootWindow());
 }
 
 void AppListServiceAsh::ShowForAppInstall(Profile* profile,
@@ -93,8 +130,7 @@
 }
 
 void AppListServiceAsh::HideCustomLauncherPage() {
-  app_list::AppListView* app_list_view =
-      ash::Shell::GetInstance()->GetAppListView();
+  app_list::AppListView* app_list_view = app_list_shower_->GetView();
   if (!app_list_view)
     return;
 
@@ -107,20 +143,18 @@
 }
 
 bool AppListServiceAsh::IsAppListVisible() const {
-  return ash::Shell::GetInstance()->GetAppListTargetVisibility();
+  return app_list_shower_->GetTargetVisibility();
 }
 
 void AppListServiceAsh::DismissAppList() {
-  ash::Shell::GetInstance()->DismissAppList();
+  app_list_shower_->Dismiss();
 }
 
 void AppListServiceAsh::EnableAppList(Profile* initial_profile,
                                       AppListEnableSource enable_source) {}
 
 gfx::NativeWindow AppListServiceAsh::GetAppListWindow() {
-  if (ash::Shell::HasInstance())
-    return ash::Shell::GetInstance()->GetAppListWindow();
-  return NULL;
+  return app_list_shower_->GetWindow();
 }
 
 Profile* AppListServiceAsh::GetCurrentAppListProfile() {
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.h b/chrome/browser/ui/ash/app_list/app_list_service_ash.h
index a6c139d..ffde548 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.h
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.h
@@ -11,18 +11,26 @@
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
 #include "ui/app_list/app_list_model.h"
 
-class AppListControllerDelegateAsh;
+namespace app_list {
+class AppListShower;
+class AppListShowerImpl;
+class AppListShowerDelegateFactory;
+}
 
 namespace base {
 template <typename T> struct DefaultSingletonTraits;
 }
 
+class AppListControllerDelegateAsh;
+
 // AppListServiceAsh wraps functionality in ChromeLauncherController and the Ash
 // Shell for showing and hiding the app list on the Ash desktop.
 class AppListServiceAsh : public AppListServiceImpl {
  public:
   static AppListServiceAsh* GetInstance();
 
+  app_list::AppListShower* GetAppListShower();
+
   // AppListService overrides:
   void Init(Profile* initial_profile) override;
 
@@ -34,6 +42,7 @@
 
  private:
   friend struct base::DefaultSingletonTraits<AppListServiceAsh>;
+  friend class AppListServiceAshTestApi;
 
   AppListServiceAsh();
   ~AppListServiceAsh() override;
@@ -62,6 +71,9 @@
   void CreateForProfile(Profile* default_profile) override;
   void DestroyAppList() override;
 
+  std::unique_ptr<app_list::AppListShowerDelegateFactory>
+      shower_delegate_factory_;
+  std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_;
   std::unique_ptr<AppListControllerDelegateAsh> controller_delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(AppListServiceAsh);
diff --git a/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc
new file mode 100644
index 0000000..2bf5197
--- /dev/null
+++ b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc
@@ -0,0 +1,45 @@
+// 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 "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
+
+#include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
+#include "ui/app_list/shower/test/app_list_shower_impl_test_api.h"
+#include "ui/app_list/views/app_list_main_view.h"
+#include "ui/app_list/views/app_list_view.h"
+#include "ui/app_list/views/apps_container_view.h"
+#include "ui/app_list/views/apps_grid_view.h"
+#include "ui/app_list/views/contents_view.h"
+#include "ui/app_list/views/start_page_view.h"
+
+AppListServiceAshTestApi::AppListServiceAshTestApi() {}
+
+app_list::AppListShowerImpl* AppListServiceAshTestApi::GetAppListShower()
+    const {
+  return AppListServiceAsh::GetInstance()->app_list_shower_.get();
+}
+
+app_list::AppListView* AppListServiceAshTestApi::GetAppListView() const {
+  app_list::test::AppListShowerImplTestApi shower_test_api(GetAppListShower());
+  return shower_test_api.view();
+}
+
+app_list::AppsGridView* AppListServiceAshTestApi::GetRootGridView() const {
+  return GetAppListView()
+      ->app_list_main_view()
+      ->contents_view()
+      ->apps_container_view()
+      ->apps_grid_view();
+}
+
+app_list::StartPageView* AppListServiceAshTestApi::GetStartPageView() const {
+  return GetAppListView()
+      ->app_list_main_view()
+      ->contents_view()
+      ->start_page_view();
+}
+
+void AppListServiceAshTestApi::LayoutContentsView() {
+  GetAppListView()->app_list_main_view()->contents_view()->Layout();
+}
diff --git a/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h
new file mode 100644
index 0000000..f51bb83
--- /dev/null
+++ b/chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h
@@ -0,0 +1,40 @@
+// 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 CHROME_BROWSER_UI_ASH_APP_LIST_TEST_APP_LIST_SERVICE_ASH_TEST_API_H_
+#define CHROME_BROWSER_UI_ASH_APP_LIST_TEST_APP_LIST_SERVICE_ASH_TEST_API_H_
+
+#include "base/macros.h"
+
+namespace app_list {
+class AppListShowerImpl;
+class AppListView;
+class AppsGridView;
+class StartPageView;
+}
+
+// Accesses private data from an AppListServiceAsh and AppListShowerImpl
+// for testing.
+class AppListServiceAshTestApi {
+ public:
+  AppListServiceAshTestApi();
+
+  app_list::AppListShowerImpl* GetAppListShower() const;
+
+  app_list::AppListView* GetAppListView() const;
+
+  // Gets the root level apps grid view.
+  app_list::AppsGridView* GetRootGridView() const;
+
+  // Gets the start page view.
+  app_list::StartPageView* GetStartPageView() const;
+
+  // Calls Layout() on the app_list::ContentsView.
+  void LayoutContentsView();
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(AppListServiceAshTestApi);
+};
+
+#endif  // CHROME_BROWSER_UI_ASH_APP_LIST_TEST_APP_LIST_SERVICE_ASH_TEST_API_H_
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 22398ab..f3da988 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -32,6 +32,7 @@
 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
 #include "chrome/grit/chromium_strings.h"
 #include "grit/theme_resources.h"
+#include "ui/app_list/shower/app_list_shower.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
 
@@ -139,10 +140,9 @@
       displayer.browser()->window()->GetNativeWindow());
 }
 
-app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() {
+app_list::AppListShower* ChromeShellDelegate::GetAppListShower() {
   DCHECK(ash::Shell::HasInstance());
-  return AppListServiceAsh::GetInstance()->GetViewDelegate(
-      Profile::FromBrowserContext(GetActiveBrowserContext()));
+  return AppListServiceAsh::GetInstance()->GetAppListShower();
 }
 
 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.h b/chrome/browser/ui/ash/chrome_shell_delegate.h
index eafce5b..2fc09d9 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.h
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.h
@@ -52,7 +52,7 @@
   void RemoveVirtualKeyboardStateObserver(
       ash::VirtualKeyboardStateObserver* observer) override;
   void OpenUrl(const GURL& url) override;
-  app_list::AppListViewDelegate* GetAppListViewDelegate() override;
+  app_list::AppListShower* GetAppListShower() override;
   ash::ShelfDelegate* CreateShelfDelegate(ash::ShelfModel* model) override;
   ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
   ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index c9a0381..a0171485 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -14,7 +14,6 @@
 #include "ash/shelf/shelf_util.h"
 #include "ash/shelf/shelf_view.h"
 #include "ash/shell.h"
-#include "ash/test/app_list_controller_test_api.h"
 #include "ash/test/shelf_test_api.h"
 #include "ash/test/shelf_view_test_api.h"
 #include "ash/test/shell_test_api.h"
@@ -33,6 +32,7 @@
 #include "chrome/browser/extensions/launch_util.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/app_list/app_list_service.h"
+#include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h"
 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
@@ -126,10 +126,9 @@
   if (!app_list::switches::IsExperimentalAppListEnabled())
     return;
 
-  ash::test::AppListControllerTestApi controller_test(
-      ash::Shell::GetInstance());
+  AppListServiceAshTestApi service_test;
 
-  app_list::StartPageView* start_page_view = controller_test.GetStartPageView();
+  app_list::StartPageView* start_page_view = service_test.GetStartPageView();
   DCHECK(start_page_view);
 
   app_list::TileItemView* all_apps_button = start_page_view->all_apps_button();
@@ -140,7 +139,7 @@
   generator->ClickLeftButton();
   base::MessageLoop::current()->RunUntilIdle();
   // Run Layout() to effectively complete the animation to the apps page.
-  controller_test.LayoutContentsView();
+  service_test.LayoutContentsView();
 }
 
 // Find the browser that associated with |app_name|.
@@ -1626,8 +1625,7 @@
 
   EXPECT_TRUE(service->IsAppListVisible());
   app_list::AppsGridView* grid_view =
-      ash::test::AppListControllerTestApi(ash::Shell::GetInstance()).
-          GetRootGridView();
+      AppListServiceAshTestApi().GetRootGridView();
   ASSERT_TRUE(grid_view);
   ASSERT_TRUE(grid_view->has_drag_and_drop_host_for_test());
 
@@ -1781,8 +1779,7 @@
   EXPECT_TRUE(service->IsAppListVisible());
 
   app_list::AppsGridView* grid_view =
-      ash::test::AppListControllerTestApi(ash::Shell::GetInstance()).
-          GetRootGridView();
+      AppListServiceAshTestApi().GetRootGridView();
   ASSERT_TRUE(grid_view);
   ASSERT_TRUE(grid_view->has_drag_and_drop_host_for_test());
 
@@ -1965,8 +1962,7 @@
 
   // Click an app icon in the app grid view.
   app_list::AppsGridView* grid_view =
-      ash::test::AppListControllerTestApi(ash::Shell::GetInstance()).
-          GetRootGridView();
+      AppListServiceAshTestApi().GetRootGridView();
   ASSERT_TRUE(grid_view);
   const views::ViewModelT<app_list::AppListItemView>* vm_grid =
       grid_view->view_model_for_test();
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
index d19219a..7dc2e3d5 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_COCOA_H_
 #define CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_COCOA_H_
 
+#include <memory>
+
 #import "base/mac/scoped_nsobject.h"
 #include "chrome/browser/media/desktop_media_picker.h"
 
diff --git a/chrome/browser/ui/tabs/tab_utils.cc b/chrome/browser/ui/tabs/tab_utils.cc
index f2e542f..0090aa5 100644
--- a/chrome/browser/ui/tabs/tab_utils.cc
+++ b/chrome/browser/ui/tabs/tab_utils.cc
@@ -13,6 +13,7 @@
 #include "chrome/browser/media/media_stream_capture_indicator.h"
 #include "chrome/browser/themes/theme_properties.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/usb/usb_tab_helper.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/grit/generated_resources.h"
 #include "content/public/browser/web_contents.h"
@@ -162,6 +163,10 @@
   if (contents->IsConnectedToBluetoothDevice())
     return TabAlertState::BLUETOOTH_CONNECTED;
 
+  UsbTabHelper* usb_tab_helper = UsbTabHelper::FromWebContents(contents);
+  if (usb_tab_helper && usb_tab_helper->IsDeviceConnected())
+    return TabAlertState::USB_CONNECTED;
+
   if (contents->IsAudioMuted())
     return TabAlertState::AUDIO_MUTING;
   if (contents->WasRecentlyAudible())
@@ -185,6 +190,8 @@
       return rb->GetNativeImageNamed(IDR_TAB_CAPTURE_INDICATOR);
     case TabAlertState::BLUETOOTH_CONNECTED:
       return rb->GetNativeImageNamed(IDR_TAB_BLUETOOTH_INDICATOR);
+    case TabAlertState::USB_CONNECTED:
+      return rb->GetNativeImageNamed(IDR_TAB_USB_INDICATOR);
     case TabAlertState::NONE:
       break;
   }
@@ -206,6 +213,9 @@
     case TabAlertState::BLUETOOTH_CONNECTED:
       icon_id = gfx::VectorIconId::TAB_BLUETOOTH_CONNECTED;
       break;
+    case TabAlertState::USB_CONNECTED:
+      icon_id = gfx::VectorIconId::TAB_USB_CONNECTED;
+      break;
     case TabAlertState::NONE:
       break;
   }
@@ -227,6 +237,7 @@
     case TabAlertState::MEDIA_RECORDING:
     case TabAlertState::TAB_CAPTURING:
     case TabAlertState::BLUETOOTH_CONNECTED:
+    case TabAlertState::USB_CONNECTED:
       return GetTabAlertIndicatorImage(alert_state, button_color);
   }
   NOTREACHED();
@@ -284,6 +295,10 @@
       result.append(l10n_util::GetStringUTF16(
           IDS_TOOLTIP_TAB_ALERT_STATE_BLUETOOTH_CONNECTED));
       break;
+    case TabAlertState::USB_CONNECTED:
+      result.append(
+          l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_ALERT_STATE_USB_CONNECTED));
+      break;
     case TabAlertState::NONE:
       NOTREACHED();
       break;
@@ -305,6 +320,7 @@
     case TabAlertState::MEDIA_RECORDING:
     case TabAlertState::TAB_CAPTURING:
     case TabAlertState::BLUETOOTH_CONNECTED:
+    case TabAlertState::USB_CONNECTED:
       return false;
   }
   NOTREACHED();
diff --git a/chrome/browser/ui/tabs/tab_utils.h b/chrome/browser/ui/tabs/tab_utils.h
index d4680e4f..6bc1b813d 100644
--- a/chrome/browser/ui/tabs/tab_utils.h
+++ b/chrome/browser/ui/tabs/tab_utils.h
@@ -33,6 +33,7 @@
   AUDIO_PLAYING,        // Audible audio is playing from the tab.
   AUDIO_MUTING,         // Tab audio is being muted.
   BLUETOOTH_CONNECTED,  // Tab is connected to a BT Device.
+  USB_CONNECTED,        // Tab is connected to a USB device.
 };
 
 enum class TabMutedReason {
diff --git a/chrome/browser/ui/views/accessibility/invert_bubble_view.cc b/chrome/browser/ui/views/accessibility/invert_bubble_view.cc
index b6919ba..1afa5e7 100644
--- a/chrome/browser/ui/views/accessibility/invert_bubble_view.cc
+++ b/chrome/browser/ui/views/accessibility/invert_bubble_view.cc
@@ -19,7 +19,7 @@
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/base/window_open_disposition.h"
 #include "ui/gfx/color_utils.h"
-#include "ui/views/bubble/bubble_delegate.h"
+#include "ui/views/bubble/bubble_dialog_delegate.h"
 #include "ui/views/controls/label.h"
 #include "ui/views/controls/link.h"
 #include "ui/views/controls/link_listener.h"
@@ -36,14 +36,15 @@
 const char kLearnMoreUrl[] =
     "https://groups.google.com/a/googleproductforums.com/d/topic/chrome/Xrco2HsXS-8/discussion";
 
-class InvertBubbleView : public views::BubbleDelegateView,
+class InvertBubbleView : public views::BubbleDialogDelegateView,
                          public views::LinkListener {
  public:
   InvertBubbleView(Browser* browser, views::View* anchor_view);
   ~InvertBubbleView() override;
 
  private:
-  // Overridden from views::BubbleDelegateView:
+  // Overridden from views::BubbleDialogDelegateView:
+  int GetDialogButtons() const override;
   void Init() override;
 
   // Overridden from views::LinkListener:
@@ -61,17 +62,21 @@
 };
 
 InvertBubbleView::InvertBubbleView(Browser* browser, views::View* anchor_view)
-    : views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
+    : views::BubbleDialogDelegateView(anchor_view,
+                                      views::BubbleBorder::TOP_RIGHT),
       browser_(browser),
       high_contrast_(NULL),
       dark_theme_(NULL),
       learn_more_(NULL),
-      close_(NULL) {
-}
+      close_(NULL) {}
 
 InvertBubbleView::~InvertBubbleView() {
 }
 
+int InvertBubbleView::GetDialogButtons() const {
+  return ui::DIALOG_BUTTON_NONE;
+}
+
 void InvertBubbleView::Init() {
   ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
   const gfx::FontList& original_font_list =
@@ -165,7 +170,7 @@
       !pref_service->GetBoolean(prefs::kInvertNotificationShown)) {
     pref_service->SetBoolean(prefs::kInvertNotificationShown, true);
     InvertBubbleView* delegate = new InvertBubbleView(browser, anchor);
-    views::BubbleDelegateView::CreateBubble(delegate)->Show();
+    views::BubbleDialogDelegateView::CreateBubble(delegate)->Show();
   }
 }
 
diff --git a/chrome/browser/ui/views/critical_notification_bubble_view.cc b/chrome/browser/ui/views/critical_notification_bubble_view.cc
index 800c8fa..ded52e7b 100644
--- a/chrome/browser/ui/views/critical_notification_bubble_view.cc
+++ b/chrome/browser/ui/views/critical_notification_bubble_view.cc
@@ -17,26 +17,17 @@
 #include "content/public/browser/user_metrics.h"
 #include "grit/theme_resources.h"
 #include "ui/accessibility/ax_view_state.h"
-#include "ui/base/accelerators/accelerator.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/views/controls/button/label_button.h"
-#include "ui/views/controls/image_view.h"
+#include "ui/views/bubble/bubble_frame_view.h"
 #include "ui/views/controls/label.h"
-#include "ui/views/layout/grid_layout.h"
-#include "ui/views/layout/layout_constants.h"
+#include "ui/views/layout/fill_layout.h"
 #include "ui/views/widget/widget.h"
 
 using base::UserMetricsAction;
 
 namespace {
 
-// Layout constants.
-const int kInset = 2;
-const int kImageHeadlinePadding = 4;
-const int kHeadlineMessagePadding = 4;
-const int kMessageBubblePadding = 11;
-
 // How long to give the user until auto-restart if no action is taken. The code
 // assumes this to be less than a minute.
 const int kCountdownDuration = 30;  // Seconds.
@@ -52,34 +43,18 @@
 
 CriticalNotificationBubbleView::CriticalNotificationBubbleView(
     views::View* anchor_view)
-    : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
-      headline_(NULL),
-      restart_button_(NULL),
-      dismiss_button_(NULL) {
+    : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT) {
   set_close_on_deactivate(false);
 }
 
 CriticalNotificationBubbleView::~CriticalNotificationBubbleView() {
 }
 
-int CriticalNotificationBubbleView::GetRemainingTime() {
-  base::TimeDelta time_lapsed = base::Time::Now() - bubble_created_;
+int CriticalNotificationBubbleView::GetRemainingTime() const {
+  base::TimeDelta time_lapsed = base::TimeTicks::Now() - bubble_created_;
   return kCountdownDuration - time_lapsed.InSeconds();
 }
 
-void CriticalNotificationBubbleView::UpdateBubbleHeadline(int seconds) {
-  if (seconds > 0) {
-    headline_->SetText(
-        l10n_util::GetStringFUTF16(IDS_CRITICAL_NOTIFICATION_HEADLINE,
-            l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
-            base::IntToString16(seconds)));
-  } else {
-    headline_->SetText(
-        l10n_util::GetStringFUTF16(IDS_CRITICAL_NOTIFICATION_HEADLINE_ALTERNATE,
-            l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
-  }
-}
-
 void CriticalNotificationBubbleView::OnCountdown() {
   UpgradeDetector* upgrade_detector = UpgradeDetector::GetInstance();
   if (upgrade_detector->critical_update_acknowledged()) {
@@ -103,37 +78,80 @@
   // after we attempt restart, but remember that shutdown may be aborted by
   // an onbeforeunload handler, leaving the bubble up when the browser should
   // have restarted (giving the user another chance).
-  UpdateBubbleHeadline(seconds);
-  SchedulePaint();
+  GetBubbleFrameView()->UpdateWindowTitle();
 }
 
-void CriticalNotificationBubbleView::ButtonPressed(
-    views::Button* sender, const ui::Event& event) {
-  // Let other bubbles know we have an answer from the user.
-  UpgradeDetector::GetInstance()->acknowledge_critical_update();
+base::string16 CriticalNotificationBubbleView::GetWindowTitle() const {
+  int seconds = GetRemainingTime();
+  return seconds > 0 ? l10n_util::GetStringFUTF16(
+                           IDS_CRITICAL_NOTIFICATION_HEADLINE,
+                           l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
+                           base::IntToString16(seconds))
+                     : l10n_util::GetStringFUTF16(
+                           IDS_CRITICAL_NOTIFICATION_HEADLINE_ALTERNATE,
+                           l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+}
 
-  if (sender == restart_button_) {
-    content::RecordAction(UserMetricsAction("CriticalNotification_Restart"));
-    chrome::AttemptRestart();
-  } else if (sender == dismiss_button_) {
-    content::RecordAction(UserMetricsAction("CriticalNotification_Ignore"));
-    // If the counter reaches 0, we set a restart flag that must be cleared if
-    // the user selects, for example, "Stay on this page" during an
-    // onbeforeunload handler.
-    PrefService* prefs = g_browser_process->local_state();
-    if (prefs->HasPrefPath(prefs::kRestartLastSessionOnShutdown))
-      prefs->ClearPref(prefs::kRestartLastSessionOnShutdown);
-  } else {
-    NOTREACHED();
-  }
+gfx::ImageSkia CriticalNotificationBubbleView::GetWindowIcon() {
+  return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+      IDR_UPDATE_MENU_SEVERITY_HIGH);
+}
 
-  GetWidget()->Close();
+bool CriticalNotificationBubbleView::ShouldShowWindowIcon() const {
+  return true;
 }
 
 void CriticalNotificationBubbleView::WindowClosing() {
   refresh_timer_.Stop();
 }
 
+bool CriticalNotificationBubbleView::Cancel() {
+  UpgradeDetector::GetInstance()->acknowledge_critical_update();
+  content::RecordAction(UserMetricsAction("CriticalNotification_Ignore"));
+  // If the counter reaches 0, we set a restart flag that must be cleared if
+  // the user selects, for example, "Stay on this page" during an
+  // onbeforeunload handler.
+  PrefService* prefs = g_browser_process->local_state();
+  if (prefs->HasPrefPath(prefs::kRestartLastSessionOnShutdown))
+    prefs->ClearPref(prefs::kRestartLastSessionOnShutdown);
+  return true;
+}
+
+bool CriticalNotificationBubbleView::Accept() {
+  UpgradeDetector::GetInstance()->acknowledge_critical_update();
+  content::RecordAction(UserMetricsAction("CriticalNotification_Restart"));
+  chrome::AttemptRestart();
+  return true;
+}
+
+base::string16 CriticalNotificationBubbleView::GetDialogButtonLabel(
+    ui::DialogButton button) const {
+  return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_CANCEL
+                                       ? IDS_CRITICAL_NOTIFICATION_DISMISS
+                                       : IDS_CRITICAL_NOTIFICATION_RESTART);
+}
+
+void CriticalNotificationBubbleView::Init() {
+  bubble_created_ = base::TimeTicks::Now();
+
+  SetLayoutManager(new views::FillLayout());
+
+  views::Label* message = new views::Label();
+  message->SetMultiLine(true);
+  message->SetHorizontalAlignment(gfx::ALIGN_LEFT);
+  message->SetText(l10n_util::GetStringFUTF16(IDS_CRITICAL_NOTIFICATION_TEXT,
+      l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
+  message->SizeToFit(views::Widget::GetLocalizedContentsWidth(
+      IDS_CRUCIAL_NOTIFICATION_BUBBLE_WIDTH_CHARS));
+  AddChildView(message);
+
+  refresh_timer_.Start(FROM_HERE,
+      base::TimeDelta::FromMilliseconds(kRefreshBubbleEvery),
+      this, &CriticalNotificationBubbleView::OnCountdown);
+
+  content::RecordAction(UserMetricsAction("CriticalNotificationShown"));
+}
+
 void CriticalNotificationBubbleView::GetAccessibleState(
     ui::AXViewState* state) {
   state->role = ui::AX_ROLE_ALERT;
@@ -144,82 +162,3 @@
   if (details.is_add && details.child == this)
     NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
 }
-
-bool CriticalNotificationBubbleView::AcceleratorPressed(
-    const ui::Accelerator& accelerator) {
-  if (accelerator.key_code() == ui::VKEY_ESCAPE)
-    UpgradeDetector::GetInstance()->acknowledge_critical_update();
-  return BubbleDelegateView::AcceleratorPressed(accelerator);
-}
-
-void CriticalNotificationBubbleView::Init() {
-  bubble_created_ = base::Time::Now();
-
-  ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
-
-  views::GridLayout* layout = views::GridLayout::CreatePanel(this);
-  layout->SetInsets(0, kInset, kInset, kInset);
-  SetLayoutManager(layout);
-
-  const int top_column_set_id = 0;
-  views::ColumnSet* top_columns = layout->AddColumnSet(top_column_set_id);
-  top_columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER,
-                         0, views::GridLayout::USE_PREF, 0, 0);
-  top_columns->AddPaddingColumn(0, kImageHeadlinePadding);
-  top_columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER,
-                         0, views::GridLayout::USE_PREF, 0, 0);
-  top_columns->AddPaddingColumn(1, 0);
-  layout->StartRow(0, top_column_set_id);
-
-  views::ImageView* image = new views::ImageView();
-  image->SetImage(rb.GetImageSkiaNamed(IDR_UPDATE_MENU_SEVERITY_HIGH));
-  layout->AddView(image);
-
-  headline_ = new views::Label();
-  headline_->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont));
-  UpdateBubbleHeadline(GetRemainingTime());
-  layout->AddView(headline_);
-
-  const int middle_column_set_id = 1;
-  views::ColumnSet* middle_column = layout->AddColumnSet(middle_column_set_id);
-  middle_column->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER,
-                           0, views::GridLayout::USE_PREF, 0, 0);
-  layout->StartRowWithPadding(0, middle_column_set_id,
-                              0, kHeadlineMessagePadding);
-
-  views::Label* message = new views::Label();
-  message->SetMultiLine(true);
-  message->SetHorizontalAlignment(gfx::ALIGN_LEFT);
-  message->SetText(l10n_util::GetStringFUTF16(IDS_CRITICAL_NOTIFICATION_TEXT,
-      l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
-  message->SizeToFit(views::Widget::GetLocalizedContentsWidth(
-      IDS_CRUCIAL_NOTIFICATION_BUBBLE_WIDTH_CHARS));
-  layout->AddView(message);
-
-  const int bottom_column_set_id = 2;
-  views::ColumnSet* bottom_columns = layout->AddColumnSet(bottom_column_set_id);
-  bottom_columns->AddPaddingColumn(1, 0);
-  bottom_columns->AddColumn(views::GridLayout::CENTER,
-      views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0);
-  bottom_columns->AddPaddingColumn(0, views::kRelatedButtonHSpacing);
-  bottom_columns->AddColumn(views::GridLayout::CENTER,
-      views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0);
-  layout->StartRowWithPadding(0, bottom_column_set_id,
-                              0, kMessageBubblePadding);
-
-  restart_button_ = new views::LabelButton(this,
-      l10n_util::GetStringUTF16(IDS_CRITICAL_NOTIFICATION_RESTART));
-  restart_button_->SetStyle(views::Button::STYLE_BUTTON);
-  restart_button_->SetIsDefault(true);
-  layout->AddView(restart_button_);
-  dismiss_button_ = new views::LabelButton(this,
-      l10n_util::GetStringUTF16(IDS_CRITICAL_NOTIFICATION_DISMISS));
-  dismiss_button_->SetStyle(views::Button::STYLE_BUTTON);
-  layout->AddView(dismiss_button_);
-
-  refresh_timer_.Start(FROM_HERE,
-      base::TimeDelta::FromMilliseconds(kRefreshBubbleEvery),
-      this, &CriticalNotificationBubbleView::OnCountdown);
-
-  content::RecordAction(UserMetricsAction("CriticalNotificationShown"));
-}
diff --git a/chrome/browser/ui/views/critical_notification_bubble_view.h b/chrome/browser/ui/views/critical_notification_bubble_view.h
index e06116f0..d14785f 100644
--- a/chrome/browser/ui/views/critical_notification_bubble_view.h
+++ b/chrome/browser/ui/views/critical_notification_bubble_view.h
@@ -7,61 +7,39 @@
 
 #include "base/macros.h"
 #include "base/timer/timer.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/controls/button/button.h"
+#include "ui/views/bubble/bubble_dialog_delegate.h"
 
-namespace ui {
-class Accelerator;
-}
-
-namespace views {
-class Label;
-class LabelButton;
-}
-
-class CriticalNotificationBubbleView : public views::BubbleDelegateView,
-                                       public views::ButtonListener {
+class CriticalNotificationBubbleView : public views::BubbleDialogDelegateView {
  public:
   explicit CriticalNotificationBubbleView(views::View* anchor_view);
   ~CriticalNotificationBubbleView() override;
 
-  // views::ButtonListener overrides:
-  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
-
-  // views::WidgetDelegate overrides:
+  // views::BubbleDialogDelegateView overrides:
+  base::string16 GetWindowTitle() const override;
+  gfx::ImageSkia GetWindowIcon() override;
+  bool ShouldShowWindowIcon() const override;
   void WindowClosing() override;
-
-  // views::View overrides:
+  bool Cancel() override;
+  bool Accept() override;
+  void Init() override;
+  base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
   void GetAccessibleState(ui::AXViewState* state) override;
   void ViewHierarchyChanged(
       const ViewHierarchyChangedDetails& details) override;
 
- protected:
-  // views::BubbleDelegateView overrides:
-  bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
-  void Init() override;
-
  private:
   // Helper function to calculate the remaining time (in seconds) until
   // spontaneous reboot.
-  int GetRemainingTime();
-
-  // Helper function to set the headline for the bubble.
-  void UpdateBubbleHeadline(int seconds);
+  int GetRemainingTime() const;
 
   // Called when the timer fires each time the clock ticks.
   void OnCountdown();
 
-  // The headline and buttons on the bubble.
-  views::Label* headline_;
-  views::LabelButton* restart_button_;
-  views::LabelButton* dismiss_button_;
-
   // A timer to refresh the bubble to show new countdown value.
   base::RepeatingTimer refresh_timer_;
 
   // When the bubble was created.
-  base::Time bubble_created_;
+  base::TimeTicks bubble_created_;
 
   DISALLOW_COPY_AND_ASSIGN(CriticalNotificationBubbleView);
 };
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc
index 36fc170c..d5176c8 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_browsertest.cc
@@ -13,7 +13,7 @@
 
 // Test is Flaky on Windows see crbug.com/600201.
 #if defined(OS_WIN)
-#define MAYBE_InactiveSeparatorColor FLAKY_InactiveSeparatorColor
+#define MAYBE_InactiveSeparatorColor DISABLED_InactiveSeparatorColor
 #else
 #define MAYBE_InactiveSeparatorColor InactiveSeparatorColor
 #endif
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 98b84ce..2d816a9c 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -779,9 +779,8 @@
 
 void ToolbarView::ShowCriticalNotification() {
 #if defined(OS_WIN)
-  CriticalNotificationBubbleView* bubble_delegate =
-      new CriticalNotificationBubbleView(app_menu_button_);
-  views::BubbleDelegateView::CreateBubble(bubble_delegate)->Show();
+  views::BubbleDialogDelegateView::CreateBubble(
+      new CriticalNotificationBubbleView(app_menu_button_))->Show();
 #endif
 }
 
diff --git a/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc b/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
index 3afbd35..17342b66 100644
--- a/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
+++ b/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
@@ -81,15 +81,17 @@
 }
 
 void StartupPagesHandler::HandleAddStartupPage(const base::ListValue* args) {
+  CHECK_EQ(2U, args->GetSize());
+
+  const base::Value* callback_id;
+  CHECK(args->Get(0, &callback_id));
+
   std::string url_string;
-  if (!args->GetString(0, &url_string)) {
-    NOTREACHED();
-    return;
-  }
+  CHECK(args->GetString(1, &url_string));
 
   GURL url;
   if (!settings_utils::FixupAndValidateStartupPage(url_string, &url)) {
-    NOTREACHED();
+    ResolveJavascriptCallback(*callback_id, base::FundamentalValue(false));
     return;
   }
 
@@ -100,6 +102,7 @@
 
   startup_custom_pages_table_model_.Add(index, url);
   SaveStartupPagesPref();
+  ResolveJavascriptCallback(*callback_id, base::FundamentalValue(true));
 }
 
 void StartupPagesHandler::HandleOnStartupPrefsPageLoad(
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
index 1154f65..439a7c11 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -34,12 +34,6 @@
       IDS_SYNC_CONFIRMATION_CHROME_SYNC_TITLE);
   source->AddLocalizedString("syncConfirmationChromeSyncBody",
       IDS_SYNC_CONFIRMATION_CHROME_SYNC_BODY);
-  source->AddLocalizedString("syncConfirmationActivityControlsTitle",
-      IDS_SYNC_CONFIRMATION_ACTIVITY_CONTROLS_TITLE);
-  source->AddLocalizedString("syncConfirmationActivityControlsBody",
-      IDS_SYNC_CONFIRMATION_ACTIVITY_CONTROLS_BODY);
-  source->AddLocalizedString("syncConfirmationActivityControlsCheckboxLabel",
-      IDS_SYNC_CONFIRMATION_ACTIVITY_CONTROLS_CHECKBOX_LABEL);
   source->AddLocalizedString("syncConfirmationConfirmLabel",
       IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL);
   source->AddLocalizedString("syncConfirmationUndoLabel",
diff --git a/chrome/browser/usb/usb_tab_helper.cc b/chrome/browser/usb/usb_tab_helper.cc
index 0f7f989..1652275 100644
--- a/chrome/browser/usb/usb_tab_helper.cc
+++ b/chrome/browser/usb/usb_tab_helper.cc
@@ -7,6 +7,8 @@
 #include <utility>
 
 #include "base/memory/scoped_ptr.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/usb/web_usb_permission_provider.h"
 #include "device/usb/mojo/device_manager_impl.h"
 
@@ -57,8 +59,23 @@
   GetChooserService(render_frame_host, std::move(request));
 }
 
+void UsbTabHelper::IncrementConnectionCount() {
+  device_connection_count_++;
+  NotifyTabStateChanged();
+}
+
+void UsbTabHelper::DecrementConnectionCount() {
+  DCHECK_GT(device_connection_count_, 0);
+  device_connection_count_--;
+  NotifyTabStateChanged();
+}
+
+bool UsbTabHelper::IsDeviceConnected() const {
+  return device_connection_count_ > 0;
+}
+
 UsbTabHelper::UsbTabHelper(WebContents* web_contents)
-    : content::WebContentsObserver(web_contents) {}
+    : content::WebContentsObserver(web_contents), device_connection_count_(0) {}
 
 void UsbTabHelper::RenderFrameDeleted(RenderFrameHost* render_frame_host) {
   frame_usb_services_.erase(render_frame_host);
@@ -101,3 +118,16 @@
   }
   frame_usb_services->chooser_service->Bind(std::move(request));
 }
+
+void UsbTabHelper::NotifyTabStateChanged() const {
+  // TODO(https://crbug.com/601627): Implement tab indicator for Android.
+#if !defined(OS_ANDROID)
+  Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
+  if (browser) {
+    TabStripModel* tab_strip_model = browser->tab_strip_model();
+    tab_strip_model->UpdateWebContentsStateAt(
+        tab_strip_model->GetIndexOfWebContents(web_contents()),
+        TabStripModelObserver::ALL);
+  }
+#endif
+}
diff --git a/chrome/browser/usb/usb_tab_helper.h b/chrome/browser/usb/usb_tab_helper.h
index 71eed596..bc9f737 100644
--- a/chrome/browser/usb/usb_tab_helper.h
+++ b/chrome/browser/usb/usb_tab_helper.h
@@ -42,6 +42,10 @@
       content::RenderFrameHost* render_frame_host,
       mojo::InterfaceRequest<device::usb::ChooserService> request);
 
+  void IncrementConnectionCount();
+  void DecrementConnectionCount();
+  bool IsDeviceConnected() const;
+
  private:
   explicit UsbTabHelper(content::WebContents* web_contents);
   friend class content::WebContentsUserData<UsbTabHelper>;
@@ -59,7 +63,10 @@
       content::RenderFrameHost* render_frame_host,
       mojo::InterfaceRequest<device::usb::ChooserService> request);
 
+  void NotifyTabStateChanged() const;
+
   FrameUsbServicesMap frame_usb_services_;
+  int device_connection_count_;
 
   DISALLOW_COPY_AND_ASSIGN(UsbTabHelper);
 };
diff --git a/chrome/browser/usb/web_usb_permission_provider.cc b/chrome/browser/usb/web_usb_permission_provider.cc
index c0727eb..2c23d2e 100644
--- a/chrome/browser/usb/web_usb_permission_provider.cc
+++ b/chrome/browser/usb/web_usb_permission_provider.cc
@@ -11,6 +11,7 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/usb/usb_chooser_context.h"
 #include "chrome/browser/usb/usb_chooser_context_factory.h"
+#include "chrome/browser/usb/usb_tab_helper.h"
 #include "chrome/common/chrome_switches.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_frame_host.h"
@@ -113,3 +114,19 @@
       render_frame_host_->GetLastCommittedURL().GetOrigin(),
       &configuration_value, &requested_function);
 }
+
+void WebUSBPermissionProvider::IncrementConnectionCount() {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+  WebContents* web_contents =
+      WebContents::FromRenderFrameHost(render_frame_host_);
+  UsbTabHelper* tab_helper = UsbTabHelper::FromWebContents(web_contents);
+  tab_helper->IncrementConnectionCount();
+}
+
+void WebUSBPermissionProvider::DecrementConnectionCount() {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+  WebContents* web_contents =
+      WebContents::FromRenderFrameHost(render_frame_host_);
+  UsbTabHelper* tab_helper = UsbTabHelper::FromWebContents(web_contents);
+  tab_helper->DecrementConnectionCount();
+}
diff --git a/chrome/browser/usb/web_usb_permission_provider.h b/chrome/browser/usb/web_usb_permission_provider.h
index 2374b11..65939858 100644
--- a/chrome/browser/usb/web_usb_permission_provider.h
+++ b/chrome/browser/usb/web_usb_permission_provider.h
@@ -36,6 +36,8 @@
       uint8_t requested_function,
       uint8_t configuration_value,
       const device::usb::DeviceInfo& device_info) const override;
+  void IncrementConnectionCount() override;
+  void DecrementConnectionCount() override;
 
  private:
   content::RenderFrameHost* const render_frame_host_;
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 2007b9b..38b4d72 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -2268,7 +2268,7 @@
     'chrome_browser_plugins_sources': [
       'browser/browsing_data/browsing_data_flash_lso_helper.cc',
       'browser/browsing_data/browsing_data_flash_lso_helper.h',
-      'browser/component_updater/flash_component_installer.h',
+      'browser/component_updater/pepper_flash_component_installer.h',
       'browser/component_updater/pepper_flash_component_installer.cc',
       'browser/metrics/plugin_metrics_provider.cc',
       'browser/metrics/plugin_metrics_provider.h',
@@ -3754,6 +3754,7 @@
           'conditions': [
             ['android_java_ui==1', {
               'dependencies': [
+                '../components/components.gyp:browsing_data_ui',
                 '../components/components.gyp:data_usage_android',
                 '../components/components.gyp:offline_pages',
                 '../components/components.gyp:precache_content',
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 40b5ec3..270d1c9 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -2255,8 +2255,6 @@
       'browser/ui/views/constrained_web_dialog_delegate_views.cc',
       'browser/ui/views/create_application_shortcut_view.cc',
       'browser/ui/views/create_application_shortcut_view.h',
-      'browser/ui/views/critical_notification_bubble_view.cc',
-      'browser/ui/views/critical_notification_bubble_view.h',
       'browser/ui/views/download/download_danger_prompt_views.cc',
       'browser/ui/views/download/download_feedback_dialog_view.cc',
       'browser/ui/views/download/download_feedback_dialog_view.h',
@@ -2586,6 +2584,8 @@
       'browser/ui/network_profile_bubble.h',
       'browser/ui/views/color_chooser_dialog.cc',
       'browser/ui/views/color_chooser_dialog.h',
+      'browser/ui/views/critical_notification_bubble_view.cc',
+      'browser/ui/views/critical_notification_bubble_view.h',
       'browser/ui/views/frame/browser_desktop_window_tree_host.h',
       'browser/ui/views/frame/browser_desktop_window_tree_host_win.cc',
       'browser/ui/views/frame/browser_desktop_window_tree_host_win.h',
@@ -3058,6 +3058,7 @@
             '../ash/ash.gyp:ash_with_content',
             '../ash/ash_strings.gyp:ash_strings',
             '../components/components.gyp:user_manager',
+            '../ui/app_list/shower/app_list_shower.gyp:app_list_shower',
           ],
           'conditions': [
             ['chromeos == 0', {
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index d29a1587..038d8ba 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -632,6 +632,10 @@
       'browser/ui/cocoa/web_contents_modal_dialog_manager_views_mac_browsertest.mm',
       'browser/ui/cocoa/website_settings/permission_bubble_cocoa_browser_test.mm',
     ],
+    'chrome_browser_app_list_ash_test_support_sources': [
+      'browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc',
+      'browser/ui/ash/app_list/test/app_list_service_ash_test_api.h',
+    ],
     'chrome_browser_tests_ash_sources': [
       'browser/ui/ash/accelerator_commands_browsertest.cc',
       'browser/ui/ash/accelerator_controller_browsertest.cc',
@@ -2381,6 +2385,16 @@
           'dependencies': [
             '../ash/ash.gyp:ash_test_support',
           ],
+          'conditions': [
+            ['enable_app_list==1', {
+              'sources': [
+                '<@(chrome_browser_app_list_ash_test_support_sources)'
+              ],
+              'dependencies': [
+                '../ui/app_list/shower/app_list_shower.gyp:app_list_shower_test_support',
+              ],
+            }],
+          ],
         }],
         ['use_aura==1 or toolkit_views==1', {
           'dependencies': [
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index c1592d3..c23fdbc9 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -132,7 +132,6 @@
       'browser/manifest/manifest_icon_selector_unittest.cc',
       'browser/media/media_stream_device_permission_context_unittest.cc',
       'browser/media/midi_permission_context_unittest.cc',
-      'browser/media/native_desktop_media_list_unittest.cc',
       'browser/metrics/chrome_browser_main_extra_parts_metrics_unittest.cc',
       'browser/metrics/chrome_metrics_service_accessor_unittest.cc',
       'browser/metrics/perf/perf_provider_chromeos_unittest.cc',
@@ -1597,6 +1596,7 @@
     ],
     # Everything but Android, ChromeOS and iOS (iOS is handled separately).
     'chrome_unit_tests_non_android_or_chromeos_sources': [
+      'browser/media/native_desktop_media_list_unittest.cc',
       'browser/signin/cross_device_promo_unittest.cc',
       'browser/signin/signin_global_error_unittest.cc',
       'browser/sync/sync_global_error_unittest.cc',
diff --git a/chrome/common/media_galleries/picasa_types.cc b/chrome/common/media_galleries/picasa_types.cc
index ab433f2..ffdc139d 100644
--- a/chrome/common/media_galleries/picasa_types.cc
+++ b/chrome/common/media_galleries/picasa_types.cc
@@ -49,6 +49,8 @@
       path(path) {
 }
 
+AlbumInfo::AlbumInfo(const AlbumInfo& other) = default;
+
 AlbumInfo::~AlbumInfo() {
 }
 
diff --git a/chrome/common/media_galleries/picasa_types.h b/chrome/common/media_galleries/picasa_types.h
index ba3adee..8239b3a2 100644
--- a/chrome/common/media_galleries/picasa_types.h
+++ b/chrome/common/media_galleries/picasa_types.h
@@ -47,6 +47,7 @@
   AlbumInfo();
   AlbumInfo(const std::string& name, const base::Time& timestamp,
             const std::string& uid, const base::FilePath& path);
+  AlbumInfo(const AlbumInfo& other);
 
   ~AlbumInfo();
 
diff --git a/chrome/common/safe_browsing/mach_o_image_reader_mac.cc b/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
index 3ce37516..9805ee51 100644
--- a/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
+++ b/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
@@ -73,6 +73,8 @@
 
 MachOImageReader::LoadCommand::LoadCommand() {}
 
+MachOImageReader::LoadCommand::LoadCommand(const LoadCommand& other) = default;
+
 MachOImageReader::LoadCommand::~LoadCommand() {}
 
 // static
diff --git a/chrome/common/safe_browsing/mach_o_image_reader_mac.h b/chrome/common/safe_browsing/mach_o_image_reader_mac.h
index ef5cc5b7..ea74126 100644
--- a/chrome/common/safe_browsing/mach_o_image_reader_mac.h
+++ b/chrome/common/safe_browsing/mach_o_image_reader_mac.h
@@ -29,6 +29,7 @@
   // Represents a Mach-O load command, including all of its data.
   struct LoadCommand {
     LoadCommand();
+    LoadCommand(const LoadCommand& other);
     ~LoadCommand();
 
     uint32_t cmd() const {
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 6619b88..f45b5c7 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -587,6 +587,23 @@
     }
   }
 
+  if (enable_app_list && use_ash) {
+    source_set("test_support_applist_ash") {
+      defines = []
+      testonly = true
+
+      sources = rebase_path(
+              chrome_tests_gypi_values.chrome_browser_app_list_ash_test_support_sources,
+              ".",
+              "//chrome")
+
+      deps = [
+        "//chrome/browser/ui",
+        "//ui/app_list/shower:test_support",
+      ]
+    }
+  }
+
   source_set("sync_integration_test_support") {
     testonly = true
     sources = rebase_path(
@@ -1018,6 +1035,10 @@
                       ".",
                       "//chrome")
       deps += [ "//ash:test_support" ]
+
+      if (enable_app_list) {
+        deps += [ ":test_support_applist_ash" ]
+      }
     }
     if (use_aura || toolkit_views) {
       deps += [ "//ui/events:test_support" ]
@@ -1338,7 +1359,10 @@
         "//mojo/shell/background/tests:test_support",
       ]
 
-      data_deps += [ "//mash/session" ]
+      data_deps += [
+        "//chrome/app:mojo_manifests",
+        "//mash/session",
+      ]
 
       defines += [ "MOJO_SHELL_CLIENT" ]
     }
diff --git a/chrome/test/data/webui/settings/certificate_manager_page_test.js b/chrome/test/data/webui/settings/certificate_manager_page_test.js
index 139eaad..ab62b62e 100644
--- a/chrome/test/data/webui/settings/certificate_manager_page_test.js
+++ b/chrome/test/data/webui/settings/certificate_manager_page_test.js
@@ -530,12 +530,20 @@
       // once tapped the correct event is fired.
       test('MenuOptions_Edit', function() {
         var editButton = subentry.shadowRoot.querySelector('#edit');
+        assertTrue(!!editButton);
         // Should be disabled for any certificate type other than
         // CertificateType.CA
         assertTrue(editButton.hidden);
         subentry.certificateType = settings.CertificateType.CA;
         assertFalse(editButton.hidden);
 
+        // Should be disabled if |policy| is true.
+        var model = createSampleCertificateSubnode();
+        model.policy = true;
+        subentry.model = model;
+        assertTrue(editButton.hidden);
+
+        subentry.model = createSampleCertificateSubnode();
         var waitForActionEvent = actionEventToPromise();
         MockInteractions.tap(editButton);
         return waitForActionEvent.then(function(event) {
@@ -550,14 +558,22 @@
       // Test that the 'Delete' option is only shown when appropriate and that
       // once tapped the correct event is fired.
       test('MenuOptions_Delete', function() {
-        subentry.set('model.readonly', true);
-
         var deleteButton = subentry.shadowRoot.querySelector('#delete');
-        // Should be disabled when 'model.readonly' is true.
-        assertTrue(deleteButton.hidden);
-        subentry.set('model.readonly', false);
-        assertFalse(deleteButton.hidden);
+        assertTrue(!!deleteButton);
 
+        // Should be disabled when 'model.readonly' is true.
+        var model = createSampleCertificateSubnode();
+        model.readonly = true;
+        subentry.model = model;
+        assertTrue(deleteButton.hidden);
+
+        // Should be disabled when 'model.policy' is true.
+        var model = createSampleCertificateSubnode();
+        model.policy = true;
+        subentry.model = model;
+        assertTrue(deleteButton.hidden);
+
+        subentry.model = createSampleCertificateSubnode();
         var waitForActionEvent = actionEventToPromise();
         MockInteractions.tap(deleteButton);
         return waitForActionEvent.then(function(event) {
@@ -568,10 +584,13 @@
         });
       });
 
-      // Test case of exporting a certificate that is not PERSONAL.
+      // Test that the 'Export' option is always shown when the certificate type
+      // is not PERSONAL and that once tapped the correct event is fired.
       test('MenuOptions_Export', function() {
         subentry.certificateType = settings.CertificateType.SERVER;
         var exportButton = subentry.shadowRoot.querySelector('#export');
+        assertTrue(!!exportButton);
+        assertFalse(exportButton.hidden);
         MockInteractions.tap(exportButton);
         return browserProxy.whenCalled('exportCertificate').then(function(id) {
           assertEquals(subentry.model.id, id);
@@ -580,9 +599,18 @@
 
       // Test case of exporting a PERSONAL certificate.
       test('MenuOptions_ExportPersonal', function() {
-        var waitForActionEvent = actionEventToPromise();
-
         var exportButton = subentry.shadowRoot.querySelector('#export');
+        assertTrue(!!exportButton);
+
+        // Should be disabled when 'model.extractable' is false.
+        assertTrue(exportButton.hidden);
+
+        var model = createSampleCertificateSubnode();
+        model.extractable = true;
+        subentry.model = model;
+        assertFalse(exportButton.hidden);
+
+        var waitForActionEvent = actionEventToPromise();
         MockInteractions.tap(exportButton);
         return browserProxy.whenCalled('exportPersonalCertificate').then(
             function(id) {
diff --git a/chrome/test/data/webui/settings/cr_settings_browsertest.js b/chrome/test/data/webui/settings/cr_settings_browsertest.js
index b60ff8b..b0475cc0 100644
--- a/chrome/test/data/webui/settings/cr_settings_browsertest.js
+++ b/chrome/test/data/webui/settings/cr_settings_browsertest.js
@@ -67,6 +67,36 @@
   mocha.run();
 });
 
+GEN('#if !defined(OS_CHROMEOS)');
+/**
+ * Test fixture for
+ * chrome/browser/resources/settings/people_page/manage_profile.html.
+ * This is non-ChromeOS only.
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+*/
+function CrSettingsPeoplePageManageProfileTest() {}
+
+CrSettingsPeoplePageManageProfileTest.prototype = {
+  __proto__: CrSettingsBrowserTest.prototype,
+
+  /** @override */
+  browsePreload: 'chrome://md-settings/people_page/manage_profile.html',
+
+  /** @override */
+  extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
+    ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js',
+    'test_browser_proxy.js',
+    'people_page_manage_profile_test.js',
+  ]),
+};
+
+TEST_F('CrSettingsPeoplePageManageProfileTest', 'ManageProfile', function() {
+  settings_people_page_manage_profile.registerTests();
+  mocha.run();
+});
+GEN('#endif');
+
 /**
  * @constructor
  * @extends {CrSettingsBrowserTest}
@@ -333,6 +363,6 @@
   ]),
 };
 
-TEST_F('CrSettingsStartupUrlsPageTest', 'Validity', function() {
+TEST_F('CrSettingsStartupUrlsPageTest', 'StartupUrlsPage', function() {
   mocha.run();
 });
diff --git a/chrome/test/data/webui/settings/people_page_manage_profile_test.js b/chrome/test/data/webui/settings/people_page_manage_profile_test.js
new file mode 100644
index 0000000..ba0b3a74
--- /dev/null
+++ b/chrome/test/data/webui/settings/people_page_manage_profile_test.js
@@ -0,0 +1,129 @@
+// 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.
+
+cr.define('settings_people_page_manage_profile', function() {
+  /**
+   * @constructor
+   * @implements {settings.ManageProfileBrowserProxy}
+   * @extends {settings.TestBrowserProxy}
+   */
+  var TestManageProfileBrowserProxy = function() {
+    settings.TestBrowserProxy.call(this, [
+      'getAvailableIcons',
+      'setProfileIconAndName',
+    ]);
+  };
+
+  TestManageProfileBrowserProxy.prototype = {
+    __proto__: settings.TestBrowserProxy.prototype,
+
+    /** @override */
+    getAvailableIcons: function() {
+      this.methodCalled('getAvailableIcons');
+      return Promise.resolve(['fake-icon-1.png', 'fake-icon-2.png']);
+    },
+
+    /** @override */
+    setProfileIconAndName: function(iconUrl, name) {
+      this.methodCalled('setProfileIconAndName', [iconUrl, name]);
+    },
+  };
+
+  function registerManageProfileTests() {
+    suite('ManageProfileTests', function() {
+      var manageProfile = null;
+      var browserProxy = null;
+
+      setup(function() {
+        browserProxy = new TestManageProfileBrowserProxy();
+        settings.ManageProfileBrowserProxyImpl.instance_ = browserProxy;
+        PolymerTest.clearBody();
+        manageProfile = document.createElement('settings-manage-profile');
+        manageProfile.profileIconUrl = 'fake-icon-1.png';
+        manageProfile.profileName = 'Initial Fake Name';
+        document.body.appendChild(manageProfile);
+      });
+
+      teardown(function() { manageProfile.remove(); });
+
+      // Tests that the manage profile subpage
+      //  - gets and receives all the available icons
+      //  - has the correct icon selected
+      //  - can select a new icon
+      test('ManageProfileChangeIcon', function() {
+        var selector = manageProfile.$.selector;
+        assertTrue(!!selector);
+
+        return browserProxy.whenCalled('getAvailableIcons').then(function() {
+          Polymer.dom.flush();
+
+          assertEquals('fake-icon-1.png', selector.selected);
+          assertEquals(2, selector.items.length);
+          assertTrue(selector.items[0].classList.contains('iron-selected'));
+          assertFalse(selector.items[1].classList.contains('iron-selected'));
+
+          MockInteractions.tap(selector.items[1]);
+          return browserProxy.whenCalled('setProfileIconAndName').then(
+              function(args) {
+                assertEquals('fake-icon-2.png', args[0]);
+                assertEquals('Initial Fake Name', args[1]);
+              });
+        });
+      });
+
+      // Tests profile icon updates pushed from the browser.
+      test('ManageProfileIconUpdated', function() {
+        var selector = manageProfile.$.selector;
+        assertTrue(!!selector);
+
+        return browserProxy.whenCalled('getAvailableIcons').then(function() {
+          manageProfile.profileIconUrl = 'fake-icon-2.png';
+
+          Polymer.dom.flush();
+
+          assertEquals('fake-icon-2.png', selector.selected);
+          assertEquals(2, selector.items.length);
+          assertFalse(selector.items[0].classList.contains('iron-selected'));
+          assertTrue(selector.items[1].classList.contains('iron-selected'));
+        });
+      });
+
+      test('ManageProfileChangeName', function() {
+        var nameField = manageProfile.$.name;
+        assertTrue(!!nameField);
+
+        assertEquals('Initial Fake Name', nameField.value);
+
+        nameField.value = 'New Name';
+        nameField.fire('change');
+
+        return browserProxy.whenCalled('setProfileIconAndName').then(
+            function(args) {
+              assertEquals('fake-icon-1.png', args[0]);
+              assertEquals('New Name', args[1]);
+            });
+      });
+
+      // Tests profile name updates pushed from the browser.
+      test('ManageProfileNameUpdated', function() {
+        var nameField = manageProfile.$.name;
+        assertTrue(!!nameField);
+
+        return browserProxy.whenCalled('getAvailableIcons').then(function() {
+          manageProfile.profileName = 'New Name From Browser';
+
+          Polymer.dom.flush();
+
+          assertEquals('New Name From Browser', nameField.value);
+        });
+      });
+    });
+  }
+
+  return {
+    registerTests: function() {
+      registerManageProfileTests();
+    },
+  };
+});
diff --git a/chrome/test/data/webui/settings/startup_urls_page_test.js b/chrome/test/data/webui/settings/startup_urls_page_test.js
index 1c4490aa..038017e 100644
--- a/chrome/test/data/webui/settings/startup_urls_page_test.js
+++ b/chrome/test/data/webui/settings/startup_urls_page_test.js
@@ -10,33 +10,126 @@
    */
   function TestStartupUrlsPageBrowserProxy() {
     settings.TestBrowserProxy.call(this, [
-      'validateStartupPage',
       'addStartupPage',
+      'loadStartupPages',
+      'useCurrentPages',
+      'validateStartupPage',
     ]);
+
+    /** @private {boolean} */
+    this.urlIsValid_ = true;
   }
 
   TestStartupUrlsPageBrowserProxy.prototype = {
     __proto__: settings.TestBrowserProxy.prototype,
 
-    urlsAreValid: false,
-
-    /** @override */
-    loadStartupPages: function() {},
-
-    /** @override */
-    validateStartupPage: function(url) {
-      this.methodCalled('validateStartupPage');
-      var resolver = new PromiseResolver;
-      resolver.promise = Promise.resolve(this.urlsAreValid);
-      return resolver;
+    /** @param {boolean} isValid */
+    setUrlValidity: function(isValid) {
+      this.urlIsValid_ = isValid;
     },
 
     /** @override */
     addStartupPage: function(url) {
-      this.methodCalled('addStartupPage');
+      this.methodCalled('addStartupPage', url);
+      return Promise.resolve(this.urlIsValid_);
+    },
+
+    /** @override */
+    loadStartupPages: function() {
+      this.methodCalled('loadStartupPages');
+    },
+
+    /** @override */
+    useCurrentPages: function() {
+      this.methodCalled('useCurrentPages');
+    },
+
+    /** @override */
+    validateStartupPage: function(url) {
+      this.methodCalled('validateStartupPage', url);
+      return Promise.resolve(this.urlIsValid_);
     },
   };
 
+  suite('StartupUrlDialog', function() {
+    /** @type {?SettingsStartupUrlDialogElement} */
+    var dialog = null;
+
+    var browserProxy = null;
+
+    /**
+     * Triggers an 'input' event on the given text input field, which triggers
+     * validation to occur.
+     * @param {!PaperInputElement} element
+     */
+    function pressSpace(element) {
+      // The actual key code is irrelevant for these tests.
+      MockInteractions.keyEventOn(element, 'input', 32 /* space key code */);
+    }
+
+    setup(function() {
+      browserProxy = new TestStartupUrlsPageBrowserProxy();
+      settings.StartupUrlsPageBrowserProxyImpl.instance_ = browserProxy;
+      PolymerTest.clearBody();
+      dialog = document.createElement('settings-startup-url-dialog');
+      document.body.appendChild(dialog);
+    });
+
+    teardown(function() { dialog.remove(); });
+
+    // Test that validation occurs as the user is typing, and that the action
+    // button is updated accordingly.
+    test('Validation', function() {
+      assertTrue(dialog.$.dialog.opened);
+      var addButton = dialog.$.add;
+      assertTrue(!!addButton);
+      assertTrue(addButton.disabled);
+
+      var inputElement = dialog.$.url;
+      assertTrue(!!inputElement);
+
+      var expectedUrl = "dummy-foo.com";
+      inputElement.value = expectedUrl;
+      browserProxy.setUrlValidity(false);
+      pressSpace(inputElement);
+
+      return browserProxy.whenCalled('validateStartupPage').then(function(url) {
+        assertEquals(expectedUrl, url);
+        assertTrue(addButton.disabled);
+
+        browserProxy.setUrlValidity(true);
+        browserProxy.resetResolver('validateStartupPage');
+        pressSpace(inputElement);
+
+        return browserProxy.whenCalled('validateStartupPage');
+      }).then(function() {
+        assertFalse(addButton.disabled);
+      });
+    });
+
+    test('AddStartupPage', function() {
+      assertTrue(dialog.$.dialog.opened);
+      var addButton = dialog.$.add;
+      addButton.disabled = false;
+
+      // Test that the dialog remains open if the user somehow manages to submit
+      // an invalid URL.
+      browserProxy.setUrlValidity(false);
+      MockInteractions.tap(addButton);
+      return browserProxy.whenCalled('addStartupPage').then(function() {
+        assertTrue(dialog.$.dialog.opened);
+
+        // Test that dialog is closed if the user submits a valid URL.
+        browserProxy.setUrlValidity(true);
+        browserProxy.resetResolver('addStartupPage');
+        MockInteractions.tap(addButton);
+        return browserProxy.whenCalled('addStartupPage');
+      }).then(function() {
+        assertFalse(dialog.$.dialog.opened);
+      });
+    });
+  });
+
   suite('StartupUrlsPage', function() {
     /** @type {?SettingsStartupUrlsPageElement} */
     var page = null;
@@ -53,26 +146,26 @@
 
     teardown(function() { page.remove(); });
 
-    test('validate', function() {
-      browserProxy.whenCalled('validateStartupPage').then(function() {
-        var addButton = page.$.add;
-        assertTrue(!!addButton);
-        assertFalse(browserProxy.urlsAreValid);
-        assertTrue(addButton.disabled);
+    // Test that the page is requesting information from the browser.
+    test('Initialization', function() {
+      return browserProxy.whenCalled('loadStartupPages');
+    });
 
-        browserProxy.resetResolver('validateStartupPage');
-        browserProxy.whenCalled('validateStartupPage').then(function() {
-          page.async(function() {
-            assertFalse(addButton.disabled);
-            MockInteractions.tap(addButton);
-          });
-        });
+    test('UseCurrentPages', function() {
+      var useCurrentPagesButton = page.$.useCurrentPages;
+      assertTrue(!!useCurrentPagesButton);
+      MockInteractions.tap(useCurrentPagesButton);
+      return browserProxy.whenCalled('useCurrentPages');
+    });
 
-        browserProxy.urlsAreValid = true;
-        page.$.newUrl.value = "overriding validation anyway";
-      });
+    test('AddPage_OpensDialog', function() {
+      var addPageButton = page.$.addPage;
+      assertTrue(!!addPageButton);
+      assertFalse(!!page.$$('settings-startup-url-dialog'));
 
-      return browserProxy.whenCalled('addStartupPage');
+      MockInteractions.tap(addPageButton);
+      Polymer.dom.flush();
+      assertTrue(!!page.$$('settings-startup-url-dialog'));
     });
   });
 });
diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg
index 5ba63fc..c7bf366 100644
--- a/chrome/tools/build/win/FILES.cfg
+++ b/chrome/tools/build/win/FILES.cfg
@@ -96,15 +96,6 @@
     'optional': ['dev', 'official'],
   },
   {
-    'filename': 'crash_service.exe',
-    'buildtype': ['dev', 'official'],
-  },
-  {
-    'filename': 'crash_service64.exe',
-    'arch': ['32bit'],
-    'buildtype': ['dev', 'official'],
-  },
-  {
     'filename': 'First Run',
     'buildtype': ['dev', 'official'],
   },
diff --git a/chromecast/crash/cast_crashdump_uploader.cc b/chromecast/crash/cast_crashdump_uploader.cc
index 1c15ac6a..5d58a07 100644
--- a/chromecast/crash/cast_crashdump_uploader.cc
+++ b/chromecast/crash/cast_crashdump_uploader.cc
@@ -28,6 +28,8 @@
 CastCrashdumpData::CastCrashdumpData() {
 }
 
+CastCrashdumpData::CastCrashdumpData(const CastCrashdumpData& other) = default;
+
 CastCrashdumpData::~CastCrashdumpData() {
 }
 
diff --git a/chromecast/crash/cast_crashdump_uploader.h b/chromecast/crash/cast_crashdump_uploader.h
index acdfd9a..b1238940 100644
--- a/chromecast/crash/cast_crashdump_uploader.h
+++ b/chromecast/crash/cast_crashdump_uploader.h
@@ -18,6 +18,7 @@
 
 struct CastCrashdumpData {
   CastCrashdumpData();
+  CastCrashdumpData(const CastCrashdumpData& other);
   ~CastCrashdumpData();
 
   std::string product;
@@ -38,7 +39,7 @@
   // Does not take ownership of |http_layer|.
   CastCrashdumpUploader(const CastCrashdumpData& data,
                         google_breakpad::LibcurlWrapper* http_layer);
-  CastCrashdumpUploader(const CastCrashdumpData& data);
+  explicit CastCrashdumpUploader(const CastCrashdumpData& data);
   ~CastCrashdumpUploader();
 
   bool AddAttachment(const std::string& label, const std::string& filename);
diff --git a/chromecast/media/cma/base/buffering_frame_provider.cc b/chromecast/media/cma/base/buffering_frame_provider.cc
index 86e94bf9..f456daff 100644
--- a/chromecast/media/cma/base/buffering_frame_provider.cc
+++ b/chromecast/media/cma/base/buffering_frame_provider.cc
@@ -24,6 +24,9 @@
       video_config_(video_config) {
 }
 
+BufferingFrameProvider::BufferWithConfig::BufferWithConfig(
+    const BufferWithConfig& other) = default;
+
 BufferingFrameProvider::BufferWithConfig::~BufferWithConfig() {
 }
 
diff --git a/chromecast/media/cma/base/buffering_frame_provider.h b/chromecast/media/cma/base/buffering_frame_provider.h
index cd2c038..f97643ee 100644
--- a/chromecast/media/cma/base/buffering_frame_provider.h
+++ b/chromecast/media/cma/base/buffering_frame_provider.h
@@ -56,6 +56,7 @@
         const scoped_refptr<DecoderBufferBase>& buffer,
         const ::media::AudioDecoderConfig& audio_config,
         const ::media::VideoDecoderConfig& video_config);
+    BufferWithConfig(const BufferWithConfig& other);
     ~BufferWithConfig();
 
     const scoped_refptr<DecoderBufferBase>& buffer() const { return buffer_; }
diff --git a/chromecast/media/cma/pipeline/av_pipeline_client.cc b/chromecast/media/cma/pipeline/av_pipeline_client.cc
index 1845c6c..3ef155c 100644
--- a/chromecast/media/cma/pipeline/av_pipeline_client.cc
+++ b/chromecast/media/cma/pipeline/av_pipeline_client.cc
@@ -10,6 +10,8 @@
 AvPipelineClient::AvPipelineClient() {
 }
 
+AvPipelineClient::AvPipelineClient(const AvPipelineClient& other) = default;
+
 AvPipelineClient::~AvPipelineClient() {
 }
 
diff --git a/chromecast/media/cma/pipeline/av_pipeline_client.h b/chromecast/media/cma/pipeline/av_pipeline_client.h
index 14525c6..f0e46af1 100644
--- a/chromecast/media/cma/pipeline/av_pipeline_client.h
+++ b/chromecast/media/cma/pipeline/av_pipeline_client.h
@@ -17,6 +17,7 @@
       base::TimeDelta, base::TimeDelta, base::TimeTicks)> TimeUpdateCB;
 
   AvPipelineClient();
+  AvPipelineClient(const AvPipelineClient& other);
   ~AvPipelineClient();
 
   // Decryption key status notification.
diff --git a/chromecast/media/cma/pipeline/media_pipeline_client.cc b/chromecast/media/cma/pipeline/media_pipeline_client.cc
index 8dbfc8db..97bb5f8 100644
--- a/chromecast/media/cma/pipeline/media_pipeline_client.cc
+++ b/chromecast/media/cma/pipeline/media_pipeline_client.cc
@@ -10,6 +10,9 @@
 MediaPipelineClient::MediaPipelineClient() {
 }
 
+MediaPipelineClient::MediaPipelineClient(const MediaPipelineClient& other) =
+    default;
+
 MediaPipelineClient::~MediaPipelineClient() {
 }
 
diff --git a/chromecast/media/cma/pipeline/media_pipeline_client.h b/chromecast/media/cma/pipeline/media_pipeline_client.h
index 340a3e5..66a949d 100644
--- a/chromecast/media/cma/pipeline/media_pipeline_client.h
+++ b/chromecast/media/cma/pipeline/media_pipeline_client.h
@@ -18,6 +18,7 @@
       void(base::TimeDelta, base::TimeDelta, base::TimeTicks)> TimeUpdateCB;
 
   MediaPipelineClient();
+  MediaPipelineClient(const MediaPipelineClient& other);
   ~MediaPipelineClient();
 
   // Callback used to report a playback error as a ::media::PipelineStatus.
diff --git a/chromecast/media/cma/pipeline/video_pipeline_client.cc b/chromecast/media/cma/pipeline/video_pipeline_client.cc
index bb7388e..93d448c 100644
--- a/chromecast/media/cma/pipeline/video_pipeline_client.cc
+++ b/chromecast/media/cma/pipeline/video_pipeline_client.cc
@@ -10,6 +10,9 @@
 VideoPipelineClient::VideoPipelineClient() {
 }
 
+VideoPipelineClient::VideoPipelineClient(const VideoPipelineClient& other) =
+    default;
+
 VideoPipelineClient::~VideoPipelineClient() {
 }
 
diff --git a/chromecast/media/cma/pipeline/video_pipeline_client.h b/chromecast/media/cma/pipeline/video_pipeline_client.h
index 105b8a2..ec80481 100644
--- a/chromecast/media/cma/pipeline/video_pipeline_client.h
+++ b/chromecast/media/cma/pipeline/video_pipeline_client.h
@@ -20,6 +20,7 @@
       const gfx::Size& natural_size)> NaturalSizeChangedCB;
 
   VideoPipelineClient();
+  VideoPipelineClient(const VideoPipelineClient& other);
   ~VideoPipelineClient();
 
   // All the default callbacks.
diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.cc b/chromecast/media/cma/test/frame_segmenter_for_test.cc
index a3ae98c..0f8271b 100644
--- a/chromecast/media/cma/test/frame_segmenter_for_test.cc
+++ b/chromecast/media/cma/test/frame_segmenter_for_test.cc
@@ -302,6 +302,8 @@
 DemuxResult::DemuxResult() {
 }
 
+DemuxResult::DemuxResult(const DemuxResult& other) = default;
+
 DemuxResult::~DemuxResult() {
 }
 
diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.h b/chromecast/media/cma/test/frame_segmenter_for_test.h
index 101f0165..5e1b992 100644
--- a/chromecast/media/cma/test/frame_segmenter_for_test.h
+++ b/chromecast/media/cma/test/frame_segmenter_for_test.h
@@ -30,6 +30,7 @@
 
 struct DemuxResult {
   DemuxResult();
+  DemuxResult(const DemuxResult& other);
   ~DemuxResult();
 
   ::media::AudioDecoderConfig audio_config;
diff --git a/chromecast/public/media/decoder_config.h b/chromecast/public/media/decoder_config.h
index 9acf3fcd..540dd07 100644
--- a/chromecast/public/media/decoder_config.h
+++ b/chromecast/public/media/decoder_config.h
@@ -164,6 +164,7 @@
 // determine if the configuration is still valid or not.
 struct AudioConfig {
   AudioConfig();
+  AudioConfig(const AudioConfig& other);
   ~AudioConfig();
 
   bool is_encrypted() const { return encryption_scheme.is_encrypted(); }
@@ -194,7 +195,7 @@
       channel_number(0),
       samples_per_second(0) {
 }
-
+inline AudioConfig::AudioConfig(const AudioConfig& other) = default;
 inline AudioConfig::~AudioConfig() {
 }
 
@@ -203,6 +204,7 @@
 // determine if the configuration is still valid or not.
 struct VideoConfig {
   VideoConfig();
+  VideoConfig(const VideoConfig& other);
   ~VideoConfig();
 
   bool is_encrypted() const { return encryption_scheme.is_encrypted(); }
@@ -230,6 +232,8 @@
       additional_config(nullptr) {
 }
 
+inline VideoConfig::VideoConfig(const VideoConfig& other) = default;
+
 inline VideoConfig::~VideoConfig() {
 }
 
diff --git a/chromeos/app_mode/kiosk_oem_manifest_parser.cc b/chromeos/app_mode/kiosk_oem_manifest_parser.cc
index 1a617597..362f5f63 100644
--- a/chromeos/app_mode/kiosk_oem_manifest_parser.cc
+++ b/chromeos/app_mode/kiosk_oem_manifest_parser.cc
@@ -4,8 +4,9 @@
 
 #include "chromeos/app_mode/kiosk_oem_manifest_parser.h"
 
+#include <memory>
+
 #include "base/json/json_file_value_serializer.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "base/values.h"
 
@@ -31,9 +32,9 @@
     KioskOemManifestParser::Manifest* manifest) {
   int error_code = JSONFileValueDeserializer::JSON_NO_ERROR;
   std::string error_msg;
-  scoped_ptr<JSONFileValueDeserializer> deserializer(
-     new JSONFileValueDeserializer(kiosk_oem_file));
-  scoped_ptr<base::Value> value =
+  std::unique_ptr<JSONFileValueDeserializer> deserializer(
+      new JSONFileValueDeserializer(kiosk_oem_file));
+  std::unique_ptr<base::Value> value =
       deserializer->Deserialize(&error_code, &error_msg);
   base::DictionaryValue* dict = NULL;
   if (error_code != JSONFileValueDeserializer::JSON_NO_ERROR ||
diff --git a/chromeos/attestation/attestation_flow.cc b/chromeos/attestation/attestation_flow.cc
index ea4c771b..55f867a 100644
--- a/chromeos/attestation/attestation_flow.cc
+++ b/chromeos/attestation/attestation_flow.cc
@@ -88,7 +88,7 @@
 
 AttestationFlow::AttestationFlow(cryptohome::AsyncMethodCaller* async_caller,
                                  CryptohomeClient* cryptohome_client,
-                                 scoped_ptr<ServerProxy> server_proxy)
+                                 std::unique_ptr<ServerProxy> server_proxy)
     : async_caller_(async_caller),
       cryptohome_client_(cryptohome_client),
       server_proxy_(std::move(server_proxy)),
diff --git a/chromeos/attestation/attestation_flow.h b/chromeos/attestation/attestation_flow.h
index 373f6dd..be3fcdf 100644
--- a/chromeos/attestation/attestation_flow.h
+++ b/chromeos/attestation/attestation_flow.h
@@ -5,11 +5,11 @@
 #ifndef CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_
 #define CHROMEOS_ATTESTATION_ATTESTATION_FLOW_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/attestation/attestation_constants.h"
 #include "chromeos/chromeos_export.h"
@@ -59,7 +59,7 @@
 
   AttestationFlow(cryptohome::AsyncMethodCaller* async_caller,
                   CryptohomeClient* cryptohome_client,
-                  scoped_ptr<ServerProxy> server_proxy);
+                  std::unique_ptr<ServerProxy> server_proxy);
   virtual ~AttestationFlow();
 
   // Gets an attestation certificate for a hardware-protected key.  If a key for
@@ -205,7 +205,7 @@
 
   cryptohome::AsyncMethodCaller* async_caller_;
   CryptohomeClient* cryptohome_client_;
-  scoped_ptr<ServerProxy> server_proxy_;
+  std::unique_ptr<ServerProxy> server_proxy_;
 
   base::WeakPtrFactory<AttestationFlow> weak_factory_;
 
diff --git a/chromeos/attestation/attestation_flow_unittest.cc b/chromeos/attestation/attestation_flow_unittest.cc
index 2e12184..021ffb77 100644
--- a/chromeos/attestation/attestation_flow_unittest.cc
+++ b/chromeos/attestation/attestation_flow_unittest.cc
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "chromeos/attestation/mock_attestation_flow.h"
 #include "chromeos/cryptohome/cryptohome_parameters.h"
@@ -91,7 +91,7 @@
       .Times(1)
       .InSequence(flow_order);
 
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   proxy->DeferToFake(true);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
   EXPECT_CALL(*proxy, SendEnrollRequest(
@@ -140,7 +140,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, account_id,
                       "fake_origin", true, mock_callback);
@@ -158,7 +158,7 @@
       .WillRepeatedly(Invoke(DBusCallbackFalse));
 
   // We're not expecting any server calls in this case; StrictMock will verify.
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
 
   StrictMock<MockObserver> observer;
@@ -168,7 +168,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
@@ -185,7 +185,7 @@
   EXPECT_CALL(client, TpmAttestationIsEnrolled(_))
       .WillRepeatedly(Invoke(DBusCallbackFalse));
 
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   proxy->DeferToFake(false);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
   EXPECT_CALL(*proxy, SendEnrollRequest(
@@ -199,7 +199,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
@@ -222,7 +222,7 @@
   EXPECT_CALL(client, TpmAttestationIsEnrolled(_))
       .WillRepeatedly(Invoke(DBusCallbackFalse));
 
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   proxy->DeferToFake(true);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
   EXPECT_CALL(*proxy, SendEnrollRequest(
@@ -235,7 +235,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
@@ -262,7 +262,7 @@
   EXPECT_CALL(client, TpmAttestationIsEnrolled(_))
       .WillRepeatedly(Invoke(DBusCallbackTrue));
 
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   proxy->DeferToFake(true);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
   EXPECT_CALL(*proxy, SendCertificateRequest(
@@ -277,7 +277,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_MACHINE_CERTIFICATE, EmptyAccountId(),
                       "", true, mock_callback);
@@ -297,7 +297,7 @@
       .WillRepeatedly(Invoke(DBusCallbackTrue));
 
   // We're not expecting any server calls in this case; StrictMock will verify.
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
 
   StrictMock<MockObserver> observer;
@@ -306,7 +306,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
@@ -325,7 +325,7 @@
   EXPECT_CALL(client, TpmAttestationIsEnrolled(_))
       .WillRepeatedly(Invoke(DBusCallbackTrue));
 
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   proxy->DeferToFake(false);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
   EXPECT_CALL(*proxy, SendCertificateRequest(
@@ -338,7 +338,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
@@ -354,7 +354,7 @@
       .WillRepeatedly(Invoke(DBusCallbackFail));
 
   // We're not expecting any server calls in this case; StrictMock will verify.
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
 
   StrictMock<MockObserver> observer;
@@ -363,7 +363,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
@@ -394,7 +394,7 @@
                                          kEnterpriseUserKey, _))
       .WillRepeatedly(WithArgs<3>(Invoke(DBusCallbackFalse)));
 
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   proxy->DeferToFake(true);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
   EXPECT_CALL(*proxy, SendCertificateRequest(
@@ -409,7 +409,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       false, mock_callback);
@@ -433,7 +433,7 @@
       .WillRepeatedly(WithArgs<3>(Invoke(FakeDBusData("fake_cert"))));
 
   // We're not expecting any server calls in this case; StrictMock will verify.
-  scoped_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>());
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault());
 
   StrictMock<MockObserver> observer;
@@ -442,7 +442,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       false, mock_callback);
@@ -452,7 +452,7 @@
 TEST_F(AttestationFlowTest, AlternatePCA) {
   // Strategy: Create a ServerProxy mock which reports ALTERNATE_PCA and check
   // that all calls to the AsyncMethodCaller reflect this PCA type.
-  scoped_ptr<MockServerProxy> proxy(new NiceMock<MockServerProxy>());
+  std::unique_ptr<MockServerProxy> proxy(new NiceMock<MockServerProxy>());
   proxy->DeferToFake(true);
   EXPECT_CALL(*proxy, GetType()).WillRepeatedly(Return(ALTERNATE_PCA));
 
@@ -477,7 +477,7 @@
       &MockObserver::MockCertificateCallback,
       base::Unretained(&observer));
 
-  scoped_ptr<ServerProxy> proxy_interface(proxy.release());
+  std::unique_ptr<ServerProxy> proxy_interface(proxy.release());
   AttestationFlow flow(&async_caller, &client, std::move(proxy_interface));
   flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "",
                       true, mock_callback);
diff --git a/chromeos/attestation/mock_attestation_flow.cc b/chromeos/attestation/mock_attestation_flow.cc
index 72be828..a0dbe64 100644
--- a/chromeos/attestation/mock_attestation_flow.cc
+++ b/chromeos/attestation/mock_attestation_flow.cc
@@ -4,7 +4,8 @@
 
 #include "chromeos/attestation/mock_attestation_flow.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "components/signin/core/account_id/account_id.h"
 
 using testing::_;
@@ -47,7 +48,7 @@
 MockObserver::~MockObserver() {}
 
 MockAttestationFlow::MockAttestationFlow()
-    : AttestationFlow(NULL, NULL, scoped_ptr<ServerProxy>()) {}
+    : AttestationFlow(NULL, NULL, std::unique_ptr<ServerProxy>()) {}
 
 MockAttestationFlow::~MockAttestationFlow() {}
 
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc
index df48db51..d689c00 100644
--- a/chromeos/audio/audio_device.cc
+++ b/chromeos/audio/audio_device.cc
@@ -132,6 +132,8 @@
   plugged_time = node.plugged_time;
 }
 
+AudioDevice::AudioDevice(const AudioDevice& other) = default;
+
 std::string AudioDevice::ToString() const {
   std::string result;
   base::StringAppendF(&result,
diff --git a/chromeos/audio/audio_device.h b/chromeos/audio/audio_device.h
index 6d62a8e..d5078edf 100644
--- a/chromeos/audio/audio_device.h
+++ b/chromeos/audio/audio_device.h
@@ -35,6 +35,7 @@
 struct CHROMEOS_EXPORT AudioDevice {
   AudioDevice();
   explicit AudioDevice(const AudioNode& node);
+  AudioDevice(const AudioDevice& other);
   std::string ToString() const;
 
   // Converts between the string type sent via D-Bus and AudioDeviceType.
diff --git a/chromeos/audio/audio_devices_pref_handler_impl.cc b/chromeos/audio/audio_devices_pref_handler_impl.cc
index 968fb6ab..5171e40 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl.cc
+++ b/chromeos/audio/audio_devices_pref_handler_impl.cc
@@ -88,7 +88,7 @@
 void AudioDevicesPrefHandlerImpl::SetDeviceActive(const AudioDevice& device,
                                                   bool active,
                                                   bool activate_by_user) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetBoolean("active", active);
   if (active)
     dict->SetBoolean("activate_by_user", activate_by_user);
diff --git a/chromeos/audio/audio_devices_pref_handler_impl.h b/chromeos/audio/audio_devices_pref_handler_impl.h
index 83f61ae..ec4f6e1 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl.h
+++ b/chromeos/audio/audio_devices_pref_handler_impl.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/values.h"
 #include "chromeos/audio/audio_devices_pref_handler.h"
@@ -83,9 +83,9 @@
   // Notifies the AudioPrefObserver for audio policy pref changes.
   void NotifyAudioPolicyChange();
 
-  scoped_ptr<base::DictionaryValue> device_mute_settings_;
-  scoped_ptr<base::DictionaryValue> device_volume_settings_;
-  scoped_ptr<base::DictionaryValue> device_state_settings_;
+  std::unique_ptr<base::DictionaryValue> device_mute_settings_;
+  std::unique_ptr<base::DictionaryValue> device_volume_settings_;
+  std::unique_ptr<base::DictionaryValue> device_state_settings_;
 
   PrefService* local_state_;  // not owned
 
diff --git a/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc b/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc
index c4f5d516..ab0205a6 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc
+++ b/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc
@@ -85,7 +85,7 @@
 
  protected:
   scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler_;
-  scoped_ptr<TestingPrefServiceSimple> pref_service_;
+  std::unique_ptr<TestingPrefServiceSimple> pref_service_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerTest);
diff --git a/chromeos/audio/cras_audio_handler_unittest.cc b/chromeos/audio/cras_audio_handler_unittest.cc
index 83fd84b..6aaabac 100644
--- a/chromeos/audio/cras_audio_handler_unittest.cc
+++ b/chromeos/audio/cras_audio_handler_unittest.cc
@@ -7,10 +7,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
@@ -422,7 +423,7 @@
   base::MessageLoopForUI message_loop_;
   CrasAudioHandler* cras_audio_handler_;  // Not owned.
   FakeCrasAudioClient* fake_cras_audio_client_;  // Not owned.
-  scoped_ptr<TestObserver> test_observer_;
+  std::unique_ptr<TestObserver> test_observer_;
   scoped_refptr<AudioDevicesPrefHandlerStub> audio_pref_handler_;
 
  private:
diff --git a/chromeos/binder/command_broker.cc b/chromeos/binder/command_broker.cc
index 3fefc47..ad87e65d 100644
--- a/chromeos/binder/command_broker.cc
+++ b/chromeos/binder/command_broker.cc
@@ -85,7 +85,7 @@
 
 bool CommandBroker::Transact(int32_t handle,
                              const TransactionData& request,
-                             scoped_ptr<TransactionData>* reply) {
+                             std::unique_ptr<TransactionData>* reply) {
   DCHECK(thread_checker_.CalledOnValidThread());
   // Send transaction.
   binder_transaction_data tr = ConvertTransactionDataToStruct(request);
@@ -96,7 +96,7 @@
     return false;
   }
   // Wait for response.
-  scoped_ptr<TransactionData> response_data;
+  std::unique_ptr<TransactionData> response_data;
   ResponseType response_type = WaitForResponse(&response_data);
   if (response_type != RESPONSE_TYPE_TRANSACTION_COMPLETE) {
     LOG(ERROR) << "Failed to wait for response: response_type = "
@@ -105,7 +105,7 @@
   }
   if (!request.IsOneWay()) {
     // Wait for reply.
-    scoped_ptr<TransactionData> response_data;
+    std::unique_ptr<TransactionData> response_data;
     ResponseType response_type = WaitForResponse(&response_data);
     if (response_type != RESPONSE_TYPE_TRANSACTION_REPLY) {
       LOG(ERROR) << "Failed to wait for response: response_type = "
@@ -138,7 +138,7 @@
 
 bool CommandBroker::OnTransaction(const TransactionData& data) {
   LocalObject* object = reinterpret_cast<LocalObject*>(data.GetCookie());
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   if (!object->Transact(this, data, &reply)) {
     LOG(ERROR) << "Failed to transact.";
     return false;
@@ -155,7 +155,7 @@
       LOG(ERROR) << "Failed to write";
       return false;
     }
-    scoped_ptr<TransactionData> response_data;
+    std::unique_ptr<TransactionData> response_data;
     ResponseType response_type = WaitForResponse(&response_data);
     // Not returning false for errors here, as doing it can result in letting
     // another process abort the loop in PollCommands() (e.g. any process can
@@ -167,7 +167,7 @@
   return true;
 }
 
-void CommandBroker::OnReply(scoped_ptr<TransactionData> data) {
+void CommandBroker::OnReply(std::unique_ptr<TransactionData> data) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK_EQ(response_type_, RESPONSE_TYPE_NONE);
   DCHECK(!response_data_);
@@ -210,7 +210,7 @@
 }
 
 CommandBroker::ResponseType CommandBroker::WaitForResponse(
-    scoped_ptr<TransactionData>* data) {
+    std::unique_ptr<TransactionData>* data) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK_EQ(response_type_, RESPONSE_TYPE_NONE);
   DCHECK(!response_data_);
diff --git a/chromeos/binder/command_broker.h b/chromeos/binder/command_broker.h
index 4e65f93..3b792e2 100644
--- a/chromeos/binder/command_broker.h
+++ b/chromeos/binder/command_broker.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <utility>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "chromeos/binder/command_stream.h"
@@ -57,7 +57,7 @@
   // until the target object sends a reply.
   bool Transact(int32_t handle,
                 const TransactionData& request,
-                scoped_ptr<TransactionData>* reply);
+                std::unique_ptr<TransactionData>* reply);
 
   // Increments the ref-count of a remote object specified by |handle|.
   void AddReference(int32_t handle);
@@ -72,7 +72,7 @@
 
   // CommandStream::IncomingCommandHandler override:
   bool OnTransaction(const TransactionData& data) override;
-  void OnReply(scoped_ptr<TransactionData> data) override;
+  void OnReply(std::unique_ptr<TransactionData> data) override;
   void OnDeadReply() override;
   void OnTransactionComplete() override;
   void OnIncrementWeakReference(void* ptr, void* cookie) override;
@@ -91,13 +91,13 @@
   };
 
   // Waits for a response to the previous transaction.
-  ResponseType WaitForResponse(scoped_ptr<TransactionData>* data);
+  ResponseType WaitForResponse(std::unique_ptr<TransactionData>* data);
 
   base::ThreadChecker thread_checker_;
   CommandStream command_stream_;
 
   ResponseType response_type_ = RESPONSE_TYPE_NONE;
-  scoped_ptr<TransactionData> response_data_;
+  std::unique_ptr<TransactionData> response_data_;
 
   base::WeakPtrFactory<CommandBroker> weak_ptr_factory_;
 
diff --git a/chromeos/binder/command_broker_unittest.cc b/chromeos/binder/command_broker_unittest.cc
index f5b8b19..44c4908b 100644
--- a/chromeos/binder/command_broker_unittest.cc
+++ b/chromeos/binder/command_broker_unittest.cc
@@ -28,7 +28,7 @@
 TEST_F(BinderCommandBrokerTest, Transact) {
   WritableTransactionData data;
   data.SetCode(kPingTransactionCode);
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   EXPECT_TRUE(command_broker_.Transact(kContextManagerHandle, data, &reply));
   ASSERT_TRUE(reply);
   EXPECT_FALSE(reply->HasStatus());  // No error.
diff --git a/chromeos/binder/command_stream.cc b/chromeos/binder/command_stream.cc
index a60207a..0c68568e 100644
--- a/chromeos/binder/command_stream.cc
+++ b/chromeos/binder/command_stream.cc
@@ -131,9 +131,10 @@
       break;
     }
     case BR_REPLY: {
-      scoped_ptr<TransactionDataFromDriver> data(new TransactionDataFromDriver(
-          base::Bind(&CommandStream::FreeTransactionBuffer,
-                     weak_ptr_factory_.GetWeakPtr())));
+      std::unique_ptr<TransactionDataFromDriver> data(
+          new TransactionDataFromDriver(
+              base::Bind(&CommandStream::FreeTransactionBuffer,
+                         weak_ptr_factory_.GetWeakPtr())));
       binder_transaction_data* data_struct = data->mutable_data();
       if (!reader->Read(data_struct, sizeof(*data_struct))) {
         LOG(ERROR) << "Failed to read transaction data.";
diff --git a/chromeos/binder/command_stream.h b/chromeos/binder/command_stream.h
index c34c2be..99f2f83b 100644
--- a/chromeos/binder/command_stream.h
+++ b/chromeos/binder/command_stream.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "chromeos/chromeos_export.h"
@@ -38,7 +38,7 @@
 
     // Called to handle BR_REPLY.
     // |data| is the reply for the previous transaction.
-    virtual void OnReply(scoped_ptr<TransactionData> data) = 0;
+    virtual void OnReply(std::unique_ptr<TransactionData> data) = 0;
 
     // Called to handle BR_DEAD_REPLY.
     virtual void OnDeadReply() = 0;
@@ -101,7 +101,7 @@
 
   std::vector<char> outgoing_data_;  // Buffer for outgoing commands.
   std::vector<char> incoming_data_;  // Buffer for incoming commands.
-  scoped_ptr<BufferReader> incoming_data_reader_;
+  std::unique_ptr<BufferReader> incoming_data_reader_;
 
   base::WeakPtrFactory<CommandStream> weak_ptr_factory_;
 
diff --git a/chromeos/binder/command_stream_unittest.cc b/chromeos/binder/command_stream_unittest.cc
index 74c5ce6d..9c9aa30 100644
--- a/chromeos/binder/command_stream_unittest.cc
+++ b/chromeos/binder/command_stream_unittest.cc
@@ -25,7 +25,7 @@
   // CommandStream::IncomingCommandHandler override:
   bool OnTransaction(const TransactionData& data) override { return false; }
 
-  void OnReply(scoped_ptr<TransactionData> data) override {
+  void OnReply(std::unique_ptr<TransactionData> data) override {
     received_response_ = RESPONSE_REPLY;
     ASSERT_TRUE(data);
     EXPECT_FALSE(data->HasStatus());  // No error.
diff --git a/chromeos/binder/end_to_end_unittest.cc b/chromeos/binder/end_to_end_unittest.cc
index ca04ebb..8b11b90 100644
--- a/chromeos/binder/end_to_end_unittest.cc
+++ b/chromeos/binder/end_to_end_unittest.cc
@@ -39,7 +39,7 @@
     CommandBroker command_broker(&driver_);
     WritableTransactionData data;
     data.SetCode(TestService::SIGNAL_TRANSACTION);
-    scoped_ptr<TransactionData> reply;
+    std::unique_ptr<TransactionData> reply;
     ASSERT_TRUE(remote_object_->Transact(&command_broker, data, &reply));
     ASSERT_TRUE(reply);
 
@@ -62,7 +62,7 @@
   WritableTransactionData data;
   data.SetCode(TestService::INCREMENT_INT_TRANSACTION);
   data.WriteInt32(kInput);
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   ASSERT_TRUE(remote_object_->Transact(&command_broker_, data, &reply));
   ASSERT_TRUE(reply);
 
@@ -75,7 +75,7 @@
 TEST_F(BinderEndToEndTest, GetFD) {
   WritableTransactionData data;
   data.SetCode(TestService::GET_FD_TRANSACTION);
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   ASSERT_TRUE(remote_object_->Transact(&command_broker_, data, &reply));
   ASSERT_TRUE(reply);
 
@@ -108,7 +108,7 @@
   // Wait for the signal.
   WritableTransactionData data;
   data.SetCode(TestService::WAIT_TRANSACTION);
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   ASSERT_TRUE(remote_object_->Transact(&command_broker_, data, &reply));
   ASSERT_TRUE(reply);
 
diff --git a/chromeos/binder/ipc_thread.h b/chromeos/binder/ipc_thread.h
index 8d0f6dd..8ba9ab4 100644
--- a/chromeos/binder/ipc_thread.h
+++ b/chromeos/binder/ipc_thread.h
@@ -5,8 +5,9 @@
 #ifndef CHROMEOS_BINDER_IPC_THREAD_H_
 #define CHROMEOS_BINDER_IPC_THREAD_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/threading/thread.h"
 #include "chromeos/binder/command_broker.h"
@@ -68,8 +69,8 @@
   void CleanUp() override;
 
  private:
-  scoped_ptr<Driver> driver_;
-  scoped_ptr<IpcThreadPoller> poller_;
+  std::unique_ptr<Driver> driver_;
+  std::unique_ptr<IpcThreadPoller> poller_;
   bool initialized_ = false;
 
   DISALLOW_COPY_AND_ASSIGN(MainIpcThread);
@@ -99,7 +100,7 @@
 
  private:
   MainIpcThread* main_thread_;
-  scoped_ptr<IpcThreadPoller> poller_;
+  std::unique_ptr<IpcThreadPoller> poller_;
   bool initialized_ = false;
 
   DISALLOW_COPY_AND_ASSIGN(SubIpcThread);
diff --git a/chromeos/binder/local_object.cc b/chromeos/binder/local_object.cc
index ec9bd37..710e2232 100644
--- a/chromeos/binder/local_object.cc
+++ b/chromeos/binder/local_object.cc
@@ -10,7 +10,7 @@
 
 namespace binder {
 
-LocalObject::LocalObject(scoped_ptr<TransactionHandler> handler)
+LocalObject::LocalObject(std::unique_ptr<TransactionHandler> handler)
     : handler_(std::move(handler)) {}
 
 LocalObject::~LocalObject() {}
@@ -21,7 +21,7 @@
 
 bool LocalObject::Transact(CommandBroker* command_broker,
                            const TransactionData& data,
-                           scoped_ptr<TransactionData>* reply) {
+                           std::unique_ptr<TransactionData>* reply) {
   *reply = handler_->OnTransact(command_broker, data);
   return true;
 }
diff --git a/chromeos/binder/local_object.h b/chromeos/binder/local_object.h
index d833f5c..6284e60b 100644
--- a/chromeos/binder/local_object.h
+++ b/chromeos/binder/local_object.h
@@ -5,8 +5,9 @@
 #ifndef CHROMEOS_BINDER_LOCAL_OBJECT_H_
 #define CHROMEOS_BINDER_LOCAL_OBJECT_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/binder/object.h"
 #include "chromeos/chromeos_export.h"
 
@@ -21,24 +22,24 @@
     virtual ~TransactionHandler() {}
 
     // Called when LocalObject::Transact() is called.
-    virtual scoped_ptr<TransactionData> OnTransact(
+    virtual std::unique_ptr<TransactionData> OnTransact(
         CommandBroker* command_broker,
         const TransactionData& data) = 0;
   };
 
-  explicit LocalObject(scoped_ptr<TransactionHandler> handler);
+  explicit LocalObject(std::unique_ptr<TransactionHandler> handler);
 
   // Object override:
   Type GetType() const override;
   bool Transact(CommandBroker* command_broker,
                 const TransactionData& data,
-                scoped_ptr<TransactionData>* reply) override;
+                std::unique_ptr<TransactionData>* reply) override;
 
  protected:
   ~LocalObject() override;
 
  private:
-  scoped_ptr<TransactionHandler> handler_;
+  std::unique_ptr<TransactionHandler> handler_;
 
   DISALLOW_COPY_AND_ASSIGN(LocalObject);
 };
diff --git a/chromeos/binder/object.h b/chromeos/binder/object.h
index 21b99f0..0f35c98 100644
--- a/chromeos/binder/object.h
+++ b/chromeos/binder/object.h
@@ -5,8 +5,9 @@
 #ifndef CHROMEOS_BINDER_OBJECT_H_
 #define CHROMEOS_BINDER_OBJECT_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 
 namespace binder {
 
@@ -28,7 +29,7 @@
   // Performs a transaction.
   virtual bool Transact(CommandBroker* command_broker,
                         const TransactionData& data,
-                        scoped_ptr<TransactionData>* reply) = 0;
+                        std::unique_ptr<TransactionData>* reply) = 0;
 
  protected:
   friend class base::RefCountedThreadSafe<Object>;
diff --git a/chromeos/binder/remote_object.cc b/chromeos/binder/remote_object.cc
index c00ba3f..8d255ae 100644
--- a/chromeos/binder/remote_object.cc
+++ b/chromeos/binder/remote_object.cc
@@ -31,7 +31,7 @@
 
 bool RemoteObject::Transact(CommandBroker* command_broker,
                             const TransactionData& data,
-                            scoped_ptr<TransactionData>* reply) {
+                            std::unique_ptr<TransactionData>* reply) {
   return command_broker->Transact(handle_, data, reply);
 }
 
diff --git a/chromeos/binder/remote_object.h b/chromeos/binder/remote_object.h
index 656ac8d..f4beeca 100644
--- a/chromeos/binder/remote_object.h
+++ b/chromeos/binder/remote_object.h
@@ -31,7 +31,7 @@
   Type GetType() const override;
   bool Transact(CommandBroker* command_broker,
                 const TransactionData& data,
-                scoped_ptr<TransactionData>* reply) override;
+                std::unique_ptr<TransactionData>* reply) override;
 
  protected:
   ~RemoteObject() override;
diff --git a/chromeos/binder/service_manager_proxy.cc b/chromeos/binder/service_manager_proxy.cc
index c639e240..73a9c72 100644
--- a/chromeos/binder/service_manager_proxy.cc
+++ b/chromeos/binder/service_manager_proxy.cc
@@ -29,7 +29,7 @@
   data.WriteInterfaceToken(base::ASCIIToUTF16(kInterfaceName),
                            kStrictModePolicy);
   data.WriteString16(service_name);
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   if (!command_broker->Transact(kContextManagerHandle, data, &reply) ||
       !reply || reply->HasStatus()) {
     LOG(ERROR) << "Failed to get the service.";
@@ -54,7 +54,7 @@
   data.WriteString16(service_name);
   data.WriteObject(object);
   data.WriteInt32((options & ALLOW_ISOLATED) ? 1 : 0);
-  scoped_ptr<TransactionData> reply;
+  std::unique_ptr<TransactionData> reply;
   if (!command_broker->Transact(kContextManagerHandle, data, &reply) ||
       !reply || reply->HasStatus()) {
     LOG(ERROR) << "Failed to add the service.";
diff --git a/chromeos/binder/service_manager_proxy_unittest.cc b/chromeos/binder/service_manager_proxy_unittest.cc
index 523720a..9b7fb3a 100644
--- a/chromeos/binder/service_manager_proxy_unittest.cc
+++ b/chromeos/binder/service_manager_proxy_unittest.cc
@@ -2,15 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chromeos/binder/service_manager_proxy.h"
+
 #include "base/guid.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chromeos/binder/command_broker.h"
 #include "chromeos/binder/driver.h"
 #include "chromeos/binder/local_object.h"
-#include "chromeos/binder/service_manager_proxy.h"
 #include "chromeos/binder/transaction_data.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -23,9 +25,10 @@
   DummyTransactionHandler() {}
   ~DummyTransactionHandler() override {}
 
-  scoped_ptr<TransactionData> OnTransact(CommandBroker* command_broker,
-                                         const TransactionData& data) override {
-    return scoped_ptr<TransactionData>();
+  std::unique_ptr<TransactionData> OnTransact(
+      CommandBroker* command_broker,
+      const TransactionData& data) override {
+    return std::unique_ptr<TransactionData>();
   }
 
  private:
@@ -57,7 +60,7 @@
 
   // Add service.
   scoped_refptr<Object> object(
-      new LocalObject(make_scoped_ptr(new DummyTransactionHandler())));
+      new LocalObject(base::WrapUnique(new DummyTransactionHandler())));
   EXPECT_TRUE(ServiceManagerProxy::AddService(&command_broker_, kServiceName,
                                               object, 0));
 
diff --git a/chromeos/binder/test_service.cc b/chromeos/binder/test_service.cc
index dc196ed..1f2cb28 100644
--- a/chromeos/binder/test_service.cc
+++ b/chromeos/binder/test_service.cc
@@ -8,6 +8,7 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/guid.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/synchronization/waitable_event.h"
@@ -28,7 +29,7 @@
 
   ~TestObject() override { VLOG(1) << "Object destroyed: " << this; }
 
-  scoped_ptr<binder::TransactionData> OnTransact(
+  std::unique_ptr<binder::TransactionData> OnTransact(
       binder::CommandBroker* command_broker,
       const binder::TransactionData& data) {
     VLOG(1) << "Transact code = " << data.GetCode();
@@ -37,7 +38,7 @@
       case INCREMENT_INT_TRANSACTION: {
         int32_t arg = 0;
         reader.ReadInt32(&arg);
-        scoped_ptr<binder::WritableTransactionData> reply(
+        std::unique_ptr<binder::WritableTransactionData> reply(
             new binder::WritableTransactionData());
         reply->WriteInt32(arg + 1);
         return std::move(reply);
@@ -51,38 +52,38 @@
             !base::CreateTemporaryFileInDir(temp_dir.path(), &path) ||
             !base::WriteFile(path, data.data(), data.size())) {
           LOG(ERROR) << "Failed to create a file";
-          return scoped_ptr<TransactionData>();
+          return std::unique_ptr<TransactionData>();
         }
         // Open the file.
         base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
         if (!file.IsValid()) {
           LOG(ERROR) << "Failed to open the file.";
-          return scoped_ptr<TransactionData>();
+          return std::unique_ptr<TransactionData>();
         }
         // Return the FD.
         // The file will be deleted by |temp_dir|, but the FD remains valid
         // until the receiving process closes it.
-        scoped_ptr<binder::WritableTransactionData> reply(
+        std::unique_ptr<binder::WritableTransactionData> reply(
             new binder::WritableTransactionData());
         reply->WriteFileDescriptor(base::ScopedFD(file.TakePlatformFile()));
         return std::move(reply);
       }
       case WAIT_TRANSACTION: {
         event_.Wait();
-        scoped_ptr<binder::WritableTransactionData> reply(
+        std::unique_ptr<binder::WritableTransactionData> reply(
             new binder::WritableTransactionData());
         reply->WriteUint32(WAIT_TRANSACTION);
         return std::move(reply);
       }
       case SIGNAL_TRANSACTION: {
         event_.Signal();
-        scoped_ptr<binder::WritableTransactionData> reply(
+        std::unique_ptr<binder::WritableTransactionData> reply(
             new binder::WritableTransactionData());
         reply->WriteUint32(SIGNAL_TRANSACTION);
         return std::move(reply);
       }
     }
-    return scoped_ptr<TransactionData>();
+    return std::unique_ptr<TransactionData>();
   }
 
  private:
@@ -128,7 +129,7 @@
 void TestService::Initialize(bool* result) {
   // Add service.
   scoped_refptr<LocalObject> object(
-      new LocalObject(make_scoped_ptr(new TestObject)));
+      new LocalObject(base::WrapUnique(new TestObject)));
   *result = ServiceManagerProxy::AddService(main_thread_.command_broker(),
                                             service_name_, object, 0);
 }
diff --git a/chromeos/binder/transaction_data_read_write_unittest.cc b/chromeos/binder/transaction_data_read_write_unittest.cc
index e636961..b713a82 100644
--- a/chromeos/binder/transaction_data_read_write_unittest.cc
+++ b/chromeos/binder/transaction_data_read_write_unittest.cc
@@ -232,7 +232,7 @@
   CommandBroker command_broker(&driver);
 
   scoped_refptr<LocalObject> local(
-      new LocalObject(scoped_ptr<LocalObject::TransactionHandler>()));
+      new LocalObject(std::unique_ptr<LocalObject::TransactionHandler>()));
 
   const int32_t kDummyHandle = 42;
   scoped_refptr<RemoteObject> remote(
diff --git a/chromeos/cert_loader.cc b/chromeos/cert_loader.cc
index b5ac9e5..1dc12e72 100644
--- a/chromeos/cert_loader.cc
+++ b/chromeos/cert_loader.cc
@@ -152,7 +152,7 @@
 }
 
 void CertLoader::UpdateCertificates(
-    scoped_ptr<net::CertificateList> cert_list) {
+    std::unique_ptr<net::CertificateList> cert_list) {
   CHECK(thread_checker_.CalledOnValidThread());
   DCHECK(certificates_update_running_);
   VLOG(1) << "UpdateCertificates: " << cert_list->size();
diff --git a/chromeos/cert_loader.h b/chromeos/cert_loader.h
index a837e4d..c7aeebcf 100644
--- a/chromeos/cert_loader.h
+++ b/chromeos/cert_loader.h
@@ -99,7 +99,7 @@
   void LoadCertificates();
 
   // Called if a certificate load task is finished.
-  void UpdateCertificates(scoped_ptr<net::CertificateList> cert_list);
+  void UpdateCertificates(std::unique_ptr<net::CertificateList> cert_list);
 
   void NotifyCertificatesLoaded(bool initial_load);
 
@@ -120,7 +120,7 @@
   net::NSSCertDatabase* database_;
 
   // Cached Certificates loaded from the database.
-  scoped_ptr<net::CertificateList> cert_list_;
+  std::unique_ptr<net::CertificateList> cert_list_;
 
   base::ThreadChecker thread_checker_;
 
diff --git a/chromeos/cert_loader_unittest.cc b/chromeos/cert_loader_unittest.cc
index 9057013..dd7370e6 100644
--- a/chromeos/cert_loader_unittest.cc
+++ b/chromeos/cert_loader_unittest.cc
@@ -5,11 +5,12 @@
 #include "chromeos/cert_loader.h"
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/files/file_util.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "crypto/scoped_nss_types.h"
@@ -96,7 +97,7 @@
   }
 
   void CreateCertDatabase(crypto::ScopedTestNSSDB* db,
-                          scoped_ptr<TestNSSCertDatabase>* certdb) {
+                          std::unique_ptr<TestNSSCertDatabase>* certdb) {
     ASSERT_TRUE(db->is_open());
 
     certdb->reset(new TestNSSCertDatabase(
@@ -141,7 +142,7 @@
   // has nothing to do with crypto::InitializeNSSForChromeOSUser is_primary_user
   // parameter (which is irrelevant for these tests).
   crypto::ScopedTestNSSDB primary_db_;
-  scoped_ptr<TestNSSCertDatabase> primary_certdb_;
+  std::unique_ptr<TestNSSCertDatabase> primary_certdb_;
 
   base::MessageLoop message_loop_;
 
@@ -197,7 +198,7 @@
 
 TEST_F(CertLoaderTest, CertLoaderNoUpdateOnSecondaryDbChanges) {
   crypto::ScopedTestNSSDB secondary_db;
-  scoped_ptr<TestNSSCertDatabase> secondary_certdb;
+  std::unique_ptr<TestNSSCertDatabase> secondary_certdb;
 
   StartCertLoaderWithPrimaryDB();
   CreateCertDatabase(&secondary_db, &secondary_certdb);
@@ -226,7 +227,7 @@
 
 TEST_F(CertLoaderTest, CertLoaderNoUpdateOnNewClientCertInSecondaryDb) {
   crypto::ScopedTestNSSDB secondary_db;
-  scoped_ptr<TestNSSCertDatabase> secondary_certdb;
+  std::unique_ptr<TestNSSCertDatabase> secondary_certdb;
 
   StartCertLoaderWithPrimaryDB();
   CreateCertDatabase(&secondary_db, &secondary_certdb);
diff --git a/chromeos/cryptohome/cryptohome_parameters.cc b/chromeos/cryptohome/cryptohome_parameters.cc
index 5aa88578c..dcb649e 100644
--- a/chromeos/cryptohome/cryptohome_parameters.cc
+++ b/chromeos/cryptohome/cryptohome_parameters.cc
@@ -112,6 +112,8 @@
                              false /* wrapped */));
 }
 
+KeyDefinition::AuthorizationData::AuthorizationData(
+    const AuthorizationData& other) = default;
 
 KeyDefinition::AuthorizationData::~AuthorizationData() {
 }
@@ -188,6 +190,8 @@
       secret(secret) {
 }
 
+KeyDefinition::KeyDefinition(const KeyDefinition& other) = default;
+
 KeyDefinition::~KeyDefinition() {
 }
 
@@ -229,6 +233,8 @@
 MountParameters::MountParameters(bool ephemeral) : ephemeral(ephemeral) {
 }
 
+MountParameters::MountParameters(const MountParameters& other) = default;
+
 bool MountParameters::operator==(const MountParameters& other) const {
   return ephemeral == other.ephemeral && create_keys == other.create_keys;
 }
diff --git a/chromeos/cryptohome/cryptohome_parameters.h b/chromeos/cryptohome/cryptohome_parameters.h
index 2037b21..d906600a 100644
--- a/chromeos/cryptohome/cryptohome_parameters.h
+++ b/chromeos/cryptohome/cryptohome_parameters.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
 class AccountId;
@@ -87,6 +87,7 @@
     AuthorizationData(bool encrypt,
                       bool sign,
                       const std::string& symmetric_key);
+    AuthorizationData(const AuthorizationData& other);
     ~AuthorizationData();
 
     bool operator==(const AuthorizationData& other) const;
@@ -113,14 +114,15 @@
     bool operator==(const ProviderData& other) const;
 
     std::string name;
-    scoped_ptr<int64_t> number;
-    scoped_ptr<std::string> bytes;
+    std::unique_ptr<int64_t> number;
+    std::unique_ptr<std::string> bytes;
   };
 
   KeyDefinition();
   KeyDefinition(const std::string& secret,
                 const std::string& label,
                 int privileges);
+  KeyDefinition(const KeyDefinition& other);
   ~KeyDefinition();
 
   bool operator==(const KeyDefinition& other) const;
@@ -151,6 +153,7 @@
 class CHROMEOS_EXPORT MountParameters {
  public:
   explicit MountParameters(bool ephemeral);
+  MountParameters(const MountParameters& other);
   ~MountParameters();
 
   bool operator==(const MountParameters& other) const;
diff --git a/chromeos/cryptohome/homedir_methods_unittest.cc b/chromeos/cryptohome/homedir_methods_unittest.cc
index 8343fa1d..0ce060d6 100644
--- a/chromeos/cryptohome/homedir_methods_unittest.cc
+++ b/chromeos/cryptohome/homedir_methods_unittest.cc
@@ -5,13 +5,14 @@
 #include "chromeos/cryptohome/homedir_methods.h"
 
 #include <stdint.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/dbus/cryptohome/rpc.pb.h"
 #include "chromeos/dbus/cryptohome_client.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
@@ -93,7 +94,7 @@
 }
 
 void HomedirMethodsTest::SetUp() {
-  scoped_ptr<chromeos::MockCryptohomeClient> cryptohome_client(
+  std::unique_ptr<chromeos::MockCryptohomeClient> cryptohome_client(
       new chromeos::MockCryptohomeClient);
   cryptohome_client_ = cryptohome_client.get();
   chromeos::DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient(
diff --git a/chromeos/cryptohome/system_salt_getter_unittest.cc b/chromeos/cryptohome/system_salt_getter_unittest.cc
index 43e1690..5234129 100644
--- a/chromeos/cryptohome/system_salt_getter_unittest.cc
+++ b/chromeos/cryptohome/system_salt_getter_unittest.cc
@@ -27,7 +27,7 @@
   void SetUp() override {
     fake_cryptohome_client_ = new FakeCryptohomeClient;
     DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient(
-        scoped_ptr<CryptohomeClient>(fake_cryptohome_client_));
+        std::unique_ptr<CryptohomeClient>(fake_cryptohome_client_));
 
     EXPECT_FALSE(SystemSaltGetter::IsInitialized());
     SystemSaltGetter::Initialize();
diff --git a/chromeos/dbus/audio_node.cc b/chromeos/dbus/audio_node.cc
index b1cb3b04..b159cf3 100644
--- a/chromeos/dbus/audio_node.cc
+++ b/chromeos/dbus/audio_node.cc
@@ -36,6 +36,8 @@
       active(active),
       plugged_time(plugged_time) {}
 
+AudioNode::AudioNode(const AudioNode& other) = default;
+
 AudioNode::~AudioNode() {}
 
 std::string AudioNode::ToString() const {
diff --git a/chromeos/dbus/audio_node.h b/chromeos/dbus/audio_node.h
index 68e2109..d6f90e5 100644
--- a/chromeos/dbus/audio_node.h
+++ b/chromeos/dbus/audio_node.h
@@ -36,6 +36,7 @@
             std::string name,
             bool active,
             uint64_t plugged_time);
+  AudioNode(const AudioNode& other);
   ~AudioNode();
   std::string ToString() const;
 };
diff --git a/chromeos/dbus/blocking_method_caller.cc b/chromeos/dbus/blocking_method_caller.cc
index f95254be..bca327c 100644
--- a/chromeos/dbus/blocking_method_caller.cc
+++ b/chromeos/dbus/blocking_method_caller.cc
@@ -17,11 +17,10 @@
 namespace {
 
 // This function is a part of CallMethodAndBlock implementation.
-void CallMethodAndBlockInternal(
-    scoped_ptr<dbus::Response>* response,
-    base::ScopedClosureRunner* signaler,
-    dbus::ObjectProxy* proxy,
-    dbus::MethodCall* method_call) {
+void CallMethodAndBlockInternal(std::unique_ptr<dbus::Response>* response,
+                                base::ScopedClosureRunner* signaler,
+                                dbus::ObjectProxy* proxy,
+                                dbus::MethodCall* method_call) {
   *response = proxy->CallMethodAndBlock(
       method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT);
 }
@@ -39,7 +38,7 @@
 BlockingMethodCaller::~BlockingMethodCaller() {
 }
 
-scoped_ptr<dbus::Response> BlockingMethodCaller::CallMethodAndBlock(
+std::unique_ptr<dbus::Response> BlockingMethodCaller::CallMethodAndBlock(
     dbus::MethodCall* method_call) {
   // on_blocking_method_call_->Signal() will be called when |signaler| is
   // destroyed.
@@ -49,7 +48,7 @@
   base::ScopedClosureRunner* signaler =
       new base::ScopedClosureRunner(signal_task);
 
-  scoped_ptr<dbus::Response> response;
+  std::unique_ptr<dbus::Response> response;
   bus_->GetDBusTaskRunner()->PostTask(
       FROM_HERE,
       base::Bind(&CallMethodAndBlockInternal,
diff --git a/chromeos/dbus/blocking_method_caller.h b/chromeos/dbus/blocking_method_caller.h
index 5d7db29..2892bf67 100644
--- a/chromeos/dbus/blocking_method_caller.h
+++ b/chromeos/dbus/blocking_method_caller.h
@@ -29,7 +29,8 @@
   virtual ~BlockingMethodCaller();
 
   // Calls the method and blocks until it returns.
-  scoped_ptr<dbus::Response> CallMethodAndBlock(dbus::MethodCall* method_call);
+  std::unique_ptr<dbus::Response> CallMethodAndBlock(
+      dbus::MethodCall* method_call);
 
  private:
   dbus::Bus* bus_;
diff --git a/chromeos/dbus/blocking_method_caller_unittest.cc b/chromeos/dbus/blocking_method_caller_unittest.cc
index 3decf12..7a6e23c 100644
--- a/chromeos/dbus/blocking_method_caller_unittest.cc
+++ b/chromeos/dbus/blocking_method_caller_unittest.cc
@@ -4,9 +4,10 @@
 
 #include "chromeos/dbus/blocking_method_caller.h"
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/task_runner.h"
 #include "dbus/message.h"
 #include "dbus/mock_bus.h"
@@ -95,7 +96,8 @@
       dbus::MessageReader reader(method_call);
       std::string text_message;
       if (reader.PopString(&text_message)) {
-        scoped_ptr<dbus::Response> response = dbus::Response::CreateEmpty();
+        std::unique_ptr<dbus::Response> response =
+            dbus::Response::CreateEmpty();
         dbus::MessageWriter writer(response.get());
         writer.AppendString(text_message);
         return response.release();
@@ -121,7 +123,7 @@
 
   // Call the method.
   BlockingMethodCaller blocking_method_caller(mock_bus_.get(), proxy);
-  scoped_ptr<dbus::Response> response(
+  std::unique_ptr<dbus::Response> response(
       blocking_method_caller.CallMethodAndBlock(&method_call));
 
   // Check the response.
diff --git a/chromeos/dbus/cros_disks_client.cc b/chromeos/dbus/cros_disks_client.cc
index eee2f72..8dda349 100644
--- a/chromeos/dbus/cros_disks_client.cc
+++ b/chromeos/dbus/cros_disks_client.cc
@@ -577,7 +577,7 @@
 // ]
 void DiskInfo::InitializeFromResponse(dbus::Response* response) {
   dbus::MessageReader reader(response);
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
   base::DictionaryValue* properties = NULL;
   if (!value || !value->GetAsDictionary(&properties))
     return;
diff --git a/chromeos/dbus/cros_disks_client_unittest.cc b/chromeos/dbus/cros_disks_client_unittest.cc
index 82dbf33..cb8dddec 100644
--- a/chromeos/dbus/cros_disks_client_unittest.cc
+++ b/chromeos/dbus/cros_disks_client_unittest.cc
@@ -6,7 +6,8 @@
 
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "dbus/message.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
@@ -61,7 +62,7 @@
   const std::string kVendorName = "Vendor Name";
 
   // Construct a fake response of GetDeviceProperties().
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   {
     dbus::MessageWriter writer(response.get());
     dbus::MessageWriter array_writer(NULL);
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc
index bdf5125..a52fe016 100644
--- a/chromeos/dbus/cryptohome_client.cc
+++ b/chromeos/dbus/cryptohome_client.cc
@@ -178,7 +178,7 @@
     dbus::MessageWriter writer(&method_call);
     writer.AppendString(cryptohome_id.id());
 
-    scoped_ptr<dbus::Response> response =
+    std::unique_ptr<dbus::Response> response =
         blocking_method_caller_->CallMethodAndBlock(&method_call);
 
     std::string sanitized_username;
@@ -335,7 +335,7 @@
   bool CallTpmClearStoredPasswordAndBlock() override {
     dbus::MethodCall method_call(cryptohome::kCryptohomeInterface,
                                  cryptohome::kCryptohomeTpmClearStoredPassword);
-    scoped_ptr<dbus::Response> response(
+    std::unique_ptr<dbus::Response> response(
         blocking_method_caller_->CallMethodAndBlock(&method_call));
     return response.get() != NULL;
   }
@@ -385,7 +385,7 @@
                                  cryptohome::kCryptohomeInstallAttributesGet);
     dbus::MessageWriter writer(&method_call);
     writer.AppendString(name);
-    scoped_ptr<dbus::Response> response(
+    std::unique_ptr<dbus::Response> response(
         blocking_method_caller_->CallMethodAndBlock(&method_call));
     if (!response.get())
       return false;
@@ -986,7 +986,7 @@
   // Calls a method with a bool value reult and block.
   bool CallBoolMethodAndBlock(dbus::MethodCall* method_call,
                               bool* result) {
-    scoped_ptr<dbus::Response> response(
+    std::unique_ptr<dbus::Response> response(
         blocking_method_caller_->CallMethodAndBlock(method_call));
     if (!response.get())
       return false;
@@ -1158,7 +1158,7 @@
   }
 
   dbus::ObjectProxy* proxy_;
-  scoped_ptr<BlockingMethodCaller> blocking_method_caller_;
+  std::unique_ptr<BlockingMethodCaller> blocking_method_caller_;
   AsyncCallStatusHandler async_call_status_handler_;
   AsyncCallStatusWithDataHandler async_call_status_data_handler_;
 
diff --git a/chromeos/dbus/dbus_client_bundle.h b/chromeos/dbus/dbus_client_bundle.h
index 478a5d5..fed3a3e 100644
--- a/chromeos/dbus/dbus_client_bundle.h
+++ b/chromeos/dbus/dbus_client_bundle.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_
 #define CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
 namespace chromeos {
@@ -228,41 +228,41 @@
   // are defined within DBusClientType enum.
   DBusClientTypeMask unstub_client_mask_;
 
-  scoped_ptr<AmplifierClient> amplifier_client_;
-  scoped_ptr<ApManagerClient> ap_manager_client_;
-  scoped_ptr<AudioDspClient> audio_dsp_client_;
-  scoped_ptr<CrasAudioClient> cras_audio_client_;
-  scoped_ptr<CrosDisksClient> cros_disks_client_;
-  scoped_ptr<CryptohomeClient> cryptohome_client_;
-  scoped_ptr<DebugDaemonClient> debug_daemon_client_;
-  scoped_ptr<EasyUnlockClient> easy_unlock_client_;
-  scoped_ptr<LorgnetteManagerClient> lorgnette_manager_client_;
-  scoped_ptr<PeerDaemonManagerClient> peer_daemon_manager_client_;
-  scoped_ptr<PrivetDaemonManagerClient> privet_daemon_manager_client_;
-  scoped_ptr<ShillDeviceClient> shill_device_client_;
-  scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_;
-  scoped_ptr<ShillManagerClient> shill_manager_client_;
-  scoped_ptr<ShillServiceClient> shill_service_client_;
-  scoped_ptr<ShillProfileClient> shill_profile_client_;
-  scoped_ptr<ShillThirdPartyVpnDriverClient>
+  std::unique_ptr<AmplifierClient> amplifier_client_;
+  std::unique_ptr<ApManagerClient> ap_manager_client_;
+  std::unique_ptr<AudioDspClient> audio_dsp_client_;
+  std::unique_ptr<CrasAudioClient> cras_audio_client_;
+  std::unique_ptr<CrosDisksClient> cros_disks_client_;
+  std::unique_ptr<CryptohomeClient> cryptohome_client_;
+  std::unique_ptr<DebugDaemonClient> debug_daemon_client_;
+  std::unique_ptr<EasyUnlockClient> easy_unlock_client_;
+  std::unique_ptr<LorgnetteManagerClient> lorgnette_manager_client_;
+  std::unique_ptr<PeerDaemonManagerClient> peer_daemon_manager_client_;
+  std::unique_ptr<PrivetDaemonManagerClient> privet_daemon_manager_client_;
+  std::unique_ptr<ShillDeviceClient> shill_device_client_;
+  std::unique_ptr<ShillIPConfigClient> shill_ipconfig_client_;
+  std::unique_ptr<ShillManagerClient> shill_manager_client_;
+  std::unique_ptr<ShillServiceClient> shill_service_client_;
+  std::unique_ptr<ShillProfileClient> shill_profile_client_;
+  std::unique_ptr<ShillThirdPartyVpnDriverClient>
       shill_third_party_vpn_driver_client_;
-  scoped_ptr<GsmSMSClient> gsm_sms_client_;
-  scoped_ptr<ImageBurnerClient> image_burner_client_;
-  scoped_ptr<IntrospectableClient> introspectable_client_;
-  scoped_ptr<ModemMessagingClient> modem_messaging_client_;
+  std::unique_ptr<GsmSMSClient> gsm_sms_client_;
+  std::unique_ptr<ImageBurnerClient> image_burner_client_;
+  std::unique_ptr<IntrospectableClient> introspectable_client_;
+  std::unique_ptr<ModemMessagingClient> modem_messaging_client_;
   // The declaration order for NFC client objects is important. See
   // DBusThreadManager::InitializeClients for the dependencies.
-  scoped_ptr<NfcManagerClient> nfc_manager_client_;
-  scoped_ptr<NfcAdapterClient> nfc_adapter_client_;
-  scoped_ptr<NfcDeviceClient> nfc_device_client_;
-  scoped_ptr<NfcTagClient> nfc_tag_client_;
-  scoped_ptr<NfcRecordClient> nfc_record_client_;
-  scoped_ptr<PermissionBrokerClient> permission_broker_client_;
-  scoped_ptr<SystemClockClient> system_clock_client_;
-  scoped_ptr<PowerManagerClient> power_manager_client_;
-  scoped_ptr<SessionManagerClient> session_manager_client_;
-  scoped_ptr<SMSClient> sms_client_;
-  scoped_ptr<UpdateEngineClient> update_engine_client_;
+  std::unique_ptr<NfcManagerClient> nfc_manager_client_;
+  std::unique_ptr<NfcAdapterClient> nfc_adapter_client_;
+  std::unique_ptr<NfcDeviceClient> nfc_device_client_;
+  std::unique_ptr<NfcTagClient> nfc_tag_client_;
+  std::unique_ptr<NfcRecordClient> nfc_record_client_;
+  std::unique_ptr<PermissionBrokerClient> permission_broker_client_;
+  std::unique_ptr<SystemClockClient> system_clock_client_;
+  std::unique_ptr<PowerManagerClient> power_manager_client_;
+  std::unique_ptr<SessionManagerClient> session_manager_client_;
+  std::unique_ptr<SMSClient> sms_client_;
+  std::unique_ptr<UpdateEngineClient> update_engine_client_;
 
   DISALLOW_COPY_AND_ASSIGN(DBusClientBundle);
 };
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc
index c7365de..ef3114c6 100644
--- a/chromeos/dbus/dbus_thread_manager.cc
+++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/command_line.h"
+#include "base/memory/ptr_util.h"
 #include "base/sys_info.h"
 #include "base/threading/thread.h"
 #include "chromeos/chromeos_switches.h"
@@ -51,7 +52,8 @@
 static DBusThreadManager* g_dbus_thread_manager = NULL;
 static bool g_using_dbus_thread_manager_for_testing = false;
 
-DBusThreadManager::DBusThreadManager(scoped_ptr<DBusClientBundle> client_bundle)
+DBusThreadManager::DBusThreadManager(
+    std::unique_ptr<DBusClientBundle> client_bundle)
     : client_bundle_(std::move(client_bundle)) {
   dbus::statistics::Initialize();
 
@@ -316,13 +318,14 @@
 }
 
 // static
-scoped_ptr<DBusThreadManagerSetter> DBusThreadManager::GetSetterForTesting() {
+std::unique_ptr<DBusThreadManagerSetter>
+DBusThreadManager::GetSetterForTesting() {
   if (!g_using_dbus_thread_manager_for_testing) {
     g_using_dbus_thread_manager_for_testing = true;
     InitializeWithStubs();
   }
 
-  return make_scoped_ptr(new DBusThreadManagerSetter());
+  return base::WrapUnique(new DBusThreadManagerSetter());
 }
 
 // static
@@ -330,7 +333,7 @@
     DBusClientBundle::DBusClientTypeMask unstub_client_mask) {
   CHECK(!g_dbus_thread_manager);
   g_dbus_thread_manager = new DBusThreadManager(
-      make_scoped_ptr(new DBusClientBundle(unstub_client_mask)));
+      base::WrapUnique(new DBusClientBundle(unstub_client_mask)));
   g_dbus_thread_manager->InitializeClients();
 }
 
@@ -389,184 +392,184 @@
 }
 
 void DBusThreadManagerSetter::SetAmplifierClient(
-    scoped_ptr<AmplifierClient> client) {
+    std::unique_ptr<AmplifierClient> client) {
   DBusThreadManager::Get()->client_bundle_->amplifier_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetAudioDspClient(
-    scoped_ptr<AudioDspClient> client) {
+    std::unique_ptr<AudioDspClient> client) {
   DBusThreadManager::Get()->client_bundle_->audio_dsp_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetCrasAudioClient(
-    scoped_ptr<CrasAudioClient> client) {
+    std::unique_ptr<CrasAudioClient> client) {
   DBusThreadManager::Get()->client_bundle_->cras_audio_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetCrosDisksClient(
-    scoped_ptr<CrosDisksClient> client) {
+    std::unique_ptr<CrosDisksClient> client) {
   DBusThreadManager::Get()->client_bundle_->cros_disks_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetCryptohomeClient(
-    scoped_ptr<CryptohomeClient> client) {
+    std::unique_ptr<CryptohomeClient> client) {
   DBusThreadManager::Get()->client_bundle_->cryptohome_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetDebugDaemonClient(
-    scoped_ptr<DebugDaemonClient> client) {
+    std::unique_ptr<DebugDaemonClient> client) {
   DBusThreadManager::Get()->client_bundle_->debug_daemon_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetEasyUnlockClient(
-    scoped_ptr<EasyUnlockClient> client) {
+    std::unique_ptr<EasyUnlockClient> client) {
   DBusThreadManager::Get()->client_bundle_->easy_unlock_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetLorgnetteManagerClient(
-    scoped_ptr<LorgnetteManagerClient> client) {
+    std::unique_ptr<LorgnetteManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->lorgnette_manager_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetShillDeviceClient(
-    scoped_ptr<ShillDeviceClient> client) {
+    std::unique_ptr<ShillDeviceClient> client) {
   DBusThreadManager::Get()->client_bundle_->shill_device_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetShillIPConfigClient(
-    scoped_ptr<ShillIPConfigClient> client) {
+    std::unique_ptr<ShillIPConfigClient> client) {
   DBusThreadManager::Get()->client_bundle_->shill_ipconfig_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetShillManagerClient(
-    scoped_ptr<ShillManagerClient> client) {
+    std::unique_ptr<ShillManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->shill_manager_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetShillServiceClient(
-    scoped_ptr<ShillServiceClient> client) {
+    std::unique_ptr<ShillServiceClient> client) {
   DBusThreadManager::Get()->client_bundle_->shill_service_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetShillProfileClient(
-    scoped_ptr<ShillProfileClient> client) {
+    std::unique_ptr<ShillProfileClient> client) {
   DBusThreadManager::Get()->client_bundle_->shill_profile_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetShillThirdPartyVpnDriverClient(
-    scoped_ptr<ShillThirdPartyVpnDriverClient> client) {
+    std::unique_ptr<ShillThirdPartyVpnDriverClient> client) {
   DBusThreadManager::Get()
       ->client_bundle_->shill_third_party_vpn_driver_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetGsmSMSClient(
-    scoped_ptr<GsmSMSClient> client) {
+    std::unique_ptr<GsmSMSClient> client) {
   DBusThreadManager::Get()->client_bundle_->gsm_sms_client_ = std::move(client);
 }
 
 void DBusThreadManagerSetter::SetImageBurnerClient(
-    scoped_ptr<ImageBurnerClient> client) {
+    std::unique_ptr<ImageBurnerClient> client) {
   DBusThreadManager::Get()->client_bundle_->image_burner_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetIntrospectableClient(
-    scoped_ptr<IntrospectableClient> client) {
+    std::unique_ptr<IntrospectableClient> client) {
   DBusThreadManager::Get()->client_bundle_->introspectable_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetModemMessagingClient(
-    scoped_ptr<ModemMessagingClient> client) {
+    std::unique_ptr<ModemMessagingClient> client) {
   DBusThreadManager::Get()->client_bundle_->modem_messaging_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetNfcAdapterClient(
-    scoped_ptr<NfcAdapterClient> client) {
+    std::unique_ptr<NfcAdapterClient> client) {
   DBusThreadManager::Get()->client_bundle_->nfc_adapter_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetNfcDeviceClient(
-    scoped_ptr<NfcDeviceClient> client) {
+    std::unique_ptr<NfcDeviceClient> client) {
   DBusThreadManager::Get()->client_bundle_->nfc_device_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetNfcManagerClient(
-    scoped_ptr<NfcManagerClient> client) {
+    std::unique_ptr<NfcManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->nfc_manager_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetNfcRecordClient(
-    scoped_ptr<NfcRecordClient> client) {
+    std::unique_ptr<NfcRecordClient> client) {
   DBusThreadManager::Get()->client_bundle_->nfc_record_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetNfcTagClient(
-    scoped_ptr<NfcTagClient> client) {
+    std::unique_ptr<NfcTagClient> client) {
   DBusThreadManager::Get()->client_bundle_->nfc_tag_client_ = std::move(client);
 }
 
 void DBusThreadManagerSetter::SetPeerDaemonManagerClient(
-    scoped_ptr<PeerDaemonManagerClient> client) {
+    std::unique_ptr<PeerDaemonManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->peer_daemon_manager_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetPermissionBrokerClient(
-    scoped_ptr<PermissionBrokerClient> client) {
+    std::unique_ptr<PermissionBrokerClient> client) {
   DBusThreadManager::Get()->client_bundle_->permission_broker_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetPrivetDaemonManagerClient(
-    scoped_ptr<PrivetDaemonManagerClient> client) {
+    std::unique_ptr<PrivetDaemonManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->privet_daemon_manager_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetPowerManagerClient(
-    scoped_ptr<PowerManagerClient> client) {
+    std::unique_ptr<PowerManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->power_manager_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetSessionManagerClient(
-    scoped_ptr<SessionManagerClient> client) {
+    std::unique_ptr<SessionManagerClient> client) {
   DBusThreadManager::Get()->client_bundle_->session_manager_client_ =
       std::move(client);
 }
 
-void DBusThreadManagerSetter::SetSMSClient(scoped_ptr<SMSClient> client) {
+void DBusThreadManagerSetter::SetSMSClient(std::unique_ptr<SMSClient> client) {
   DBusThreadManager::Get()->client_bundle_->sms_client_ = std::move(client);
 }
 
 void DBusThreadManagerSetter::SetSystemClockClient(
-    scoped_ptr<SystemClockClient> client) {
+    std::unique_ptr<SystemClockClient> client) {
   DBusThreadManager::Get()->client_bundle_->system_clock_client_ =
       std::move(client);
 }
 
 void DBusThreadManagerSetter::SetUpdateEngineClient(
-    scoped_ptr<UpdateEngineClient> client) {
+    std::unique_ptr<UpdateEngineClient> client) {
   DBusThreadManager::Get()->client_bundle_->update_engine_client_ =
       std::move(client);
 }
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
index 4566083..ad130723 100644
--- a/chromeos/dbus/dbus_thread_manager.h
+++ b/chromeos/dbus/dbus_thread_manager.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client_bundle.h"
 
@@ -90,7 +90,7 @@
   // Returns a DBusThreadManagerSetter instance that allows tests to
   // replace individual D-Bus clients with their own implementations.
   // Also initializes the main DBusThreadManager for testing if necessary.
-  static scoped_ptr<DBusThreadManagerSetter> GetSetterForTesting();
+  static std::unique_ptr<DBusThreadManagerSetter> GetSetterForTesting();
 
   // Returns true if DBusThreadManager has been initialized. Call this to
   // avoid initializing + shutting down DBusThreadManager more than once.
@@ -148,7 +148,7 @@
 
   // Creates a new DBusThreadManager using the DBusClients set in
   // |client_bundle|.
-  explicit DBusThreadManager(scoped_ptr<DBusClientBundle> client_bundle);
+  explicit DBusThreadManager(std::unique_ptr<DBusClientBundle> client_bundle);
   ~DBusThreadManager();
 
   // Creates a global instance of DBusThreadManager with the real
@@ -174,9 +174,9 @@
   // performs additional setup.
   void InitializeClients();
 
-  scoped_ptr<base::Thread> dbus_thread_;
+  std::unique_ptr<base::Thread> dbus_thread_;
   scoped_refptr<dbus::Bus> system_bus_;
-  scoped_ptr<DBusClientBundle> client_bundle_;
+  std::unique_ptr<DBusClientBundle> client_bundle_;
 
   DISALLOW_COPY_AND_ASSIGN(DBusThreadManager);
 };
@@ -185,39 +185,42 @@
  public:
   ~DBusThreadManagerSetter();
 
-  void SetAmplifierClient(scoped_ptr<AmplifierClient> client);
-  void SetAudioDspClient(scoped_ptr<AudioDspClient> client);
-  void SetCrasAudioClient(scoped_ptr<CrasAudioClient> client);
-  void SetCrosDisksClient(scoped_ptr<CrosDisksClient> client);
-  void SetCryptohomeClient(scoped_ptr<CryptohomeClient> client);
-  void SetDebugDaemonClient(scoped_ptr<DebugDaemonClient> client);
-  void SetEasyUnlockClient(scoped_ptr<EasyUnlockClient> client);
-  void SetLorgnetteManagerClient(scoped_ptr<LorgnetteManagerClient> client);
-  void SetShillDeviceClient(scoped_ptr<ShillDeviceClient> client);
-  void SetShillIPConfigClient(scoped_ptr<ShillIPConfigClient> client);
-  void SetShillManagerClient(scoped_ptr<ShillManagerClient> client);
-  void SetShillServiceClient(scoped_ptr<ShillServiceClient> client);
-  void SetShillProfileClient(scoped_ptr<ShillProfileClient> client);
+  void SetAmplifierClient(std::unique_ptr<AmplifierClient> client);
+  void SetAudioDspClient(std::unique_ptr<AudioDspClient> client);
+  void SetCrasAudioClient(std::unique_ptr<CrasAudioClient> client);
+  void SetCrosDisksClient(std::unique_ptr<CrosDisksClient> client);
+  void SetCryptohomeClient(std::unique_ptr<CryptohomeClient> client);
+  void SetDebugDaemonClient(std::unique_ptr<DebugDaemonClient> client);
+  void SetEasyUnlockClient(std::unique_ptr<EasyUnlockClient> client);
+  void SetLorgnetteManagerClient(
+      std::unique_ptr<LorgnetteManagerClient> client);
+  void SetShillDeviceClient(std::unique_ptr<ShillDeviceClient> client);
+  void SetShillIPConfigClient(std::unique_ptr<ShillIPConfigClient> client);
+  void SetShillManagerClient(std::unique_ptr<ShillManagerClient> client);
+  void SetShillServiceClient(std::unique_ptr<ShillServiceClient> client);
+  void SetShillProfileClient(std::unique_ptr<ShillProfileClient> client);
   void SetShillThirdPartyVpnDriverClient(
-      scoped_ptr<ShillThirdPartyVpnDriverClient> client);
-  void SetGsmSMSClient(scoped_ptr<GsmSMSClient> client);
-  void SetImageBurnerClient(scoped_ptr<ImageBurnerClient> client);
-  void SetIntrospectableClient(scoped_ptr<IntrospectableClient> client);
-  void SetModemMessagingClient(scoped_ptr<ModemMessagingClient> client);
-  void SetNfcAdapterClient(scoped_ptr<NfcAdapterClient> client);
-  void SetNfcDeviceClient(scoped_ptr<NfcDeviceClient> client);
-  void SetNfcManagerClient(scoped_ptr<NfcManagerClient> client);
-  void SetNfcRecordClient(scoped_ptr<NfcRecordClient> client);
-  void SetNfcTagClient(scoped_ptr<NfcTagClient> client);
-  void SetPeerDaemonManagerClient(scoped_ptr<PeerDaemonManagerClient> client);
-  void SetPermissionBrokerClient(scoped_ptr<PermissionBrokerClient> client);
+      std::unique_ptr<ShillThirdPartyVpnDriverClient> client);
+  void SetGsmSMSClient(std::unique_ptr<GsmSMSClient> client);
+  void SetImageBurnerClient(std::unique_ptr<ImageBurnerClient> client);
+  void SetIntrospectableClient(std::unique_ptr<IntrospectableClient> client);
+  void SetModemMessagingClient(std::unique_ptr<ModemMessagingClient> client);
+  void SetNfcAdapterClient(std::unique_ptr<NfcAdapterClient> client);
+  void SetNfcDeviceClient(std::unique_ptr<NfcDeviceClient> client);
+  void SetNfcManagerClient(std::unique_ptr<NfcManagerClient> client);
+  void SetNfcRecordClient(std::unique_ptr<NfcRecordClient> client);
+  void SetNfcTagClient(std::unique_ptr<NfcTagClient> client);
+  void SetPeerDaemonManagerClient(
+      std::unique_ptr<PeerDaemonManagerClient> client);
+  void SetPermissionBrokerClient(
+      std::unique_ptr<PermissionBrokerClient> client);
   void SetPrivetDaemonManagerClient(
-      scoped_ptr<PrivetDaemonManagerClient> client);
-  void SetPowerManagerClient(scoped_ptr<PowerManagerClient> client);
-  void SetSessionManagerClient(scoped_ptr<SessionManagerClient> client);
-  void SetSMSClient(scoped_ptr<SMSClient> client);
-  void SetSystemClockClient(scoped_ptr<SystemClockClient> client);
-  void SetUpdateEngineClient(scoped_ptr<UpdateEngineClient> client);
+      std::unique_ptr<PrivetDaemonManagerClient> client);
+  void SetPowerManagerClient(std::unique_ptr<PowerManagerClient> client);
+  void SetSessionManagerClient(std::unique_ptr<SessionManagerClient> client);
+  void SetSMSClient(std::unique_ptr<SMSClient> client);
+  void SetSystemClockClient(std::unique_ptr<SystemClockClient> client);
+  void SetUpdateEngineClient(std::unique_ptr<UpdateEngineClient> client);
 
  private:
   friend class DBusThreadManager;
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 4af9848..f62bd74 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -559,7 +559,7 @@
   }
 
   // Creates dbus::FileDescriptor from base::File.
-  static scoped_ptr<dbus::FileDescriptor>
+  static std::unique_ptr<dbus::FileDescriptor>
   CreateFileDescriptorToStopSystemTracing(base::File pipe_write_end) {
     if (!pipe_write_end.IsValid()) {
       LOG(ERROR) << "Cannot create pipe reader";
@@ -568,7 +568,8 @@
                                 base::File::FLAG_OPEN | base::File::FLAG_WRITE);
       // TODO(sleffler) if this fails AppendFileDescriptor will abort
     }
-    scoped_ptr<dbus::FileDescriptor> file_descriptor(new dbus::FileDescriptor);
+    std::unique_ptr<dbus::FileDescriptor> file_descriptor(
+        new dbus::FileDescriptor);
     file_descriptor->PutValue(pipe_write_end.TakePlatformFile());
     file_descriptor->CheckValidity();
     return file_descriptor;
@@ -577,7 +578,7 @@
   // Called when a CheckValidity response is received.
   void OnCreateFileDescriptorRequestStopSystem(
       const StopAgentTracingCallback& callback,
-      scoped_ptr<dbus::FileDescriptor> file_descriptor) {
+      std::unique_ptr<dbus::FileDescriptor> file_descriptor) {
     DCHECK(file_descriptor);
 
     // Issue the dbus request to stop system tracing
@@ -626,7 +627,7 @@
   }
 
   dbus::ObjectProxy* debugdaemon_proxy_;
-  scoped_ptr<PipeReaderForString> pipe_reader_;
+  std::unique_ptr<PipeReaderForString> pipe_reader_;
   StopAgentTracingCallback callback_;
   scoped_refptr<base::TaskRunner> stop_agent_tracing_task_runner_;
   base::WeakPtrFactory<DebugDaemonClientImpl> weak_ptr_factory_;
diff --git a/chromeos/dbus/fake_easy_unlock_client.cc b/chromeos/dbus/fake_easy_unlock_client.cc
index 533b51a..1264b9f 100644
--- a/chromeos/dbus/fake_easy_unlock_client.cc
+++ b/chromeos/dbus/fake_easy_unlock_client.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/json/json_string_value_serializer.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/stringprintf.h"
 #include "chromeos/dbus/fake_easy_unlock_client.h"
 
+#include <memory>
+
+#include "base/json/json_string_value_serializer.h"
+#include "base/strings/stringprintf.h"
+
 namespace {
 
 // Keys generated using |GenerateEcP256KeyPair| are in the following format:
@@ -22,7 +24,8 @@
 int ExtractKeyPairIndexFromKey(const std::string& key,
                                const std::string& key_type) {
   JSONStringValueDeserializer deserializer(key);
-  scoped_ptr<base::Value> json_value = deserializer.Deserialize(NULL, NULL);
+  std::unique_ptr<base::Value> json_value =
+      deserializer.Deserialize(NULL, NULL);
   if (!json_value)
     return -1;
 
diff --git a/chromeos/dbus/fake_nfc_adapter_client.cc b/chromeos/dbus/fake_nfc_adapter_client.cc
index 58f75a7..f0ef75d8 100644
--- a/chromeos/dbus/fake_nfc_adapter_client.cc
+++ b/chromeos/dbus/fake_nfc_adapter_client.cc
@@ -64,7 +64,7 @@
 
   // Obtain the cached "set value" and send a property changed signal only if
   // its value is different from the current value of the property.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   property->AppendSetValueToWriter(&writer);
   dbus::MessageReader reader(response.get());
diff --git a/chromeos/dbus/fake_nfc_adapter_client.h b/chromeos/dbus/fake_nfc_adapter_client.h
index 460c945..c72956b 100644
--- a/chromeos/dbus/fake_nfc_adapter_client.h
+++ b/chromeos/dbus/fake_nfc_adapter_client.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_DBUS_FAKE_NFC_ADAPTER_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_NFC_ADAPTER_CLIENT_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/nfc_adapter_client.h"
@@ -94,8 +94,8 @@
   base::ObserverList<Observer> observers_;
 
   // Fake properties that are returned for the emulated adapters.
-  scoped_ptr<Properties> properties_;
-  scoped_ptr<Properties> second_properties_;
+  std::unique_ptr<Properties> properties_;
+  std::unique_ptr<Properties> second_properties_;
 
   // Whether the adapter and second adapter are present or not.
   bool present_;
diff --git a/chromeos/dbus/fake_nfc_device_client.h b/chromeos/dbus/fake_nfc_device_client.h
index ccb2cef..6638ce5 100644
--- a/chromeos/dbus/fake_nfc_device_client.h
+++ b/chromeos/dbus/fake_nfc_device_client.h
@@ -5,8 +5,9 @@
 #ifndef CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/nfc_client_helpers.h"
@@ -110,7 +111,7 @@
   base::ObserverList<Observer> observers_;
 
   // Fake properties that are returned for the emulated device.
-  scoped_ptr<Properties> properties_;
+  std::unique_ptr<Properties> properties_;
 
   // If true, a pairing simulation was started using BeginPairing() and no call
   // to EndPairing() has been made.
diff --git a/chromeos/dbus/fake_nfc_manager_client.h b/chromeos/dbus/fake_nfc_manager_client.h
index 48ed90d..32e3e00 100644
--- a/chromeos/dbus/fake_nfc_manager_client.h
+++ b/chromeos/dbus/fake_nfc_manager_client.h
@@ -60,7 +60,7 @@
 
   // Fake properties object. This gets updated whenever AddAdapter or
   // RemoveAdapter gets called.
-  scoped_ptr<Properties> properties_;
+  std::unique_ptr<Properties> properties_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeNfcManagerClient);
 };
diff --git a/chromeos/dbus/fake_nfc_record_client.h b/chromeos/dbus/fake_nfc_record_client.h
index 5bdd635..c82681f6 100644
--- a/chromeos/dbus/fake_nfc_record_client.h
+++ b/chromeos/dbus/fake_nfc_record_client.h
@@ -5,8 +5,9 @@
 #ifndef CHROMEOS_DBUS_FAKE_NFC_RECORD_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_NFC_RECORD_CLIENT_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/values.h"
 #include "chromeos/chromeos_export.h"
@@ -79,10 +80,10 @@
   base::ObserverList<Observer> observers_;
 
   // Fake properties that are returned for the fake records.
-  scoped_ptr<Properties> device_smart_poster_record_properties_;
-  scoped_ptr<Properties> device_text_record_properties_;
-  scoped_ptr<Properties> device_uri_record_properties_;
-  scoped_ptr<Properties> tag_record_properties_;
+  std::unique_ptr<Properties> device_smart_poster_record_properties_;
+  std::unique_ptr<Properties> device_text_record_properties_;
+  std::unique_ptr<Properties> device_uri_record_properties_;
+  std::unique_ptr<Properties> tag_record_properties_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeNfcRecordClient);
 };
diff --git a/chromeos/dbus/fake_nfc_tag_client.h b/chromeos/dbus/fake_nfc_tag_client.h
index 40d79cd0..14f13f0 100644
--- a/chromeos/dbus/fake_nfc_tag_client.h
+++ b/chromeos/dbus/fake_nfc_tag_client.h
@@ -100,7 +100,7 @@
   base::ObserverList<Observer> observers_;
 
   // Fake properties that are returned for the emulated tag.
-  scoped_ptr<Properties> properties_;
+  std::unique_ptr<Properties> properties_;
 
   // If true, a pairing simulation was begun using BeginPairing() and no call
   // to EndPairing() has been made.
diff --git a/chromeos/dbus/fake_shill_manager_client.cc b/chromeos/dbus/fake_shill_manager_client.cc
index 9fe00b1..2d70f3ed 100644
--- a/chromeos/dbus/fake_shill_manager_client.cc
+++ b/chromeos/dbus/fake_shill_manager_client.cc
@@ -292,7 +292,7 @@
     existing_properties = service_client->GetServiceProperties(service_path);
   }
 
-  scoped_ptr<base::DictionaryValue> merged_properties(
+  std::unique_ptr<base::DictionaryValue> merged_properties(
       existing_properties->DeepCopy());
   merged_properties->MergeDictionary(&properties);
 
@@ -526,7 +526,8 @@
       GetListProperty(shill::kServiceCompleteListProperty);
   if (complete_list->empty())
     return;
-  scoped_ptr<base::ListValue> prev_complete_list(complete_list->DeepCopy());
+  std::unique_ptr<base::ListValue> prev_complete_list(
+      complete_list->DeepCopy());
 
   std::vector<std::string> active_services;
   std::vector<std::string> inactive_services;
@@ -928,7 +929,7 @@
 
 void FakeShillManagerClient::PassStubProperties(
     const DictionaryValueCallback& callback) const {
-  scoped_ptr<base::DictionaryValue> stub_properties(
+  std::unique_ptr<base::DictionaryValue> stub_properties(
       stub_properties_.DeepCopy());
   stub_properties->SetWithoutPathExpansion(
       shill::kServiceCompleteListProperty,
@@ -962,7 +963,7 @@
     return;
   }
   if (property == shill::kServiceCompleteListProperty) {
-    scoped_ptr<base::ListValue> services(GetEnabledServiceList(property));
+    std::unique_ptr<base::ListValue> services(GetEnabledServiceList(property));
     FOR_EACH_OBSERVER(ShillPropertyChangedObserver,
                       observer_list_,
                       OnPropertyChanged(property, *(services.get())));
diff --git a/chromeos/dbus/fake_shill_profile_client.cc b/chromeos/dbus/fake_shill_profile_client.cc
index 69f52c0..e43281a 100644
--- a/chromeos/dbus/fake_shill_profile_client.cc
+++ b/chromeos/dbus/fake_shill_profile_client.cc
@@ -65,7 +65,8 @@
   if (!profile)
     return;
 
-  scoped_ptr<base::DictionaryValue> properties(profile->properties.DeepCopy());
+  std::unique_ptr<base::DictionaryValue> properties(
+      profile->properties.DeepCopy());
   base::ListValue* entry_paths = new base::ListValue;
   properties->SetWithoutPathExpansion(shill::kEntriesProperty, entry_paths);
   for (base::DictionaryValue::Iterator it(profile->entries); !it.IsAtEnd();
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc
index f0cf5ad2..ca4f7557 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -81,7 +81,7 @@
     const dbus::ObjectPath& service_path,
     const DictionaryValueCallback& callback) {
   base::DictionaryValue* nested_dict = NULL;
-  scoped_ptr<base::DictionaryValue> result_properties;
+  std::unique_ptr<base::DictionaryValue> result_properties;
   DBusMethodCallStatus call_status;
   stub_services_.GetDictionaryWithoutPathExpansion(service_path.value(),
                                                    &nested_dict);
@@ -159,7 +159,7 @@
     error_callback.Run("Error.InvalidService", "Invalid Service");
     return;
   }
-  scoped_ptr<base::ListValue> results(new base::ListValue);
+  std::unique_ptr<base::ListValue> results(new base::ListValue);
   for (std::vector<std::string>::const_iterator iter = names.begin();
       iter != names.end(); ++iter) {
     dict->RemoveWithoutPathExpansion(*iter, NULL);
@@ -267,7 +267,7 @@
     const DictionaryValueCallback& callback) {
   // Provide a dictionary with a single { profile_path, service_path } entry
   // if the Profile property is set, or an empty dictionary.
-  scoped_ptr<base::DictionaryValue> result_properties(
+  std::unique_ptr<base::DictionaryValue> result_properties(
       new base::DictionaryValue);
   base::DictionaryValue* service_properties =
       GetModifiableServiceProperties(service_path.value(), false);
@@ -426,7 +426,7 @@
     const base::DictionaryValue* new_dict = NULL;
     value.GetAsDictionary(&new_dict);
     CHECK(new_dict);
-    scoped_ptr<base::Value> cur_value;
+    std::unique_ptr<base::Value> cur_value;
     base::DictionaryValue* cur_dict;
     if (dict->RemoveWithoutPathExpansion(property, &cur_value) &&
         cur_value->GetAsDictionary(&cur_dict)) {
diff --git a/chromeos/dbus/gsm_sms_client.cc b/chromeos/dbus/gsm_sms_client.cc
index c694bb0..a870903 100644
--- a/chromeos/dbus/gsm_sms_client.cc
+++ b/chromeos/dbus/gsm_sms_client.cc
@@ -6,12 +6,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/stringprintf.h"
@@ -128,7 +128,7 @@
     if (!response)
       return;
     dbus::MessageReader reader(response);
-    scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+    std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
     base::DictionaryValue* dictionary_value = NULL;
     if (!value.get() || !value->GetAsDictionary(&dictionary_value)) {
       LOG(WARNING) << "Invalid response: " << response->ToString();
@@ -142,7 +142,7 @@
     if (!response)
       return;
     dbus::MessageReader reader(response);
-    scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+    std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
     base::ListValue* list_value = NULL;
     if (!value.get() || !value->GetAsList(&list_value)) {
       LOG(WARNING) << "Invalid response: " << response->ToString();
@@ -211,7 +211,7 @@
 
  private:
   using ProxyMap =
-      std::map<std::pair<std::string, std::string>, scoped_ptr<SMSProxy>>;
+      std::map<std::pair<std::string, std::string>, std::unique_ptr<SMSProxy>>;
 
   // Returns a SMSProxy for the given service name and object path.
   SMSProxy* GetProxy(const std::string& service_name,
@@ -222,7 +222,8 @@
       return it->second.get();
 
     // There is no proxy for the service_name and object_path, create it.
-    scoped_ptr<SMSProxy> proxy(new SMSProxy(bus_, service_name, object_path));
+    std::unique_ptr<SMSProxy> proxy(
+        new SMSProxy(bus_, service_name, object_path));
     SMSProxy* proxy_ptr = proxy.get();
     proxies_[key] = std::move(proxy);
     return proxy_ptr;
diff --git a/chromeos/dbus/gsm_sms_client_unittest.cc b/chromeos/dbus/gsm_sms_client_unittest.cc
index 66ec8d20..0f8baec 100644
--- a/chromeos/dbus/gsm_sms_client_unittest.cc
+++ b/chromeos/dbus/gsm_sms_client_unittest.cc
@@ -164,7 +164,7 @@
 
  protected:
   // The client to be tested.
-  scoped_ptr<GsmSMSClient> client_;
+  std::unique_ptr<GsmSMSClient> client_;
   // A message loop to emulate asynchronous behavior.
   base::MessageLoop message_loop_;
   // The mock bus.
@@ -232,7 +232,7 @@
   MockDeleteCallback callback;
   EXPECT_CALL(callback, Run()).Times(1);
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   response_ = response.get();
   // Call Delete.
   client_->Delete(kServiceName, dbus::ObjectPath(kObjectPath), kIndex,
@@ -253,7 +253,7 @@
   EXPECT_CALL(callback, Run(_))
       .WillOnce(Invoke(this, &GsmSMSClientTest::CheckResult));
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -291,7 +291,7 @@
   EXPECT_CALL(callback, Run(_))
       .WillOnce(Invoke(this, &GsmSMSClientTest::CheckResult));
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("a{sv}", &array_writer);
diff --git a/chromeos/dbus/lorgnette_manager_client.cc b/chromeos/dbus/lorgnette_manager_client.cc
index 55a1c347..c7feacd 100644
--- a/chromeos/dbus/lorgnette_manager_client.cc
+++ b/chromeos/dbus/lorgnette_manager_client.cc
@@ -4,13 +4,13 @@
 
 #include "chromeos/dbus/lorgnette_manager_client.h"
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/task_runner_util.h"
 #include "base/threading/worker_pool.h"
 #include "chromeos/dbus/pipe_reader.h"
@@ -129,7 +129,7 @@
       scanned_image_data_string_.clear();
     }
 
-    scoped_ptr<chromeos::PipeReaderForString> pipe_reader_;
+    std::unique_ptr<chromeos::PipeReaderForString> pipe_reader_;
     std::string scanned_image_data_string_;
 
     DISALLOW_COPY_AND_ASSIGN(ScanToStringCompletion);
diff --git a/chromeos/dbus/modem_messaging_client.cc b/chromeos/dbus/modem_messaging_client.cc
index 4f5277a..57ffe1f 100644
--- a/chromeos/dbus/modem_messaging_client.cc
+++ b/chromeos/dbus/modem_messaging_client.cc
@@ -4,11 +4,11 @@
 #include "chromeos/dbus/modem_messaging_client.h"
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/values.h"
@@ -165,7 +165,7 @@
 
  private:
   using ProxyMap = std::map<std::pair<std::string, std::string>,
-                            scoped_ptr<ModemMessagingProxy>>;
+                            std::unique_ptr<ModemMessagingProxy>>;
 
   // Returns a SMSProxy for the given service name and object path.
   ModemMessagingProxy* GetProxy(const std::string& service_name,
@@ -176,7 +176,7 @@
       return it->second.get();
 
     // There is no proxy for the service_name and object_path, create it.
-    scoped_ptr<ModemMessagingProxy> proxy(
+    std::unique_ptr<ModemMessagingProxy> proxy(
         new ModemMessagingProxy(bus_, service_name, object_path));
     ModemMessagingProxy* proxy_ptr = proxy.get();
     proxies_[key] = std::move(proxy);
diff --git a/chromeos/dbus/modem_messaging_client_unittest.cc b/chromeos/dbus/modem_messaging_client_unittest.cc
index a37284a..1704a19 100644
--- a/chromeos/dbus/modem_messaging_client_unittest.cc
+++ b/chromeos/dbus/modem_messaging_client_unittest.cc
@@ -131,7 +131,7 @@
 
  protected:
   // The client to be tested.
-  scoped_ptr<ModemMessagingClient> client_;
+  std::unique_ptr<ModemMessagingClient> client_;
   // A message loop to emulate asynchronous behavior.
   base::MessageLoop message_loop_;
   // The mock bus.
@@ -199,7 +199,7 @@
   MockDeleteCallback callback;
   EXPECT_CALL(callback, Run()).Times(1);
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   response_ = response.get();
   // Call Delete.
   client_->Delete(kServiceName, dbus::ObjectPath(kObjectPath), kSmsPath,
@@ -218,7 +218,7 @@
   EXPECT_CALL(callback, Run(_))
       .WillOnce(Invoke(this, &ModemMessagingClientTest::CheckResult));
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::ObjectPath path1("/SMS/1");
   dbus::ObjectPath path2("/SMS/2");
   std::vector<dbus::ObjectPath> expected_result;
diff --git a/chromeos/dbus/nfc_adapter_client.cc b/chromeos/dbus/nfc_adapter_client.cc
index 6535aa0e..fe0b0d9 100644
--- a/chromeos/dbus/nfc_adapter_client.cc
+++ b/chromeos/dbus/nfc_adapter_client.cc
@@ -5,11 +5,11 @@
 #include "chromeos/dbus/nfc_adapter_client.h"
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/strings/stringprintf.h"
 #include "chromeos/dbus/nfc_manager_client.h"
@@ -196,7 +196,7 @@
 
   // Mapping from object paths to object proxies and properties structures that
   // were already created by us.
-  scoped_ptr<nfc_client_helpers::DBusObjectMap> object_map_;
+  std::unique_ptr<nfc_client_helpers::DBusObjectMap> object_map_;
 
   // The manager client that we listen to events notifications from.
   NfcManagerClient* manager_client_;
diff --git a/chromeos/dbus/nfc_client_unittest.cc b/chromeos/dbus/nfc_client_unittest.cc
index a91a766..8c9cbf9e 100644
--- a/chromeos/dbus/nfc_client_unittest.cc
+++ b/chromeos/dbus/nfc_client_unittest.cc
@@ -354,11 +354,11 @@
   // Response returned by mock methods.
   dbus::Response* response_;
   // The D-Bus client objects under test.
-  scoped_ptr<NfcManagerClient> manager_client_;
-  scoped_ptr<NfcAdapterClient> adapter_client_;
-  scoped_ptr<NfcDeviceClient> device_client_;
-  scoped_ptr<NfcTagClient> tag_client_;
-  scoped_ptr<NfcRecordClient> record_client_;
+  std::unique_ptr<NfcManagerClient> manager_client_;
+  std::unique_ptr<NfcAdapterClient> adapter_client_;
+  std::unique_ptr<NfcDeviceClient> device_client_;
+  std::unique_ptr<NfcTagClient> tag_client_;
+  std::unique_ptr<NfcRecordClient> record_client_;
   // Mock observers.
   MockNfcManagerObserver mock_manager_observer_;
   MockNfcAdapterObserver mock_adapter_observer_;
diff --git a/chromeos/dbus/nfc_manager_client.cc b/chromeos/dbus/nfc_manager_client.cc
index 8029fd3b..4536b53f2 100644
--- a/chromeos/dbus/nfc_manager_client.cc
+++ b/chromeos/dbus/nfc_manager_client.cc
@@ -4,8 +4,9 @@
 
 #include "chromeos/dbus/nfc_manager_client.h"
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
@@ -142,7 +143,7 @@
   dbus::ObjectProxy* object_proxy_;
 
   // Properties for neard Manager interface.
-  scoped_ptr<Properties> properties_;
+  std::unique_ptr<Properties> properties_;
 
   // List of observers interested in event notifications.
   base::ObserverList<NfcManagerClient::Observer> observers_;
diff --git a/chromeos/dbus/pipe_reader.h b/chromeos/dbus/pipe_reader.h
index 3c98457..4dffdc8 100644
--- a/chromeos/dbus/pipe_reader.h
+++ b/chromeos/dbus/pipe_reader.h
@@ -5,13 +5,13 @@
 #ifndef CHROMEOS_DBUS_PIPE_READER_H_
 #define CHROMEOS_DBUS_PIPE_READER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/files/file.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 
 namespace base {
@@ -57,7 +57,7 @@
   virtual void AcceptData(const char *data, int length) = 0;
 
  private:
-  scoped_ptr<net::FileStream> data_stream_;
+  std::unique_ptr<net::FileStream> data_stream_;
   scoped_refptr<net::IOBufferWithSize> io_buffer_;
   scoped_refptr<base::TaskRunner> task_runner_;
   IOCompleteCallback callback_;
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index 88b92751..0bdfcbf 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -7,13 +7,13 @@
 #include <stdint.h>
 
 #include <algorithm>
+#include <memory>
 
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/format_macros.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/observer_list.h"
 #include "base/power_monitor/power_monitor_device_source.h"
diff --git a/chromeos/dbus/power_policy_controller_unittest.cc b/chromeos/dbus/power_policy_controller_unittest.cc
index 7c6de2e..1e291d8 100644
--- a/chromeos/dbus/power_policy_controller_unittest.cc
+++ b/chromeos/dbus/power_policy_controller_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "chromeos/dbus/power_policy_controller.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/message_loop/message_loop.h"
 #include "chromeos/dbus/fake_power_manager_client.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -30,7 +31,7 @@
   }
 
  protected:
-  scoped_ptr<FakePowerManagerClient> fake_power_client_;
+  std::unique_ptr<FakePowerManagerClient> fake_power_client_;
   PowerPolicyController* policy_controller_;
   base::MessageLoop message_loop_;
 };
diff --git a/chromeos/dbus/privet_daemon_manager_client_unittest.cc b/chromeos/dbus/privet_daemon_manager_client_unittest.cc
index 68c48ea..78b6acb 100644
--- a/chromeos/dbus/privet_daemon_manager_client_unittest.cc
+++ b/chromeos/dbus/privet_daemon_manager_client_unittest.cc
@@ -7,7 +7,8 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/strings/string_number_conversions.h"
 #include "dbus/message.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -15,7 +16,7 @@
 namespace chromeos {
 
 TEST(PrivetDaemonManagerClientTest, ReadPairingInfo) {
-  scoped_ptr<dbus::Response> message(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> message(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(message.get());
   dbus::MessageWriter variant_writer(nullptr);
   dbus::MessageWriter variant_array_writer(nullptr);
diff --git a/chromeos/dbus/services/console_service_provider.cc b/chromeos/dbus/services/console_service_provider.cc
index 6bd7f119..9a5fecd4 100644
--- a/chromeos/dbus/services/console_service_provider.cc
+++ b/chromeos/dbus/services/console_service_provider.cc
@@ -15,7 +15,7 @@
 
 void OnDisplayOwnershipChanged(
     const dbus::ExportedObject::ResponseSender& response_sender,
-    scoped_ptr<dbus::Response> response,
+    std::unique_ptr<dbus::Response> response,
     bool status) {
   dbus::MessageWriter writer(response.get());
   writer.AppendBool(status);
@@ -24,7 +24,8 @@
 
 }  // namespace
 
-ConsoleServiceProvider::ConsoleServiceProvider(scoped_ptr<Delegate> delegate)
+ConsoleServiceProvider::ConsoleServiceProvider(
+    std::unique_ptr<Delegate> delegate)
     : delegate_(std::move(delegate)), weak_ptr_factory_(this) {}
 
 ConsoleServiceProvider::~ConsoleServiceProvider() {
diff --git a/chromeos/dbus/services/console_service_provider.h b/chromeos/dbus/services/console_service_provider.h
index 69acd7c..7a391ce7 100644
--- a/chromeos/dbus/services/console_service_provider.h
+++ b/chromeos/dbus/services/console_service_provider.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_DBUS_SERVICES_CONSOLE_SERVICE_PROVIDER_H_
 #define CHROMEOS_DBUS_SERVICES_CONSOLE_SERVICE_PROVIDER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/services/cros_dbus_service.h"
@@ -37,7 +37,7 @@
         const UpdateOwnershipCallback& callback) = 0;
   };
 
-  explicit ConsoleServiceProvider(scoped_ptr<Delegate> delegate);
+  explicit ConsoleServiceProvider(std::unique_ptr<Delegate> delegate);
   ~ConsoleServiceProvider() override;
 
   // CrosDBusService::ServiceProviderInterface overrides:
@@ -63,7 +63,7 @@
                   const std::string& method_name,
                   bool success);
 
-  scoped_ptr<Delegate> delegate_;
+  std::unique_ptr<Delegate> delegate_;
   base::WeakPtrFactory<ConsoleServiceProvider> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(ConsoleServiceProvider);
diff --git a/chromeos/dbus/services/display_power_service_provider.cc b/chromeos/dbus/services/display_power_service_provider.cc
index 73dbd67..d0f63ba 100644
--- a/chromeos/dbus/services/display_power_service_provider.cc
+++ b/chromeos/dbus/services/display_power_service_provider.cc
@@ -23,7 +23,7 @@
 }  // namespace
 
 DisplayPowerServiceProvider::DisplayPowerServiceProvider(
-    scoped_ptr<Delegate> delegate)
+    std::unique_ptr<Delegate> delegate)
     : delegate_(std::move(delegate)), weak_ptr_factory_(this) {}
 
 DisplayPowerServiceProvider::~DisplayPowerServiceProvider() {}
diff --git a/chromeos/dbus/services/display_power_service_provider.h b/chromeos/dbus/services/display_power_service_provider.h
index e09648e..4d42cfd4c 100644
--- a/chromeos/dbus/services/display_power_service_provider.h
+++ b/chromeos/dbus/services/display_power_service_provider.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_DBUS_SERVICES_DISPLAY_POWER_SERVICE_PROVIDER_H_
 #define CHROMEOS_DBUS_SERVICES_DISPLAY_POWER_SERVICE_PROVIDER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/services/cros_dbus_service.h"
@@ -44,7 +44,7 @@
     virtual void SetDimming(bool dimmed) = 0;
   };
 
-  explicit DisplayPowerServiceProvider(scoped_ptr<Delegate> delegate);
+  explicit DisplayPowerServiceProvider(std::unique_ptr<Delegate> delegate);
   ~DisplayPowerServiceProvider() override;
 
   // CrosDBusService::ServiceProviderInterface overrides:
@@ -64,7 +64,7 @@
       dbus::MethodCall* method_call,
       dbus::ExportedObject::ResponseSender response_sender);
 
-  scoped_ptr<Delegate> delegate_;
+  std::unique_ptr<Delegate> delegate_;
 
   // Keep this last so that all weak pointers will be invalidated at the
   // beginning of destruction.
diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.cc b/chromeos/dbus/services/proxy_resolution_service_provider.cc
index 44d4e83..6551650 100644
--- a/chromeos/dbus/services/proxy_resolution_service_provider.cc
+++ b/chromeos/dbus/services/proxy_resolution_service_provider.cc
@@ -53,7 +53,7 @@
     DISALLOW_COPY_AND_ASSIGN(Request);
   };
 
-  explicit ProxyResolverImpl(scoped_ptr<ProxyResolverDelegate> delegate)
+  explicit ProxyResolverImpl(std::unique_ptr<ProxyResolverDelegate> delegate)
       : delegate_(std::move(delegate)),
         origin_thread_(base::ThreadTaskRunnerHandle::Get()),
         weak_ptr_factory_(this) {}
@@ -176,7 +176,7 @@
     return origin_thread_->BelongsToCurrentThread();
   }
 
-  scoped_ptr<ProxyResolverDelegate> delegate_;
+  std::unique_ptr<ProxyResolverDelegate> delegate_;
   scoped_refptr<base::SingleThreadTaskRunner> origin_thread_;
   std::set<Request*> all_requests_;
   base::WeakPtrFactory<ProxyResolverImpl> weak_ptr_factory_;
@@ -240,7 +240,7 @@
       !reader.PopString(&signal_interface) ||
       !reader.PopString(&signal_name)) {
     LOG(ERROR) << "Unexpected method call: " << method_call->ToString();
-    response_sender.Run(scoped_ptr<dbus::Response>());
+    response_sender.Run(std::unique_ptr<dbus::Response>());
     return;
   }
 
@@ -261,14 +261,14 @@
     dbus::ExportedObject::ResponseSender response_sender) {
   if (!provider_weak_ptr) {
     LOG(WARNING) << "Called after the object is deleted";
-    response_sender.Run(scoped_ptr<dbus::Response>());
+    response_sender.Run(std::unique_ptr<dbus::Response>());
     return;
   }
   provider_weak_ptr->ResolveProxyHandler(method_call, response_sender);
 }
 
 ProxyResolutionServiceProvider* ProxyResolutionServiceProvider::Create(
-    scoped_ptr<ProxyResolverDelegate> delegate) {
+    std::unique_ptr<ProxyResolverDelegate> delegate) {
   return new ProxyResolutionServiceProvider(
       new ProxyResolverImpl(std::move(delegate)));
 }
diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.h b/chromeos/dbus/services/proxy_resolution_service_provider.h
index acc25c2..742db347 100644
--- a/chromeos/dbus/services/proxy_resolution_service_provider.h
+++ b/chromeos/dbus/services/proxy_resolution_service_provider.h
@@ -5,11 +5,11 @@
 #ifndef CHROMEOS_DBUS_SERVICES_PROXY_RESOLUTION_SERVICE_PROVIDER_H_
 #define CHROMEOS_DBUS_SERVICES_PROXY_RESOLUTION_SERVICE_PROVIDER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/services/cros_dbus_service.h"
@@ -91,7 +91,7 @@
 
   // Creates the instance.
   static ProxyResolutionServiceProvider* Create(
-      scoped_ptr<ProxyResolverDelegate> delgate);
+      std::unique_ptr<ProxyResolverDelegate> delgate);
 
  private:
   explicit ProxyResolutionServiceProvider(ProxyResolverInterface *resovler);
@@ -119,7 +119,7 @@
   bool OnOriginThread();
 
   scoped_refptr<dbus::ExportedObject> exported_object_;
-  scoped_ptr<ProxyResolverInterface> resolver_;
+  std::unique_ptr<ProxyResolverInterface> resolver_;
   scoped_refptr<base::SingleThreadTaskRunner> origin_thread_;
   base::WeakPtrFactory<ProxyResolutionServiceProvider> weak_ptr_factory_;
 
diff --git a/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc b/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc
index 7514380..83c8da3 100644
--- a/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc
+++ b/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -52,7 +53,7 @@
     // Create the proxy resolution service with the mock bus and the mock
     // resolver injected.
     service_provider_.reset(ProxyResolutionServiceProvider::Create(
-        make_scoped_ptr(new TestProxyResolverDelegate(
+        base::WrapUnique(new TestProxyResolverDelegate(
             base::ThreadTaskRunnerHandle::Get()))));
 
     test_helper_.SetUp(kResolveNetworkProxy, service_provider_.get());
@@ -101,7 +102,7 @@
   std::string proxy_info_;
   std::string error_message_;
   ServiceProviderTestHelper test_helper_;
-  scoped_ptr<CrosDBusService::ServiceProviderInterface> service_provider_;
+  std::unique_ptr<CrosDBusService::ServiceProviderInterface> service_provider_;
 };
 
 TEST_F(ProxyResolutionServiceProviderTest, ResolveProxy) {
@@ -115,7 +116,8 @@
   writer.AppendString(kReturnSignalName);
 
   // Call the ResolveNetworkProxy method.
-  scoped_ptr<dbus::Response> response(test_helper_.CallMethod(&method_call));
+  std::unique_ptr<dbus::Response> response(
+      test_helper_.CallMethod(&method_call));
   base::RunLoop().RunUntilIdle();
 
   // An empty response should be returned.
diff --git a/chromeos/dbus/services/service_provider_test_helper.cc b/chromeos/dbus/services/service_provider_test_helper.cc
index 7407946c..3f0e533b 100644
--- a/chromeos/dbus/services/service_provider_test_helper.cc
+++ b/chromeos/dbus/services/service_provider_test_helper.cc
@@ -101,7 +101,7 @@
                                       signal_callback, on_connected_callback);
 }
 
-scoped_ptr<dbus::Response> ServiceProviderTestHelper::CallMethod(
+std::unique_ptr<dbus::Response> ServiceProviderTestHelper::CallMethod(
     dbus::MethodCall* method_call) {
   return mock_object_proxy_->CallMethodAndBlock(
       method_call,
@@ -156,7 +156,7 @@
 }
 
 void ServiceProviderTestHelper::OnResponse(
-    scoped_ptr<dbus::Response> response) {
+    std::unique_ptr<dbus::Response> response) {
   response_ = std::move(response);
   response_received_ = true;
   if (base::MessageLoop::current()->is_running())
diff --git a/chromeos/dbus/services/service_provider_test_helper.h b/chromeos/dbus/services/service_provider_test_helper.h
index c5091b1..69928f5 100644
--- a/chromeos/dbus/services/service_provider_test_helper.h
+++ b/chromeos/dbus/services/service_provider_test_helper.h
@@ -52,7 +52,7 @@
       dbus::ObjectProxy::OnConnectedCallback on_connected_callback);
 
   // Calls tested dbus method.
-  scoped_ptr<dbus::Response> CallMethod(dbus::MethodCall* method_call);
+  std::unique_ptr<dbus::Response> CallMethod(dbus::MethodCall* method_call);
 
   // Cleanups helper. Should be called after |CallMethod()|.
   void TearDown();
@@ -81,16 +81,16 @@
   void MockSendSignal(dbus::Signal* signal);
 
   // Receives a response and makes it available to MockCallMethodAndBlock().
-  void OnResponse(scoped_ptr<dbus::Response> response);
+  void OnResponse(std::unique_ptr<dbus::Response> response);
 
   scoped_refptr<dbus::MockBus> mock_bus_;
   scoped_refptr<dbus::MockExportedObject> mock_exported_object_;
   scoped_refptr<dbus::MockObjectProxy> mock_object_proxy_;
   dbus::ExportedObject::MethodCallCallback method_callback_;
   dbus::ObjectProxy::SignalCallback on_signal_callback_;
-  scoped_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
   bool response_received_;
-  scoped_ptr<dbus::Response> response_;
+  std::unique_ptr<dbus::Response> response_;
 };
 
 }  // namespace chromeos
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc
index 95559ea..9ac0c458 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -254,7 +254,7 @@
         login_manager::kSessionManagerRetrievePolicyForUser);
     dbus::MessageWriter writer(&method_call);
     writer.AppendString(cryptohome_id.id());
-    scoped_ptr<dbus::Response> response =
+    std::unique_ptr<dbus::Response> response =
         blocking_method_caller_->CallMethodAndBlock(&method_call);
     std::string policy;
     ExtractString(login_manager::kSessionManagerRetrievePolicyForUser,
@@ -703,7 +703,7 @@
   }
 
   dbus::ObjectProxy* session_manager_proxy_;
-  scoped_ptr<BlockingMethodCaller> blocking_method_caller_;
+  std::unique_ptr<BlockingMethodCaller> blocking_method_caller_;
   base::ObserverList<Observer> observers_;
 
   // Most recent screen-lock state received from session_manager.
diff --git a/chromeos/dbus/shill_client_helper.cc b/chromeos/dbus/shill_client_helper.cc
index f0add9a7..34a10ba 100644
--- a/chromeos/dbus/shill_client_helper.cc
+++ b/chromeos/dbus/shill_client_helper.cc
@@ -148,7 +148,7 @@
     return;
   }
   dbus::MessageReader reader(response);
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
   base::DictionaryValue* result = NULL;
   if (!value.get() || !value->GetAsDictionary(&result)) {
     base::DictionaryValue result;
@@ -174,7 +174,7 @@
     const ShillClientHelper::ErrorCallback& error_callback,
     dbus::Response* response) {
   dbus::MessageReader reader(response);
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
   base::DictionaryValue* result = NULL;
   if (!value.get() || !value->GetAsDictionary(&result)) {
     error_callback.Run(kInvalidResponseErrorName, kInvalidResponseErrorMessage);
@@ -190,7 +190,7 @@
     const ShillClientHelper::ErrorCallback& error_callback,
     dbus::Response* response) {
   dbus::MessageReader reader(response);
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
   base::ListValue* result = NULL;
   if (!value.get() || !value->GetAsList(&result)) {
     error_callback.Run(kInvalidResponseErrorName, kInvalidResponseErrorMessage);
@@ -543,7 +543,7 @@
   std::string name;
   if (!reader.PopString(&name))
     return;
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
   if (!value.get())
     return;
 
diff --git a/chromeos/dbus/shill_client_helper.h b/chromeos/dbus/shill_client_helper.h
index f2cae1f3..50766df 100644
--- a/chromeos/dbus/shill_client_helper.h
+++ b/chromeos/dbus/shill_client_helper.h
@@ -5,11 +5,11 @@
 #ifndef CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_
 #define CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/values.h"
diff --git a/chromeos/dbus/shill_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc
index 7c02b9a..44c7961 100644
--- a/chromeos/dbus/shill_client_unittest_base.cc
+++ b/chromeos/dbus/shill_client_unittest_base.cc
@@ -33,7 +33,7 @@
   dbus::MessageReader array_reader(NULL);
   if (!reader->PopArray(&array_reader))
     return NULL;
-  scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue);
   while (array_reader.HasMoreData()) {
     dbus::MessageReader entry_reader(NULL);
     std::string key;
@@ -272,7 +272,7 @@
 void ShillClientUnittestBase::ExpectValueArgument(
     const base::Value* expected_value,
     dbus::MessageReader* reader) {
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(reader));
   ASSERT_TRUE(value.get());
   EXPECT_TRUE(value->Equals(expected_value));
   EXPECT_FALSE(reader->HasMoreData());
@@ -286,7 +286,7 @@
   std::string str;
   ASSERT_TRUE(reader->PopString(&str));
   EXPECT_EQ(expected_string, str);
-  scoped_ptr<base::Value> value(dbus::PopDataAsValue(reader));
+  std::unique_ptr<base::Value> value(dbus::PopDataAsValue(reader));
   ASSERT_TRUE(value.get());
   EXPECT_TRUE(value->Equals(expected_value));
   EXPECT_FALSE(reader->HasMoreData());
@@ -315,7 +315,7 @@
     }
     dbus::MessageReader variant_reader(NULL);
     ASSERT_TRUE(entry_reader.PopVariant(&variant_reader));
-    scoped_ptr<base::Value> value;
+    std::unique_ptr<base::Value> value;
     // Variants in the dictionary can be basic types or string-to-string
     // dictinoary.
     switch (variant_reader.GetDataType()) {
diff --git a/chromeos/dbus/shill_client_unittest_base.h b/chromeos/dbus/shill_client_unittest_base.h
index 24fa392..634cab8 100644
--- a/chromeos/dbus/shill_client_unittest_base.h
+++ b/chromeos/dbus/shill_client_unittest_base.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
 #include "chromeos/dbus/shill_client_helper.h"
@@ -53,7 +53,7 @@
   void DescribeNegationTo(::std::ostream* os) const override;
 
  private:
-  scoped_ptr<base::Value> expected_value_;
+  std::unique_ptr<base::Value> expected_value_;
 };
 
 inline Matcher<const base::Value&> ValueEq(const base::Value& expected_value) {
diff --git a/chromeos/dbus/shill_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc
index 164f5920..e1816e4 100644
--- a/chromeos/dbus/shill_device_client_unittest.cc
+++ b/chromeos/dbus/shill_device_client_unittest.cc
@@ -68,7 +68,7 @@
   void TearDown() override { ShillClientUnittestBase::TearDown(); }
 
  protected:
-  scoped_ptr<ShillDeviceClient> client_;
+  std::unique_ptr<ShillDeviceClient> client_;
 };
 
 TEST_F(ShillDeviceClientTest, PropertyChanged) {
@@ -111,7 +111,7 @@
 TEST_F(ShillDeviceClientTest, GetProperties) {
   const bool kValue = true;
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -138,7 +138,7 @@
 
 TEST_F(ShillDeviceClientTest, ProposeScan) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kProposeScanFunction,
@@ -154,7 +154,7 @@
 TEST_F(ShillDeviceClientTest, SetProperty) {
   const bool kValue = true;
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   const base::FundamentalValue value(kValue);
@@ -180,7 +180,7 @@
 
 TEST_F(ShillDeviceClientTest, ClearProperty) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kClearPropertyFunction,
@@ -198,7 +198,7 @@
 TEST_F(ShillDeviceClientTest, AddIPConfig) {
   const dbus::ObjectPath expected_result("/result/path");
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   writer.AppendObjectPath(expected_result);
 
@@ -218,7 +218,7 @@
   const char kPin[] = "123456";
   const bool kRequired = true;
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -243,7 +243,7 @@
 TEST_F(ShillDeviceClientTest, EnterPin) {
   const char kPin[] = "123456";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -268,7 +268,7 @@
   const char kPuk[] = "987654";
   const char kPin[] = "123456";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -293,7 +293,7 @@
   const char kOldPin[] = "123456";
   const char kNewPin[] = "234567";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -319,7 +319,7 @@
 TEST_F(ShillDeviceClientTest, Register) {
   const char kNetworkId[] = "networkid";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -342,7 +342,7 @@
 TEST_F(ShillDeviceClientTest, SetCarrier) {
   const char kCarrier[] = "carrier";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -362,7 +362,7 @@
 
 TEST_F(ShillDeviceClientTest, Reset) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
diff --git a/chromeos/dbus/shill_ipconfig_client.cc b/chromeos/dbus/shill_ipconfig_client.cc
index d96bdb1..778e306 100644
--- a/chromeos/dbus/shill_ipconfig_client.cc
+++ b/chromeos/dbus/shill_ipconfig_client.cc
@@ -5,11 +5,11 @@
 #include "chromeos/dbus/shill_ipconfig_client.h"
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/values.h"
 #include "chromeos/dbus/shill_property_changed_observer.h"
@@ -61,7 +61,7 @@
   void Init(dbus::Bus* bus) override { bus_ = bus; }
 
  private:
-  using HelperMap = std::map<std::string, scoped_ptr<ShillClientHelper>>;
+  using HelperMap = std::map<std::string, std::unique_ptr<ShillClientHelper>>;
 
   // Returns the corresponding ShillClientHelper for the profile.
   ShillClientHelper* GetHelper(const dbus::ObjectPath& ipconfig_path) {
@@ -72,7 +72,8 @@
     // There is no helper for the profile, create it.
     dbus::ObjectProxy* object_proxy =
         bus_->GetObjectProxy(shill::kFlimflamServiceName, ipconfig_path);
-    scoped_ptr<ShillClientHelper> helper(new ShillClientHelper(object_proxy));
+    std::unique_ptr<ShillClientHelper> helper(
+        new ShillClientHelper(object_proxy));
     helper->MonitorPropertyChanged(shill::kFlimflamIPConfigInterface);
     ShillClientHelper* helper_ptr = helper.get();
     helpers_[ipconfig_path.value()] = std::move(helper);
diff --git a/chromeos/dbus/shill_ipconfig_client_unittest.cc b/chromeos/dbus/shill_ipconfig_client_unittest.cc
index 1318ae9..cf2b761 100644
--- a/chromeos/dbus/shill_ipconfig_client_unittest.cc
+++ b/chromeos/dbus/shill_ipconfig_client_unittest.cc
@@ -44,7 +44,7 @@
   void TearDown() override { ShillClientUnittestBase::TearDown(); }
 
  protected:
-  scoped_ptr<ShillIPConfigClient> client_;
+  std::unique_ptr<ShillIPConfigClient> client_;
 };
 
 TEST_F(ShillIPConfigClientTest, PropertyChanged) {
@@ -85,7 +85,7 @@
   const int32_t kMtu = 68;
 
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -124,7 +124,7 @@
   const char kAddress[] = "address";
 
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   base::StringValue value(kAddress);
@@ -144,7 +144,7 @@
 
 TEST_F(ShillIPConfigClientTest, ClearProperty) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kClearPropertyFunction,
@@ -161,7 +161,7 @@
 
 TEST_F(ShillIPConfigClientTest, Remove) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kRemoveConfigFunction,
diff --git a/chromeos/dbus/shill_manager_client.cc b/chromeos/dbus/shill_manager_client.cc
index 5465835..2531d83 100644
--- a/chromeos/dbus/shill_manager_client.cc
+++ b/chromeos/dbus/shill_manager_client.cc
@@ -218,7 +218,7 @@
 
  private:
   dbus::ObjectProxy* proxy_;
-  scoped_ptr<ShillClientHelper> helper_;
+  std::unique_ptr<ShillClientHelper> helper_;
 
   DISALLOW_COPY_AND_ASSIGN(ShillManagerClientImpl);
 };
diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc
index c9eb1a8..bedee21 100644
--- a/chromeos/dbus/shill_manager_client_unittest.cc
+++ b/chromeos/dbus/shill_manager_client_unittest.cc
@@ -68,7 +68,7 @@
   void TearDown() override { ShillClientUnittestBase::TearDown(); }
 
  protected:
-  scoped_ptr<ShillManagerClient> client_;
+  std::unique_ptr<ShillManagerClient> client_;
 };
 
 TEST_F(ShillManagerClientTest, PropertyChanged) {
@@ -104,7 +104,7 @@
 
 TEST_F(ShillManagerClientTest, GetProperties) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -131,7 +131,7 @@
 
 TEST_F(ShillManagerClientTest, GetNetworksForGeolocation) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter type_dict_writer(NULL);
@@ -181,7 +181,7 @@
 
 TEST_F(ShillManagerClientTest, SetProperty) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   // Set expectations.
   base::StringValue value("portal list");
   PrepareForMethodCall(shill::kSetPropertyFunction,
@@ -205,7 +205,7 @@
 
 TEST_F(ShillManagerClientTest, RequestScan) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   // Set expectations.
   PrepareForMethodCall(shill::kRequestScanFunction,
                        base::Bind(&ExpectStringArgument, shill::kTypeWifi),
@@ -225,7 +225,7 @@
 
 TEST_F(ShillManagerClientTest, EnableTechnology) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   // Set expectations.
   PrepareForMethodCall(shill::kEnableTechnologyFunction,
                        base::Bind(&ExpectStringArgument, shill::kTypeWifi),
@@ -245,7 +245,7 @@
 
 TEST_F(ShillManagerClientTest, DisableTechnology) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   // Set expectations.
   PrepareForMethodCall(shill::kDisableTechnologyFunction,
                        base::Bind(&ExpectStringArgument, shill::kTypeWifi),
@@ -266,11 +266,11 @@
 TEST_F(ShillManagerClientTest, ConfigureService) {
   // Create response.
   const dbus::ObjectPath object_path("/");
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   writer.AppendObjectPath(object_path);
   // Create the argument dictionary.
-  scoped_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
+  std::unique_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
   // Use a variant valued dictionary rather than a string valued one.
   const bool string_valued = false;
   // Set expectations.
@@ -293,11 +293,11 @@
 TEST_F(ShillManagerClientTest, GetService) {
   // Create response.
   const dbus::ObjectPath object_path("/");
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   writer.AppendObjectPath(object_path);
   // Create the argument dictionary.
-  scoped_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
+  std::unique_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
   // Use a variant valued dictionary rather than a string valued one.
   const bool string_valued = false;
   // Set expectations.
@@ -319,7 +319,7 @@
 
 TEST_F(ShillManagerClientTest, VerifyDestination) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   bool expected = true;
   writer.AppendBool(expected);
@@ -358,7 +358,7 @@
 
 TEST_F(ShillManagerClientTest, VerifyAndEncryptCredentials) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   std::string expected = "encrypted_credentials";
   writer.AppendString(expected);
@@ -402,7 +402,7 @@
 
 TEST_F(ShillManagerClientTest, VerifyAndEncryptData) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   std::string expected = "encrypted_data";
   writer.AppendString(expected);
diff --git a/chromeos/dbus/shill_profile_client.cc b/chromeos/dbus/shill_profile_client.cc
index c8fe0c0..ae50e55d 100644
--- a/chromeos/dbus/shill_profile_client.cc
+++ b/chromeos/dbus/shill_profile_client.cc
@@ -5,11 +5,11 @@
 #include "chromeos/dbus/shill_profile_client.h"
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/values.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -60,7 +60,7 @@
   void Init(dbus::Bus* bus) override { bus_ = bus; }
 
  private:
-  using HelperMap = std::map<std::string, scoped_ptr<ShillClientHelper>>;
+  using HelperMap = std::map<std::string, std::unique_ptr<ShillClientHelper>>;
 
   // Returns the corresponding ShillClientHelper for the profile.
   ShillClientHelper* GetHelper(const dbus::ObjectPath& profile_path);
@@ -83,7 +83,8 @@
   // There is no helper for the profile, create it.
   dbus::ObjectProxy* object_proxy =
       bus_->GetObjectProxy(shill::kFlimflamServiceName, profile_path);
-  scoped_ptr<ShillClientHelper> helper(new ShillClientHelper(object_proxy));
+  std::unique_ptr<ShillClientHelper> helper(
+      new ShillClientHelper(object_proxy));
   helper->MonitorPropertyChanged(shill::kFlimflamProfileInterface);
   ShillClientHelper* helper_ptr = helper.get();
   helpers_[profile_path.value()] = std::move(helper);
diff --git a/chromeos/dbus/shill_profile_client_unittest.cc b/chromeos/dbus/shill_profile_client_unittest.cc
index e9fa142..7daadd28 100644
--- a/chromeos/dbus/shill_profile_client_unittest.cc
+++ b/chromeos/dbus/shill_profile_client_unittest.cc
@@ -50,7 +50,7 @@
   void TearDown() override { ShillClientUnittestBase::TearDown(); }
 
  protected:
-  scoped_ptr<ShillProfileClient> client_;
+  std::unique_ptr<ShillProfileClient> client_;
 };
 
 TEST_F(ShillProfileClientTest, PropertyChanged) {
@@ -92,7 +92,7 @@
 
 TEST_F(ShillProfileClientTest, GetProperties) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -127,7 +127,7 @@
 
 TEST_F(ShillProfileClientTest, GetEntry) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -160,7 +160,7 @@
 
 TEST_F(ShillProfileClientTest, DeleteEntry) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Create the expected value.
   base::DictionaryValue value;
diff --git a/chromeos/dbus/shill_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc
index 0e03578..1518a2b 100644
--- a/chromeos/dbus/shill_service_client_unittest.cc
+++ b/chromeos/dbus/shill_service_client_unittest.cc
@@ -42,7 +42,7 @@
   void TearDown() override { ShillClientUnittestBase::TearDown(); }
 
  protected:
-  scoped_ptr<ShillServiceClient> client_;
+  std::unique_ptr<ShillServiceClient> client_;
 };
 
 TEST_F(ShillServiceClientTest, PropertyChanged) {
@@ -84,7 +84,7 @@
 TEST_F(ShillServiceClientTest, GetProperties) {
   const int kValue = 42;
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("{sv}", &array_writer);
@@ -112,7 +112,7 @@
 TEST_F(ShillServiceClientTest, SetProperty) {
   const char kValue[] = "passphrase";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   const base::StringValue value(kValue);
@@ -138,10 +138,10 @@
 
 TEST_F(ShillServiceClientTest, SetProperties) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
-  scoped_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
+  std::unique_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
   // Use a variant valued dictionary rather than a string valued one.
   const bool string_valued = false;
   PrepareForMethodCall(
@@ -165,7 +165,7 @@
 
 TEST_F(ShillServiceClientTest, ClearProperty) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kClearPropertyFunction,
@@ -188,7 +188,7 @@
 
 TEST_F(ShillServiceClientTest, ClearProperties) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   dbus::MessageWriter array_writer(NULL);
   writer.OpenArray("b", &array_writer);
@@ -219,7 +219,7 @@
 
 TEST_F(ShillServiceClientTest, Connect) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   MockClosure mock_closure;
@@ -239,7 +239,7 @@
 
 TEST_F(ShillServiceClientTest, Disconnect) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kDisconnectFunction,
@@ -260,7 +260,7 @@
 
 TEST_F(ShillServiceClientTest, Remove) {
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kRemoveServiceFunction,
@@ -282,7 +282,7 @@
 TEST_F(ShillServiceClientTest, ActivateCellularModem) {
   const char kCarrier[] = "carrier";
   // Create response.
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   // Set expectations.
   PrepareForMethodCall(shill::kActivateCellularModemFunction,
diff --git a/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc b/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc
index 5880541..99f40f5 100644
--- a/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc
+++ b/chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc
@@ -57,7 +57,7 @@
   }
 
  protected:
-  scoped_ptr<ShillThirdPartyVpnDriverClient> client_;
+  std::unique_ptr<ShillThirdPartyVpnDriverClient> client_;
 };
 
 TEST_F(ShillThirdPartyVpnDriverClientTest, PlatformSignal) {
@@ -93,7 +93,7 @@
 
   testing::Mock::VerifyAndClearExpectations(&observer);
 
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   uint32_t connection_state = 2;
 
   PrepareForMethodCall(shill::kUpdateConnectionStateFunction,
@@ -126,7 +126,7 @@
 }
 
 TEST_F(ShillThirdPartyVpnDriverClientTest, SetParameters) {
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   dbus::MessageWriter writer(response.get());
   writer.AppendString(std::string("deadbeef"));
 
@@ -152,7 +152,7 @@
 }
 
 TEST_F(ShillThirdPartyVpnDriverClientTest, UpdateConnectionState) {
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
   uint32_t connection_state = 2;
 
   EXPECT_CALL(*this, MockSuccess()).Times(1);
@@ -171,7 +171,7 @@
 }
 
 TEST_F(ShillThirdPartyVpnDriverClientTest, SendPacket) {
-  scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+  std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
 
   const size_t kPacketSize = 5;
   const std::vector<char> data(kPacketSize, 0);
diff --git a/chromeos/dbus/sms_client.cc b/chromeos/dbus/sms_client.cc
index a7f4209..6d98494 100644
--- a/chromeos/dbus/sms_client.cc
+++ b/chromeos/dbus/sms_client.cc
@@ -4,12 +4,12 @@
 #include "chromeos/dbus/sms_client.h"
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
@@ -63,7 +63,7 @@
       return;
     }
     dbus::MessageReader reader(response);
-    scoped_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
+    std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
     base::DictionaryValue* dictionary_value = NULL;
     if (!value.get() || !value->GetAsDictionary(&dictionary_value)) {
       LOG(WARNING) << "Invalid response: " << response->ToString();
diff --git a/chromeos/disks/disk_mount_manager.cc b/chromeos/disks/disk_mount_manager.cc
index d4edfea..f7a325a 100644
--- a/chromeos/disks/disk_mount_manager.cc
+++ b/chromeos/disks/disk_mount_manager.cc
@@ -633,7 +633,7 @@
   bool already_refreshed_;
   std::vector<EnsureMountInfoRefreshedCallback> refresh_callbacks_;
 
-  scoped_ptr<SuspendUnmountManager> suspend_unmount_manager_;
+  std::unique_ptr<SuspendUnmountManager> suspend_unmount_manager_;
 
   base::WeakPtrFactory<DiskMountManagerImpl> weak_ptr_factory_;
 
@@ -683,6 +683,8 @@
       on_removable_device_(on_removable_device),
       is_hidden_(is_hidden) {}
 
+DiskMountManager::Disk::Disk(const Disk& other) = default;
+
 DiskMountManager::Disk::~Disk() {}
 
 bool DiskMountManager::AddDiskForTest(Disk* disk) {
diff --git a/chromeos/disks/disk_mount_manager.h b/chromeos/disks/disk_mount_manager.h
index cf29e72..82506b9 100644
--- a/chromeos/disks/disk_mount_manager.h
+++ b/chromeos/disks/disk_mount_manager.h
@@ -73,6 +73,7 @@
          bool on_boot_device,
          bool on_removable_device,
          bool is_hidden);
+    Disk(const Disk& other);
     ~Disk();
 
     // The path of the device, used by devicekit-disks.
diff --git a/chromeos/disks/disk_mount_manager_unittest.cc b/chromeos/disks/disk_mount_manager_unittest.cc
index 4a5aae8a37..bc9d1f6 100644
--- a/chromeos/disks/disk_mount_manager_unittest.cc
+++ b/chromeos/disks/disk_mount_manager_unittest.cc
@@ -127,7 +127,7 @@
   void SetUp() override {
     fake_cros_disks_client_ = new FakeCrosDisksClient;
     DBusThreadManager::GetSetterForTesting()->SetCrosDisksClient(
-        scoped_ptr<CrosDisksClient>(fake_cros_disks_client_));
+        std::unique_ptr<CrosDisksClient>(fake_cros_disks_client_));
 
     DiskMountManager::Initialize();
 
diff --git a/chromeos/disks/mock_disk_mount_manager.cc b/chromeos/disks/mock_disk_mount_manager.cc
index 14d7d7c..9ac9616 100644
--- a/chromeos/disks/mock_disk_mount_manager.cc
+++ b/chromeos/disks/mock_disk_mount_manager.cc
@@ -6,9 +6,9 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
@@ -72,26 +72,18 @@
 }
 
 void MockDiskMountManager::NotifyDeviceInsertEvents() {
-  scoped_ptr<DiskMountManager::Disk> disk1(new DiskMountManager::Disk(
-      std::string(kTestDevicePath),
-      std::string(),
-      std::string(kTestSystemPath),
-      std::string(kTestFilePath),
-      std::string(),
-      std::string(kTestDriveLabel),
-      std::string(kTestVendorId),
-      std::string(kTestVendorName),
-      std::string(kTestProductId),
-      std::string(kTestProductName),
-      std::string(kTestUuid),
-      std::string(kTestSystemPathPrefix),
-      DEVICE_TYPE_USB,
-      4294967295U,
-      false,  // is_parent
-      false,  // is_read_only
-      true,  // has_media
-      false,  // on_boot_device
-      true,  // on_removable_device
+  std::unique_ptr<DiskMountManager::Disk> disk1(new DiskMountManager::Disk(
+      std::string(kTestDevicePath), std::string(), std::string(kTestSystemPath),
+      std::string(kTestFilePath), std::string(), std::string(kTestDriveLabel),
+      std::string(kTestVendorId), std::string(kTestVendorName),
+      std::string(kTestProductId), std::string(kTestProductName),
+      std::string(kTestUuid), std::string(kTestSystemPathPrefix),
+      DEVICE_TYPE_USB, 4294967295U,
+      false,    // is_parent
+      false,    // is_read_only
+      true,     // has_media
+      false,    // on_boot_device
+      true,     // on_removable_device
       false));  // is_hidden
 
   disks_.clear();
@@ -105,26 +97,19 @@
   NotifyDiskChanged(DISK_ADDED, disk1.get());
 
   // Disk Changed
-  scoped_ptr<DiskMountManager::Disk> disk2(new DiskMountManager::Disk(
-      std::string(kTestDevicePath),
-      std::string(kTestMountPath),
-      std::string(kTestSystemPath),
-      std::string(kTestFilePath),
-      std::string(kTestDeviceLabel),
-      std::string(kTestDriveLabel),
-      std::string(kTestVendorId),
-      std::string(kTestVendorName),
-      std::string(kTestProductId),
-      std::string(kTestProductName),
-      std::string(kTestUuid),
-      std::string(kTestSystemPathPrefix),
-      DEVICE_TYPE_MOBILE,
-      1073741824,
-      false,  // is_parent
-      false,  // is_read_only
-      true,  // has_media
-      false,  // on_boot_device
-      true,  // on_removable_device
+  std::unique_ptr<DiskMountManager::Disk> disk2(new DiskMountManager::Disk(
+      std::string(kTestDevicePath), std::string(kTestMountPath),
+      std::string(kTestSystemPath), std::string(kTestFilePath),
+      std::string(kTestDeviceLabel), std::string(kTestDriveLabel),
+      std::string(kTestVendorId), std::string(kTestVendorName),
+      std::string(kTestProductId), std::string(kTestProductName),
+      std::string(kTestUuid), std::string(kTestSystemPathPrefix),
+      DEVICE_TYPE_MOBILE, 1073741824,
+      false,    // is_parent
+      false,    // is_read_only
+      true,     // has_media
+      false,    // on_boot_device
+      true,     // on_removable_device
       false));  // is_hidden
   disks_.clear();
   disks_.insert(std::pair<std::string, DiskMountManager::Disk*>(
@@ -133,26 +118,19 @@
 }
 
 void MockDiskMountManager::NotifyDeviceRemoveEvents() {
-  scoped_ptr<DiskMountManager::Disk> disk(new DiskMountManager::Disk(
-      std::string(kTestDevicePath),
-      std::string(kTestMountPath),
-      std::string(kTestSystemPath),
-      std::string(kTestFilePath),
-      std::string(kTestDeviceLabel),
-      std::string(kTestDriveLabel),
-      std::string(kTestVendorId),
-      std::string(kTestVendorName),
-      std::string(kTestProductId),
-      std::string(kTestProductName),
-      std::string(kTestUuid),
-      std::string(kTestSystemPathPrefix),
-      DEVICE_TYPE_SD,
-      1073741824,
-      false,  // is_parent
-      false,  // is_read_only
-      true,  // has_media
-      false,  // on_boot_device
-      true,  // on_removable_device
+  std::unique_ptr<DiskMountManager::Disk> disk(new DiskMountManager::Disk(
+      std::string(kTestDevicePath), std::string(kTestMountPath),
+      std::string(kTestSystemPath), std::string(kTestFilePath),
+      std::string(kTestDeviceLabel), std::string(kTestDriveLabel),
+      std::string(kTestVendorId), std::string(kTestVendorName),
+      std::string(kTestProductId), std::string(kTestProductName),
+      std::string(kTestUuid), std::string(kTestSystemPathPrefix),
+      DEVICE_TYPE_SD, 1073741824,
+      false,    // is_parent
+      false,    // is_read_only
+      true,     // has_media
+      false,    // on_boot_device
+      true,     // on_removable_device
       false));  // is_hidden
   disks_.clear();
   disks_.insert(std::pair<std::string, DiskMountManager::Disk*>(
diff --git a/chromeos/geolocation/simple_geolocation_provider.cc b/chromeos/geolocation/simple_geolocation_provider.cc
index 0a26ede..c94f058 100644
--- a/chromeos/geolocation/simple_geolocation_provider.cc
+++ b/chromeos/geolocation/simple_geolocation_provider.cc
@@ -19,11 +19,12 @@
 const char kDefaultGeolocationProviderUrl[] =
     "https://www.googleapis.com/geolocation/v1/geolocate?";
 
-scoped_ptr<WifiAccessPointVector> GetAccessPointData() {
+std::unique_ptr<WifiAccessPointVector> GetAccessPointData() {
   if (!chromeos::NetworkHandler::Get()->geolocation_handler()->wifi_enabled())
     return nullptr;
 
-  scoped_ptr<WifiAccessPointVector> result(new chromeos::WifiAccessPointVector);
+  std::unique_ptr<WifiAccessPointVector> result(
+      new chromeos::WifiAccessPointVector);
   int64_t age_ms = 0;
   if (!NetworkHandler::Get()->geolocation_handler()->GetWifiAccessPoints(
           result.get(), &age_ms)) {
diff --git a/chromeos/geolocation/simple_geolocation_request.cc b/chromeos/geolocation/simple_geolocation_request.cc
index 5a27979c..b3a197f 100644
--- a/chromeos/geolocation/simple_geolocation_request.cc
+++ b/chromeos/geolocation/simple_geolocation_request.cc
@@ -182,8 +182,9 @@
 
   // Parse the response, ignoring comments.
   std::string error_msg;
-  scoped_ptr<base::Value> response_value = base::JSONReader::ReadAndReturnError(
-      response_body, base::JSON_PARSE_RFC, NULL, &error_msg);
+  std::unique_ptr<base::Value> response_value =
+      base::JSONReader::ReadAndReturnError(response_body, base::JSON_PARSE_RFC,
+                                           NULL, &error_msg);
   if (response_value == NULL) {
     PrintGeolocationError(
         server_url, "JSONReader failed: " + error_msg, position);
@@ -294,7 +295,7 @@
     net::URLRequestContextGetter* url_context_getter,
     const GURL& service_url,
     base::TimeDelta timeout,
-    scoped_ptr<WifiAccessPointVector> wifi_data)
+    std::unique_ptr<WifiAccessPointVector> wifi_data)
     : url_context_getter_(url_context_getter),
       service_url_(service_url),
       retry_sleep_on_server_error_(base::TimeDelta::FromSeconds(
@@ -324,7 +325,7 @@
     return std::string(kSimpleGeolocationRequestBody);
   }
 
-  scoped_ptr<base::DictionaryValue> request(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> request(new base::DictionaryValue);
   request->SetBooleanWithoutPathExpansion(kConsiderIp, true);
 
   base::ListValue* wifi_access_points(new base::ListValue);
diff --git a/chromeos/geolocation/simple_geolocation_request.h b/chromeos/geolocation/simple_geolocation_request.h
index 19ff507..dc72c5c 100644
--- a/chromeos/geolocation/simple_geolocation_request.h
+++ b/chromeos/geolocation/simple_geolocation_request.h
@@ -5,11 +5,12 @@
 #ifndef CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_
 #define CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "chromeos/chromeos_export.h"
@@ -55,7 +56,7 @@
   SimpleGeolocationRequest(net::URLRequestContextGetter* url_context_getter,
                            const GURL& service_url,
                            base::TimeDelta timeout,
-                           scoped_ptr<WifiAccessPointVector> wifi_data);
+                           std::unique_ptr<WifiAccessPointVector> wifi_data);
 
   ~SimpleGeolocationRequest() override;
 
@@ -108,7 +109,7 @@
   // Actual URL with parameters.
   GURL request_url_;
 
-  scoped_ptr<net::URLFetcher> url_fetcher_;
+  std::unique_ptr<net::URLFetcher> url_fetcher_;
 
   // When request was actually started.
   base::Time request_started_at_;
@@ -131,7 +132,7 @@
   // This is updated on each retry.
   Geoposition position_;
 
-  scoped_ptr<WifiAccessPointVector> wifi_data_;
+  std::unique_ptr<WifiAccessPointVector> wifi_data_;
 
   // Creation and destruction should happen on the same thread.
   base::ThreadChecker thread_checker_;
diff --git a/chromeos/geolocation/simple_geolocation_unittest.cc b/chromeos/geolocation/simple_geolocation_unittest.cc
index 61c83b9..409a00e 100644
--- a/chromeos/geolocation/simple_geolocation_unittest.cc
+++ b/chromeos/geolocation/simple_geolocation_unittest.cc
@@ -76,7 +76,7 @@
         attempts_(0),
         provider_(provider) {}
 
-  scoped_ptr<net::FakeURLFetcher> CreateURLFetcher(
+  std::unique_ptr<net::FakeURLFetcher> CreateURLFetcher(
       const GURL& url,
       net::URLFetcherDelegate* delegate,
       const std::string& response_data,
@@ -99,7 +99,7 @@
       status = net::URLRequestStatus::SUCCESS;
       factory_->SetFakeResponse(url, response_, response_code, status);
     }
-    scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
+    std::unique_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
         url, delegate, response_, response_code, status));
     scoped_refptr<net::HttpResponseHeaders> download_headers =
         new net::HttpResponseHeaders(std::string());
@@ -152,8 +152,8 @@
   size_t attempts() const { return url_callback_->attempts(); }
 
  private:
-  scoped_ptr<TestGeolocationAPIURLFetcherCallback> url_callback_;
-  scoped_ptr<net::FakeURLFetcherFactory> fetcher_factory_;
+  std::unique_ptr<TestGeolocationAPIURLFetcherCallback> url_callback_;
+  std::unique_ptr<net::FakeURLFetcherFactory> fetcher_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(GeolocationAPIFetcherFactory);
 };
@@ -185,7 +185,7 @@
   Geoposition position_;
   bool server_error_;
   base::TimeDelta elapsed_;
-  scoped_ptr<base::RunLoop> message_loop_runner_;
+  std::unique_ptr<base::RunLoop> message_loop_runner_;
 };
 
 class WiFiTestMonitor : public SimpleGeolocationRequestTestMonitor {
@@ -371,7 +371,7 @@
 
  protected:
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<GeolocationHandler> geolocation_handler_;
+  std::unique_ptr<GeolocationHandler> geolocation_handler_;
   ShillManagerClient::TestInterface* manager_test_;
   WifiAccessPointVector wifi_access_points_;
 
diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc
index afae8d96..6b29183a 100644
--- a/chromeos/login/auth/cryptohome_authenticator.cc
+++ b/chromeos/login/auth/cryptohome_authenticator.cc
@@ -74,9 +74,9 @@
 
 // Hashes |key| with |system_salt| if it its type is KEY_TYPE_PASSWORD_PLAIN.
 // Returns the keys unmodified otherwise.
-scoped_ptr<Key> TransformKeyIfNeeded(const Key& key,
-                                     const std::string& system_salt) {
-  scoped_ptr<Key> result(new Key(key));
+std::unique_ptr<Key> TransformKeyIfNeeded(const Key& key,
+                                          const std::string& system_salt) {
+  std::unique_ptr<Key> result(new Key(key));
   if (result->GetKeyType() == Key::KEY_TYPE_PASSWORD_PLAIN)
     result->Transform(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, system_salt);
 
@@ -302,8 +302,8 @@
       DCHECK_EQ(kCryptohomeGAIAKeyLabel, key_definition.label);
 
       // Extract the key type and salt from |key_definition|, if present.
-      scoped_ptr<int64_t> type;
-      scoped_ptr<std::string> salt;
+      std::unique_ptr<int64_t> type;
+      std::unique_ptr<std::string> salt;
       for (std::vector<cryptohome::KeyDefinition::ProviderData>::
                const_iterator it = key_definition.provider_data.begin();
            it != key_definition.provider_data.end(); ++it) {
@@ -422,9 +422,9 @@
 
   // TODO(bartfab): Retrieve the hashing algorithm and salt to use for |old_key|
   // from cryptohomed.
-  scoped_ptr<Key> old_key =
+  std::unique_ptr<Key> old_key =
       TransformKeyIfNeeded(Key(old_password), system_salt);
-  scoped_ptr<Key> new_key =
+  std::unique_ptr<Key> new_key =
       TransformKeyIfNeeded(*attempt->user_context.GetKey(), system_salt);
   if (passing_old_hash) {
     caller->AsyncMigrateKey(
@@ -456,7 +456,7 @@
 void CheckKey(const base::WeakPtr<AuthAttemptState>& attempt,
               scoped_refptr<CryptohomeAuthenticator> resolver,
               const std::string& system_salt) {
-  scoped_ptr<Key> key =
+  std::unique_ptr<Key> key =
       TransformKeyIfNeeded(*attempt->user_context.GetKey(), system_salt);
   cryptohome::AsyncMethodCaller::GetInstance()->AsyncCheckKey(
       cryptohome::Identification(attempt->user_context.GetAccountId()),
diff --git a/chromeos/login/auth/cryptohome_authenticator.h b/chromeos/login/auth/cryptohome_authenticator.h
index cfac3d3..1a528488 100644
--- a/chromeos/login/auth/cryptohome_authenticator.h
+++ b/chromeos/login/auth/cryptohome_authenticator.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
 #define CHROMEOS_LOGIN_AUTH_CRYPTOHOME_AUTHENTICATOR_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/task_runner.h"
 #include "chromeos/chromeos_export.h"
@@ -232,7 +232,7 @@
 
   scoped_refptr<base::TaskRunner> task_runner_;
 
-  scoped_ptr<AuthAttemptState> current_state_;
+  std::unique_ptr<AuthAttemptState> current_state_;
   bool migrate_attempted_;
   bool remove_attempted_;
   bool resync_attempted_;
diff --git a/chromeos/login/auth/extended_authenticator.h b/chromeos/login/auth/extended_authenticator.h
index 0a0a877..cfef8e59 100644
--- a/chromeos/login/auth/extended_authenticator.h
+++ b/chromeos/login/auth/extended_authenticator.h
@@ -5,13 +5,13 @@
 #ifndef CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_
 #define CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/cryptohome/cryptohome_parameters.h"
 
diff --git a/chromeos/login/auth/extended_authenticator_impl.h b/chromeos/login/auth/extended_authenticator_impl.h
index 550ba3f..7d65770 100644
--- a/chromeos/login/auth/extended_authenticator_impl.h
+++ b/chromeos/login/auth/extended_authenticator_impl.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_
 #define CHROMEOS_LOGIN_AUTH_EXTENDED_AUTHENTICATOR_IMPL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/login/auth/extended_authenticator.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
diff --git a/chromeos/login/auth/key.cc b/chromeos/login/auth/key.cc
index fe3ec86..e9dada2 100644
--- a/chromeos/login/auth/key.cc
+++ b/chromeos/login/auth/key.cc
@@ -4,9 +4,10 @@
 
 #include "chromeos/login/auth/key.h"
 
+#include <memory>
+
 #include "base/base64.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "crypto/sha2.h"
@@ -89,12 +90,10 @@
       break;
     }
     case KEY_TYPE_SALTED_PBKDF2_AES256_1234: {
-      scoped_ptr<crypto::SymmetricKey> key(
-          crypto::SymmetricKey::DeriveKeyFromPassword(crypto::SymmetricKey::AES,
-                                                      secret_,
-                                                      salt,
-                                                      kNumIterations,
-                                                      kKeySizeInBits));
+      std::unique_ptr<crypto::SymmetricKey> key(
+          crypto::SymmetricKey::DeriveKeyFromPassword(
+              crypto::SymmetricKey::AES, secret_, salt, kNumIterations,
+              kKeySizeInBits));
       std::string raw_secret;
       key->GetRawKey(&raw_secret);
       base::Base64Encode(raw_secret, &secret_);
diff --git a/chromeos/login/auth/login_performer.h b/chromeos/login/auth/login_performer.h
index 3eb2c4f6..3c814ea 100644
--- a/chromeos/login/auth/login_performer.h
+++ b/chromeos/login/auth/login_performer.h
@@ -5,11 +5,11 @@
 #ifndef CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_
 #define CHROMEOS_LOGIN_AUTH_LOGIN_PERFORMER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/login/auth/auth_status_consumer.h"
diff --git a/chromeos/network/auto_connect_handler_unittest.cc b/chromeos/network/auto_connect_handler_unittest.cc
index 4f7edb6f..f04cd77 100644
--- a/chromeos/network/auto_connect_handler_unittest.cc
+++ b/chromeos/network/auto_connect_handler_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chromeos/network/auto_connect_handler.h"
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -11,7 +12,6 @@
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -153,7 +153,7 @@
 
  protected:
   bool Configure(const std::string& json_string) {
-    scoped_ptr<base::DictionaryValue> json_dict =
+    std::unique_ptr<base::DictionaryValue> json_dict =
         onc::ReadDictionaryFromJson(json_string);
     if (!json_dict) {
       LOG(ERROR) << "Error parsing json: " << json_string;
@@ -213,10 +213,10 @@
   void SetupPolicy(const std::string& network_configs_json,
                    const base::DictionaryValue& global_config,
                    bool user_policy) {
-    scoped_ptr<base::ListValue> network_configs(new base::ListValue);
+    std::unique_ptr<base::ListValue> network_configs(new base::ListValue);
     if (!network_configs_json.empty()) {
       std::string error;
-      scoped_ptr<base::Value> network_configs_value =
+      std::unique_ptr<base::Value> network_configs_value =
           base::JSONReader::ReadAndReturnError(network_configs_json,
                                                base::JSON_ALLOW_TRAILING_COMMAS,
                                                nullptr, &error);
@@ -239,16 +239,17 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  scoped_ptr<AutoConnectHandler> auto_connect_handler_;
-  scoped_ptr<ClientCertResolver> client_cert_resolver_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_config_handler_;
-  scoped_ptr<ManagedNetworkConfigurationHandlerImpl> managed_config_handler_;
-  scoped_ptr<NetworkProfileHandler> network_profile_handler_;
+  std::unique_ptr<AutoConnectHandler> auto_connect_handler_;
+  std::unique_ptr<ClientCertResolver> client_cert_resolver_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_config_handler_;
+  std::unique_ptr<ManagedNetworkConfigurationHandlerImpl>
+      managed_config_handler_;
+  std::unique_ptr<NetworkProfileHandler> network_profile_handler_;
   ShillManagerClient::TestInterface* test_manager_client_;
   ShillServiceClient::TestInterface* test_service_client_;
   crypto::ScopedTestNSSDB test_nssdb_;
-  scoped_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
+  std::unique_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
   base::MessageLoopForUI message_loop_;
 
  private:
diff --git a/chromeos/network/certificate_pattern.cc b/chromeos/network/certificate_pattern.cc
index eba1dfe..28c541a 100644
--- a/chromeos/network/certificate_pattern.cc
+++ b/chromeos/network/certificate_pattern.cc
@@ -48,6 +48,9 @@
 IssuerSubjectPattern::IssuerSubjectPattern() {
 }
 
+IssuerSubjectPattern::IssuerSubjectPattern(const IssuerSubjectPattern& other) =
+    default;
+
 IssuerSubjectPattern::~IssuerSubjectPattern() {
 }
 
@@ -82,6 +85,9 @@
 CertificatePattern::CertificatePattern() {
 }
 
+CertificatePattern::CertificatePattern(const CertificatePattern& other) =
+    default;
+
 CertificatePattern::~CertificatePattern() {
 }
 
diff --git a/chromeos/network/certificate_pattern.h b/chromeos/network/certificate_pattern.h
index 3c78764..874ab61 100644
--- a/chromeos/network/certificate_pattern.h
+++ b/chromeos/network/certificate_pattern.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_NETWORK_CERTIFICATE_PATTERN_H_
 #define CHROMEOS_NETWORK_CERTIFICATE_PATTERN_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
 namespace base {
@@ -26,6 +26,7 @@
                        const std::string& locality,
                        const std::string& organization,
                        const std::string& organizational_unit);
+  IssuerSubjectPattern(const IssuerSubjectPattern& other);
   ~IssuerSubjectPattern();
 
   // Returns true if all fields in the pattern are empty.
@@ -63,6 +64,7 @@
 class CHROMEOS_EXPORT CertificatePattern {
  public:
   CertificatePattern();
+  CertificatePattern(const CertificatePattern& other);
   ~CertificatePattern();
 
   // Returns true if this pattern has nothing set (and so would match
diff --git a/chromeos/network/client_cert_resolver.cc b/chromeos/network/client_cert_resolver.cc
index b6671bb..12beecd 100644
--- a/chromeos/network/client_cert_resolver.cc
+++ b/chromeos/network/client_cert_resolver.cc
@@ -442,7 +442,7 @@
 
 void ClientCertResolver::ResolveNetworks(
     const NetworkStateHandler::NetworkStateList& networks) {
-  scoped_ptr<std::vector<NetworkAndCertPattern>> networks_to_resolve(
+  std::unique_ptr<std::vector<NetworkAndCertPattern>> networks_to_resolve(
       new std::vector<NetworkAndCertPattern>);
 
   // Filter networks with ClientCertPattern. As ClientCertPatterns can only be
diff --git a/chromeos/network/client_cert_resolver_unittest.cc b/chromeos/network/client_cert_resolver_unittest.cc
index 2f8002d..38fdde9f 100644
--- a/chromeos/network/client_cert_resolver_unittest.cc
+++ b/chromeos/network/client_cert_resolver_unittest.cc
@@ -6,13 +6,14 @@
 #include <cert.h>
 #include <pk11pub.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "base/test/simple_test_clock.h"
@@ -203,8 +204,9 @@
         "} ]";
 
     std::string error;
-    scoped_ptr<base::Value> policy_value = base::JSONReader::ReadAndReturnError(
-        kTestPolicy, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
+    std::unique_ptr<base::Value> policy_value =
+        base::JSONReader::ReadAndReturnError(
+            kTestPolicy, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
     ASSERT_TRUE(policy_value) << error;
 
     base::ListValue* policy = nullptr;
@@ -240,8 +242,9 @@
         kTestPolicyTemplate, identity.c_str(), test_ca_cert_pem_.c_str());
 
     std::string error;
-    scoped_ptr<base::Value> policy_value = base::JSONReader::ReadAndReturnError(
-        policy_json, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
+    std::unique_ptr<base::Value> policy_value =
+        base::JSONReader::ReadAndReturnError(
+            policy_json, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
     ASSERT_TRUE(policy_value) << error;
 
     base::ListValue* policy = nullptr;
@@ -271,8 +274,8 @@
 
   int network_properties_changed_count_;
   std::string test_cert_id_;
-  scoped_ptr<base::SimpleTestClock> test_clock_;
-  scoped_ptr<ClientCertResolver> client_cert_resolver_;
+  std::unique_ptr<base::SimpleTestClock> test_clock_;
+  std::unique_ptr<ClientCertResolver> client_cert_resolver_;
 
  private:
   // ClientCertResolver::Observer:
@@ -284,15 +287,16 @@
   ShillServiceClient::TestInterface* service_test_;
   ShillProfileClient::TestInterface* profile_test_;
   CertLoader* cert_loader_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkProfileHandler> network_profile_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_config_handler_;
-  scoped_ptr<ManagedNetworkConfigurationHandlerImpl> managed_config_handler_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkProfileHandler> network_profile_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_config_handler_;
+  std::unique_ptr<ManagedNetworkConfigurationHandlerImpl>
+      managed_config_handler_;
   base::MessageLoop message_loop_;
   scoped_refptr<net::X509Certificate> test_client_cert_;
   std::string test_ca_cert_pem_;
   crypto::ScopedTestNSSDB test_nssdb_;
-  scoped_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
+  std::unique_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
 
   DISALLOW_COPY_AND_ASSIGN(ClientCertResolverTest);
 };
diff --git a/chromeos/network/client_cert_util.cc b/chromeos/network/client_cert_util.cc
index 0fface7e..361664f 100644
--- a/chromeos/network/client_cert_util.cc
+++ b/chromeos/network/client_cert_util.cc
@@ -264,6 +264,8 @@
       client_cert_type(onc::client_cert::kClientCertTypeNone) {
 }
 
+ClientCertConfig::ClientCertConfig(const ClientCertConfig& other) = default;
+
 void OncToClientCertConfig(const base::DictionaryValue& network_config,
                            ClientCertConfig* cert_config) {
   using namespace ::onc;
diff --git a/chromeos/network/client_cert_util.h b/chromeos/network/client_cert_util.h
index 6b41413..e687e06 100644
--- a/chromeos/network/client_cert_util.h
+++ b/chromeos/network/client_cert_util.h
@@ -35,6 +35,7 @@
 
 struct CHROMEOS_EXPORT ClientCertConfig {
   ClientCertConfig();
+  ClientCertConfig(const ClientCertConfig& other);
 
   // Independent of whether the client cert (pattern or reference) is
   // configured, the location determines whether this network configuration
diff --git a/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h b/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h
index 71b431db..db89026 100644
--- a/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h
+++ b/chromeos/network/dhcp_proxy_script_fetcher_chromeos.h
@@ -5,9 +5,10 @@
 #ifndef CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_
 #define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "net/proxy/dhcp_proxy_script_fetcher.h"
@@ -47,7 +48,7 @@
                      std::string pac_url);
 
   net::URLRequestContext* url_request_context_;  // Weak ptr
-  scoped_ptr<net::ProxyScriptFetcher> proxy_script_fetcher_;
+  std::unique_ptr<net::ProxyScriptFetcher> proxy_script_fetcher_;
   scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_;
 
   GURL pac_url_;
diff --git a/chromeos/network/firewall_hole.cc b/chromeos/network/firewall_hole.cc
index 29abf03..5dec89d 100644
--- a/chromeos/network/firewall_hole.cc
+++ b/chromeos/network/firewall_hole.cc
@@ -7,10 +7,12 @@
 #include <fcntl.h>
 #include <stdint.h>
 #include <unistd.h>
+
 #include <utility>
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/threading/worker_pool.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/permission_broker_client.h"
@@ -139,7 +141,7 @@
                                      const FirewallHole::OpenCallback& callback,
                                      bool success) {
   if (success) {
-    callback.Run(make_scoped_ptr(
+    callback.Run(base::WrapUnique(
         new FirewallHole(type, port, interface, std::move(lifeline_fd))));
   } else {
     callback.Run(nullptr);
diff --git a/chromeos/network/firewall_hole.h b/chromeos/network/firewall_hole.h
index e6d119d..63a7bc0e 100644
--- a/chromeos/network/firewall_hole.h
+++ b/chromeos/network/firewall_hole.h
@@ -6,10 +6,11 @@
 #define CHROMEOS_NETWORK_FIREWALL_HOLE_H_
 
 #include <stdint.h>
+
+#include <memory>
 #include <string>
 
 #include "base/callback_forward.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "dbus/file_descriptor.h"
 
@@ -24,7 +25,7 @@
     TCP,
   };
 
-  typedef base::Callback<void(scoped_ptr<FirewallHole>)> OpenCallback;
+  typedef base::Callback<void(std::unique_ptr<FirewallHole>)> OpenCallback;
 
   // Opens a port on the system firewall for the given network interface (or all
   // interfaces if |interface| is ""). The hole will be closed when the object
diff --git a/chromeos/network/firewall_hole_unittest.cc b/chromeos/network/firewall_hole_unittest.cc
index 3032d5b8..ad6fdc0f 100644
--- a/chromeos/network/firewall_hole_unittest.cc
+++ b/chromeos/network/firewall_hole_unittest.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chromeos/network/firewall_hole.h"
+
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/mock_permission_broker_client.h"
-#include "chromeos/network/firewall_hole.h"
 #include "dbus/file_descriptor.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -34,17 +36,17 @@
   void SetUp() override {
     mock_permission_broker_client_ = new MockPermissionBrokerClient();
     DBusThreadManager::GetSetterForTesting()->SetPermissionBrokerClient(
-        make_scoped_ptr(mock_permission_broker_client_));
+        base::WrapUnique(mock_permission_broker_client_));
   }
 
   void TearDown() override { DBusThreadManager::Shutdown(); }
 
-  void AssertOpenSuccess(scoped_ptr<FirewallHole> hole) {
+  void AssertOpenSuccess(std::unique_ptr<FirewallHole> hole) {
     EXPECT_TRUE(hole.get() != nullptr);
     run_loop_.Quit();
   }
 
-  void AssertOpenFailure(scoped_ptr<FirewallHole> hole) {
+  void AssertOpenFailure(std::unique_ptr<FirewallHole> hole) {
     EXPECT_TRUE(hole.get() == nullptr);
     run_loop_.Quit();
   }
diff --git a/chromeos/network/geolocation_handler_unittest.cc b/chromeos/network/geolocation_handler_unittest.cc
index 6a64a91..7cf1fc9 100644
--- a/chromeos/network/geolocation_handler_unittest.cc
+++ b/chromeos/network/geolocation_handler_unittest.cc
@@ -2,15 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chromeos/network/geolocation_handler.h"
+
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/values.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/shill_manager_client.h"
-#include "chromeos/network/geolocation_handler.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/cros_system_api/dbus/service_constants.h"
 
@@ -64,7 +66,7 @@
 
  protected:
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<GeolocationHandler> geolocation_handler_;
+  std::unique_ptr<GeolocationHandler> geolocation_handler_;
   ShillManagerClient::TestInterface* manager_test_;
   WifiAccessPointVector wifi_access_points_;
 
diff --git a/chromeos/network/host_resolver_impl_chromeos.cc b/chromeos/network/host_resolver_impl_chromeos.cc
index 6b9086e..93c16ed 100644
--- a/chromeos/network/host_resolver_impl_chromeos.cc
+++ b/chromeos/network/host_resolver_impl_chromeos.cc
@@ -189,21 +189,21 @@
 }
 
 // static
-scoped_ptr<net::HostResolver> HostResolverImplChromeOS::CreateSystemResolver(
-    const Options& options,
-    net::NetLog* net_log) {
-  return scoped_ptr<net::HostResolver>(new HostResolverImplChromeOS(
+std::unique_ptr<net::HostResolver>
+HostResolverImplChromeOS::CreateSystemResolver(const Options& options,
+                                               net::NetLog* net_log) {
+  return std::unique_ptr<net::HostResolver>(new HostResolverImplChromeOS(
       NetworkHandler::Get()->task_runner(),
       NetworkHandler::Get()->network_state_handler(), options, net_log));
 }
 
 // static
-scoped_ptr<net::HostResolver>
+std::unique_ptr<net::HostResolver>
 HostResolverImplChromeOS::CreateHostResolverForTest(
     scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner,
     NetworkStateHandler* network_state_handler) {
   Options options;
-  return scoped_ptr<net::HostResolver>(new HostResolverImplChromeOS(
+  return std::unique_ptr<net::HostResolver>(new HostResolverImplChromeOS(
       network_handler_task_runner, network_state_handler, options, NULL));
 }
 
diff --git a/chromeos/network/host_resolver_impl_chromeos.h b/chromeos/network/host_resolver_impl_chromeos.h
index d4acf0f6..b86c427 100644
--- a/chromeos/network/host_resolver_impl_chromeos.h
+++ b/chromeos/network/host_resolver_impl_chromeos.h
@@ -32,12 +32,12 @@
   // This is expected to be constructed on the same thread that Resolve() is
   // called from, i.e. the IO thread, which is presumed to differ from the
   // thread that NetworkStateHandler is called on, i.e. the UI thread.
-  static scoped_ptr<net::HostResolver> CreateSystemResolver(
+  static std::unique_ptr<net::HostResolver> CreateSystemResolver(
       const Options& options,
       net::NetLog* net_log);
 
   // Creates a host resolver instance for testing.
-  static scoped_ptr<net::HostResolver> CreateHostResolverForTest(
+  static std::unique_ptr<net::HostResolver> CreateHostResolverForTest(
       scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner,
       NetworkStateHandler* network_state_handler);
 
diff --git a/chromeos/network/host_resolver_impl_chromeos_unittest.cc b/chromeos/network/host_resolver_impl_chromeos_unittest.cc
index 718ce54..cba7e818 100644
--- a/chromeos/network/host_resolver_impl_chromeos_unittest.cc
+++ b/chromeos/network/host_resolver_impl_chromeos_unittest.cc
@@ -4,9 +4,10 @@
 
 #include "chromeos/network/host_resolver_impl_chromeos.h"
 
+#include <memory>
+
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/stringprintf.h"
@@ -145,8 +146,8 @@
         base::Bind(&DoNothingWithCallStatus));
   }
 
-  scoped_ptr<chromeos::NetworkStateHandler> network_state_handler_;
-  scoped_ptr<net::HostResolver> host_resolver_;
+  std::unique_ptr<chromeos::NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<net::HostResolver> host_resolver_;
   base::MessageLoop io_message_loop_;
   net::BoundNetLog net_log_;
 
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index 4574f77..8c69da9 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -4,6 +4,7 @@
 
 #include "chromeos/network/managed_network_configuration_handler_impl.h"
 
+#include <memory>
 #include <utility>
 #include <vector>
 
@@ -11,7 +12,7 @@
 #include "base/guid.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
 #include "base/values.h"
@@ -72,7 +73,7 @@
 
 void LogErrorWithDict(const tracked_objects::Location& from_where,
                       const std::string& error_name,
-                      scoped_ptr<base::DictionaryValue> error_data) {
+                      std::unique_ptr<base::DictionaryValue> error_data) {
   device_event_log::AddEntry(from_where.file_name(), from_where.line_number(),
                              device_event_log::LOG_TYPE_NETWORK,
                              device_event_log::LOG_LEVEL_ERROR, error_name);
@@ -138,7 +139,7 @@
     const network_handler::DictionaryResultCallback& callback,
     const network_handler::ErrorCallback& error_callback,
     const std::string& service_path,
-    scoped_ptr<base::DictionaryValue> shill_properties) {
+    std::unique_ptr<base::DictionaryValue> shill_properties) {
   std::string profile_path;
   shill_properties->GetStringWithoutPathExpansion(shill::kProfileProperty,
                                                   &profile_path);
@@ -147,7 +148,7 @@
   if (!profile)
     NET_LOG_ERROR("No profile for service: " + profile_path, service_path);
 
-  scoped_ptr<NetworkUIData> ui_data =
+  std::unique_ptr<NetworkUIData> ui_data =
       shill_property_util::GetUIDataFromProperties(*shill_properties);
 
   const base::DictionaryValue* user_settings = NULL;
@@ -168,7 +169,7 @@
   FindPolicyByGUID(userhash, guid, &onc_source);
   const NetworkState* network_state =
       network_state_handler_->GetNetworkState(service_path);
-  scoped_ptr<base::DictionaryValue> active_settings(
+  std::unique_ptr<base::DictionaryValue> active_settings(
       onc::TranslateShillServiceToONCPart(*shill_properties, onc_source,
                                           &onc::kNetworkWithStateSignature,
                                           network_state));
@@ -187,11 +188,9 @@
     global_policy = &policies->global_network_config;
   }
 
-  scoped_ptr<base::DictionaryValue> augmented_properties(
-      policy_util::CreateManagedONC(global_policy,
-                                    network_policy,
-                                    user_settings,
-                                    active_settings.get(),
+  std::unique_ptr<base::DictionaryValue> augmented_properties(
+      policy_util::CreateManagedONC(global_policy, network_policy,
+                                    user_settings, active_settings.get(),
                                     profile));
   callback.Run(service_path, *augmented_properties);
 }
@@ -220,7 +219,7 @@
     const network_handler::DictionaryResultCallback& callback,
     const network_handler::ErrorCallback& error_callback,
     const std::string& service_path,
-    scoped_ptr<base::DictionaryValue> shill_properties) {
+    std::unique_ptr<base::DictionaryValue> shill_properties) {
   const NetworkState* network_state =
       network_state_handler_->GetNetworkState(service_path);
 
@@ -230,7 +229,7 @@
   ::onc::ONCSource onc_source;
   FindPolicyByGUID(userhash, guid, &onc_source);
 
-  scoped_ptr<base::DictionaryValue> onc_network(
+  std::unique_ptr<base::DictionaryValue> onc_network(
       onc::TranslateShillServiceToONCPart(*shill_properties, onc_source,
                                           &onc::kNetworkWithStateSignature,
                                           network_state));
@@ -277,7 +276,7 @@
 
   // We need to ensure that required configuration properties (e.g. Type) are
   // included for ONC validation and translation to Shill properties.
-  scoped_ptr<base::DictionaryValue> user_settings_copy(
+  std::unique_ptr<base::DictionaryValue> user_settings_copy(
       user_settings.DeepCopy());
   user_settings_copy->SetStringWithoutPathExpansion(
       ::onc::network_config::kType,
@@ -292,11 +291,10 @@
                            false);  // This ONC does not come from policy.
 
   onc::Validator::Result validation_result;
-  scoped_ptr<base::DictionaryValue> validated_user_settings =
-      validator.ValidateAndRepairObject(
-          &onc::kNetworkConfigurationSignature,
-          *user_settings_copy,
-          &validation_result);
+  std::unique_ptr<base::DictionaryValue> validated_user_settings =
+      validator.ValidateAndRepairObject(&onc::kNetworkConfigurationSignature,
+                                        *user_settings_copy,
+                                        &validation_result);
   if (validation_result == onc::Validator::INVALID) {
     InvokeErrorCallback(service_path, error_callback, kInvalidUserSettings);
     return;
@@ -315,12 +313,10 @@
   VLOG(2) << "This configuration is " << (network_policy ? "" : "not ")
           << "managed.";
 
-  scoped_ptr<base::DictionaryValue> shill_dictionary(
-      policy_util::CreateShillConfiguration(*profile,
-                                            guid,
-                                            &policies->global_network_config,
-                                            network_policy,
-                                            validated_user_settings.get()));
+  std::unique_ptr<base::DictionaryValue> shill_dictionary(
+      policy_util::CreateShillConfiguration(
+          *profile, guid, &policies->global_network_config, network_policy,
+          validated_user_settings.get()));
 
   // 'Carrier' needs to be handled specially if set.
   base::DictionaryValue* cellular = nullptr;
@@ -346,7 +342,7 @@
 
 void ManagedNetworkConfigurationHandlerImpl::SetShillProperties(
     const std::string& service_path,
-    scoped_ptr<base::DictionaryValue> shill_dictionary,
+    std::unique_ptr<base::DictionaryValue> shill_dictionary,
     const base::Closure& callback,
     const network_handler::ErrorCallback& error_callback) {
   network_configuration_handler_->SetShillProperties(
@@ -386,9 +382,8 @@
   // Generate a new GUID for this configuration. Ignore the maybe provided GUID
   // in |properties| as it is not our own and from an untrusted source.
   std::string guid = base::GenerateGUID();
-  scoped_ptr<base::DictionaryValue> shill_dictionary(
-      policy_util::CreateShillConfiguration(*profile,
-                                            guid,
+  std::unique_ptr<base::DictionaryValue> shill_dictionary(
+      policy_util::CreateShillConfiguration(*profile, guid,
                                             NULL,  // no global policy
                                             NULL,  // no network policy
                                             &properties));
@@ -423,7 +418,7 @@
     policies = policies_by_user_[userhash].get();
   } else {
     policies = new Policies;
-    policies_by_user_[userhash] = make_scoped_ptr(policies);
+    policies_by_user_[userhash] = base::WrapUnique(policies);
   }
 
   policies->global_network_config.MergeDictionary(&global_network_config);
@@ -516,7 +511,7 @@
                            policies->global_network_config,
                            this,
                            modified_policies);
-  policy_applicators_[userhash] = make_scoped_ptr(applicator);
+  policy_applicators_[userhash] = base::WrapUnique(applicator);
   applicator->Run();
   return true;
 }
@@ -786,7 +781,7 @@
     GetDevicePropertiesCallback send_callback,
     const std::string& service_path,
     const base::DictionaryValue& shill_properties) {
-  scoped_ptr<base::DictionaryValue> shill_properties_copy(
+  std::unique_ptr<base::DictionaryValue> shill_properties_copy(
       shill_properties.DeepCopy());
 
   std::string guid;
@@ -826,7 +821,7 @@
 
   // Request the device properties. On success or failure pass (a possibly
   // modified) |shill_properties| to |send_callback|.
-  scoped_ptr<base::DictionaryValue> shill_properties_copy_error_copy(
+  std::unique_ptr<base::DictionaryValue> shill_properties_copy_error_copy(
       shill_properties_copy->DeepCopy());
   network_device_handler_->GetDeviceProperties(
       device_path,
@@ -846,7 +841,7 @@
 
 void ManagedNetworkConfigurationHandlerImpl::GetDevicePropertiesSuccess(
     const std::string& service_path,
-    scoped_ptr<base::DictionaryValue> network_properties,
+    std::unique_ptr<base::DictionaryValue> network_properties,
     GetDevicePropertiesCallback send_callback,
     const std::string& device_path,
     const base::DictionaryValue& device_properties) {
@@ -858,10 +853,10 @@
 
 void ManagedNetworkConfigurationHandlerImpl::GetDevicePropertiesFailure(
     const std::string& service_path,
-    scoped_ptr<base::DictionaryValue> network_properties,
+    std::unique_ptr<base::DictionaryValue> network_properties,
     GetDevicePropertiesCallback send_callback,
     const std::string& error_name,
-    scoped_ptr<base::DictionaryValue> error_data) {
+    std::unique_ptr<base::DictionaryValue> error_data) {
   NET_LOG_ERROR("Error getting device properties", service_path);
   send_callback.Run(service_path, std::move(network_properties));
 }
diff --git a/chromeos/network/managed_network_configuration_handler_impl.h b/chromeos/network/managed_network_configuration_handler_impl.h
index c94e4467..78b2919 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.h
+++ b/chromeos/network/managed_network_configuration_handler_impl.h
@@ -6,12 +6,12 @@
 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/network/managed_network_configuration_handler.h"
@@ -115,11 +115,12 @@
   friend class ProhibitedTechnologiesHandlerTest;
 
   struct Policies;
-  typedef base::Callback<void(const std::string& service_path,
-                              scoped_ptr<base::DictionaryValue> properties)>
+  typedef base::Callback<void(
+      const std::string& service_path,
+      std::unique_ptr<base::DictionaryValue> properties)>
       GetDevicePropertiesCallback;
-  typedef std::map<std::string, scoped_ptr<Policies>> UserToPoliciesMap;
-  typedef std::map<std::string, scoped_ptr<PolicyApplicator>>
+  typedef std::map<std::string, std::unique_ptr<Policies>> UserToPoliciesMap;
+  typedef std::map<std::string, std::unique_ptr<PolicyApplicator>>
       UserToPolicyApplicatorMap;
   typedef std::map<std::string, std::set<std::string>>
       UserToModifiedPoliciesMap;
@@ -140,14 +141,14 @@
       const network_handler::DictionaryResultCallback& callback,
       const network_handler::ErrorCallback& error_callback,
       const std::string& service_path,
-      scoped_ptr<base::DictionaryValue> shill_properties);
+      std::unique_ptr<base::DictionaryValue> shill_properties);
 
   // Sends the response to the caller of GetProperties.
   void SendProperties(const std::string& userhash,
                       const network_handler::DictionaryResultCallback& callback,
                       const network_handler::ErrorCallback& error_callback,
                       const std::string& service_path,
-                      scoped_ptr<base::DictionaryValue> shill_properties);
+                      std::unique_ptr<base::DictionaryValue> shill_properties);
 
   const Policies* GetPoliciesForUser(const std::string& userhash) const;
   const Policies* GetPoliciesForProfile(const NetworkProfile& profile) const;
@@ -172,22 +173,23 @@
 
   void GetDevicePropertiesSuccess(
       const std::string& service_path,
-      scoped_ptr<base::DictionaryValue> network_properties,
+      std::unique_ptr<base::DictionaryValue> network_properties,
       GetDevicePropertiesCallback send_callback,
       const std::string& device_path,
       const base::DictionaryValue& device_properties);
   void GetDevicePropertiesFailure(
       const std::string& service_path,
-      scoped_ptr<base::DictionaryValue> network_properties,
+      std::unique_ptr<base::DictionaryValue> network_properties,
       GetDevicePropertiesCallback send_callback,
       const std::string& error_name,
-      scoped_ptr<base::DictionaryValue> error_data);
+      std::unique_ptr<base::DictionaryValue> error_data);
 
   // Called from SetProperties, calls NCH::SetShillProperties.
-  void SetShillProperties(const std::string& service_path,
-                          scoped_ptr<base::DictionaryValue> shill_dictionary,
-                          const base::Closure& callback,
-                          const network_handler::ErrorCallback& error_callback);
+  void SetShillProperties(
+      const std::string& service_path,
+      std::unique_ptr<base::DictionaryValue> shill_dictionary,
+      const base::Closure& callback,
+      const network_handler::ErrorCallback& error_callback);
 
   // Applies policies for |userhash|. |modified_policies| must be not null and
   // contain the GUIDs of the network configurations that changed since the last
diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc
index 30b1891..83c8f22 100644
--- a/chromeos/network/managed_network_configuration_handler_unittest.cc
+++ b/chromeos/network/managed_network_configuration_handler_unittest.cc
@@ -3,13 +3,13 @@
 // found in the LICENSE file.
 
 #include <iostream>
+#include <memory>
 #include <sstream>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
@@ -124,7 +124,7 @@
                                                        &entries);
     ASSERT_TRUE(entries);
 
-    scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue);
+    std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue);
     base::ListValue* entry_paths = new base::ListValue;
     result->SetWithoutPathExpansion(shill::kEntriesProperty, entry_paths);
     for (base::DictionaryValue::Iterator it(*entries); !it.IsAtEnd();
@@ -230,17 +230,17 @@
   ~ManagedNetworkConfigurationHandlerTest() override {}
 
   void SetUp() override {
-    scoped_ptr<DBusThreadManagerSetter> dbus_setter =
+    std::unique_ptr<DBusThreadManagerSetter> dbus_setter =
         DBusThreadManager::GetSetterForTesting();
     mock_manager_client_ = new StrictMock<MockShillManagerClient>();
     mock_profile_client_ = new StrictMock<MockShillProfileClient>();
     mock_service_client_ = new StrictMock<MockShillServiceClient>();
     dbus_setter->SetShillManagerClient(
-        scoped_ptr<ShillManagerClient>(mock_manager_client_));
+        std::unique_ptr<ShillManagerClient>(mock_manager_client_));
     dbus_setter->SetShillProfileClient(
-        scoped_ptr<ShillProfileClient>(mock_profile_client_));
+        std::unique_ptr<ShillProfileClient>(mock_profile_client_));
     dbus_setter->SetShillServiceClient(
-        scoped_ptr<ShillServiceClient>(mock_service_client_));
+        std::unique_ptr<ShillServiceClient>(mock_service_client_));
 
     SetNetworkConfigurationHandlerExpectations();
 
@@ -304,7 +304,7 @@
   void SetUpEntry(const std::string& path_to_shill_json,
                   const std::string& profile_path,
                   const std::string& entry_path) {
-    scoped_ptr<base::DictionaryValue> entry =
+    std::unique_ptr<base::DictionaryValue> entry =
         test_utils::ReadTestDictionary(path_to_shill_json);
     profiles_stub_.AddEntry(profile_path, entry_path, *entry);
   }
@@ -312,7 +312,7 @@
   void SetPolicy(::onc::ONCSource onc_source,
                  const std::string& userhash,
                  const std::string& path_to_onc) {
-    scoped_ptr<base::DictionaryValue> policy;
+    std::unique_ptr<base::DictionaryValue> policy;
     if (path_to_onc.empty())
       policy = onc::ReadDictionaryFromJson(onc::kEmptyUnencryptedConfiguration);
     else
@@ -367,8 +367,9 @@
     get_properties_result_.MergeDictionary(&dictionary);
   }
 
-  static void UnexpectedError(const std::string& error_name,
-                              scoped_ptr<base::DictionaryValue> error_data) {
+  static void UnexpectedError(
+      const std::string& error_name,
+      std::unique_ptr<base::DictionaryValue> error_data) {
     ASSERT_FALSE(true);
   }
 
@@ -379,11 +380,11 @@
   ShillProfileTestClient profiles_stub_;
   ShillServiceTestClient services_stub_;
   TestNetworkPolicyObserver policy_observer_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<TestNetworkProfileHandler> network_profile_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
-  scoped_ptr<ManagedNetworkConfigurationHandlerImpl>
-        managed_network_configuration_handler_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<TestNetworkProfileHandler> network_profile_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_;
+  std::unique_ptr<ManagedNetworkConfigurationHandlerImpl>
+      managed_network_configuration_handler_;
   base::MessageLoop message_loop_;
 
   std::string get_properties_service_path_;
@@ -400,7 +401,7 @@
 
 TEST_F(ManagedNetworkConfigurationHandlerTest, RemoveIrrelevantFields) {
   InitializeStandardProfiles();
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unconfigured_wifi1.json");
 
@@ -421,7 +422,7 @@
 
 TEST_F(ManagedNetworkConfigurationHandlerTest, SetPolicyManageUnconfigured) {
   InitializeStandardProfiles();
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unconfigured_wifi1.json");
 
@@ -440,7 +441,7 @@
 
 TEST_F(ManagedNetworkConfigurationHandlerTest, EnableManagedCredentialsWiFi) {
   InitializeStandardProfiles();
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_autoconnect_on_unconfigured_wifi1.json");
 
@@ -460,7 +461,7 @@
 
 TEST_F(ManagedNetworkConfigurationHandlerTest, EnableManagedCredentialsVPN) {
   InitializeStandardProfiles();
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_autoconnect_on_unconfigured_vpn.json");
 
@@ -483,7 +484,7 @@
 TEST_F(ManagedNetworkConfigurationHandlerTest,
        SetPolicyManageUnmanagedEthernetEAP) {
   InitializeStandardProfiles();
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/"
           "shill_policy_on_unmanaged_ethernet_eap.json");
@@ -625,7 +626,7 @@
              kUser1ProfilePath,
              "old_entry_path");
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unmanaged_wifi1.json");
 
@@ -658,7 +659,7 @@
              kUser1ProfilePath,
              "old_entry_path");
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unmanaged_wifi1.json");
 
@@ -689,7 +690,7 @@
              kUser1ProfilePath,
              "old_entry_path");
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unmanaged_wifi1.json");
 
@@ -723,9 +724,8 @@
   InitializeStandardProfiles();
   SetUpEntry("policy/shill_managed_vpn.json", kUser1ProfilePath, "entry_path");
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
-      test_utils::ReadTestDictionary(
-          "policy/shill_policy_on_managed_vpn.json");
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
+      test_utils::ReadTestDictionary("policy/shill_policy_on_managed_vpn.json");
 
   EXPECT_CALL(*mock_profile_client_,
               GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _));
@@ -751,7 +751,7 @@
              kUser1ProfilePath,
              "old_entry_path");
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unmanaged_wifi1.json");
 
@@ -845,7 +845,7 @@
       *mock_profile_client_,
       GetEntry(dbus::ObjectPath(kUser1ProfilePath), "wifi2_entry_path", _, _));
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unconfigured_wifi1.json");
 
@@ -875,7 +875,7 @@
       *mock_profile_client_,
       GetEntry(dbus::ObjectPath(kUser1ProfilePath), "wifi2_entry_path", _, _));
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_disallow_autoconnect_on_unmanaged_wifi2.json");
 
@@ -915,7 +915,7 @@
 
   EXPECT_EQ("wifi2", get_properties_service_path_);
 
-  scoped_ptr<base::DictionaryValue> expected_managed_onc =
+  std::unique_ptr<base::DictionaryValue> expected_managed_onc =
       test_utils::ReadTestDictionary(
           "policy/managed_onc_disallow_autoconnect_on_unmanaged_wifi2.onc");
   EXPECT_TRUE(onc::test_utils::Equals(expected_managed_onc.get(),
@@ -928,7 +928,7 @@
   message_loop_.RunUntilIdle();
   VerifyAndClearExpectations();
 
-  scoped_ptr<base::DictionaryValue> expected_shill_properties =
+  std::unique_ptr<base::DictionaryValue> expected_shill_properties =
       test_utils::ReadTestDictionary(
           "policy/shill_policy_on_unconfigured_wifi1.json");
 
diff --git a/chromeos/network/network_cert_migrator_unittest.cc b/chromeos/network/network_cert_migrator_unittest.cc
index d24d67b..e41cf66 100644
--- a/chromeos/network/network_cert_migrator_unittest.cc
+++ b/chromeos/network/network_cert_migrator_unittest.cc
@@ -191,10 +191,10 @@
   base::MessageLoop message_loop_;
 
  private:
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkCertMigrator> network_cert_migrator_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkCertMigrator> network_cert_migrator_;
   crypto::ScopedTestNSSDB test_nssdb_;
-  scoped_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
+  std::unique_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
 
   DISALLOW_COPY_AND_ASSIGN(NetworkCertMigratorTest);
 };
diff --git a/chromeos/network/network_change_notifier_chromeos.h b/chromeos/network/network_change_notifier_chromeos.h
index ed24045..4ae126a 100644
--- a/chromeos/network/network_change_notifier_chromeos.h
+++ b/chromeos/network/network_change_notifier_chromeos.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
 #define CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "chromeos/chromeos_export.h"
@@ -101,7 +101,7 @@
   // default network.
   double max_bandwidth_mbps_;
 
-  scoped_ptr<DnsConfigService> dns_config_service_;
+  std::unique_ptr<DnsConfigService> dns_config_service_;
 
   // Callback for refreshing network state.
   base::Closure poll_callback_;
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc
index 0cb32db6..7cabfdf0 100644
--- a/chromeos/network/network_configuration_handler.cc
+++ b/chromeos/network/network_configuration_handler.cc
@@ -221,7 +221,7 @@
   }
   NET_LOG(USER) << "SetShillProperties: " << service_path;
 
-  scoped_ptr<base::DictionaryValue> properties_to_set(
+  std::unique_ptr<base::DictionaryValue> properties_to_set(
       shill_properties.DeepCopy());
 
   // Make sure that the GUID is saved to Shill when setting properties.
@@ -237,7 +237,7 @@
 
   LogConfigProperties("SetProperty", service_path, *properties_to_set);
 
-  scoped_ptr<base::DictionaryValue> properties_copy(
+  std::unique_ptr<base::DictionaryValue> properties_copy(
       properties_to_set->DeepCopy());
   DBusThreadManager::Get()->GetShillServiceClient()->SetProperties(
       dbus::ObjectPath(service_path), *properties_to_set,
@@ -296,7 +296,7 @@
     return;
   }
 
-  scoped_ptr<base::DictionaryValue> properties_to_set(
+  std::unique_ptr<base::DictionaryValue> properties_to_set(
       shill_properties.DeepCopy());
 
   NET_LOG(USER) << "CreateShillConfiguration: " << type << ": " << network_id;
@@ -317,7 +317,7 @@
 
   LogConfigProperties("Configure", type, *properties_to_set);
 
-  scoped_ptr<base::DictionaryValue> properties_copy(
+  std::unique_ptr<base::DictionaryValue> properties_copy(
       properties_to_set->DeepCopy());
   manager->ConfigureServiceForProfile(
       dbus::ObjectPath(profile_path), *properties_to_set,
@@ -392,7 +392,7 @@
 void NetworkConfigurationHandler::RunCreateNetworkCallback(
     const std::string& profile_path,
     NetworkConfigurationObserver::Source source,
-    scoped_ptr<base::DictionaryValue> configure_properties,
+    std::unique_ptr<base::DictionaryValue> configure_properties,
     const network_handler::ServiceResultCallback& callback,
     const dbus::ObjectPath& service_path) {
   if (!callback.is_null()) {
@@ -458,7 +458,7 @@
     return;
 
   // Get the correct name from WifiHex if necessary.
-  scoped_ptr<base::DictionaryValue> properties_copy(properties.DeepCopy());
+  std::unique_ptr<base::DictionaryValue> properties_copy(properties.DeepCopy());
   std::string name =
       shill_property_util::GetNameFromProperties(service_path, properties);
   if (!name.empty())
@@ -481,7 +481,7 @@
 
 void NetworkConfigurationHandler::SetPropertiesSuccessCallback(
     const std::string& service_path,
-    scoped_ptr<base::DictionaryValue> set_properties,
+    std::unique_ptr<base::DictionaryValue> set_properties,
     NetworkConfigurationObserver::Source source,
     const base::Closure& callback) {
   if (!callback.is_null())
diff --git a/chromeos/network/network_configuration_handler.h b/chromeos/network/network_configuration_handler.h
index b2e85be..116855e 100644
--- a/chromeos/network/network_configuration_handler.h
+++ b/chromeos/network/network_configuration_handler.h
@@ -6,13 +6,13 @@
 #define CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
@@ -141,7 +141,7 @@
   void RunCreateNetworkCallback(
       const std::string& profile_path,
       NetworkConfigurationObserver::Source source,
-      scoped_ptr<base::DictionaryValue> configure_properties,
+      std::unique_ptr<base::DictionaryValue> configure_properties,
       const network_handler::ServiceResultCallback& callback,
       const dbus::ObjectPath& service_path);
 
@@ -173,7 +173,7 @@
   // for the service after setting properties.
   void SetPropertiesSuccessCallback(
       const std::string& service_path,
-      scoped_ptr<base::DictionaryValue> set_properties,
+      std::unique_ptr<base::DictionaryValue> set_properties,
       NetworkConfigurationObserver::Source source,
       const base::Closure& callback);
   void SetPropertiesErrorCallback(
diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc
index cc8b3ee..4d9d517 100644
--- a/chromeos/network/network_configuration_handler_unittest.cc
+++ b/chromeos/network/network_configuration_handler_unittest.cc
@@ -67,7 +67,7 @@
 void ErrorCallback(bool error_expected,
                    const std::string& expected_id,
                    const std::string& error_name,
-                   scoped_ptr<base::DictionaryValue> error_data) {
+                   std::unique_ptr<base::DictionaryValue> error_data) {
   EXPECT_TRUE(error_expected) << "Unexpected error: " << error_name
                               << " with associated data: \n"
                               << PrettyJson(*error_data);
@@ -183,17 +183,17 @@
   ~NetworkConfigurationHandlerTest() override {}
 
   void SetUp() override {
-    scoped_ptr<DBusThreadManagerSetter> dbus_setter =
+    std::unique_ptr<DBusThreadManagerSetter> dbus_setter =
         DBusThreadManager::GetSetterForTesting();
     mock_manager_client_ = new MockShillManagerClient();
     mock_profile_client_ = new MockShillProfileClient();
     mock_service_client_ = new MockShillServiceClient();
     dbus_setter->SetShillManagerClient(
-        scoped_ptr<ShillManagerClient>(mock_manager_client_));
+        std::unique_ptr<ShillManagerClient>(mock_manager_client_));
     dbus_setter->SetShillProfileClient(
-        scoped_ptr<ShillProfileClient>(mock_profile_client_));
+        std::unique_ptr<ShillProfileClient>(mock_profile_client_));
     dbus_setter->SetShillServiceClient(
-        scoped_ptr<ShillServiceClient>(mock_service_client_));
+        std::unique_ptr<ShillServiceClient>(mock_service_client_));
 
     EXPECT_CALL(*mock_service_client_, GetProperties(_, _)).Times(AnyNumber());
     EXPECT_CALL(*mock_manager_client_, GetProperties(_)).Times(AnyNumber());
@@ -295,8 +295,8 @@
   MockShillManagerClient* mock_manager_client_;
   MockShillProfileClient* mock_profile_client_;
   MockShillServiceClient* mock_service_client_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_;
   base::MessageLoopForUI message_loop_;
   base::DictionaryValue* dictionary_value_result_;
 };
@@ -306,7 +306,7 @@
   std::string expected_json = "{\n   \"SSID\": \"MyNetwork\"\n}\n";
   std::string networkName = "MyNetwork";
   std::string key = "SSID";
-  scoped_ptr<base::StringValue> networkNameValue(
+  std::unique_ptr<base::StringValue> networkNameValue(
       new base::StringValue(networkName));
 
   base::DictionaryValue value;
@@ -335,7 +335,7 @@
   std::string service_path = "/service/1";
   std::string networkName = "MyNetwork";
   std::string key = "SSID";
-  scoped_ptr<base::StringValue> networkNameValue(
+  std::unique_ptr<base::StringValue> networkNameValue(
       new base::StringValue(networkName));
 
   base::DictionaryValue value;
@@ -355,7 +355,7 @@
   std::string service_path = "/service/1";
   std::string networkName = "MyNetwork";
   std::string key = "SSID";
-  scoped_ptr<base::StringValue> networkNameValue(
+  std::unique_ptr<base::StringValue> networkNameValue(
       new base::StringValue(networkName));
 
   // First set up a value to clear.
@@ -387,7 +387,7 @@
   std::string service_path = "/service/1";
   std::string networkName = "MyNetwork";
   std::string key = "SSID";
-  scoped_ptr<base::StringValue> networkNameValue(
+  std::unique_ptr<base::StringValue> networkNameValue(
       new base::StringValue(networkName));
 
   // First set up a value to clear.
@@ -578,13 +578,13 @@
     return false;
   }
 
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
-  scoped_ptr<TestObserver> test_observer_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_;
+  std::unique_ptr<TestObserver> test_observer_;
   base::MessageLoopForUI message_loop_;
   std::string success_callback_name_;
   std::string get_properties_path_;
-  scoped_ptr<base::DictionaryValue> get_properties_;
+  std::unique_ptr<base::DictionaryValue> get_properties_;
   std::string create_service_path_;
 };
 
@@ -694,7 +694,7 @@
   const std::string service_path("/service/test_wifi");
   const std::string test_passphrase("test_passphrase");
 
-  scoped_ptr<TestNetworkConfigurationObserver> test_observer(
+  std::unique_ptr<TestNetworkConfigurationObserver> test_observer(
       new TestNetworkConfigurationObserver);
   network_configuration_handler_->AddObserver(test_observer.get());
   CreateTestConfiguration(service_path, shill::kTypeWifi);
diff --git a/chromeos/network/network_connection_handler.cc b/chromeos/network/network_connection_handler.cc
index 22026a1..fd8651d 100644
--- a/chromeos/network/network_connection_handler.cc
+++ b/chromeos/network/network_connection_handler.cc
@@ -637,7 +637,7 @@
 void NetworkConnectionHandler::HandleConfigurationFailure(
     const std::string& service_path,
     const std::string& error_name,
-    scoped_ptr<base::DictionaryValue> error_data) {
+    std::unique_ptr<base::DictionaryValue> error_data) {
   ConnectRequest* request = GetPendingRequest(service_path);
   if (!request) {
     NET_LOG_ERROR("HandleConfigurationFailure called with no pending request.",
diff --git a/chromeos/network/network_connection_handler.h b/chromeos/network/network_connection_handler.h
index fc38ce39..623ab24 100644
--- a/chromeos/network/network_connection_handler.h
+++ b/chromeos/network/network_connection_handler.h
@@ -192,7 +192,7 @@
   void HandleConfigurationFailure(
       const std::string& service_path,
       const std::string& error_name,
-      scoped_ptr<base::DictionaryValue> error_data);
+      std::unique_ptr<base::DictionaryValue> error_data);
 
   // Handles success or failure from Shill.Service.Connect.
   void HandleShillConnectSuccess(const std::string& service_path);
@@ -244,7 +244,7 @@
   // Map of pending connect requests, used to prevent repeated attempts while
   // waiting for Shill and to trigger callbacks on eventual success or failure.
   std::map<std::string, ConnectRequest> pending_requests_;
-  scoped_ptr<ConnectRequest> queued_connect_;
+  std::unique_ptr<ConnectRequest> queued_connect_;
 
   // Track certificate loading state.
   bool logged_in_;
diff --git a/chromeos/network/network_connection_handler_unittest.cc b/chromeos/network/network_connection_handler_unittest.cc
index 18bf80d..4271875 100644
--- a/chromeos/network/network_connection_handler_unittest.cc
+++ b/chromeos/network/network_connection_handler_unittest.cc
@@ -5,6 +5,7 @@
 #include "chromeos/network/network_connection_handler.h"
 
 #include <map>
+#include <memory>
 #include <set>
 
 #include "base/bind.h"
@@ -12,7 +13,6 @@
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -176,7 +176,7 @@
 
  protected:
   bool Configure(const std::string& json_string) {
-    scoped_ptr<base::DictionaryValue> json_dict =
+    std::unique_ptr<base::DictionaryValue> json_dict =
         onc::ReadDictionaryFromJson(json_string);
     if (!json_dict) {
       LOG(ERROR) << "Error parsing json: " << json_string;
@@ -217,7 +217,7 @@
   }
 
   void ErrorCallback(const std::string& error_name,
-                     scoped_ptr<base::DictionaryValue> error_data) {
+                     std::unique_ptr<base::DictionaryValue> error_data) {
     result_ = error_name;
   }
 
@@ -276,7 +276,7 @@
                    const base::DictionaryValue& global_config,
                    bool user_policy) {
     std::string error;
-    scoped_ptr<base::Value> network_configs_value =
+    std::unique_ptr<base::Value> network_configs_value =
         base::JSONReader::ReadAndReturnError(network_configs_json,
                                              base::JSON_ALLOW_TRAILING_COMMAS,
                                              nullptr, &error);
@@ -298,16 +298,17 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_config_handler_;
-  scoped_ptr<NetworkConnectionHandler> network_connection_handler_;
-  scoped_ptr<TestNetworkConnectionObserver> network_connection_observer_;
-  scoped_ptr<ManagedNetworkConfigurationHandlerImpl> managed_config_handler_;
-  scoped_ptr<NetworkProfileHandler> network_profile_handler_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_config_handler_;
+  std::unique_ptr<NetworkConnectionHandler> network_connection_handler_;
+  std::unique_ptr<TestNetworkConnectionObserver> network_connection_observer_;
+  std::unique_ptr<ManagedNetworkConfigurationHandlerImpl>
+      managed_config_handler_;
+  std::unique_ptr<NetworkProfileHandler> network_profile_handler_;
   ShillManagerClient::TestInterface* test_manager_client_;
   ShillServiceClient::TestInterface* test_service_client_;
   crypto::ScopedTestNSSDB test_nssdb_;
-  scoped_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
+  std::unique_ptr<net::NSSCertDatabaseChromeOS> test_nsscertdb_;
   base::MessageLoopForUI message_loop_;
   std::string result_;
 
diff --git a/chromeos/network/network_device_handler_impl.cc b/chromeos/network/network_device_handler_impl.cc
index 753bebc0..287bc45e 100644
--- a/chromeos/network/network_device_handler_impl.cc
+++ b/chromeos/network/network_device_handler_impl.cc
@@ -254,10 +254,10 @@
       dbus_error_name == shill::kErrorResultInProgress ?
       NetworkDeviceHandler::kErrorTimeout : NetworkDeviceHandler::kErrorUnknown;
   const std::string& error_detail = params.ip_or_mac_address;
-  scoped_ptr<base::DictionaryValue> error_data(
-      network_handler::CreateDBusErrorData(
-          device_path, error_name, error_detail,
-          dbus_error_name, dbus_error_message));
+  std::unique_ptr<base::DictionaryValue> error_data(
+      network_handler::CreateDBusErrorData(device_path, error_name,
+                                           error_detail, dbus_error_name,
+                                           dbus_error_message));
   error_callback.Run(error_name, std::move(error_data));
 }
 
@@ -571,7 +571,8 @@
   if (!device_state) {
     if (error_callback.is_null())
       return NULL;
-    scoped_ptr<base::DictionaryValue> error_data(new base::DictionaryValue);
+    std::unique_ptr<base::DictionaryValue> error_data(
+        new base::DictionaryValue);
     error_data->SetString(network_handler::kErrorName, kErrorDeviceMissing);
     error_callback.Run(kErrorDeviceMissing, std::move(error_data));
     return NULL;
diff --git a/chromeos/network/network_device_handler_unittest.cc b/chromeos/network/network_device_handler_unittest.cc
index 8ef65f0b..633d555 100644
--- a/chromeos/network/network_device_handler_unittest.cc
+++ b/chromeos/network/network_device_handler_unittest.cc
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/values.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -35,7 +36,7 @@
   void SetUp() override {
     fake_device_client_ = new FakeShillDeviceClient;
     DBusThreadManager::GetSetterForTesting()->SetShillDeviceClient(
-        scoped_ptr<ShillDeviceClient>(fake_device_client_));
+        std::unique_ptr<ShillDeviceClient>(fake_device_client_));
 
     success_callback_ = base::Bind(&NetworkDeviceHandlerTest::SuccessCallback,
                                    base::Unretained(this));
@@ -75,7 +76,7 @@
   }
 
   void ErrorCallback(const std::string& error_name,
-                     scoped_ptr<base::DictionaryValue> error_data) {
+                     std::unique_ptr<base::DictionaryValue> error_data) {
     VLOG(1) << "ErrorCallback: " << error_name;
     result_ = error_name;
   }
@@ -99,14 +100,14 @@
   std::string result_;
 
   FakeShillDeviceClient* fake_device_client_;
-  scoped_ptr<NetworkDeviceHandler> network_device_handler_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkDeviceHandler> network_device_handler_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
   base::MessageLoopForUI message_loop_;
   base::Closure success_callback_;
   network_handler::DictionaryResultCallback properties_success_callback_;
   network_handler::StringResultCallback string_success_callback_;
   network_handler::ErrorCallback error_callback_;
-  scoped_ptr<base::DictionaryValue> properties_;
+  std::unique_ptr<base::DictionaryValue> properties_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerTest);
diff --git a/chromeos/network/network_handler.h b/chromeos/network/network_handler.h
index 028b7d5..b2eea05 100644
--- a/chromeos/network/network_handler.h
+++ b/chromeos/network/network_handler.h
@@ -5,9 +5,10 @@
 #ifndef CHROMEOS_NETWORK_NETWORK_HANDLER_H_
 #define CHROMEOS_NETWORK_NETWORK_HANDLER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "chromeos/chromeos_export.h"
 
@@ -72,20 +73,21 @@
 
   // The order of these determines the (inverse) destruction order.
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkDeviceHandlerImpl> network_device_handler_;
-  scoped_ptr<NetworkProfileHandler> network_profile_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
-  scoped_ptr<ManagedNetworkConfigurationHandlerImpl>
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkDeviceHandlerImpl> network_device_handler_;
+  std::unique_ptr<NetworkProfileHandler> network_profile_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_;
+  std::unique_ptr<ManagedNetworkConfigurationHandlerImpl>
       managed_network_configuration_handler_;
-  scoped_ptr<NetworkCertMigrator> network_cert_migrator_;
-  scoped_ptr<ClientCertResolver> client_cert_resolver_;
-  scoped_ptr<NetworkActivationHandler> network_activation_handler_;
-  scoped_ptr<NetworkConnectionHandler> network_connection_handler_;
-  scoped_ptr<AutoConnectHandler> auto_connect_handler_;
-  scoped_ptr<NetworkSmsHandler> network_sms_handler_;
-  scoped_ptr<GeolocationHandler> geolocation_handler_;
-  scoped_ptr<ProhibitedTechnologiesHandler> prohibited_technologies_handler_;
+  std::unique_ptr<NetworkCertMigrator> network_cert_migrator_;
+  std::unique_ptr<ClientCertResolver> client_cert_resolver_;
+  std::unique_ptr<NetworkActivationHandler> network_activation_handler_;
+  std::unique_ptr<NetworkConnectionHandler> network_connection_handler_;
+  std::unique_ptr<AutoConnectHandler> auto_connect_handler_;
+  std::unique_ptr<NetworkSmsHandler> network_sms_handler_;
+  std::unique_ptr<GeolocationHandler> geolocation_handler_;
+  std::unique_ptr<ProhibitedTechnologiesHandler>
+      prohibited_technologies_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(NetworkHandler);
 };
diff --git a/chromeos/network/network_handler_callbacks.cc b/chromeos/network/network_handler_callbacks.cc
index 278cfcc..e3a4d60 100644
--- a/chromeos/network/network_handler_callbacks.cc
+++ b/chromeos/network/network_handler_callbacks.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "components/device_event_log/device_event_log.h"
 
@@ -46,9 +47,8 @@
                       const std::string& error_detail) {
   if (error_callback.is_null())
     return;
-  error_callback.Run(
-      error_name,
-      make_scoped_ptr(CreateErrorData(path, error_name, error_detail)));
+  error_callback.Run(error_name, base::WrapUnique(CreateErrorData(
+                                     path, error_name, error_detail)));
 }
 
 base::DictionaryValue* CreateDBusErrorData(
@@ -85,7 +85,7 @@
 
   if (error_callback.is_null())
     return;
-  scoped_ptr<base::DictionaryValue> error_data(CreateDBusErrorData(
+  std::unique_ptr<base::DictionaryValue> error_data(CreateDBusErrorData(
       path, error_name, detail, dbus_error_name, dbus_error_message));
   error_callback.Run(error_name, std::move(error_data));
 }
diff --git a/chromeos/network/network_handler_callbacks.h b/chromeos/network/network_handler_callbacks.h
index b63a0af..9401aac 100644
--- a/chromeos/network/network_handler_callbacks.h
+++ b/chromeos/network/network_handler_callbacks.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_NETWORK_NETWORK_HANDLER_CALLBACKS_H_
 #define CHROMEOS_NETWORK_NETWORK_HANDLER_CALLBACKS_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
 
@@ -28,9 +28,9 @@
 
 // An error callback used by both the configuration handler and the state
 // handler to receive error results from the API.
-typedef base::Callback<
-  void(const std::string& error_name,
-       scoped_ptr<base::DictionaryValue> error_data)> ErrorCallback;
+typedef base::Callback<void(const std::string& error_name,
+                            std::unique_ptr<base::DictionaryValue> error_data)>
+    ErrorCallback;
 
 typedef base::Callback<
   void(const std::string& service_path,
diff --git a/chromeos/network/network_sms_handler_unittest.cc b/chromeos/network/network_sms_handler_unittest.cc
index 9ee2b0a..039b2a30 100644
--- a/chromeos/network/network_sms_handler_unittest.cc
+++ b/chromeos/network/network_sms_handler_unittest.cc
@@ -4,11 +4,11 @@
 
 #include "chromeos/network/network_sms_handler.h"
 
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/command_line.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "chromeos/chromeos_switches.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -88,8 +88,8 @@
 
  protected:
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<NetworkSmsHandler> network_sms_handler_;
-  scoped_ptr<TestObserver> test_observer_;
+  std::unique_ptr<NetworkSmsHandler> network_sms_handler_;
+  std::unique_ptr<TestObserver> test_observer_;
 };
 
 TEST_F(NetworkSmsHandlerTest, SmsHandlerDbusStub) {
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index df5f825..ffed5fd 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -6,7 +6,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "chromeos/network/network_profile_handler.h"
@@ -161,7 +162,7 @@
     if (proxy_config_str.empty())
       return true;
 
-    scoped_ptr<base::DictionaryValue> proxy_config_dict(
+    std::unique_ptr<base::DictionaryValue> proxy_config_dict(
         onc::ReadDictionaryFromJson(proxy_config_str));
     if (proxy_config_dict) {
       // Warning: The DictionaryValue returned from
@@ -248,7 +249,7 @@
   if (NetworkTypePattern::VPN().MatchesType(type())) {
     // Shill sends VPN provider properties in a nested dictionary. |dictionary|
     // must replicate that nested structure.
-    scoped_ptr<base::DictionaryValue> provider_property(
+    std::unique_ptr<base::DictionaryValue> provider_property(
         new base::DictionaryValue);
     provider_property->SetStringWithoutPathExpansion(shill::kTypeProperty,
                                                      vpn_provider_type_);
diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h
index 90b5105..932dd79 100644
--- a/chromeos/network/network_state_handler.h
+++ b/chromeos/network/network_state_handler.h
@@ -6,6 +6,7 @@
 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -13,7 +14,6 @@
 #include "base/callback_forward.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
@@ -375,7 +375,7 @@
       const NetworkTypePattern& type) const;
 
   // Shill property handler instance, owned by this class.
-  scoped_ptr<internal::ShillPropertyHandler> shill_property_handler_;
+  std::unique_ptr<internal::ShillPropertyHandler> shill_property_handler_;
 
   // Observer list
   base::ObserverList<NetworkStateHandlerObserver, true> observers_;
diff --git a/chromeos/network/network_state_handler_unittest.cc b/chromeos/network/network_state_handler_unittest.cc
index de832c0..a48a3eb 100644
--- a/chromeos/network/network_state_handler_unittest.cc
+++ b/chromeos/network/network_state_handler_unittest.cc
@@ -7,12 +7,12 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/values.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -267,8 +267,8 @@
   }
 
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<TestObserver> test_observer_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<TestObserver> test_observer_;
   ShillDeviceClient::TestInterface* device_test_;
   ShillManagerClient::TestInterface* manager_test_;
   ShillProfileClient::TestInterface* profile_test_;
diff --git a/chromeos/network/network_state_unittest.cc b/chromeos/network/network_state_unittest.cc
index 25684ae..2ade45e 100644
--- a/chromeos/network/network_state_unittest.cc
+++ b/chromeos/network/network_state_unittest.cc
@@ -5,11 +5,13 @@
 #include "chromeos/network/network_state.h"
 
 #include <stdint.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/i18n/streaming_utf8_validator.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/values.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -57,14 +59,14 @@
   }
 
  protected:
-  bool SetProperty(const std::string& key, scoped_ptr<base::Value> value) {
+  bool SetProperty(const std::string& key, std::unique_ptr<base::Value> value) {
     const bool result = network_state_.PropertyChanged(key, *value);
     properties_.SetWithoutPathExpansion(key, value.release());
     return result;
   }
 
   bool SetStringProperty(const std::string& key, const std::string& value) {
-    return SetProperty(key, make_scoped_ptr(new TestStringValue(value)));
+    return SetProperty(key, base::WrapUnique(new TestStringValue(value)));
   }
 
   bool SignalInitialPropertiesReceived() {
@@ -224,7 +226,7 @@
   EXPECT_TRUE(SetStringProperty(shill::kTypeProperty, shill::kTypeVPN));
   EXPECT_TRUE(SetStringProperty(shill::kNameProperty, "VPN"));
 
-  scoped_ptr<base::DictionaryValue> provider(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> provider(new base::DictionaryValue);
   provider->SetStringWithoutPathExpansion(shill::kTypeProperty,
                                           shill::kProviderThirdPartyVpn);
   provider->SetStringWithoutPathExpansion(
diff --git a/chromeos/network/network_ui_data.cc b/chromeos/network/network_ui_data.cc
index 4406a71..596448b 100644
--- a/chromeos/network/network_ui_data.cc
+++ b/chromeos/network/network_ui_data.cc
@@ -89,7 +89,8 @@
 NetworkUIData::~NetworkUIData() {
 }
 
-void NetworkUIData::set_user_settings(scoped_ptr<base::DictionaryValue> dict) {
+void NetworkUIData::set_user_settings(
+    std::unique_ptr<base::DictionaryValue> dict) {
   user_settings_ = std::move(dict);
 }
 
@@ -110,9 +111,9 @@
 }
 
 // static
-scoped_ptr<NetworkUIData> NetworkUIData::CreateFromONC(
+std::unique_ptr<NetworkUIData> NetworkUIData::CreateFromONC(
     ::onc::ONCSource onc_source) {
-  scoped_ptr<NetworkUIData> ui_data(new NetworkUIData());
+  std::unique_ptr<NetworkUIData> ui_data(new NetworkUIData());
 
   ui_data->onc_source_ = onc_source;
 
diff --git a/chromeos/network/network_ui_data.h b/chromeos/network/network_ui_data.h
index 981131ec..6a7f935 100644
--- a/chromeos/network/network_ui_data.h
+++ b/chromeos/network/network_ui_data.h
@@ -5,9 +5,9 @@
 #ifndef CHROMEOS_NETWORK_NETWORK_UI_DATA_H_
 #define CHROMEOS_NETWORK_NETWORK_UI_DATA_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "components/onc/onc_constants.h"
 
@@ -38,7 +38,7 @@
   const base::DictionaryValue* user_settings() const {
     return user_settings_.get();
   }
-  void set_user_settings(scoped_ptr<base::DictionaryValue> dict);
+  void set_user_settings(std::unique_ptr<base::DictionaryValue> dict);
 
   // Returns |onc_source_| as a string, one of kONCSource*.
   std::string GetONCSourceAsString() const;
@@ -49,7 +49,8 @@
 
   // Creates a NetworkUIData object from |onc_source|. This function is used to
   // create the "UIData" property of the Shill configuration.
-  static scoped_ptr<NetworkUIData> CreateFromONC(::onc::ONCSource onc_source);
+  static std::unique_ptr<NetworkUIData> CreateFromONC(
+      ::onc::ONCSource onc_source);
 
   // Key for storing source of the ONC network.
   static const char kKeyONCSource[];
@@ -64,7 +65,7 @@
 
  private:
   ::onc::ONCSource onc_source_;
-  scoped_ptr<base::DictionaryValue> user_settings_;
+  std::unique_ptr<base::DictionaryValue> user_settings_;
 };
 
 }  // namespace chromeos
diff --git a/chromeos/network/network_util.cc b/chromeos/network/network_util.cc
index ebaef513..00efbff7 100644
--- a/chromeos/network/network_util.cc
+++ b/chromeos/network/network_util.cc
@@ -29,12 +29,17 @@
       channel(0) {
 }
 
+WifiAccessPoint::WifiAccessPoint(const WifiAccessPoint& other) = default;
+
 WifiAccessPoint::~WifiAccessPoint() {
 }
 
 CellularScanResult::CellularScanResult() {
 }
 
+CellularScanResult::CellularScanResult(const CellularScanResult& other) =
+    default;
+
 CellularScanResult::~CellularScanResult() {
 }
 
@@ -147,10 +152,11 @@
   return true;
 }
 
-scoped_ptr<base::DictionaryValue> TranslateNetworkStateToONC(
+std::unique_ptr<base::DictionaryValue> TranslateNetworkStateToONC(
     const NetworkState* network) {
   // Get the properties from the NetworkState.
-  scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> shill_dictionary(
+      new base::DictionaryValue);
   network->GetStateProperties(shill_dictionary.get());
 
   // Get any Device properties required to translate state.
@@ -161,7 +167,8 @@
         NetworkHandler::Get()->network_state_handler()->GetDeviceState(
             network->device_path());
     if (device) {
-      scoped_ptr<base::DictionaryValue> device_dict(new base::DictionaryValue);
+      std::unique_ptr<base::DictionaryValue> device_dict(
+          new base::DictionaryValue);
       device_dict->SetBooleanWithoutPathExpansion(
           shill::kProviderRequiresRoamingProperty,
           device->provider_requires_roaming());
@@ -180,13 +187,13 @@
       ->managed_network_configuration_handler()
       ->FindPolicyByGUID(user_id_hash, network->guid(), &onc_source);
 
-  scoped_ptr<base::DictionaryValue> onc_dictionary =
+  std::unique_ptr<base::DictionaryValue> onc_dictionary =
       TranslateShillServiceToONCPart(*shill_dictionary, onc_source,
                                      &onc::kNetworkWithStateSignature, network);
   return onc_dictionary;
 }
 
-scoped_ptr<base::ListValue> TranslateNetworkListToONC(
+std::unique_ptr<base::ListValue> TranslateNetworkListToONC(
     NetworkTypePattern pattern,
     bool configured_only,
     bool visible_only,
@@ -195,9 +202,9 @@
   NetworkHandler::Get()->network_state_handler()->GetNetworkListByType(
       pattern, configured_only, visible_only, limit, &network_states);
 
-  scoped_ptr<base::ListValue> network_properties_list(new base::ListValue);
+  std::unique_ptr<base::ListValue> network_properties_list(new base::ListValue);
   for (const NetworkState* state : network_states) {
-    scoped_ptr<base::DictionaryValue> onc_dictionary =
+    std::unique_ptr<base::DictionaryValue> onc_dictionary =
         TranslateNetworkStateToONC(state);
     network_properties_list->Append(onc_dictionary.release());
   }
diff --git a/chromeos/network/network_util.h b/chromeos/network/network_util.h
index b8fee454..37b1302 100644
--- a/chromeos/network/network_util.h
+++ b/chromeos/network/network_util.h
@@ -12,11 +12,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/values.h"
 #include "chromeos/chromeos_export.h"
@@ -33,6 +33,7 @@
 // Struct for passing wifi access point data.
 struct CHROMEOS_EXPORT WifiAccessPoint {
   WifiAccessPoint();
+  WifiAccessPoint(const WifiAccessPoint& other);
   ~WifiAccessPoint();
   std::string ssid;  // The ssid of the WiFi node if available.
   std::string mac_address;  // The mac address of the WiFi node.
@@ -45,6 +46,7 @@
 // Struct for passing network scan result data.
 struct CHROMEOS_EXPORT CellularScanResult {
   CellularScanResult();
+  CellularScanResult(const CellularScanResult& other);
   ~CellularScanResult();
   std::string status;  // The network's availability status. (One of "unknown",
                        // "available", "current", or "forbidden")
@@ -95,15 +97,15 @@
 // Retrieves the ONC state dictionary for |network| using GetStateProperties.
 // This includes properties from the corresponding NetworkState if it exists.
 // Assumed to be called from the primary user profile.
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> TranslateNetworkStateToONC(
-    const NetworkState* network);
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue>
+TranslateNetworkStateToONC(const NetworkState* network);
 
 // Retrieves the list of network services by passing |pattern|,
 // |configured_only|, and |visible_only| to NetworkStateHandler::
 // GetNetworkListByType(). Translates the result into a list of ONC
 // dictionaries using TranslateShillServiceToONCPart. |limit| is used to limit
 // the number of results.
-CHROMEOS_EXPORT scoped_ptr<base::ListValue> TranslateNetworkListToONC(
+CHROMEOS_EXPORT std::unique_ptr<base::ListValue> TranslateNetworkListToONC(
     NetworkTypePattern pattern,
     bool configured_only,
     bool visible_only,
diff --git a/chromeos/network/onc/onc_certificate_importer_impl.h b/chromeos/network/onc/onc_certificate_importer_impl.h
index d3e5fb21..0a81e4d 100644
--- a/chromeos/network/onc/onc_certificate_importer_impl.h
+++ b/chromeos/network/onc/onc_certificate_importer_impl.h
@@ -6,12 +6,12 @@
 #define CHROMEOS_NETWORK_ONC_ONC_CERTIFICATE_IMPORTER_IMPL_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/network/onc/onc_certificate_importer.h"
diff --git a/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc b/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
index caa5ed8..f3e01b77 100644
--- a/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
+++ b/chromeos/network/onc/onc_certificate_importer_impl_unittest.cc
@@ -99,9 +99,9 @@
 
   void AddCertificatesFromFile(const std::string& filename,
                                bool expected_success) {
-    scoped_ptr<base::DictionaryValue> onc =
+    std::unique_ptr<base::DictionaryValue> onc =
         test_utils::ReadTestDictionary(filename);
-    scoped_ptr<base::Value> certificates_value;
+    std::unique_ptr<base::Value> certificates_value;
     base::ListValue* certificates = NULL;
     onc->RemoveWithoutPathExpansion(::onc::toplevel_config::kCertificates,
                                     &certificates_value);
@@ -153,9 +153,9 @@
   crypto::ScopedTestNSSDB private_nssdb_;
 
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
-  scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_;
-  scoped_ptr<net::NSSCertDatabaseChromeOS> test_nssdb_;
-  scoped_ptr<base::ListValue> onc_certificates_;
+  std::unique_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_;
+  std::unique_ptr<net::NSSCertDatabaseChromeOS> test_nssdb_;
+  std::unique_ptr<base::ListValue> onc_certificates_;
   // List of certs in the nssdb's public slot.
   net::CertificateList public_list_;
   // List of certs in the nssdb's "private" slot.
diff --git a/chromeos/network/onc/onc_mapper.cc b/chromeos/network/onc/onc_mapper.cc
index c580f75e..d5df15ef 100644
--- a/chromeos/network/onc/onc_mapper.cc
+++ b/chromeos/network/onc/onc_mapper.cc
@@ -5,6 +5,7 @@
 #include "chromeos/network/onc/onc_mapper.h"
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "chromeos/network/onc/onc_signature.h"
 
@@ -17,10 +18,11 @@
 Mapper::~Mapper() {
 }
 
-scoped_ptr<base::Value> Mapper::MapValue(const OncValueSignature& signature,
-                                         const base::Value& onc_value,
-                                         bool* error) {
-  scoped_ptr<base::Value> result_value;
+std::unique_ptr<base::Value> Mapper::MapValue(
+    const OncValueSignature& signature,
+    const base::Value& onc_value,
+    bool* error) {
+  std::unique_ptr<base::Value> result_value;
   switch (onc_value.GetType()) {
     case base::Value::TYPE_DICTIONARY: {
       const base::DictionaryValue* dict = NULL;
@@ -43,11 +45,11 @@
   return result_value;
 }
 
-scoped_ptr<base::DictionaryValue> Mapper::MapObject(
+std::unique_ptr<base::DictionaryValue> Mapper::MapObject(
     const OncValueSignature& signature,
     const base::DictionaryValue& onc_object,
     bool* error) {
-  scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue);
 
   bool found_unknown_field = false;
   MapFields(signature, onc_object, &found_unknown_field, error, result.get());
@@ -56,10 +58,11 @@
   return result;
 }
 
-scoped_ptr<base::Value> Mapper::MapPrimitive(const OncValueSignature& signature,
-                                             const base::Value& onc_primitive,
-                                             bool* error) {
-  return make_scoped_ptr(onc_primitive.DeepCopy());
+std::unique_ptr<base::Value> Mapper::MapPrimitive(
+    const OncValueSignature& signature,
+    const base::Value& onc_primitive,
+    bool* error) {
+  return base::WrapUnique(onc_primitive.DeepCopy());
 }
 
 void Mapper::MapFields(const OncValueSignature& object_signature,
@@ -70,11 +73,9 @@
   for (base::DictionaryValue::Iterator it(onc_object); !it.IsAtEnd();
        it.Advance()) {
     bool current_field_unknown = false;
-    scoped_ptr<base::Value> result_value = MapField(it.key(),
-                                                    object_signature,
-                                                    it.value(),
-                                                    &current_field_unknown,
-                                                    nested_error);
+    std::unique_ptr<base::Value> result_value =
+        MapField(it.key(), object_signature, it.value(), &current_field_unknown,
+                 nested_error);
 
     if (current_field_unknown)
       *found_unknown_field = true;
@@ -85,7 +86,7 @@
   }
 }
 
-scoped_ptr<base::Value> Mapper::MapField(
+std::unique_ptr<base::Value> Mapper::MapField(
     const std::string& field_name,
     const OncValueSignature& object_signature,
     const base::Value& onc_value,
@@ -102,24 +103,24 @@
   } else {
     DVLOG(1) << "Found unknown field name: '" << field_name << "'";
     *found_unknown_field = true;
-    return scoped_ptr<base::Value>();
+    return std::unique_ptr<base::Value>();
   }
 }
 
-scoped_ptr<base::ListValue> Mapper::MapArray(
+std::unique_ptr<base::ListValue> Mapper::MapArray(
     const OncValueSignature& array_signature,
     const base::ListValue& onc_array,
     bool* nested_error) {
   DCHECK(array_signature.onc_array_entry_signature != NULL)
       << "Found missing onc_array_entry_signature.";
 
-  scoped_ptr<base::ListValue> result_array(new base::ListValue);
+  std::unique_ptr<base::ListValue> result_array(new base::ListValue);
   int original_index = 0;
   for (base::ListValue::const_iterator it = onc_array.begin();
        it != onc_array.end(); ++it, ++original_index) {
     const base::Value* entry = *it;
 
-    scoped_ptr<base::Value> result_entry;
+    std::unique_ptr<base::Value> result_entry;
     result_entry = MapEntry(original_index,
                             *array_signature.onc_array_entry_signature,
                             *entry,
@@ -132,10 +133,11 @@
   return result_array;
 }
 
-scoped_ptr<base::Value> Mapper::MapEntry(int index,
-                                         const OncValueSignature& signature,
-                                         const base::Value& onc_value,
-                                         bool* error) {
+std::unique_ptr<base::Value> Mapper::MapEntry(
+    int index,
+    const OncValueSignature& signature,
+    const base::Value& onc_value,
+    bool* error) {
   return MapValue(signature, onc_value, error);
 }
 
diff --git a/chromeos/network/onc/onc_mapper.h b/chromeos/network/onc/onc_mapper.h
index 07c5339..b5412a9 100644
--- a/chromeos/network/onc/onc_mapper.h
+++ b/chromeos/network/onc/onc_mapper.h
@@ -5,10 +5,10 @@
 #ifndef CHROMEOS_NETWORK_ONC_ONC_MAPPER_H_
 #define CHROMEOS_NETWORK_ONC_ONC_MAPPER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
 namespace base {
@@ -44,15 +44,16 @@
   // Calls |MapObject|, |MapArray| and |MapPrimitive| according to |onc_value|'s
   // type, which always return an object of the according type. Result of the
   // mapping is returned. Only on error sets |error| to true.
-  virtual scoped_ptr<base::Value> MapValue(const OncValueSignature& signature,
-                                           const base::Value& onc_value,
-                                           bool* error);
+  virtual std::unique_ptr<base::Value> MapValue(
+      const OncValueSignature& signature,
+      const base::Value& onc_value,
+      bool* error);
 
   // Maps objects/dictionaries. By default calls |MapFields|, which recurses
   // into each field of |onc_object|, and drops unknown fields. Result of the
   // mapping is returned. Only on error sets |error| to true. In this
   // implementation only unknown fields are errors.
-  virtual scoped_ptr<base::DictionaryValue> MapObject(
+  virtual std::unique_ptr<base::DictionaryValue> MapObject(
       const OncValueSignature& signature,
       const base::DictionaryValue& onc_object,
       bool* error);
@@ -60,7 +61,7 @@
   // Maps primitive values like BinaryValue, StringValue, IntegerValue... (all
   // but dictionaries and lists). By default copies |onc_primitive|. Result of
   // the mapping is returned. Only on error sets |error| to true.
-  virtual scoped_ptr<base::Value> MapPrimitive(
+  virtual std::unique_ptr<base::Value> MapPrimitive(
       const OncValueSignature& signature,
       const base::Value& onc_primitive,
       bool* error);
@@ -80,7 +81,7 @@
   // signature in |object_signature| using |MapValue|. Sets
   // |found_unknown_field| to true and returns NULL if |field_name| cannot be
   // found in |object_signature|. Otherwise returns the mapping of |onc_value|.
-  virtual scoped_ptr<base::Value> MapField(
+  virtual std::unique_ptr<base::Value> MapField(
       const std::string& field_name,
       const OncValueSignature& object_signature,
       const base::Value& onc_value,
@@ -92,17 +93,18 @@
   // the nested mappings failed, the flag |nested_error| is set to true and the
   // entry is dropped from the result. Otherwise |nested_error| isn't
   // modified. The resulting array is returned.
-  virtual scoped_ptr<base::ListValue> MapArray(
+  virtual std::unique_ptr<base::ListValue> MapArray(
       const OncValueSignature& array_signature,
       const base::ListValue& onc_array,
       bool* nested_error);
 
   // Calls |MapValue| and returns its result. Called by |MapArray| for each
   // entry and its index in the enclosing array.
-  virtual scoped_ptr<base::Value> MapEntry(int index,
-                                           const OncValueSignature& signature,
-                                           const base::Value& onc_value,
-                                           bool* error);
+  virtual std::unique_ptr<base::Value> MapEntry(
+      int index,
+      const OncValueSignature& signature,
+      const base::Value& onc_value,
+      bool* error);
 
  private:
   DISALLOW_COPY_AND_ASSIGN(Mapper);
diff --git a/chromeos/network/onc/onc_merger.cc b/chromeos/network/onc/onc_merger.cc
index dab1d2db..f71ded3 100644
--- a/chromeos/network/onc/onc_merger.cc
+++ b/chromeos/network/onc/onc_merger.cc
@@ -11,6 +11,7 @@
 
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "chromeos/network/onc/onc_signature.h"
 #include "components/onc/onc_constants.h"
@@ -19,7 +20,7 @@
 namespace onc {
 namespace {
 
-typedef scoped_ptr<base::DictionaryValue> DictionaryPtr;
+typedef std::unique_ptr<base::DictionaryValue> DictionaryPtr;
 
 // Returns true if the field is the identifier of a configuration, i.e. the GUID
 // of a network or a certificate.
@@ -112,7 +113,7 @@
         if (key == ::onc::kRecommended || !visited.insert(key).second)
           continue;
 
-        scoped_ptr<base::Value> merged_value;
+        std::unique_ptr<base::Value> merged_value;
         if (field.value().IsType(base::Value::TYPE_DICTIONARY)) {
           DictPtrs nested_dicts;
           for (DictPtrs::const_iterator it_inner = dicts.begin();
@@ -149,7 +150,7 @@
   // are located at the same path in each of the dictionaries. The order of the
   // values is the same as of the given dictionaries |dicts|. If a dictionary
   // doesn't contain a path then it's value is NULL.
-  virtual scoped_ptr<base::Value> MergeListOfValues(
+  virtual std::unique_ptr<base::Value> MergeListOfValues(
       const std::string& key,
       const std::vector<const base::Value*>& values) = 0;
 
@@ -213,8 +214,9 @@
   // This function is called by MergeDictionaries for each list of values that
   // are located at the same path in each of the dictionaries. Implementations
   // can use the Has*Policy functions.
-  virtual scoped_ptr<base::Value> MergeValues(const std::string& key,
-                                              const ValueParams& values) = 0;
+  virtual std::unique_ptr<base::Value> MergeValues(
+      const std::string& key,
+      const ValueParams& values) = 0;
 
   // Whether a user policy was provided.
   bool HasUserPolicy() {
@@ -227,7 +229,7 @@
   }
 
   // MergeListOfDictionaries override.
-  scoped_ptr<base::Value> MergeListOfValues(
+  std::unique_ptr<base::Value> MergeListOfValues(
       const std::string& key,
       const std::vector<const base::Value*>& values) override {
     bool user_editable = !HasUserPolicy();
@@ -282,9 +284,9 @@
   // the
   // user policy didn't set a value but also didn't recommend it, thus enforcing
   // the empty value.
-  scoped_ptr<base::Value> MergeValues(const std::string& key,
-                                      const ValueParams& values,
-                                      std::string* which) {
+  std::unique_ptr<base::Value> MergeValues(const std::string& key,
+                                           const ValueParams& values,
+                                           std::string* which) {
     const base::Value* result = NULL;
     which->clear();
     if (!values.user_editable) {
@@ -310,13 +312,13 @@
       // dictionaries contained a value for it.
     }
     if (result)
-      return make_scoped_ptr(result->DeepCopy());
-    return scoped_ptr<base::Value>();
+      return base::WrapUnique(result->DeepCopy());
+    return std::unique_ptr<base::Value>();
   }
 
   // MergeSettingsAndPolicies override.
-  scoped_ptr<base::Value> MergeValues(const std::string& key,
-                                      const ValueParams& values) override {
+  std::unique_ptr<base::Value> MergeValues(const std::string& key,
+                                           const ValueParams& values) override {
     std::string which;
     return MergeValues(key, values, &which);
   }
@@ -369,8 +371,8 @@
 
  protected:
   // MergeSettingsAndPolicies override.
-  scoped_ptr<base::Value> MergeValues(const std::string& key,
-                                      const ValueParams& values) override {
+  std::unique_ptr<base::Value> MergeValues(const std::string& key,
+                                           const ValueParams& values) override {
     const OncFieldSignature* field = NULL;
     if (signature_)
       field = GetFieldSignature(*signature_, key);
@@ -380,14 +382,14 @@
       // controlled by policy. Return the plain active value instead of an
       // augmented dictionary.
       if (values.active_setting)
-        return make_scoped_ptr(values.active_setting->DeepCopy());
+        return base::WrapUnique(values.active_setting->DeepCopy());
       return nullptr;
     }
 
     // This field is part of the provided ONCSignature, thus it can be
     // controlled by policy.
     std::string which_effective;
-    scoped_ptr<base::Value> effective_value =
+    std::unique_ptr<base::Value> effective_value =
         MergeToEffective::MergeValues(key, values, &which_effective);
 
     if (IsReadOnlyField(*signature_, key)) {
@@ -402,13 +404,13 @@
       }
       if (values.active_setting) {
         // Unmanaged networks have assigned (active) values.
-        return make_scoped_ptr(values.active_setting->DeepCopy());
+        return base::WrapUnique(values.active_setting->DeepCopy());
       }
       LOG(ERROR) << "Field has no effective value: " << key;
       return nullptr;
     }
 
-    scoped_ptr<base::DictionaryValue> augmented_value(
+    std::unique_ptr<base::DictionaryValue> augmented_value(
         new base::DictionaryValue);
 
     if (values.active_setting) {
diff --git a/chromeos/network/onc/onc_merger.h b/chromeos/network/onc/onc_merger.h
index 35e97fd..762dd86 100644
--- a/chromeos/network/onc/onc_merger.h
+++ b/chromeos/network/onc/onc_merger.h
@@ -5,7 +5,8 @@
 #ifndef CHROMEOS_NETWORK_ONC_ONC_MERGER_H_
 #define CHROMEOS_NETWORK_ONC_ONC_MERGER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "chromeos/chromeos_export.h"
 
 namespace base {
@@ -26,7 +27,7 @@
 // dispensable fields (e.g. in a network with type: "WiFi", the field "VPN" is
 // dispensable) that can be removed by the caller using the ONC normalizer. ONC
 // conformance of the arguments is not checked. Use ONC validator for that.
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue>
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue>
 MergeSettingsAndPoliciesToEffective(
     const base::DictionaryValue* user_policy,
     const base::DictionaryValue* device_policy,
@@ -40,7 +41,7 @@
 // contains the field name of the field containing the effective field that
 // overrides all other values. Credentials from policies are not written to the
 // result.
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue>
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue>
 MergeSettingsAndPoliciesToAugmented(
     const OncValueSignature& signature,
     const base::DictionaryValue* user_policy,
diff --git a/chromeos/network/onc/onc_merger_unittest.cc b/chromeos/network/onc/onc_merger_unittest.cc
index 262bbba1..eac5781 100644
--- a/chromeos/network/onc/onc_merger_unittest.cc
+++ b/chromeos/network/onc/onc_merger_unittest.cc
@@ -49,11 +49,11 @@
 
 class ONCMergerTest : public testing::Test {
  public:
-  scoped_ptr<const base::DictionaryValue> user_;
-  scoped_ptr<const base::DictionaryValue> policy_;
-  scoped_ptr<const base::DictionaryValue> policy_without_recommended_;
-  scoped_ptr<const base::DictionaryValue> device_policy_;
-  scoped_ptr<const base::DictionaryValue> active_;
+  std::unique_ptr<const base::DictionaryValue> user_;
+  std::unique_ptr<const base::DictionaryValue> policy_;
+  std::unique_ptr<const base::DictionaryValue> policy_without_recommended_;
+  std::unique_ptr<const base::DictionaryValue> device_policy_;
+  std::unique_ptr<const base::DictionaryValue> active_;
 
   void SetUp() override {
     policy_ = test_utils::ReadTestDictionary("managed_vpn.onc");
@@ -66,61 +66,67 @@
 };
 
 TEST_F(ONCMergerTest, MandatoryValueOverwritesUserValue) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), NULL, user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), NULL, user_.get(),
+                                          NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *policy_, "Type"));
   EXPECT_TRUE(HaveSameValueAt(*merged, *policy_, "StaticIPConfig"));
 }
 
 TEST_F(ONCMergerTest, MandatoryValueAndNoUserValue) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), NULL, user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), NULL, user_.get(),
+                                          NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *policy_, "GUID"));
   EXPECT_TRUE(HaveSameValueAt(*merged, *policy_, "VPN.OpenVPN.Username"));
 }
 
 TEST_F(ONCMergerTest, MandatoryDictionaryAndNoUserValue) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-          policy_.get(), NULL, user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), NULL, user_.get(),
+                                          NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *policy_without_recommended_,
                               "VPN.OpenVPN.ClientCertPattern"));
 }
 
 TEST_F(ONCMergerTest, UserValueOverwritesRecommendedValue) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), NULL, user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), NULL, user_.get(),
+                                          NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *user_, "VPN.Host"));
 }
 
 TEST_F(ONCMergerTest, UserValueAndRecommendedUnset) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), NULL, user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), NULL, user_.get(),
+                                          NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *user_, "VPN.OpenVPN.Password"));
 }
 
 TEST_F(ONCMergerTest, UserDictionaryAndNoPolicyValue) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), NULL, user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), NULL, user_.get(),
+                                          NULL));
   const base::Value* value = NULL;
   EXPECT_FALSE(merged->Get("ProxySettings", &value));
 }
 
 TEST_F(ONCMergerTest, MergeWithEmptyPolicyProhibitsEverything) {
   base::DictionaryValue emptyDict;
-  scoped_ptr<base::DictionaryValue> merged(
+  std::unique_ptr<base::DictionaryValue> merged(
       MergeSettingsAndPoliciesToEffective(&emptyDict, NULL, user_.get(), NULL));
   EXPECT_TRUE(merged->empty());
 }
 
 TEST_F(ONCMergerTest, MergeWithoutPolicyAllowsAnything) {
-  scoped_ptr<base::DictionaryValue> merged(
+  std::unique_ptr<base::DictionaryValue> merged(
       MergeSettingsAndPoliciesToEffective(NULL, NULL, user_.get(), NULL));
   EXPECT_TRUE(test_utils::Equals(user_.get(), merged.get()));
 }
 
 TEST_F(ONCMergerTest, MergeWithoutUserSettings) {
   base::DictionaryValue emptyDict;
-  scoped_ptr<base::DictionaryValue> merged;
+  std::unique_ptr<base::DictionaryValue> merged;
 
   merged = MergeSettingsAndPoliciesToEffective(
       policy_.get(), NULL, &emptyDict, NULL);
@@ -133,24 +139,27 @@
 }
 
 TEST_F(ONCMergerTest, MandatoryUserPolicyOverwritesDevicePolicy) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), device_policy_.get(), user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), device_policy_.get(),
+                                          user_.get(), NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *policy_, "VPN.OpenVPN.Port"));
 }
 
 TEST_F(ONCMergerTest, MandatoryDevicePolicyOverwritesRecommendedUserPolicy) {
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToEffective(
-      policy_.get(), device_policy_.get(), user_.get(), NULL));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToEffective(policy_.get(), device_policy_.get(),
+                                          user_.get(), NULL));
   EXPECT_TRUE(HaveSameValueAt(*merged, *device_policy_,
                               "VPN.OpenVPN.Username"));
 }
 
 TEST_F(ONCMergerTest, MergeToAugmented) {
-  scoped_ptr<base::DictionaryValue> expected_augmented =
+  std::unique_ptr<base::DictionaryValue> expected_augmented =
       test_utils::ReadTestDictionary("augmented_merge.json");
-  scoped_ptr<base::DictionaryValue> merged(MergeSettingsAndPoliciesToAugmented(
-      kNetworkConfigurationSignature, policy_.get(), device_policy_.get(),
-      user_.get(), NULL, active_.get()));
+  std::unique_ptr<base::DictionaryValue> merged(
+      MergeSettingsAndPoliciesToAugmented(kNetworkConfigurationSignature,
+                                          policy_.get(), device_policy_.get(),
+                                          user_.get(), NULL, active_.get()));
   EXPECT_TRUE(test_utils::Equals(expected_augmented.get(), merged.get()));
 }
 
diff --git a/chromeos/network/onc/onc_normalizer.cc b/chromeos/network/onc/onc_normalizer.cc
index 327d597..84ecaf1 100644
--- a/chromeos/network/onc/onc_normalizer.cc
+++ b/chromeos/network/onc/onc_normalizer.cc
@@ -22,26 +22,26 @@
 Normalizer::~Normalizer() {
 }
 
-scoped_ptr<base::DictionaryValue> Normalizer::NormalizeObject(
+std::unique_ptr<base::DictionaryValue> Normalizer::NormalizeObject(
     const OncValueSignature* object_signature,
     const base::DictionaryValue& onc_object) {
   CHECK(object_signature != NULL);
   bool error = false;
-  scoped_ptr<base::DictionaryValue> result =
+  std::unique_ptr<base::DictionaryValue> result =
       MapObject(*object_signature, onc_object, &error);
   DCHECK(!error);
   return result;
 }
 
-scoped_ptr<base::DictionaryValue> Normalizer::MapObject(
+std::unique_ptr<base::DictionaryValue> Normalizer::MapObject(
     const OncValueSignature& signature,
     const base::DictionaryValue& onc_object,
     bool* error) {
-  scoped_ptr<base::DictionaryValue> normalized =
+  std::unique_ptr<base::DictionaryValue> normalized =
       Mapper::MapObject(signature, onc_object, error);
 
   if (normalized.get() == NULL)
-    return scoped_ptr<base::DictionaryValue>();
+    return std::unique_ptr<base::DictionaryValue>();
 
   if (remove_recommended_fields_)
     normalized->RemoveWithoutPathExpansion(::onc::kRecommended, NULL);
diff --git a/chromeos/network/onc/onc_normalizer.h b/chromeos/network/onc/onc_normalizer.h
index 1fb18f1..d97ab2f 100644
--- a/chromeos/network/onc/onc_normalizer.h
+++ b/chromeos/network/onc/onc_normalizer.h
@@ -5,8 +5,9 @@
 #ifndef CHROMEOS_NETWORK_ONC_ONC_NORMALIZER_H_
 #define CHROMEOS_NETWORK_ONC_ONC_NORMALIZER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/network/onc/onc_mapper.h"
 
@@ -29,13 +30,13 @@
   // is set, but the field "HexSSID" is not, the contents of the "SSID" field is
   // converted to UTF-8 encoding, a hex representation of the byte sequence is
   // created and stored in the field "HexSSID".
-  scoped_ptr<base::DictionaryValue> NormalizeObject(
+  std::unique_ptr<base::DictionaryValue> NormalizeObject(
       const OncValueSignature* object_signature,
       const base::DictionaryValue& onc_object);
 
  private:
   // Dispatch to the right normalization function according to |signature|.
-  scoped_ptr<base::DictionaryValue> MapObject(
+  std::unique_ptr<base::DictionaryValue> MapObject(
       const OncValueSignature& signature,
       const base::DictionaryValue& onc_object,
       bool* error) override;
diff --git a/chromeos/network/onc/onc_normalizer_unittest.cc b/chromeos/network/onc/onc_normalizer_unittest.cc
index d7e8b85..5f0fbef 100644
--- a/chromeos/network/onc/onc_normalizer_unittest.cc
+++ b/chromeos/network/onc/onc_normalizer_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "chromeos/network/onc/onc_normalizer.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/values.h"
 #include "chromeos/network/onc/onc_signature.h"
 #include "chromeos/network/onc/onc_test_utils.h"
@@ -16,7 +17,7 @@
 // Validate that an irrelevant StaticIPConfig dictionary will be removed.
 TEST(ONCNormalizerTest, RemoveStaticIPConfig) {
   Normalizer normalizer(true);
-  scoped_ptr<const base::DictionaryValue> data(
+  std::unique_ptr<const base::DictionaryValue> data(
       test_utils::ReadTestDictionary("settings_with_normalization.json"));
 
   const base::DictionaryValue* original = NULL;
@@ -25,7 +26,7 @@
   data->GetDictionary("irrelevant-staticipconfig-normalized",
                       &expected_normalized);
 
-  scoped_ptr<base::DictionaryValue> actual_normalized =
+  std::unique_ptr<base::DictionaryValue> actual_normalized =
       normalizer.NormalizeObject(&kNetworkConfigurationSignature, *original);
   EXPECT_TRUE(test_utils::Equals(expected_normalized, actual_normalized.get()));
 }
@@ -33,7 +34,7 @@
 // This test case is about validating valid ONC objects.
 TEST(ONCNormalizerTest, NormalizeNetworkConfigurationEthernetAndVPN) {
   Normalizer normalizer(true);
-  scoped_ptr<const base::DictionaryValue> data(
+  std::unique_ptr<const base::DictionaryValue> data(
       test_utils::ReadTestDictionary("settings_with_normalization.json"));
 
   const base::DictionaryValue* original = NULL;
@@ -41,7 +42,7 @@
   data->GetDictionary("ethernet-and-vpn", &original);
   data->GetDictionary("ethernet-and-vpn-normalized", &expected_normalized);
 
-  scoped_ptr<base::DictionaryValue> actual_normalized =
+  std::unique_ptr<base::DictionaryValue> actual_normalized =
       normalizer.NormalizeObject(&kNetworkConfigurationSignature, *original);
   EXPECT_TRUE(test_utils::Equals(expected_normalized, actual_normalized.get()));
 }
@@ -49,7 +50,7 @@
 // This test case is about validating valid ONC objects.
 TEST(ONCNormalizerTest, NormalizeNetworkConfigurationWifi) {
   Normalizer normalizer(true);
-  scoped_ptr<const base::DictionaryValue> data(
+  std::unique_ptr<const base::DictionaryValue> data(
       test_utils::ReadTestDictionary("settings_with_normalization.json"));
 
   const base::DictionaryValue* original = NULL;
@@ -57,7 +58,7 @@
   data->GetDictionary("wifi", &original);
   data->GetDictionary("wifi-normalized", &expected_normalized);
 
-  scoped_ptr<base::DictionaryValue> actual_normalized =
+  std::unique_ptr<base::DictionaryValue> actual_normalized =
       normalizer.NormalizeObject(&kNetworkConfigurationSignature, *original);
   EXPECT_TRUE(test_utils::Equals(expected_normalized, actual_normalized.get()));
 }
diff --git a/chromeos/network/onc/onc_test_utils.cc b/chromeos/network/onc/onc_test_utils.cc
index 6a5c84e0..ffb18df8 100644
--- a/chromeos/network/onc/onc_test_utils.cc
+++ b/chromeos/network/onc/onc_test_utils.cc
@@ -38,9 +38,9 @@
   return result;
 }
 
-scoped_ptr<base::DictionaryValue> ReadTestDictionary(
+std::unique_ptr<base::DictionaryValue> ReadTestDictionary(
     const std::string& filename) {
-  scoped_ptr<base::DictionaryValue> dict;
+  std::unique_ptr<base::DictionaryValue> dict;
   base::FilePath path;
   if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory,
                                              filename,
@@ -54,7 +54,7 @@
   deserializer.set_allow_trailing_comma(true);
 
   std::string error_message;
-  scoped_ptr<base::Value> content =
+  std::unique_ptr<base::Value> content =
       deserializer.Deserialize(NULL, &error_message);
   CHECK(content != NULL) << "Couldn't json-deserialize file '"
                          << filename << "': " << error_message;
diff --git a/chromeos/network/onc/onc_test_utils.h b/chromeos/network/onc/onc_test_utils.h
index 2213186..680ffbe 100644
--- a/chromeos/network/onc/onc_test_utils.h
+++ b/chromeos/network/onc/onc_test_utils.h
@@ -5,9 +5,9 @@
 #ifndef CHROMEOS_NETWORK_ONC_ONC_TEST_UTILS_H_
 #define CHROMEOS_NETWORK_ONC_ONC_TEST_UTILS_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
@@ -24,7 +24,7 @@
 
 // Read a JSON dictionary from |filename| and return it as a
 // DictionaryValue. CHECKs if any error occurs.
-scoped_ptr<base::DictionaryValue> ReadTestDictionary(
+std::unique_ptr<base::DictionaryValue> ReadTestDictionary(
     const std::string& filename);
 
 // Checks that the pointer |actual| is not NULL but points to a value that
diff --git a/chromeos/network/onc/onc_translator.h b/chromeos/network/onc/onc_translator.h
index db1cb719..26c708d5 100644
--- a/chromeos/network/onc/onc_translator.h
+++ b/chromeos/network/onc/onc_translator.h
@@ -5,7 +5,8 @@
 #ifndef CHROMEOS_NETWORK_ONC_ONC_TRANSLATOR_H_
 #define CHROMEOS_NETWORK_ONC_ONC_TRANSLATOR_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "chromeos/chromeos_export.h"
 #include "components/onc/onc_constants.h"
 
@@ -29,7 +30,7 @@
 // This function is used to translate network settings from ONC to Shill's
 // format before sending them to Shill.
 CHROMEOS_EXPORT
-scoped_ptr<base::DictionaryValue> TranslateONCObjectToShill(
+std::unique_ptr<base::DictionaryValue> TranslateONCObjectToShill(
     const OncValueSignature* signature,
     const base::DictionaryValue& onc_object);
 
@@ -46,7 +47,7 @@
 // will be used to set the ErrorState property. Otherwise ErrorState will not
 // be set.
 CHROMEOS_EXPORT
-scoped_ptr<base::DictionaryValue> TranslateShillServiceToONCPart(
+std::unique_ptr<base::DictionaryValue> TranslateShillServiceToONCPart(
     const base::DictionaryValue& shill_dictionary,
     ::onc::ONCSource onc_source,
     const OncValueSignature* onc_signature,
diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc
index 682688a..78f5f3f 100644
--- a/chromeos/network/onc/onc_translator_onc_to_shill.cc
+++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc
@@ -15,6 +15,7 @@
 #include "base/json/json_writer.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "base/values.h"
 #include "chromeos/network/onc/onc_signature.h"
@@ -30,11 +31,12 @@
 
 namespace {
 
-scoped_ptr<base::StringValue> ConvertValueToString(const base::Value& value) {
+std::unique_ptr<base::StringValue> ConvertValueToString(
+    const base::Value& value) {
   std::string str;
   if (!value.GetAsString(&str))
     base::JSONWriter::Write(value, &str);
-  return make_scoped_ptr(new base::StringValue(str));
+  return base::WrapUnique(new base::StringValue(str));
 }
 
 // This class is responsible to translate the local fields of the given
@@ -78,7 +80,7 @@
   // by the associated signature. Takes ownership of |value|. Does nothing if
   // |value| is NULL or the property name cannot be read from the signature.
   void AddValueAccordingToSignature(const std::string& onc_field_name,
-                                    scoped_ptr<base::Value> value);
+                                    std::unique_ptr<base::Value> value);
 
   // Translates the value |onc_value| using |table|. It is an error if no
   // matching table entry is found. Writes the result as entry at
@@ -167,7 +169,7 @@
 
   for (base::DictionaryValue::Iterator it(*onc_object_); !it.IsAtEnd();
        it.Advance()) {
-    scoped_ptr<base::Value> translated;
+    std::unique_ptr<base::Value> translated;
     if (it.key() == ::onc::openvpn::kRemoteCertKU ||
         it.key() == ::onc::openvpn::kServerCAPEMs) {
       translated.reset(it.value().DeepCopy());
@@ -294,7 +296,7 @@
   const base::DictionaryValue* proxy_settings = nullptr;
   if (onc_object_->GetDictionaryWithoutPathExpansion(
           ::onc::network_config::kProxySettings, &proxy_settings)) {
-    scoped_ptr<base::DictionaryValue> proxy_config =
+    std::unique_ptr<base::DictionaryValue> proxy_config =
         ConvertOncProxySettingsToProxyConfig(*proxy_settings);
     std::string proxy_config_str;
     base::JSONWriter::Write(*proxy_config.get(), &proxy_config_str);
@@ -309,7 +311,7 @@
   for (base::DictionaryValue::Iterator it(*onc_object_); !it.IsAtEnd();
        it.Advance()) {
     AddValueAccordingToSignature(it.key(),
-                                 make_scoped_ptr(it.value().DeepCopy()));
+                                 base::WrapUnique(it.value().DeepCopy()));
   }
 }
 
@@ -341,7 +343,7 @@
 
 void LocalTranslator::AddValueAccordingToSignature(
     const std::string& onc_name,
-    scoped_ptr<base::Value> value) {
+    std::unique_ptr<base::Value> value) {
   if (!value || !field_translation_table_)
     return;
   std::string shill_property_name;
@@ -415,11 +417,12 @@
 
 }  // namespace
 
-scoped_ptr<base::DictionaryValue> TranslateONCObjectToShill(
+std::unique_ptr<base::DictionaryValue> TranslateONCObjectToShill(
     const OncValueSignature* onc_signature,
     const base::DictionaryValue& onc_object) {
   CHECK(onc_signature != NULL);
-  scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> shill_dictionary(
+      new base::DictionaryValue);
   TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get());
   return shill_dictionary;
 }
diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc
index a5a5b9b..d1026aa 100644
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc
@@ -29,9 +29,9 @@
 
 // Converts |str| to a base::Value of the given |type|. If the conversion fails,
 // returns NULL.
-scoped_ptr<base::Value> ConvertStringToValue(const std::string& str,
-                                             base::Value::Type type) {
-  scoped_ptr<base::Value> value;
+std::unique_ptr<base::Value> ConvertStringToValue(const std::string& str,
+                                                  base::Value::Type type) {
+  std::unique_ptr<base::Value> value;
   if (type == base::Value::TYPE_STRING) {
     value.reset(new base::StringValue(str));
   } else {
@@ -73,7 +73,7 @@
 
   // Translates the associated Shill dictionary and creates an ONC object of the
   // given signature.
-  scoped_ptr<base::DictionaryValue> CreateTranslatedONCObject();
+  std::unique_ptr<base::DictionaryValue> CreateTranslatedONCObject();
 
  private:
   void TranslateEthernet();
@@ -144,13 +144,13 @@
   ::onc::ONCSource onc_source_;
   const OncValueSignature* onc_signature_;
   const FieldTranslationEntry* field_translation_table_;
-  scoped_ptr<base::DictionaryValue> onc_object_;
+  std::unique_ptr<base::DictionaryValue> onc_object_;
   const NetworkState* network_state_;
 
   DISALLOW_COPY_AND_ASSIGN(ShillToONCTranslator);
 };
 
-scoped_ptr<base::DictionaryValue>
+std::unique_ptr<base::DictionaryValue>
 ShillToONCTranslator::CreateTranslatedONCObject() {
   onc_object_.reset(new base::DictionaryValue);
   if (onc_signature_ == &kNetworkWithStateSignature) {
@@ -206,7 +206,7 @@
   std::string certKU;
   if (shill_dictionary_->GetStringWithoutPathExpansion(
           shill::kOpenVPNRemoteCertKUProperty, &certKU)) {
-    scoped_ptr<base::ListValue> certKUs(new base::ListValue);
+    std::unique_ptr<base::ListValue> certKUs(new base::ListValue);
     certKUs->AppendString(certKU);
     onc_object_->SetWithoutPathExpansion(::onc::openvpn::kRemoteCertKU,
                                          certKUs.release());
@@ -231,7 +231,7 @@
       continue;
     }
 
-    scoped_ptr<base::Value> translated;
+    std::unique_ptr<base::Value> translated;
     std::string shill_str;
     if (shill_value->GetAsString(&shill_str)) {
       // Shill wants all Provider/VPN fields to be strings. Translates these
@@ -402,7 +402,7 @@
     ShillToONCTranslator nested_translator(
         *device_dictionary, onc_source_, kCellularWithStateSignature,
         kCellularDeviceTable, network_state_);
-    scoped_ptr<base::DictionaryValue> nested_object =
+    std::unique_ptr<base::DictionaryValue> nested_object =
         nested_translator.CreateTranslatedONCObject();
     onc_object_->MergeDictionary(nested_object.get());
 
@@ -579,10 +579,10 @@
   if (shill_dictionary_->GetStringWithoutPathExpansion(
           shill::kProxyConfigProperty, &proxy_config_str) &&
       !proxy_config_str.empty()) {
-    scoped_ptr<base::DictionaryValue> proxy_config_value(
+    std::unique_ptr<base::DictionaryValue> proxy_config_value(
         ReadDictionaryFromJson(proxy_config_str));
     if (proxy_config_value) {
-      scoped_ptr<base::DictionaryValue> proxy_settings =
+      std::unique_ptr<base::DictionaryValue> proxy_settings =
           ConvertProxyConfigToOncProxySettings(*proxy_config_value);
       if (proxy_settings) {
         onc_object_->SetWithoutPathExpansion(
@@ -647,7 +647,7 @@
   ShillToONCTranslator nested_translator(dictionary, onc_source_,
                                          *field_signature->value_signature,
                                          network_state_);
-  scoped_ptr<base::DictionaryValue> nested_object =
+  std::unique_ptr<base::DictionaryValue> nested_object =
       nested_translator.CreateTranslatedONCObject();
   if (nested_object->empty())
     return;
@@ -679,7 +679,7 @@
     return;
   }
   DCHECK(field_signature->value_signature->onc_array_entry_signature);
-  scoped_ptr<base::ListValue> result(new base::ListValue());
+  std::unique_ptr<base::ListValue> result(new base::ListValue());
   for (base::ListValue::const_iterator it = list.begin(); it != list.end();
        ++it) {
     const base::DictionaryValue* shill_value = NULL;
@@ -689,7 +689,7 @@
         *shill_value, onc_source_,
         *field_signature->value_signature->onc_array_entry_signature,
         network_state_);
-    scoped_ptr<base::DictionaryValue> nested_object =
+    std::unique_ptr<base::DictionaryValue> nested_object =
         nested_translator.CreateTranslatedONCObject();
     // If the nested object couldn't be parsed, simply omit it.
     if (nested_object->empty())
@@ -771,7 +771,7 @@
 
 }  // namespace
 
-scoped_ptr<base::DictionaryValue> TranslateShillServiceToONCPart(
+std::unique_ptr<base::DictionaryValue> TranslateShillServiceToONCPart(
     const base::DictionaryValue& shill_dictionary,
     ::onc::ONCSource onc_source,
     const OncValueSignature* onc_signature,
diff --git a/chromeos/network/onc/onc_translator_unittest.cc b/chromeos/network/onc/onc_translator_unittest.cc
index 7de265a..e93d7d2 100644
--- a/chromeos/network/onc/onc_translator_unittest.cc
+++ b/chromeos/network/onc/onc_translator_unittest.cc
@@ -4,10 +4,10 @@
 
 #include "chromeos/network/onc/onc_translator.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "chromeos/network/onc/onc_signature.h"
 #include "chromeos/network/onc/onc_test_utils.h"
@@ -26,14 +26,14 @@
 // Test the translation from ONC to Shill json.
 TEST_P(ONCTranslatorOncToShillTest, Translate) {
   std::string source_onc_filename = GetParam().first;
-  scoped_ptr<const base::DictionaryValue> onc_network(
+  std::unique_ptr<const base::DictionaryValue> onc_network(
       test_utils::ReadTestDictionary(source_onc_filename));
   std::string result_shill_filename = GetParam().second;
-  scoped_ptr<const base::DictionaryValue> expected_shill_network(
+  std::unique_ptr<const base::DictionaryValue> expected_shill_network(
       test_utils::ReadTestDictionary(result_shill_filename));
 
-  scoped_ptr<base::DictionaryValue> translation(TranslateONCObjectToShill(
-      &kNetworkConfigurationSignature, *onc_network));
+  std::unique_ptr<base::DictionaryValue> translation(
+      TranslateONCObjectToShill(&kNetworkConfigurationSignature, *onc_network));
 
   EXPECT_TRUE(test_utils::Equals(expected_shill_network.get(),
                                  translation.get()));
@@ -79,16 +79,17 @@
 
 TEST_P(ONCTranslatorShillToOncTest, Translate) {
   std::string source_shill_filename = GetParam().first;
-  scoped_ptr<const base::DictionaryValue> shill_network(
+  std::unique_ptr<const base::DictionaryValue> shill_network(
       test_utils::ReadTestDictionary(source_shill_filename));
 
   std::string result_onc_filename = GetParam().second;
-  scoped_ptr<base::DictionaryValue> expected_onc_network(
+  std::unique_ptr<base::DictionaryValue> expected_onc_network(
       test_utils::ReadTestDictionary(result_onc_filename));
 
-  scoped_ptr<base::DictionaryValue> translation(TranslateShillServiceToONCPart(
-      *shill_network, ::onc::ONC_SOURCE_NONE, &kNetworkWithStateSignature,
-      nullptr /* network_state */));
+  std::unique_ptr<base::DictionaryValue> translation(
+      TranslateShillServiceToONCPart(*shill_network, ::onc::ONC_SOURCE_NONE,
+                                     &kNetworkWithStateSignature,
+                                     nullptr /* network_state */));
 
   EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(),
                                  translation.get()));
diff --git a/chromeos/network/onc/onc_utils.cc b/chromeos/network/onc/onc_utils.cc
index cb2ea8b..4eed8d7d 100644
--- a/chromeos/network/onc/onc_utils.cc
+++ b/chromeos/network/onc/onc_utils.cc
@@ -11,6 +11,7 @@
 #include "base/json/json_reader.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
@@ -49,10 +50,10 @@
     "{\"Type\":\"UnencryptedConfiguration\",\"NetworkConfigurations\":[],"
     "\"Certificates\":[]}";
 
-scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
+std::unique_ptr<base::DictionaryValue> ReadDictionaryFromJson(
     const std::string& json) {
   std::string error;
-  scoped_ptr<base::Value> root = base::JSONReader::ReadAndReturnError(
+  std::unique_ptr<base::Value> root = base::JSONReader::ReadAndReturnError(
       json, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
 
   base::DictionaryValue* dict_ptr = nullptr;
@@ -61,11 +62,12 @@
     return nullptr;
   }
   ignore_result(root.release());
-  return make_scoped_ptr(dict_ptr);
+  return base::WrapUnique(dict_ptr);
 }
 
-scoped_ptr<base::DictionaryValue> Decrypt(const std::string& passphrase,
-                                          const base::DictionaryValue& root) {
+std::unique_ptr<base::DictionaryValue> Decrypt(
+    const std::string& passphrase,
+    const base::DictionaryValue& root) {
   const int kKeySizeInBits = 256;
   const int kMaxIterationCount = 500000;
   std::string onc_type;
@@ -117,11 +119,9 @@
     return nullptr;
   }
 
-  scoped_ptr<crypto::SymmetricKey> key(
+  std::unique_ptr<crypto::SymmetricKey> key(
       crypto::SymmetricKey::DeriveKeyFromPassword(crypto::SymmetricKey::AES,
-                                                  passphrase,
-                                                  salt,
-                                                  iterations,
+                                                  passphrase, salt, iterations,
                                                   kKeySizeInBits));
 
   if (!base::Base64Decode(initial_vector, &initial_vector)) {
@@ -156,7 +156,7 @@
     return nullptr;
   }
 
-  scoped_ptr<base::DictionaryValue> new_root =
+  std::unique_ptr<base::DictionaryValue> new_root =
       ReadDictionaryFromJson(plaintext);
   if (!new_root) {
     NET_LOG(ERROR) << "Property dictionary malformed.";
@@ -289,7 +289,7 @@
 
 class OncMaskValues : public Mapper {
  public:
-  static scoped_ptr<base::DictionaryValue> Mask(
+  static std::unique_ptr<base::DictionaryValue> Mask(
       const OncValueSignature& signature,
       const base::DictionaryValue& onc_object,
       const std::string& mask) {
@@ -303,13 +303,14 @@
       : mask_(mask) {
   }
 
-  scoped_ptr<base::Value> MapField(const std::string& field_name,
-                                   const OncValueSignature& object_signature,
-                                   const base::Value& onc_value,
-                                   bool* found_unknown_field,
-                                   bool* error) override {
+  std::unique_ptr<base::Value> MapField(
+      const std::string& field_name,
+      const OncValueSignature& object_signature,
+      const base::Value& onc_value,
+      bool* found_unknown_field,
+      bool* error) override {
     if (FieldIsCredential(object_signature, field_name)) {
-      return scoped_ptr<base::Value>(new base::StringValue(mask_));
+      return std::unique_ptr<base::Value>(new base::StringValue(mask_));
     } else {
       return Mapper::MapField(field_name, object_signature, onc_value,
                               found_unknown_field, error);
@@ -322,7 +323,7 @@
 
 }  // namespace
 
-scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject(
+std::unique_ptr<base::DictionaryValue> MaskCredentialsInOncObject(
     const OncValueSignature& signature,
     const base::DictionaryValue& onc_object,
     const std::string& mask) {
@@ -412,7 +413,7 @@
   if (onc_blob.empty())
     return true;
 
-  scoped_ptr<base::DictionaryValue> toplevel_onc =
+  std::unique_ptr<base::DictionaryValue> toplevel_onc =
       ReadDictionaryFromJson(onc_blob);
   if (!toplevel_onc) {
     LOG(ERROR) << "ONC loaded from " << GetSourceAsString(onc_source)
@@ -555,7 +556,7 @@
     return true;
   }
 
-  scoped_ptr<base::ListValue> pem_list(new base::ListValue);
+  std::unique_ptr<base::ListValue> pem_list(new base::ListValue);
   for (const base::Value* entry : *guid_ref_list) {
     std::string guid_ref;
     entry->GetAsString(&guid_ref);
@@ -584,7 +585,7 @@
   if (!GUIDRefToPEMEncoding(certs_by_guid, guid_ref, &pem_encoded))
     return false;
 
-  scoped_ptr<base::ListValue> pem_list(new base::ListValue);
+  std::unique_ptr<base::ListValue> pem_list(new base::ListValue);
   pem_list->AppendString(pem_encoded);
   onc_object->RemoveWithoutPathExpansion(key_guid_ref, nullptr);
   onc_object->SetWithoutPathExpansion(key_pem_list, pem_list.release());
@@ -852,7 +853,7 @@
   if (!proxy_list || proxy_list->IsEmpty())
     return;
   const net::ProxyServer& server = proxy_list->Get();
-  scoped_ptr<base::DictionaryValue> url_dict(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> url_dict(new base::DictionaryValue);
   std::string host = server.host_port_pair().host();
 
   // For all proxy types except SOCKS, the default scheme of the proxy host is
@@ -871,11 +872,11 @@
 
 }  // namespace
 
-scoped_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig(
+std::unique_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig(
     const base::DictionaryValue& onc_proxy_settings) {
   std::string type;
   onc_proxy_settings.GetStringWithoutPathExpansion(::onc::proxy::kType, &type);
-  scoped_ptr<base::DictionaryValue> proxy_dict;
+  std::unique_ptr<base::DictionaryValue> proxy_dict;
 
   if (type == ::onc::proxy::kDirect) {
     proxy_dict.reset(ProxyConfigDictionary::CreateDirect());
@@ -915,14 +916,15 @@
   return proxy_dict;
 }
 
-scoped_ptr<base::DictionaryValue> ConvertProxyConfigToOncProxySettings(
+std::unique_ptr<base::DictionaryValue> ConvertProxyConfigToOncProxySettings(
     const base::DictionaryValue& proxy_config_value) {
   // Create a ProxyConfigDictionary from the DictionaryValue.
-  scoped_ptr<ProxyConfigDictionary> proxy_config(
+  std::unique_ptr<ProxyConfigDictionary> proxy_config(
       new ProxyConfigDictionary(&proxy_config_value));
 
   // Create the result DictionaryValue and populate it.
-  scoped_ptr<base::DictionaryValue> proxy_settings(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> proxy_settings(
+      new base::DictionaryValue);
   ProxyPrefs::ProxyMode mode;
   if (!proxy_config->GetMode(&mode))
     return nullptr;
@@ -948,7 +950,7 @@
     }
     case ProxyPrefs::MODE_FIXED_SERVERS: {
       proxy_settings->SetString(::onc::proxy::kType, ::onc::proxy::kManual);
-      scoped_ptr<base::DictionaryValue> manual(new base::DictionaryValue);
+      std::unique_ptr<base::DictionaryValue> manual(new base::DictionaryValue);
       std::string proxy_rules_string;
       if (proxy_config->GetProxyServer(&proxy_rules_string)) {
         net::ProxyConfig::ProxyRules proxy_rules;
@@ -970,7 +972,7 @@
       if (proxy_config->GetBypassList(&bypass_rules_string)) {
         net::ProxyBypassRules bypass_rules;
         bypass_rules.ParseFromString(bypass_rules_string);
-        scoped_ptr<base::ListValue> exclude_domains(new base::ListValue);
+        std::unique_ptr<base::ListValue> exclude_domains(new base::ListValue);
         for (const net::ProxyBypassRules::Rule* rule : bypass_rules.rules())
           exclude_domains->AppendString(rule->ToString());
         if (!exclude_domains->empty()) {
diff --git a/chromeos/network/onc/onc_utils.h b/chromeos/network/onc/onc_utils.h
index b70a7df3..3950bac 100644
--- a/chromeos/network/onc/onc_utils.h
+++ b/chromeos/network/onc/onc_utils.h
@@ -6,12 +6,12 @@
 #define CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/network/network_type_pattern.h"
 #include "components/onc/onc_constants.h"
@@ -39,13 +39,13 @@
 // Parses |json| according to the JSON format. If |json| is a JSON formatted
 // dictionary, the function returns the dictionary as a DictionaryValue.
 // Otherwise returns NULL.
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue> ReadDictionaryFromJson(
     const std::string& json);
 
 // Decrypts the given EncryptedConfiguration |onc| (see the ONC specification)
 // using |passphrase|. The resulting UnencryptedConfiguration is returned. If an
 // error occurs, returns NULL.
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> Decrypt(
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue> Decrypt(
     const std::string& passphrase,
     const base::DictionaryValue& onc);
 
@@ -97,10 +97,10 @@
 // Creates a copy of |onc_object| with all values of sensitive fields replaced
 // by |mask|. To find sensitive fields, signature and field name are checked
 // with the function FieldIsCredential().
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject(
-    const OncValueSignature& signature,
-    const base::DictionaryValue& onc_object,
-    const std::string& mask);
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue>
+MaskCredentialsInOncObject(const OncValueSignature& signature,
+                           const base::DictionaryValue& onc_object,
+                           const std::string& mask);
 
 // Decrypts |onc_blob| with |passphrase| if necessary. Clears |network_configs|,
 // |global_network_config| and |certificates| and fills them with the validated
@@ -147,13 +147,13 @@
 
 // Translates |onc_proxy_settings|, which must be a valid ONC ProxySettings
 // dictionary, to a ProxyConfig dictionary (see proxy_config_dictionary.h).
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue>
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue>
 ConvertOncProxySettingsToProxyConfig(
     const base::DictionaryValue& onc_proxy_settings);
 
 // Translates |proxy_config_value|, which must be a valid ProxyConfig dictionary
 // (see proxy_config_dictionary.h) to an ONC ProxySettings dictionary.
-CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue>
+CHROMEOS_EXPORT std::unique_ptr<base::DictionaryValue>
 ConvertProxyConfigToOncProxySettings(
     const base::DictionaryValue& proxy_config_value);
 
diff --git a/chromeos/network/onc/onc_utils_unittest.cc b/chromeos/network/onc/onc_utils_unittest.cc
index 4c20d995..fd807eb 100644
--- a/chromeos/network/onc/onc_utils_unittest.cc
+++ b/chromeos/network/onc/onc_utils_unittest.cc
@@ -21,9 +21,9 @@
 
 namespace {
 
-scoped_ptr<base::Value> ReadTestJson(const std::string& filename) {
+std::unique_ptr<base::Value> ReadTestJson(const std::string& filename) {
   base::FilePath path;
-  scoped_ptr<base::Value> result;
+  std::unique_ptr<base::Value> result;
   if (!test_utils::GetTestDataPath("network", filename, &path)) {
     NOTREACHED() << "Unable to get test file path for: " << filename;
     return result;
@@ -42,34 +42,34 @@
 namespace onc {
 
 TEST(ONCDecrypterTest, BrokenEncryptionIterations) {
-  scoped_ptr<base::DictionaryValue> encrypted_onc =
+  std::unique_ptr<base::DictionaryValue> encrypted_onc =
       test_utils::ReadTestDictionary("broken-encrypted-iterations.onc");
 
-  scoped_ptr<base::DictionaryValue> decrypted_onc =
+  std::unique_ptr<base::DictionaryValue> decrypted_onc =
       Decrypt("test0000", *encrypted_onc);
 
   EXPECT_EQ(NULL, decrypted_onc.get());
 }
 
 TEST(ONCDecrypterTest, BrokenEncryptionZeroIterations) {
-  scoped_ptr<base::DictionaryValue> encrypted_onc =
+  std::unique_ptr<base::DictionaryValue> encrypted_onc =
       test_utils::ReadTestDictionary("broken-encrypted-zero-iterations.onc");
 
   std::string error;
-  scoped_ptr<base::DictionaryValue> decrypted_onc =
+  std::unique_ptr<base::DictionaryValue> decrypted_onc =
       Decrypt("test0000", *encrypted_onc);
 
   EXPECT_EQ(NULL, decrypted_onc.get());
 }
 
 TEST(ONCDecrypterTest, LoadEncryptedOnc) {
-  scoped_ptr<base::DictionaryValue> encrypted_onc =
+  std::unique_ptr<base::DictionaryValue> encrypted_onc =
       test_utils::ReadTestDictionary("encrypted.onc");
-  scoped_ptr<base::DictionaryValue> expected_decrypted_onc =
+  std::unique_ptr<base::DictionaryValue> expected_decrypted_onc =
       test_utils::ReadTestDictionary("decrypted.onc");
 
   std::string error;
-  scoped_ptr<base::DictionaryValue> actual_decrypted_onc =
+  std::unique_ptr<base::DictionaryValue> actual_decrypted_onc =
       Decrypt("test0000", *encrypted_onc);
 
   base::DictionaryValue emptyDict;
@@ -102,7 +102,7 @@
 }  // namespace
 
 TEST(ONCStringExpansion, OpenVPN) {
-  scoped_ptr<base::DictionaryValue> vpn_onc =
+  std::unique_ptr<base::DictionaryValue> vpn_onc =
       test_utils::ReadTestDictionary("valid_openvpn.onc");
 
   StringSubstitutionStub substitution;
@@ -115,7 +115,7 @@
 }
 
 TEST(ONCStringExpansion, WiFi_EAP) {
-  scoped_ptr<base::DictionaryValue> wifi_onc =
+  std::unique_ptr<base::DictionaryValue> wifi_onc =
       test_utils::ReadTestDictionary("wifi_clientcert_with_cert_pems.onc");
 
   StringSubstitutionStub substitution;
@@ -128,7 +128,7 @@
 }
 
 TEST(ONCResolveServerCertRefs, ResolveServerCertRefs) {
-  scoped_ptr<base::DictionaryValue> test_cases =
+  std::unique_ptr<base::DictionaryValue> test_cases =
       test_utils::ReadTestDictionary(
           "network_configs_with_resolved_certs.json");
 
@@ -152,7 +152,7 @@
     bool expected_success = (networks_with_cert_refs->GetSize() ==
                              expected_resolved_onc->GetSize());
 
-    scoped_ptr<base::ListValue> actual_resolved_onc(
+    std::unique_ptr<base::ListValue> actual_resolved_onc(
         networks_with_cert_refs->DeepCopy());
 
     bool success = ResolveServerCertRefsInNetworks(certs,
@@ -164,7 +164,7 @@
 }
 
 TEST(ONCUtils, ProxySettingsToProxyConfig) {
-  scoped_ptr<base::Value> test_data(ReadTestJson("proxy_config.json"));
+  std::unique_ptr<base::Value> test_data(ReadTestJson("proxy_config.json"));
 
   base::ListValue* list_of_tests;
   test_data->GetAsList(&list_of_tests);
@@ -184,7 +184,7 @@
     base::DictionaryValue* expected_proxy_config;
     test_case->GetDictionary("ProxyConfig", &expected_proxy_config);
 
-    scoped_ptr<base::DictionaryValue> actual_proxy_config =
+    std::unique_ptr<base::DictionaryValue> actual_proxy_config =
         ConvertOncProxySettingsToProxyConfig(*onc_proxy_settings);
     EXPECT_TRUE(
         test_utils::Equals(expected_proxy_config, actual_proxy_config.get()));
@@ -192,7 +192,7 @@
 }
 
 TEST(ONCUtils, ProxyConfigToOncProxySettings) {
-  scoped_ptr<base::Value> test_data(ReadTestJson("proxy_config.json"));
+  std::unique_ptr<base::Value> test_data(ReadTestJson("proxy_config.json"));
 
   base::ListValue* list_of_tests;
   test_data->GetAsList(&list_of_tests);
@@ -212,7 +212,7 @@
     base::DictionaryValue* onc_proxy_settings;
     test_case->GetDictionary("ONC_ProxySettings", &onc_proxy_settings);
 
-    scoped_ptr<base::DictionaryValue> actual_proxy_settings =
+    std::unique_ptr<base::DictionaryValue> actual_proxy_settings =
         ConvertProxyConfigToOncProxySettings(*shill_proxy_config);
     EXPECT_TRUE(
         test_utils::Equals(onc_proxy_settings, actual_proxy_settings.get()));
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc
index a7d3342..b3a25b7 100644
--- a/chromeos/network/onc/onc_validator.cc
+++ b/chromeos/network/onc/onc_validator.cc
@@ -11,6 +11,7 @@
 
 #include "base/json/json_writer.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/values.h"
@@ -52,7 +53,7 @@
 
 Validator::~Validator() {}
 
-scoped_ptr<base::DictionaryValue> Validator::ValidateAndRepairObject(
+std::unique_ptr<base::DictionaryValue> Validator::ValidateAndRepairObject(
     const OncValueSignature* object_signature,
     const base::DictionaryValue& onc_object,
     Result* result) {
@@ -60,7 +61,7 @@
   *result = VALID;
   error_or_warning_found_ = false;
   bool error = false;
-  scoped_ptr<base::Value> result_value =
+  std::unique_ptr<base::Value> result_value =
       MapValue(*object_signature, onc_object, &error);
   if (error) {
     *result = INVALID;
@@ -77,33 +78,34 @@
     CHECK(result_dict);
   }
 
-  return make_scoped_ptr(result_dict);
+  return base::WrapUnique(result_dict);
 }
 
-scoped_ptr<base::Value> Validator::MapValue(const OncValueSignature& signature,
-                                            const base::Value& onc_value,
-                                            bool* error) {
+std::unique_ptr<base::Value> Validator::MapValue(
+    const OncValueSignature& signature,
+    const base::Value& onc_value,
+    bool* error) {
   if (onc_value.GetType() != signature.onc_type) {
     LOG(ERROR) << MessageHeader() << "Found value '" << onc_value
                << "' of type '" << ValueTypeToString(onc_value.GetType())
                << "', but type '" << ValueTypeToString(signature.onc_type)
                << "' is required.";
     error_or_warning_found_ = *error = true;
-    return scoped_ptr<base::Value>();
+    return std::unique_ptr<base::Value>();
   }
 
-  scoped_ptr<base::Value> repaired =
+  std::unique_ptr<base::Value> repaired =
       Mapper::MapValue(signature, onc_value, error);
   if (repaired)
     CHECK_EQ(repaired->GetType(), signature.onc_type);
   return repaired;
 }
 
-scoped_ptr<base::DictionaryValue> Validator::MapObject(
+std::unique_ptr<base::DictionaryValue> Validator::MapObject(
     const OncValueSignature& signature,
     const base::DictionaryValue& onc_object,
     bool* error) {
-  scoped_ptr<base::DictionaryValue> repaired(new base::DictionaryValue);
+  std::unique_ptr<base::DictionaryValue> repaired(new base::DictionaryValue);
 
   bool valid = ValidateObjectDefault(signature, onc_object, repaired.get());
   if (valid) {
@@ -149,11 +151,11 @@
   } else {
     DCHECK(error_or_warning_found_);
     error_or_warning_found_ = *error = true;
-    return scoped_ptr<base::DictionaryValue>();
+    return std::unique_ptr<base::DictionaryValue>();
   }
 }
 
-scoped_ptr<base::Value> Validator::MapField(
+std::unique_ptr<base::Value> Validator::MapField(
     const std::string& field_name,
     const OncValueSignature& object_signature,
     const base::Value& onc_value,
@@ -161,7 +163,7 @@
     bool* error) {
   path_.push_back(field_name);
   bool current_field_unknown = false;
-  scoped_ptr<base::Value> result = Mapper::MapField(
+  std::unique_ptr<base::Value> result = Mapper::MapField(
       field_name, object_signature, onc_value, &current_field_unknown, error);
 
   DCHECK_EQ(field_name, path_.back());
@@ -180,12 +182,12 @@
   return result;
 }
 
-scoped_ptr<base::ListValue> Validator::MapArray(
+std::unique_ptr<base::ListValue> Validator::MapArray(
     const OncValueSignature& array_signature,
     const base::ListValue& onc_array,
     bool* nested_error) {
   bool nested_error_in_current_array = false;
-  scoped_ptr<base::ListValue> result = Mapper::MapArray(
+  std::unique_ptr<base::ListValue> result = Mapper::MapArray(
       array_signature, onc_array, &nested_error_in_current_array);
 
   // Drop individual networks and certificates instead of rejecting all of
@@ -198,13 +200,14 @@
   return result;
 }
 
-scoped_ptr<base::Value> Validator::MapEntry(int index,
-                                            const OncValueSignature& signature,
-                                            const base::Value& onc_value,
-                                            bool* error) {
+std::unique_ptr<base::Value> Validator::MapEntry(
+    int index,
+    const OncValueSignature& signature,
+    const base::Value& onc_value,
+    bool* error) {
   std::string str = base::IntToString(index);
   path_.push_back(str);
-  scoped_ptr<base::Value> result =
+  std::unique_ptr<base::Value> result =
       Mapper::MapEntry(index, signature, onc_value, error);
   DCHECK_EQ(str, path_.back());
   path_.pop_back();
@@ -235,7 +238,7 @@
     base::DictionaryValue* result) {
   CHECK(result);
 
-  scoped_ptr<base::Value> recommended_value;
+  std::unique_ptr<base::Value> recommended_value;
   // This remove passes ownership to |recommended_value|.
   if (!result->RemoveWithoutPathExpansion(::onc::kRecommended,
                                           &recommended_value)) {
@@ -254,7 +257,7 @@
     return true;
   }
 
-  scoped_ptr<base::ListValue> repaired_recommended(new base::ListValue);
+  std::unique_ptr<base::ListValue> repaired_recommended(new base::ListValue);
   for (const base::Value* entry : *recommended_list) {
     std::string field_name;
     if (!entry->GetAsString(&field_name)) {
diff --git a/chromeos/network/onc/onc_validator.h b/chromeos/network/onc/onc_validator.h
index 07be183..7c1a5e1 100644
--- a/chromeos/network/onc/onc_validator.h
+++ b/chromeos/network/onc/onc_validator.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
 #define CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
 
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/network/onc/onc_mapper.h"
 #include "components/onc/onc_constants.h"
@@ -94,7 +94,7 @@
   // If any of these cases occurred, sets |result| to VALID_WITH_WARNINGS and
   // otherwise to VALID.
   // For details, see the class comment.
-  scoped_ptr<base::DictionaryValue> ValidateAndRepairObject(
+  std::unique_ptr<base::DictionaryValue> ValidateAndRepairObject(
       const OncValueSignature* object_signature,
       const base::DictionaryValue& onc_object,
       Result* result);
@@ -103,37 +103,39 @@
   // Overridden from Mapper:
   // Compare |onc_value|s type with |onc_type| and validate/repair according to
   // |signature|. On error returns NULL.
-  scoped_ptr<base::Value> MapValue(const OncValueSignature& signature,
-                                   const base::Value& onc_value,
-                                   bool* error) override;
+  std::unique_ptr<base::Value> MapValue(const OncValueSignature& signature,
+                                        const base::Value& onc_value,
+                                        bool* error) override;
 
   // Dispatch to the right validation function according to
   // |signature|. Iterates over all fields and recursively validates/repairs
   // these. All valid fields are added to the result dictionary. Returns the
   // repaired dictionary. Only on error returns NULL.
-  scoped_ptr<base::DictionaryValue> MapObject(
+  std::unique_ptr<base::DictionaryValue> MapObject(
       const OncValueSignature& signature,
       const base::DictionaryValue& onc_object,
       bool* error) override;
 
   // Pushes/pops the |field_name| to |path_|, otherwise like |Mapper::MapField|.
-  scoped_ptr<base::Value> MapField(const std::string& field_name,
-                                   const OncValueSignature& object_signature,
-                                   const base::Value& onc_value,
-                                   bool* found_unknown_field,
-                                   bool* error) override;
+  std::unique_ptr<base::Value> MapField(
+      const std::string& field_name,
+      const OncValueSignature& object_signature,
+      const base::Value& onc_value,
+      bool* found_unknown_field,
+      bool* error) override;
 
   // Ignores nested errors in NetworkConfigurations and Certificates, otherwise
   // like |Mapper::MapArray|.
-  scoped_ptr<base::ListValue> MapArray(const OncValueSignature& array_signature,
-                                       const base::ListValue& onc_array,
-                                       bool* nested_error) override;
+  std::unique_ptr<base::ListValue> MapArray(
+      const OncValueSignature& array_signature,
+      const base::ListValue& onc_array,
+      bool* nested_error) override;
 
   // Pushes/pops the index to |path_|, otherwise like |Mapper::MapEntry|.
-  scoped_ptr<base::Value> MapEntry(int index,
-                                   const OncValueSignature& signature,
-                                   const base::Value& onc_value,
-                                   bool* error) override;
+  std::unique_ptr<base::Value> MapEntry(int index,
+                                        const OncValueSignature& signature,
+                                        const base::Value& onc_value,
+                                        bool* error) override;
 
   // This is the default validation of objects/dictionaries. Validates
   // |onc_object| according to |object_signature|. |result| must point to a
diff --git a/chromeos/network/onc/onc_validator_unittest.cc b/chromeos/network/onc/onc_validator_unittest.cc
index a9725b9..0452b2c 100644
--- a/chromeos/network/onc/onc_validator_unittest.cc
+++ b/chromeos/network/onc/onc_validator_unittest.cc
@@ -4,11 +4,12 @@
 
 #include "chromeos/network/onc/onc_validator.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "chromeos/network/onc/onc_signature.h"
 #include "chromeos/network/onc/onc_test_utils.h"
@@ -27,11 +28,11 @@
   // validation is stored, so that expectations can be checked afterwards using
   // one of the Expect* functions below.
   void Validate(bool strict,
-                scoped_ptr<base::DictionaryValue> onc_object,
+                std::unique_ptr<base::DictionaryValue> onc_object,
                 const OncValueSignature* signature,
                 bool managed_onc,
                 ::onc::ONCSource onc_source) {
-    scoped_ptr<Validator> validator;
+    std::unique_ptr<Validator> validator;
     if (strict) {
       // Create a strict validator that complains about every error.
       validator.reset(new Validator(true, true, true, managed_onc));
@@ -65,8 +66,8 @@
 
  private:
   Validator::Result validation_result_;
-  scoped_ptr<const base::DictionaryValue> original_object_;
-  scoped_ptr<const base::DictionaryValue> repaired_object_;
+  std::unique_ptr<const base::DictionaryValue> original_object_;
+  std::unique_ptr<const base::DictionaryValue> repaired_object_;
 };
 
 namespace {
@@ -278,13 +279,13 @@
  public:
   // Load the common test data and return the dictionary at the field with
   // name |name|.
-  scoped_ptr<base::DictionaryValue> GetDictionaryFromTestFile(
-      const std::string &name) {
-    scoped_ptr<const base::DictionaryValue> dict(
+  std::unique_ptr<base::DictionaryValue> GetDictionaryFromTestFile(
+      const std::string& name) {
+    std::unique_ptr<const base::DictionaryValue> dict(
         test_utils::ReadTestDictionary("invalid_settings_with_repairs.json"));
     const base::DictionaryValue* onc_object = NULL;
     CHECK(dict->GetDictionary(name, &onc_object));
-    return make_scoped_ptr(onc_object->DeepCopy());
+    return base::WrapUnique(onc_object->DeepCopy());
   }
 };
 
diff --git a/chromeos/network/policy_applicator.cc b/chromeos/network/policy_applicator.cc
index a5dd9fff..21b0c32 100644
--- a/chromeos/network/policy_applicator.cc
+++ b/chromeos/network/policy_applicator.cc
@@ -4,12 +4,12 @@
 
 #include "chromeos/network/policy_applicator.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/shill_profile_client.h"
@@ -130,7 +130,7 @@
   VLOG(2) << "Received properties for entry " << entry << " of profile "
           << profile_.ToDebugString();
 
-  scoped_ptr<base::DictionaryValue> onc_part(
+  std::unique_ptr<base::DictionaryValue> onc_part(
       onc::TranslateShillServiceToONCPart(
           entry_properties, ::onc::ONC_SOURCE_UNKNOWN,
           &onc::kNetworkWithStateSignature, nullptr /* network_state */));
@@ -144,7 +144,7 @@
     // unmanaged.
   }
 
-  scoped_ptr<NetworkUIData> ui_data =
+  std::unique_ptr<NetworkUIData> ui_data =
       shill_property_util::GetUIDataFromProperties(entry_properties);
   if (!ui_data) {
     VLOG(1) << "Entry " << entry << " of profile " << profile_.ToDebugString()
@@ -192,12 +192,10 @@
     } else {
       const base::DictionaryValue* user_settings =
           ui_data ? ui_data->user_settings() : NULL;
-      scoped_ptr<base::DictionaryValue> new_shill_properties =
-          policy_util::CreateShillConfiguration(profile_,
-                                                new_guid,
+      std::unique_ptr<base::DictionaryValue> new_shill_properties =
+          policy_util::CreateShillConfiguration(profile_, new_guid,
                                                 &global_network_config_,
-                                                new_policy,
-                                                user_settings);
+                                                new_policy, user_settings);
       // A new policy has to be applied to this profile entry. In order to keep
       // implicit state of Shill like "connected successfully before", keep the
       // entry if a policy is reapplied (e.g. after reboot) or is updated.
@@ -328,12 +326,10 @@
     VLOG(1) << "Creating new configuration managed by policy " << *it
             << " in profile " << profile_.ToDebugString() << ".";
 
-    scoped_ptr<base::DictionaryValue> shill_dictionary =
-        policy_util::CreateShillConfiguration(profile_,
-                                              *it,
-                                              &global_network_config_,
-                                              network_policy,
-                                              NULL /* no user settings */);
+    std::unique_ptr<base::DictionaryValue> shill_dictionary =
+        policy_util::CreateShillConfiguration(
+            profile_, *it, &global_network_config_, network_policy,
+            NULL /* no user settings */);
     WriteNewShillConfiguration(
         *shill_dictionary, *network_policy, false /* write now */);
   }
diff --git a/chromeos/network/policy_util.cc b/chromeos/network/policy_util.cc
index 2467419..e19fd1c 100644
--- a/chromeos/network/policy_util.cc
+++ b/chromeos/network/policy_util.cc
@@ -220,7 +220,7 @@
 
 }  // namespace
 
-scoped_ptr<base::DictionaryValue> CreateManagedONC(
+std::unique_ptr<base::DictionaryValue> CreateManagedONC(
     const base::DictionaryValue* global_policy,
     const base::DictionaryValue* network_policy,
     const base::DictionaryValue* user_settings,
@@ -244,14 +244,10 @@
   }
 
   // This call also removes credentials from policies.
-  scoped_ptr<base::DictionaryValue> augmented_onc_network =
+  std::unique_ptr<base::DictionaryValue> augmented_onc_network =
       onc::MergeSettingsAndPoliciesToAugmented(
-          onc::kNetworkConfigurationSignature,
-          user_policy,
-          device_policy,
-          nonshared_user_settings,
-          shared_user_settings,
-          active_settings);
+          onc::kNetworkConfigurationSignature, user_policy, device_policy,
+          nonshared_user_settings, shared_user_settings, active_settings);
 
   // If present, apply the Autoconnect policy only to networks that are not
   // managed by policy.
@@ -302,13 +298,13 @@
       shill::kAutoConnectProperty, false);
 }
 
-scoped_ptr<base::DictionaryValue> CreateShillConfiguration(
+std::unique_ptr<base::DictionaryValue> CreateShillConfiguration(
     const NetworkProfile& profile,
     const std::string& guid,
     const base::DictionaryValue* global_policy,
     const base::DictionaryValue* network_policy,
     const base::DictionaryValue* user_settings) {
-  scoped_ptr<base::DictionaryValue> effective;
+  std::unique_ptr<base::DictionaryValue> effective;
   ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE;
   if (network_policy) {
     if (profile.type() == NetworkProfile::TYPE_SHARED) {
@@ -347,7 +343,7 @@
   effective = normalizer.NormalizeObject(&onc::kNetworkConfigurationSignature,
                                          *effective);
 
-  scoped_ptr<base::DictionaryValue> shill_dictionary(
+  std::unique_ptr<base::DictionaryValue> shill_dictionary(
       onc::TranslateONCObjectToShill(&onc::kNetworkConfigurationSignature,
                                      *effective));
 
@@ -375,7 +371,8 @@
         *shill_dictionary, *global_policy, shill_dictionary.get());
   }
 
-  scoped_ptr<NetworkUIData> ui_data(NetworkUIData::CreateFromONC(onc_source));
+  std::unique_ptr<NetworkUIData> ui_data(
+      NetworkUIData::CreateFromONC(onc_source));
 
   if (user_settings) {
     // Shill doesn't know that sensitive data is contained in the UIData
@@ -385,10 +382,9 @@
     // Shill's GetProperties doesn't return credentials. Masking credentials
     // instead of just removing them, allows remembering if a credential is set
     // or not.
-    scoped_ptr<base::DictionaryValue> sanitized_user_settings(
+    std::unique_ptr<base::DictionaryValue> sanitized_user_settings(
         onc::MaskCredentialsInOncObject(onc::kNetworkConfigurationSignature,
-                                        *user_settings,
-                                        kFakeCredential));
+                                        *user_settings, kFakeCredential));
     ui_data->set_user_settings(std::move(sanitized_user_settings));
   }
 
diff --git a/chromeos/network/policy_util.h b/chromeos/network/policy_util.h
index 841c001..dad4803 100644
--- a/chromeos/network/policy_util.h
+++ b/chromeos/network/policy_util.h
@@ -6,9 +6,9 @@
 #define CHROMEOS_NETWORK_POLICY_UTIL_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 
 namespace base {
 class DictionaryValue;
@@ -28,7 +28,7 @@
 // Each of the arguments can be NULL.
 // TODO(pneubeck): Add documentation of the returned format, see
 //   https://crbug.com/408990 .
-scoped_ptr<base::DictionaryValue> CreateManagedONC(
+std::unique_ptr<base::DictionaryValue> CreateManagedONC(
     const base::DictionaryValue* global_policy,
     const base::DictionaryValue* network_policy,
     const base::DictionaryValue* user_settings,
@@ -48,7 +48,7 @@
 // type, |network_policy| is interpreted as the user or device policy and
 // |user_settings| as the user or shared settings. |network_policy| or
 // |user_settings| can be NULL, but not both.
-scoped_ptr<base::DictionaryValue> CreateShillConfiguration(
+std::unique_ptr<base::DictionaryValue> CreateShillConfiguration(
     const NetworkProfile& profile,
     const std::string& guid,
     const base::DictionaryValue* global_policy,
diff --git a/chromeos/network/portal_detector/network_portal_detector_strategy.cc b/chromeos/network/portal_detector/network_portal_detector_strategy.cc
index 185d441..6e3533b 100644
--- a/chromeos/network/portal_detector/network_portal_detector_strategy.cc
+++ b/chromeos/network/portal_detector/network_portal_detector_strategy.cc
@@ -134,21 +134,22 @@
 }
 
 // static
-scoped_ptr<PortalDetectorStrategy> PortalDetectorStrategy::CreateById(
+std::unique_ptr<PortalDetectorStrategy> PortalDetectorStrategy::CreateById(
     StrategyId id,
     Delegate* delegate) {
   switch (id) {
     case STRATEGY_ID_LOGIN_SCREEN:
-      return scoped_ptr<PortalDetectorStrategy>(
+      return std::unique_ptr<PortalDetectorStrategy>(
           new LoginScreenStrategy(delegate));
     case STRATEGY_ID_ERROR_SCREEN:
-      return scoped_ptr<PortalDetectorStrategy>(
+      return std::unique_ptr<PortalDetectorStrategy>(
           new ErrorScreenStrategy(delegate));
     case STRATEGY_ID_SESSION:
-      return scoped_ptr<PortalDetectorStrategy>(new SessionStrategy(delegate));
+      return std::unique_ptr<PortalDetectorStrategy>(
+          new SessionStrategy(delegate));
     default:
       NOTREACHED();
-      return scoped_ptr<PortalDetectorStrategy>(
+      return std::unique_ptr<PortalDetectorStrategy>(
           static_cast<PortalDetectorStrategy*>(nullptr));
   }
 }
diff --git a/chromeos/network/portal_detector/network_portal_detector_strategy.h b/chromeos/network/portal_detector/network_portal_detector_strategy.h
index 22d4ec50..e855b06 100644
--- a/chromeos/network/portal_detector/network_portal_detector_strategy.h
+++ b/chromeos/network/portal_detector/network_portal_detector_strategy.h
@@ -5,9 +5,10 @@
 #ifndef CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_STRATEGY_H_
 #define CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_STRATEGY_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/tick_clock.h"
 #include "base/time/time.h"
 #include "chromeos/chromeos_export.h"
@@ -38,8 +39,8 @@
   virtual ~PortalDetectorStrategy();
 
   // Lifetime of delegate must enclose lifetime of PortalDetectorStrategy.
-  static scoped_ptr<PortalDetectorStrategy> CreateById(StrategyId id,
-                                                       Delegate* delegate);
+  static std::unique_ptr<PortalDetectorStrategy> CreateById(StrategyId id,
+                                                            Delegate* delegate);
 
   // Returns delay before next detection attempt. This delay is needed
   // to separate detection attempts in time.
@@ -71,7 +72,7 @@
 
   Delegate* delegate_;
   net::BackoffEntry::Policy policy_;
-  scoped_ptr<net::BackoffEntry> backoff_entry_;
+  std::unique_ptr<net::BackoffEntry> backoff_entry_;
 
  private:
   friend class NetworkPortalDetectorImplTest;
diff --git a/chromeos/network/prohibited_technologies_handler_unittest.cc b/chromeos/network/prohibited_technologies_handler_unittest.cc
index 78983d1..24ab2f1f 100644
--- a/chromeos/network/prohibited_technologies_handler_unittest.cc
+++ b/chromeos/network/prohibited_technologies_handler_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chromeos/network/prohibited_technologies_handler.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 
@@ -11,7 +12,6 @@
 #include "base/callback.h"
 #include "base/json/json_reader.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -76,7 +76,7 @@
   }
 
   void PreparePolicies() {
-    scoped_ptr<base::ListValue> val(new base::ListValue());
+    std::unique_ptr<base::ListValue> val(new base::ListValue());
     val->AppendString("WiFi");
     global_config_disable_wifi.Set("DisableNetworkTypes", std::move(val));
     val.reset(new base::ListValue());
@@ -117,11 +117,13 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  scoped_ptr<ProhibitedTechnologiesHandler> prohibited_technologies_handler_;
-  scoped_ptr<NetworkStateHandler> network_state_handler_;
-  scoped_ptr<NetworkConfigurationHandler> network_config_handler_;
-  scoped_ptr<ManagedNetworkConfigurationHandlerImpl> managed_config_handler_;
-  scoped_ptr<NetworkProfileHandler> network_profile_handler_;
+  std::unique_ptr<ProhibitedTechnologiesHandler>
+      prohibited_technologies_handler_;
+  std::unique_ptr<NetworkStateHandler> network_state_handler_;
+  std::unique_ptr<NetworkConfigurationHandler> network_config_handler_;
+  std::unique_ptr<ManagedNetworkConfigurationHandlerImpl>
+      managed_config_handler_;
+  std::unique_ptr<NetworkProfileHandler> network_profile_handler_;
   ShillManagerClient::TestInterface* test_manager_client_;
   base::MessageLoopForUI message_loop_;
   base::DictionaryValue global_config_disable_wifi;
diff --git a/chromeos/network/shill_property_handler_unittest.cc b/chromeos/network/shill_property_handler_unittest.cc
index 6a23238..101bb20 100644
--- a/chromeos/network/shill_property_handler_unittest.cc
+++ b/chromeos/network/shill_property_handler_unittest.cc
@@ -7,12 +7,12 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/values.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -285,8 +285,8 @@
   }
 
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<TestListener> listener_;
-  scoped_ptr<internal::ShillPropertyHandler> shill_property_handler_;
+  std::unique_ptr<TestListener> listener_;
+  std::unique_ptr<internal::ShillPropertyHandler> shill_property_handler_;
   ShillManagerClient::TestInterface* manager_test_;
   ShillDeviceClient::TestInterface* device_test_;
   ShillServiceClient::TestInterface* service_test_;
diff --git a/chromeos/network/shill_property_util.cc b/chromeos/network/shill_property_util.cc
index 5020ae9..ed24a66 100644
--- a/chromeos/network/shill_property_util.cc
+++ b/chromeos/network/shill_property_util.cc
@@ -11,6 +11,7 @@
 #include "base/i18n/icu_encoding_detection.h"
 #include "base/i18n/icu_string_conversions.h"
 #include "base/json/json_writer.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -190,29 +191,30 @@
   return ssid;
 }
 
-scoped_ptr<NetworkUIData> GetUIDataFromValue(const base::Value& ui_data_value) {
+std::unique_ptr<NetworkUIData> GetUIDataFromValue(
+    const base::Value& ui_data_value) {
   std::string ui_data_str;
   if (!ui_data_value.GetAsString(&ui_data_str))
-    return scoped_ptr<NetworkUIData>();
+    return std::unique_ptr<NetworkUIData>();
   if (ui_data_str.empty())
-    return make_scoped_ptr(new NetworkUIData());
-  scoped_ptr<base::DictionaryValue> ui_data_dict(
+    return base::WrapUnique(new NetworkUIData());
+  std::unique_ptr<base::DictionaryValue> ui_data_dict(
       chromeos::onc::ReadDictionaryFromJson(ui_data_str));
   if (!ui_data_dict)
-    return scoped_ptr<NetworkUIData>();
-  return make_scoped_ptr(new NetworkUIData(*ui_data_dict));
+    return std::unique_ptr<NetworkUIData>();
+  return base::WrapUnique(new NetworkUIData(*ui_data_dict));
 }
 
-scoped_ptr<NetworkUIData> GetUIDataFromProperties(
+std::unique_ptr<NetworkUIData> GetUIDataFromProperties(
     const base::DictionaryValue& shill_dictionary) {
   const base::Value* ui_data_value = NULL;
   shill_dictionary.GetWithoutPathExpansion(shill::kUIDataProperty,
                                            &ui_data_value);
   if (!ui_data_value) {
     VLOG(2) << "Dictionary has no UIData entry.";
-    return scoped_ptr<NetworkUIData>();
+    return std::unique_ptr<NetworkUIData>();
   }
-  scoped_ptr<NetworkUIData> ui_data = GetUIDataFromValue(*ui_data_value);
+  std::unique_ptr<NetworkUIData> ui_data = GetUIDataFromValue(*ui_data_value);
   if (!ui_data)
     LOG(ERROR) << "UIData is not a valid JSON dictionary.";
   return ui_data;
diff --git a/chromeos/network/shill_property_util.h b/chromeos/network/shill_property_util.h
index f585da4..8647f6c6 100644
--- a/chromeos/network/shill_property_util.h
+++ b/chromeos/network/shill_property_util.h
@@ -5,9 +5,9 @@
 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_
 #define CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
 namespace base {
@@ -47,12 +47,12 @@
 
 // Returns the UIData specified by |value|. Returns NULL if the value cannot be
 // parsed.
-scoped_ptr<NetworkUIData> GetUIDataFromValue(const base::Value& value);
+std::unique_ptr<NetworkUIData> GetUIDataFromValue(const base::Value& value);
 
 // Returns the NetworkUIData parsed from the UIData property of
 // |shill_dictionary|. If parsing fails or the field doesn't exist, returns
 // NULL.
-scoped_ptr<NetworkUIData> GetUIDataFromProperties(
+std::unique_ptr<NetworkUIData> GetUIDataFromProperties(
     const base::DictionaryValue& shill_dictionary);
 
 // Sets the UIData property in |shill_dictionary| to the serialization of
diff --git a/chromeos/process_proxy/process_output_watcher_unittest.cc b/chromeos/process_proxy/process_output_watcher_unittest.cc
index e22a5cc0..107ce2d 100644
--- a/chromeos/process_proxy/process_output_watcher_unittest.cc
+++ b/chromeos/process_proxy/process_output_watcher_unittest.cc
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "chromeos/process_proxy/process_output_watcher.h"
+
 #include <gtest/gtest.h>
 #include <stddef.h>
 
+#include <memory>
 #include <queue>
 #include <string>
 #include <vector>
@@ -13,13 +16,11 @@
 #include "base/callback.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/threading/thread.h"
-#include "chromeos/process_proxy/process_output_watcher.h"
 
 namespace chromeos {
 
@@ -87,7 +88,7 @@
   size_t received_from_out_;
 };
 
-void StopProcessOutputWatcher(scoped_ptr<ProcessOutputWatcher> watcher) {
+void StopProcessOutputWatcher(std::unique_ptr<ProcessOutputWatcher> watcher) {
   // Just deleting |watcher| if sufficient.
 }
 
@@ -149,9 +150,10 @@
     int pt_pipe[2];
     ASSERT_FALSE(HANDLE_EINTR(pipe(pt_pipe)));
 
-    scoped_ptr<ProcessOutputWatcher> crosh_watcher(new ProcessOutputWatcher(
-        pt_pipe[0],
-        base::Bind(&ProcessOutputWatcherTest::OnRead, base::Unretained(this))));
+    std::unique_ptr<ProcessOutputWatcher> crosh_watcher(
+        new ProcessOutputWatcher(pt_pipe[0],
+                                 base::Bind(&ProcessOutputWatcherTest::OnRead,
+                                            base::Unretained(this))));
 
     output_watch_thread_->task_runner()->PostTask(
         FROM_HERE, base::Bind(&ProcessOutputWatcher::Start,
@@ -189,7 +191,7 @@
  private:
   base::Closure test_case_done_callback_;
   base::MessageLoop message_loop_;
-  scoped_ptr<base::Thread> output_watch_thread_;
+  std::unique_ptr<base::Thread> output_watch_thread_;
   bool output_watch_thread_started_;
   bool failed_;
   ProcessWatcherExpectations expectations_;
diff --git a/chromeos/process_proxy/process_proxy.cc b/chromeos/process_proxy/process_proxy.cc
index e5484a7..e9afecb 100644
--- a/chromeos/process_proxy/process_proxy.cc
+++ b/chromeos/process_proxy/process_proxy.cc
@@ -29,7 +29,8 @@
 
 const int kInvalidFd = -1;
 
-void StopOutputWatcher(scoped_ptr<chromeos::ProcessOutputWatcher> watcher) {
+void StopOutputWatcher(
+    std::unique_ptr<chromeos::ProcessOutputWatcher> watcher) {
   // Just deleting |watcher| if sufficient to stop it.
 }
 
diff --git a/chromeos/process_proxy/process_proxy.h b/chromeos/process_proxy/process_proxy.h
index 06680930..19335be 100644
--- a/chromeos/process_proxy/process_proxy.h
+++ b/chromeos/process_proxy/process_proxy.h
@@ -9,11 +9,11 @@
 #include <signal.h>
 
 #include <cstdio>
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "chromeos/process_proxy/process_output_watcher.h"
 
 namespace base {
@@ -106,9 +106,9 @@
   scoped_refptr<base::TaskRunner> callback_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> watcher_runner_;
 
-  scoped_ptr<ProcessOutputWatcher> output_watcher_;
+  std::unique_ptr<ProcessOutputWatcher> output_watcher_;
 
-  scoped_ptr<base::Process> process_;
+  std::unique_ptr<base::Process> process_;
 
   int pt_pair_[2];
 
diff --git a/chromeos/process_proxy/process_proxy_registry.h b/chromeos/process_proxy/process_proxy_registry.h
index 63ea411..093e0fd5 100644
--- a/chromeos/process_proxy/process_proxy_registry.h
+++ b/chromeos/process_proxy/process_proxy_registry.h
@@ -6,13 +6,13 @@
 #define CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/lazy_instance.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/threading/thread.h"
 #include "chromeos/chromeos_export.h"
@@ -71,7 +71,7 @@
   // Map of all existing ProcessProxies.
   std::map<int, ProcessProxyInfo> proxy_map_;
 
-  scoped_ptr<base::Thread> watcher_thread_;
+  std::unique_ptr<base::Thread> watcher_thread_;
 
   DISALLOW_COPY_AND_ASSIGN(ProcessProxyRegistry);
 };
diff --git a/chromeos/process_proxy/process_proxy_unittest.cc b/chromeos/process_proxy/process_proxy_unittest.cc
index 3605dc3..52147ae3 100644
--- a/chromeos/process_proxy/process_proxy_unittest.cc
+++ b/chromeos/process_proxy/process_proxy_unittest.cc
@@ -5,11 +5,11 @@
 #include <gtest/gtest.h>
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/process/kill.h"
 #include "base/process/process.h"
 #include "base/single_thread_task_runner.h"
@@ -217,7 +217,7 @@
     base::MessageLoop::current()->Run();
   }
 
-  scoped_ptr<TestRunner> test_runner_;
+  std::unique_ptr<TestRunner> test_runner_;
 
  private:
   ProcessProxyRegistry* registry_;
diff --git a/chromeos/settings/timezone_settings.cc b/chromeos/settings/timezone_settings.cc
index 6f1251e..b8ce973c 100644
--- a/chromeos/settings/timezone_settings.cc
+++ b/chromeos/settings/timezone_settings.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -14,7 +15,6 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "base/observer_list.h"
 #include "base/stl_util.h"
@@ -295,7 +295,7 @@
 
   base::ObserverList<Observer> observers_;
   std::vector<icu::TimeZone*> timezones_;
-  scoped_ptr<icu::TimeZone> timezone_;
+  std::unique_ptr<icu::TimeZone> timezone_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TimezoneSettingsBaseImpl);
@@ -347,7 +347,7 @@
 
 void TimezoneSettingsBaseImpl::SetTimezoneFromID(
     const base::string16& timezone_id) {
-  scoped_ptr<icu::TimeZone> timezone(icu::TimeZone::createTimeZone(
+  std::unique_ptr<icu::TimeZone> timezone(icu::TimeZone::createTimeZone(
       icu::UnicodeString(timezone_id.c_str(), timezone_id.size())));
   SetTimezone(*timezone);
 }
diff --git a/chromeos/settings/timezone_settings_unittest.cc b/chromeos/settings/timezone_settings_unittest.cc
index d8b5b5f..7f7a6426 100644
--- a/chromeos/settings/timezone_settings_unittest.cc
+++ b/chromeos/settings/timezone_settings_unittest.cc
@@ -2,7 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/stl_util.h"
 #include "chromeos/settings/timezone_settings_helper.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -66,9 +67,9 @@
   };
 
   for (const auto& pair : timezone_match_list) {
-    scoped_ptr<TimeZone> input(
+    std::unique_ptr<TimeZone> input(
         TimeZone::createTimeZone(UnicodeString(pair.id)));
-    scoped_ptr<TimeZone> expected(
+    std::unique_ptr<TimeZone> expected(
         TimeZone::createTimeZone(UnicodeString(pair.matched)));
     const TimeZone* actual = GetKnownTimezoneOrNull(*input, timezones_);
     EXPECT_NE(nullptr, actual) << "input=" << pair.id;
@@ -94,7 +95,8 @@
       "Asia/Tokyo",                 // Historically != Asia/Seoul
   };
   for (const char* id : no_match_list) {
-    scoped_ptr<TimeZone> input(TimeZone::createTimeZone(UnicodeString(id)));
+    std::unique_ptr<TimeZone> input(
+        TimeZone::createTimeZone(UnicodeString(id)));
     EXPECT_EQ(NULL, GetKnownTimezoneOrNull(*input, timezones_))
         << "input=" << id;
   }
diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc
index 276feafd..1b890681 100644
--- a/chromeos/system/statistics_provider.cc
+++ b/chromeos/system/statistics_provider.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/system/statistics_provider.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
@@ -12,7 +14,6 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "base/path_service.h"
 #include "base/strings/string_number_conversions.h"
@@ -233,7 +234,7 @@
   base::WaitableEvent on_statistics_loaded_;
   bool oem_manifest_loaded_;
   std::string region_;
-  scoped_ptr<base::Value> regional_data_;
+  std::unique_ptr<base::Value> regional_data_;
   base::hash_map<std::string, RegionDataExtractor> regional_data_extractors_;
 
  private:
diff --git a/chromeos/timezone/timezone_provider.cc b/chromeos/timezone/timezone_provider.cc
index 591e9f00..cd52b27 100644
--- a/chromeos/timezone/timezone_provider.cc
+++ b/chromeos/timezone/timezone_provider.cc
@@ -46,7 +46,7 @@
 void TimeZoneProvider::OnTimezoneResponse(
     TimeZoneRequest* request,
     TimeZoneRequest::TimeZoneResponseCallback callback,
-    scoped_ptr<TimeZoneResponseData> timezone,
+    std::unique_ptr<TimeZoneResponseData> timezone,
     bool server_error) {
   ScopedVector<TimeZoneRequest>::iterator position =
       std::find(requests_.begin(), requests_.end(), request);
diff --git a/chromeos/timezone/timezone_provider.h b/chromeos/timezone/timezone_provider.h
index 91340b5..b445f2ce 100644
--- a/chromeos/timezone/timezone_provider.h
+++ b/chromeos/timezone/timezone_provider.h
@@ -5,9 +5,10 @@
 #ifndef CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_
 #define CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
@@ -44,7 +45,7 @@
   // Deletes request from requests_.
   void OnTimezoneResponse(TimeZoneRequest* request,
                           TimeZoneRequest::TimeZoneResponseCallback callback,
-                          scoped_ptr<TimeZoneResponseData> timezone,
+                          std::unique_ptr<TimeZoneResponseData> timezone,
                           bool server_error);
 
   scoped_refptr<net::URLRequestContextGetter> url_context_getter_;
diff --git a/chromeos/timezone/timezone_request.cc b/chromeos/timezone/timezone_request.cc
index 46c0a9b..5e917bae 100644
--- a/chromeos/timezone/timezone_request.cc
+++ b/chromeos/timezone/timezone_request.cc
@@ -177,8 +177,9 @@
 
   // Parse the response, ignoring comments.
   std::string error_msg;
-  scoped_ptr<base::Value> response_value = base::JSONReader::ReadAndReturnError(
-      response_body, base::JSON_PARSE_RFC, NULL, &error_msg);
+  std::unique_ptr<base::Value> response_value =
+      base::JSONReader::ReadAndReturnError(response_body, base::JSON_PARSE_RFC,
+                                           NULL, &error_msg);
   if (response_value == NULL) {
     PrintTimeZoneError(server_url, "JSONReader failed: " + error_msg, timezone);
     RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_MALFORMED);
@@ -263,12 +264,12 @@
 
 // Attempts to extract a position from the response. Detects and indicates
 // various failure cases.
-scoped_ptr<TimeZoneResponseData> GetTimeZoneFromResponse(
+std::unique_ptr<TimeZoneResponseData> GetTimeZoneFromResponse(
     bool http_success,
     int status_code,
     const std::string& response_body,
     const GURL& server_url) {
-  scoped_ptr<TimeZoneResponseData> timezone(new TimeZoneResponseData);
+  std::unique_ptr<TimeZoneResponseData> timezone(new TimeZoneResponseData);
 
   // HttpPost can fail for a number of reasons. Most likely this is because
   // we're offline, or there was no response.
@@ -368,7 +369,7 @@
 
   std::string data;
   source->GetResponseAsString(&data);
-  scoped_ptr<TimeZoneResponseData> timezone = GetTimeZoneFromResponse(
+  std::unique_ptr<TimeZoneResponseData> timezone = GetTimeZoneFromResponse(
       status.is_success(), response_code, data, source->GetURL());
   const bool server_error =
       !status.is_success() || (response_code >= 500 && response_code < 600);
diff --git a/chromeos/timezone/timezone_request.h b/chromeos/timezone/timezone_request.h
index 8c584cc..848d031 100644
--- a/chromeos/timezone/timezone_request.h
+++ b/chromeos/timezone/timezone_request.h
@@ -5,11 +5,12 @@
 #ifndef CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_
 #define CHROMEOS_TIMEZONE_TIMEZONE_REQUEST_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "chromeos/chromeos_export.h"
@@ -63,8 +64,9 @@
   // The second argument indicates whether there was a server error or not.
   // It is true when there was a server or network error - either no response
   // or a 500 error code.
-  typedef base::Callback<void(scoped_ptr<TimeZoneResponseData> /* timezone */,
-                              bool /* server_error */)>
+  typedef base::Callback<void(
+      std::unique_ptr<TimeZoneResponseData> /* timezone */,
+      bool /* server_error */)>
       TimeZoneResponseCallback;
 
   // |url| is the server address to which the request wil be sent.
@@ -109,7 +111,7 @@
   TimeZoneResponseCallback callback_;
 
   GURL request_url_;
-  scoped_ptr<net::URLFetcher> url_fetcher_;
+  std::unique_ptr<net::URLFetcher> url_fetcher_;
 
   // When request was actually started.
   base::Time request_started_at_;
diff --git a/chromeos/timezone/timezone_resolver.cc b/chromeos/timezone/timezone_resolver.cc
index c4b3e79..7d8ff1c 100644
--- a/chromeos/timezone/timezone_resolver.cc
+++ b/chromeos/timezone/timezone_resolver.cc
@@ -135,7 +135,7 @@
   int requests_count_;
 
   // This is not NULL when update is in progress.
-  scoped_ptr<TZRequest> request_;
+  std::unique_ptr<TZRequest> request_;
 
   base::WeakPtrFactory<TimeZoneResolver::TimeZoneResolverImpl>
       weak_ptr_factory_;
@@ -162,7 +162,7 @@
                           const base::TimeDelta elapsed);
 
   // TimeZoneRequest::TimeZoneResponseCallback implementation.
-  void OnTimezoneResolved(scoped_ptr<TimeZoneResponseData> timezone,
+  void OnTimezoneResolved(std::unique_ptr<TimeZoneResponseData> timezone,
                           bool server_error);
 
   base::WeakPtr<TZRequest> AsWeakPtr();
@@ -224,8 +224,9 @@
   base::Closure unused = on_request_finished.Release();
 }
 
-void TZRequest::OnTimezoneResolved(scoped_ptr<TimeZoneResponseData> timezone,
-                                   bool server_error) {
+void TZRequest::OnTimezoneResolved(
+    std::unique_ptr<TimeZoneResponseData> timezone,
+    bool server_error) {
   base::ScopedClosureRunner on_request_finished(
       base::Bind(&TimeZoneResolver::TimeZoneResolverImpl::RequestIsFinished,
                  base::Unretained(resolver_)));
diff --git a/chromeos/timezone/timezone_resolver.h b/chromeos/timezone/timezone_resolver.h
index 7402e9bf..8d431464 100644
--- a/chromeos/timezone/timezone_resolver.h
+++ b/chromeos/timezone/timezone_resolver.h
@@ -5,9 +5,10 @@
 #ifndef CHROMEOS_TIMEZONE_TIMEZONE_RESOLVER_H_
 #define CHROMEOS_TIMEZONE_TIMEZONE_RESOLVER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "chromeos/chromeos_export.h"
 #include "net/url_request/url_request_context_getter.h"
@@ -96,7 +97,7 @@
   const DelayNetworkCallClosure delay_network_call_;
   PrefService* local_state_;
 
-  scoped_ptr<TimeZoneResolverImpl> implementation_;
+  std::unique_ptr<TimeZoneResolverImpl> implementation_;
 
   bool send_wifi_data_to_geolocation_api_;
 
diff --git a/chromeos/timezone/timezone_unittest.cc b/chromeos/timezone/timezone_unittest.cc
index b26ae54..1c130b6a 100644
--- a/chromeos/timezone/timezone_unittest.cc
+++ b/chromeos/timezone/timezone_unittest.cc
@@ -90,7 +90,7 @@
         attempts_(0),
         provider_(provider) {}
 
-  scoped_ptr<net::FakeURLFetcher> CreateURLFetcher(
+  std::unique_ptr<net::FakeURLFetcher> CreateURLFetcher(
       const GURL& url,
       net::URLFetcherDelegate* delegate,
       const std::string& response_data,
@@ -113,7 +113,7 @@
       status = net::URLRequestStatus::SUCCESS;
       factory_->SetFakeResponse(url, response_, response_code, status);
     }
-    scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
+    std::unique_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
         url, delegate, response_, response_code, status));
     scoped_refptr<net::HttpResponseHeaders> download_headers =
         new net::HttpResponseHeaders(std::string());
@@ -166,8 +166,8 @@
   size_t attempts() const { return url_callback_->attempts(); }
 
  private:
-  scoped_ptr<TestTimeZoneAPIURLFetcherCallback> url_callback_;
-  scoped_ptr<net::FakeURLFetcherFactory> fetcher_factory_;
+  std::unique_ptr<TestTimeZoneAPIURLFetcherCallback> url_callback_;
+  std::unique_ptr<net::FakeURLFetcherFactory> fetcher_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(TimeZoneAPIFetcherFactory);
 };
@@ -176,7 +176,7 @@
  public:
   TimeZoneReceiver() : server_error_(false) {}
 
-  void OnRequestDone(scoped_ptr<TimeZoneResponseData> timezone,
+  void OnRequestDone(std::unique_ptr<TimeZoneResponseData> timezone,
                      bool server_error) {
     timezone_ = std::move(timezone);
     server_error_ = server_error;
@@ -193,9 +193,9 @@
   bool server_error() const { return server_error_; }
 
  private:
-  scoped_ptr<TimeZoneResponseData> timezone_;
+  std::unique_ptr<TimeZoneResponseData> timezone_;
   bool server_error_;
-  scoped_ptr<base::RunLoop> message_loop_runner_;
+  std::unique_ptr<base::RunLoop> message_loop_runner_;
 };
 
 class TimeZoneTest : public testing::Test {
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc
index c825103..18a3f36a 100644
--- a/chromeos/tools/onc_validator/onc_validator.cc
+++ b/chromeos/tools/onc_validator/onc_validator.cc
@@ -86,20 +86,22 @@
           kStatusArgumentError);
 }
 
-scoped_ptr<base::DictionaryValue> ReadDictionary(const std::string& filename) {
+std::unique_ptr<base::DictionaryValue> ReadDictionary(
+    const std::string& filename) {
   base::FilePath path(filename);
   JSONFileValueDeserializer deserializer(path);
   deserializer.set_allow_trailing_comma(true);
 
   std::string json_error;
-  scoped_ptr<base::Value> value = deserializer.Deserialize(NULL, &json_error);
+  std::unique_ptr<base::Value> value =
+      deserializer.Deserialize(NULL, &json_error);
   if (!value) {
     LOG(ERROR) << "Couldn't json-deserialize file '" << filename
                << "': " << json_error;
     return nullptr;
   }
 
-  scoped_ptr<base::DictionaryValue> dict =
+  std::unique_ptr<base::DictionaryValue> dict =
       base::DictionaryValue::From(std::move(value));
   if (!dict) {
     LOG(ERROR) << "File '" << filename
@@ -121,7 +123,7 @@
     return kStatusArgumentError;
   }
 
-  scoped_ptr<base::DictionaryValue> onc_object = ReadDictionary(args[1]);
+  std::unique_ptr<base::DictionaryValue> onc_object = ReadDictionary(args[1]);
 
   if (!onc_object)
     return kStatusJsonError;
diff --git a/chromeos/tpm/tpm_token_info_getter.cc b/chromeos/tpm/tpm_token_info_getter.cc
index 31a3089..dc772487 100644
--- a/chromeos/tpm/tpm_token_info_getter.cc
+++ b/chromeos/tpm/tpm_token_info_getter.cc
@@ -43,20 +43,20 @@
 TPMTokenInfo::~TPMTokenInfo() {}
 
 // static
-scoped_ptr<TPMTokenInfoGetter> TPMTokenInfoGetter::CreateForUserToken(
+std::unique_ptr<TPMTokenInfoGetter> TPMTokenInfoGetter::CreateForUserToken(
     const AccountId& account_id,
     CryptohomeClient* cryptohome_client,
     const scoped_refptr<base::TaskRunner>& delayed_task_runner) {
   CHECK(account_id.is_valid());
-  return scoped_ptr<TPMTokenInfoGetter>(new TPMTokenInfoGetter(
+  return std::unique_ptr<TPMTokenInfoGetter>(new TPMTokenInfoGetter(
       TYPE_USER, account_id, cryptohome_client, delayed_task_runner));
 }
 
 // static
-scoped_ptr<TPMTokenInfoGetter> TPMTokenInfoGetter::CreateForSystemToken(
+std::unique_ptr<TPMTokenInfoGetter> TPMTokenInfoGetter::CreateForSystemToken(
     CryptohomeClient* cryptohome_client,
     const scoped_refptr<base::TaskRunner>& delayed_task_runner) {
-  return scoped_ptr<TPMTokenInfoGetter>(new TPMTokenInfoGetter(
+  return std::unique_ptr<TPMTokenInfoGetter>(new TPMTokenInfoGetter(
       TYPE_SYSTEM, EmptyAccountId(), cryptohome_client, delayed_task_runner));
 }
 
diff --git a/chromeos/tpm/tpm_token_info_getter.h b/chromeos/tpm/tpm_token_info_getter.h
index 14bde8b..a92c1fd 100644
--- a/chromeos/tpm/tpm_token_info_getter.h
+++ b/chromeos/tpm/tpm_token_info_getter.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_
 #define CHROMEOS_TPM_TPM_TOKEN_INFO_GETTER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "chromeos/chromeos_export.h"
@@ -48,13 +48,13 @@
   using TPMTokenInfoCallback = base::Callback<void(const TPMTokenInfo& info)>;
 
   // Factory method for TPMTokenInfoGetter for a user token.
-  static scoped_ptr<TPMTokenInfoGetter> CreateForUserToken(
+  static std::unique_ptr<TPMTokenInfoGetter> CreateForUserToken(
       const AccountId& account_id,
       CryptohomeClient* cryptohome_client,
       const scoped_refptr<base::TaskRunner>& delayed_task_runner);
 
   // Factory method for TPMTokenGetter for the system token.
-  static scoped_ptr<TPMTokenInfoGetter> CreateForSystemToken(
+  static std::unique_ptr<TPMTokenInfoGetter> CreateForSystemToken(
       CryptohomeClient* cryptohome_client,
       const scoped_refptr<base::TaskRunner>& delayed_task_runner);
 
diff --git a/chromeos/tpm/tpm_token_info_getter_unittest.cc b/chromeos/tpm/tpm_token_info_getter_unittest.cc
index 5bdfa6f..a0b9374 100644
--- a/chromeos/tpm/tpm_token_info_getter_unittest.cc
+++ b/chromeos/tpm/tpm_token_info_getter_unittest.cc
@@ -245,8 +245,8 @@
   }
 
  protected:
-  scoped_ptr<TestCryptohomeClient> cryptohome_client_;
-  scoped_ptr<chromeos::TPMTokenInfoGetter> tpm_token_info_getter_;
+  std::unique_ptr<TestCryptohomeClient> cryptohome_client_;
+  std::unique_ptr<chromeos::TPMTokenInfoGetter> tpm_token_info_getter_;
 
   std::vector<int64_t> delays_;
 
@@ -270,8 +270,8 @@
   }
 
  protected:
-  scoped_ptr<TestCryptohomeClient> cryptohome_client_;
-  scoped_ptr<chromeos::TPMTokenInfoGetter> tpm_token_info_getter_;
+  std::unique_ptr<TestCryptohomeClient> cryptohome_client_;
+  std::unique_ptr<chromeos::TPMTokenInfoGetter> tpm_token_info_getter_;
 
   const AccountId account_id_;
   std::vector<int64_t> delays_;
diff --git a/chromeos/tpm/tpm_token_loader.h b/chromeos/tpm/tpm_token_loader.h
index fa8f01e..be32d38c 100644
--- a/chromeos/tpm/tpm_token_loader.h
+++ b/chromeos/tpm/tpm_token_loader.h
@@ -5,12 +5,12 @@
 #ifndef CHROMEOS_TPM_TPM_TOKEN_LOADER_H_
 #define CHROMEOS_TPM_TPM_TOKEN_LOADER_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/threading/thread_checker.h"
@@ -117,7 +117,7 @@
   };
   TPMTokenState tpm_token_state_;
 
-  scoped_ptr<TPMTokenInfoGetter> tpm_token_info_getter_;
+  std::unique_ptr<TPMTokenInfoGetter> tpm_token_info_getter_;
 
   // Cached TPM token info.
   int tpm_token_slot_id_;
diff --git a/components/component_updater/default_component_installer.h b/components/component_updater/default_component_installer.h
index 9de80d6..f445fe6 100644
--- a/components/component_updater/default_component_installer.h
+++ b/components/component_updater/default_component_installer.h
@@ -83,6 +83,12 @@
 
   // Returns the human-readable name of the component.
   virtual std::string GetName() const = 0;
+
+  // Returns the additional parameters to be used in the update checks for
+  // this component. A compatible server may use this attribute to negotiate
+  // special update rules when issuing an update response.
+  // The current implementation restricts ap to ^([-+_=a-zA-Z0-9]{0,256})$
+  virtual std::string GetAp() const = 0;
 };
 
 // A DefaultComponentInstaller is intended to be final, and not derived from.
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 36eae94..e344102 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -821,6 +821,7 @@
     'update_client_unittest_sources': [
       'update_client/component_patcher_unittest.cc',
       'update_client/crx_downloader_unittest.cc',
+      'update_client/persisted_data_unittest.cc',
       'update_client/ping_manager_unittest.cc',
       'update_client/request_sender_unittest.cc',
       'update_client/update_checker_unittest.cc',
diff --git a/components/drive/file_change.cc b/components/drive/file_change.cc
index 33a2ac3..7abf9b0 100644
--- a/components/drive/file_change.cc
+++ b/components/drive/file_change.cc
@@ -91,6 +91,7 @@
 
 FileChange::FileChange() {
 }
+FileChange::FileChange(const FileChange& other) = default;
 FileChange::~FileChange() {}
 
 void FileChange::Update(const base::FilePath file_path,
diff --git a/components/drive/file_change.h b/components/drive/file_change.h
index 40d750c..1cfc6911 100644
--- a/components/drive/file_change.h
+++ b/components/drive/file_change.h
@@ -84,6 +84,7 @@
   typedef std::map<base::FilePath, FileChange::ChangeList> Map;
 
   FileChange();
+  FileChange(const FileChange& other);
   ~FileChange();
 
   void Update(const base::FilePath file_path,
diff --git a/components/metrics/leak_detector/leak_detector.cc b/components/metrics/leak_detector/leak_detector.cc
index d1ae9c4..a7151a8 100644
--- a/components/metrics/leak_detector/leak_detector.cc
+++ b/components/metrics/leak_detector/leak_detector.cc
@@ -155,6 +155,8 @@
 
 LeakDetector::LeakReport::LeakReport() {}
 
+LeakDetector::LeakReport::LeakReport(const LeakReport& other) = default;
+
 LeakDetector::LeakReport::~LeakReport() {}
 
 // static
diff --git a/components/metrics/leak_detector/leak_detector.h b/components/metrics/leak_detector/leak_detector.h
index 319e386..8dcba5e 100644
--- a/components/metrics/leak_detector/leak_detector.h
+++ b/components/metrics/leak_detector/leak_detector.h
@@ -51,6 +51,7 @@
   // Contains a report of a detected memory leak.
   struct LeakReport {
     LeakReport();
+    LeakReport(const LeakReport& other);
     ~LeakReport();
 
     size_t alloc_size_bytes;
diff --git a/components/metrics/leak_detector/leak_detector_impl.cc b/components/metrics/leak_detector/leak_detector_impl.cc
index edde53b3..e174cc2 100644
--- a/components/metrics/leak_detector/leak_detector_impl.cc
+++ b/components/metrics/leak_detector/leak_detector_impl.cc
@@ -60,6 +60,8 @@
 
 LeakDetectorImpl::LeakReport::LeakReport() : alloc_size_bytes_(0) {}
 
+LeakDetectorImpl::LeakReport::LeakReport(const LeakReport& other) = default;
+
 LeakDetectorImpl::LeakReport::~LeakReport() {}
 
 bool LeakDetectorImpl::LeakReport::operator<(const LeakReport& other) const {
diff --git a/components/metrics/leak_detector/leak_detector_impl.h b/components/metrics/leak_detector/leak_detector_impl.h
index 7c3ec24..fafd7b81 100644
--- a/components/metrics/leak_detector/leak_detector_impl.h
+++ b/components/metrics/leak_detector/leak_detector_impl.h
@@ -39,6 +39,7 @@
   class LeakReport {
    public:
     LeakReport();
+    LeakReport(const LeakReport& other);
     ~LeakReport();
 
     size_t alloc_size_bytes() const { return alloc_size_bytes_; }
diff --git a/components/mus/gles2/BUILD.gn b/components/mus/gles2/BUILD.gn
index 8d9e61e..0a942da2 100644
--- a/components/mus/gles2/BUILD.gn
+++ b/components/mus/gles2/BUILD.gn
@@ -63,6 +63,10 @@
 
   if (use_ozone) {
     deps += [ "//ui/ozone:ozone" ]
+    sources += [
+      "ozone_gpu_memory_buffer.cc",
+      "ozone_gpu_memory_buffer.h",
+    ]
   }
 
   include_dirs = [ "../.." ]
@@ -72,6 +76,8 @@
   sources = [
     "command_buffer_type_conversions.cc",
     "command_buffer_type_conversions.h",
+    "gpu_memory_buffer_impl.cc",
+    "gpu_memory_buffer_impl.h",
     "mojo_buffer_backing.cc",
     "mojo_buffer_backing.h",
     "mojo_gpu_memory_buffer.cc",
diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
index ea0f540..a173e084 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -35,6 +35,10 @@
 #include "ui/gl/gl_image_shared_memory.h"
 #include "ui/gl/gl_surface.h"
 
+#if defined(USE_OZONE)
+#include "ui/gl/gl_image_ozone_native_pixmap.h"
+#endif
+
 namespace mus {
 
 namespace {
@@ -84,10 +88,19 @@
   const bool offscreen = widget_ == gfx::kNullAcceleratedWidget;
   static scoped_refptr<gfx::GLSurface> underlying_surface;
   if (offscreen) {
-    surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+    surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(0, 0));
   } else {
+#if defined(USE_OZONE)
+    scoped_refptr<gfx::GLSurface> underlying_surface =
+        gfx::GLSurface::CreateSurfacelessViewGLSurface(widget_);
+    if (!underlying_surface)
+      underlying_surface = gfx::GLSurface::CreateViewGLSurface(widget_);
+#else
+    scoped_refptr<gfx::GLSurface> underlying_surface =
+        gfx::GLSurface::CreateViewGLSurface(widget_);
+#endif
     scoped_refptr<GLSurfaceAdapterMus> surface_adapter =
-        new GLSurfaceAdapterMus(gfx::GLSurface::CreateViewGLSurface(widget_));
+        new GLSurfaceAdapterMus(underlying_surface);
     surface_adapter->SetGpuCompletedSwapBuffersCallback(
         base::Bind(&CommandBufferDriver::OnGpuCompletedSwapBuffers,
                    weak_factory_.GetWeakPtr()));
@@ -272,6 +285,32 @@
   image_manager->AddImage(image.get(), id);
 }
 
+// TODO(rjkroege): It is conceivable that this code belongs in
+// ozone_gpu_memory_buffer.cc
+void CommandBufferDriver::CreateImageNativeOzone(int32_t id,
+                                                 int32_t type,
+                                                 gfx::Size size,
+                                                 gfx::BufferFormat format,
+                                                 uint32_t internal_format,
+                                                 ui::NativePixmap* pixmap) {
+#if defined(USE_OZONE)
+  gpu::gles2::ImageManager* image_manager = decoder_->GetImageManager();
+  if (image_manager->LookupImage(id)) {
+    LOG(ERROR) << "Image already exists with same ID.";
+    return;
+  }
+
+  scoped_refptr<gfx::GLImageOzoneNativePixmap> image =
+      new gfx::GLImageOzoneNativePixmap(size, internal_format);
+  if (!image->Initialize(pixmap, format)) {
+    NOTREACHED();
+    return;
+  }
+
+  image_manager->AddImage(image.get(), id);
+#endif
+}
+
 void CommandBufferDriver::DestroyImage(int32_t id) {
   DCHECK(CalledOnValidThread());
   gpu::gles2::ImageManager* image_manager = decoder_->GetImageManager();
@@ -286,6 +325,7 @@
 
 bool CommandBufferDriver::IsScheduled() const {
   DCHECK(CalledOnValidThread());
+  DCHECK(executor_);
   return executor_->scheduled();
 }
 
diff --git a/components/mus/gles2/command_buffer_driver.h b/components/mus/gles2/command_buffer_driver.h
index e28a6e6..51fe2ea 100644
--- a/components/mus/gles2/command_buffer_driver.h
+++ b/components/mus/gles2/command_buffer_driver.h
@@ -20,23 +20,31 @@
 #include "gpu/command_buffer/common/constants.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/system/buffer.h"
+#include "ui/gfx/buffer_types.h"
+#include "ui/gfx/geometry/size.h"
 #include "ui/gfx/native_widget_types.h"
 #include "ui/gfx/swap_result.h"
 #include "ui/mojo/geometry/geometry.mojom.h"
 
+namespace gfx {
+class GLContext;
+class GLSurface;
+}
+
 namespace gpu {
 class CommandBufferService;
 class CommandExecutor;
 class SyncPointClient;
 class SyncPointOrderData;
+
 namespace gles2 {
 class GLES2Decoder;
-}
-}
+}  // namespace gles2
 
-namespace gfx {
-class GLContext;
-class GLSurface;
+}  // namespace gpu
+
+namespace ui {
+class NativePixmap;
 }
 
 namespace mus {
@@ -79,6 +87,12 @@
                    mojo::SizePtr size,
                    int32_t format,
                    int32_t internal_format);
+  void CreateImageNativeOzone(int32_t id,
+                              int32_t type,
+                              gfx::Size size,
+                              gfx::BufferFormat format,
+                              uint32_t internal_format,
+                              ui::NativePixmap* pixmap);
   void DestroyImage(int32_t id);
   bool IsScheduled() const;
   bool HasUnprocessedCommands() const;
diff --git a/components/mus/gles2/command_buffer_local.cc b/components/mus/gles2/command_buffer_local.cc
index 23a8fd1e..87a7ba95 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -233,44 +233,56 @@
 
   mus::MojoGpuMemoryBufferImpl* gpu_memory_buffer =
       mus::MojoGpuMemoryBufferImpl::FromClientBuffer(buffer);
-  gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->GetHandle();
 
   bool requires_sync_point = false;
-  if (handle.type != gfx::SHARED_MEMORY_BUFFER) {
-    requires_sync_point = true;
-    NOTIMPLEMENTED();
-    return -1;
-  }
 
-  base::SharedMemoryHandle dupd_handle =
-      base::SharedMemory::DuplicateHandle(handle.handle);
+  if (gpu_memory_buffer->GetBufferType() == gfx::SHARED_MEMORY_BUFFER) {
+    gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->GetHandle();
+    // TODO(rjkroege): Verify that this is required and update appropriately.
+    base::SharedMemoryHandle dupd_handle =
+        base::SharedMemory::DuplicateHandle(handle.handle);
 #if defined(OS_WIN)
-  HANDLE platform_handle = dupd_handle.GetHandle();
+    HANDLE platform_handle = dupd_handle.GetHandle();
 #else
-  int platform_handle = dupd_handle.fd;
+    int platform_handle = dupd_handle.fd;
 #endif
 
-  MojoHandle mojo_handle = MOJO_HANDLE_INVALID;
-  MojoResult create_result =
-      MojoCreatePlatformHandleWrapper(platform_handle, &mojo_handle);
-  // |MojoCreatePlatformHandleWrapper()| always takes the ownership of the
-  // |platform_handle|, so we don't need close |platform_handle|.
-  if (create_result != MOJO_RESULT_OK) {
+    MojoHandle mojo_handle = MOJO_HANDLE_INVALID;
+    MojoResult create_result =
+        MojoCreatePlatformHandleWrapper(platform_handle, &mojo_handle);
+    // |MojoCreatePlatformHandleWrapper()| always takes the ownership of the
+    // |platform_handle|, so we don't need to close |platform_handle|.
+    if (create_result != MOJO_RESULT_OK) {
+      NOTIMPLEMENTED();
+      return -1;
+    }
+    mojo::ScopedHandle scoped_handle;
+    scoped_handle.reset(mojo::Handle(mojo_handle));
+
+    const int32_t format = static_cast<int32_t>(gpu_memory_buffer->GetFormat());
+    gpu_state_->command_buffer_task_runner()->PostTask(
+        driver_.get(),
+        base::Bind(&CommandBufferLocal::CreateImageOnGpuThread,
+                   base::Unretained(this), new_id, base::Passed(&scoped_handle),
+                   handle.type, base::Passed(&size), format, internal_format));
+#if defined(USE_OZONE)
+  } else if (gpu_memory_buffer->GetBufferType() == gfx::OZONE_NATIVE_PIXMAP) {
+    gpu_state_->command_buffer_task_runner()->PostTask(
+        driver_.get(),
+        base::Bind(&CommandBufferLocal::CreateImageNativeOzoneOnGpuThread,
+                   base::Unretained(this), new_id,
+                   gpu_memory_buffer->GetBufferType(),
+                   gpu_memory_buffer->GetSize(), gpu_memory_buffer->GetFormat(),
+                   internal_format,
+                   base::RetainedRef(gpu_memory_buffer->GetNativePixmap())));
+#endif
+  } else {
     NOTIMPLEMENTED();
     return -1;
   }
-  mojo::ScopedHandle scoped_handle;
-  scoped_handle.reset(mojo::Handle(mojo_handle));
-
-  const int32_t format = static_cast<int32_t>(gpu_memory_buffer->GetFormat());
-  gpu_state_->command_buffer_task_runner()->PostTask(
-      driver_.get(),
-      base::Bind(&CommandBufferLocal::CreateImageOnGpuThread,
-                 base::Unretained(this), new_id, base::Passed(&scoped_handle),
-                 handle.type, base::Passed(&size), format, internal_format));
 
   if (requires_sync_point) {
-    NOTIMPLEMENTED();
+    NOTIMPLEMENTED() << "Require sync points";
     // TODO(jam): need to support this if we support types other than
     // SHARED_MEMORY_BUFFER.
     // gpu_memory_buffer_manager->SetDestructionSyncPoint(gpu_memory_buffer,
@@ -511,6 +523,19 @@
   return true;
 }
 
+bool CommandBufferLocal::CreateImageNativeOzoneOnGpuThread(
+    int32_t id,
+    int32_t type,
+    gfx::Size size,
+    gfx::BufferFormat format,
+    uint32_t internal_format,
+    ui::NativePixmap* pixmap) {
+  DCHECK(driver_->IsScheduled());
+  driver_->CreateImageNativeOzone(id, type, size, format, internal_format,
+                                  pixmap);
+  return true;
+}
+
 bool CommandBufferLocal::DestroyImageOnGpuThread(int32_t id) {
   DCHECK(driver_->IsScheduled());
   driver_->DestroyImage(id);
diff --git a/components/mus/gles2/command_buffer_local.h b/components/mus/gles2/command_buffer_local.h
index 6c5cef5..1d8f588 100644
--- a/components/mus/gles2/command_buffer_local.h
+++ b/components/mus/gles2/command_buffer_local.h
@@ -126,6 +126,12 @@
                               mojo::SizePtr size,
                               int32_t format,
                               int32_t internal_format);
+  bool CreateImageNativeOzoneOnGpuThread(int32_t id,
+                                         int32_t type,
+                                         gfx::Size size,
+                                         gfx::BufferFormat format,
+                                         uint32_t internal_format,
+                                         ui::NativePixmap* pixmap);
   bool DestroyImageOnGpuThread(int32_t id);
   bool MakeProgressOnGpuThread(base::WaitableEvent* event,
                                gpu::CommandBuffer::State* state);
diff --git a/components/mus/gles2/gpu_memory_buffer_impl.cc b/components/mus/gles2/gpu_memory_buffer_impl.cc
new file mode 100644
index 0000000..d2592dc
--- /dev/null
+++ b/components/mus/gles2/gpu_memory_buffer_impl.cc
@@ -0,0 +1,46 @@
+// 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/mus/gles2/gpu_memory_buffer_impl.h"
+
+namespace mus {
+
+GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
+                                         const gfx::Size& size,
+                                         gfx::BufferFormat format)
+    : id_(id), size_(size), format_(format), mapped_(false) {}
+
+GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {
+  DCHECK(!mapped_);
+}
+
+// static
+GpuMemoryBufferImpl* GpuMemoryBufferImpl::FromClientBuffer(
+    ClientBuffer buffer) {
+  return reinterpret_cast<GpuMemoryBufferImpl*>(buffer);
+}
+
+gfx::Size GpuMemoryBufferImpl::GetSize() const {
+  return size_;
+}
+
+gfx::BufferFormat GpuMemoryBufferImpl::GetFormat() const {
+  return format_;
+}
+
+gfx::GpuMemoryBufferId GpuMemoryBufferImpl::GetId() const {
+  return id_;
+}
+
+ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() {
+  return reinterpret_cast<ClientBuffer>(this);
+}
+
+#if defined(USE_OZONE)
+scoped_refptr<ui::NativePixmap> GpuMemoryBufferImpl::GetNativePixmap() {
+  return scoped_refptr<ui::NativePixmap>();
+}
+#endif
+
+}  // namespace mus
diff --git a/components/mus/gles2/gpu_memory_buffer_impl.h b/components/mus/gles2/gpu_memory_buffer_impl.h
new file mode 100644
index 0000000..8d831b7
--- /dev/null
+++ b/components/mus/gles2/gpu_memory_buffer_impl.h
@@ -0,0 +1,59 @@
+// 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.
+
+#ifndef COMPONENTS_MUS_GLES2_GPU_MEMORY_BUFFER_IMPL_H_
+#define COMPONENTS_MUS_GLES2_GPU_MEMORY_BUFFER_IMPL_H_
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "gpu/command_buffer/common/sync_token.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/gpu_memory_buffer.h"
+
+#if defined(USE_OZONE)
+#include "ui/ozone/public/native_pixmap.h"
+#endif
+
+namespace mus {
+
+// Provides common implementation of a GPU memory buffer.
+class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
+ public:
+  ~GpuMemoryBufferImpl() override;
+
+  // Type-checking upcast routine. Returns an NULL on failure.
+  static GpuMemoryBufferImpl* FromClientBuffer(ClientBuffer buffer);
+
+  // Overridden from gfx::GpuMemoryBuffer:
+  gfx::Size GetSize() const override;
+  gfx::BufferFormat GetFormat() const override;
+  gfx::GpuMemoryBufferId GetId() const override;
+  ClientBuffer AsClientBuffer() override;
+
+  // Returns the type of this GpuMemoryBufferImpl.
+  virtual gfx::GpuMemoryBufferType GetBufferType() const = 0;
+
+#if defined(USE_OZONE)
+  // Returns a ui::NativePixmap when one is available.
+  virtual scoped_refptr<ui::NativePixmap> GetNativePixmap();
+#endif
+
+ protected:
+  GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
+                      const gfx::Size& size,
+                      gfx::BufferFormat format);
+
+  const gfx::GpuMemoryBufferId id_;
+  const gfx::Size size_;
+  const gfx::BufferFormat format_;
+  bool mapped_;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl);
+};
+
+}  // namespace mus
+
+#endif  // COMPONENTS_MUS_GLES2_GPU_MEMORY_BUFFER_IMPL_H_
\ No newline at end of file
diff --git a/components/mus/gles2/mojo_gpu_memory_buffer.cc b/components/mus/gles2/mojo_gpu_memory_buffer.cc
index 545fe23..b3cc044 100644
--- a/components/mus/gles2/mojo_gpu_memory_buffer.cc
+++ b/components/mus/gles2/mojo_gpu_memory_buffer.cc
@@ -18,11 +18,10 @@
     const gfx::Size& size,
     gfx::BufferFormat format,
     scoped_ptr<base::SharedMemory> shared_memory)
-    : size_(size),
-      format_(format),
-      shared_memory_(std::move(shared_memory)),
-      mapped_(false) {}
+    : GpuMemoryBufferImpl(gfx::GenericSharedMemoryId(0), size, format),
+      shared_memory_(std::move(shared_memory)) {}
 
+// TODO(rjkroege): Support running a destructor callback as necessary.
 MojoGpuMemoryBufferImpl::~MojoGpuMemoryBufferImpl() {}
 
 scoped_ptr<gfx::GpuMemoryBuffer> MojoGpuMemoryBufferImpl::Create(
@@ -69,24 +68,12 @@
   mapped_ = false;
 }
 
-gfx::Size MojoGpuMemoryBufferImpl::GetSize() const {
-  return size_;
-}
-
-gfx::BufferFormat MojoGpuMemoryBufferImpl::GetFormat() const {
-  return format_;
-}
-
 int MojoGpuMemoryBufferImpl::stride(size_t plane) const {
   DCHECK_LT(plane, gfx::NumberOfPlanesForBufferFormat(format_));
   return base::checked_cast<int>(gfx::RowSizeForBufferFormat(
       size_.width(), format_, static_cast<int>(plane)));
 }
 
-gfx::GpuMemoryBufferId MojoGpuMemoryBufferImpl::GetId() const {
-  return gfx::GpuMemoryBufferId(0);
-}
-
 gfx::GpuMemoryBufferHandle MojoGpuMemoryBufferImpl::GetHandle() const {
   gfx::GpuMemoryBufferHandle handle;
   handle.type = gfx::SHARED_MEMORY_BUFFER;
@@ -94,11 +81,12 @@
   handle.offset = 0;
   handle.stride = static_cast<int32_t>(
       gfx::RowSizeForBufferFormat(size_.width(), format_, 0));
+
   return handle;
 }
 
-ClientBuffer MojoGpuMemoryBufferImpl::AsClientBuffer() {
-  return reinterpret_cast<ClientBuffer>(this);
+gfx::GpuMemoryBufferType MojoGpuMemoryBufferImpl::GetBufferType() const {
+  return gfx::SHARED_MEMORY_BUFFER;
 }
 
 }  // namespace mus
diff --git a/components/mus/gles2/mojo_gpu_memory_buffer.h b/components/mus/gles2/mojo_gpu_memory_buffer.h
index afed2aa5..d4e54c7 100644
--- a/components/mus/gles2/mojo_gpu_memory_buffer.h
+++ b/components/mus/gles2/mojo_gpu_memory_buffer.h
@@ -9,12 +9,13 @@
 
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "components/mus/gles2/gpu_memory_buffer_impl.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/gfx/gpu_memory_buffer.h"
 
 namespace mus {
 
-class MojoGpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
+class MojoGpuMemoryBufferImpl : public mus::GpuMemoryBufferImpl {
  public:
   MojoGpuMemoryBufferImpl(const gfx::Size& size,
                           gfx::BufferFormat format,
@@ -33,18 +34,14 @@
   bool Map() override;
   void* memory(size_t plane) override;
   void Unmap() override;
-  gfx::Size GetSize() const override;
-  gfx::BufferFormat GetFormat() const override;
   int stride(size_t plane) const override;
-  gfx::GpuMemoryBufferId GetId() const override;
   gfx::GpuMemoryBufferHandle GetHandle() const override;
-  ClientBuffer AsClientBuffer() override;
+
+  // Overridden from gfx::GpuMemoryBufferImpl
+  gfx::GpuMemoryBufferType GetBufferType() const override;
 
  private:
-  const gfx::Size size_;
-  gfx::BufferFormat format_;
   scoped_ptr<base::SharedMemory> shared_memory_;
-  bool mapped_;
 
   DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferImpl);
 };
diff --git a/components/mus/gles2/ozone_gpu_memory_buffer.cc b/components/mus/gles2/ozone_gpu_memory_buffer.cc
new file mode 100644
index 0000000..acd3993
--- /dev/null
+++ b/components/mus/gles2/ozone_gpu_memory_buffer.cc
@@ -0,0 +1,115 @@
+// 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 "components/mus/gles2/ozone_gpu_memory_buffer.h"
+
+#include "ui/gfx/buffer_format_util.h"
+#include "ui/ozone/public/client_native_pixmap.h"
+#include "ui/ozone/public/client_native_pixmap_factory.h"
+#include "ui/ozone/public/native_pixmap.h"
+#include "ui/ozone/public/ozone_platform.h"
+#include "ui/ozone/public/surface_factory_ozone.h"
+
+namespace mus {
+
+OzoneGpuMemoryBuffer::OzoneGpuMemoryBuffer(
+    gfx::GpuMemoryBufferId id,
+    const gfx::Size& size,
+    gfx::BufferFormat format,
+    scoped_ptr<ui::ClientNativePixmap> client_pixmap,
+    scoped_refptr<ui::NativePixmap> native_pixmap)
+    : GpuMemoryBufferImpl(id, size, format),
+      client_pixmap_(std::move(client_pixmap)),
+      native_pixmap_(native_pixmap) {}
+
+OzoneGpuMemoryBuffer::~OzoneGpuMemoryBuffer() {
+  DCHECK(!mapped_);
+}
+
+// static
+OzoneGpuMemoryBuffer* OzoneGpuMemoryBuffer::FromClientBuffer(
+    ClientBuffer buffer) {
+  return reinterpret_cast<OzoneGpuMemoryBuffer*>(buffer);
+}
+
+// static
+scoped_ptr<gfx::GpuMemoryBuffer>
+OzoneGpuMemoryBuffer::CreateOzoneGpuMemoryBuffer(
+    const gfx::Size& size,
+    gfx::BufferFormat format,
+    gfx::BufferUsage usage,
+    gfx::AcceleratedWidget widget) {
+  scoped_refptr<ui::NativePixmap> pixmap =
+      ui::OzonePlatform::GetInstance()
+          ->GetSurfaceFactoryOzone()
+          ->CreateNativePixmap(widget, size, format, usage);
+
+  DCHECK(pixmap) << "need pixmap to exist!";
+
+  if (!pixmap.get()) {
+    DLOG(ERROR) << "Failed to create pixmap " << size.width() << "x"
+                << size.height() << " format " << static_cast<int>(format)
+                << ", usage " << static_cast<int>(usage);
+    return nullptr;
+  }
+
+  // We construct a ui::NativePixmapHandle
+  gfx::NativePixmapHandle native_pixmap_handle = pixmap->ExportHandle();
+  DCHECK(ui::ClientNativePixmapFactory::GetInstance())
+      << "need me a ClientNativePixmapFactory";
+  scoped_ptr<ui::ClientNativePixmap> client_native_pixmap =
+      ui::ClientNativePixmapFactory::GetInstance()->ImportFromHandle(
+          native_pixmap_handle, size, usage);
+
+  scoped_ptr<OzoneGpuMemoryBuffer> nb(
+      new OzoneGpuMemoryBuffer(gfx::GpuMemoryBufferId(0), size, format,
+                               std::move(client_native_pixmap), pixmap));
+  return std::move(nb);
+}
+
+bool OzoneGpuMemoryBuffer::Map() {
+  DCHECK(!mapped_);
+  if (!client_pixmap_->Map())
+    return false;
+  mapped_ = true;
+  return mapped_;
+}
+
+void* OzoneGpuMemoryBuffer::memory(size_t plane) {
+  DCHECK(mapped_);
+  DCHECK_LT(plane, gfx::NumberOfPlanesForBufferFormat(format_));
+  return client_pixmap_->Map();
+}
+
+void OzoneGpuMemoryBuffer::Unmap() {
+  DCHECK(mapped_);
+  client_pixmap_->Unmap();
+  mapped_ = false;
+}
+
+int OzoneGpuMemoryBuffer::stride(size_t plane) const {
+  DCHECK_LT(plane, gfx::NumberOfPlanesForBufferFormat(format_));
+  int stride;
+  client_pixmap_->GetStride(&stride);
+  return stride;
+}
+
+gfx::GpuMemoryBufferHandle OzoneGpuMemoryBuffer::GetHandle() const {
+  gfx::GpuMemoryBufferHandle handle;
+  handle.type = gfx::OZONE_NATIVE_PIXMAP;
+  handle.id = id_;
+  return handle;
+}
+
+gfx::GpuMemoryBufferType OzoneGpuMemoryBuffer::GetBufferType() const {
+  return gfx::OZONE_NATIVE_PIXMAP;
+}
+
+#if defined(USE_OZONE)
+scoped_refptr<ui::NativePixmap> OzoneGpuMemoryBuffer::GetNativePixmap() {
+  return native_pixmap_;
+}
+#endif
+
+}  // namespace mus
diff --git a/components/mus/gles2/ozone_gpu_memory_buffer.h b/components/mus/gles2/ozone_gpu_memory_buffer.h
new file mode 100644
index 0000000..92f6cab
--- /dev/null
+++ b/components/mus/gles2/ozone_gpu_memory_buffer.h
@@ -0,0 +1,70 @@
+// 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.
+
+#ifndef COMPONENTS_MUS_GLES2_OZONE_GPU_MEMORY_BUFFER_
+#define COMPONENTS_MUS_GLES2_OZONE_GPU_MEMORY_BUFFER_
+
+#include "base/memory/scoped_ptr.h"
+#include "components/mus/gles2/gpu_memory_buffer_impl.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/gpu_memory_buffer.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui {
+class ClientNativePixmap;
+class NativePixmap;
+}  // namespace ui
+
+namespace mus {
+
+// A not-mojo GpuMemoryBuffer implementation solely for use internally to mus
+// for scanout buffers. Note that OzoneGpuMemoryBuffer is for use on the client
+// (aka CC thread).
+class OzoneGpuMemoryBuffer : public mus::GpuMemoryBufferImpl {
+ public:
+  ~OzoneGpuMemoryBuffer() override;
+
+  // gfx::GpuMemoryBuffer implementation
+  bool Map() override;
+  void Unmap() override;
+  void* memory(size_t plane) override;
+  int stride(size_t plane) const override;
+  gfx::GpuMemoryBufferHandle GetHandle() const override;
+
+  // Returns the type of this GpuMemoryBufferImpl.
+  gfx::GpuMemoryBufferType GetBufferType() const override;
+  scoped_refptr<ui::NativePixmap> GetNativePixmap() override;
+
+  // Create a NativeBuffer. The implementation (mus-specific) will call directly
+  // into ozone to allocate the buffer. See the version in the .cc file.
+  static scoped_ptr<gfx::GpuMemoryBuffer> CreateOzoneGpuMemoryBuffer(
+      const gfx::Size& size,
+      gfx::BufferFormat format,
+      gfx::BufferUsage usage,
+      gfx::AcceleratedWidget widget);
+
+  // Cribbed from content/common/gpu/client/gpu_memory_buffer_impl.h
+  static OzoneGpuMemoryBuffer* FromClientBuffer(ClientBuffer buffer);
+
+ private:
+  // TODO(rjkroege): It is conceivable that we do not need an |id| here. It
+  // would seem to be a legacy of content leaking into gfx. In a mojo context,
+  // perhaps it should be a mojo handle instead.
+  OzoneGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
+                       const gfx::Size& size,
+                       gfx::BufferFormat format,
+                       scoped_ptr<ui::ClientNativePixmap> client_pixmap,
+                       scoped_refptr<ui::NativePixmap> native_pixmap);
+
+  // The real backing buffer.
+  // From content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h
+  scoped_ptr<ui::ClientNativePixmap> client_pixmap_;
+  scoped_refptr<ui::NativePixmap> native_pixmap_;
+
+  DISALLOW_COPY_AND_ASSIGN(OzoneGpuMemoryBuffer);
+};
+
+}  // namespace mus
+
+#endif  // COMPONENTS_MUS_GLES2_OZONE_GPU_MEMORY_BUFFER_
diff --git a/components/mus/public/cpp/lib/in_flight_change.cc b/components/mus/public/cpp/lib/in_flight_change.cc
index 714efc9..db2e0a7 100644
--- a/components/mus/public/cpp/lib/in_flight_change.cc
+++ b/components/mus/public/cpp/lib/in_flight_change.cc
@@ -188,6 +188,23 @@
   WindowPrivate(window()).LocalSetVisible(revert_visible_);
 }
 
+// InFlightOpacityChange -------------------------------------------------------
+
+InFlightOpacityChange::InFlightOpacityChange(Window* window, float revert_value)
+    : InFlightChange(window, ChangeType::OPACITY),
+      revert_opacity_(revert_value) {}
+
+InFlightOpacityChange::~InFlightOpacityChange() {}
+
+void InFlightOpacityChange::SetRevertValueFrom(const InFlightChange& change) {
+  revert_opacity_ =
+      static_cast<const InFlightOpacityChange&>(change).revert_opacity_;
+}
+
+void InFlightOpacityChange::Revert() {
+  WindowPrivate(window()).LocalSetOpacity(revert_opacity_);
+}
+
 // InFlightSetModalChange ------------------------------------------------------
 
 InFlightSetModalChange::InFlightSetModalChange(Window* window)
diff --git a/components/mus/public/cpp/lib/in_flight_change.h b/components/mus/public/cpp/lib/in_flight_change.h
index 13a634df..e7dd91d 100644
--- a/components/mus/public/cpp/lib/in_flight_change.h
+++ b/components/mus/public/cpp/lib/in_flight_change.h
@@ -34,6 +34,7 @@
   FOCUS,
   NEW_WINDOW,
   NEW_TOP_LEVEL_WINDOW,
+  OPACITY,
   PREDEFINED_CURSOR,
   PROPERTY,
   REMOVE_CHILD,
@@ -265,6 +266,21 @@
   DISALLOW_COPY_AND_ASSIGN(InFlightVisibleChange);
 };
 
+class InFlightOpacityChange : public InFlightChange {
+ public:
+  InFlightOpacityChange(Window* window, float revert_value);
+  ~InFlightOpacityChange() override;
+
+  // InFlightChange:
+  void SetRevertValueFrom(const InFlightChange& change) override;
+  void Revert() override;
+
+ private:
+  float revert_opacity_;
+
+  DISALLOW_COPY_AND_ASSIGN(InFlightOpacityChange);
+};
+
 class InFlightSetModalChange : public InFlightChange {
  public:
   explicit InFlightSetModalChange(Window* window);
diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc
index 022e8fe..7fd86566 100644
--- a/components/mus/public/cpp/lib/window.cc
+++ b/components/mus/public/cpp/lib/window.cc
@@ -222,6 +222,12 @@
   LocalSetVisible(value);
 }
 
+void Window::SetOpacity(float opacity) {
+  if (connection_)
+    tree_client()->SetOpacity(this, opacity);
+  LocalSetOpacity(opacity);
+}
+
 void Window::SetPredefinedCursor(mus::mojom::Cursor cursor_id) {
   if (cursor_id_ == cursor_id)
     return;
@@ -504,6 +510,7 @@
       input_event_handler_(nullptr),
       viewport_metrics_(CreateEmptyViewportMetrics()),
       visible_(false),
+      opacity_(1.0f),
       cursor_id_(mojom::Cursor::CURSOR_NULL),
       parent_drawn_(false) {}
 
@@ -662,6 +669,16 @@
   NotifyWindowVisibilityChanged(this);
 }
 
+void Window::LocalSetOpacity(float opacity) {
+  if (opacity_ == opacity)
+    return;
+
+  float old_opacity = opacity_;
+  opacity_ = opacity;
+  FOR_EACH_OBSERVER(WindowObserver, observers_,
+                    OnWindowOpacityChanged(this, old_opacity, opacity_));
+}
+
 void Window::LocalSetPredefinedCursor(mojom::Cursor cursor_id) {
   if (cursor_id_ == cursor_id)
     return;
diff --git a/components/mus/public/cpp/lib/window_private.h b/components/mus/public/cpp/lib/window_private.h
index 3974a9da..5eb9246 100644
--- a/components/mus/public/cpp/lib/window_private.h
+++ b/components/mus/public/cpp/lib/window_private.h
@@ -77,6 +77,7 @@
   }
   void LocalSetParentDrawn(bool drawn) { window_->LocalSetParentDrawn(drawn); }
   void LocalSetVisible(bool visible) { window_->LocalSetVisible(visible); }
+  void LocalSetOpacity(float opacity) { window_->LocalSetOpacity(opacity); }
   void LocalSetPredefinedCursor(mojom::Cursor cursor) {
     window_->LocalSetPredefinedCursor(cursor);
   }
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index e7255ab..a080c6c9 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "components/mus/common/util.h"
 #include "components/mus/public/cpp/input_event_handler.h"
 #include "components/mus/public/cpp/lib/in_flight_change.h"
@@ -182,7 +183,7 @@
 
 void WindowTreeClientImpl::DestroyWindow(Window* window) {
   DCHECK(tree_);
-  const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
+  const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique(
       new CrashInFlightChange(window, ChangeType::DELETE_WINDOW)));
   tree_->DeleteWindow(change_id, window->id());
 }
@@ -190,13 +191,13 @@
 void WindowTreeClientImpl::AddChild(Window* parent, Id child_id) {
   DCHECK(tree_);
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new CrashInFlightChange(parent, ChangeType::ADD_CHILD)));
+      base::WrapUnique(new CrashInFlightChange(parent, ChangeType::ADD_CHILD)));
   tree_->AddWindow(change_id, parent->id(), child_id);
 }
 
 void WindowTreeClientImpl::RemoveChild(Window* parent, Id child_id) {
   DCHECK(tree_);
-  const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
+  const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique(
       new CrashInFlightChange(parent, ChangeType::REMOVE_CHILD)));
   tree_->RemoveWindowFromParent(change_id, child_id);
 }
@@ -204,7 +205,7 @@
 void WindowTreeClientImpl::AddTransientWindow(Window* window,
                                               Id transient_window_id) {
   DCHECK(tree_);
-  const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
+  const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique(
       new CrashInFlightChange(window, ChangeType::ADD_TRANSIENT_WINDOW)));
   tree_->AddTransientWindow(change_id, window->id(), transient_window_id);
 }
@@ -212,7 +213,7 @@
 void WindowTreeClientImpl::RemoveTransientWindowFromParent(Window* window) {
   DCHECK(tree_);
   const uint32_t change_id =
-      ScheduleInFlightChange(make_scoped_ptr(new CrashInFlightChange(
+      ScheduleInFlightChange(base::WrapUnique(new CrashInFlightChange(
           window, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT)));
   tree_->RemoveTransientWindowFromParent(change_id, window->id());
 }
@@ -220,7 +221,7 @@
 void WindowTreeClientImpl::SetModal(Window* window) {
   DCHECK(tree_);
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightSetModalChange(window)));
+      base::WrapUnique(new InFlightSetModalChange(window)));
   tree_->SetModal(change_id, window->id());
 }
 
@@ -229,7 +230,7 @@
                                    mojom::OrderDirection direction) {
   DCHECK(tree_);
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new CrashInFlightChange(window, ChangeType::REORDER)));
+      base::WrapUnique(new CrashInFlightChange(window, ChangeType::REORDER)));
   tree_->ReorderWindow(change_id, window->id(), relative_window_id, direction);
 }
 
@@ -244,7 +245,7 @@
                                      const gfx::Rect& bounds) {
   DCHECK(tree_);
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightBoundsChange(window, old_bounds)));
+      base::WrapUnique(new InFlightBoundsChange(window, old_bounds)));
   tree_->SetWindowBounds(change_id, window->id(), mojo::Rect::From(bounds));
 }
 
@@ -255,7 +256,7 @@
   if (capture_window_ == window)
     return;
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightCaptureChange(this, capture_window_)));
+      base::WrapUnique(new InFlightCaptureChange(this, capture_window_)));
   tree_->SetCapture(change_id, window->id());
   LocalSetCapture(window);
 }
@@ -267,7 +268,7 @@
   if (capture_window_ != window)
     return;
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightCaptureChange(this, window)));
+      base::WrapUnique(new InFlightCaptureChange(this, window)));
   tree_->ReleaseCapture(change_id, window->id());
   LocalSetCapture(nullptr);
 }
@@ -287,7 +288,7 @@
   // we got a connection.
   DCHECK(tree_);
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightFocusChange(this, focused_window_)));
+      base::WrapUnique(new InFlightFocusChange(this, focused_window_)));
   tree_->SetFocus(change_id, window ? window->id() : 0);
   LocalSetFocus(window);
 }
@@ -306,7 +307,7 @@
     return;
 
   // We make an inflight change thing here.
-  const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
+  const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique(
       new InFlightPredefinedCursorChange(window, window->predefined_cursor())));
   tree_->SetPredefinedCursor(change_id, window_id, cursor_id);
 }
@@ -314,10 +315,17 @@
 void WindowTreeClientImpl::SetVisible(Window* window, bool visible) {
   DCHECK(tree_);
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightVisibleChange(window, !visible)));
+      base::WrapUnique(new InFlightVisibleChange(window, !visible)));
   tree_->SetWindowVisibility(change_id, window->id(), visible);
 }
 
+void WindowTreeClientImpl::SetOpacity(Window* window, float opacity) {
+  DCHECK(tree_);
+  const uint32_t change_id = ScheduleInFlightChange(
+      base::WrapUnique(new InFlightOpacityChange(window, window->opacity())));
+  tree_->SetWindowOpacity(change_id, window->id(), opacity);
+}
+
 void WindowTreeClientImpl::SetProperty(Window* window,
                                        const std::string& name,
                                        mojo::Array<uint8_t> data) {
@@ -328,7 +336,7 @@
     old_value = mojo::Array<uint8_t>::From(window->properties_[name]);
 
   const uint32_t change_id = ScheduleInFlightChange(
-      make_scoped_ptr(new InFlightPropertyChange(window, name, old_value)));
+      base::WrapUnique(new InFlightPropertyChange(window, name, old_value)));
   tree_->SetWindowProperty(change_id, window->id(), mojo::String(name),
                            std::move(data));
 }
@@ -461,7 +469,7 @@
     window->properties_ = *properties;
   AddWindow(window);
 
-  const uint32_t change_id = ScheduleInFlightChange(make_scoped_ptr(
+  const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique(
       new CrashInFlightChange(window, type == NewWindowType::CHILD
                                           ? ChangeType::NEW_WINDOW
                                           : ChangeType::NEW_TOP_LEVEL_WINDOW)));
@@ -809,6 +817,20 @@
   WindowPrivate(window).LocalSetVisible(visible);
 }
 
+void WindowTreeClientImpl::OnWindowOpacityChanged(Id window_id,
+                                                  float old_opacity,
+                                                  float new_opacity) {
+  Window* window = GetWindowById(window_id);
+  if (!window)
+    return;
+
+  InFlightOpacityChange new_change(window, new_opacity);
+  if (ApplyServerChangeToExistingInFlightChange(new_change))
+    return;
+
+  WindowPrivate(window).LocalSetOpacity(new_opacity);
+}
+
 void WindowTreeClientImpl::OnWindowParentDrawnStateChanged(Id window_id,
                                                            bool drawn) {
   Window* window = GetWindowById(window_id);
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.h b/components/mus/public/cpp/lib/window_tree_client_impl.h
index a22ce57..024251d3 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.h
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.h
@@ -87,6 +87,7 @@
   void SetCanFocus(Id window_id, bool can_focus);
   void SetPredefinedCursor(Id window_id, mus::mojom::Cursor cursor_id);
   void SetVisible(Window* window, bool visible);
+  void SetOpacity(Window* window, float opacity);
   void SetProperty(Window* window,
                    const std::string& name,
                    mojo::Array<uint8_t> data);
@@ -209,6 +210,9 @@
                          mojom::OrderDirection direction) override;
   void OnWindowDeleted(Id window_id) override;
   void OnWindowVisibilityChanged(Id window_id, bool visible) override;
+  void OnWindowOpacityChanged(Id window_id,
+                              float old_opacity,
+                              float new_opacity) override;
   void OnWindowParentDrawnStateChanged(Id window_id, bool drawn) override;
   void OnWindowSharedPropertyChanged(Id window_id,
                                      const mojo::String& name,
diff --git a/components/mus/public/cpp/tests/test_window_tree.cc b/components/mus/public/cpp/tests/test_window_tree.cc
index 1411f34f..07505758 100644
--- a/components/mus/public/cpp/tests/test_window_tree.cc
+++ b/components/mus/public/cpp/tests/test_window_tree.cc
@@ -70,6 +70,13 @@
   change_id_ = change_id;
 }
 
+void TestWindowTree::SetWindowOpacity(uint32_t change_id,
+                                      uint32_t window_id,
+                                      float opacity) {
+  got_change_ = true;
+  change_id_ = change_id;
+}
+
 void TestWindowTree::AttachSurface(
     uint32_t window_id,
     mojom::SurfaceType type,
diff --git a/components/mus/public/cpp/tests/test_window_tree.h b/components/mus/public/cpp/tests/test_window_tree.h
index 242a815..05705da9 100644
--- a/components/mus/public/cpp/tests/test_window_tree.h
+++ b/components/mus/public/cpp/tests/test_window_tree.h
@@ -54,6 +54,9 @@
                          uint32_t window_id,
                          const mojo::String& name,
                          mojo::Array<uint8_t> value) override;
+  void SetWindowOpacity(uint32_t change_id,
+                        uint32_t window_id,
+                        float opacity) override;
   void AttachSurface(uint32_t window_id,
                      mojom::SurfaceType type,
                      mojo::InterfaceRequest<mojom::Surface> surface,
diff --git a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
index f59ce56..4929667 100644
--- a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
@@ -338,6 +338,102 @@
   EXPECT_EQ(original_visible, root->visible());
 }
 
+// Verifies that local opacity is not changed if the server replied that the
+// change succeeded.
+TEST_F(WindowTreeClientImplTest, SetOpacitySucceeds) {
+  WindowTreeSetup setup;
+  Window* root = setup.GetFirstRoot();
+  ASSERT_TRUE(root);
+  const float original_opacity = root->opacity();
+  const float new_opacity = 0.5f;
+  ASSERT_NE(new_opacity, original_opacity);
+  ASSERT_NE(new_opacity, root->opacity());
+  root->SetOpacity(new_opacity);
+  uint32_t change_id;
+  ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id));
+  setup.window_tree_client()->OnChangeCompleted(change_id, true);
+  EXPECT_EQ(new_opacity, root->opacity());
+}
+
+// Verifies that opacity is reverted if the server replied that the change
+// failed.
+TEST_F(WindowTreeClientImplTest, SetOpacityFailed) {
+  WindowTreeSetup setup;
+  Window* root = setup.GetFirstRoot();
+  ASSERT_TRUE(root);
+  const float original_opacity = root->opacity();
+  const float new_opacity = 0.5f;
+  ASSERT_NE(new_opacity, root->opacity());
+  root->SetOpacity(new_opacity);
+  uint32_t change_id;
+  ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id));
+  setup.window_tree_client()->OnChangeCompleted(change_id, false);
+  EXPECT_EQ(original_opacity, root->opacity());
+}
+
+// Simulates the server changing the opacitry while there is an opacity change
+// in flight, causing the requested change to fail.
+TEST_F(WindowTreeClientImplTest, SetOpacityFailedWithPendingChange) {
+  WindowTreeSetup setup;
+  Window* root = setup.GetFirstRoot();
+  ASSERT_TRUE(root);
+  const float original_opacity = root->opacity();
+  const float new_opacity = 0.5f;
+  ASSERT_NE(new_opacity, root->opacity());
+  root->SetOpacity(new_opacity);
+  EXPECT_EQ(new_opacity, root->opacity());
+  uint32_t change_id;
+  ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id));
+
+  // Simulate the server responding with an opacity change.
+  const float server_changed_opacity = 0.75f;
+  setup.window_tree_client()->OnWindowOpacityChanged(
+      root->id(), original_opacity, server_changed_opacity);
+
+  // This shouldn't trigger opacity changing yet.
+  EXPECT_EQ(new_opacity, root->opacity());
+
+  // Tell the client the change failed, which should trigger failing to the
+  // most recent opacity from server.
+  setup.window_tree_client()->OnChangeCompleted(change_id, false);
+  EXPECT_EQ(server_changed_opacity, root->opacity());
+
+  // Simulate server changing back to original opacity. Should take immediately.
+  setup.window_tree_client()->OnWindowOpacityChanged(
+      root->id(), server_changed_opacity, original_opacity);
+  EXPECT_EQ(original_opacity, root->opacity());
+}
+
+// Tests that when there are multiple changes in flight, that failing changes
+// update the revert state of subsequent changes.
+TEST_F(WindowTreeClientImplTest, SetOpacityFailedWithMultiplePendingChange) {
+  WindowTreeSetup setup;
+  Window* root = setup.GetFirstRoot();
+  ASSERT_TRUE(root);
+  const float original_opacity = root->opacity();
+  const float new_opacity = 0.5f;
+  ASSERT_NE(new_opacity, root->opacity());
+  root->SetOpacity(new_opacity);
+  uint32_t change_id1;
+  ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id1));
+
+  const float second_new_opacity = 0.75f;
+  ASSERT_NE(second_new_opacity, root->opacity());
+  root->SetOpacity(second_new_opacity);
+  uint32_t change_id2;
+  ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id2));
+
+  // Canceling the first one, while there is another in flight, should not
+  // change the local opacity.
+  setup.window_tree_client()->OnChangeCompleted(change_id1, false);
+  EXPECT_EQ(second_new_opacity, root->opacity());
+
+  // The previous cancelation should have updated the revert value of the in
+  // flight change.
+  setup.window_tree_client()->OnChangeCompleted(change_id2, false);
+  EXPECT_EQ(original_opacity, root->opacity());
+}
+
 // Verifies |is_modal| is reverted if the server replied that the change failed.
 TEST_F(WindowTreeClientImplTest, SetModalFailed) {
   WindowTreeSetup setup;
diff --git a/components/mus/public/cpp/tests/window_unittest.cc b/components/mus/public/cpp/tests/window_unittest.cc
index 2160f98..23c8b56d 100644
--- a/components/mus/public/cpp/tests/window_unittest.cc
+++ b/components/mus/public/cpp/tests/window_unittest.cc
@@ -762,6 +762,66 @@
 
 namespace {
 
+class OpacityChangeObserver : public WindowObserver {
+ public:
+  explicit OpacityChangeObserver(Window* window) : window_(window) {
+    window_->AddObserver(this);
+  }
+  ~OpacityChangeObserver() override { window_->RemoveObserver(this); }
+
+  Changes GetAndClearChanges() {
+    Changes changes;
+    changes.swap(changes_);
+    return changes;
+  }
+
+ private:
+  // WindowObserver:
+  void OnWindowOpacityChanged(Window* window,
+                              float old_opacity,
+                              float new_opacity) override {
+    changes_.push_back(base::StringPrintf(
+        "window=%s old_opacity=%.2f new_opacity=%.2f",
+        WindowIdToString(window->id()).c_str(), old_opacity, new_opacity));
+  }
+
+  Window* window_;
+  Changes changes_;
+
+  DISALLOW_COPY_AND_ASSIGN(OpacityChangeObserver);
+};
+
+}  // namespace
+
+// Tests that WindowObserver is only notified when opacity changes.
+TEST_F(WindowObserverTest, SetOpacity) {
+  TestWindow w1;
+  EXPECT_FLOAT_EQ(1.0f, w1.opacity());
+
+  // Changing the opacity should trigger a notification.
+  OpacityChangeObserver observer(&w1);
+  w1.SetOpacity(0.5f);
+  EXPECT_FLOAT_EQ(0.5f, w1.opacity());
+  Changes changes = observer.GetAndClearChanges();
+  ASSERT_EQ(1u, changes.size());
+  EXPECT_EQ("window=0,1 old_opacity=1.00 new_opacity=0.50", changes[0]);
+
+  // Setting to the same opacity should be rejected, no notification.
+  w1.SetOpacity(0.5f);
+  EXPECT_FLOAT_EQ(0.5f, w1.opacity());
+  changes = observer.GetAndClearChanges();
+  EXPECT_TRUE(changes.empty());
+
+  // Alternate sources of opacity changes should trigger a notification.
+  WindowPrivate(&w1).LocalSetOpacity(1.0f);
+  EXPECT_FLOAT_EQ(1.0f, w1.opacity());
+  changes = observer.GetAndClearChanges();
+  ASSERT_EQ(1u, changes.size());
+  EXPECT_EQ("window=0,1 old_opacity=0.50 new_opacity=1.00", changes[0]);
+}
+
+namespace {
+
 class SharedPropertyChangeObserver : public WindowObserver {
  public:
   explicit SharedPropertyChangeObserver(Window* window) : window_(window) {
diff --git a/components/mus/public/cpp/window.h b/components/mus/public/cpp/window.h
index 73a0048..f7f0fa7e 100644
--- a/components/mus/public/cpp/window.h
+++ b/components/mus/public/cpp/window.h
@@ -88,6 +88,9 @@
   bool visible() const { return visible_; }
   void SetVisible(bool value);
 
+  float opacity() const { return opacity_; }
+  void SetOpacity(float opacity);
+
   // Cursors
   mojom::Cursor predefined_cursor() const { return cursor_id_; }
   void SetPredefinedCursor(mus::mojom::Cursor cursor_id);
@@ -255,6 +258,7 @@
                                const mojom::ViewportMetrics& new_metrics);
   void LocalSetParentDrawn(bool drawn);
   void LocalSetVisible(bool visible);
+  void LocalSetOpacity(float opacity);
   void LocalSetPredefinedCursor(mojom::Cursor cursor_id);
   void LocalSetSharedProperty(const std::string& name,
                               const std::vector<uint8_t>* data);
@@ -311,6 +315,7 @@
   mojom::ViewportMetricsPtr viewport_metrics_;
 
   bool visible_;
+  float opacity_;
 
   mojom::Cursor cursor_id_;
 
diff --git a/components/mus/public/cpp/window_observer.h b/components/mus/public/cpp/window_observer.h
index 54770e7..27e697c9 100644
--- a/components/mus/public/cpp/window_observer.h
+++ b/components/mus/public/cpp/window_observer.h
@@ -71,6 +71,9 @@
                                                mojom::Cursor cursor) {}
   virtual void OnWindowVisibilityChanging(Window* window) {}
   virtual void OnWindowVisibilityChanged(Window* window) {}
+  virtual void OnWindowOpacityChanged(Window* window,
+                                      float old_opacity,
+                                      float new_opacity) {}
 
   // Invoked when this Window's shared properties have changed. This can either
   // be caused by SetSharedProperty() being called locally, or by us receiving
diff --git a/components/mus/public/interfaces/window_tree.mojom b/components/mus/public/interfaces/window_tree.mojom
index e01a925..2d28031d 100644
--- a/components/mus/public/interfaces/window_tree.mojom
+++ b/components/mus/public/interfaces/window_tree.mojom
@@ -126,6 +126,9 @@
                     string name,
                     array<uint8>? value);
 
+  // Sets the opacity of the specified window to |opacity|.
+  SetWindowOpacity(uint32 change_id, uint32 window_id, float opacity);
+
   // Attaches a Surface to a particular window.
   AttachSurface(uint32 window_id,
                 SurfaceType type,
@@ -325,6 +328,9 @@
   // Invoked when the visibility of the specified window changes.
   OnWindowVisibilityChanged(uint32 window, bool visible);
 
+  // Invoked when the opacity of the specified window has changed.
+  OnWindowOpacityChanged(uint32 window, float old_opacity, float new_opacity);
+
   // Invoked when the drawn state of |window|'s parent changes. The drawn state
   // is determined by the visibility of a Window and the Windows ancestors. A
   // Window is drawn if all ancestors are visible, not drawn if any ancestor is
diff --git a/components/mus/ws/access_policy.h b/components/mus/ws/access_policy.h
index be3fdc9..5128883 100644
--- a/components/mus/ws/access_policy.h
+++ b/components/mus/ws/access_policy.h
@@ -48,6 +48,7 @@
       const ServerWindow* window) const = 0;
   virtual bool CanEmbed(const ServerWindow* window) const = 0;
   virtual bool CanChangeWindowVisibility(const ServerWindow* window) const = 0;
+  virtual bool CanChangeWindowOpacity(const ServerWindow* window) const = 0;
   virtual bool CanSetWindowSurface(const ServerWindow* window,
                                    mojom::SurfaceType surface_type) const = 0;
   virtual bool CanSetWindowBounds(const ServerWindow* window) const = 0;
diff --git a/components/mus/ws/default_access_policy.cc b/components/mus/ws/default_access_policy.cc
index c45a969..c6fe681 100644
--- a/components/mus/ws/default_access_policy.cc
+++ b/components/mus/ws/default_access_policy.cc
@@ -93,6 +93,12 @@
          delegate_->HasRootForAccessPolicy(window);
 }
 
+bool DefaultAccessPolicy::CanChangeWindowOpacity(
+    const ServerWindow* window) const {
+  return WasCreatedByThisConnection(window) ||
+         delegate_->HasRootForAccessPolicy(window);
+}
+
 bool DefaultAccessPolicy::CanSetWindowSurface(
     const ServerWindow* window,
     mojom::SurfaceType surface_type) const {
diff --git a/components/mus/ws/default_access_policy.h b/components/mus/ws/default_access_policy.h
index 17b47bf7..c1fbe43e 100644
--- a/components/mus/ws/default_access_policy.h
+++ b/components/mus/ws/default_access_policy.h
@@ -41,6 +41,7 @@
       const ServerWindow* window) const override;
   bool CanEmbed(const ServerWindow* window) const override;
   bool CanChangeWindowVisibility(const ServerWindow* window) const override;
+  bool CanChangeWindowOpacity(const ServerWindow* window) const override;
   bool CanSetWindowSurface(const ServerWindow* window,
                            mus::mojom::SurfaceType surface_type) const override;
   bool CanSetWindowBounds(const ServerWindow* window) const override;
diff --git a/components/mus/ws/operation.h b/components/mus/ws/operation.h
index 6c25fcd..3505fc0 100644
--- a/components/mus/ws/operation.h
+++ b/components/mus/ws/operation.h
@@ -29,6 +29,7 @@
   SET_CAPTURE,
   SET_FOCUS,
   SET_WINDOW_BOUNDS,
+  SET_WINDOW_OPACITY,
   SET_WINDOW_PREDEFINED_CURSOR,
   SET_WINDOW_PROPERTY,
   SET_WINDOW_VISIBILITY,
diff --git a/components/mus/ws/server_window.cc b/components/mus/ws/server_window.cc
index 8c546a1..eeb5d7d 100644
--- a/components/mus/ws/server_window.cc
+++ b/components/mus/ws/server_window.cc
@@ -298,8 +298,11 @@
 void ServerWindow::SetOpacity(float value) {
   if (value == opacity_)
     return;
+  float old_opacity = opacity_;
   opacity_ = value;
   delegate_->OnScheduleWindowPaint(this);
+  FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
+                    OnWindowOpacityChanged(this, old_opacity, opacity_));
 }
 
 void ServerWindow::SetPredefinedCursor(mus::mojom::Cursor value) {
diff --git a/components/mus/ws/server_window_observer.h b/components/mus/ws/server_window_observer.h
index 8c2e628..1a741b0 100644
--- a/components/mus/ws/server_window_observer.h
+++ b/components/mus/ws/server_window_observer.h
@@ -60,6 +60,9 @@
 
   virtual void OnWillChangeWindowVisibility(ServerWindow* window) {}
   virtual void OnWindowVisibilityChanged(ServerWindow* window) {}
+  virtual void OnWindowOpacityChanged(ServerWindow* window,
+                                      float old_opacity,
+                                      float new_opacity) {}
 
   virtual void OnWindowPredefinedCursorChanged(ServerWindow* window,
                                                int32_t cursor_id) {}
diff --git a/components/mus/ws/test_change_tracker.cc b/components/mus/ws/test_change_tracker.cc
index 3e6e8b8..8236693 100644
--- a/components/mus/ws/test_change_tracker.cc
+++ b/components/mus/ws/test_change_tracker.cc
@@ -138,6 +138,10 @@
                                 change.change_id,
                                 WindowIdToString(change.window_id).c_str(),
                                 change.bool_value ? "true" : "false");
+    case CHANGE_TYPE_OPACITY:
+      return base::StringPrintf("OpacityChanged window_id=%s opacity=%.2f",
+                                WindowIdToString(change.window_id).c_str(),
+                                change.float_value);
   }
   return std::string();
 }
@@ -340,6 +344,14 @@
   AddChange(change);
 }
 
+void TestChangeTracker::OnWindowOpacityChanged(Id window_id, float opacity) {
+  Change change;
+  change.type = CHANGE_TYPE_OPACITY;
+  change.window_id = window_id;
+  change.float_value = opacity;
+  AddChange(change);
+}
+
 void TestChangeTracker::OnWindowParentDrawnStateChanged(Id window_id,
                                                         bool drawn) {
   Change change;
diff --git a/components/mus/ws/test_change_tracker.h b/components/mus/ws/test_change_tracker.h
index 4e5fc76..671b5b2 100644
--- a/components/mus/ws/test_change_tracker.h
+++ b/components/mus/ws/test_change_tracker.h
@@ -41,6 +41,7 @@
   CHANGE_TYPE_CURSOR_CHANGED,
   CHANGE_TYPE_ON_CHANGE_COMPLETED,
   CHANGE_TYPE_ON_TOP_LEVEL_CREATED,
+  CHANGE_TYPE_OPACITY,
 };
 
 // TODO(sky): consider nuking and converting directly to WindowData.
@@ -80,6 +81,7 @@
   mojo::String embed_url;
   mojom::OrderDirection direction;
   bool bool_value;
+  float float_value;
   std::string property_key;
   std::string property_value;
   int32_t cursor_id;
@@ -152,6 +154,7 @@
                          mojom::OrderDirection direction);
   void OnWindowDeleted(Id window_id);
   void OnWindowVisibilityChanged(Id window_id, bool visible);
+  void OnWindowOpacityChanged(Id window_id, float opacity);
   void OnWindowParentDrawnStateChanged(Id window_id, bool drawn);
   void OnWindowInputEvent(Id window_id, mojom::EventPtr event);
   void OnWindowSharedPropertyChanged(Id window_id,
diff --git a/components/mus/ws/test_utils.cc b/components/mus/ws/test_utils.cc
index b94d510..76837614 100644
--- a/components/mus/ws/test_utils.cc
+++ b/components/mus/ws/test_utils.cc
@@ -235,6 +235,12 @@
   tracker_.OnWindowVisibilityChanged(window, visible);
 }
 
+void TestWindowTreeClient::OnWindowOpacityChanged(uint32_t window,
+                                                  float old_opacity,
+                                                  float new_opacity) {
+  tracker_.OnWindowOpacityChanged(window, new_opacity);
+}
+
 void TestWindowTreeClient::OnWindowParentDrawnStateChanged(uint32_t window,
                                                            bool drawn) {
   tracker_.OnWindowParentDrawnStateChanged(window, drawn);
diff --git a/components/mus/ws/test_utils.h b/components/mus/ws/test_utils.h
index 71998d5..c8a813e 100644
--- a/components/mus/ws/test_utils.h
+++ b/components/mus/ws/test_utils.h
@@ -280,6 +280,9 @@
                          mojom::OrderDirection direction) override;
   void OnWindowDeleted(uint32_t window) override;
   void OnWindowVisibilityChanged(uint32_t window, bool visible) override;
+  void OnWindowOpacityChanged(uint32_t window,
+                              float old_opacity,
+                              float new_opacity) override;
   void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override;
   void OnWindowSharedPropertyChanged(uint32_t window,
                                      const mojo::String& name,
diff --git a/components/mus/ws/user_display_manager.cc b/components/mus/ws/user_display_manager.cc
index b432a2f5..e54e9b7 100644
--- a/components/mus/ws/user_display_manager.cc
+++ b/components/mus/ws/user_display_manager.cc
@@ -116,7 +116,7 @@
 void UserDisplayManager::AddObserver(
     mojom::DisplayManagerObserverPtr observer) {
   mojom::DisplayManagerObserver* observer_impl = observer.get();
-  display_manager_observers_.AddInterfacePtr(std::move(observer));
+  display_manager_observers_.AddPtr(std::move(observer));
   OnObserverAdded(observer_impl);
 }
 
diff --git a/components/mus/ws/window_manager_access_policy.cc b/components/mus/ws/window_manager_access_policy.cc
index 8a4a820..c8c0c34 100644
--- a/components/mus/ws/window_manager_access_policy.cc
+++ b/components/mus/ws/window_manager_access_policy.cc
@@ -81,6 +81,11 @@
   return root && window->parent() == root;
 }
 
+bool WindowManagerAccessPolicy::CanChangeWindowOpacity(
+    const ServerWindow* window) const {
+  return window->id().connection_id == connection_id_;
+}
+
 bool WindowManagerAccessPolicy::CanSetWindowSurface(
     const ServerWindow* window,
     mus::mojom::SurfaceType surface_type) const {
diff --git a/components/mus/ws/window_manager_access_policy.h b/components/mus/ws/window_manager_access_policy.h
index bb9a1fff8..457fce5 100644
--- a/components/mus/ws/window_manager_access_policy.h
+++ b/components/mus/ws/window_manager_access_policy.h
@@ -40,6 +40,7 @@
       const ServerWindow* window) const override;
   bool CanEmbed(const ServerWindow* window) const override;
   bool CanChangeWindowVisibility(const ServerWindow* window) const override;
+  bool CanChangeWindowOpacity(const ServerWindow* window) const override;
   bool CanSetWindowSurface(const ServerWindow* window,
                            mus::mojom::SurfaceType surface_type) const override;
   bool CanSetWindowBounds(const ServerWindow* window) const override;
diff --git a/components/mus/ws/window_server.cc b/components/mus/ws/window_server.cc
index c5195aa3..46d1e9e 100644
--- a/components/mus/ws/window_server.cc
+++ b/components/mus/ws/window_server.cc
@@ -578,6 +578,17 @@
   }
 }
 
+void WindowServer::OnWindowOpacityChanged(ServerWindow* window,
+                                          float old_opacity,
+                                          float new_opacity) {
+  DCHECK(!in_destructor_);
+
+  for (auto& pair : tree_map_) {
+    pair.second->ProcessWindowOpacityChanged(window, old_opacity, new_opacity,
+                                             IsOperationSource(pair.first));
+  }
+}
+
 void WindowServer::OnWindowVisibilityChanged(ServerWindow* window) {
   if (in_destructor_)
     return;
diff --git a/components/mus/ws/window_server.h b/components/mus/ws/window_server.h
index cf945a0d..e831809 100644
--- a/components/mus/ws/window_server.h
+++ b/components/mus/ws/window_server.h
@@ -250,6 +250,9 @@
                          mojom::OrderDirection direction) override;
   void OnWillChangeWindowVisibility(ServerWindow* window) override;
   void OnWindowVisibilityChanged(ServerWindow* window) override;
+  void OnWindowOpacityChanged(ServerWindow* window,
+                              float old_opacity,
+                              float new_opacity) override;
   void OnWindowSharedPropertyChanged(
       ServerWindow* window,
       const std::string& name,
diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
index b4624fb..fb05763 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -269,6 +269,18 @@
   return true;
 }
 
+bool WindowTree::SetWindowOpacity(const ClientWindowId& window_id,
+                                  float opacity) {
+  ServerWindow* window = GetWindowByClientId(window_id);
+  if (!window || !access_policy_->CanChangeWindowOpacity(window))
+    return false;
+  if (window->opacity() == opacity)
+    return true;
+  Operation op(this, window_server_, OperationType::SET_WINDOW_OPACITY);
+  window->SetOpacity(opacity);
+  return true;
+}
+
 bool WindowTree::SetFocus(const ClientWindowId& window_id) {
   ServerWindow* window = GetWindowByClientId(window_id);
   ServerWindow* currently_focused = window_server_->GetFocusedWindow();
@@ -556,6 +568,20 @@
   NotifyDrawnStateChanged(window, window_target_drawn_state);
 }
 
+void WindowTree::ProcessWindowOpacityChanged(const ServerWindow* window,
+                                             float old_opacity,
+                                             float new_opacity,
+                                             bool originated_change) {
+  if (originated_change)
+    return;
+
+  ClientWindowId client_window_id;
+  if (IsWindowKnown(window, &client_window_id)) {
+    client()->OnWindowOpacityChanged(client_window_id.id, old_opacity,
+                                     new_opacity);
+  }
+}
+
 void WindowTree::ProcessCursorChanged(const ServerWindow* window,
                                       int32_t cursor_id,
                                       bool originated_change) {
@@ -1148,6 +1174,13 @@
   client()->OnChangeCompleted(change_id, success);
 }
 
+void WindowTree::SetWindowOpacity(uint32_t change_id,
+                                  Id window_id,
+                                  float opacity) {
+  client()->OnChangeCompleted(
+      change_id, SetWindowOpacity(ClientWindowId(window_id), opacity));
+}
+
 void WindowTree::AttachSurface(Id transport_window_id,
                                mojom::SurfaceType type,
                                mojo::InterfaceRequest<mojom::Surface> surface,
diff --git a/components/mus/ws/window_tree.h b/components/mus/ws/window_tree.h
index c52a8fa8..1bcff73 100644
--- a/components/mus/ws/window_tree.h
+++ b/components/mus/ws/window_tree.h
@@ -138,6 +138,7 @@
   std::vector<const ServerWindow*> GetWindowTree(
       const ClientWindowId& window_id) const;
   bool SetWindowVisibility(const ClientWindowId& window_id, bool visible);
+  bool SetWindowOpacity(const ClientWindowId& window_id, float opacity);
   bool SetFocus(const ClientWindowId& window_id);
   bool Embed(const ClientWindowId& window_id,
              mojom::WindowTreeClientPtr client);
@@ -188,6 +189,10 @@
   void ProcessWindowDeleted(const ServerWindow* window, bool originated_change);
   void ProcessWillChangeWindowVisibility(const ServerWindow* window,
                                          bool originated_change);
+  void ProcessWindowOpacityChanged(const ServerWindow* window,
+                                   float old_opacity,
+                                   float new_opacity,
+                                   bool originated_change);
   void ProcessCursorChanged(const ServerWindow* window,
                             int32_t cursor_id,
                             bool originated_change);
@@ -340,6 +345,9 @@
                          Id transport_window_id,
                          const mojo::String& name,
                          mojo::Array<uint8_t> value) override;
+  void SetWindowOpacity(uint32_t change_id,
+                        Id window_id,
+                        float opacity) override;
   void AttachSurface(Id transport_window_id,
                      mojom::SurfaceType type,
                      mojo::InterfaceRequest<mojom::Surface> surface,
diff --git a/components/mus/ws/window_tree_client_unittest.cc b/components/mus/ws/window_tree_client_unittest.cc
index df5c35c5..9be4f028 100644
--- a/components/mus/ws/window_tree_client_unittest.cc
+++ b/components/mus/ws/window_tree_client_unittest.cc
@@ -249,6 +249,12 @@
     return WaitForChangeCompleted(change_id);
   }
 
+  bool SetWindowOpacity(Id window_id, float opacity) {
+    const uint32_t change_id = GetAndAdvanceChangeId();
+    tree()->SetWindowOpacity(change_id, window_id, opacity);
+    return WaitForChangeCompleted(change_id);
+  }
+
  private:
   // Used when running a nested MessageLoop.
   struct WaitState {
@@ -341,6 +347,11 @@
   void OnWindowVisibilityChanged(uint32_t window, bool visible) override {
     tracker()->OnWindowVisibilityChanged(window, visible);
   }
+  void OnWindowOpacityChanged(uint32_t window,
+                              float old_opacity,
+                              float new_opacity) override {
+    tracker()->OnWindowOpacityChanged(window, new_opacity);
+  }
   void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override {
     tracker()->OnWindowParentDrawnStateChanged(window, drawn);
   }
@@ -1643,6 +1654,38 @@
   }
 }
 
+// Tests that when opacity is set on a window, that the calling client is not
+// notified, however children are. Also that setting the same opacity is
+// rejected and no on eis notifiyed.
+TEST_F(WindowTreeClientTest, SetOpacityNotifications) {
+  Id window_1_1 = wt_client1()->NewWindow(1);
+  ASSERT_TRUE(window_1_1);
+
+  ASSERT_NO_FATAL_FAILURE(EstablishSecondConnectionWithRoot(window_1_1));
+  Id window_2_1 = wt_client2()->NewWindow(1);
+  ASSERT_TRUE(window_2_1);
+  ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1));
+  ASSERT_TRUE(wt_client1()->WaitForAllMessages());
+
+  changes1()->clear();
+  changes2()->clear();
+  // Change opacity, no notification for calling client.
+  ASSERT_TRUE(wt_client1()->SetWindowOpacity(window_1_1, 0.5f));
+  EXPECT_TRUE(changes1()->empty());
+  wt_client2()->WaitForChangeCount(1);
+  EXPECT_EQ(
+      "OpacityChanged window_id=" + IdToString(window_1_1) + " opacity=0.50",
+      SingleChangeToDescription(*changes2()));
+
+  changes2()->clear();
+  // Attempting to set the same opacity should succeed, but no notification as
+  // there was no actual change.
+  ASSERT_TRUE(wt_client1()->SetWindowOpacity(window_1_1, 0.5f));
+  EXPECT_TRUE(changes1()->empty());
+  wt_client2()->WaitForAllMessages();
+  EXPECT_TRUE(changes2()->empty());
+}
+
 TEST_F(WindowTreeClientTest, SetWindowProperty) {
   Id window_1_1 = wt_client1()->NewWindow(1);
   ASSERT_TRUE(window_1_1);
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc
index 88c3dbf..716210c 100644
--- a/components/mus/ws/window_tree_unittest.cc
+++ b/components/mus/ws/window_tree_unittest.cc
@@ -23,6 +23,7 @@
 #include "components/mus/ws/server_window.h"
 #include "components/mus/ws/server_window_surface_manager_test_api.h"
 #include "components/mus/ws/test_change_tracker.h"
+#include "components/mus/ws/test_server_window_delegate.h"
 #include "components/mus/ws/test_utils.h"
 #include "components/mus/ws/window_manager_access_policy.h"
 #include "components/mus/ws/window_server.h"
@@ -839,6 +840,44 @@
   EXPECT_EQ(nullptr, GetCaptureWindow(display));
 }
 
+// Tests that opacity can be set on a known window.
+TEST_F(WindowTreeTest, SetOpacity) {
+  TestWindowTreeClient* embed_connection = nullptr;
+  WindowTree* tree = nullptr;
+  ServerWindow* window = nullptr;
+  EXPECT_NO_FATAL_FAILURE(
+      SetupEventTargeting(&embed_connection, &tree, &window));
+
+  const float new_opacity = 0.5f;
+  EXPECT_NE(new_opacity, window->opacity());
+  ASSERT_TRUE(tree->SetWindowOpacity(ClientWindowIdForWindow(tree, window),
+                                     new_opacity));
+  EXPECT_EQ(new_opacity, window->opacity());
+
+  // Re-applying the same opacity will succeed.
+  EXPECT_TRUE(tree->SetWindowOpacity(ClientWindowIdForWindow(tree, window),
+                                     new_opacity));
+}
+
+// Tests that opacity requests for unknown windows are rejected.
+TEST_F(WindowTreeTest, SetOpacityFailsOnUnknownWindow) {
+  TestWindowTreeClient* embed_connection = nullptr;
+  WindowTree* tree = nullptr;
+  ServerWindow* window = nullptr;
+  EXPECT_NO_FATAL_FAILURE(
+      SetupEventTargeting(&embed_connection, &tree, &window));
+
+  TestServerWindowDelegate delegate;
+  WindowId window_id(42, 1337);
+  ServerWindow unknown_window(&delegate, window_id);
+  const float new_opacity = 0.5f;
+  ASSERT_NE(new_opacity, unknown_window.opacity());
+
+  EXPECT_FALSE(tree->SetWindowOpacity(
+      ClientWindowId(WindowIdToTransportId(window_id)), new_opacity));
+  EXPECT_NE(new_opacity, unknown_window.opacity());
+}
+
 }  // namespace test
 }  // namespace ws
 }  // namespace mus
diff --git a/components/nacl/loader/nacl_validation_query_unittest.cc b/components/nacl/loader/nacl_validation_query_unittest.cc
index 948268e7..b1d7d514 100644
--- a/components/nacl/loader/nacl_validation_query_unittest.cc
+++ b/components/nacl/loader/nacl_validation_query_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <stdint.h>
 
+#include "base/memory/scoped_ptr.h"
 #include "components/nacl/loader/nacl_validation_db.h"
 #include "components/nacl/loader/nacl_validation_query.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/components/offline_pages/offline_page_metadata_store_impl.cc b/components/offline_pages/offline_page_metadata_store_impl.cc
index 95cb9cf..7b96920 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.cc
+++ b/components/offline_pages/offline_page_metadata_store_impl.cc
@@ -168,8 +168,7 @@
       // TODO(bburns): Remove this eventually when we are sure everyone is
       // upgraded.
       if (!entry.has_offline_id()) {
-        entry.set_offline_id(OfflinePageModel::GenerateOfflineId());
-        item.offline_id = entry.offline_id();
+        item.offline_id = OfflinePageModel::GenerateOfflineId();
 
         if (!entry.has_deprecated_bookmark_id()) {
           LOG(ERROR) << "unexpected entry missing bookmark id";
@@ -178,8 +177,12 @@
         item.client_id.name_space = offline_pages::BOOKMARK_NAMESPACE;
         item.client_id.id = base::Int64ToString(entry.deprecated_bookmark_id());
 
+        OfflinePageEntry upgraded_entry;
+        OfflinePageItemToEntry(item, &upgraded_entry);
         entries_to_update->push_back(
-            std::make_pair(base::Int64ToString(entry.offline_id()), entry));
+            std::make_pair(base::Int64ToString(upgraded_entry.offline_id()),
+                           upgraded_entry));
+        // Remove the old entry that is indexed with deprecated id.
         keys_to_remove->push_back(item.client_id.id);
       }
       result.push_back(item);
diff --git a/components/offline_pages/offline_page_metadata_store_impl.h b/components/offline_pages/offline_page_metadata_store_impl.h
index 58ee92fd..ebfda7b1 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.h
+++ b/components/offline_pages/offline_page_metadata_store_impl.h
@@ -47,6 +47,8 @@
   void Reset(const ResetCallback& callback) override;
 
  private:
+  friend class OfflinePageMetadataStoreImplTest;
+
   void LoadContinuation(const LoadCallback& callback, bool success);
   void LoadDone(const LoadCallback& callback,
                 bool success,
@@ -81,11 +83,6 @@
 
   base::WeakPtrFactory<OfflinePageMetadataStoreImpl> weak_ptr_factory_;
 
-  FRIEND_TEST_ALL_PREFIXES(OfflinePageMetadataStoreImplTest,
-                           LoadCorruptedStore);
-  FRIEND_TEST_ALL_PREFIXES(OfflinePageMetadataStoreImplTest,
-                           LoadTotallyCorruptedStore);
-
   DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreImpl);
 };
 
diff --git a/components/offline_pages/offline_page_metadata_store_impl_unittest.cc b/components/offline_pages/offline_page_metadata_store_impl_unittest.cc
index 85d9716..e519f2e9 100644
--- a/components/offline_pages/offline_page_metadata_store_impl_unittest.cc
+++ b/components/offline_pages/offline_page_metadata_store_impl_unittest.cc
@@ -10,6 +10,7 @@
 #include "base/files/file_path.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/memory/scoped_ptr.h"
+#include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -32,6 +33,8 @@
     FILE_PATH_LITERAL("/offline_pages/example_com.mhtml");
 int64_t kFileSize = 234567;
 
+}  // namespace
+
 class OfflinePageMetadataStoreImplTest : public testing::Test {
  public:
   enum CalledCallback { NONE, LOAD, ADD, REMOVE, DESTROY };
@@ -54,6 +57,11 @@
 
   void ClearResults();
 
+  void UpdateStoreEntries(
+      OfflinePageMetadataStoreImpl* store,
+      scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
+          entries_to_save);
+
  protected:
   CalledCallback last_called_callback_;
   Status last_status_;
@@ -112,6 +120,18 @@
   offline_pages_.clear();
 }
 
+void OfflinePageMetadataStoreImplTest::UpdateStoreEntries(
+    OfflinePageMetadataStoreImpl* store,
+    scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
+        entries_to_save) {
+  scoped_ptr<std::vector<std::string>> keys_to_remove(
+      new std::vector<std::string>());
+  store->UpdateEntries(
+      std::move(entries_to_save), std::move(keys_to_remove),
+      base::Bind(&OfflinePageMetadataStoreImplTest::UpdateCallback,
+                 base::Unretained(this), ADD));
+}
+
 // Loads empty store and makes sure that there are no offline pages stored in
 // it.
 TEST_F(OfflinePageMetadataStoreImplTest, LoadEmptyStore) {
@@ -352,8 +372,6 @@
   EXPECT_EQ(offline_page.client_id, offline_pages_[0].client_id);
 }
 
-}  // namespace
-
 // Test that loading a store with a bad value still loads.
 // Needs to be outside of the anonymous namespace in order for FRIEND_TEST
 // to work.
@@ -375,16 +393,11 @@
   scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
       entries_to_save(
           new leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector());
-  scoped_ptr<std::vector<std::string>> keys_to_remove(
-      new std::vector<std::string>());
 
   OfflinePageEntry offline_page_proto;
   entries_to_save->push_back(std::make_pair("0", offline_page_proto));
 
-  store->UpdateEntries(
-      std::move(entries_to_save), std::move(keys_to_remove),
-      base::Bind(&OfflinePageMetadataStoreImplTest::UpdateCallback,
-                 base::Unretained(this), ADD));
+  UpdateStoreEntries(store.get(), std::move(entries_to_save));
   PumpLoop();
 
   EXPECT_EQ(ADD, last_called_callback_);
@@ -421,17 +434,12 @@
   scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
       entries_to_save(
           new leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector());
-  scoped_ptr<std::vector<std::string>> keys_to_remove(
-      new std::vector<std::string>());
 
   OfflinePageEntry offline_page_proto;
   entries_to_save->push_back(std::make_pair("0", offline_page_proto));
   entries_to_save->push_back(std::make_pair("1", offline_page_proto));
 
-  store->UpdateEntries(
-      std::move(entries_to_save), std::move(keys_to_remove),
-      base::Bind(&OfflinePageMetadataStoreImplTest::UpdateCallback,
-                 base::Unretained(this), ADD));
+  UpdateStoreEntries(store.get(), std::move(entries_to_save));;
   PumpLoop();
 
   EXPECT_EQ(ADD, last_called_callback_);
@@ -449,4 +457,47 @@
   EXPECT_EQ(STATUS_FALSE, last_status_);
 }
 
+TEST_F(OfflinePageMetadataStoreImplTest, UpgradeStoreFromBookmarkIdToClientId) {
+  scoped_ptr<OfflinePageMetadataStoreImpl> store(BuildStore());
+
+  // Manually write a page referring to legacy bookmark id.
+  scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
+      entries_to_save(
+          new leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector());
+
+  OfflinePageEntry offline_page_proto;
+  offline_page_proto.set_deprecated_bookmark_id(1LL);
+  offline_page_proto.set_version(1);
+  offline_page_proto.set_url(kTestURL);
+  offline_page_proto.set_file_path("/foo/bar");
+  entries_to_save->push_back(std::make_pair("1", offline_page_proto));
+
+  UpdateStoreEntries(store.get(), std::move(entries_to_save));
+  PumpLoop();
+
+  EXPECT_EQ(ADD, last_called_callback_);
+  EXPECT_EQ(STATUS_TRUE, last_status_);
+
+  ClearResults();
+
+  // Close the store first to ensure file lock is removed.
+  store.reset();
+  store = BuildStore();
+  PumpLoop();
+
+  // The page should be upgraded with new Client ID format.
+  EXPECT_EQ(LOAD, last_called_callback_);
+  EXPECT_EQ(STATUS_TRUE, last_status_);
+  EXPECT_EQ(1U, offline_pages_.size());
+  EXPECT_TRUE(offline_pages_[0].offline_id != 0);
+  EXPECT_EQ(offline_pages::BOOKMARK_NAMESPACE,
+            offline_pages_[0].client_id.name_space);
+  EXPECT_EQ(base::Int64ToString(offline_page_proto.deprecated_bookmark_id()),
+            offline_pages_[0].client_id.id);
+  EXPECT_EQ(GURL(kTestURL), offline_pages_[0].url);
+  EXPECT_EQ(offline_page_proto.version(), offline_pages_[0].version);
+  EXPECT_EQ(offline_page_proto.file_path(),
+            offline_pages_[0].file_path.MaybeAsASCII());
+}
+
 }  // namespace offline_pages
diff --git a/components/precache/content/precache_manager_unittest.cc b/components/precache/content/precache_manager_unittest.cc
index 68da1d9..5e0fde4 100644
--- a/components/precache/content/precache_manager_unittest.cc
+++ b/components/precache/content/precache_manager_unittest.cc
@@ -308,6 +308,7 @@
                           Pair("Precache.Fetch.PercentCompleted", 1),
                           Pair("Precache.Fetch.ResponseBytes.Network", 1),
                           Pair("Precache.Fetch.ResponseBytes.Total", 1),
+                          Pair("Precache.Fetch.TimeToComplete", 1),
                           Pair("Precache.Latency.Prefetch", 1)));
 }
 
@@ -380,6 +381,7 @@
   expected_histogram_count_map["Precache.Fetch.PercentCompleted"]++;
   expected_histogram_count_map["Precache.Fetch.ResponseBytes.Network"]++;
   expected_histogram_count_map["Precache.Fetch.ResponseBytes.Total"]++;
+  expected_histogram_count_map["Precache.Fetch.TimeToComplete"]++;
   expected_histogram_count_map["Precache.Latency.Prefetch"] += 3;
 
   precache_manager_.CancelPrecaching();
@@ -406,6 +408,7 @@
   precache_manager_.RecordStatsForFetch(GURL("http://old-fetch.com"), GURL(),
                                         base::TimeDelta(), kCurrentTime, 1000,
                                         true);
+  expected_histogram_count_map["Precache.Fetch.TimeToComplete"]++;
   expected_histogram_count_map["Precache.Latency.NonPrefetch"]++;
   expected_histogram_count_map["Precache.Latency.NonPrefetch.NonTopHosts"]++;
 
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index 44d4aa6..bb5f67f 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -139,6 +139,16 @@
   }
 };
 
+void AppendManifestURLIfNew(const std::string& prefix,
+                            const std::string& name,
+                            base::hash_set<std::string>* seen_manifest_urls,
+                            std::list<GURL>* unique_manifest_urls) {
+  const std::string manifest_url = ConstructManifestURL(prefix, name);
+  bool first_seen = seen_manifest_urls->insert(manifest_url).second;
+  if (first_seen)
+    unique_manifest_urls->push_back(GURL(manifest_url));
+}
+
 }  // namespace
 
 PrecacheFetcher::Fetcher::Fetcher(
@@ -271,6 +281,11 @@
 }
 
 PrecacheFetcher::~PrecacheFetcher() {
+  base::TimeDelta time_to_fetch = base::TimeTicks::Now() - start_time_;
+  UMA_HISTOGRAM_CUSTOM_TIMES("Precache.Fetch.TimeToComplete", time_to_fetch,
+                             base::TimeDelta::FromSeconds(1),
+                             base::TimeDelta::FromHours(4), 50);
+
   // Number of manifests for which we have downloaded all resources.
   int manifests_completed =
       num_manifest_urls_to_fetch_ - manifest_urls_to_fetch_.size();
@@ -305,6 +320,7 @@
 
   // Fetch the precache configuration settings from the server.
   DCHECK(pool_.IsEmpty()) << "All parallel requests should be available";
+  VLOG(3) << "Fetching " << config_url;
   pool_.Add(scoped_ptr<Fetcher>(new Fetcher(
       request_context_.get(), config_url,
       base::Bind(&PrecacheFetcher::OnConfigFetchComplete,
@@ -317,6 +333,7 @@
     const size_t max_bytes =
         std::min(config_->max_bytes_per_resource(),
                  config_->max_bytes_total() - total_response_bytes_);
+    VLOG(3) << "Fetching " << resource_urls_to_fetch_.front();
     pool_.Add(scoped_ptr<Fetcher>(
         new Fetcher(request_context_.get(), resource_urls_to_fetch_.front(),
                     base::Bind(&PrecacheFetcher::OnResourceFetchComplete,
@@ -336,6 +353,7 @@
   DCHECK(pool_.IsAvailable())
       << "There are no available parallel requests to fetch the next manifest. "
          "Did you forget to call Delete?";
+  VLOG(3) << "Fetching " << manifest_urls_to_fetch_.front();
   pool_.Add(scoped_ptr<Fetcher>(new Fetcher(
       request_context_.get(), manifest_urls_to_fetch_.front(),
       base::Bind(&PrecacheFetcher::OnManifestFetchComplete,
@@ -348,8 +366,8 @@
 void PrecacheFetcher::StartNextFetch() {
   // If over the precache total size cap, then stop prefetching.
   if (total_response_bytes_ > config_->max_bytes_total()) {
-    resource_urls_to_fetch_.clear();
-    manifest_urls_to_fetch_.clear();
+    precache_delegate_->OnDone();
+    return;
   }
 
   StartNextResourceFetch();
@@ -357,11 +375,6 @@
 
   if (pool_.IsEmpty()) {
     // There are no more URLs to fetch, so end the precache cycle.
-    base::TimeDelta time_to_fetch = base::TimeTicks::Now() - start_time_;
-    UMA_HISTOGRAM_CUSTOM_TIMES("Precache.Fetch.TimeToComplete", time_to_fetch,
-                               base::TimeDelta::FromSeconds(1),
-                               base::TimeDelta::FromHours(4), 50);
-
     precache_delegate_->OnDone();
     // OnDone may have deleted this PrecacheFetcher, so don't do anything after
     // it is called.
@@ -383,9 +396,9 @@
     DCHECK_NE(std::string(), prefix)
         << "Could not determine the precache manifest URL prefix.";
 
-    // Keep track of manifest URLs that are being fetched, in order to remove
+    // Keep track of manifest URLs that are being fetched, in order to elide
     // duplicates.
-    base::hash_set<std::string> unique_manifest_urls;
+    base::hash_set<std::string> seen_manifest_urls;
 
     // Attempt to fetch manifests for starting hosts up to the maximum top sites
     // count. If a manifest does not exist for a particular starting host, then
@@ -395,14 +408,14 @@
       ++rank;
       if (rank > config_->top_sites_count())
         break;
-      unique_manifest_urls.insert(ConstructManifestURL(prefix, host));
+      AppendManifestURLIfNew(prefix, host, &seen_manifest_urls,
+                             &manifest_urls_to_fetch_);
     }
 
-    for (const std::string& url : config_->forced_site())
-      unique_manifest_urls.insert(ConstructManifestURL(prefix, url));
+    for (const std::string& host : config_->forced_site())
+      AppendManifestURLIfNew(prefix, host, &seen_manifest_urls,
+                             &manifest_urls_to_fetch_);
 
-    for (const std::string& manifest_url : unique_manifest_urls)
-      manifest_urls_to_fetch_.push_back(GURL(manifest_url));
     num_manifest_urls_to_fetch_ = manifest_urls_to_fetch_.size();
   }
   pool_.Delete(source);
diff --git a/components/precache/core/precache_fetcher_unittest.cc b/components/precache/core/precache_fetcher_unittest.cc
index 51401ed..2ab96df6 100644
--- a/components/precache/core/precache_fetcher_unittest.cc
+++ b/components/precache/core/precache_fetcher_unittest.cc
@@ -38,6 +38,7 @@
 namespace {
 
 using ::testing::_;
+using ::testing::ElementsAre;
 using ::testing::NotNull;
 using ::testing::Property;
 
@@ -529,7 +530,7 @@
 
   histogram.ExpectUniqueSample("Precache.Fetch.PercentCompleted", 0, 1);
   histogram.ExpectUniqueSample("Precache.Fetch.ResponseBytes.Total", 0, 1);
-  histogram.ExpectTotalCount("Precache.Fetch.TimeToComplete", 0);
+  histogram.ExpectTotalCount("Precache.Fetch.TimeToComplete", 1);
 }
 
 #if defined(PRECACHE_CONFIG_SETTINGS_URL)
@@ -675,9 +676,6 @@
   const size_t kBytesPerResource = kMaxBytesTotal / 3;
   // kBytesPerResource * kMaxParallelFeches > kMaxBytesTotal.
 
-  std::vector<std::string> starting_hosts;
-  starting_hosts.push_back("good-manifest.com");
-
   PrecacheConfigurationSettings config;
   config.set_max_bytes_total(kMaxBytesTotal);
 
@@ -699,9 +697,9 @@
   base::HistogramTester histogram;
 
   {
-    PrecacheFetcher precache_fetcher(starting_hosts, request_context_.get(),
-                                     GURL(), std::string(),
-                                     &precache_delegate_);
+    PrecacheFetcher precache_fetcher({"good-manifest.com"},
+                                     request_context_.get(), GURL(),
+                                     std::string(), &precache_delegate_);
     precache_fetcher.Start();
 
     loop_.RunUntilIdle();
@@ -715,7 +713,9 @@
 
   EXPECT_TRUE(precache_delegate_.was_on_done_called());
 
-  histogram.ExpectUniqueSample("Precache.Fetch.PercentCompleted", 100, 1);
+  // good-manifest.com will not have been completed.
+  EXPECT_THAT(histogram.GetAllSamples("Precache.Fetch.PercentCompleted"),
+              ElementsAre(base::Bucket(0, 1)));
   histogram.ExpectTotalCount("Precache.Fetch.TimeToComplete", 1);
 }
 
diff --git a/components/safe_browsing_db.gypi b/components/safe_browsing_db.gypi
index bd62fca7..932f2e1 100644
--- a/components/safe_browsing_db.gypi
+++ b/components/safe_browsing_db.gypi
@@ -24,6 +24,8 @@
         'safe_browsing_db/prefix_set.cc',
         'safe_browsing_db/util.h',
         'safe_browsing_db/util.cc',
+        'safe_browsing_db/v4_local_database_manager.h',
+        'safe_browsing_db/v4_local_database_manager.cc',
         'safe_browsing_db/v4_protocol_manager_util.h',
         'safe_browsing_db/v4_protocol_manager_util.cc',
         'safe_browsing_db/v4_get_hash_protocol_manager.h',
diff --git a/components/safe_browsing_db/BUILD.gn b/components/safe_browsing_db/BUILD.gn
index 419bef801..dc5c80a 100644
--- a/components/safe_browsing_db/BUILD.gn
+++ b/components/safe_browsing_db/BUILD.gn
@@ -171,6 +171,23 @@
   ]
 }
 
+source_set("v4_local_database_manager") {
+  sources = [
+    "v4_local_database_manager.cc",
+    "v4_local_database_manager.h",
+  ]
+  deps = [
+    ":database_manager",
+    ":hit_report",
+    ":v4_protocol_manager_util",
+    ":v4_update_protocol_manager",
+    "//base",
+    "//content/public/browser",
+    "//net",
+    "//url:url",
+  ]
+}
+
 source_set("v4_protocol_manager_util") {
   sources = [
     "v4_protocol_manager_util.cc",
@@ -213,6 +230,7 @@
     ":proto",
     ":util",
     ":v4_get_hash_protocol_manager",
+    ":v4_local_database_manager",
     ":v4_protocol_manager_util",
     ":v4_update_protocol_manager",
     "//base",
diff --git a/components/safe_browsing_db/v4_local_database_manager.cc b/components/safe_browsing_db/v4_local_database_manager.cc
new file mode 100644
index 0000000..bc6c2c5d
--- /dev/null
+++ b/components/safe_browsing_db/v4_local_database_manager.cc
@@ -0,0 +1,172 @@
+// 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 "components/safe_browsing_db/v4_local_database_manager.h"
+
+#include <vector>
+
+#include "content/public/browser/browser_thread.h"
+
+using content::BrowserThread;
+
+namespace safe_browsing {
+
+V4LocalDatabaseManager::V4LocalDatabaseManager() : enabled_(false) {}
+
+V4LocalDatabaseManager::~V4LocalDatabaseManager() {
+  DCHECK(!enabled_);
+}
+
+bool V4LocalDatabaseManager::IsSupported() const {
+  return true;
+}
+
+safe_browsing::ThreatSource V4LocalDatabaseManager::GetThreatSource() const {
+  return safe_browsing::ThreatSource::LOCAL_PVER4;
+}
+
+bool V4LocalDatabaseManager::ChecksAreAlwaysAsync() const {
+  return false;
+}
+
+bool V4LocalDatabaseManager::CanCheckResourceType(
+    content::ResourceType resource_type) const {
+  // We check all types since most checks are fast.
+  return true;
+}
+
+bool V4LocalDatabaseManager::CanCheckUrl(const GURL& url) const {
+  return url.SchemeIs(url::kHttpsScheme) || url.SchemeIs(url::kHttpScheme) ||
+         url.SchemeIs(url::kFtpScheme);
+}
+
+bool V4LocalDatabaseManager::IsDownloadProtectionEnabled() const {
+  // TODO(vakh): Investigate the possibility of using a command line switch for
+  // this instead.
+  return true;
+}
+
+bool V4LocalDatabaseManager::CheckDownloadUrl(
+    const std::vector<GURL>& url_chain,
+    Client* client) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  // TODO(vakh): Implement this skeleton.
+  return true;
+}
+
+bool V4LocalDatabaseManager::CheckExtensionIDs(
+    const std::set<std::string>& extension_ids,
+    Client* client) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::MatchMalwareIP(const std::string& ip_address) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return false;
+}
+
+bool V4LocalDatabaseManager::MatchCsdWhitelistUrl(const GURL& url) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::MatchDownloadWhitelistUrl(const GURL& url) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::MatchDownloadWhitelistString(
+    const std::string& str) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::MatchInclusionWhitelistUrl(const GURL& url) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::MatchModuleWhitelistString(
+    const std::string& str) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::CheckResourceUrl(const GURL& url, Client* client) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::IsMalwareKillSwitchOn() {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::IsCsdWhitelistKillSwitchOn() {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  return true;
+}
+
+bool V4LocalDatabaseManager::CheckBrowseUrl(const GURL& url, Client* client) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  if (!enabled_)
+    return true;
+
+  // Don't defer the resource load.
+  return true;
+}
+
+void V4LocalDatabaseManager::CancelCheck(Client* client) {
+  // TODO(vakh): Implement this skeleton.
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  DCHECK(enabled_);
+}
+
+void V4LocalDatabaseManager::StartOnIOThread(
+    net::URLRequestContextGetter* request_context_getter,
+    const V4ProtocolConfig& config) {
+  // TODO(vakh): Implement this skeleton.
+  VLOG(1) << "V4LocalDatabaseManager starting";
+  SafeBrowsingDatabaseManager::StartOnIOThread(request_context_getter, config);
+
+  V4UpdateCallback callback = base::Bind(
+      &V4LocalDatabaseManager::UpdateRequestCompleted, base::Unretained(this));
+  v4_update_protocol_manager_ = V4UpdateProtocolManager::Create(
+      request_context_getter, config, current_list_states_, callback);
+
+  enabled_ = true;
+}
+
+void V4LocalDatabaseManager::StopOnIOThread(bool shutdown) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  DVLOG(1) << "V4LocalDatabaseManager stopping";
+
+  // Delete the V4UpdateProtocolManager.
+  // This cancels any in-flight update request.
+  if (v4_update_protocol_manager_.get()) {
+    v4_update_protocol_manager_.reset();
+  }
+
+  enabled_ = false;
+  SafeBrowsingDatabaseManager::StopOnIOThread(shutdown);
+}
+
+void V4LocalDatabaseManager::UpdateRequestCompleted(
+    const std::vector<ListUpdateResponse>& responses) {
+  // TODO(vakh): Updates downloaded. Store them on disk and record new state.
+}
+
+}  // namespace safe_browsing
diff --git a/components/safe_browsing_db/v4_local_database_manager.h b/components/safe_browsing_db/v4_local_database_manager.h
new file mode 100644
index 0000000..bf1a7d03
--- /dev/null
+++ b/components/safe_browsing_db/v4_local_database_manager.h
@@ -0,0 +1,81 @@
+// 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.
+
+#ifndef COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_
+#define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_
+
+// A class that provides the interface between the SafeBrowsing protocol manager
+// and database that holds the downloaded updates.
+
+#include "components/safe_browsing_db/database_manager.h"
+#include "components/safe_browsing_db/hit_report.h"
+#include "components/safe_browsing_db/v4_protocol_manager_util.h"
+#include "components/safe_browsing_db/v4_update_protocol_manager.h"
+#include "url/gurl.h"
+
+using content::ResourceType;
+
+namespace safe_browsing {
+
+// Manages the local, on-disk database of updates downloaded from the
+// SafeBrowsing service and interfaces with the protocol manager.
+class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager {
+ public:
+  // Construct V4LocalDatabaseManager.
+  // Must be initialized by calling StartOnIOThread() before using.
+  V4LocalDatabaseManager();
+
+  //
+  // SafeBrowsingDatabaseManager implementation
+  //
+
+  bool IsSupported() const override;
+  safe_browsing::ThreatSource GetThreatSource() const override;
+  bool ChecksAreAlwaysAsync() const override;
+  bool CanCheckResourceType(content::ResourceType resource_type) const override;
+  bool CanCheckUrl(const GURL& url) const override;
+  bool IsDownloadProtectionEnabled() const override;
+  bool CheckBrowseUrl(const GURL& url, Client* client) override;
+  void CancelCheck(Client* client) override;
+  void StartOnIOThread(
+      net::URLRequestContextGetter* request_context_getter,
+      const V4ProtocolConfig& config) override;
+  void StopOnIOThread(bool shutdown) override;
+  bool CheckDownloadUrl(const std::vector<GURL>& url_chain,
+                        Client* client) override;
+  bool CheckExtensionIDs(const std::set<std::string>& extension_ids,
+                         Client* client) override;
+  bool MatchCsdWhitelistUrl(const GURL& url) override;
+  bool MatchMalwareIP(const std::string& ip_address) override;
+  bool MatchDownloadWhitelistUrl(const GURL& url) override;
+  bool MatchDownloadWhitelistString(const std::string& str) override;
+  bool MatchInclusionWhitelistUrl(const GURL& url) override;
+  bool MatchModuleWhitelistString(const std::string& str) override;
+  bool CheckResourceUrl(const GURL& url, Client* client) override;
+  bool IsMalwareKillSwitchOn() override;
+  bool IsCsdWhitelistKillSwitchOn() override;
+
+ private:
+  ~V4LocalDatabaseManager() override;
+
+  // The callback called each time the protocol manager downloads updates
+  // successfully.
+  void UpdateRequestCompleted(const std::vector<ListUpdateResponse>& responses);
+
+  bool enabled_;
+
+  // Stores the current status of the lists to download from the SafeBrowsing
+  // servers.
+  base::hash_map<UpdateListIdentifier, std::string> current_list_states_;
+
+  // The protocol manager that downloads the hash prefix updates.
+  scoped_ptr<V4UpdateProtocolManager> v4_update_protocol_manager_;
+
+  friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>;
+  DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager);
+};  // class V4LocalDatabaseManager
+
+}  // namespace safe_browsing
+
+#endif  // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_
diff --git a/components/safe_browsing_db/v4_protocol_manager_util.cc b/components/safe_browsing_db/v4_protocol_manager_util.cc
index fbbad5b..ec2de4cc 100644
--- a/components/safe_browsing_db/v4_protocol_manager_util.cc
+++ b/components/safe_browsing_db/v4_protocol_manager_util.cc
@@ -39,6 +39,8 @@
 
 V4ProtocolConfig::V4ProtocolConfig() : disable_auto_update(false) {}
 
+V4ProtocolConfig::V4ProtocolConfig(const V4ProtocolConfig& other) = default;
+
 V4ProtocolConfig::~V4ProtocolConfig() {}
 
 // static
diff --git a/components/safe_browsing_db/v4_protocol_manager_util.h b/components/safe_browsing_db/v4_protocol_manager_util.h
index 54e88994..0d55267 100644
--- a/components/safe_browsing_db/v4_protocol_manager_util.h
+++ b/components/safe_browsing_db/v4_protocol_manager_util.h
@@ -32,6 +32,7 @@
   bool disable_auto_update;
 
   V4ProtocolConfig();
+  V4ProtocolConfig(const V4ProtocolConfig& other);
   ~V4ProtocolConfig();
 };
 
diff --git a/components/scheduler/renderer/deadline_task_runner_unittest.cc b/components/scheduler/renderer/deadline_task_runner_unittest.cc
index 1cffa69..76bb30f1 100644
--- a/components/scheduler/renderer/deadline_task_runner_unittest.cc
+++ b/components/scheduler/renderer/deadline_task_runner_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/memory/scoped_ptr.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "components/scheduler/renderer/deadline_task_runner.h"
 
diff --git a/components/test/data/update_client/updatecheck_reply_4.xml b/components/test/data/update_client/updatecheck_reply_4.xml
new file mode 100644
index 0000000..48a2d9c
--- /dev/null
+++ b/components/test/data/update_client/updatecheck_reply_4.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<response protocol='3.0'>
+  <daystart elapsed_days='3383' />
+  <app appid='jebgalgnebhfojomionfpkfelancnnkf'>
+    <updatecheck status='ok'>
+      <urls>
+        <url codebase='http://localhost/download/'/>
+      </urls>
+      <manifest version='1.0' prodversionmin='11.0.1.0'>
+        <packages>
+          <package name='jebgalgnebhfojomionfpkfelancnnkf.crx'/>
+        </packages>
+      </manifest>
+    </updatecheck>
+  </app>
+</response>
diff --git a/components/test_runner/web_frame_test_client.cc b/components/test_runner/web_frame_test_client.cc
index bdc7579..6b18bd42 100644
--- a/components/test_runner/web_frame_test_client.cc
+++ b/components/test_runner/web_frame_test_client.cc
@@ -116,7 +116,7 @@
 }
 
 bool IsLocalHost(const std::string& host) {
-  return host == "127.0.0.1" || host == "localhost";
+  return host == "127.0.0.1" || host == "localhost" || host == "[::1]";
 }
 
 bool IsTestHost(const std::string& host) {
diff --git a/components/update_client.gypi b/components/update_client.gypi
index cbab44aa..0cfa4b2 100644
--- a/components/update_client.gypi
+++ b/components/update_client.gypi
@@ -44,6 +44,8 @@
         'update_client/crx_downloader.cc',
         'update_client/crx_downloader.h',
         'update_client/crx_update_item.h',
+        'update_client/persisted_data.cc',
+        'update_client/persisted_data.h',
         'update_client/ping_manager.cc',
         'update_client/ping_manager.h',
         'update_client/request_sender.cc',
diff --git a/components/update_client/BUILD.gn b/components/update_client/BUILD.gn
index e6c6879..a6a8931 100644
--- a/components/update_client/BUILD.gn
+++ b/components/update_client/BUILD.gn
@@ -24,6 +24,8 @@
     "crx_downloader.cc",
     "crx_downloader.h",
     "crx_update_item.h",
+    "persisted_data.cc",
+    "persisted_data.h",
     "ping_manager.cc",
     "ping_manager.h",
     "request_sender.cc",
@@ -54,6 +56,7 @@
     "//base",
     "//components/client_update_protocol",
     "//components/crx_file",
+    "//components/prefs",
     "//courgette:courgette_lib",
     "//crypto",
     "//net",
@@ -79,6 +82,7 @@
   ]
   deps = [
     "//base",
+    "//components/prefs",
     "//net:test_support",
     "//testing/gmock",
     "//testing/gtest",
@@ -91,6 +95,7 @@
   sources = [
     "component_patcher_unittest.cc",
     "crx_downloader_unittest.cc",
+    "persisted_data_unittest.cc",
     "ping_manager_unittest.cc",
     "request_sender_unittest.cc",
     "update_checker_unittest.cc",
@@ -104,6 +109,8 @@
     ":test_support",
     ":update_client",
     "//base",
+    "//components/prefs",
+    "//components/prefs:test_support",
     "//courgette:courgette_lib",
     "//net:test_support",
     "//testing/gmock",
diff --git a/components/update_client/DEPS b/components/update_client/DEPS
index ce1b49a3..e95f69af 100644
--- a/components/update_client/DEPS
+++ b/components/update_client/DEPS
@@ -1,6 +1,7 @@
 include_rules = [
   "+components/client_update_protocol",
   "+components/crx_file",
+  "+components/prefs",
   "+courgette",
   "+crypto",
   "+libxml",
diff --git a/components/update_client/configurator.h b/components/update_client/configurator.h
index 177c4a7..63745c03 100644
--- a/components/update_client/configurator.h
+++ b/components/update_client/configurator.h
@@ -12,6 +12,7 @@
 #include "base/memory/scoped_ptr.h"
 
 class GURL;
+class PrefService;
 
 namespace base {
 class SequencedTaskRunner;
@@ -111,6 +112,14 @@
   virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
       const = 0;
 
+  // Returns a PrefService that the update_client can use to store persistent
+  // update information. The PrefService must outlive the entire update_client,
+  // and be safe to access from the thread the update_client is constructed
+  // on.
+  // Returning null is safe and will disable any functionality that requires
+  // persistent storage.
+  virtual PrefService* GetPrefService() const = 0;
+
  protected:
   friend class base::RefCountedThreadSafe<Configurator>;
 
diff --git a/components/update_client/persisted_data.cc b/components/update_client/persisted_data.cc
new file mode 100644
index 0000000..0894dba
--- /dev/null
+++ b/components/update_client/persisted_data.cc
@@ -0,0 +1,60 @@
+// 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 "components/update_client/persisted_data.h"
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/threading/thread_checker.h"
+#include "base/values.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/scoped_user_pref_update.h"
+
+const char kPersistedDataPreference[] = "updateclientdata";
+const int kDateLastRollCallUnknown = -2;
+
+namespace update_client {
+
+PersistedData::PersistedData(PrefService* pref_service)
+    : pref_service_(pref_service) {}
+
+PersistedData::~PersistedData() {
+  DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+int PersistedData::GetDateLastRollCall(const std::string& id) const {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  if (!pref_service_)
+    return kDateLastRollCallUnknown;
+  int dlrc = kDateLastRollCallUnknown;
+  const base::DictionaryValue* dict =
+      pref_service_->GetDictionary(kPersistedDataPreference);
+  // We assume ids do not contain '.' characters.
+  DCHECK_EQ(std::string::npos, id.find('.'));
+  if (!dict->GetInteger("apps." + id + ".dlrc", &dlrc))
+    return kDateLastRollCallUnknown;
+  return dlrc;
+}
+
+void PersistedData::SetDateLastRollCall(const std::vector<std::string>& ids,
+                                        int datenum) const {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  if (!pref_service_ || datenum < 0)
+    return;
+  DictionaryPrefUpdate update(pref_service_, kPersistedDataPreference);
+  for (auto id : ids) {
+    // We assume ids do not contain '.' characters.
+    DCHECK_EQ(std::string::npos, id.find('.'));
+    update->SetInteger("apps." + id + ".dlrc", datenum);
+  }
+}
+
+void PersistedData::RegisterPrefs(PrefRegistrySimple* registry) {
+  registry->RegisterDictionaryPref(kPersistedDataPreference);
+}
+
+}  // namespace update_client
diff --git a/components/update_client/persisted_data.h b/components/update_client/persisted_data.h
new file mode 100644
index 0000000..d4673b4
--- /dev/null
+++ b/components/update_client/persisted_data.h
@@ -0,0 +1,60 @@
+// 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.
+
+#ifndef COMPONENTS_UPDATE_CLIENT_PERSISTED_DATA_H_
+#define COMPONENTS_UPDATE_CLIENT_PERSISTED_DATA_H_
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/threading/thread_checker.h"
+#include "base/values.h"
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace update_client {
+
+// A PersistedData is a wrapper layer around a PrefService, designed to maintain
+// update data that outlives the browser process and isn't exposed outside of
+// update_client.
+//
+// The public methods of this class should be called only on the thread that
+// initializes it - which also has to match the thread the PrefService has been
+// initialized on.
+class PersistedData {
+ public:
+  // Constructs a provider that uses the specified |pref_service|.
+  // The associated preferences are assumed to already be registered.
+  // The |pref_service| must outlive the entire update_client.
+  explicit PersistedData(PrefService* pref_service);
+
+  ~PersistedData();
+
+  // Returns the DateLastRollCall (the server-localized calendar date number the
+  // |id| was last checked by this client on) for the specified |id|.
+  // -2 indicates that there is no recorded date number for the |id|.
+  int GetDateLastRollCall(const std::string& id) const;
+
+  // Records the DateLastRollCall for the specified |ids|. |datenum| must be a
+  // non-negative integer: calls with a negative |datenum| are simply ignored.
+  // Calls to SetDateLastRollCall that occur prior to the persisted data store
+  // has been fully initialized are ignored.
+  void SetDateLastRollCall(const std::vector<std::string>& ids,
+                           int datenum) const;
+
+  // This is called only via update_client's RegisterUpdateClientPreferences.
+  static void RegisterPrefs(PrefRegistrySimple* registry);
+
+ private:
+  base::ThreadChecker thread_checker_;
+  PrefService* pref_service_;
+
+  DISALLOW_COPY_AND_ASSIGN(PersistedData);
+};
+
+}  // namespace update_client
+
+#endif  // COMPONENTS_UPDATE_CLIENT_PERSISTED_DATA_H_
diff --git a/components/update_client/persisted_data_unittest.cc b/components/update_client/persisted_data_unittest.cc
new file mode 100644
index 0000000..d89060f
--- /dev/null
+++ b/components/update_client/persisted_data_unittest.cc
@@ -0,0 +1,47 @@
+// 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 <string>
+#include <vector>
+
+#include "components/prefs/testing_pref_service.h"
+#include "components/update_client/persisted_data.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace update_client {
+
+TEST(PersistedDataTest, Simple) {
+  std::unique_ptr<TestingPrefServiceSimple> pref(
+      new TestingPrefServiceSimple());
+  PersistedData::RegisterPrefs(pref->registry());
+  std::unique_ptr<PersistedData> metadata(new PersistedData(pref.get()));
+  EXPECT_EQ(-2, metadata->GetDateLastRollCall("someappid"));
+  std::vector<std::string> items;
+  items.push_back("someappid");
+  metadata->SetDateLastRollCall(items, 3383);
+  EXPECT_EQ(3383, metadata->GetDateLastRollCall("someappid"));
+  EXPECT_EQ(-2, metadata->GetDateLastRollCall("someotherappid"));
+  metadata->SetDateLastRollCall(items, 3386);
+  EXPECT_EQ(3386, metadata->GetDateLastRollCall("someappid"));
+  EXPECT_EQ(-2, metadata->GetDateLastRollCall("someotherappid"));
+}
+
+TEST(PersistedDataTest, SharedPref) {
+  std::unique_ptr<TestingPrefServiceSimple> pref(
+      new TestingPrefServiceSimple());
+  PersistedData::RegisterPrefs(pref->registry());
+  std::unique_ptr<PersistedData> metadata(new PersistedData(pref.get()));
+  EXPECT_EQ(-2, metadata->GetDateLastRollCall("someappid"));
+  std::vector<std::string> items;
+  items.push_back("someappid");
+  metadata->SetDateLastRollCall(items, 3383);
+
+  // Now, create a new PersistedData reading from the same path, verify
+  // that it loads the value.
+  metadata.reset(new PersistedData(pref.get()));
+  EXPECT_EQ(3383, metadata->GetDateLastRollCall("someappid"));
+  EXPECT_EQ(-2, metadata->GetDateLastRollCall("someotherappid"));
+}
+
+}  // namespace update_client
diff --git a/components/update_client/test_configurator.cc b/components/update_client/test_configurator.cc
index 6ba5392..1da523f 100644
--- a/components/update_client/test_configurator.cc
+++ b/components/update_client/test_configurator.cc
@@ -5,6 +5,7 @@
 #include "components/update_client/test_configurator.h"
 
 #include "base/version.h"
+#include "components/prefs/pref_service.h"
 #include "components/update_client/component_patcher_operation.h"
 #include "url/gurl.h"
 
@@ -153,4 +154,8 @@
   return worker_task_runner_;
 }
 
+PrefService* TestConfigurator::GetPrefService() const {
+  return nullptr;
+}
+
 }  // namespace update_client
diff --git a/components/update_client/test_configurator.h b/components/update_client/test_configurator.h
index ed5bf32bc..8a65379 100644
--- a/components/update_client/test_configurator.h
+++ b/components/update_client/test_configurator.h
@@ -17,6 +17,7 @@
 #include "net/url_request/url_request_test_util.h"
 
 class GURL;
+class PrefService;
 
 namespace base {
 class SequencedTaskRunner;
@@ -77,6 +78,7 @@
   bool UseCupSigning() const override;
   scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
       const override;
+  PrefService* GetPrefService() const override;
 
   void SetBrand(const std::string& brand);
   void SetOnDemandTime(int seconds);
diff --git a/components/update_client/update_checker.cc b/components/update_client/update_checker.cc
index 234ef22..ec88892 100644
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -20,6 +20,7 @@
 #include "base/threading/thread_checker.h"
 #include "components/update_client/configurator.h"
 #include "components/update_client/crx_update_item.h"
+#include "components/update_client/persisted_data.h"
 #include "components/update_client/request_sender.h"
 #include "components/update_client/utils.h"
 #include "url/gurl.h"
@@ -33,6 +34,11 @@
   return IsValidBrand(brand) ? brand : std::string("");
 }
 
+// Returns a sanitized version of the |ap| or an empty string otherwise.
+std::string SanitizeAp(const std::string& ap) {
+  return IsValidAp(ap) ? ap : std::string();
+}
+
 // Returns true if at least one item requires network encryption.
 bool IsEncryptionRequired(const std::vector<CrxUpdateItem*>& items) {
   for (const auto& item : items) {
@@ -58,11 +64,13 @@
 //    </app>
 std::string BuildUpdateCheckRequest(const Configurator& config,
                                     const std::vector<CrxUpdateItem*>& items,
+                                    const PersistedData& metadata,
                                     const std::string& additional_attributes) {
   const std::string brand(SanitizeBrand(config.GetBrand()));
   std::string app_elements;
   for (size_t i = 0; i != items.size(); ++i) {
     const CrxUpdateItem* item = items[i];
+    const std::string ap(SanitizeAp(item->component.ap));
     std::string app("<app ");
     base::StringAppendF(&app, "appid=\"%s\" version=\"%s\"", item->id.c_str(),
                         item->component.version.GetString().c_str());
@@ -70,8 +78,12 @@
       base::StringAppendF(&app, " brand=\"%s\"", brand.c_str());
     if (item->on_demand)
       base::StringAppendF(&app, " installsource=\"ondemand\"");
+    if (!ap.empty())
+      base::StringAppendF(&app, " ap=\"%s\"", ap.c_str());
     base::StringAppendF(&app, ">");
     base::StringAppendF(&app, "<updatecheck />");
+    base::StringAppendF(&app, "<ping rd=\"%d\" />",
+                        metadata.GetDateLastRollCall(item->id));
     if (!item->component.fingerprint.empty()) {
       base::StringAppendF(&app,
                           "<packages>"
@@ -92,7 +104,8 @@
 
 class UpdateCheckerImpl : public UpdateChecker {
  public:
-  explicit UpdateCheckerImpl(const scoped_refptr<Configurator>& config);
+  UpdateCheckerImpl(const scoped_refptr<Configurator>& config,
+                    const PersistedData& metadata);
   ~UpdateCheckerImpl() override;
 
   // Overrides for UpdateChecker.
@@ -102,20 +115,23 @@
       const UpdateCheckCallback& update_check_callback) override;
 
  private:
-  void OnRequestSenderComplete(int error,
+  void OnRequestSenderComplete(scoped_ptr<std::vector<std::string>> ids_checked,
+                               int error,
                                const std::string& response,
                                int retry_after_sec);
   base::ThreadChecker thread_checker_;
 
   const scoped_refptr<Configurator> config_;
+  const PersistedData& metadata_;
   UpdateCheckCallback update_check_callback_;
   scoped_ptr<RequestSender> request_sender_;
 
   DISALLOW_COPY_AND_ASSIGN(UpdateCheckerImpl);
 };
 
-UpdateCheckerImpl::UpdateCheckerImpl(const scoped_refptr<Configurator>& config)
-    : config_(config) {}
+UpdateCheckerImpl::UpdateCheckerImpl(const scoped_refptr<Configurator>& config,
+                                     const PersistedData& metadata)
+    : config_(config), metadata_(metadata) {}
 
 UpdateCheckerImpl::~UpdateCheckerImpl() {
   DCHECK(thread_checker_.CalledOnValidThread());
@@ -138,23 +154,33 @@
   if (IsEncryptionRequired(items_to_check))
     RemoveUnsecureUrls(&urls);
 
+  std::unique_ptr<std::vector<std::string>> ids_checked(
+      new std::vector<std::string>());
+  for (auto crx : items_to_check)
+    ids_checked->push_back(crx->id);
   request_sender_.reset(new RequestSender(config_));
   request_sender_->Send(
       config_->UseCupSigning(),
-      BuildUpdateCheckRequest(*config_, items_to_check, additional_attributes),
+      BuildUpdateCheckRequest(*config_, items_to_check, metadata_,
+                              additional_attributes),
       urls, base::Bind(&UpdateCheckerImpl::OnRequestSenderComplete,
-                       base::Unretained(this)));
+                       base::Unretained(this), base::Passed(&ids_checked)));
   return true;
 }
 
-void UpdateCheckerImpl::OnRequestSenderComplete(int error,
-                                                const std::string& response,
-                                                int retry_after_sec) {
+void UpdateCheckerImpl::OnRequestSenderComplete(
+    std::unique_ptr<std::vector<std::string>> ids_checked,
+    int error,
+    const std::string& response,
+    int retry_after_sec) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
   if (!error) {
     UpdateResponse update_response;
     if (update_response.Parse(response)) {
+      int daynum = update_response.results().daystart_elapsed_days;
+      if (daynum != UpdateResponse::kNoDaystart)
+        metadata_.SetDateLastRollCall(*ids_checked, daynum);
       base::ThreadTaskRunnerHandle::Get()->PostTask(
           FROM_HERE, base::Bind(update_check_callback_, error,
                                 update_response.results(), retry_after_sec));
@@ -173,8 +199,9 @@
 }  // namespace
 
 scoped_ptr<UpdateChecker> UpdateChecker::Create(
-    const scoped_refptr<Configurator>& config) {
-  return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config));
+    const scoped_refptr<Configurator>& config,
+    const PersistedData& persistent) {
+  return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config, persistent));
 }
 
 }  // namespace update_client
diff --git a/components/update_client/update_checker.h b/components/update_client/update_checker.h
index 1f0eb993..94b88d6 100644
--- a/components/update_client/update_checker.h
+++ b/components/update_client/update_checker.h
@@ -19,6 +19,7 @@
 
 namespace update_client {
 
+class PersistedData;
 class Configurator;
 struct CrxUpdateItem;
 
@@ -30,7 +31,8 @@
                           int retry_after_sec)>;
 
   using Factory =
-      scoped_ptr<UpdateChecker> (*)(const scoped_refptr<Configurator>& config);
+      scoped_ptr<UpdateChecker> (*)(const scoped_refptr<Configurator>& config,
+                                    const PersistedData& persistent);
 
   virtual ~UpdateChecker() {}
 
@@ -43,7 +45,8 @@
       const UpdateCheckCallback& update_check_callback) = 0;
 
   static scoped_ptr<UpdateChecker> Create(
-      const scoped_refptr<Configurator>& config);
+      const scoped_refptr<Configurator>& config,
+      const PersistedData& persistent);
 
  protected:
   UpdateChecker() {}
diff --git a/components/update_client/update_checker_unittest.cc b/components/update_client/update_checker_unittest.cc
index 3348996..b866643 100644
--- a/components/update_client/update_checker_unittest.cc
+++ b/components/update_client/update_checker_unittest.cc
@@ -12,7 +12,9 @@
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/version.h"
+#include "components/prefs/testing_pref_service.h"
 #include "components/update_client/crx_update_item.h"
+#include "components/update_client/persisted_data.h"
 #include "components/update_client/test_configurator.h"
 #include "components/update_client/update_checker.h"
 #include "components/update_client/url_request_post_interceptor.h"
@@ -59,6 +61,8 @@
   CrxUpdateItem BuildCrxUpdateItem();
 
   scoped_refptr<TestConfigurator> config_;
+  std::unique_ptr<TestingPrefServiceSimple> pref_;
+  std::unique_ptr<PersistedData> metadata_;
 
   scoped_ptr<UpdateChecker> update_checker_;
 
@@ -84,6 +88,9 @@
 void UpdateCheckerTest::SetUp() {
   config_ = new TestConfigurator(base::ThreadTaskRunnerHandle::Get(),
                                  base::ThreadTaskRunnerHandle::Get());
+  pref_.reset(new TestingPrefServiceSimple());
+  PersistedData::RegisterPrefs(pref_->registry());
+  metadata_.reset(new PersistedData(pref_.get()));
   interceptor_factory_.reset(
       new InterceptorFactory(base::ThreadTaskRunnerHandle::Get()));
   post_interceptor_ = interceptor_factory_->CreateInterceptor();
@@ -158,9 +165,10 @@
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
-  update_checker_ = UpdateChecker::Create(config_);
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
 
   CrxUpdateItem item(BuildCrxUpdateItem());
+  item.component.ap = "some_ap";
   std::vector<CrxUpdateItem*> items_to_check;
   items_to_check.push_back(&item);
 
@@ -185,8 +193,8 @@
   EXPECT_NE(
       string::npos,
       post_interceptor_->GetRequests()[0].find(
-          "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
-          "brand=\"TEST\"><updatecheck />"
+          "<app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
+          "brand=\"TEST\" ap=\"some_ap\"><updatecheck /><ping rd=\"-2\" />"
           "<packages><package fp=\"fp1\"/></packages></app>"));
 
   EXPECT_NE(string::npos,
@@ -200,12 +208,38 @@
   EXPECT_STREQ("1.0", results_.list[0].manifest.version.c_str());
 }
 
+// Tests that an invalid "ap" is not serialized.
+TEST_F(UpdateCheckerTest, UpdateCheckInvalidAp) {
+  EXPECT_TRUE(post_interceptor_->ExpectRequest(
+      new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
+
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+
+  CrxUpdateItem item(BuildCrxUpdateItem());
+  item.component.ap = std::string(257, 'a');  // Too long.
+  std::vector<CrxUpdateItem*> items_to_check;
+  items_to_check.push_back(&item);
+
+  update_checker_->CheckForUpdates(
+      items_to_check, "", base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
+                                     base::Unretained(this)));
+
+  RunThreads();
+
+  EXPECT_NE(
+      string::npos,
+      post_interceptor_->GetRequests()[0].find(
+          "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
+          "brand=\"TEST\"><updatecheck /><ping rd=\"-2\" />"
+          "<packages><package fp=\"fp1\"/></packages></app>"));
+}
+
 TEST_F(UpdateCheckerTest, UpdateCheckSuccessNoBrand) {
   EXPECT_TRUE(post_interceptor_->ExpectRequest(
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
   config_->SetBrand("TOOLONG");   // Sets an invalid brand code.
-  update_checker_ = UpdateChecker::Create(config_);
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -220,8 +254,9 @@
   EXPECT_NE(
       string::npos,
       post_interceptor_->GetRequests()[0].find(
-          "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">"
-          "<updatecheck /><packages><package fp=\"fp1\"/></packages></app>"));
+          "<app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">"
+          "<updatecheck /><ping rd=\"-2\" /><packages><package fp=\"fp1\"/>"
+          "</packages></app>"));
 }
 
 // Simulates a 403 server response error.
@@ -229,7 +264,7 @@
   EXPECT_TRUE(
       post_interceptor_->ExpectRequest(new PartialMatch("updatecheck"), 403));
 
-  update_checker_ = UpdateChecker::Create(config_);
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -255,7 +290,7 @@
 
   config_->SetDownloadPreference(string("cacheable"));
 
-  update_checker_ = UpdateChecker::Create(config_);
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -281,7 +316,7 @@
       new PartialMatch("updatecheck"), test_file("updatecheck_reply_1.xml")));
 
   config_->SetUseCupSigning(true);
-  update_checker_ = UpdateChecker::Create(config_);
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   std::vector<CrxUpdateItem*> items_to_check;
@@ -302,8 +337,8 @@
   EXPECT_NE(
       string::npos,
       post_interceptor_->GetRequests()[0].find(
-          "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
-          "brand=\"TEST\"><updatecheck />"
+          "<app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\" "
+          "brand=\"TEST\"><updatecheck /><ping rd=\"-2\" />"
           "<packages><package fp=\"fp1\"/></packages></app>"));
 
   // Expect an error since the response is not trusted.
@@ -316,7 +351,7 @@
 TEST_F(UpdateCheckerTest, UpdateCheckRequiresEncryptionError) {
   config_->SetUpdateCheckUrl(GURL("http:\\foo\bar"));
 
-  update_checker_ = UpdateChecker::Create(config_);
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
 
   CrxUpdateItem item(BuildCrxUpdateItem());
   item.component.requires_network_encryption = true;
@@ -332,4 +367,41 @@
   EXPECT_EQ(0u, results_.list.size());
 }
 
+// Tests that the PersistedData will get correctly update and reserialize
+// the elapsed_days value.
+TEST_F(UpdateCheckerTest, UpdateCheckDateLastRollCall) {
+  EXPECT_TRUE(post_interceptor_->ExpectRequest(
+      new PartialMatch("updatecheck"), test_file("updatecheck_reply_4.xml")));
+  EXPECT_TRUE(post_interceptor_->ExpectRequest(
+      new PartialMatch("updatecheck"), test_file("updatecheck_reply_4.xml")));
+
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+
+  CrxUpdateItem item(BuildCrxUpdateItem());
+  std::vector<CrxUpdateItem*> items_to_check;
+  items_to_check.push_back(&item);
+
+  // Do two update-checks.
+  update_checker_->CheckForUpdates(
+      items_to_check, "extra=\"params\"",
+      base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
+                 base::Unretained(this)));
+  RunThreads();
+  update_checker_ = UpdateChecker::Create(config_, *metadata_);
+  update_checker_->CheckForUpdates(
+      items_to_check, "extra=\"params\"",
+      base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
+                 base::Unretained(this)));
+  RunThreads();
+
+  EXPECT_EQ(2, post_interceptor_->GetHitCount())
+      << post_interceptor_->GetRequestsAsString();
+  ASSERT_EQ(2, post_interceptor_->GetCount())
+      << post_interceptor_->GetRequestsAsString();
+  EXPECT_NE(string::npos,
+            post_interceptor_->GetRequests()[0].find("<ping rd=\"-2\" />"));
+  EXPECT_NE(string::npos,
+            post_interceptor_->GetRequests()[1].find("<ping rd=\"3383\" />"));
+}
+
 }  // namespace update_client
diff --git a/components/update_client/update_client.cc b/components/update_client/update_client.cc
index 8fa551d..8e1fdf2 100644
--- a/components/update_client/update_client.cc
+++ b/components/update_client/update_client.cc
@@ -22,8 +22,10 @@
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "base/threading/thread_checker.h"
+#include "components/prefs/pref_registry_simple.h"
 #include "components/update_client/configurator.h"
 #include "components/update_client/crx_update_item.h"
+#include "components/update_client/persisted_data.h"
 #include "components/update_client/ping_manager.h"
 #include "components/update_client/task_update.h"
 #include "components/update_client/update_checker.h"
@@ -253,4 +255,8 @@
                               &UpdateChecker::Create, &CrxDownloader::Create);
 }
 
+void RegisterPrefs(PrefRegistrySimple* registry) {
+  PersistedData::RegisterPrefs(registry);
+}
+
 }  // namespace update_client
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h
index e354fb62..16df41c9 100644
--- a/components/update_client/update_client.h
+++ b/components/update_client/update_client.h
@@ -128,6 +128,7 @@
 // being checked for updates and applying the update.
 
 class ComponentsUI;
+class PrefRegistrySimple;
 
 namespace base {
 class DictionaryValue;
@@ -196,6 +197,7 @@
 
   std::string fingerprint;  // Optional.
   std::string name;         // Optional.
+  std::string ap;           // Optional. Must match ^[-+_=a-zA-Z0-9]{0,256}$
 
   // Specifies that the CRX can be background-downloaded in some cases.
   // The default for this value is |true|.
@@ -329,6 +331,10 @@
 scoped_refptr<UpdateClient> UpdateClientFactory(
     const scoped_refptr<Configurator>& config);
 
+// This must be called prior to the construction of any Configurator that
+// contains a PrefService.
+void RegisterPrefs(PrefRegistrySimple* registry);
+
 }  // namespace update_client
 
 #endif  // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_
diff --git a/components/update_client/update_client_unittest.cc b/components/update_client/update_client_unittest.cc
index 957f6973..8e8c943 100644
--- a/components/update_client/update_client_unittest.cc
+++ b/components/update_client/update_client_unittest.cc
@@ -19,7 +19,9 @@
 #include "base/thread_task_runner_handle.h"
 #include "base/values.h"
 #include "base/version.h"
+#include "components/prefs/testing_pref_service.h"
 #include "components/update_client/crx_update_item.h"
+#include "components/update_client/persisted_data.h"
 #include "components/update_client/ping_manager.h"
 #include "components/update_client/test_configurator.h"
 #include "components/update_client/test_installer.h"
@@ -146,6 +148,7 @@
   static base::FilePath TestFilePath(const char* file);
 
   scoped_refptr<update_client::Configurator> config() { return config_; }
+  const update_client::PersistedData& metadata() { return *metadata_; }
 
   base::Closure quit_closure() { return quit_closure_; }
 
@@ -159,6 +162,8 @@
   scoped_ptr<base::SequencedWorkerPoolOwner> worker_pool_;
 
   scoped_refptr<update_client::Configurator> config_;
+  std::unique_ptr<TestingPrefServiceSimple> pref_;
+  std::unique_ptr<update_client::PersistedData> metadata_;
 
   DISALLOW_COPY_AND_ASSIGN(UpdateClientTest);
 };
@@ -172,6 +177,9 @@
   config_ = new TestConfigurator(
       pool->GetSequencedTaskRunner(pool->GetSequenceToken()),
       message_loop_.task_runner());
+  pref_.reset(new TestingPrefServiceSimple());
+  PersistedData::RegisterPrefs(pref_->registry());
+  metadata_.reset(new PersistedData(pref_.get()));
 }
 
 UpdateClientTest::~UpdateClientTest() {
@@ -218,7 +226,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -324,7 +333,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -509,7 +519,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -756,7 +767,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1006,7 +1018,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1297,7 +1310,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1480,7 +1494,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1769,7 +1784,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -1868,7 +1884,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -2054,7 +2071,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -2147,7 +2165,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
@@ -2192,7 +2211,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return nullptr;
     }
 
@@ -2289,7 +2309,8 @@
   class FakeUpdateChecker : public UpdateChecker {
    public:
     static scoped_ptr<UpdateChecker> Create(
-        const scoped_refptr<Configurator>& config) {
+        const scoped_refptr<Configurator>& config,
+        const PersistedData& metadata) {
       return scoped_ptr<UpdateChecker>(new FakeUpdateChecker());
     }
 
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index 20f9a6a..87cbda2b 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -10,9 +10,11 @@
 #include "base/stl_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
+#include "components/prefs/pref_service.h"
 #include "components/update_client/action_update_check.h"
 #include "components/update_client/configurator.h"
 #include "components/update_client/crx_update_item.h"
+#include "components/update_client/persisted_data.h"
 #include "components/update_client/update_checker.h"
 
 namespace update_client {
@@ -54,8 +56,8 @@
       update_checker_factory_(update_checker_factory),
       crx_downloader_factory_(crx_downloader_factory),
       ping_manager_(ping_manager),
-      notify_observers_callback_(notify_observers_callback) {
-}
+      metadata_(new PersistedData(config->GetPrefService())),
+      notify_observers_callback_(notify_observers_callback) {}
 
 UpdateEngine::~UpdateEngine() {
   DCHECK(thread_checker_.CalledOnValidThread());
@@ -98,7 +100,7 @@
 
   CrxUpdateItem update_item;
   scoped_ptr<ActionUpdateCheck> update_check_action(new ActionUpdateCheck(
-      (*update_context->update_checker_factory)(config_),
+      (*update_context->update_checker_factory)(config_, *metadata_),
       config_->GetBrowserVersion(), config_->ExtraRequestParams()));
 
   update_context->current_action.reset(update_check_action.release());
diff --git a/components/update_client/update_engine.h b/components/update_client/update_engine.h
index 1d69ece..33e5f2e 100644
--- a/components/update_client/update_engine.h
+++ b/components/update_client/update_engine.h
@@ -77,6 +77,8 @@
   // TODO(sorin): refactor as a ref counted class.
   PingManager* ping_manager_;  // Not owned by this class.
 
+  std::unique_ptr<PersistedData> metadata_;
+
   // Called when CRX state changes occur.
   const NotifyObserversCallback notify_observers_callback_;
 
diff --git a/components/update_client/update_response.cc b/components/update_client/update_response.cc
index bdf77f8..3d8d14d5 100644
--- a/components/update_client/update_response.cc
+++ b/components/update_client/update_response.cc
@@ -287,6 +287,7 @@
 
 bool UpdateResponse::Parse(const std::string& response_xml) {
   results_.daystart_elapsed_seconds = kNoDaystart;
+  results_.daystart_elapsed_days = kNoDaystart;
   results_.list.clear();
   errors_.clear();
 
@@ -335,6 +336,11 @@
     if (base::StringToInt(elapsed_seconds, &parsed_elapsed)) {
       results_.daystart_elapsed_seconds = parsed_elapsed;
     }
+    std::string elapsed_days = GetAttribute(first, "elapsed_days");
+    parsed_elapsed = kNoDaystart;
+    if (base::StringToInt(elapsed_days, &parsed_elapsed)) {
+      results_.daystart_elapsed_days = parsed_elapsed;
+    }
   }
 
   // Parse each of the <app> tags.
diff --git a/components/update_client/update_response.h b/components/update_client/update_response.h
index 6d93d26..6c0ea9bd 100644
--- a/components/update_client/update_response.h
+++ b/components/update_client/update_response.h
@@ -109,6 +109,8 @@
 
     // This will be >= 0, or kNoDaystart if the <daystart> tag was not present.
     int daystart_elapsed_seconds;
+    // This will be >= 0, or kNoDaystart if the <daystart> tag was not present.
+    int daystart_elapsed_days;
     std::vector<Result> list;
   };
 
diff --git a/components/update_client/utils.cc b/components/update_client/utils.cc
index caa00cea..236c270 100644
--- a/components/update_client/utils.cc
+++ b/components/update_client/utils.cc
@@ -231,7 +231,7 @@
 
 bool IsValidBrand(const std::string& brand) {
   const size_t kMaxBrandSize = 4;
-  if (brand.size() > kMaxBrandSize)
+  if (!brand.empty() && brand.size() != kMaxBrandSize)
     return false;
 
   return std::find_if_not(brand.begin(), brand.end(), [](char ch) {
@@ -239,6 +239,25 @@
          }) == brand.end();
 }
 
+bool IsValidAp(const std::string& ap) {
+  const size_t kMaxApSize = 256;
+  if (ap.size() > kMaxApSize)
+    return false;
+
+  return std::find_if_not(ap.begin(), ap.end(), [](char ch) {
+           if (base::IsAsciiAlpha(ch) || base::IsAsciiDigit(ch))
+             return true;
+
+           const char kSpecialChars[] = "+-_=";
+           for (auto c : kSpecialChars) {
+             if (c == ch)
+               return true;
+           }
+
+           return false;
+         }) == ap.end();
+}
+
 void RemoveUnsecureUrls(std::vector<GURL>* urls) {
   DCHECK(urls);
   urls->erase(std::remove_if(
diff --git a/components/update_client/utils.h b/components/update_client/utils.h
index af353f7..ce0efea 100644
--- a/components/update_client/utils.h
+++ b/components/update_client/utils.h
@@ -96,9 +96,12 @@
 bool VerifyFileHash256(const base::FilePath& filepath,
                        const std::string& expected_hash);
 
-// Returns true if the |brand| parameter matches ^([a-zA-Z]{4})?$ .
+// Returns true if the |brand| parameter matches ^[a-zA-Z]{4}?$ .
 bool IsValidBrand(const std::string& brand);
 
+// Returns true if the |ap| parameter matches ^[-+_=a-zA-Z0-9]{0,256}$ .
+bool IsValidAp(const std::string& ap);
+
 // Removes the unsecure urls in the |urls| parameter.
 void RemoveUnsecureUrls(std::vector<GURL>* urls);
 
diff --git a/components/update_client/utils_unittest.cc b/components/update_client/utils_unittest.cc
index b15fcac4..bd92460 100644
--- a/components/update_client/utils_unittest.cc
+++ b/components/update_client/utils_unittest.cc
@@ -57,20 +57,17 @@
           "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")));
 }
 
-// Tests that the brand matches ^([a-zA-Z]{4})?$
+// Tests that the brand matches ^[a-zA-Z]{4}?$
 TEST(UpdateClientUtils, IsValidBrand) {
+  // The valid brand code must be empty or exactly 4 chars long.
   EXPECT_TRUE(IsValidBrand(std::string("")));
-  EXPECT_TRUE(IsValidBrand(std::string("T")));
-  EXPECT_TRUE(IsValidBrand(std::string("TE")));
-  EXPECT_TRUE(IsValidBrand(std::string("TES")));
   EXPECT_TRUE(IsValidBrand(std::string("TEST")));
-  EXPECT_TRUE(IsValidBrand(std::string("")));
-  EXPECT_TRUE(IsValidBrand(std::string("t")));
-  EXPECT_TRUE(IsValidBrand(std::string("te")));
-  EXPECT_TRUE(IsValidBrand(std::string("tes")));
   EXPECT_TRUE(IsValidBrand(std::string("test")));
   EXPECT_TRUE(IsValidBrand(std::string("TEst")));
 
+  EXPECT_FALSE(IsValidBrand(std::string("T")));      // Too short.
+  EXPECT_FALSE(IsValidBrand(std::string("TE")));     //
+  EXPECT_FALSE(IsValidBrand(std::string("TES")));    //
   EXPECT_FALSE(IsValidBrand(std::string("TESTS")));  // Too long.
   EXPECT_FALSE(IsValidBrand(std::string("TES1")));   // Has digit.
   EXPECT_FALSE(IsValidBrand(std::string(" TES")));   // Begins with white space.
@@ -78,9 +75,35 @@
   EXPECT_FALSE(IsValidBrand(std::string("T ES")));   // Contains white space.
   EXPECT_FALSE(IsValidBrand(std::string("<TE")));    // Has <.
   EXPECT_FALSE(IsValidBrand(std::string("TE>")));    // Has >.
+  EXPECT_FALSE(IsValidAp(std::string("\"")));        // Has "
+  EXPECT_FALSE(IsValidAp(std::string("\\")));        // Has backslash.
   EXPECT_FALSE(IsValidBrand(std::string("\xaa")));   // Has non-ASCII char.
 }
 
+// Tests that the ap matches ^[-+_=a-zA-Z0-9]{0,256}$
+TEST(UpdateClientUtils, IsValidAp) {
+  EXPECT_TRUE(IsValidAp(std::string("a=1")));
+  EXPECT_TRUE(IsValidAp(std::string("")));
+  EXPECT_TRUE(IsValidAp(std::string("A")));
+  EXPECT_TRUE(IsValidAp(std::string("Z")));
+  EXPECT_TRUE(IsValidAp(std::string("a")));
+  EXPECT_TRUE(IsValidAp(std::string("z")));
+  EXPECT_TRUE(IsValidAp(std::string("0")));
+  EXPECT_TRUE(IsValidAp(std::string("9")));
+  EXPECT_TRUE(IsValidAp(std::string(256, 'a')));
+  EXPECT_TRUE(IsValidAp(std::string("-+_=")));
+
+  EXPECT_FALSE(IsValidAp(std::string(257, 'a')));  // Too long.
+  EXPECT_FALSE(IsValidAp(std::string(" ap")));     // Begins with white space.
+  EXPECT_FALSE(IsValidAp(std::string("ap ")));     // Ends with white space.
+  EXPECT_FALSE(IsValidAp(std::string("a p")));     // Contains white space.
+  EXPECT_FALSE(IsValidAp(std::string("<ap")));     // Has <.
+  EXPECT_FALSE(IsValidAp(std::string("ap>")));     // Has >.
+  EXPECT_FALSE(IsValidAp(std::string("\"")));      // Has "
+  EXPECT_FALSE(IsValidAp(std::string("\\")));      // Has backspace.
+  EXPECT_FALSE(IsValidAp(std::string("\xaa")));    // Has non-ASCII char.
+}
+
 TEST(UpdateClientUtils, RemoveUnsecureUrls) {
   const GURL test1[] = {GURL("http://foo"), GURL("https://foo")};
   std::vector<GURL> urls(std::begin(test1), std::end(test1));
diff --git a/components/user_prefs/tracked/pref_hash_calculator.cc b/components/user_prefs/tracked/pref_hash_calculator.cc
index 9e7a0d0d..2099121b 100644
--- a/components/user_prefs/tracked/pref_hash_calculator.cc
+++ b/components/user_prefs/tracked/pref_hash_calculator.cc
@@ -11,6 +11,7 @@
 #include "base/bind.h"
 #include "base/json/json_string_value_serializer.h"
 #include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/values.h"
diff --git a/components/wifi/network_properties.cc b/components/wifi/network_properties.cc
index 91aa5758..58b09b9 100644
--- a/components/wifi/network_properties.cc
+++ b/components/wifi/network_properties.cc
@@ -19,6 +19,8 @@
       frequency(kFrequencyUnknown) {
 }
 
+NetworkProperties::NetworkProperties(const NetworkProperties& other) = default;
+
 NetworkProperties::~NetworkProperties() {
 }
 
diff --git a/components/wifi/network_properties.h b/components/wifi/network_properties.h
index ae9a08d..734137b 100644
--- a/components/wifi/network_properties.h
+++ b/components/wifi/network_properties.h
@@ -32,6 +32,7 @@
 // |GetVisibleNetworks|.
 struct WIFI_EXPORT NetworkProperties {
   NetworkProperties();
+  NetworkProperties(const NetworkProperties& other);
   ~NetworkProperties();
 
   std::string connection_state;
diff --git a/components/wifi_sync/wifi_credential.cc b/components/wifi_sync/wifi_credential.cc
index 490cd7b..0970f26 100644
--- a/components/wifi_sync/wifi_credential.cc
+++ b/components/wifi_sync/wifi_credential.cc
@@ -13,6 +13,8 @@
 
 namespace wifi_sync {
 
+WifiCredential::WifiCredential(const WifiCredential& other) = default;
+
 WifiCredential::~WifiCredential() {
 }
 
diff --git a/components/wifi_sync/wifi_credential.h b/components/wifi_sync/wifi_credential.h
index da36426..bb63997 100644
--- a/components/wifi_sync/wifi_credential.h
+++ b/components/wifi_sync/wifi_credential.h
@@ -33,6 +33,7 @@
       WifiCredential,
       bool(*)(const WifiCredential&a, const WifiCredential& b)>;
 
+  WifiCredential(const WifiCredential& other);
   ~WifiCredential();
 
   // Creates a WifiCredential with the given |ssid|, |security_class|,
diff --git a/content/browser/compositor/browser_compositor_output_surface.h b/content/browser/compositor/browser_compositor_output_surface.h
index b3b9a4b..9ea5c719 100644
--- a/content/browser/compositor/browser_compositor_output_surface.h
+++ b/content/browser/compositor/browser_compositor_output_surface.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "build/build_config.h"
 #include "cc/output/output_surface.h"
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator_android.cc b/content/browser/compositor/browser_compositor_overlay_candidate_validator_android.cc
index 12e4a768..4ed6af6 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator_android.cc
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator_android.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/compositor/browser_compositor_overlay_candidate_validator_android.h"
 
+#include "base/memory/scoped_ptr.h"
 #include "cc/output/overlay_processor.h"
 #include "cc/output/overlay_strategy_underlay.h"
 #include "ui/gfx/geometry/rect_conversions.h"
diff --git a/content/browser/compositor/software_output_device_ozone.cc b/content/browser/compositor/software_output_device_ozone.cc
index 28e0d41..7de2de2 100644
--- a/content/browser/compositor/software_output_device_ozone.cc
+++ b/content/browser/compositor/software_output_device_ozone.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/memory/scoped_ptr.h"
 #include "content/browser/compositor/software_output_device_ozone.h"
 #include "ui/compositor/compositor.h"
 #include "ui/gfx/skia_util.h"
diff --git a/content/browser/compositor/software_output_device_ozone.h b/content/browser/compositor/software_output_device_ozone.h
index 3b2a295b..60476d81 100644
--- a/content/browser/compositor/software_output_device_ozone.h
+++ b/content/browser/compositor/software_output_device_ozone.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "cc/output/software_output_device.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/native_widget_types.h"
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 74072bb..ad34a7f 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -42,7 +42,7 @@
     base::File file,
     int64_t bytes_so_far,
     const std::string& hash_so_far,
-    scoped_ptr<crypto::SecureHash> hash_state) {
+    std::unique_ptr<crypto::SecureHash> hash_state) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   DCHECK(!detached_);
 
@@ -179,7 +179,7 @@
   Detach();
 }
 
-scoped_ptr<crypto::SecureHash> BaseFile::Finish() {
+std::unique_ptr<crypto::SecureHash> BaseFile::Finish() {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   Close();
   return std::move(secure_hash_);
@@ -252,7 +252,7 @@
   if (!hash_to_expect.empty()) {
     DCHECK_EQ(secure_hash_->GetHashLength(), hash_to_expect.size());
     DCHECK(buffer.size() >= secure_hash_->GetHashLength());
-    scoped_ptr<crypto::SecureHash> partial_hash(secure_hash_->Clone());
+    std::unique_ptr<crypto::SecureHash> partial_hash(secure_hash_->Clone());
     partial_hash->Finish(&buffer.front(), buffer.size());
 
     if (memcmp(&buffer.front(),
diff --git a/content/browser/download/base_file.h b/content/browser/download/base_file.h
index 139d43b..ec8d909 100644
--- a/content/browser/download/base_file.h
+++ b/content/browser/download/base_file.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/files/file.h"
@@ -16,7 +17,6 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/download_interrupt_reasons.h"
@@ -80,12 +80,13 @@
   //     non-zero). If specified, BaseFile will assume that the bytes up to
   //     |bytes_so_far| has been accurately hashed into |hash_state| and will
   //     ignore |hash_so_far|.
-  DownloadInterruptReason Initialize(const base::FilePath& full_path,
-                                     const base::FilePath& default_directory,
-                                     base::File file,
-                                     int64_t bytes_so_far,
-                                     const std::string& hash_so_far,
-                                     scoped_ptr<crypto::SecureHash> hash_state);
+  DownloadInterruptReason Initialize(
+      const base::FilePath& full_path,
+      const base::FilePath& default_directory,
+      base::File file,
+      int64_t bytes_so_far,
+      const std::string& hash_so_far,
+      std::unique_ptr<crypto::SecureHash> hash_state);
 
   // Write a new chunk of data to the file. Returns a DownloadInterruptReason
   // indicating the result of the operation.
@@ -112,7 +113,7 @@
   // Indicate that the download has finished. No new data will be received.
   // Returns the SecureHash object representing the state of the hash function
   // at the end of the operation.
-  scoped_ptr<crypto::SecureHash> Finish();
+  std::unique_ptr<crypto::SecureHash> Finish();
 
   // Informs the OS that this file came from the internet. Returns a
   // DownloadInterruptReason indicating the result of the operation.
@@ -213,7 +214,7 @@
   int64_t bytes_so_far_ = 0;
 
   // Used to calculate hash for the file when calculate_hash_ is set.
-  scoped_ptr<crypto::SecureHash> secure_hash_;
+  std::unique_ptr<crypto::SecureHash> secure_hash_;
 
   // Start time for calculating speed.
   base::TimeTicks start_tick_;
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index 8f2412b..a3008a9 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -92,13 +92,9 @@
   }
 
   bool InitializeFile() {
-    DownloadInterruptReason result =
-        base_file_->Initialize(base::FilePath(),
-                               temp_dir_.path(),
-                               base::File(),
-                               0,
-                               std::string(),
-                               scoped_ptr<crypto::SecureHash>());
+    DownloadInterruptReason result = base_file_->Initialize(
+        base::FilePath(), temp_dir_.path(), base::File(), 0, std::string(),
+        std::unique_ptr<crypto::SecureHash>());
     EXPECT_EQ(expected_error_, result);
     return result == DOWNLOAD_INTERRUPT_REASON_NONE;
   }
@@ -129,13 +125,10 @@
     base::FilePath file_name;
     BaseFile file((net::BoundNetLog()));
 
-    EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-              file.Initialize(base::FilePath(),
-                              temp_dir_.path(),
-                              base::File(),
-                              0,
-                              std::string(),
-                              scoped_ptr<crypto::SecureHash>()));
+    EXPECT_EQ(
+        DOWNLOAD_INTERRUPT_REASON_NONE,
+        file.Initialize(base::FilePath(), temp_dir_.path(), base::File(), 0,
+                        std::string(), std::unique_ptr<crypto::SecureHash>()));
     file_name = file.full_path();
     EXPECT_NE(base::FilePath::StringType(), file_name.value());
 
@@ -153,12 +146,9 @@
     EXPECT_NE(base::FilePath::StringType(), file_name.value());
     BaseFile duplicate_file((net::BoundNetLog()));
     EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-              duplicate_file.Initialize(file_name,
-                                        temp_dir_.path(),
-                                        base::File(),
-                                        0,
-                                        std::string(),
-                                        scoped_ptr<crypto::SecureHash>()));
+              duplicate_file.Initialize(file_name, temp_dir_.path(),
+                                        base::File(), 0, std::string(),
+                                        std::unique_ptr<crypto::SecureHash>()));
     // Write something into it.
     duplicate_file.AppendDataToFile(kTestData4, kTestDataLength4);
     // Detach the file so it isn't deleted on destruction of |duplicate_file|.
@@ -187,7 +177,7 @@
 
   template <size_t SZ>
   static void ExpectHashValue(const uint8_t (&expected_hash)[SZ],
-                              scoped_ptr<crypto::SecureHash> hash_state) {
+                              std::unique_ptr<crypto::SecureHash> hash_state) {
     std::vector<uint8_t> hash_value(hash_state->GetHashLength());
     hash_state->Finish(&hash_value.front(), hash_value.size());
     ASSERT_EQ(SZ, hash_value.size());
@@ -196,7 +186,7 @@
 
  protected:
   // BaseClass instance we are testing.
-  scoped_ptr<BaseFile> base_file_;
+  std::unique_ptr<BaseFile> base_file_;
 
   // Temporary directory for renamed downloads.
   base::ScopedTempDir temp_dir_;
@@ -299,7 +289,7 @@
   ASSERT_TRUE(AppendDataToFile(kTestData1));
   ASSERT_TRUE(AppendDataToFile(kTestData2));
   // Get the hash state and file name.
-  scoped_ptr<crypto::SecureHash> hash_state = base_file_->Finish();
+  std::unique_ptr<crypto::SecureHash> hash_state = base_file_->Finish();
 
   base::FilePath new_file_path(temp_dir_.path().Append(
       base::FilePath(FILE_PATH_LITERAL("second_file"))));
@@ -434,12 +424,9 @@
   base::File file(path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_READ);
   base_file_.reset(new BaseFile(net::BoundNetLog()));
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(path,
-                                   base::FilePath(),
-                                   std::move(file),
-                                   0,
+            base_file_->Initialize(path, base::FilePath(), std::move(file), 0,
                                    std::string(),
-                                   scoped_ptr<crypto::SecureHash>()));
+                                   std::unique_ptr<crypto::SecureHash>()));
 #if defined(OS_WIN)
   set_expected_error(DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED);
 #elif defined (OS_POSIX)
@@ -477,13 +464,11 @@
 
   // Use the file we've just created.
   base_file_.reset(new BaseFile(net::BoundNetLog()));
-  ASSERT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(existing_file_name,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength4,
-                                   std::string(),
-                                   scoped_ptr<crypto::SecureHash>()));
+  ASSERT_EQ(
+      DOWNLOAD_INTERRUPT_REASON_NONE,
+      base_file_->Initialize(existing_file_name, base::FilePath(), base::File(),
+                             kTestDataLength4, std::string(),
+                             std::unique_ptr<crypto::SecureHash>()));
 
   const base::FilePath file_name = base_file_->full_path();
   EXPECT_NE(base::FilePath::StringType(), file_name.value());
@@ -510,12 +495,9 @@
   // Try to overwrite it.
   base_file_.reset(new BaseFile(net::BoundNetLog()));
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED,
-            base_file_->Initialize(readonly_file_name,
-                                   base::FilePath(),
-                                   base::File(),
-                                   0,
-                                   std::string(),
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(readonly_file_name, base::FilePath(),
+                                   base::File(), 0, std::string(),
+                                   std::unique_ptr<crypto::SecureHash>()));
 
   expect_in_progress_ = false;
 
@@ -540,12 +522,9 @@
   std::string hash_so_far(std::begin(kHashOfTestData1),
                           std::end(kHashOfTestData1));
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength1,
-                                   hash_so_far,
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
+                                   kTestDataLength1, hash_so_far,
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_data(kTestData1);
   ASSERT_TRUE(AppendDataToFile(kTestData2));
   ASSERT_TRUE(AppendDataToFile(kTestData3));
@@ -559,12 +538,9 @@
   ASSERT_TRUE(base::WriteFile(file_path, kTestData1, kTestDataLength1));
 
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength1,
-                                   std::string(),
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
+                                   kTestDataLength1, std::string(),
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_data(kTestData1);
   ASSERT_TRUE(AppendDataToFile(kTestData2));
   ASSERT_TRUE(AppendDataToFile(kTestData3));
@@ -579,12 +555,9 @@
   std::string hash_so_far(std::begin(kHashOfTestData1),
                           std::end(kHashOfTestData1));
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength2,
-                                   hash_so_far,
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
+                                   kTestDataLength2, hash_so_far,
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_error(DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH);
 }
 
@@ -607,13 +580,11 @@
       0x41, 0x7c, 0xb3, 0x38, 0xd3, 0xf4, 0xe0, 0x78, 0x89, 0x46};
 
   ASSERT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
                                    big_buffer.size(),
                                    std::string(std::begin(kExpectedPartialHash),
                                                std::end(kExpectedPartialHash)),
-                                   scoped_ptr<crypto::SecureHash>()));
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_data(big_buffer);  // Contents of the file on Open.
   ASSERT_TRUE(AppendDataToFile(big_buffer));
   ExpectHashValue(kExpectedFullHash, base_file_->Finish());
@@ -632,13 +603,11 @@
       0x02, 0x12, 0xa4, 0x1e, 0x54, 0xb5, 0xe7, 0xc2, 0x8a, 0xe5};
 
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
                                    big_buffer.size(),
                                    std::string(std::begin(kExpectedPartialHash),
                                                std::end(kExpectedPartialHash)),
-                                   scoped_ptr<crypto::SecureHash>()));
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_error(DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH);
 }
 
@@ -648,12 +617,9 @@
   ASSERT_TRUE(base::WriteFile(file_path, kTestData1, kTestDataLength1));
 
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength1 + 1,
-                                   std::string(),
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
+                                   kTestDataLength1 + 1, std::string(),
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_error(DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT);
 }
 
@@ -668,12 +634,9 @@
   std::string hash_so_far(std::begin(kHashOfTestData1),
                           std::end(kHashOfTestData1));
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength1,
-                                   hash_so_far,
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
+                                   kTestDataLength1, hash_so_far,
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_data(kTestData1);  // Our starting position.
   ASSERT_TRUE(AppendDataToFile(kTestData2));
   ASSERT_TRUE(AppendDataToFile(kTestData3));
@@ -690,12 +653,9 @@
   ASSERT_TRUE(base::WriteFile(file_path, contents.data(), contents.size()));
 
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
-            base_file_->Initialize(file_path,
-                                   base::FilePath(),
-                                   base::File(),
-                                   kTestDataLength1,
-                                   std::string(),
-                                   scoped_ptr<crypto::SecureHash>()));
+            base_file_->Initialize(file_path, base::FilePath(), base::File(),
+                                   kTestDataLength1, std::string(),
+                                   std::unique_ptr<crypto::SecureHash>()));
   set_expected_data(kTestData1);
   ASSERT_TRUE(AppendDataToFile(kTestData2));
   ASSERT_TRUE(AppendDataToFile(kTestData3));
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 19a05a2..0e6d94f 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -122,11 +122,11 @@
 
 class DownloadFileWithDelay : public DownloadFileImpl {
  public:
-  DownloadFileWithDelay(scoped_ptr<DownloadSaveInfo> save_info,
+  DownloadFileWithDelay(std::unique_ptr<DownloadSaveInfo> save_info,
                         const base::FilePath& default_download_directory,
-                        scoped_ptr<ByteStreamReader> stream,
+                        std::unique_ptr<ByteStreamReader> stream,
                         const net::BoundNetLog& bound_net_log,
-                        scoped_ptr<PowerSaveBlocker> power_save_blocker,
+                        std::unique_ptr<PowerSaveBlocker> power_save_blocker,
                         base::WeakPtr<DownloadDestinationObserver> observer,
                         base::WeakPtr<DownloadFileWithDelayFactory> owner);
 
@@ -168,9 +168,9 @@
 
   // DownloadFileFactory interface.
   DownloadFile* CreateFile(
-      scoped_ptr<DownloadSaveInfo> save_info,
+      std::unique_ptr<DownloadSaveInfo> save_info,
       const base::FilePath& default_download_directory,
-      scoped_ptr<ByteStreamReader> stream,
+      std::unique_ptr<ByteStreamReader> stream,
       const net::BoundNetLog& bound_net_log,
       base::WeakPtr<DownloadDestinationObserver> observer) override;
 
@@ -189,11 +189,11 @@
 };
 
 DownloadFileWithDelay::DownloadFileWithDelay(
-    scoped_ptr<DownloadSaveInfo> save_info,
+    std::unique_ptr<DownloadSaveInfo> save_info,
     const base::FilePath& default_download_directory,
-    scoped_ptr<ByteStreamReader> stream,
+    std::unique_ptr<ByteStreamReader> stream,
     const net::BoundNetLog& bound_net_log,
-    scoped_ptr<PowerSaveBlocker> power_save_blocker,
+    std::unique_ptr<PowerSaveBlocker> power_save_blocker,
     base::WeakPtr<DownloadDestinationObserver> observer,
     base::WeakPtr<DownloadFileWithDelayFactory> owner)
     : DownloadFileImpl(std::move(save_info),
@@ -249,12 +249,12 @@
 DownloadFileWithDelayFactory::~DownloadFileWithDelayFactory() {}
 
 DownloadFile* DownloadFileWithDelayFactory::CreateFile(
-    scoped_ptr<DownloadSaveInfo> save_info,
+    std::unique_ptr<DownloadSaveInfo> save_info,
     const base::FilePath& default_download_directory,
-    scoped_ptr<ByteStreamReader> stream,
+    std::unique_ptr<ByteStreamReader> stream,
     const net::BoundNetLog& bound_net_log,
     base::WeakPtr<DownloadDestinationObserver> observer) {
-  scoped_ptr<PowerSaveBlocker> psb(PowerSaveBlocker::Create(
+  std::unique_ptr<PowerSaveBlocker> psb(PowerSaveBlocker::Create(
       PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
       PowerSaveBlocker::kReasonOther, "Download in progress"));
   return new DownloadFileWithDelay(std::move(save_info),
@@ -291,11 +291,11 @@
 
 class CountingDownloadFile : public DownloadFileImpl {
  public:
-  CountingDownloadFile(scoped_ptr<DownloadSaveInfo> save_info,
+  CountingDownloadFile(std::unique_ptr<DownloadSaveInfo> save_info,
                        const base::FilePath& default_downloads_directory,
-                       scoped_ptr<ByteStreamReader> stream,
+                       std::unique_ptr<ByteStreamReader> stream,
                        const net::BoundNetLog& bound_net_log,
-                       scoped_ptr<PowerSaveBlocker> power_save_blocker,
+                       std::unique_ptr<PowerSaveBlocker> power_save_blocker,
                        base::WeakPtr<DownloadDestinationObserver> observer)
       : DownloadFileImpl(std::move(save_info),
                          default_downloads_directory,
@@ -345,12 +345,12 @@
 
   // DownloadFileFactory interface.
   DownloadFile* CreateFile(
-      scoped_ptr<DownloadSaveInfo> save_info,
+      std::unique_ptr<DownloadSaveInfo> save_info,
       const base::FilePath& default_downloads_directory,
-      scoped_ptr<ByteStreamReader> stream,
+      std::unique_ptr<ByteStreamReader> stream,
       const net::BoundNetLog& bound_net_log,
       base::WeakPtr<DownloadDestinationObserver> observer) override {
-    scoped_ptr<PowerSaveBlocker> psb(PowerSaveBlocker::Create(
+    std::unique_ptr<PowerSaveBlocker> psb(PowerSaveBlocker::Create(
         PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
         PowerSaveBlocker::kReasonOther, "Download in progress"));
     return new CountingDownloadFile(std::move(save_info),
@@ -443,11 +443,12 @@
 }
 
 // Request handler to be used with CreateRedirectHandler().
-scoped_ptr<net::test_server::HttpResponse> HandleRequestAndSendRedirectResponse(
+std::unique_ptr<net::test_server::HttpResponse>
+HandleRequestAndSendRedirectResponse(
     const std::string& relative_url,
     const GURL& target_url,
     const net::test_server::HttpRequest& request) {
-  scoped_ptr<net::test_server::BasicHttpResponse> response;
+  std::unique_ptr<net::test_server::BasicHttpResponse> response;
   if (request.relative_url == relative_url) {
     response.reset(new net::test_server::BasicHttpResponse);
     response->set_code(net::HTTP_FOUND);
@@ -466,13 +467,14 @@
 }
 
 // Request handler to be used with CreateBasicResponseHandler().
-scoped_ptr<net::test_server::HttpResponse> HandleRequestAndSendBasicResponse(
+std::unique_ptr<net::test_server::HttpResponse>
+HandleRequestAndSendBasicResponse(
     const std::string& relative_url,
     const base::StringPairs& headers,
     const std::string& content_type,
     const std::string& body,
     const net::test_server::HttpRequest& request) {
-  scoped_ptr<net::test_server::BasicHttpResponse> response;
+  std::unique_ptr<net::test_server::BasicHttpResponse> response;
   if (request.relative_url == relative_url) {
     response.reset(new net::test_server::BasicHttpResponse);
     for (const auto& pair : headers)
@@ -548,7 +550,7 @@
   void SetUpOnMainThread() override {
     // Enable downloads resumption.
     base::FeatureList::ClearInstanceForTesting();
-    scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+    std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
     feature_list->InitializeFromCommandLine(features::kDownloadResumption.name,
                                             std::string());
     base::FeatureList::SetInstance(std::move(feature_list));
@@ -617,7 +619,8 @@
   // Note: Cannot be used with other alternative DownloadFileFactorys
   void SetupEnsureNoPendingDownloads() {
     DownloadManagerForShell(shell())->SetDownloadFileFactoryForTesting(
-        scoped_ptr<DownloadFileFactory>(new CountingDownloadFileFactory()));
+        std::unique_ptr<DownloadFileFactory>(
+            new CountingDownloadFileFactory()));
   }
 
   bool EnsureNoPendingDownloads() {
@@ -634,7 +637,7 @@
       Shell* shell,
       const GURL& url,
       DownloadItem::DownloadState expected_terminal_state) {
-    scoped_ptr<DownloadTestObserver> observer(CreateWaiter(shell, 1));
+    std::unique_ptr<DownloadTestObserver> observer(CreateWaiter(shell, 1));
     NavigateToURL(shell, url);
     observer->WaitForFinished();
     EXPECT_EQ(1u, observer->NumDownloadsSeenInState(expected_terminal_state));
@@ -671,7 +674,7 @@
 
   // Start a download and return the item.
   DownloadItem* StartDownloadAndReturnItem(Shell* shell, GURL url) {
-    scoped_ptr<DownloadCreateObserver> observer(
+    std::unique_ptr<DownloadCreateObserver> observer(
         new DownloadCreateObserver(DownloadManagerForShell(shell)));
     shell->LoadURL(url);
     return observer->WaitForFinished();
@@ -714,7 +717,7 @@
 
   // Location of the downloads directory for these tests
   base::ScopedTempDir downloads_directory_;
-  scoped_ptr<TestShellDownloadManagerDelegate> test_delegate_;
+  std::unique_ptr<TestShellDownloadManagerDelegate> test_delegate_;
 };
 
 }  // namespace
@@ -758,7 +761,7 @@
   ASSERT_EQ(DownloadItem::COMPLETE, download2->GetState());
 
   // Allow the first request to finish.
-  scoped_ptr<DownloadTestObserver> observer2(CreateWaiter(shell(), 1));
+  std::unique_ptr<DownloadTestObserver> observer2(CreateWaiter(shell(), 1));
   NavigateToURL(shell(),
                 GURL(net::URLRequestSlowDownloadJob::kFinishDownloadUrl));
   observer2->WaitForFinished();  // Wait for the third request.
@@ -812,7 +815,7 @@
       new DownloadFileWithDelayFactory();
   DownloadManagerImpl* download_manager(DownloadManagerForShell(shell()));
   download_manager->SetDownloadFileFactoryForTesting(
-      scoped_ptr<DownloadFileFactory>(file_factory));
+      std::unique_ptr<DownloadFileFactory>(file_factory));
 
   // Create a download
   NavigateToURL(shell(),
@@ -861,7 +864,7 @@
   DownloadFileWithDelayFactory* file_factory =
       new DownloadFileWithDelayFactory();
   download_manager->SetDownloadFileFactoryForTesting(
-      scoped_ptr<DownloadFileFactory>(file_factory));
+      std::unique_ptr<DownloadFileFactory>(file_factory));
 
   // Create a download
   NavigateToURL(shell(),
@@ -972,7 +975,7 @@
   DownloadFileWithDelayFactory* file_factory =
       new DownloadFileWithDelayFactory();
   download_manager->SetDownloadFileFactoryForTesting(
-      scoped_ptr<DownloadFileFactory>(file_factory));
+      std::unique_ptr<DownloadFileFactory>(file_factory));
 
   // Create a download
   NavigateToURL(shell(),
@@ -1617,7 +1620,7 @@
   // removed.
   TestDownloadRequestHandler request_handler;
   request_handler.StartServing(TestDownloadRequestHandler::Parameters());
-  scoped_ptr<DownloadTestObserver> completion_observer(
+  std::unique_ptr<DownloadTestObserver> completion_observer(
       CreateWaiter(shell(), 1));
   DownloadItem* download(
       StartDownloadAndReturnItem(shell(), request_handler.url()));
@@ -2233,10 +2236,10 @@
 
   // Download the file.
   SetupEnsureNoPendingDownloads();
-  scoped_ptr<DownloadUrlParameters> download_parameters(
+  std::unique_ptr<DownloadUrlParameters> download_parameters(
       DownloadUrlParameters::FromWebContents(shell()->web_contents(),
                                              origin_two.GetURL("/bar")));
-  scoped_ptr<DownloadTestObserver> observer(CreateWaiter(shell(), 1));
+  std::unique_ptr<DownloadTestObserver> observer(CreateWaiter(shell(), 1));
   DownloadManagerForShell(shell())->DownloadUrl(std::move(download_parameters));
   observer->WaitForFinished();
 
diff --git a/content/browser/download/download_create_info.cc b/content/browser/download/download_create_info.cc
index 92b15849..cbfb20c4 100644
--- a/content/browser/download/download_create_info.cc
+++ b/content/browser/download/download_create_info.cc
@@ -7,13 +7,15 @@
 #include <string>
 
 #include "base/format_macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 
 namespace content {
 
-DownloadCreateInfo::DownloadCreateInfo(const base::Time& start_time,
-                                       const net::BoundNetLog& bound_net_log,
-                                       scoped_ptr<DownloadSaveInfo> save_info)
+DownloadCreateInfo::DownloadCreateInfo(
+    const base::Time& start_time,
+    const net::BoundNetLog& bound_net_log,
+    std::unique_ptr<DownloadSaveInfo> save_info)
     : download_id(DownloadItem::kInvalidId),
       start_time(start_time),
       total_bytes(0),
@@ -26,7 +28,7 @@
 DownloadCreateInfo::DownloadCreateInfo()
     : DownloadCreateInfo(base::Time(),
                          net::BoundNetLog(),
-                         make_scoped_ptr(new DownloadSaveInfo)) {}
+                         base::WrapUnique(new DownloadSaveInfo)) {}
 
 DownloadCreateInfo::~DownloadCreateInfo() {}
 
diff --git a/content/browser/download/download_create_info.h b/content/browser/download/download_create_info.h
index 01e1ad5f..794b3c6 100644
--- a/content/browser/download/download_create_info.h
+++ b/content/browser/download/download_create_info.h
@@ -29,7 +29,7 @@
 struct CONTENT_EXPORT DownloadCreateInfo {
   DownloadCreateInfo(const base::Time& start_time,
                      const net::BoundNetLog& bound_net_log,
-                     scoped_ptr<DownloadSaveInfo> save_info);
+                     std::unique_ptr<DownloadSaveInfo> save_info);
   DownloadCreateInfo();
   ~DownloadCreateInfo();
 
@@ -73,10 +73,10 @@
   DownloadInterruptReason result;
 
   // The download file save info.
-  scoped_ptr<DownloadSaveInfo> save_info;
+  std::unique_ptr<DownloadSaveInfo> save_info;
 
   // The handle to the URLRequest sourcing this download.
-  scoped_ptr<DownloadRequestHandleInterface> request_handle;
+  std::unique_ptr<DownloadRequestHandleInterface> request_handle;
 
   // The request's |BoundNetLog|, for "source_dependency" linking with the
   // download item's.
diff --git a/content/browser/download/download_destination_observer.h b/content/browser/download/download_destination_observer.h
index 6f76391e..5bde275 100644
--- a/content/browser/download/download_destination_observer.h
+++ b/content/browser/download/download_destination_observer.h
@@ -7,9 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "content/public/browser/download_interrupt_reasons.h"
 #include "crypto/secure_hash.h"
 
@@ -30,13 +30,14 @@
   virtual void DestinationUpdate(int64_t bytes_so_far,
                                  int64_t bytes_per_sec) = 0;
 
-  virtual void DestinationError(DownloadInterruptReason reason,
-                                int64_t bytes_so_far,
-                                scoped_ptr<crypto::SecureHash> hash_state) = 0;
+  virtual void DestinationError(
+      DownloadInterruptReason reason,
+      int64_t bytes_so_far,
+      std::unique_ptr<crypto::SecureHash> hash_state) = 0;
 
   virtual void DestinationCompleted(
       int64_t total_bytes,
-      scoped_ptr<crypto::SecureHash> hash_state) = 0;
+      std::unique_ptr<crypto::SecureHash> hash_state) = 0;
 };
 
 }  // namespace content
diff --git a/content/browser/download/download_file_factory.cc b/content/browser/download/download_file_factory.cc
index 55e0346..d73345c 100644
--- a/content/browser/download/download_file_factory.cc
+++ b/content/browser/download/download_file_factory.cc
@@ -13,9 +13,9 @@
 DownloadFileFactory::~DownloadFileFactory() {}
 
 DownloadFile* DownloadFileFactory::CreateFile(
-    scoped_ptr<DownloadSaveInfo> save_info,
+    std::unique_ptr<DownloadSaveInfo> save_info,
     const base::FilePath& default_downloads_directory,
-    scoped_ptr<ByteStreamReader> byte_stream,
+    std::unique_ptr<ByteStreamReader> byte_stream,
     const net::BoundNetLog& bound_net_log,
     base::WeakPtr<DownloadDestinationObserver> observer) {
   return new DownloadFileImpl(std::move(save_info),
diff --git a/content/browser/download/download_file_factory.h b/content/browser/download/download_file_factory.h
index d29384dd..8e32b30 100644
--- a/content/browser/download/download_file_factory.h
+++ b/content/browser/download/download_file_factory.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_
 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_FACTORY_H_
 
+#include <memory>
+
 #include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "url/gurl.h"
@@ -34,9 +35,9 @@
   virtual ~DownloadFileFactory();
 
   virtual DownloadFile* CreateFile(
-      scoped_ptr<DownloadSaveInfo> save_info,
+      std::unique_ptr<DownloadSaveInfo> save_info,
       const base::FilePath& default_downloads_directory,
-      scoped_ptr<ByteStreamReader> byte_stream,
+      std::unique_ptr<ByteStreamReader> byte_stream,
       const net::BoundNetLog& bound_net_log,
       base::WeakPtr<DownloadDestinationObserver> observer);
 };
diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
index 6378b9c..b8a3e39 100644
--- a/content/browser/download/download_file_impl.cc
+++ b/content/browser/download/download_file_impl.cc
@@ -37,9 +37,9 @@
 const int kMaxRenameRetries = 3;
 
 DownloadFileImpl::DownloadFileImpl(
-    scoped_ptr<DownloadSaveInfo> save_info,
+    std::unique_ptr<DownloadSaveInfo> save_info,
     const base::FilePath& default_download_directory,
-    scoped_ptr<ByteStreamReader> stream,
+    std::unique_ptr<ByteStreamReader> stream,
     const net::BoundNetLog& bound_net_log,
     base::WeakPtr<DownloadDestinationObserver> observer)
     : file_(bound_net_log),
@@ -104,7 +104,7 @@
 void DownloadFileImpl::RenameAndUniquify(
     const base::FilePath& full_path,
     const RenameCompletionCallback& callback) {
-  scoped_ptr<RenameParameters> parameters(
+  std::unique_ptr<RenameParameters> parameters(
       new RenameParameters(UNIQUIFY, full_path, callback));
   RenameWithRetryInternal(std::move(parameters));
 }
@@ -115,7 +115,7 @@
     const GURL& source_url,
     const GURL& referrer_url,
     const RenameCompletionCallback& callback) {
-  scoped_ptr<RenameParameters> parameters(new RenameParameters(
+  std::unique_ptr<RenameParameters> parameters(new RenameParameters(
       ANNOTATE_WITH_SOURCE_INFORMATION, full_path, callback));
   parameters->client_guid = client_guid;
   parameters->source_url = source_url;
@@ -139,7 +139,7 @@
 }
 
 void DownloadFileImpl::RenameWithRetryInternal(
-    scoped_ptr<RenameParameters> parameters) {
+    std::unique_ptr<RenameParameters> parameters) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
 
   base::FilePath new_path = parameters->new_path;
@@ -299,7 +299,7 @@
     stream_reader_->RegisterCallback(base::Closure());
     weak_factory_.InvalidateWeakPtrs();
     SendUpdate();  // Make info up to date before error.
-    scoped_ptr<crypto::SecureHash> hash_state = file_.Finish();
+    std::unique_ptr<crypto::SecureHash> hash_state = file_.Finish();
     BrowserThread::PostTask(
         BrowserThread::UI,
         FROM_HERE,
@@ -313,7 +313,7 @@
     stream_reader_->RegisterCallback(base::Closure());
     weak_factory_.InvalidateWeakPtrs();
     SendUpdate();
-    scoped_ptr<crypto::SecureHash> hash_state = file_.Finish();
+    std::unique_ptr<crypto::SecureHash> hash_state = file_.Finish();
     BrowserThread::PostTask(
         BrowserThread::UI,
         FROM_HERE,
diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h
index 93b1e55..c171336a 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -10,10 +10,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -39,9 +40,9 @@
   // Note that the DownloadFileImpl automatically reads from the passed in
   // stream, and sends updates and status of those reads to the
   // DownloadDestinationObserver.
-  DownloadFileImpl(scoped_ptr<DownloadSaveInfo> save_info,
+  DownloadFileImpl(std::unique_ptr<DownloadSaveInfo> save_info,
                    const base::FilePath& default_downloads_directory,
-                   scoped_ptr<ByteStreamReader> byte_stream,
+                   std::unique_ptr<ByteStreamReader> byte_stream,
                    const net::BoundNetLog& bound_net_log,
                    base::WeakPtr<DownloadDestinationObserver> observer);
 
@@ -103,7 +104,7 @@
   };
 
   // Rename file_ based on |parameters|.
-  void RenameWithRetryInternal(scoped_ptr<RenameParameters> parameters);
+  void RenameWithRetryInternal(std::unique_ptr<RenameParameters> parameters);
 
   // Send an update on our progress.
   void SendUpdate();
@@ -118,7 +119,7 @@
   // DownloadSaveInfo provided during construction. Since the DownloadFileImpl
   // can be created on any thread, this holds the save_info_ until it can be
   // used to initialize file_ on the FILE thread.
-  scoped_ptr<DownloadSaveInfo> save_info_;
+  std::unique_ptr<DownloadSaveInfo> save_info_;
 
   // The default directory for creating the download file.
   base::FilePath default_download_directory_;
@@ -127,10 +128,10 @@
   // TODO(rdsmith): Move this into BaseFile; requires using the same
   // stream semantics in SavePackage.  Alternatively, replace SaveFile
   // with DownloadFile and get rid of BaseFile.
-  scoped_ptr<ByteStreamReader> stream_reader_;
+  std::unique_ptr<ByteStreamReader> stream_reader_;
 
   // Used to trigger progress updates.
-  scoped_ptr<base::RepeatingTimer> update_timer_;
+  std::unique_ptr<base::RepeatingTimer> update_timer_;
 
   // Statistics
   size_t bytes_seen_;
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index d24eeb8..2219321 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -66,15 +66,16 @@
 class MockDownloadDestinationObserver : public DownloadDestinationObserver {
  public:
   MOCK_METHOD2(DestinationUpdate, void(int64_t, int64_t));
-  void DestinationError(DownloadInterruptReason reason,
-                        int64_t bytes_so_far,
-                        scoped_ptr<crypto::SecureHash> hash_state) override {
+  void DestinationError(
+      DownloadInterruptReason reason,
+      int64_t bytes_so_far,
+      std::unique_ptr<crypto::SecureHash> hash_state) override {
     MockDestinationError(
         reason, bytes_so_far, GetHexEncodedHashValue(hash_state.get()));
   }
   void DestinationCompleted(
       int64_t total_bytes,
-      scoped_ptr<crypto::SecureHash> hash_state) override {
+      std::unique_ptr<crypto::SecureHash> hash_state) override {
     MockDestinationCompleted(total_bytes,
                              GetHexEncodedHashValue(hash_state.get()));
   }
@@ -97,9 +98,9 @@
 // retries renames failed due to ACCESS_DENIED.
 class TestDownloadFileImpl : public DownloadFileImpl {
  public:
-  TestDownloadFileImpl(scoped_ptr<DownloadSaveInfo> save_info,
+  TestDownloadFileImpl(std::unique_ptr<DownloadSaveInfo> save_info,
                        const base::FilePath& default_downloads_directory,
-                       scoped_ptr<ByteStreamReader> stream,
+                       std::unique_ptr<ByteStreamReader> stream,
                        const net::BoundNetLog& bound_net_log,
                        base::WeakPtr<DownloadDestinationObserver> observer)
       : DownloadFileImpl(std::move(save_info),
@@ -187,13 +188,11 @@
         .WillOnce(Invoke(this, &DownloadFileTest::RegisterCallback))
         .RetiresOnSaturation();
 
-    scoped_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo());
-    download_file_.reset(
-        new TestDownloadFileImpl(std::move(save_info),
-                                 base::FilePath(),
-                                 scoped_ptr<ByteStreamReader>(input_stream_),
-                                 net::BoundNetLog(),
-                                 observer_factory_.GetWeakPtr()));
+    std::unique_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo());
+    download_file_.reset(new TestDownloadFileImpl(
+        std::move(save_info), base::FilePath(),
+        std::unique_ptr<ByteStreamReader>(input_stream_), net::BoundNetLog(),
+        observer_factory_.GetWeakPtr()));
 
     EXPECT_CALL(*input_stream_, Read(_, _))
         .WillOnce(Return(ByteStreamReader::STREAM_EMPTY))
@@ -355,11 +354,11 @@
     return result_reason;
   }
 
-  scoped_ptr<StrictMock<MockDownloadDestinationObserver> > observer_;
+  std::unique_ptr<StrictMock<MockDownloadDestinationObserver>> observer_;
   base::WeakPtrFactory<DownloadDestinationObserver> observer_factory_;
 
   // DownloadFile instance we are testing.
-  scoped_ptr<DownloadFile> download_file_;
+  std::unique_ptr<DownloadFile> download_file_;
 
   // Stream for sending data into the download file.
   // Owned by download_file_; will be alive for lifetime of download_file_.
diff --git a/content/browser/download/download_item_factory.h b/content/browser/download/download_item_factory.h
index caf8ef8..2ccb2cb 100644
--- a/content/browser/download/download_item_factory.h
+++ b/content/browser/download/download_item_factory.h
@@ -11,10 +11,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "content/public/browser/download_item.h"
 
 class GURL;
@@ -74,7 +74,7 @@
       const base::FilePath& path,
       const GURL& url,
       const std::string& mime_type,
-      scoped_ptr<DownloadRequestHandleInterface> request_handle,
+      std::unique_ptr<DownloadRequestHandleInterface> request_handle,
       const net::BoundNetLog& bound_net_log) = 0;
 };
 
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 08d9039..2794afe7 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -31,6 +31,7 @@
 #include "base/format_macros.h"
 #include "base/guid.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
@@ -81,14 +82,14 @@
 // takes ownership of the DownloadFile and hence implicitly destroys it
 // at the end of the function.
 static base::FilePath DownloadFileDetach(
-    scoped_ptr<DownloadFile> download_file) {
+    std::unique_ptr<DownloadFile> download_file) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   base::FilePath full_path = download_file->FullPath();
   download_file->Detach();
   return full_path;
 }
 
-static void DownloadFileCancel(scoped_ptr<DownloadFile> download_file) {
+static void DownloadFileCancel(std::unique_ptr<DownloadFile> download_file) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   download_file->Cancel();
 }
@@ -210,7 +211,7 @@
     const base::FilePath& path,
     const GURL& url,
     const std::string& mime_type,
-    scoped_ptr<DownloadRequestHandleInterface> request_handle,
+    std::unique_ptr<DownloadRequestHandleInterface> request_handle,
     const net::BoundNetLog& bound_net_log)
     : is_save_package_download_(true),
       request_handle_(std::move(request_handle)),
@@ -997,7 +998,7 @@
 
 void DownloadItemImpl::OnAllDataSaved(
     int64_t total_bytes,
-    scoped_ptr<crypto::SecureHash> hash_state) {
+    std::unique_ptr<crypto::SecureHash> hash_state) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(!all_data_saved_);
   all_data_saved_ = true;
@@ -1051,7 +1052,7 @@
 void DownloadItemImpl::DestinationError(
     DownloadInterruptReason reason,
     int64_t bytes_so_far,
-    scoped_ptr<crypto::SecureHash> secure_hash) {
+    std::unique_ptr<crypto::SecureHash> secure_hash) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   // If the download is in any other state we don't expect any
   // DownloadDestinationObserver callbacks. An interruption or a cancellation
@@ -1078,7 +1079,7 @@
 
 void DownloadItemImpl::DestinationCompleted(
     int64_t total_bytes,
-    scoped_ptr<crypto::SecureHash> secure_hash) {
+    std::unique_ptr<crypto::SecureHash> secure_hash) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   // If the download is in any other state we don't expect any
   // DownloadDestinationObserver callbacks. An interruption or a cancellation
@@ -1131,8 +1132,8 @@
 
 // We're starting the download.
 void DownloadItemImpl::Start(
-    scoped_ptr<DownloadFile> file,
-    scoped_ptr<DownloadRequestHandleInterface> req_handle,
+    std::unique_ptr<DownloadFile> file,
+    std::unique_ptr<DownloadRequestHandleInterface> req_handle,
     const DownloadCreateInfo& new_create_info) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(!download_file_.get());
@@ -1172,10 +1173,10 @@
     DCHECK(new_create_info.save_info);
 
     int64_t offset = new_create_info.save_info->offset;
-    scoped_ptr<crypto::SecureHash> hash_state =
-        make_scoped_ptr(new_create_info.save_info->hash_state
-                            ? new_create_info.save_info->hash_state->Clone()
-                            : nullptr);
+    std::unique_ptr<crypto::SecureHash> hash_state =
+        base::WrapUnique(new_create_info.save_info->hash_state
+                             ? new_create_info.save_info->hash_state->Clone()
+                             : nullptr);
 
     // Interrupted downloads also need a target path.
     if (target_path_.empty()) {
@@ -1511,12 +1512,12 @@
 
 void DownloadItemImpl::InterruptAndDiscardPartialState(
     DownloadInterruptReason reason) {
-  InterruptWithPartialState(0, scoped_ptr<crypto::SecureHash>(), reason);
+  InterruptWithPartialState(0, std::unique_ptr<crypto::SecureHash>(), reason);
 }
 
 void DownloadItemImpl::InterruptWithPartialState(
     int64_t bytes_so_far,
-    scoped_ptr<crypto::SecureHash> hash_state,
+    std::unique_ptr<crypto::SecureHash> hash_state,
     DownloadInterruptReason reason) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK_NE(DOWNLOAD_INTERRUPT_REASON_NONE, reason);
@@ -1642,14 +1643,15 @@
     total_bytes_ = 0;
 }
 
-void DownloadItemImpl::SetHashState(scoped_ptr<crypto::SecureHash> hash_state) {
+void DownloadItemImpl::SetHashState(
+    std::unique_ptr<crypto::SecureHash> hash_state) {
   hash_state_ = std::move(hash_state);
   if (!hash_state_) {
     hash_.clear();
     return;
   }
 
-  scoped_ptr<crypto::SecureHash> clone_of_hash_state(hash_state_->Clone());
+  std::unique_ptr<crypto::SecureHash> clone_of_hash_state(hash_state_->Clone());
   std::vector<char> hash_value(clone_of_hash_state->GetHashLength());
   clone_of_hash_state->Finish(&hash_value.front(), hash_value.size());
   hash_.assign(hash_value.begin(), hash_value.end());
@@ -1898,8 +1900,9 @@
   // are consistently routed through the no-renderer code paths so that the
   // request will not be dropped if the WebContents (and by extension, the
   // associated renderer) goes away before a response is received.
-  scoped_ptr<DownloadUrlParameters> download_params(new DownloadUrlParameters(
-      GetURL(), -1, -1, -1, GetBrowserContext()->GetResourceContext()));
+  std::unique_ptr<DownloadUrlParameters> download_params(
+      new DownloadUrlParameters(GetURL(), -1, -1, -1,
+                                GetBrowserContext()->GetResourceContext()));
   download_params->set_file_path(GetFullPath());
   download_params->set_offset(GetReceivedBytes());
   download_params->set_last_modified(GetLastModifiedTime());
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index a6afdd8..be9a2c3 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback_forward.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/time/time.h"
@@ -84,13 +84,14 @@
 
   // Constructing for the "Save Page As..." feature:
   // |bound_net_log| is constructed externally for our use.
-  DownloadItemImpl(DownloadItemImplDelegate* delegate,
-                   uint32_t id,
-                   const base::FilePath& path,
-                   const GURL& url,
-                   const std::string& mime_type,
-                   scoped_ptr<DownloadRequestHandleInterface> request_handle,
-                   const net::BoundNetLog& bound_net_log);
+  DownloadItemImpl(
+      DownloadItemImplDelegate* delegate,
+      uint32_t id,
+      const base::FilePath& path,
+      const GURL& url,
+      const std::string& mime_type,
+      std::unique_ptr<DownloadRequestHandleInterface> request_handle,
+      const net::BoundNetLog& bound_net_log);
 
   ~DownloadItemImpl() override;
 
@@ -180,8 +181,8 @@
   // parameters. It may be different from the DownloadCreateInfo used to create
   // the DownloadItem if Start() is being called in response for a download
   // resumption request.
-  virtual void Start(scoped_ptr<DownloadFile> download_file,
-                     scoped_ptr<DownloadRequestHandleInterface> req_handle,
+  virtual void Start(std::unique_ptr<DownloadFile> download_file,
+                     std::unique_ptr<DownloadRequestHandleInterface> req_handle,
                      const DownloadCreateInfo& new_create_info);
 
   // Needed because of intertwining with DownloadManagerImpl -------------------
@@ -208,7 +209,7 @@
   virtual void SetTotalBytes(int64_t total_bytes);
 
   virtual void OnAllDataSaved(int64_t total_bytes,
-                              scoped_ptr<crypto::SecureHash> hash_state);
+                              std::unique_ptr<crypto::SecureHash> hash_state);
 
   // Called by SavePackage to display progress when the DownloadItem
   // should be considered complete.
@@ -216,11 +217,13 @@
 
   // DownloadDestinationObserver
   void DestinationUpdate(int64_t bytes_so_far, int64_t bytes_per_sec) override;
-  void DestinationError(DownloadInterruptReason reason,
-                        int64_t bytes_so_far,
-                        scoped_ptr<crypto::SecureHash> hash_state) override;
-  void DestinationCompleted(int64_t total_bytes,
-                            scoped_ptr<crypto::SecureHash> hash_state) override;
+  void DestinationError(
+      DownloadInterruptReason reason,
+      int64_t bytes_so_far,
+      std::unique_ptr<crypto::SecureHash> hash_state) override;
+  void DestinationCompleted(
+      int64_t total_bytes,
+      std::unique_ptr<crypto::SecureHash> hash_state) override;
 
  private:
   // Fine grained states of a download.
@@ -440,13 +443,13 @@
   // interrupt reason allows, this partial state may be allowed to continue the
   // interrupted download upon resumption.
   void InterruptWithPartialState(int64_t bytes_so_far,
-                                 scoped_ptr<crypto::SecureHash> hash_state,
+                                 std::unique_ptr<crypto::SecureHash> hash_state,
                                  DownloadInterruptReason reason);
 
   void UpdateProgress(int64_t bytes_so_far, int64_t bytes_per_sec);
 
   // Set |hash_| and |hash_state_| based on |hash_state|.
-  void SetHashState(scoped_ptr<crypto::SecureHash> hash_state);
+  void SetHashState(std::unique_ptr<crypto::SecureHash> hash_state);
 
   // Destroy the DownloadFile object.  If |destroy_file| is true, the file is
   // destroyed with it.  Otherwise, DownloadFile::Detach() is called before
@@ -497,7 +500,7 @@
 
   // The handle to the request information.  Used for operations outside the
   // download system.
-  scoped_ptr<DownloadRequestHandleInterface> request_handle_;
+  std::unique_ptr<DownloadRequestHandleInterface> request_handle_;
 
   std::string guid_;
 
@@ -622,7 +625,7 @@
   // pointer may only be used or destroyed on the FILE thread.
   // This pointer will be non-null only while the DownloadItem is in
   // the IN_PROGRESS state.
-  scoped_ptr<DownloadFile> download_file_;
+  std::unique_ptr<DownloadFile> download_file_;
 
   // Full path to the downloaded or downloading file. This is the path to the
   // physical file, if one exists. The final target path is specified by
@@ -657,7 +660,7 @@
   // In the event of an interruption, the DownloadDestinationObserver interface
   // exposes the partial hash state. This state can be held by the download item
   // in case it's needed for resumption.
-  scoped_ptr<crypto::SecureHash> hash_state_;
+  std::unique_ptr<crypto::SecureHash> hash_state_;
 
   // Contents of the Last-Modified header for the most recent server response.
   std::string last_modified_time_;
diff --git a/content/browser/download/download_item_impl_delegate.cc b/content/browser/download/download_item_impl_delegate.cc
index be743259..96be706 100644
--- a/content/browser/download/download_item_impl_delegate.cc
+++ b/content/browser/download/download_item_impl_delegate.cc
@@ -62,7 +62,7 @@
 }
 
 void DownloadItemImplDelegate::ResumeInterruptedDownload(
-    scoped_ptr<DownloadUrlParameters> params,
+    std::unique_ptr<DownloadUrlParameters> params,
     uint32_t id) {}
 
 BrowserContext* DownloadItemImplDelegate::GetBrowserContext() const {
diff --git a/content/browser/download/download_item_impl_delegate.h b/content/browser/download/download_item_impl_delegate.h
index 8dd9d8cb..84ce8d0 100644
--- a/content/browser/download/download_item_impl_delegate.h
+++ b/content/browser/download/download_item_impl_delegate.h
@@ -76,7 +76,7 @@
 
   // Called when an interrupted download is resumed.
   virtual void ResumeInterruptedDownload(
-      scoped_ptr<content::DownloadUrlParameters> params,
+      std::unique_ptr<content::DownloadUrlParameters> params,
       uint32_t id);
 
   // For contextual issues like language and prefs.
diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc
index 45c822c..a861ad2 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -73,7 +73,7 @@
   MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&));
   MOCK_METHOD1(CheckForFileRemoval, void(DownloadItemImpl*));
 
-  void ResumeInterruptedDownload(scoped_ptr<DownloadUrlParameters> params,
+  void ResumeInterruptedDownload(std::unique_ptr<DownloadUrlParameters> params,
                                  uint32_t id) override {
     MockResumeInterruptedDownload(params.get(), id);
   }
@@ -247,14 +247,14 @@
   DownloadItemTest()
       : delegate_(), next_download_id_(DownloadItem::kInvalidId + 1) {
     base::FeatureList::ClearInstanceForTesting();
-    scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+    std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
     feature_list->InitializeFromCommandLine(features::kDownloadResumption.name,
                                             std::string());
     base::FeatureList::SetInstance(std::move(feature_list));
 
     create_info_.reset(new DownloadCreateInfo());
     create_info_->save_info =
-        scoped_ptr<DownloadSaveInfo>(new DownloadSaveInfo());
+        std::unique_ptr<DownloadSaveInfo>(new DownloadSaveInfo());
     create_info_->save_info->prompt_for_save_location = false;
     create_info_->url_chain.push_back(GURL("http://example.com/download"));
     create_info_->etag = "SomethingToSatisfyResumption";
@@ -266,7 +266,7 @@
   }
 
   DownloadItemImpl* CreateDownloadItemWithCreateInfo(
-      scoped_ptr<DownloadCreateInfo> info) {
+      std::unique_ptr<DownloadCreateInfo> info) {
     DownloadItemImpl* download = new DownloadItemImpl(
         &delegate_, next_download_id_++, *(info.get()), net::BoundNetLog());
     allocated_downloads_.insert(download);
@@ -291,7 +291,7 @@
       DownloadItemImpl* item,
       DownloadItemImplDelegate::DownloadTargetCallback* callback) {
     MockDownloadFile* mock_download_file = nullptr;
-    scoped_ptr<DownloadFile> download_file;
+    std::unique_ptr<DownloadFile> download_file;
     if (callback) {
       EXPECT_CALL(*mock_delegate(), DetermineDownloadTarget(item, _))
           .WillOnce(SaveArg<1>(callback));
@@ -309,7 +309,7 @@
           .WillRepeatedly(ReturnRefOfCopy(base::FilePath()));
     }
 
-    scoped_ptr<MockRequestHandle> request_handle(
+    std::unique_ptr<MockRequestHandle> request_handle(
         new NiceMock<MockRequestHandle>);
     item->Start(std::move(download_file), std::move(request_handle),
                 *create_info_);
@@ -361,7 +361,7 @@
     EXPECT_CALL(*download_file, Detach());
 
     item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-        0, scoped_ptr<crypto::SecureHash>());
+        0, std::unique_ptr<crypto::SecureHash>());
     RunAllPendingInMessageLoops();
   }
 
@@ -404,7 +404,7 @@
  private:
   StrictMock<MockDelegate> delegate_;
   std::set<DownloadItem*> allocated_downloads_;
-  scoped_ptr<DownloadCreateInfo> create_info_;
+  std::unique_ptr<DownloadCreateInfo> create_info_;
   uint32_t next_download_id_ = DownloadItem::kInvalidId + 1;
   TestBrowserContext browser_context_;
   TestBrowserThreadBundle thread_bundle_;
@@ -480,9 +480,8 @@
       .Times(0);
 
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_TRUE(observer.CheckAndResetDownloadUpdated());
 }
 
@@ -509,9 +508,8 @@
       .WillRepeatedly(Return(browser_context()));
   EXPECT_CALL(*mock_delegate(), MockResumeInterruptedDownload(_, _)).Times(1);
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_TRUE(observer.CheckAndResetDownloadUpdated());
   // Since the download is resumed automatically, the interrupt count doesn't
   // increase.
@@ -540,9 +538,8 @@
   // Interrupt the download, using a restartable interrupt.
   EXPECT_CALL(*download_file, Cancel());
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_TRUE(observer.CheckAndResetDownloadUpdated());
   // Should not try to auto-resume.
   ASSERT_EQ(1, observer.interrupt_count());
@@ -570,7 +567,7 @@
 
   // Complete download to trigger final rename.
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
 
   ASSERT_TRUE(observer.CheckAndResetDownloadUpdated());
@@ -587,9 +584,9 @@
       item->DestinationObserverAsWeakPtr());
   TestDownloadItemObserver observer(item);
   MockDownloadFile* mock_download_file(nullptr);
-  scoped_ptr<DownloadFile> download_file;
+  std::unique_ptr<DownloadFile> download_file;
   MockRequestHandle* mock_request_handle(nullptr);
-  scoped_ptr<DownloadRequestHandleInterface> request_handle;
+  std::unique_ptr<DownloadRequestHandleInterface> request_handle;
   DownloadItemImplDelegate::DownloadTargetCallback callback;
 
   EXPECT_CALL(*mock_delegate(), DetermineDownloadTarget(item, _))
@@ -631,9 +628,8 @@
 
     // Use a continuable interrupt.
     item->DestinationObserverAsWeakPtr()->DestinationError(
-        DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
-        0,
-        scoped_ptr<crypto::SecureHash>());
+        DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, 0,
+        std::unique_ptr<crypto::SecureHash>());
 
     RunAllPendingInMessageLoops();
     ::testing::Mock::VerifyAndClearExpectations(mock_download_file);
@@ -670,9 +666,8 @@
       .WillRepeatedly(Return(browser_context()));
   EXPECT_CALL(*download_file, Detach());
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, 0,
+      std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
   EXPECT_EQ(DownloadItem::IN_PROGRESS, item->GetState());
 
@@ -726,9 +721,8 @@
                                     _))
       .Times(1);
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, 0,
+      std::unique_ptr<crypto::SecureHash>());
 
   // Test expectations verify that ResumeInterruptedDownload() is called (by way
   // of MockResumeInterruptedDownload) after the download is interrupted. But
@@ -762,7 +756,7 @@
       DoIntermediateRename(safe_item, DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
   TestDownloadItemObserver safe_observer(safe_item);
 
-  safe_item->OnAllDataSaved(0, scoped_ptr<crypto::SecureHash>());
+  safe_item->OnAllDataSaved(0, std::unique_ptr<crypto::SecureHash>());
   EXPECT_TRUE(safe_observer.CheckAndResetDownloadUpdated());
   safe_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
   EXPECT_TRUE(safe_observer.CheckAndResetDownloadUpdated());
@@ -775,7 +769,7 @@
       DoIntermediateRename(unsafeurl_item, DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
   TestDownloadItemObserver unsafeurl_observer(unsafeurl_item);
 
-  unsafeurl_item->OnAllDataSaved(0, scoped_ptr<crypto::SecureHash>());
+  unsafeurl_item->OnAllDataSaved(0, std::unique_ptr<crypto::SecureHash>());
   EXPECT_TRUE(unsafeurl_observer.CheckAndResetDownloadUpdated());
   unsafeurl_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_DANGEROUS_URL);
   EXPECT_TRUE(unsafeurl_observer.CheckAndResetDownloadUpdated());
@@ -793,7 +787,7 @@
       DoIntermediateRename(unsafefile_item, DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
   TestDownloadItemObserver unsafefile_observer(unsafefile_item);
 
-  unsafefile_item->OnAllDataSaved(0, scoped_ptr<crypto::SecureHash>());
+  unsafefile_item->OnAllDataSaved(0, std::unique_ptr<crypto::SecureHash>());
   EXPECT_TRUE(unsafefile_observer.CheckAndResetDownloadUpdated());
   unsafefile_item->OnContentCheckCompleted(DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE);
   EXPECT_TRUE(unsafefile_observer.CheckAndResetDownloadUpdated());
@@ -840,8 +834,8 @@
   DownloadItemImpl* item = CreateDownloadItem();
   TestDownloadItemObserver observer(item);
   MockDownloadFile* mock_download_file(new MockDownloadFile);
-  scoped_ptr<DownloadFile> download_file(mock_download_file);
-  scoped_ptr<DownloadRequestHandleInterface> request_handle(
+  std::unique_ptr<DownloadFile> download_file(mock_download_file);
+  std::unique_ptr<DownloadRequestHandleInterface> request_handle(
       new NiceMock<MockRequestHandle>);
 
   EXPECT_CALL(*mock_download_file, Initialize(_));
@@ -888,10 +882,10 @@
 // Test to make sure that Start method calls DF initialize properly.
 TEST_F(DownloadItemTest, Start) {
   MockDownloadFile* mock_download_file(new MockDownloadFile);
-  scoped_ptr<DownloadFile> download_file(mock_download_file);
+  std::unique_ptr<DownloadFile> download_file(mock_download_file);
   DownloadItemImpl* item = CreateDownloadItem();
   EXPECT_CALL(*mock_download_file, Initialize(_));
-  scoped_ptr<DownloadRequestHandleInterface> request_handle(
+  std::unique_ptr<DownloadRequestHandleInterface> request_handle(
       new NiceMock<MockRequestHandle>);
   EXPECT_CALL(*mock_delegate(), DetermineDownloadTarget(item, _));
   item->Start(std::move(download_file), std::move(request_handle),
@@ -905,8 +899,8 @@
 // file initialization failing.
 TEST_F(DownloadItemTest, InitDownloadFileFails) {
   DownloadItemImpl* item = CreateDownloadItem();
-  scoped_ptr<MockDownloadFile> file(new MockDownloadFile());
-  scoped_ptr<MockRequestHandle> request_handle(new MockRequestHandle());
+  std::unique_ptr<MockDownloadFile> file(new MockDownloadFile());
+  std::unique_ptr<MockRequestHandle> request_handle(new MockRequestHandle());
   EXPECT_CALL(*file, Cancel());
   EXPECT_CALL(*request_handle, CancelRequest());
   EXPECT_CALL(*file, Initialize(_))
@@ -941,8 +935,8 @@
 
   // DownloadFile and DownloadRequestHandleInterface objects aren't created for
   // failed downloads.
-  scoped_ptr<DownloadFile> null_download_file;
-  scoped_ptr<DownloadRequestHandleInterface> null_request_handle;
+  std::unique_ptr<DownloadFile> null_download_file;
+  std::unique_ptr<DownloadRequestHandleInterface> null_request_handle;
   DownloadItemImplDelegate::DownloadTargetCallback download_target_callback;
   EXPECT_CALL(*mock_delegate(), DetermineDownloadTarget(item, _))
       .WillOnce(SaveArg<1>(&download_target_callback));
@@ -995,7 +989,7 @@
       .WillOnce(ReturnRefOfCopy(base::FilePath()));
   EXPECT_CALL(*download_file, Detach());
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
   ::testing::Mock::VerifyAndClearExpectations(download_file);
   mock_delegate()->VerifyAndClearExpectations();
@@ -1037,7 +1031,7 @@
   // Confirm interrupt sets state properly.
   EXPECT_CALL(*download_file, Cancel());
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      reason, 0, scoped_ptr<crypto::SecureHash>());
+      reason, 0, std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
   EXPECT_EQ(DownloadItem::INTERRUPTED, item->GetState());
   EXPECT_EQ(reason, item->GetLastReason());
@@ -1055,9 +1049,8 @@
   DownloadItemImplDelegate::DownloadTargetCallback callback;
   MockDownloadFile* download_file = CallDownloadItemStart(item, &callback);
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_EQ(DownloadItem::IN_PROGRESS, item->GetState());
 
   base::FilePath final_path(
@@ -1090,9 +1083,8 @@
   DownloadItemImplDelegate::DownloadTargetCallback callback;
   MockDownloadFile* download_file = CallDownloadItemStart(item, &callback);
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_EQ(DownloadItem::IN_PROGRESS, item->GetState());
 
   base::FilePath final_path(
@@ -1125,9 +1117,8 @@
   DownloadItemImplDelegate::DownloadTargetCallback callback;
   MockDownloadFile* download_file = CallDownloadItemStart(item, &callback);
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_EQ(DownloadItem::IN_PROGRESS, item->GetState());
 
   base::FilePath final_path(
@@ -1215,7 +1206,7 @@
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE, item->GetLastReason());
   EXPECT_FALSE(observer.CheckAndResetDownloadUpdated());
 
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   hash->Update(kTestData1, sizeof(kTestData1));
 
@@ -1242,7 +1233,7 @@
   EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE, item->GetLastReason());
   EXPECT_FALSE(observer.CheckAndResetDownloadUpdated());
 
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   hash->Update(kTestData1, sizeof(kTestData1));
 
@@ -1276,7 +1267,7 @@
   EXPECT_EQ("", item->GetHash());
   EXPECT_FALSE(item->AllDataSaved());
 
-  scoped_ptr<crypto::SecureHash> hash(
+  std::unique_ptr<crypto::SecureHash> hash(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   hash->Update(kTestData1, sizeof(kTestData1));
 
@@ -1317,7 +1308,7 @@
       .WillOnce(ReturnRefOfCopy(base::FilePath()));
   EXPECT_CALL(*download_file, Detach());
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
 
   ASSERT_EQ(DownloadItem::COMPLETE, item->GetState());
@@ -1348,7 +1339,7 @@
       .WillOnce(ReturnRefOfCopy(base::FilePath()));
   EXPECT_CALL(*download_file, Detach());
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
 
   ASSERT_EQ(DownloadItem::COMPLETE, item->GetState());
@@ -1363,9 +1354,8 @@
 
   EXPECT_CALL(*download_file, Cancel());
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   RunAllPendingInMessageLoops();
 
   ASSERT_EQ(DownloadItem::INTERRUPTED, item->GetState());
@@ -1402,7 +1392,7 @@
   EXPECT_CALL(*mock_delegate(), ShouldCompleteDownload(item, _))
       .WillOnce(Return(true));
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   EXPECT_EQ(DownloadItem::IN_PROGRESS, item->GetState());
   EXPECT_FALSE(item->IsDangerous());
 
@@ -1436,7 +1426,7 @@
                       Return(false)))
       .WillOnce(Return(true));
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   ASSERT_FALSE(delegate_callback.is_null());
   copy_delegate_callback = delegate_callback;
   delegate_callback.Reset();
@@ -1476,7 +1466,7 @@
                       Return(false)))
       .WillOnce(Return(true));
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   ASSERT_FALSE(delegate_callback.is_null());
   copy_delegate_callback = delegate_callback;
   delegate_callback.Reset();
@@ -1527,7 +1517,7 @@
                       Return(false)))
       .WillOnce(Return(true));
   item->DestinationObserverAsWeakPtr()->DestinationCompleted(
-      0, scoped_ptr<crypto::SecureHash>());
+      0, std::unique_ptr<crypto::SecureHash>());
   ASSERT_FALSE(delegate_callback.is_null());
   copy_delegate_callback = delegate_callback;
   delegate_callback.Reset();
@@ -1586,9 +1576,8 @@
   EXPECT_CALL(*download_file, FullPath()).WillOnce(ReturnRefOfCopy(full_path));
   EXPECT_CALL(*download_file, Detach());
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_TRUE(item->IsDangerous());
 
   EXPECT_CALL(*mock_delegate(), DownloadRemoved(_));
@@ -1608,9 +1597,8 @@
       DoIntermediateRename(item, DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE);
   EXPECT_CALL(*download_file, Cancel());
   item->DestinationObserverAsWeakPtr()->DestinationError(
-      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
-      0,
-      scoped_ptr<crypto::SecureHash>());
+      DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, 0,
+      std::unique_ptr<crypto::SecureHash>());
   ASSERT_TRUE(item->IsDangerous());
 
   EXPECT_CALL(*mock_delegate(), DownloadRemoved(_));
@@ -1713,8 +1701,8 @@
             << DownloadInterruptReasonToString(reason)
             << ", bytes_so_far:" << bytes_so_far << ") observer:" << !!observer;
   if (observer)
-    observer->DestinationError(
-        reason, bytes_so_far, scoped_ptr<crypto::SecureHash>());
+    observer->DestinationError(reason, bytes_so_far,
+                               std::unique_ptr<crypto::SecureHash>());
 }
 
 void DestinationCompletedInvoker(
@@ -1724,7 +1712,7 @@
             << ") observer:" << !!observer;
   if (observer)
     observer->DestinationCompleted(total_bytes,
-                                   scoped_ptr<crypto::SecureHash>());
+                                   std::unique_ptr<crypto::SecureHash>());
 }
 
 // Given a set of observations (via the range |begin|..|end|), constructs a list
@@ -1837,8 +1825,8 @@
   }
 
   DownloadItemImpl* item_;
-  scoped_ptr<MockDownloadFile> file_;
-  scoped_ptr<MockRequestHandle> request_handle_;
+  std::unique_ptr<MockDownloadFile> file_;
+  std::unique_ptr<MockRequestHandle> request_handle_;
 
   std::queue<base::Closure> successful_update_events_;
   std::queue<base::Closure> failing_update_events_;
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 28f1c3fc..9509f54 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -12,6 +12,7 @@
 #include "base/debug/alias.h"
 #include "base/i18n/case_conversion.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
@@ -51,15 +52,15 @@
 namespace content {
 namespace {
 
-scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> BeginDownload(
-    scoped_ptr<DownloadUrlParameters> params,
+std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> BeginDownload(
+    std::unique_ptr<DownloadUrlParameters> params,
     uint32_t download_id,
     base::WeakPtr<DownloadManagerImpl> download_manager) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
-  scoped_ptr<net::URLRequest> url_request =
+  std::unique_ptr<net::URLRequest> url_request =
       DownloadRequestCore::CreateRequestOnIOThread(download_id, params.get());
-  scoped_ptr<storage::BlobDataHandle> blob_data_handle =
+  std::unique_ptr<storage::BlobDataHandle> blob_data_handle =
       params->GetBlobDataHandle();
   if (blob_data_handle) {
     storage::BlobProtocolHandler::SetRequestedBlobDataHandle(
@@ -86,12 +87,12 @@
       return nullptr;
 
     // Otherwise, create an interrupted download.
-    scoped_ptr<DownloadCreateInfo> failed_created_info(
+    std::unique_ptr<DownloadCreateInfo> failed_created_info(
         new DownloadCreateInfo(base::Time::Now(), net::BoundNetLog(),
-                               make_scoped_ptr(new DownloadSaveInfo)));
+                               base::WrapUnique(new DownloadSaveInfo)));
     failed_created_info->url_chain.push_back(params->url());
     failed_created_info->result = reason;
-    scoped_ptr<ByteStreamReader> empty_byte_stream;
+    std::unique_ptr<ByteStreamReader> empty_byte_stream;
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
         base::Bind(&DownloadManager::StartDownload, download_manager,
@@ -100,7 +101,7 @@
     return nullptr;
   }
 
-  return scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>(
+  return std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>(
       UrlDownloader::BeginDownload(download_manager, std::move(url_request),
                                    params->referrer())
           .release());
@@ -170,7 +171,7 @@
       const base::FilePath& path,
       const GURL& url,
       const std::string& mime_type,
-      scoped_ptr<DownloadRequestHandleInterface> request_handle,
+      std::unique_ptr<DownloadRequestHandleInterface> request_handle,
       const net::BoundNetLog& bound_net_log) override {
     return new DownloadItemImpl(delegate, download_id, path, url, mime_type,
                                 std::move(request_handle), bound_net_log);
@@ -308,8 +309,8 @@
 }
 
 void DownloadManagerImpl::StartDownload(
-    scoped_ptr<DownloadCreateInfo> info,
-    scoped_ptr<ByteStreamReader> stream,
+    std::unique_ptr<DownloadCreateInfo> info,
+    std::unique_ptr<ByteStreamReader> stream,
     const DownloadUrlParameters::OnStartedCallback& on_started) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(info);
@@ -331,8 +332,8 @@
 }
 
 void DownloadManagerImpl::StartDownloadWithId(
-    scoped_ptr<DownloadCreateInfo> info,
-    scoped_ptr<ByteStreamReader> stream,
+    std::unique_ptr<DownloadCreateInfo> info,
+    std::unique_ptr<ByteStreamReader> stream,
     const DownloadUrlParameters::OnStartedCallback& on_started,
     bool new_download,
     uint32_t id) {
@@ -369,7 +370,7 @@
                           &default_download_directory, &skip_dir_check);
   }
 
-  scoped_ptr<DownloadFile> download_file;
+  std::unique_ptr<DownloadFile> download_file;
 
   if (info->result == DOWNLOAD_INTERRUPT_REASON_NONE) {
     DCHECK(stream.get());
@@ -436,7 +437,7 @@
     const base::FilePath& main_file_path,
     const GURL& page_url,
     const std::string& mime_type,
-    scoped_ptr<DownloadRequestHandleInterface> request_handle,
+    std::unique_ptr<DownloadRequestHandleInterface> request_handle,
     const DownloadItemImplCreated& item_created) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   GetNextId(base::Bind(
@@ -449,7 +450,7 @@
     const base::FilePath& main_file_path,
     const GURL& page_url,
     const std::string& mime_type,
-    scoped_ptr<DownloadRequestHandleInterface> request_handle,
+    std::unique_ptr<DownloadRequestHandleInterface> request_handle,
     const DownloadItemImplCreated& item_created,
     uint32_t id) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -479,7 +480,7 @@
 // ResourceDispatcherHost, and let it send us responses like a regular
 // download.
 void DownloadManagerImpl::ResumeInterruptedDownload(
-    scoped_ptr<content::DownloadUrlParameters> params,
+    std::unique_ptr<content::DownloadUrlParameters> params,
     uint32_t id) {
   RecordDownloadSource(INITIATED_BY_RESUMPTION);
   BrowserThread::PostTaskAndReplyWithResult(
@@ -491,12 +492,12 @@
 }
 
 void DownloadManagerImpl::SetDownloadItemFactoryForTesting(
-    scoped_ptr<DownloadItemFactory> item_factory) {
+    std::unique_ptr<DownloadItemFactory> item_factory) {
   item_factory_ = std::move(item_factory);
 }
 
 void DownloadManagerImpl::SetDownloadFileFactoryForTesting(
-    scoped_ptr<DownloadFileFactory> file_factory) {
+    std::unique_ptr<DownloadFileFactory> file_factory) {
   file_factory_ = std::move(file_factory);
 }
 
@@ -517,7 +518,8 @@
 }
 
 void DownloadManagerImpl::AddUrlDownloader(
-    scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> downloader) {
+    std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>
+        downloader) {
   if (downloader)
     url_downloaders_.push_back(std::move(downloader));
 }
@@ -588,7 +590,7 @@
 }
 
 void DownloadManagerImpl::DownloadUrl(
-    scoped_ptr<DownloadUrlParameters> params) {
+    std::unique_ptr<DownloadUrlParameters> params) {
   if (params->post_id() >= 0) {
     // Check this here so that the traceback is more useful.
     DCHECK(params->prefer_cache());
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 610b764..21524c9 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <string>
 #include <unordered_map>
@@ -15,7 +16,6 @@
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/sequenced_task_runner_helpers.h"
@@ -57,7 +57,7 @@
       const base::FilePath& main_file_path,
       const GURL& page_url,
       const std::string& mime_type,
-      scoped_ptr<DownloadRequestHandleInterface> request_handle,
+      std::unique_ptr<DownloadRequestHandleInterface> request_handle,
       const DownloadItemImplCreated& item_created);
 
   // Notifies DownloadManager about a successful completion of |download_item|.
@@ -69,8 +69,8 @@
   void Shutdown() override;
   void GetAllDownloads(DownloadVector* result) override;
   void StartDownload(
-      scoped_ptr<DownloadCreateInfo> info,
-      scoped_ptr<ByteStreamReader> stream,
+      std::unique_ptr<DownloadCreateInfo> info,
+      std::unique_ptr<ByteStreamReader> stream,
       const DownloadUrlParameters::OnStartedCallback& on_started) override;
 
   int RemoveDownloadsByURLAndTime(
@@ -78,7 +78,7 @@
       base::Time remove_begin,
       base::Time remove_end) override;
   int RemoveAllDownloads() override;
-  void DownloadUrl(scoped_ptr<DownloadUrlParameters> params) override;
+  void DownloadUrl(std::unique_ptr<DownloadUrlParameters> params) override;
   void AddObserver(Observer* observer) override;
   void RemoveObserver(Observer* observer) override;
   content::DownloadItem* CreateDownloadItem(
@@ -110,9 +110,9 @@
 
   // For testing; specifically, accessed from TestFileErrorInjector.
   void SetDownloadItemFactoryForTesting(
-      scoped_ptr<DownloadItemFactory> item_factory);
+      std::unique_ptr<DownloadItemFactory> item_factory);
   void SetDownloadFileFactoryForTesting(
-      scoped_ptr<DownloadFileFactory> file_factory);
+      std::unique_ptr<DownloadFileFactory> file_factory);
   virtual DownloadFileFactory* GetDownloadFileFactoryForTesting();
 
   void RemoveUrlDownloader(UrlDownloader* downloader);
@@ -129,8 +129,8 @@
   friend class DownloadTest;
 
   void StartDownloadWithId(
-      scoped_ptr<DownloadCreateInfo> info,
-      scoped_ptr<ByteStreamReader> stream,
+      std::unique_ptr<DownloadCreateInfo> info,
+      std::unique_ptr<ByteStreamReader> stream,
       const DownloadUrlParameters::OnStartedCallback& on_started,
       bool new_download,
       uint32_t id);
@@ -139,7 +139,7 @@
       const base::FilePath& main_file_path,
       const GURL& page_url,
       const std::string& mime_type,
-      scoped_ptr<DownloadRequestHandleInterface> request_handle,
+      std::unique_ptr<DownloadRequestHandleInterface> request_handle,
       const DownloadItemImplCreated& on_started,
       uint32_t id);
 
@@ -171,20 +171,21 @@
                           const ShouldOpenDownloadCallback& callback) override;
   void CheckForFileRemoval(DownloadItemImpl* download_item) override;
   void ResumeInterruptedDownload(
-      scoped_ptr<content::DownloadUrlParameters> params,
+      std::unique_ptr<content::DownloadUrlParameters> params,
       uint32_t id) override;
   void OpenDownload(DownloadItemImpl* download) override;
   void ShowDownloadInShell(DownloadItemImpl* download) override;
   void DownloadRemoved(DownloadItemImpl* download) override;
 
   void AddUrlDownloader(
-      scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> downloader);
+      std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>
+          downloader);
 
   // Factory for creation of downloads items.
-  scoped_ptr<DownloadItemFactory> item_factory_;
+  std::unique_ptr<DownloadItemFactory> item_factory_;
 
   // Factory for the creation of download files.
-  scoped_ptr<DownloadFileFactory> file_factory_;
+  std::unique_ptr<DownloadFileFactory> file_factory_;
 
   // |downloads_| is the owning set for all downloads known to the
   // DownloadManager.  This includes downloads started by the user in
@@ -216,7 +217,7 @@
 
   net::NetLog* net_log_;
 
-  std::vector<scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>>
+  std::vector<std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>>
       url_downloaders_;
 
   base::WeakPtrFactory<DownloadManagerImpl> weak_factory_;
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index c72a1d0..a395414 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <string>
 #include <utility>
@@ -15,7 +16,6 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/guid.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
@@ -117,12 +117,12 @@
   MOCK_METHOD3(UpdateProgress, void(int64_t, int64_t, const std::string&));
   MOCK_METHOD1(Cancel, void(bool));
   MOCK_METHOD0(MarkAsComplete, void());
-  void OnAllDataSaved(int64_t, scoped_ptr<crypto::SecureHash>) override {
+  void OnAllDataSaved(int64_t, std::unique_ptr<crypto::SecureHash>) override {
     NOTREACHED();
   }
   MOCK_METHOD0(OnDownloadedFileRemoved, void());
-  void Start(scoped_ptr<DownloadFile> download_file,
-             scoped_ptr<DownloadRequestHandleInterface> req_handle,
+  void Start(std::unique_ptr<DownloadFile> download_file,
+             std::unique_ptr<DownloadRequestHandleInterface> req_handle,
              const DownloadCreateInfo& create_info) override {
     MockStart(download_file.get(), req_handle.get());
   }
@@ -274,7 +274,7 @@
       const base::FilePath& path,
       const GURL& url,
       const std::string& mime_type,
-      scoped_ptr<DownloadRequestHandleInterface> request_handle,
+      std::unique_ptr<DownloadRequestHandleInterface> request_handle,
       const net::BoundNetLog& bound_net_log) override;
 
  private:
@@ -371,7 +371,7 @@
     const base::FilePath& path,
     const GURL& url,
     const std::string& mime_type,
-    scoped_ptr<DownloadRequestHandleInterface> request_handle,
+    std::unique_ptr<DownloadRequestHandleInterface> request_handle,
     const net::BoundNetLog& bound_net_log) {
   DCHECK(items_.find(download_id) == items_.end());
 
@@ -396,9 +396,9 @@
                MockDownloadFile*(const DownloadSaveInfo&, ByteStreamReader*));
 
   virtual DownloadFile* CreateFile(
-      scoped_ptr<DownloadSaveInfo> save_info,
+      std::unique_ptr<DownloadSaveInfo> save_info,
       const base::FilePath& default_download_directory,
-      scoped_ptr<ByteStreamReader> byte_stream,
+      std::unique_ptr<ByteStreamReader> byte_stream,
       const net::BoundNetLog& bound_net_log,
       base::WeakPtr<DownloadDestinationObserver> observer) override {
     return MockCreateFile(*save_info, byte_stream.get());
@@ -450,9 +450,10 @@
     return nullptr;
   }
 
-  scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
+  std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
       const base::FilePath& path) override {
-    return scoped_ptr<ZoomLevelDelegate>(CreateZoomLevelDelegateMock(path));
+    return std::unique_ptr<ZoomLevelDelegate>(
+        CreateZoomLevelDelegateMock(path));
   }
 };
 
@@ -510,9 +511,11 @@
     download_manager_.reset(new DownloadManagerImpl(
                                 NULL, mock_browser_context_.get()));
     download_manager_->SetDownloadItemFactoryForTesting(
-        scoped_ptr<DownloadItemFactory>(mock_download_item_factory_.get()));
+        std::unique_ptr<DownloadItemFactory>(
+            mock_download_item_factory_.get()));
     download_manager_->SetDownloadFileFactoryForTesting(
-        scoped_ptr<DownloadFileFactory>(mock_download_file_factory_.get()));
+        std::unique_ptr<DownloadFileFactory>(
+            mock_download_file_factory_.get()));
     observer_.reset(new MockDownloadManagerObserver());
     download_manager_->AddObserver(observer_.get());
     download_manager_->SetDelegate(mock_download_manager_delegate_.get());
@@ -557,8 +560,8 @@
     // Satisfy expectation.  If the item is created in StartDownload(),
     // we call Start on it immediately, so we need to set that expectation
     // in the factory.
-    scoped_ptr<DownloadRequestHandleInterface> req_handle;
-    item.Start(scoped_ptr<DownloadFile>(), std::move(req_handle), info);
+    std::unique_ptr<DownloadRequestHandleInterface> req_handle;
+    item.Start(std::unique_ptr<DownloadFile>(), std::move(req_handle), info);
     DCHECK(id < download_urls_.size());
     EXPECT_CALL(item, GetURL()).WillRepeatedly(ReturnRef(download_urls_[id]));
 
@@ -606,7 +609,7 @@
 
  protected:
   // Key test variable; we'll keep it available to sub-classes.
-  scoped_ptr<DownloadManagerImpl> download_manager_;
+  std::unique_ptr<DownloadManagerImpl> download_manager_;
   base::WeakPtr<MockDownloadFileFactory> mock_download_file_factory_;
 
   // Target detetermined callback.
@@ -623,9 +626,9 @@
   TestBrowserThread ui_thread_;
   TestBrowserThread file_thread_;
   base::WeakPtr<MockDownloadItemFactory> mock_download_item_factory_;
-  scoped_ptr<MockDownloadManagerDelegate> mock_download_manager_delegate_;
-  scoped_ptr<MockBrowserContext> mock_browser_context_;
-  scoped_ptr<MockDownloadManagerObserver> observer_;
+  std::unique_ptr<MockDownloadManagerDelegate> mock_download_manager_delegate_;
+  std::unique_ptr<MockBrowserContext> mock_browser_context_;
+  std::unique_ptr<MockDownloadManagerObserver> observer_;
   uint32_t next_download_id_;
 
   DISALLOW_COPY_AND_ASSIGN(DownloadManagerTest);
@@ -633,8 +636,8 @@
 
 // Confirm the appropriate invocations occur when you start a download.
 TEST_F(DownloadManagerTest, StartDownload) {
-  scoped_ptr<DownloadCreateInfo> info(new DownloadCreateInfo);
-  scoped_ptr<ByteStreamReader> stream(new MockByteStreamReader);
+  std::unique_ptr<DownloadCreateInfo> info(new DownloadCreateInfo);
+  std::unique_ptr<ByteStreamReader> stream(new MockByteStreamReader);
   uint32_t local_id(5);  // Random value
   base::FilePath download_path(FILE_PATH_LITERAL("download/path"));
 
diff --git a/content/browser/download/download_net_log_parameters.cc b/content/browser/download/download_net_log_parameters.cc
index 110bc98c..426fc174 100644
--- a/content/browser/download/download_net_log_parameters.cc
+++ b/content/browser/download/download_net_log_parameters.cc
@@ -43,12 +43,12 @@
 
 }  // namespace
 
-scoped_ptr<base::Value> ItemActivatedNetLogCallback(
+std::unique_ptr<base::Value> ItemActivatedNetLogCallback(
     const DownloadItem* download_item,
     DownloadType download_type,
     const std::string* file_name,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("type", download_type_names[download_type]);
   dict->SetString("id", base::UintToString(download_item->GetId()));
@@ -64,21 +64,21 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemCheckedNetLogCallback(
+std::unique_ptr<base::Value> ItemCheckedNetLogCallback(
     DownloadDangerType danger_type,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("danger_type", download_danger_names[danger_type]);
 
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemRenamedNetLogCallback(
+std::unique_ptr<base::Value> ItemRenamedNetLogCallback(
     const base::FilePath* old_filename,
     const base::FilePath* new_filename,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("old_filename", old_filename->AsUTF8Unsafe());
   dict->SetString("new_filename", new_filename->AsUTF8Unsafe());
@@ -86,11 +86,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
+std::unique_ptr<base::Value> ItemInterruptedNetLogCallback(
     DownloadInterruptReason reason,
     int64_t bytes_so_far,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason));
   dict->SetString("bytes_so_far", base::Int64ToString(bytes_so_far));
@@ -98,12 +98,12 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemResumingNetLogCallback(
+std::unique_ptr<base::Value> ItemResumingNetLogCallback(
     bool user_initiated,
     DownloadInterruptReason reason,
     int64_t bytes_so_far,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("user_initiated", user_initiated ? "true" : "false");
   dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason));
@@ -112,11 +112,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemCompletingNetLogCallback(
+std::unique_ptr<base::Value> ItemCompletingNetLogCallback(
     int64_t bytes_so_far,
     const std::string* final_hash,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("bytes_so_far", base::Int64ToString(bytes_so_far));
   dict->SetString("final_hash",
@@ -125,31 +125,31 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemFinishedNetLogCallback(
+std::unique_ptr<base::Value> ItemFinishedNetLogCallback(
     bool auto_opened,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("auto_opened", auto_opened ? "yes" : "no");
 
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> ItemCanceledNetLogCallback(
+std::unique_ptr<base::Value> ItemCanceledNetLogCallback(
     int64_t bytes_so_far,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("bytes_so_far", base::Int64ToString(bytes_so_far));
 
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> FileOpenedNetLogCallback(
+std::unique_ptr<base::Value> FileOpenedNetLogCallback(
     const base::FilePath* file_name,
     int64_t start_offset,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("file_name", file_name->AsUTF8Unsafe());
   dict->SetString("start_offset", base::Int64ToString(start_offset));
@@ -157,11 +157,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> FileStreamDrainedNetLogCallback(
+std::unique_ptr<base::Value> FileStreamDrainedNetLogCallback(
     size_t stream_size,
     size_t num_buffers,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetInteger("stream_size", static_cast<int>(stream_size));
   dict->SetInteger("num_buffers", static_cast<int>(num_buffers));
@@ -169,11 +169,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> FileRenamedNetLogCallback(
+std::unique_ptr<base::Value> FileRenamedNetLogCallback(
     const base::FilePath* old_filename,
     const base::FilePath* new_filename,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("old_filename", old_filename->AsUTF8Unsafe());
   dict->SetString("new_filename", new_filename->AsUTF8Unsafe());
@@ -181,11 +181,11 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> FileErrorNetLogCallback(
+std::unique_ptr<base::Value> FileErrorNetLogCallback(
     const char* operation,
     net::Error net_error,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("operation", operation);
   dict->SetInteger("net_error", net_error);
@@ -193,12 +193,12 @@
   return std::move(dict);
 }
 
-scoped_ptr<base::Value> FileInterruptedNetLogCallback(
+std::unique_ptr<base::Value> FileInterruptedNetLogCallback(
     const char* operation,
     int os_error,
     DownloadInterruptReason reason,
     net::NetLogCaptureMode capture_mode) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
   dict->SetString("operation", operation);
   if (os_error != 0)
diff --git a/content/browser/download/download_net_log_parameters.h b/content/browser/download/download_net_log_parameters.h
index b10a345e..a033e73 100644
--- a/content/browser/download/download_net_log_parameters.h
+++ b/content/browser/download/download_net_log_parameters.h
@@ -29,78 +29,78 @@
 };
 
 // Returns NetLog parameters when a DownloadItem is activated.
-scoped_ptr<base::Value> ItemActivatedNetLogCallback(
+std::unique_ptr<base::Value> ItemActivatedNetLogCallback(
     const DownloadItem* download_item,
     DownloadType download_type,
     const std::string* file_name,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is checked for danger.
-scoped_ptr<base::Value> ItemCheckedNetLogCallback(
+std::unique_ptr<base::Value> ItemCheckedNetLogCallback(
     DownloadDangerType danger_type,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is renamed.
-scoped_ptr<base::Value> ItemRenamedNetLogCallback(
+std::unique_ptr<base::Value> ItemRenamedNetLogCallback(
     const base::FilePath* old_filename,
     const base::FilePath* new_filename,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is interrupted.
-scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
+std::unique_ptr<base::Value> ItemInterruptedNetLogCallback(
     DownloadInterruptReason reason,
     int64_t bytes_so_far,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is resumed.
-scoped_ptr<base::Value> ItemResumingNetLogCallback(
+std::unique_ptr<base::Value> ItemResumingNetLogCallback(
     bool user_initiated,
     DownloadInterruptReason reason,
     int64_t bytes_so_far,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is completing.
-scoped_ptr<base::Value> ItemCompletingNetLogCallback(
+std::unique_ptr<base::Value> ItemCompletingNetLogCallback(
     int64_t bytes_so_far,
     const std::string* final_hash,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is finished.
-scoped_ptr<base::Value> ItemFinishedNetLogCallback(
+std::unique_ptr<base::Value> ItemFinishedNetLogCallback(
     bool auto_opened,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadItem is canceled.
-scoped_ptr<base::Value> ItemCanceledNetLogCallback(
+std::unique_ptr<base::Value> ItemCanceledNetLogCallback(
     int64_t bytes_so_far,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadFile is opened.
-scoped_ptr<base::Value> FileOpenedNetLogCallback(
+std::unique_ptr<base::Value> FileOpenedNetLogCallback(
     const base::FilePath* file_name,
     int64_t start_offset,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadFile is opened.
-scoped_ptr<base::Value> FileStreamDrainedNetLogCallback(
+std::unique_ptr<base::Value> FileStreamDrainedNetLogCallback(
     size_t stream_size,
     size_t num_buffers,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a DownloadFile is renamed.
-scoped_ptr<base::Value> FileRenamedNetLogCallback(
+std::unique_ptr<base::Value> FileRenamedNetLogCallback(
     const base::FilePath* old_filename,
     const base::FilePath* new_filename,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters when a File has an error.
-scoped_ptr<base::Value> FileErrorNetLogCallback(
+std::unique_ptr<base::Value> FileErrorNetLogCallback(
     const char* operation,
     net::Error net_error,
     net::NetLogCaptureMode capture_mode);
 
 // Returns NetLog parameters for a download interruption.
-scoped_ptr<base::Value> FileInterruptedNetLogCallback(
+std::unique_ptr<base::Value> FileInterruptedNetLogCallback(
     const char* operation,
     int os_error,
     DownloadInterruptReason reason,
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc
index 3f70e95..42f3e90 100644
--- a/content/browser/download/download_request_core.cc
+++ b/content/browser/download/download_request_core.cc
@@ -11,6 +11,7 @@
 #include "base/format_macros.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/single_thread_task_runner.h"
@@ -56,7 +57,9 @@
   static DownloadRequestData* Get(net::URLRequest* request);
   static void Detach(net::URLRequest* request);
 
-  scoped_ptr<DownloadSaveInfo> TakeSaveInfo() { return std::move(save_info_); }
+  std::unique_ptr<DownloadSaveInfo> TakeSaveInfo() {
+    return std::move(save_info_);
+  }
   uint32_t download_id() const { return download_id_; }
   const DownloadUrlParameters::OnStartedCallback& callback() const {
     return on_started_callback_;
@@ -65,7 +68,7 @@
  private:
   static const int kKey;
 
-  scoped_ptr<DownloadSaveInfo> save_info_;
+  std::unique_ptr<DownloadSaveInfo> save_info_;
   uint32_t download_id_ = DownloadItem::kInvalidId;
   DownloadUrlParameters::OnStartedCallback on_started_callback_;
 };
@@ -100,7 +103,7 @@
 const int DownloadRequestCore::kDownloadByteStreamSize = 100 * 1024;
 
 // static
-scoped_ptr<net::URLRequest> DownloadRequestCore::CreateRequestOnIOThread(
+std::unique_ptr<net::URLRequest> DownloadRequestCore::CreateRequestOnIOThread(
     uint32_t download_id,
     DownloadUrlParameters* params) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -111,14 +114,14 @@
   // ResourceDispatcherHost{Base} is-not-a URLRequest::Delegate, and
   // DownloadUrlParameters can-not include resource_dispatcher_host_impl.h, so
   // we must down cast. RDHI is the only subclass of RDH as of 2012 May 4.
-  scoped_ptr<net::URLRequest> request(
+  std::unique_ptr<net::URLRequest> request(
       params->resource_context()->GetRequestContext()->CreateRequest(
           params->url(), net::DEFAULT_PRIORITY, nullptr));
   request->set_method(params->method());
 
   if (!params->post_body().empty()) {
     const std::string& body = params->post_body();
-    scoped_ptr<net::UploadElementReader> reader(
+    std::unique_ptr<net::UploadElementReader> reader(
         net::UploadOwnedBytesElementReader::CreateWithString(body));
     request->set_upload(
         net::ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
@@ -131,8 +134,8 @@
     // plan on how to display the UI for that.
     DCHECK(params->prefer_cache());
     DCHECK_EQ("POST", params->method());
-    std::vector<scoped_ptr<net::UploadElementReader>> element_readers;
-    request->set_upload(make_scoped_ptr(new net::ElementsUploadDataStream(
+    std::vector<std::unique_ptr<net::UploadElementReader>> element_readers;
+    request->set_upload(base::WrapUnique(new net::ElementsUploadDataStream(
         std::move(element_readers), params->post_id())));
   }
 
@@ -225,11 +228,11 @@
                       base::TimeTicks::Now() - download_start_time_);
 }
 
-scoped_ptr<DownloadCreateInfo> DownloadRequestCore::CreateDownloadCreateInfo(
-    DownloadInterruptReason result) {
+std::unique_ptr<DownloadCreateInfo>
+DownloadRequestCore::CreateDownloadCreateInfo(DownloadInterruptReason result) {
   DCHECK(!started_);
   started_ = true;
-  scoped_ptr<DownloadCreateInfo> create_info(new DownloadCreateInfo(
+  std::unique_ptr<DownloadCreateInfo> create_info(new DownloadCreateInfo(
       base::Time::Now(), request()->net_log(), std::move(save_info_)));
 
   if (result == DOWNLOAD_INTERRUPT_REASON_NONE)
@@ -253,9 +256,11 @@
                                            save_info_.get())
           : DOWNLOAD_INTERRUPT_REASON_NONE;
 
-  scoped_ptr<DownloadCreateInfo> create_info = CreateDownloadCreateInfo(result);
+  std::unique_ptr<DownloadCreateInfo> create_info =
+      CreateDownloadCreateInfo(result);
   if (result != DOWNLOAD_INTERRUPT_REASON_NONE) {
-    delegate_->OnStart(std::move(create_info), scoped_ptr<ByteStreamReader>(),
+    delegate_->OnStart(std::move(create_info),
+                       std::unique_ptr<ByteStreamReader>(),
                        base::ResetAndReturn(&on_started_callback_));
     return false;
   }
@@ -276,7 +281,7 @@
   create_info->total_bytes = content_length;
 
   // Create the ByteStream for sending data to the download sink.
-  scoped_ptr<ByteStreamReader> stream_reader;
+  std::unique_ptr<ByteStreamReader> stream_reader;
   CreateByteStream(
       base::ThreadTaskRunnerHandle::Get(),
       BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
@@ -469,8 +474,9 @@
   // OnResponseCompleted() called without OnResponseStarted(). This should only
   // happen when the request was aborted.
   DCHECK_NE(reason, DOWNLOAD_INTERRUPT_REASON_NONE);
-  scoped_ptr<DownloadCreateInfo> create_info = CreateDownloadCreateInfo(reason);
-  scoped_ptr<ByteStreamReader> empty_byte_stream;
+  std::unique_ptr<DownloadCreateInfo> create_info =
+      CreateDownloadCreateInfo(reason);
+  std::unique_ptr<ByteStreamReader> empty_byte_stream;
   delegate_->OnStart(std::move(create_info), std::move(empty_byte_stream),
                      base::ResetAndReturn(&on_started_callback_));
 }
diff --git a/content/browser/download/download_request_core.h b/content/browser/download/download_request_core.h
index ac9e9b6..84eb2e0 100644
--- a/content/browser/download/download_request_core.h
+++ b/content/browser/download/download_request_core.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/loader/resource_handler.h"
 #include "content/public/browser/download_interrupt_reasons.h"
@@ -44,8 +44,8 @@
    public:
     virtual void OnReadyToRead() = 0;
     virtual void OnStart(
-        scoped_ptr<DownloadCreateInfo> download_create_info,
-        scoped_ptr<ByteStreamReader> stream_reader,
+        std::unique_ptr<DownloadCreateInfo> download_create_info,
+        std::unique_ptr<ByteStreamReader> stream_reader,
         const DownloadUrlParameters::OnStartedCallback& callback) = 0;
   };
 
@@ -102,7 +102,7 @@
 
   std::string DebugString() const;
 
-  static scoped_ptr<net::URLRequest> CreateRequestOnIOThread(
+  static std::unique_ptr<net::URLRequest> CreateRequestOnIOThread(
       uint32_t download_id,
       DownloadUrlParameters* params);
 
@@ -121,7 +121,7 @@
       const net::HttpResponseHeaders& http_headers,
       DownloadSaveInfo* save_info);
 
-  scoped_ptr<DownloadCreateInfo> CreateDownloadCreateInfo(
+  std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo(
       DownloadInterruptReason result);
 
   Delegate* delegate_;
@@ -129,18 +129,18 @@
 
   // "Passthrough" fields. These are only kept here so that they can be used to
   // populate the DownloadCreateInfo when the time comes.
-  scoped_ptr<DownloadSaveInfo> save_info_;
+  std::unique_ptr<DownloadSaveInfo> save_info_;
   uint32_t download_id_;
   DownloadUrlParameters::OnStartedCallback on_started_callback_;
 
   // Data flow
   scoped_refptr<net::IOBuffer> read_buffer_;    // From URLRequest.
-  scoped_ptr<ByteStreamWriter> stream_writer_;  // To rest of system.
+  std::unique_ptr<ByteStreamWriter> stream_writer_;  // To rest of system.
 
   // Keeps the system from sleeping while this is alive. If the
   // system enters power saving mode while a request is alive, it can cause the
   // request to fail and the associated download will be interrupted.
-  scoped_ptr<PowerSaveBlocker> power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> power_save_blocker_;
 
   // The following are used to collect stats.
   base::TimeTicks download_start_time_;
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 30a7c8c..310da2eb 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -36,9 +36,9 @@
 // Static function in order to prevent any accidental accesses to
 // DownloadResourceHandler members from the UI thread.
 static void StartOnUIThread(
-    scoped_ptr<DownloadCreateInfo> info,
-    scoped_ptr<DownloadResourceHandler::DownloadTabInfo> tab_info,
-    scoped_ptr<ByteStreamReader> stream,
+    std::unique_ptr<DownloadCreateInfo> info,
+    std::unique_ptr<DownloadResourceHandler::DownloadTabInfo> tab_info,
+    std::unique_ptr<ByteStreamReader> stream,
     const DownloadUrlParameters::OnStartedCallback& started_cb) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
@@ -79,7 +79,7 @@
 }
 
 void DeleteOnUIThread(
-    scoped_ptr<DownloadResourceHandler::DownloadTabInfo> tab_info) {}
+    std::unique_ptr<DownloadResourceHandler::DownloadTabInfo> tab_info) {}
 
 }  // namespace
 
@@ -168,8 +168,8 @@
 }
 
 void DownloadResourceHandler::OnStart(
-    scoped_ptr<DownloadCreateInfo> create_info,
-    scoped_ptr<ByteStreamReader> stream_reader,
+    std::unique_ptr<DownloadCreateInfo> create_info,
+    std::unique_ptr<ByteStreamReader> stream_reader,
     const DownloadUrlParameters::OnStartedCallback& callback) {
   // If the user cancels the download, then don't call start. Instead ignore the
   // download entirely.
diff --git a/content/browser/download/download_resource_handler.h b/content/browser/download/download_resource_handler.h
index b874b9a..a48aa49 100644
--- a/content/browser/download/download_resource_handler.h
+++ b/content/browser/download/download_resource_handler.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/download/download_request_core.h"
 #include "content/browser/loader/resource_handler.h"
 #include "content/public/browser/download_interrupt_reasons.h"
@@ -83,8 +83,8 @@
 
   // DownloadRequestCore::Delegate
   void OnStart(
-      scoped_ptr<DownloadCreateInfo> download_create_info,
-      scoped_ptr<ByteStreamReader> stream_reader,
+      std::unique_ptr<DownloadCreateInfo> download_create_info,
+      std::unique_ptr<ByteStreamReader> stream_reader,
       const DownloadUrlParameters::OnStartedCallback& callback) override;
   void OnReadyToRead() override;
 
@@ -92,9 +92,9 @@
   // thread before StartOnUIThread is called.
   // Created on IO thread, but only accessed on UI thread. |tab_info_| holds
   // the pointer until we pass it off to StartOnUIThread or DeleteSoon.
-  // Marked as a scoped_ptr<> to indicate ownership of the structure, but
+  // Marked as a std::unique_ptr<> to indicate ownership of the structure, but
   // deletion must occur on the IO thread.
-  scoped_ptr<DownloadTabInfo> tab_info_;
+  std::unique_ptr<DownloadTabInfo> tab_info_;
 
   DownloadRequestCore core_;
   DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler);
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index dc6b89c..468c26f 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -65,7 +65,7 @@
         BrowserContext::GetDownloadManager(web_contents_->GetBrowserContext());
 
     RecordDownloadSource(INITIATED_BY_DRAG_N_DROP);
-    scoped_ptr<content::DownloadUrlParameters> params(
+    std::unique_ptr<content::DownloadUrlParameters> params(
         DownloadUrlParameters::FromWebContents(web_contents_, url_));
     params->set_referrer(referrer_);
     params->set_referrer_encoding(referrer_encoding_);
diff --git a/content/browser/download/drag_download_file.h b/content/browser/download/drag_download_file.h
index 70502d3..f6c12f6a 100644
--- a/content/browser/download/drag_download_file.h
+++ b/content/browser/download/drag_download_file.h
@@ -5,11 +5,12 @@
 #ifndef CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_
 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "content/browser/download/download_file.h"
diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc
index b9e5f9e3..fb5a2b9 100644
--- a/content/browser/download/drag_download_util.cc
+++ b/content/browser/download/drag_download_util.cc
@@ -6,12 +6,12 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/files/file.h"
 #include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index 2eab52b..3a2bf29 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -26,12 +26,8 @@
 }
 
 DownloadInterruptReason SaveFile::Initialize() {
-  return file_.Initialize(base::FilePath(),
-                          base::FilePath(),
-                          base::File(),
-                          0,
-                          std::string(),
-                          scoped_ptr<crypto::SecureHash>());
+  return file_.Initialize(base::FilePath(), base::FilePath(), base::File(), 0,
+                          std::string(), std::unique_ptr<crypto::SecureHash>());
 }
 
 DownloadInterruptReason SaveFile::AppendDataToFile(const char* data,
diff --git a/content/browser/download/save_file.h b/content/browser/download/save_file.h
index 69add32..8540e08 100644
--- a/content/browser/download/save_file.h
+++ b/content/browser/download/save_file.h
@@ -8,9 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/download/base_file.h"
 #include "content/browser/download/save_types.h"
 
@@ -50,7 +51,7 @@
 
  private:
   BaseFile file_;
-  scoped_ptr<const SaveFileCreateInfo> info_;
+  std::unique_ptr<const SaveFileCreateInfo> info_;
 
   DISALLOW_COPY_AND_ASSIGN(SaveFile);
 };
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 7c989856..6885a39 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -313,7 +313,7 @@
     return false;
   }
 
-  scoped_ptr<DownloadRequestHandleInterface> request_handle(
+  std::unique_ptr<DownloadRequestHandleInterface> request_handle(
       new SavePackageRequestHandle(AsWeakPtr()));
   // The download manager keeps ownership but adds us as an observer.
   download_manager_->CreateSavePackageDownloadItem(
@@ -376,7 +376,7 @@
     // Must call OnAllDataSaved here in order for
     // GDataDownloadObserver::ShouldUpload() to return true.
     // ShouldCompleteDownload() may depend on the gdata uploader to finish.
-    download_->OnAllDataSaved(size, scoped_ptr<crypto::SecureHash>());
+    download_->OnAllDataSaved(size, std::unique_ptr<crypto::SecureHash>());
   }
 
   if (!download_manager_->GetDelegate()) {
@@ -783,7 +783,7 @@
       if (save_type_ != SAVE_PAGE_TYPE_AS_MHTML) {
         download_->DestinationUpdate(all_save_items_count_, CurrentSpeed());
         download_->OnAllDataSaved(all_save_items_count_,
-                                  scoped_ptr<crypto::SecureHash>());
+                                  std::unique_ptr<crypto::SecureHash>());
       }
       download_->MarkAsComplete();
     }
diff --git a/content/browser/download/url_downloader.cc b/content/browser/download/url_downloader.cc
index 274de90..de8af79 100644
--- a/content/browser/download/url_downloader.cc
+++ b/content/browser/download/url_downloader.cc
@@ -70,9 +70,9 @@
 };
 
 // static
-scoped_ptr<UrlDownloader> UrlDownloader::BeginDownload(
+std::unique_ptr<UrlDownloader> UrlDownloader::BeginDownload(
     base::WeakPtr<DownloadManagerImpl> download_manager,
-    scoped_ptr<net::URLRequest> request,
+    std::unique_ptr<net::URLRequest> request,
     const Referrer& referrer) {
   if (!referrer.url.is_valid())
     request->SetReferrer(std::string());
@@ -84,14 +84,14 @@
 
   // From this point forward, the |UrlDownloader| is responsible for
   // |started_callback|.
-  scoped_ptr<UrlDownloader> downloader(
+  std::unique_ptr<UrlDownloader> downloader(
       new UrlDownloader(std::move(request), download_manager));
   downloader->Start();
 
   return downloader;
 }
 
-UrlDownloader::UrlDownloader(scoped_ptr<net::URLRequest> request,
+UrlDownloader::UrlDownloader(std::unique_ptr<net::URLRequest> request,
                              base::WeakPtr<DownloadManagerImpl> manager)
     : request_(std::move(request)),
       manager_(manager),
@@ -218,8 +218,8 @@
 }
 
 void UrlDownloader::OnStart(
-    scoped_ptr<DownloadCreateInfo> create_info,
-    scoped_ptr<ByteStreamReader> stream_reader,
+    std::unique_ptr<DownloadCreateInfo> create_info,
+    std::unique_ptr<ByteStreamReader> stream_reader,
     const DownloadUrlParameters::OnStartedCallback& callback) {
   create_info->request_handle.reset(
       new RequestHandle(weak_ptr_factory_.GetWeakPtr(), manager_,
diff --git a/content/browser/download/url_downloader.h b/content/browser/download/url_downloader.h
index 475d97bf..6047c70 100644
--- a/content/browser/download/url_downloader.h
+++ b/content/browser/download/url_downloader.h
@@ -7,7 +7,8 @@
 
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/memory/weak_ptr.h"
 #include "content/browser/download/download_request_core.h"
 #include "content/public/browser/download_interrupt_reasons.h"
@@ -25,13 +26,13 @@
 class UrlDownloader : public net::URLRequest::Delegate,
                       public DownloadRequestCore::Delegate {
  public:
-  UrlDownloader(scoped_ptr<net::URLRequest> request,
+  UrlDownloader(std::unique_ptr<net::URLRequest> request,
                 base::WeakPtr<DownloadManagerImpl> manager);
   ~UrlDownloader() override;
 
-  static scoped_ptr<UrlDownloader> BeginDownload(
+  static std::unique_ptr<UrlDownloader> BeginDownload(
       base::WeakPtr<DownloadManagerImpl> download_manager,
-      scoped_ptr<net::URLRequest> request,
+      std::unique_ptr<net::URLRequest> request,
       const Referrer& referrer);
 
  private:
@@ -51,8 +52,8 @@
 
   // DownloadRequestCore::Delegate
   void OnStart(
-      scoped_ptr<DownloadCreateInfo> download_create_info,
-      scoped_ptr<ByteStreamReader> stream_reader,
+      std::unique_ptr<DownloadCreateInfo> download_create_info,
+      std::unique_ptr<ByteStreamReader> stream_reader,
       const DownloadUrlParameters::OnStartedCallback& callback) override;
   void OnReadyToRead() override;
 
@@ -65,7 +66,7 @@
   // UrlDownloader to be freed.
   void Destroy();
 
-  scoped_ptr<net::URLRequest> request_;
+  std::unique_ptr<net::URLRequest> request_;
   base::WeakPtr<DownloadManagerImpl> manager_;
   DownloadRequestCore core_;
 
diff --git a/content/browser/fileapi/blob_reader_unittest.cc b/content/browser/fileapi/blob_reader_unittest.cc
index 1c0ae10..4d8489a5 100644
--- a/content/browser/fileapi/blob_reader_unittest.cc
+++ b/content/browser/fileapi/blob_reader_unittest.cc
@@ -5,6 +5,8 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
@@ -13,7 +15,7 @@
 #include "base/files/file_path.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -145,9 +147,9 @@
   std::vector<base::Callback<void(void)>> pending_read_callbacks_;
 };
 
-scoped_ptr<disk_cache::Backend> CreateInMemoryDiskCache(
+std::unique_ptr<disk_cache::Backend> CreateInMemoryDiskCache(
     const scoped_refptr<base::SingleThreadTaskRunner>& thread) {
-  scoped_ptr<disk_cache::Backend> cache;
+  std::unique_ptr<disk_cache::Backend> cache;
   net::TestCompletionCallback callback;
   int rv = disk_cache::CreateCacheBackend(
       net::MEMORY_CACHE, net::CACHE_BACKEND_DEFAULT, FilePath(), 0, false,
@@ -184,14 +186,14 @@
   explicit FakeFileStreamReader(const std::string& contents)
       : buffer_(new DrainableIOBuffer(
             new net::StringIOBuffer(
-                scoped_ptr<std::string>(new std::string(contents))),
+                std::unique_ptr<std::string>(new std::string(contents))),
             contents.size())),
         net_error_(net::OK),
         size_(contents.size()) {}
   FakeFileStreamReader(const std::string& contents, uint64_t size)
       : buffer_(new DrainableIOBuffer(
             new net::StringIOBuffer(
-                scoped_ptr<std::string>(new std::string(contents))),
+                std::unique_ptr<std::string>(new std::string(contents))),
             contents.size())),
         net_error_(net::OK),
         size_(size) {}
@@ -290,21 +292,21 @@
                                  const base::Time& expected_modification_time));
   // Since we're returning a move-only type, we have to do some delegation for
   // gmock.
-  scoped_ptr<FileStreamReader> CreateForLocalFile(
+  std::unique_ptr<FileStreamReader> CreateForLocalFile(
       base::TaskRunner* task_runner,
       const base::FilePath& file_path,
       int64_t initial_offset,
       const base::Time& expected_modification_time) override {
-    return make_scoped_ptr(CreateForLocalFileMock(
+    return base::WrapUnique(CreateForLocalFileMock(
         task_runner, file_path, initial_offset, expected_modification_time));
   }
 
-  scoped_ptr<FileStreamReader> CreateFileStreamReader(
+  std::unique_ptr<FileStreamReader> CreateFileStreamReader(
       const GURL& filesystem_url,
       int64_t offset,
       int64_t max_bytes_to_read,
       const base::Time& expected_modification_time) override {
-    return make_scoped_ptr(CreateFileStreamReaderMock(
+    return base::WrapUnique(CreateFileStreamReaderMock(
         filesystem_url, offset, max_bytes_to_read, expected_modification_time));
   }
 };
@@ -327,7 +329,8 @@
   void InitializeReader(BlobDataBuilder* builder) {
     blob_handle_ = builder ? context_.AddFinishedBlob(builder) : nullptr;
     provider_ = new MockFileStreamReaderProvider();
-    reader_.reset(new BlobReader(blob_handle_.get(), make_scoped_ptr(provider_),
+    reader_.reset(new BlobReader(blob_handle_.get(),
+                                 base::WrapUnique(provider_),
                                  message_loop_.task_runner().get()));
   }
 
@@ -385,10 +388,10 @@
   }
 
   BlobStorageContext context_;
-  scoped_ptr<BlobDataHandle> blob_handle_;
+  std::unique_ptr<BlobDataHandle> blob_handle_;
   MockFileStreamReaderProvider* provider_ = nullptr;
   base::MessageLoop message_loop_;
-  scoped_ptr<BlobReader> reader_;
+  std::unique_ptr<BlobReader> reader_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(BlobReaderTest);
@@ -482,7 +485,7 @@
 }
 
 TEST_F(BlobReaderTest, BasicDiskCache) {
-  scoped_ptr<disk_cache::Backend> cache =
+  std::unique_ptr<disk_cache::Backend> cache =
       CreateInMemoryDiskCache(message_loop_.task_runner());
   ASSERT_TRUE(cache);
 
@@ -654,7 +657,7 @@
   b.AppendFile(kPath, 0, kData.size(), kTime);
   this->InitializeReader(&b);
 
-  scoped_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData));
+  std::unique_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData));
   reader->SetAsyncRunner(message_loop_.task_runner().get());
 
   ExpectLocalFileCall(kPath, kTime, 0, reader.release());
@@ -689,7 +692,7 @@
   b.AppendFileSystemFile(kURL, 0, kData.size(), kTime);
   this->InitializeReader(&b);
 
-  scoped_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData));
+  std::unique_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData));
   reader->SetAsyncRunner(message_loop_.task_runner().get());
 
   ExpectFileSystemCall(kURL, 0, kData.size(), kTime, reader.release());
@@ -717,7 +720,7 @@
 }
 
 TEST_F(BlobReaderTest, DiskCacheAsync) {
-  scoped_ptr<disk_cache::Backend> cache =
+  std::unique_ptr<disk_cache::Backend> cache =
       CreateInMemoryDiskCache(message_loop_.task_runner());
   ASSERT_TRUE(cache);
 
@@ -725,7 +728,7 @@
   const std::string kData = "Test Blob Data";
   scoped_refptr<BlobDataBuilder::DataHandle> data_handle =
       new EmptyDataHandle();
-  scoped_ptr<DelayedReadEntry> delayed_read_entry(new DelayedReadEntry(
+  std::unique_ptr<DelayedReadEntry> delayed_read_entry(new DelayedReadEntry(
       CreateDiskCacheEntry(cache.get(), "test entry", kData)));
   b.AppendDiskCacheEntry(data_handle, delayed_read_entry.get(),
                          kTestDiskCacheStreamIndex);
@@ -764,7 +767,7 @@
   b.AppendFile(kPath, 0, kData.size(), kTime);
   this->InitializeReader(&b);
 
-  scoped_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData));
+  std::unique_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData));
   reader->SetAsyncRunner(message_loop_.task_runner().get());
   ExpectLocalFileCall(kPath, kTime, 0, reader.release());
 
@@ -795,7 +798,7 @@
 }
 
 TEST_F(BlobReaderTest, DiskCacheRange) {
-  scoped_ptr<disk_cache::Backend> cache =
+  std::unique_ptr<disk_cache::Backend> cache =
       CreateInMemoryDiskCache(message_loop_.task_runner());
   ASSERT_TRUE(cache);
 
@@ -858,14 +861,14 @@
   current_value = 0;
   for (size_t i = 0; i < kNumItems; i++) {
     uint64_t offset = i % 3 == 0 ? 1 : 0;
-    scoped_ptr<char[]> buf(new char[kItemSize + offset]);
+    std::unique_ptr<char[]> buf(new char[kItemSize + offset]);
     if (offset > 0) {
       memset(buf.get(), 7, offset);
     }
     for (size_t j = 0; j < kItemSize; j++) {
       buf.get()[j + offset] = current_value++;
     }
-    scoped_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(
+    std::unique_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(
         std::string(buf.get() + offset, kItemSize), kItemSize + offset));
     if (i % 4 != 0) {
       reader->SetAsyncRunner(message_loop_.task_runner().get());
@@ -905,7 +908,7 @@
 
 TEST_F(BlobReaderTest, MixedContent) {
   // Includes data, a file, and a disk cache entry.
-  scoped_ptr<disk_cache::Backend> cache =
+  std::unique_ptr<disk_cache::Backend> cache =
       CreateInMemoryDiskCache(message_loop_.task_runner());
   ASSERT_TRUE(cache);
 
@@ -931,7 +934,8 @@
 
   this->InitializeReader(&b);
 
-  scoped_ptr<FakeFileStreamReader> reader(new FakeFileStreamReader(kData1));
+  std::unique_ptr<FakeFileStreamReader> reader(
+      new FakeFileStreamReader(kData1));
   reader->SetAsyncRunner(message_loop_.task_runner().get());
   ExpectLocalFileCall(kData1Path, kTime, 0, reader.release());
 
@@ -1116,7 +1120,7 @@
   context_.CreatePendingBlob(kUuid, "", "");
   blob_handle_ = context_.GetBlobDataFromUUID(kUuid);
   provider_ = new MockFileStreamReaderProvider();
-  reader_.reset(new BlobReader(blob_handle_.get(), make_scoped_ptr(provider_),
+  reader_.reset(new BlobReader(blob_handle_.get(), base::WrapUnique(provider_),
                                message_loop_.task_runner().get()));
   int size_result = -1;
   EXPECT_EQ(BlobReader::Status::IO_PENDING,
@@ -1136,7 +1140,7 @@
   context_.CreatePendingBlob(kUuid, "", "");
   blob_handle_ = context_.GetBlobDataFromUUID(kUuid);
   provider_ = new MockFileStreamReaderProvider();
-  reader_.reset(new BlobReader(blob_handle_.get(), make_scoped_ptr(provider_),
+  reader_.reset(new BlobReader(blob_handle_.get(), base::WrapUnique(provider_),
                                message_loop_.task_runner().get()));
   int size_result = -1;
   EXPECT_EQ(BlobReader::Status::IO_PENDING,
diff --git a/content/browser/fileapi/blob_storage_context_unittest.cc b/content/browser/fileapi/blob_storage_context_unittest.cc
index 74e10d0..47aa013 100644
--- a/content/browser/fileapi/blob_storage_context_unittest.cc
+++ b/content/browser/fileapi/blob_storage_context_unittest.cc
@@ -7,12 +7,12 @@
 #include <stdint.h>
 
 #include <limits>
+#include <memory>
 #include <string>
 
 #include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/time/time.h"
@@ -49,8 +49,8 @@
   ~EmptyDataHandle() override {}
 };
 
-scoped_ptr<disk_cache::Backend> CreateInMemoryDiskCache() {
-  scoped_ptr<disk_cache::Backend> cache;
+std::unique_ptr<disk_cache::Backend> CreateInMemoryDiskCache() {
+  std::unique_ptr<disk_cache::Backend> cache;
   net::TestCompletionCallback callback;
   int rv = disk_cache::CreateCacheBackend(net::MEMORY_CACHE,
                                           net::CACHE_BACKEND_DEFAULT,
@@ -87,7 +87,7 @@
   BlobStorageContextTest() {}
   ~BlobStorageContextTest() override {}
 
-  scoped_ptr<BlobDataHandle> SetupBasicBlob(const std::string& id) {
+  std::unique_ptr<BlobDataHandle> SetupBasicBlob(const std::string& id) {
     BlobDataBuilder builder(id);
     builder.AppendData("1", 1);
     builder.set_content_type("text/plain");
@@ -102,7 +102,7 @@
 
   // Build up a basic blob.
   const std::string kId("id");
-  scoped_ptr<BlobDataHandle> blob_data_handle = SetupBasicBlob(kId);
+  std::unique_ptr<BlobDataHandle> blob_data_handle = SetupBasicBlob(kId);
 
   // Do an extra increment to keep it around after we kill the handle.
   context_.IncrementBlobRefCount(kId);
@@ -141,11 +141,12 @@
 
   // Build up a basic blob.
   const std::string kId("id");
-  scoped_ptr<BlobDataHandle> blob_data_handle = SetupBasicBlob(kId);
+  std::unique_ptr<BlobDataHandle> blob_data_handle = SetupBasicBlob(kId);
   EXPECT_TRUE(blob_data_handle);
 
   // Get another handle
-  scoped_ptr<BlobDataHandle> another_handle = context_.GetBlobDataFromUUID(kId);
+  std::unique_ptr<BlobDataHandle> another_handle =
+      context_.GetBlobDataFromUUID(kId);
   EXPECT_TRUE(another_handle);
 
   // Should disappear after dropping both handles.
@@ -180,10 +181,10 @@
 
   EXPECT_EQ(0lu, context_.memory_usage());
 
-  scoped_ptr<BlobDataHandle> blob_data_handle =
+  std::unique_ptr<BlobDataHandle> blob_data_handle =
       context_.AddFinishedBlob(&builder1);
   EXPECT_EQ(10lu, context_.memory_usage());
-  scoped_ptr<BlobDataHandle> blob_data_handle2 =
+  std::unique_ptr<BlobDataHandle> blob_data_handle2 =
       context_.AddFinishedBlob(&builder2);
   EXPECT_EQ(10lu, context_.memory_usage());
 
@@ -221,15 +222,15 @@
 
   BlobStorageContext context;
 
-  scoped_ptr<BlobDataHandle> blob_data_handle =
+  std::unique_ptr<BlobDataHandle> blob_data_handle =
       context_.AddFinishedBlob(&builder1);
-  scoped_ptr<BlobDataHandle> blob_data_handle2 =
+  std::unique_ptr<BlobDataHandle> blob_data_handle2 =
       context_.AddFinishedBlob(&builder2);
 
   ASSERT_TRUE(blob_data_handle);
   ASSERT_TRUE(blob_data_handle2);
-  scoped_ptr<BlobDataSnapshot> data1 = blob_data_handle->CreateSnapshot();
-  scoped_ptr<BlobDataSnapshot> data2 = blob_data_handle2->CreateSnapshot();
+  std::unique_ptr<BlobDataSnapshot> data1 = blob_data_handle->CreateSnapshot();
+  std::unique_ptr<BlobDataSnapshot> data2 = blob_data_handle2->CreateSnapshot();
   EXPECT_EQ(*data1, builder1);
   EXPECT_EQ(*data2, canonicalized_blob_data2);
   blob_data_handle.reset();
@@ -247,7 +248,7 @@
   BlobDataBuilder builder3(kId3);
   builder3.AppendBlob(kId2);
   builder3.AppendBlob(kId2);
-  scoped_ptr<BlobDataHandle> blob_data_handle3 =
+  std::unique_ptr<BlobDataHandle> blob_data_handle3 =
       context_.AddFinishedBlob(&builder3);
   blob_data_handle2.reset();
   base::RunLoop().RunUntilIdle();
@@ -255,7 +256,7 @@
   blob_data_handle2 = context_.GetBlobDataFromUUID(kId2);
   EXPECT_FALSE(blob_data_handle2);
   EXPECT_TRUE(blob_data_handle3);
-  scoped_ptr<BlobDataSnapshot> data3 = blob_data_handle3->CreateSnapshot();
+  std::unique_ptr<BlobDataSnapshot> data3 = blob_data_handle3->CreateSnapshot();
 
   BlobDataBuilder canonicalized_blob_data3(kId3Prime);
   canonicalized_blob_data3.AppendData("Data2");
@@ -287,14 +288,14 @@
   BlobDataBuilder builder2(kId2);
   builder2.AppendBlob(kId1, kLargeSize - kBlobLength, kBlobLength);
 
-  scoped_ptr<BlobDataHandle> blob_data_handle1 =
+  std::unique_ptr<BlobDataHandle> blob_data_handle1 =
       context_.AddFinishedBlob(&builder1);
-  scoped_ptr<BlobDataHandle> blob_data_handle2 =
+  std::unique_ptr<BlobDataHandle> blob_data_handle2 =
       context_.AddFinishedBlob(&builder2);
 
   ASSERT_TRUE(blob_data_handle1);
   ASSERT_TRUE(blob_data_handle2);
-  scoped_ptr<BlobDataSnapshot> data = blob_data_handle2->CreateSnapshot();
+  std::unique_ptr<BlobDataSnapshot> data = blob_data_handle2->CreateSnapshot();
   ASSERT_EQ(1u, data->items().size());
   const scoped_refptr<BlobDataItem> item = data->items()[0];
   EXPECT_EQ(kLargeSize - kBlobLength, item->offset());
@@ -313,7 +314,7 @@
   {
     BlobStorageContext context;
 
-    scoped_ptr<disk_cache::Backend> cache = CreateInMemoryDiskCache();
+    std::unique_ptr<disk_cache::Backend> cache = CreateInMemoryDiskCache();
     ASSERT_TRUE(cache);
 
     const std::string kTestBlobData = "Test Blob Data";
@@ -330,9 +331,9 @@
     builder.AppendDiskCacheEntry(
         data_handle, entry.get(), kTestDiskCacheStreamIndex);
 
-    scoped_ptr<BlobDataHandle> blob_data_handle =
+    std::unique_ptr<BlobDataHandle> blob_data_handle =
         context.AddFinishedBlob(&builder);
-    scoped_ptr<BlobDataSnapshot> data = blob_data_handle->CreateSnapshot();
+    std::unique_ptr<BlobDataSnapshot> data = blob_data_handle->CreateSnapshot();
     EXPECT_EQ(*data, builder);
     EXPECT_FALSE(data_handle->HasOneRef())
         << "Data handle was destructed while context and builder still exist.";
@@ -369,7 +370,7 @@
 
   BlobDataBuilder blob_data3(kId3);
   blob_data3.AppendData("Data4");
-  scoped_ptr<disk_cache::Backend> cache = CreateInMemoryDiskCache();
+  std::unique_ptr<disk_cache::Backend> cache = CreateInMemoryDiskCache();
   ASSERT_TRUE(cache);
   disk_cache::ScopedEntryPtr disk_cache_entry =
       CreateDiskCacheEntry(cache.get(), "another key", "Data5");
@@ -385,13 +386,13 @@
       base::FilePath(FILE_PATH_LITERAL("File2.txt")), 0, 20, time2);
 
   BlobStorageContext context;
-  scoped_ptr<BlobDataHandle> blob_data_handle;
+  std::unique_ptr<BlobDataHandle> blob_data_handle;
 
   // Test a blob referring to only data and a file.
   blob_data_handle = context_.AddFinishedBlob(&blob_data1);
 
   ASSERT_TRUE(blob_data_handle);
-  scoped_ptr<BlobDataSnapshot> data = blob_data_handle->CreateSnapshot();
+  std::unique_ptr<BlobDataSnapshot> data = blob_data_handle->CreateSnapshot();
   ASSERT_TRUE(blob_data_handle);
   EXPECT_EQ(*data, blob_data1);
 
@@ -417,16 +418,16 @@
 
   // Build up a basic blob.
   const std::string kId("id");
-  scoped_ptr<BlobDataHandle> first_handle = SetupBasicBlob(kId);
+  std::unique_ptr<BlobDataHandle> first_handle = SetupBasicBlob(kId);
 
   // Now register a url for that blob.
   GURL kUrl("blob:id");
   context_.RegisterPublicBlobURL(kUrl, kId);
-  scoped_ptr<BlobDataHandle> blob_data_handle =
+  std::unique_ptr<BlobDataHandle> blob_data_handle =
       context_.GetBlobDataFromPublicURL(kUrl);
   ASSERT_TRUE(blob_data_handle.get());
   EXPECT_EQ(kId, blob_data_handle->uuid());
-  scoped_ptr<BlobDataSnapshot> data = blob_data_handle->CreateSnapshot();
+  std::unique_ptr<BlobDataSnapshot> data = blob_data_handle->CreateSnapshot();
   blob_data_handle.reset();
   first_handle.reset();
   base::RunLoop().RunUntilIdle();
@@ -463,7 +464,7 @@
   BlobDataBuilder builder(kReferencingId);
   builder.AppendData("data");
   builder.AppendBlob(kUnknownId);
-  scoped_ptr<BlobDataHandle> handle = context_.AddFinishedBlob(builder);
+  std::unique_ptr<BlobDataHandle> handle = context_.AddFinishedBlob(builder);
   EXPECT_TRUE(handle->IsBroken());
   EXPECT_TRUE(context_.registry().HasEntry(kReferencingId));
   handle.reset();
diff --git a/content/browser/fileapi/blob_url_request_job_unittest.cc b/content/browser/fileapi/blob_url_request_job_unittest.cc
index bdb430f..dd17549 100644
--- a/content/browser/fileapi/blob_url_request_job_unittest.cc
+++ b/content/browser/fileapi/blob_url_request_job_unittest.cc
@@ -5,14 +5,15 @@
 #include <stdint.h>
 
 #include <limits>
+#include <memory>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
@@ -73,8 +74,8 @@
   ~EmptyDataHandle() override {}
 };
 
-scoped_ptr<disk_cache::Backend> CreateInMemoryDiskCache() {
-  scoped_ptr<disk_cache::Backend> cache;
+std::unique_ptr<disk_cache::Backend> CreateInMemoryDiskCache() {
+  std::unique_ptr<disk_cache::Backend> cache;
   net::TestCompletionCallback callback;
   int rv = disk_cache::CreateCacheBackend(net::MEMORY_CACHE,
                                           net::CACHE_BACKEND_DEFAULT,
@@ -154,7 +155,7 @@
         disk_cache_backend_.get(), kTestDiskCacheKey, kTestDiskCacheData);
 
     url_request_job_factory_.SetProtocolHandler(
-        "blob", make_scoped_ptr(new MockProtocolHandler(this)));
+        "blob", base::WrapUnique(new MockProtocolHandler(this)));
     url_request_context_.set_job_factory(&url_request_job_factory_);
   }
 
@@ -297,7 +298,7 @@
   // Otherwise, this will fail a CHECK.
   int64_t GetTotalBlobLength() {
     int64_t total = 0;
-    scoped_ptr<BlobDataSnapshot> data =
+    std::unique_ptr<BlobDataSnapshot> data =
         GetHandleFromBuilder()->CreateSnapshot();
     const auto& items = data->items();
     for (const auto& item : items) {
@@ -320,20 +321,20 @@
   base::Time temp_file_system_file_modification_time1_;
   base::Time temp_file_system_file_modification_time2_;
 
-  scoped_ptr<disk_cache::Backend> disk_cache_backend_;
+  std::unique_ptr<disk_cache::Backend> disk_cache_backend_;
   disk_cache::ScopedEntryPtr disk_cache_entry_;
 
   base::MessageLoopForIO message_loop_;
   scoped_refptr<storage::FileSystemContext> file_system_context_;
 
   storage::BlobStorageContext blob_context_;
-  scoped_ptr<storage::BlobDataHandle> blob_handle_;
-  scoped_ptr<BlobDataBuilder> blob_data_;
-  scoped_ptr<BlobDataSnapshot> blob_data_snapshot_;
+  std::unique_ptr<storage::BlobDataHandle> blob_handle_;
+  std::unique_ptr<BlobDataBuilder> blob_data_;
+  std::unique_ptr<BlobDataSnapshot> blob_data_snapshot_;
   net::URLRequestJobFactoryImpl url_request_job_factory_;
   net::URLRequestContext url_request_context_;
   MockURLRequestDelegate url_request_delegate_;
-  scoped_ptr<net::URLRequest> request_;
+  std::unique_ptr<net::URLRequest> request_;
 
   int expected_status_code_;
   std::string expected_response_;
diff --git a/content/browser/fileapi/chrome_blob_storage_context.cc b/content/browser/fileapi/chrome_blob_storage_context.cc
index 8b9ed71..71424bce 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.cc
+++ b/content/browser/fileapi/chrome_blob_storage_context.cc
@@ -26,7 +26,7 @@
 
 class BlobHandleImpl : public BlobHandle {
  public:
-  explicit BlobHandleImpl(scoped_ptr<storage::BlobDataHandle> handle)
+  explicit BlobHandleImpl(std::unique_ptr<storage::BlobDataHandle> handle)
       : handle_(std::move(handle)) {}
 
   ~BlobHandleImpl() override {}
@@ -34,7 +34,7 @@
   std::string GetUUID() override { return handle_->uuid(); }
 
  private:
-  scoped_ptr<storage::BlobDataHandle> handle_;
+  std::unique_ptr<storage::BlobDataHandle> handle_;
 };
 
 }  // namespace
@@ -66,25 +66,26 @@
   context_.reset(new BlobStorageContext());
 }
 
-scoped_ptr<BlobHandle> ChromeBlobStorageContext::CreateMemoryBackedBlob(
-    const char* data, size_t length) {
+std::unique_ptr<BlobHandle> ChromeBlobStorageContext::CreateMemoryBackedBlob(
+    const char* data,
+    size_t length) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   std::string uuid(base::GenerateGUID());
   storage::BlobDataBuilder blob_data_builder(uuid);
   blob_data_builder.AppendData(data, length);
 
-  scoped_ptr<storage::BlobDataHandle> blob_data_handle =
+  std::unique_ptr<storage::BlobDataHandle> blob_data_handle =
       context_->AddFinishedBlob(&blob_data_builder);
   if (!blob_data_handle)
-    return scoped_ptr<BlobHandle>();
+    return std::unique_ptr<BlobHandle>();
 
-  scoped_ptr<BlobHandle> blob_handle(
+  std::unique_ptr<BlobHandle> blob_handle(
       new BlobHandleImpl(std::move(blob_data_handle)));
   return blob_handle;
 }
 
-scoped_ptr<BlobHandle> ChromeBlobStorageContext::CreateFileBackedBlob(
+std::unique_ptr<BlobHandle> ChromeBlobStorageContext::CreateFileBackedBlob(
     const base::FilePath& path,
     int64_t offset,
     int64_t size,
@@ -95,12 +96,12 @@
   storage::BlobDataBuilder blob_data_builder(uuid);
   blob_data_builder.AppendFile(path, offset, size, expected_modification_time);
 
-  scoped_ptr<storage::BlobDataHandle> blob_data_handle =
+  std::unique_ptr<storage::BlobDataHandle> blob_data_handle =
       context_->AddFinishedBlob(&blob_data_builder);
   if (!blob_data_handle)
-    return scoped_ptr<BlobHandle>();
+    return std::unique_ptr<BlobHandle>();
 
-  scoped_ptr<BlobHandle> blob_handle(
+  std::unique_ptr<BlobHandle> blob_handle(
       new BlobHandleImpl(std::move(blob_data_handle)));
   return blob_handle;
 }
diff --git a/content/browser/fileapi/chrome_blob_storage_context.h b/content/browser/fileapi/chrome_blob_storage_context.h
index 8dd1eec..bd02cb1 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.h
+++ b/content/browser/fileapi/chrome_blob_storage_context.h
@@ -8,8 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "content/common/content_export.h"
 
@@ -48,11 +49,11 @@
   storage::BlobStorageContext* context() const { return context_.get(); }
 
   // Returns a NULL scoped_ptr on failure.
-  scoped_ptr<BlobHandle> CreateMemoryBackedBlob(const char* data,
-                                                size_t length);
+  std::unique_ptr<BlobHandle> CreateMemoryBackedBlob(const char* data,
+                                                     size_t length);
 
   // Returns a NULL scoped_ptr on failure.
-  scoped_ptr<BlobHandle> CreateFileBackedBlob(
+  std::unique_ptr<BlobHandle> CreateFileBackedBlob(
       const base::FilePath& path,
       int64_t offset,
       int64_t size,
@@ -69,7 +70,7 @@
 
   void DeleteOnCorrectThread() const;
 
-  scoped_ptr<storage::BlobStorageContext> context_;
+  std::unique_ptr<storage::BlobStorageContext> context_;
 };
 
 struct ChromeBlobStorageContextDeleter {
diff --git a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
index 2b62b53..fd0327b 100644
--- a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
+++ b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
@@ -100,7 +100,7 @@
   }
 
   void SetMediaCopyOrMoveFileValidatorFactory(
-      scoped_ptr<storage::CopyOrMoveFileValidatorFactory> factory) {
+      std::unique_ptr<storage::CopyOrMoveFileValidatorFactory> factory) {
     TestFileSystemBackend* backend = static_cast<TestFileSystemBackend*>(
         file_system_context_->GetFileSystemBackend(kWithValidatorType));
     backend->InitializeCopyOrMoveFileValidatorFactory(std::move(factory));
@@ -281,7 +281,7 @@
                                            kNoValidatorType,
                                            kWithValidatorType);
   helper.SetUp();
-  scoped_ptr<CopyOrMoveFileValidatorFactory> factory(
+  std::unique_ptr<CopyOrMoveFileValidatorFactory> factory(
       new TestCopyOrMoveFileValidatorFactory(VALID));
   helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(factory));
 
@@ -294,7 +294,7 @@
                                            kNoValidatorType,
                                            kWithValidatorType);
   helper.SetUp();
-  scoped_ptr<CopyOrMoveFileValidatorFactory> factory(
+  std::unique_ptr<CopyOrMoveFileValidatorFactory> factory(
       new TestCopyOrMoveFileValidatorFactory(PRE_WRITE_INVALID));
   helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(factory));
 
@@ -308,11 +308,11 @@
                                            kNoValidatorType,
                                            kWithValidatorType);
   helper.SetUp();
-  scoped_ptr<CopyOrMoveFileValidatorFactory> reject_factory(
+  std::unique_ptr<CopyOrMoveFileValidatorFactory> reject_factory(
       new TestCopyOrMoveFileValidatorFactory(PRE_WRITE_INVALID));
   helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(reject_factory));
 
-  scoped_ptr<CopyOrMoveFileValidatorFactory> accept_factory(
+  std::unique_ptr<CopyOrMoveFileValidatorFactory> accept_factory(
       new TestCopyOrMoveFileValidatorFactory(VALID));
   helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(accept_factory));
 
@@ -325,7 +325,7 @@
                                            kNoValidatorType,
                                            kWithValidatorType);
   helper.SetUp();
-  scoped_ptr<CopyOrMoveFileValidatorFactory> factory(
+  std::unique_ptr<CopyOrMoveFileValidatorFactory> factory(
       new TestCopyOrMoveFileValidatorFactory(POST_WRITE_INVALID));
   helper.SetMediaCopyOrMoveFileValidatorFactory(std::move(factory));
 
diff --git a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
index 6e2fcca..d60ddebb 100644
--- a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
+++ b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
@@ -216,7 +216,7 @@
     if (dest_type_ == storage::kFileSystemTypeTest) {
       TestFileSystemBackend* test_backend =
           static_cast<TestFileSystemBackend*>(backend);
-      scoped_ptr<storage::CopyOrMoveFileValidatorFactory> factory(
+      std::unique_ptr<storage::CopyOrMoveFileValidatorFactory> factory(
           new TestValidatorFactory);
       test_backend->set_require_copy_or_move_validator(
           require_copy_or_move_validator);
@@ -738,11 +738,11 @@
   scoped_refptr<base::SingleThreadTaskRunner> task_runner =
       file_thread.task_runner();
 
-  scoped_ptr<storage::FileStreamReader> reader(
+  std::unique_ptr<storage::FileStreamReader> reader(
       storage::FileStreamReader::CreateForLocalFile(
           task_runner.get(), source_path, 0, base::Time()));
 
-  scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
+  std::unique_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
       task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
 
   std::vector<int64_t> progress;
@@ -794,11 +794,11 @@
   scoped_refptr<base::SingleThreadTaskRunner> task_runner =
       file_thread.task_runner();
 
-  scoped_ptr<storage::FileStreamReader> reader(
+  std::unique_ptr<storage::FileStreamReader> reader(
       storage::FileStreamReader::CreateForLocalFile(
           task_runner.get(), source_path, 0, base::Time()));
 
-  scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
+  std::unique_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
       task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
 
   std::vector<int64_t> progress;
@@ -845,11 +845,11 @@
   scoped_refptr<base::SingleThreadTaskRunner> task_runner =
       file_thread.task_runner();
 
-  scoped_ptr<storage::FileStreamReader> reader(
+  std::unique_ptr<storage::FileStreamReader> reader(
       storage::FileStreamReader::CreateForLocalFile(
           task_runner.get(), source_path, 0, base::Time()));
 
-  scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
+  std::unique_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
       task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
 
   std::vector<int64_t> progress;
diff --git a/content/browser/fileapi/dragged_file_util_unittest.cc b/content/browser/fileapi/dragged_file_util_unittest.cc
index 63ba54ab..fe18776f 100644
--- a/content/browser/fileapi/dragged_file_util_unittest.cc
+++ b/content/browser/fileapi/dragged_file_util_unittest.cc
@@ -5,6 +5,7 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <queue>
 #include <set>
 #include <string>
@@ -15,7 +16,7 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -251,8 +252,8 @@
     }
   }
 
-  scoped_ptr<storage::FileSystemOperationContext> GetOperationContext() {
-    return make_scoped_ptr(
+  std::unique_ptr<storage::FileSystemOperationContext> GetOperationContext() {
+    return base::WrapUnique(
         new storage::FileSystemOperationContext(file_system_context()));
   }
 
@@ -290,7 +291,7 @@
   std::string filesystem_id_;
   scoped_refptr<FileSystemContext> file_system_context_;
   std::map<base::FilePath, base::FilePath> toplevel_root_map_;
-  scoped_ptr<storage::DraggedFileUtil> file_util_;
+  std::unique_ptr<storage::DraggedFileUtil> file_util_;
   DISALLOW_COPY_AND_ASSIGN(DraggedFileUtilTest);
 };
 
diff --git a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
index 8a535bbdd..3749ef3 100644
--- a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -214,7 +214,7 @@
 
   void CreateDirectory(const base::StringPiece& dir_name) {
     base::FilePath path = base::FilePath().AppendASCII(dir_name);
-    scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewOperationContext());
     ASSERT_EQ(base::File::FILE_OK, file_util()->CreateDirectory(
         context.get(),
         CreateURL(path),
@@ -224,14 +224,14 @@
 
   void EnsureFileExists(const base::StringPiece file_name) {
     base::FilePath path = base::FilePath().AppendASCII(file_name);
-    scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewOperationContext());
     ASSERT_EQ(base::File::FILE_OK, file_util()->EnsureFileExists(
         context.get(), CreateURL(path), NULL));
   }
 
   void TruncateFile(const base::StringPiece file_name, int64_t length) {
     base::FilePath path = base::FilePath().AppendASCII(file_name);
-    scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewOperationContext());
     ASSERT_EQ(base::File::FILE_OK, file_util()->Truncate(
         context.get(), CreateURL(path), length));
   }
@@ -239,7 +239,7 @@
   base::File::Error GetFileInfo(const base::FilePath& path,
                                 base::File::Info* file_info,
                                 base::FilePath* platform_file_path) {
-    scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewOperationContext());
     return file_util()->GetFileInfo(context.get(),
                                     CreateURL(path),
                                     file_info, platform_file_path);
@@ -275,7 +275,7 @@
     }
 
     icu::UnicodeString date_ustr(match.group(7, status));
-    scoped_ptr<icu::DateFormat> formatter(
+    std::unique_ptr<icu::DateFormat> formatter(
         icu::DateFormat::createDateTimeInstance(icu::DateFormat::kShort));
     UErrorCode parse_status = U_ZERO_ERROR;
     UDate udate = formatter->parse(date_ustr, parse_status);
@@ -299,9 +299,9 @@
 
   base::ScopedTempDir temp_dir_;
   net::URLRequestContext empty_context_;
-  scoped_ptr<net::TestDelegate> delegate_;
-  scoped_ptr<net::URLRequest> request_;
-  scoped_ptr<FileSystemDirURLRequestJobFactory> job_factory_;
+  std::unique_ptr<net::TestDelegate> delegate_;
+  std::unique_ptr<net::URLRequest> request_;
+  std::unique_ptr<FileSystemDirURLRequestJobFactory> job_factory_;
   scoped_refptr<MockSpecialStoragePolicy> special_storage_policy_;
   scoped_refptr<FileSystemContext> file_system_context_;
   base::WeakPtrFactory<FileSystemDirURLRequestJobTest> weak_factory_;
diff --git a/content/browser/fileapi/file_system_file_stream_reader_unittest.cc b/content/browser/fileapi/file_system_file_stream_reader_unittest.cc
index acb3650..3acd3f53 100644
--- a/content/browser/fileapi/file_system_file_stream_reader_unittest.cc
+++ b/content/browser/fileapi/file_system_file_stream_reader_unittest.cc
@@ -8,11 +8,11 @@
 #include <stdint.h>
 
 #include <limits>
+#include <memory>
 #include <string>
 
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "content/public/test/async_file_test_helper.h"
 #include "content/public/test/test_file_system_context.h"
@@ -145,7 +145,7 @@
 
 TEST_F(FileSystemFileStreamReaderTest, NonExistent) {
   const char kFileName[] = "nonexistent";
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kFileName, 0, base::Time()));
   int result = 0;
   std::string data;
@@ -158,7 +158,7 @@
   const char kFileName[] = "empty";
   WriteFile(kFileName, NULL, 0, NULL);
 
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kFileName, 0, base::Time()));
   int result = 0;
   std::string data;
@@ -174,7 +174,7 @@
 }
 
 TEST_F(FileSystemFileStreamReaderTest, GetLengthNormal) {
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 0, test_file_modification_time()));
   net::TestInt64CompletionCallback callback;
   int64_t result = reader->GetLength(callback.callback());
@@ -188,7 +188,7 @@
   base::Time fake_expected_modification_time =
       test_file_modification_time() - base::TimeDelta::FromSeconds(10);
 
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 0, fake_expected_modification_time));
   net::TestInt64CompletionCallback callback;
   int64_t result = reader->GetLength(callback.callback());
@@ -205,7 +205,7 @@
 }
 
 TEST_F(FileSystemFileStreamReaderTest, GetLengthWithOffset) {
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 3, base::Time()));
   net::TestInt64CompletionCallback callback;
   int64_t result = reader->GetLength(callback.callback());
@@ -216,7 +216,7 @@
 }
 
 TEST_F(FileSystemFileStreamReaderTest, ReadNormal) {
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 0, test_file_modification_time()));
   int result = 0;
   std::string data;
@@ -230,7 +230,7 @@
   base::Time fake_expected_modification_time =
       test_file_modification_time() - base::TimeDelta::FromSeconds(10);
 
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 0, fake_expected_modification_time));
   int result = 0;
   std::string data;
@@ -247,7 +247,7 @@
 }
 
 TEST_F(FileSystemFileStreamReaderTest, ReadWithOffset) {
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 3, base::Time()));
   int result = 0;
   std::string data;
@@ -257,7 +257,7 @@
 }
 
 TEST_F(FileSystemFileStreamReaderTest, DeleteWithUnfinishedRead) {
-  scoped_ptr<FileSystemFileStreamReader> reader(
+  std::unique_ptr<FileSystemFileStreamReader> reader(
       CreateFileReader(kTestFileName, 0, base::Time()));
 
   net::TestCompletionCallback callback;
diff --git a/content/browser/fileapi/file_system_operation_impl_unittest.cc b/content/browser/fileapi/file_system_operation_impl_unittest.cc
index 66891d1..59362ae 100644
--- a/content/browser/fileapi/file_system_operation_impl_unittest.cc
+++ b/content/browser/fileapi/file_system_operation_impl_unittest.cc
@@ -7,12 +7,14 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -113,12 +115,12 @@
     return &change_observer_;
   }
 
-  scoped_ptr<FileSystemOperationContext> NewContext() {
+  std::unique_ptr<FileSystemOperationContext> NewContext() {
     FileSystemOperationContext* context =
         sandbox_file_system_.NewOperationContext();
     // Grant enough quota for all test cases.
     context->set_allowed_bytes_growth(1000000);
-    return make_scoped_ptr(context);
+    return base::WrapUnique(context);
   }
 
   FileSystemURL URLForPath(const std::string& path) const {
diff --git a/content/browser/fileapi/file_system_operation_impl_write_unittest.cc b/content/browser/fileapi/file_system_operation_impl_write_unittest.cc
index 34ed554..76e3109a 100644
--- a/content/browser/fileapi/file_system_operation_impl_write_unittest.cc
+++ b/content/browser/fileapi/file_system_operation_impl_write_unittest.cc
@@ -3,12 +3,13 @@
 // found in the LICENSE file.
 
 #include <stdint.h>
+
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
@@ -167,7 +168,7 @@
   int64_t bytes_written_;
   bool complete_;
 
-  scoped_ptr<MockBlobURLRequestContext> url_request_context_;
+  std::unique_ptr<MockBlobURLRequestContext> url_request_context_;
 
   storage::MockFileChangeObserver change_observer_;
   storage::ChangeObserverList change_observers_;
@@ -210,7 +211,7 @@
 
 
 TEST_F(FileSystemOperationImplWriteTest, TestWriteInvalidBlobUrl) {
-  scoped_ptr<storage::BlobDataHandle> null_handle;
+  std::unique_ptr<storage::BlobDataHandle> null_handle;
   file_system_context_->operation_runner()->Write(
       &url_request_context(), URLForPath(virtual_path_), std::move(null_handle),
       0, RecordWriteCallback());
diff --git a/content/browser/fileapi/file_system_quota_client_unittest.cc b/content/browser/fileapi/file_system_quota_client_unittest.cc
index a1e4f8d0..051cb2a 100644
--- a/content/browser/fileapi/file_system_quota_client_unittest.cc
+++ b/content/browser/fileapi/file_system_quota_client_unittest.cc
@@ -4,11 +4,12 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "content/public/test/async_file_test_helper.h"
 #include "content/public/test/test_file_system_context.h"
@@ -240,13 +241,13 @@
 };
 
 TEST_F(FileSystemQuotaClientTest, NoFileSystemTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
 
   EXPECT_EQ(0, GetOriginUsage(quota_client.get(), kDummyURL1, kTemporary));
 }
 
 TEST_F(FileSystemQuotaClientTest, NoFileTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
   };
@@ -258,7 +259,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, OneFileTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {false, "foo", 4921, kDummyURL1, kTemporary},
@@ -274,7 +275,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, TwoFilesTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {false, "foo", 10310, kDummyURL1, kTemporary},
@@ -291,7 +292,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, EmptyFilesTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {false, "foo", 0, kDummyURL1, kTemporary},
@@ -309,7 +310,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, SubDirectoryTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {true, "dirtest", 0, kDummyURL1, kTemporary},
@@ -327,7 +328,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, MultiTypeTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {true, "dirtest", 0, kDummyURL1, kTemporary},
@@ -355,7 +356,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, MultiDomainTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {true, "dir1", 0, kDummyURL1, kTemporary},
@@ -401,7 +402,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, GetUsage_MultipleTasks) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {false, "foo",   11, kDummyURL1, kTemporary},
@@ -431,7 +432,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, GetOriginsForType) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {true, NULL, 0, kDummyURL2, kTemporary},
@@ -447,7 +448,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, GetOriginsForHost) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const char* kURL1 = "http://foo.com/";
   const char* kURL2 = "https://foo.com/";
   const char* kURL3 = "http://foo.com:1/";
@@ -473,7 +474,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, IncognitoTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(true));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(true));
   const TestFile kFiles[] = {
     {true, NULL, 0, kDummyURL1, kTemporary},
     {false, "foo", 10, kDummyURL1, kTemporary},
@@ -492,7 +493,7 @@
 }
 
 TEST_F(FileSystemQuotaClientTest, DeleteOriginTest) {
-  scoped_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
+  std::unique_ptr<FileSystemQuotaClient> quota_client(NewQuotaClient(false));
   const TestFile kFiles[] = {
     {true, NULL,  0, "http://foo.com/",  kTemporary},
     {false, "a",  1, "http://foo.com/",  kTemporary},
diff --git a/content/browser/fileapi/file_system_url_request_job_unittest.cc b/content/browser/fileapi/file_system_url_request_job_unittest.cc
index 58ab33b6..5ef663b7 100644
--- a/content/browser/fileapi/file_system_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_url_request_job_unittest.cc
@@ -256,11 +256,11 @@
   scoped_refptr<storage::FileSystemContext> file_system_context_;
 
   net::URLRequestContext empty_context_;
-  scoped_ptr<FileSystemURLRequestJobFactory> job_factory_;
+  std::unique_ptr<FileSystemURLRequestJobFactory> job_factory_;
 
   // NOTE: order matters, request must die before delegate
-  scoped_ptr<net::TestDelegate> delegate_;
-  scoped_ptr<net::URLRequest> request_;
+  std::unique_ptr<net::TestDelegate> delegate_;
+  std::unique_ptr<net::URLRequest> request_;
 
   base::WeakPtrFactory<FileSystemURLRequestJobTest> weak_factory_;
 };
@@ -283,7 +283,7 @@
 
 TEST_F(FileSystemURLRequestJobTest, FileTestFullSpecifiedRange) {
   const size_t buffer_size = 4000;
-  scoped_ptr<char[]> buffer(new char[buffer_size]);
+  std::unique_ptr<char[]> buffer(new char[buffer_size]);
   FillBuffer(buffer.get(), buffer_size);
   WriteFile("bigfile", buffer.get(), buffer_size);
 
@@ -307,7 +307,7 @@
 
 TEST_F(FileSystemURLRequestJobTest, FileTestHalfSpecifiedRange) {
   const size_t buffer_size = 4000;
-  scoped_ptr<char[]> buffer(new char[buffer_size]);
+  std::unique_ptr<char[]> buffer(new char[buffer_size]);
   FillBuffer(buffer.get(), buffer_size);
   WriteFile("bigfile", buffer.get(), buffer_size);
 
diff --git a/content/browser/fileapi/file_writer_delegate_unittest.cc b/content/browser/fileapi/file_writer_delegate_unittest.cc
index c12e3c3e..14c3811 100644
--- a/content/browser/fileapi/file_writer_delegate_unittest.cc
+++ b/content/browser/fileapi/file_writer_delegate_unittest.cc
@@ -130,8 +130,9 @@
             offset,
             *file_system_context_->GetUpdateObservers(kFileSystemType));
     writer->set_default_quota(allowed_growth);
-    return new FileWriterDelegate(scoped_ptr<storage::FileStreamWriter>(writer),
-                                  storage::FlushPolicy::FLUSH_ON_COMPLETION);
+    return new FileWriterDelegate(
+        std::unique_ptr<storage::FileStreamWriter>(writer),
+        storage::FlushPolicy::FLUSH_ON_COMPLETION);
   }
 
   FileWriterDelegate::DelegateWriteCallback GetWriteCallback(Result* result) {
@@ -156,9 +157,9 @@
   scoped_refptr<storage::FileSystemContext> file_system_context_;
 
   net::URLRequestContext empty_context_;
-  scoped_ptr<FileWriterDelegate> file_writer_delegate_;
-  scoped_ptr<net::URLRequest> request_;
-  scoped_ptr<BlobURLRequestJobFactory> job_factory_;
+  std::unique_ptr<FileWriterDelegate> file_writer_delegate_;
+  std::unique_ptr<net::URLRequest> request_;
+  std::unique_ptr<BlobURLRequestJobFactory> job_factory_;
 
   base::ScopedTempDir dir_;
 
@@ -359,8 +360,8 @@
 }
 
 TEST_F(FileWriterDelegateTest, WriteSuccessWithoutQuotaLimitConcurrent) {
-  scoped_ptr<FileWriterDelegate> file_writer_delegate2;
-  scoped_ptr<net::URLRequest> request2;
+  std::unique_ptr<FileWriterDelegate> file_writer_delegate2;
+  std::unique_ptr<net::URLRequest> request2;
 
   ASSERT_EQ(base::File::FILE_OK,
             AsyncFileTestHelper::CreateFile(file_system_context_.get(),
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 318d956..b658927d 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/fileapi/fileapi_message_filter.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -12,7 +13,6 @@
 #include "base/files/file_path.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sequenced_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/threading/thread.h"
@@ -387,7 +387,7 @@
     return;
   }
 
-  scoped_ptr<storage::BlobDataHandle> blob =
+  std::unique_ptr<storage::BlobDataHandle> blob =
       blob_storage_context_->context()->GetBlobDataFromUUID(blob_uuid);
 
   operations_[request_id] = operation_runner()->Write(
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h
index 7f0a20f34..c49aca6 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -208,7 +208,7 @@
   scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
   scoped_refptr<StreamContext> stream_context_;
 
-  scoped_ptr<storage::FileSystemOperationRunner> operation_runner_;
+  std::unique_ptr<storage::FileSystemOperationRunner> operation_runner_;
 
   // Keep track of stream URLs registered in this process. Need to unregister
   // all of them when the renderer process dies.
diff --git a/content/browser/fileapi/fileapi_message_filter_unittest.cc b/content/browser/fileapi/fileapi_message_filter_unittest.cc
index b7d61e3..2115180e 100644
--- a/content/browser/fileapi/fileapi_message_filter_unittest.cc
+++ b/content/browser/fileapi/fileapi_message_filter_unittest.cc
@@ -245,7 +245,7 @@
 
   const std::string kFakeData = "foobarbaz";
 
-  scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
+  std::unique_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
   ASSERT_TRUE(shared_memory->CreateAndMapAnonymous(kFakeData.size()));
   memcpy(shared_memory->memory(), kFakeData.data(), kFakeData.size());
   StreamHostMsg_SyncAppendSharedMemory append_message(
diff --git a/content/browser/fileapi/local_file_stream_reader_unittest.cc b/content/browser/fileapi/local_file_stream_reader_unittest.cc
index 2404d655..be015f7 100644
--- a/content/browser/fileapi/local_file_stream_reader_unittest.cc
+++ b/content/browser/fileapi/local_file_stream_reader_unittest.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/files/file.h"
@@ -15,7 +16,6 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread.h"
@@ -131,7 +131,7 @@
 
 TEST_F(LocalFileStreamReaderTest, NonExistent) {
   base::FilePath nonexistent_path = test_dir().AppendASCII("nonexistent");
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(nonexistent_path, 0, base::Time()));
   int result = 0;
   std::string data;
@@ -146,7 +146,7 @@
   ASSERT_TRUE(file.IsValid());
   file.Close();
 
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(empty_path, 0, base::Time()));
   int result = 0;
   std::string data;
@@ -162,7 +162,7 @@
 }
 
 TEST_F(LocalFileStreamReaderTest, GetLengthNormal) {
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 0, test_file_modification_time()));
   net::TestInt64CompletionCallback callback;
   int64_t result = reader->GetLength(callback.callback());
@@ -176,7 +176,7 @@
   // from what we expect.
   TouchTestFile(base::TimeDelta::FromSeconds(-1));
 
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 0, test_file_modification_time()));
   net::TestInt64CompletionCallback callback;
   int64_t result = reader->GetLength(callback.callback());
@@ -193,7 +193,7 @@
 }
 
 TEST_F(LocalFileStreamReaderTest, GetLengthWithOffset) {
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 3, base::Time()));
   net::TestInt64CompletionCallback callback;
   int64_t result = reader->GetLength(callback.callback());
@@ -204,7 +204,7 @@
 }
 
 TEST_F(LocalFileStreamReaderTest, ReadNormal) {
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 0, test_file_modification_time()));
   int result = 0;
   std::string data;
@@ -218,7 +218,7 @@
   // from what we expect. Note that the resolution on some filesystems
   // is 1s so we can't test with deltas less than that.
   TouchTestFile(base::TimeDelta::FromSeconds(-1));
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 0, test_file_modification_time()));
   int result = 0;
   std::string data;
@@ -253,7 +253,7 @@
 }
 
 TEST_F(LocalFileStreamReaderTest, ReadWithOffset) {
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 3, base::Time()));
   int result = 0;
   std::string data;
@@ -263,7 +263,7 @@
 }
 
 TEST_F(LocalFileStreamReaderTest, DeleteWithUnfinishedRead) {
-  scoped_ptr<LocalFileStreamReader> reader(
+  std::unique_ptr<LocalFileStreamReader> reader(
       CreateFileReader(test_path(), 0, base::Time()));
 
   net::TestCompletionCallback callback;
diff --git a/content/browser/fileapi/local_file_stream_writer_unittest.cc b/content/browser/fileapi/local_file_stream_writer_unittest.cc
index a6d8b996..fbf076f 100644
--- a/content/browser/fileapi/local_file_stream_writer_unittest.cc
+++ b/content/browser/fileapi/local_file_stream_writer_unittest.cc
@@ -6,13 +6,13 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread.h"
@@ -101,7 +101,7 @@
 
 TEST_F(LocalFileStreamWriterTest, Write) {
   base::FilePath path = CreateFileWithContent("file_a", std::string());
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
   EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
   EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "bar"));
   writer.reset();
@@ -112,7 +112,7 @@
 
 TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
   base::FilePath path = CreateFileWithContent("file_a", "foobar");
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 2));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 2));
   EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
   writer.reset();
   base::RunLoop().RunUntilIdle();
@@ -122,7 +122,7 @@
 
 TEST_F(LocalFileStreamWriterTest, WriteEnd) {
   base::FilePath path = CreateFileWithContent("file_a", "foobar");
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 6));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 6));
   EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
   writer.reset();
   base::RunLoop().RunUntilIdle();
@@ -133,7 +133,7 @@
 TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
   base::FilePath path = Path("file_a");
   ASSERT_FALSE(base::PathExists(path));
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
   EXPECT_EQ(net::ERR_FILE_NOT_FOUND, WriteStringToWriter(writer.get(), "foo"));
   writer.reset();
   base::RunLoop().RunUntilIdle();
@@ -142,7 +142,7 @@
 
 TEST_F(LocalFileStreamWriterTest, CancelBeforeOperation) {
   base::FilePath path = Path("file_a");
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
   // Cancel immediately fails when there's no in-flight operation.
   int cancel_result = writer->Cancel(base::Bind(&NeverCalled));
   EXPECT_EQ(net::ERR_UNEXPECTED, cancel_result);
@@ -150,7 +150,7 @@
 
 TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
   base::FilePath path = CreateFileWithContent("file_a", std::string());
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
   EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
 
   // Cancel immediately fails when there's no in-flight operation.
@@ -166,7 +166,7 @@
 
 TEST_F(LocalFileStreamWriterTest, CancelWrite) {
   base::FilePath path = CreateFileWithContent("file_a", "foobar");
-  scoped_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
+  std::unique_ptr<LocalFileStreamWriter> writer(CreateWriter(path, 0));
 
   scoped_refptr<net::StringIOBuffer> buffer(new net::StringIOBuffer("xxx"));
   int result =
diff --git a/content/browser/fileapi/local_file_util_unittest.cc b/content/browser/fileapi/local_file_util_unittest.cc
index 071a122..0085520 100644
--- a/content/browser/fileapi/local_file_util_unittest.cc
+++ b/content/browser/fileapi/local_file_util_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/files/file.h"
@@ -11,7 +12,6 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
@@ -80,7 +80,7 @@
 
   base::FilePath LocalPath(const char *file_name) {
     base::FilePath path;
-    scoped_ptr<FileSystemOperationContext> context(NewContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewContext());
     file_util()->GetLocalFilePath(context.get(), CreateURL(file_name), &path);
     return path;
   }
@@ -104,14 +104,14 @@
     int file_flags = base::File::FLAG_CREATE |
                      base::File::FLAG_WRITE | base::File::FLAG_ASYNC;
 
-    scoped_ptr<FileSystemOperationContext> context(NewContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewContext());
     return file_util()->CreateOrOpen(context.get(), CreateURL(file_name),
                                      file_flags);
   }
 
   base::File::Error EnsureFileExists(const char* file_name,
                                      bool* created) {
-    scoped_ptr<FileSystemOperationContext> context(NewContext());
+    std::unique_ptr<FileSystemOperationContext> context(NewContext());
     return file_util()->EnsureFileExists(context.get(),
                                          CreateURL(file_name), created);
   }
@@ -137,7 +137,7 @@
   EXPECT_TRUE(FileExists(file_name));
   EXPECT_EQ(0, GetSize(file_name));
 
-  scoped_ptr<FileSystemOperationContext> context(NewContext());
+  std::unique_ptr<FileSystemOperationContext> context(NewContext());
 }
 
 // base::CreateSymbolicLink is only supported on POSIX.
@@ -157,7 +157,7 @@
   ASSERT_TRUE(FileExists(symlink_name));
 
   // Try to open the symlink file which should fail.
-  scoped_ptr<FileSystemOperationContext> context(NewContext());
+  std::unique_ptr<FileSystemOperationContext> context(NewContext());
   FileSystemURL url = CreateURL(symlink_name);
   int file_flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
   base::File file = file_util()->CreateOrOpen(context.get(), url, file_flags);
@@ -185,7 +185,7 @@
   ASSERT_TRUE(file.IsValid());
   ASSERT_TRUE(file.created());
 
-  scoped_ptr<FileSystemOperationContext> context(NewContext());
+  std::unique_ptr<FileSystemOperationContext> context(NewContext());
 
   base::File::Info info;
   ASSERT_TRUE(base::GetFileInfo(LocalPath(file_name), &info));
@@ -205,7 +205,7 @@
 
 TEST_F(LocalFileUtilTest, TouchDirectory) {
   const char *dir_name = "test_dir";
-  scoped_ptr<FileSystemOperationContext> context(NewContext());
+  std::unique_ptr<FileSystemOperationContext> context(NewContext());
   ASSERT_EQ(base::File::FILE_OK,
             file_util()->CreateDirectory(context.get(),
                                         CreateURL(dir_name),
@@ -234,7 +234,7 @@
   ASSERT_EQ(base::File::FILE_OK, EnsureFileExists(file_name, &created));
   ASSERT_TRUE(created);
 
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
 
   context.reset(NewContext());
   ASSERT_EQ(base::File::FILE_OK,
@@ -252,7 +252,7 @@
   ASSERT_EQ(base::File::FILE_OK, EnsureFileExists(from_file, &created));
   ASSERT_TRUE(created);
 
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
   context.reset(NewContext());
   ASSERT_EQ(base::File::FILE_OK,
             file_util()->Truncate(context.get(), CreateURL(from_file), 1020));
@@ -285,7 +285,7 @@
   const char *to_dir = "todir";
   const char *to_file = "todir/fromfile";
   bool created;
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
 
   context.reset(NewContext());
   ASSERT_EQ(base::File::FILE_OK,
@@ -322,7 +322,7 @@
   bool created;
   ASSERT_EQ(base::File::FILE_OK, EnsureFileExists(from_file, &created));
   ASSERT_TRUE(created);
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
 
   context.reset(NewContext());
   ASSERT_EQ(base::File::FILE_OK,
@@ -348,7 +348,7 @@
   const char *to_dir = "todir";
   const char *to_file = "todir/fromfile";
   bool created;
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
 
   context.reset(NewContext());
   ASSERT_EQ(base::File::FILE_OK,
diff --git a/content/browser/fileapi/native_file_util_unittest.cc b/content/browser/fileapi/native_file_util_unittest.cc
index 5a91454..4c9b517 100644
--- a/content/browser/fileapi/native_file_util_unittest.cc
+++ b/content/browser/fileapi/native_file_util_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 
 #include "base/files/file.h"
@@ -11,7 +12,6 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "storage/browser/fileapi/native_file_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -169,7 +169,7 @@
             NativeFileUtil::EnsureFileExists(path_121, &created));
 
   {
-    scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator =
+    std::unique_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator =
         NativeFileUtil::CreateFileEnumerator(Path(), false);
     std::set<base::FilePath> set;
     set.insert(path_1);
@@ -181,9 +181,9 @@
   }
 
   {
-    scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator =
+    std::unique_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator =
         NativeFileUtil::CreateFileEnumerator(Path(), true);
-        std::set<base::FilePath> set;
+    std::set<base::FilePath> set;
     set.insert(path_1);
     set.insert(path_2);
     set.insert(path_11);
diff --git a/content/browser/fileapi/obfuscated_file_util_unittest.cc b/content/browser/fileapi/obfuscated_file_util_unittest.cc
index 8d434fa1..2a2cf7d4 100644
--- a/content/browser/fileapi/obfuscated_file_util_unittest.cc
+++ b/content/browser/fileapi/obfuscated_file_util_unittest.cc
@@ -4,7 +4,9 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
 #include <limits>
+#include <memory>
 #include <set>
 #include <string>
 #include <utility>
@@ -16,7 +18,6 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "build/build_config.h"
@@ -187,15 +188,15 @@
     sandbox_file_system_.TearDown();
   }
 
-  scoped_ptr<FileSystemOperationContext> LimitedContext(
+  std::unique_ptr<FileSystemOperationContext> LimitedContext(
       int64_t allowed_bytes_growth) {
-    scoped_ptr<FileSystemOperationContext> context(
+    std::unique_ptr<FileSystemOperationContext> context(
         sandbox_file_system_.NewOperationContext());
     context->set_allowed_bytes_growth(allowed_bytes_growth);
     return context;
   }
 
-  scoped_ptr<FileSystemOperationContext> UnlimitedContext() {
+  std::unique_ptr<FileSystemOperationContext> UnlimitedContext() {
     return LimitedContext(std::numeric_limits<int64_t>::max());
   }
 
@@ -234,11 +235,12 @@
     return file_system;
   }
 
-  scoped_ptr<ObfuscatedFileUtil> CreateObfuscatedFileUtil(
+  std::unique_ptr<ObfuscatedFileUtil> CreateObfuscatedFileUtil(
       storage::SpecialStoragePolicy* storage_policy) {
-    return scoped_ptr<ObfuscatedFileUtil>(ObfuscatedFileUtil::CreateForTesting(
-        storage_policy, data_dir_path(), NULL,
-        base::ThreadTaskRunnerHandle::Get().get()));
+    return std::unique_ptr<ObfuscatedFileUtil>(
+        ObfuscatedFileUtil::CreateForTesting(
+            storage_policy, data_dir_path(), NULL,
+            base::ThreadTaskRunnerHandle::Get().get()));
   }
 
   ObfuscatedFileUtil* ofu() {
@@ -292,7 +294,7 @@
   }
 
   bool PathExists(const FileSystemURL& url) {
-    scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+    std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
     base::File::Info file_info;
     base::FilePath platform_path;
     base::File::Error error = ofu()->GetFileInfo(
@@ -322,7 +324,7 @@
   }
 
   void CheckFileAndCloseHandle(const FileSystemURL& url, base::File file) {
-    scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+    std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
     base::FilePath local_path;
     EXPECT_EQ(base::File::FILE_OK,
               ofu()->GetLocalFilePath(context.get(), url, &local_path));
@@ -377,7 +379,7 @@
       const FileSystemURL& root_url,
       const std::set<base::FilePath::StringType>& files,
       const std::set<base::FilePath::StringType>& directories) {
-    scoped_ptr<FileSystemOperationContext> context;
+    std::unique_ptr<FileSystemOperationContext> context;
     std::set<base::FilePath::StringType>::const_iterator iter;
     for (iter = files.begin(); iter != files.end(); ++iter) {
       bool created = true;
@@ -397,7 +399,7 @@
 
   class UsageVerifyHelper {
    public:
-    UsageVerifyHelper(scoped_ptr<FileSystemOperationContext> context,
+    UsageVerifyHelper(std::unique_ptr<FileSystemOperationContext> context,
                       SandboxFileSystemTestHelper* file_system,
                       int64_t expected_usage)
         : context_(std::move(context)),
@@ -419,22 +421,23 @@
                 sandbox_file_system_->GetCachedOriginUsage());
     }
 
-    scoped_ptr<FileSystemOperationContext> context_;
+    std::unique_ptr<FileSystemOperationContext> context_;
     SandboxFileSystemTestHelper* sandbox_file_system_;
     int64_t expected_usage_;
   };
 
-  scoped_ptr<UsageVerifyHelper> AllowUsageIncrease(int64_t requested_growth) {
-    int64_t usage = sandbox_file_system_.GetCachedOriginUsage();
-    return scoped_ptr<UsageVerifyHelper>(new UsageVerifyHelper(
-        LimitedContext(requested_growth),
-        &sandbox_file_system_, usage + requested_growth));
-  }
-
-  scoped_ptr<UsageVerifyHelper> DisallowUsageIncrease(
+  std::unique_ptr<UsageVerifyHelper> AllowUsageIncrease(
       int64_t requested_growth) {
     int64_t usage = sandbox_file_system_.GetCachedOriginUsage();
-    return scoped_ptr<UsageVerifyHelper>(new UsageVerifyHelper(
+    return std::unique_ptr<UsageVerifyHelper>(
+        new UsageVerifyHelper(LimitedContext(requested_growth),
+                              &sandbox_file_system_, usage + requested_growth));
+  }
+
+  std::unique_ptr<UsageVerifyHelper> DisallowUsageIncrease(
+      int64_t requested_growth) {
+    int64_t usage = sandbox_file_system_.GetCachedOriginUsage();
+    return std::unique_ptr<UsageVerifyHelper>(new UsageVerifyHelper(
         LimitedContext(requested_growth - 1), &sandbox_file_system_, usage));
   }
 
@@ -442,7 +445,7 @@
       const FileSystemURL& root_url,
       std::set<base::FilePath::StringType>* files,
       std::set<base::FilePath::StringType>* directories) {
-    scoped_ptr<FileSystemOperationContext> context;
+    std::unique_ptr<FileSystemOperationContext> context;
     std::vector<storage::DirectoryEntry> entries;
     EXPECT_EQ(base::File::FILE_OK,
               AsyncFileTestHelper::ReadDirectory(file_system_context(),
@@ -484,7 +487,7 @@
     std::set<base::FilePath::StringType> directories;
     FillTestDirectory(root_url, &files, &directories);
 
-    scoped_ptr<FileSystemOperationContext> context;
+    std::unique_ptr<FileSystemOperationContext> context;
     std::vector<storage::DirectoryEntry> entries;
     context.reset(NewContext(NULL));
     EXPECT_EQ(base::File::FILE_OK,
@@ -514,7 +517,7 @@
     base::Time last_access_time = base::Time::Now();
     base::Time last_modified_time = base::Time::Now();
 
-    scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+    std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
     EXPECT_EQ(base::File::FILE_OK,
               ofu()->Touch(context.get(), url, last_access_time,
                            last_modified_time));
@@ -560,7 +563,7 @@
     ASSERT_TRUE(file.SetLength(src_file_length));
     file.Close();
 
-    scoped_ptr<FileSystemOperationContext> context;
+    std::unique_ptr<FileSystemOperationContext> context;
 
     if (overwrite) {
       context.reset(NewContext(NULL));
@@ -609,14 +612,14 @@
   }
 
   void ClearTimestamp(const FileSystemURL& url) {
-    scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+    std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
     EXPECT_EQ(base::File::FILE_OK,
               ofu()->Touch(context.get(), url, base::Time(), base::Time()));
     EXPECT_EQ(base::Time(), GetModifiedTime(url));
   }
 
   base::Time GetModifiedTime(const FileSystemURL& url) {
-    scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+    std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
     base::FilePath data_path;
     base::File::Info file_info;
     context.reset(NewContext(NULL));
@@ -629,7 +632,7 @@
   void TestDirectoryTimestampHelper(const FileSystemURL& base_dir,
                                     bool copy,
                                     bool overwrite) {
-    scoped_ptr<FileSystemOperationContext> context;
+    std::unique_ptr<FileSystemOperationContext> context;
     const FileSystemURL src_dir_url(
         FileSystemURLAppendUTF8(base_dir, "foo_dir"));
     const FileSystemURL dest_dir_url(
@@ -674,7 +677,8 @@
   }
 
   void MaybeDropDatabasesAliveCaseTestBody() {
-    scoped_ptr<ObfuscatedFileUtil> file_util = CreateObfuscatedFileUtil(NULL);
+    std::unique_ptr<ObfuscatedFileUtil> file_util =
+        CreateObfuscatedFileUtil(NULL);
     file_util->InitOriginDatabase(GURL(), true /*create*/);
     ASSERT_TRUE(file_util->origin_database_ != NULL);
 
@@ -691,7 +695,8 @@
     // Run message loop after OFU is already deleted to make sure callback
     // doesn't cause a crash for use after free.
     {
-      scoped_ptr<ObfuscatedFileUtil> file_util = CreateObfuscatedFileUtil(NULL);
+      std::unique_ptr<ObfuscatedFileUtil> file_util =
+          CreateObfuscatedFileUtil(NULL);
       file_util->InitOriginDatabase(GURL(), true /*create*/);
       file_util->db_flush_delay_seconds_ = 0;
       file_util->MarkUsed();
@@ -703,8 +708,8 @@
 
   void DestroyDirectoryDatabase_IsolatedTestBody() {
     storage_policy_->AddIsolated(origin_);
-    scoped_ptr<ObfuscatedFileUtil> file_util = CreateObfuscatedFileUtil(
-        storage_policy_.get());
+    std::unique_ptr<ObfuscatedFileUtil> file_util =
+        CreateObfuscatedFileUtil(storage_policy_.get());
     const FileSystemURL url = FileSystemURL::CreateForTest(
         origin_, kFileSystemTypePersistent, base::FilePath());
 
@@ -721,8 +726,8 @@
 
   void GetDirectoryDatabase_IsolatedTestBody() {
     storage_policy_->AddIsolated(origin_);
-    scoped_ptr<ObfuscatedFileUtil> file_util = CreateObfuscatedFileUtil(
-        storage_policy_.get());
+    std::unique_ptr<ObfuscatedFileUtil> file_util =
+        CreateObfuscatedFileUtil(storage_policy_.get());
     const FileSystemURL url = FileSystemURL::CreateForTest(
         origin_, kFileSystemTypePersistent, base::FilePath());
 
@@ -767,8 +772,8 @@
     }
 
     storage_policy_->AddIsolated(origin_);
-    scoped_ptr<ObfuscatedFileUtil> file_util = CreateObfuscatedFileUtil(
-        storage_policy_.get());
+    std::unique_ptr<ObfuscatedFileUtil> file_util =
+        CreateObfuscatedFileUtil(storage_policy_.get());
     base::File::Error error = base::File::FILE_ERROR_FAILED;
     base::FilePath origin_directory = file_util->GetDirectoryForOrigin(
         origin_, true /* create */, &error);
@@ -820,7 +825,7 @@
 
 TEST_F(ObfuscatedFileUtilTest, TestCreateAndDeleteFile) {
   FileSystemURL url = CreateURLFromUTF8("fake/file");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   int file_flags = base::File::FLAG_CREATE | base::File::FLAG_WRITE;
 
   base::File file = ofu()->CreateOrOpen(context.get(), url, file_flags);
@@ -906,7 +911,7 @@
 TEST_F(ObfuscatedFileUtilTest, TestTruncate) {
   bool created = false;
   FileSystemURL url = CreateURLFromUTF8("file");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND,
             ofu()->Truncate(context.get(), url, 4));
@@ -974,7 +979,7 @@
 
   // quota exceeded
   {
-    scoped_ptr<UsageVerifyHelper> helper = AllowUsageIncrease(-1);
+    std::unique_ptr<UsageVerifyHelper> helper = AllowUsageIncrease(-1);
     helper->context()->set_allowed_bytes_growth(
         helper->context()->allowed_bytes_growth() - 1);
     EXPECT_EQ(base::File::FILE_OK,
@@ -998,7 +1003,7 @@
 TEST_F(ObfuscatedFileUtilTest, TestEnsureFileExists) {
   FileSystemURL url = CreateURLFromUTF8("fake/file");
   bool created = false;
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND,
             ofu()->EnsureFileExists(context.get(), url, &created));
   EXPECT_TRUE(change_observer()->HasNoChange());
@@ -1051,7 +1056,7 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestDirectoryOps) {
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   bool exclusive = false;
   bool recursive = false;
@@ -1193,7 +1198,7 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestReadDirectory) {
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   bool exclusive = true;
   bool recursive = true;
   FileSystemURL url = CreateURLFromUTF8("directory/to/use");
@@ -1212,7 +1217,7 @@
 
 TEST_F(ObfuscatedFileUtilTest, TestReadDirectoryOnFile) {
   FileSystemURL url = CreateURLFromUTF8("file");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   bool created = false;
   ASSERT_EQ(base::File::FILE_OK,
@@ -1229,7 +1234,7 @@
 
 TEST_F(ObfuscatedFileUtilTest, TestTouch) {
   FileSystemURL url = CreateURLFromUTF8("file");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   base::Time last_access_time = base::Time::Now();
   base::Time last_modified_time = base::Time::Now();
@@ -1259,7 +1264,7 @@
 
 TEST_F(ObfuscatedFileUtilTest, TestPathQuotas) {
   FileSystemURL url = CreateURLFromUTF8("fake/file");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   url = CreateURLFromUTF8("file name");
   context->set_allowed_bytes_growth(5);
@@ -1297,7 +1302,7 @@
 TEST_F(ObfuscatedFileUtilTest, TestCopyOrMoveFileNotFound) {
   FileSystemURL source_url = CreateURLFromUTF8("path0.txt");
   FileSystemURL dest_url = CreateURLFromUTF8("path1.txt");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   bool is_copy_not_move = false;
   EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND,
@@ -1351,7 +1356,7 @@
       test_case.dest_path);
     SCOPED_TRACE(testing::Message() << "\t cause_overwrite " <<
       test_case.cause_overwrite);
-    scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+    std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
     bool exclusive = false;
     bool recursive = true;
@@ -1428,7 +1433,7 @@
 TEST_F(ObfuscatedFileUtilTest, TestCopyPathQuotas) {
   FileSystemURL src_url = CreateURLFromUTF8("src path");
   FileSystemURL dest_url = CreateURLFromUTF8("destination path");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   bool created = false;
   ASSERT_EQ(base::File::FILE_OK,
             ofu()->EnsureFileExists(context.get(), src_url, &created));
@@ -1458,7 +1463,7 @@
 TEST_F(ObfuscatedFileUtilTest, TestMovePathQuotasWithRename) {
   FileSystemURL src_url = CreateURLFromUTF8("src path");
   FileSystemURL dest_url = CreateURLFromUTF8("destination path");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   bool created = false;
   ASSERT_EQ(base::File::FILE_OK,
             ofu()->EnsureFileExists(context.get(), src_url, &created));
@@ -1494,7 +1499,7 @@
 
 TEST_F(ObfuscatedFileUtilTest, TestMovePathQuotasWithoutRename) {
   FileSystemURL src_url = CreateURLFromUTF8("src path");
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   bool created = false;
   ASSERT_EQ(base::File::FILE_OK,
             ofu()->EnsureFileExists(context.get(), src_url, &created));
@@ -1541,7 +1546,7 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestEnumerator) {
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   FileSystemURL src_url = CreateURLFromUTF8("source dir");
   bool exclusive = true;
   bool recursive = false;
@@ -1571,8 +1576,8 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestOriginEnumerator) {
-  scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator>
-      enumerator(ofu()->CreateOriginEnumerator());
+  std::unique_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enumerator(
+      ofu()->CreateOriginEnumerator());
   // The test helper starts out with a single filesystem.
   EXPECT_TRUE(enumerator.get());
   EXPECT_EQ(origin(), enumerator->Next());
@@ -1594,9 +1599,9 @@
     GURL origin_url(record.origin_url);
     origins_expected.insert(origin_url);
     if (record.has_temporary) {
-      scoped_ptr<SandboxFileSystemTestHelper> file_system(
+      std::unique_ptr<SandboxFileSystemTestHelper> file_system(
           NewFileSystem(origin_url, kFileSystemTypeTemporary));
-      scoped_ptr<FileSystemOperationContext> context(
+      std::unique_ptr<FileSystemOperationContext> context(
           NewContext(file_system.get()));
       bool created = false;
       ASSERT_EQ(base::File::FILE_OK,
@@ -1607,9 +1612,9 @@
       EXPECT_TRUE(created);
     }
     if (record.has_persistent) {
-      scoped_ptr<SandboxFileSystemTestHelper> file_system(
+      std::unique_ptr<SandboxFileSystemTestHelper> file_system(
           NewFileSystem(origin_url, kFileSystemTypePersistent));
-      scoped_ptr<FileSystemOperationContext> context(
+      std::unique_ptr<FileSystemOperationContext> context(
           NewContext(file_system.get()));
       bool created = false;
       ASSERT_EQ(base::File::FILE_OK,
@@ -1660,7 +1665,7 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestRevokeUsageCache) {
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
 
   int64_t expected_quota = 0;
 
@@ -1709,7 +1714,7 @@
   const FileSystemURL kPath1 = CreateURLFromUTF8("hoge");
   const FileSystemURL kPath2 = CreateURLFromUTF8("fuga");
 
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
   base::File::Info file_info;
   base::FilePath data_path;
   bool created = false;
@@ -1787,7 +1792,7 @@
     CreateURLFromUTF8("baz")
   };
   const FileSystemURL empty_path = CreateURL(base::FilePath());
-  scoped_ptr<FileSystemOperationContext> context;
+  std::unique_ptr<FileSystemOperationContext> context;
 
   for (size_t i = 0; i < arraysize(kPath); ++i) {
     bool created = false;
@@ -1816,7 +1821,7 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestDirectoryTimestampForCreation) {
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   const FileSystemURL dir_url = CreateURLFromUTF8("foo_dir");
 
   // Create working directory.
@@ -1941,7 +1946,7 @@
 }
 
 TEST_F(ObfuscatedFileUtilTest, TestDirectoryTimestampForDeletion) {
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   const FileSystemURL dir_url = CreateURLFromUTF8("foo_dir");
 
   // Create working directory.
@@ -2015,7 +2020,7 @@
   FileSystemURL url1 = FileSystemURLAppendUTF8(dir, "bar");
   FileSystemURL url2 = FileSystemURLAppendUTF8(dir, "baz");
 
-  scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
+  std::unique_ptr<FileSystemOperationContext> context(NewContext(NULL));
   EXPECT_EQ(base::File::FILE_OK,
             ofu()->CreateDirectory(context.get(), dir, false, false));
 
@@ -2042,8 +2047,8 @@
                          base::Time()));
 
   context.reset(NewContext(NULL));
-  scoped_ptr<storage::FileSystemFileUtil::AbstractFileEnumerator> file_enum(
-      ofu()->CreateFileEnumerator(context.get(), dir, false));
+  std::unique_ptr<storage::FileSystemFileUtil::AbstractFileEnumerator>
+      file_enum(ofu()->CreateFileEnumerator(context.get(), dir, false));
 
   int count = 0;
   base::FilePath file_path_each;
@@ -2156,8 +2161,8 @@
     old_obstacle_file_size = obstacle_file_size;
     obstacle_file_size = from_file_size;
     expected_total_file_size += obstacle_file_size - old_obstacle_file_size;
-    scoped_ptr<UsageVerifyHelper> helper = AllowUsageIncrease(
-        obstacle_file_size - old_obstacle_file_size);
+    std::unique_ptr<UsageVerifyHelper> helper =
+        AllowUsageIncrease(obstacle_file_size - old_obstacle_file_size);
     helper->context()->set_allowed_bytes_growth(
         helper->context()->allowed_bytes_growth() - 1);
     ASSERT_EQ(base::File::FILE_OK,
@@ -2265,7 +2270,7 @@
   obstacle_file_size = from_file_size;
   from_file_size = 0;
   expected_total_file_size -= old_obstacle_file_size;
-  scoped_ptr<FileSystemOperationContext> context =
+  std::unique_ptr<FileSystemOperationContext> context =
       LimitedContext(-old_obstacle_file_size - PathCost(from_file) - 1);
   ASSERT_EQ(base::File::FILE_OK,
             ofu()->CopyOrMoveFile(
@@ -2459,13 +2464,13 @@
   const GURL origin2("http://www.example.com:1234");
 
   // Create origin directories.
-  scoped_ptr<SandboxFileSystemTestHelper> fs1(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs1(
       NewFileSystem(origin1, kFileSystemTypeTemporary));
-  scoped_ptr<SandboxFileSystemTestHelper> fs2(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs2(
       NewFileSystem(origin1, kFileSystemTypePersistent));
-  scoped_ptr<SandboxFileSystemTestHelper> fs3(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs3(
       NewFileSystem(origin2, kFileSystemTypeTemporary));
-  scoped_ptr<SandboxFileSystemTestHelper> fs4(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs4(
       NewFileSystem(origin2, kFileSystemTypePersistent));
 
   // Make sure directories for origin1 exist.
@@ -2520,13 +2525,13 @@
   const GURL origin2("http://www.example.com:1234");
 
   // Create origin directories.
-  scoped_ptr<SandboxFileSystemTestHelper> fs1(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs1(
       NewFileSystem(origin1, kFileSystemTypeTemporary));
-  scoped_ptr<SandboxFileSystemTestHelper> fs2(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs2(
       NewFileSystem(origin1, kFileSystemTypePersistent));
-  scoped_ptr<SandboxFileSystemTestHelper> fs3(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs3(
       NewFileSystem(origin2, kFileSystemTypeTemporary));
-  scoped_ptr<SandboxFileSystemTestHelper> fs4(
+  std::unique_ptr<SandboxFileSystemTestHelper> fs4(
       NewFileSystem(origin2, kFileSystemTypePersistent));
 
   // Make sure directories for origin1 exist.
diff --git a/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc b/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc
index e875e87..d7648216 100644
--- a/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc
+++ b/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "content/public/test/async_file_test_helper.h"
diff --git a/content/browser/fileapi/recursive_operation_delegate_unittest.cc b/content/browser/fileapi/recursive_operation_delegate_unittest.cc
index 8c00f0c7..0df1ff3c 100644
--- a/content/browser/fileapi/recursive_operation_delegate_unittest.cc
+++ b/content/browser/fileapi/recursive_operation_delegate_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "storage/browser/fileapi/recursive_operation_delegate.h"
 
+#include <memory>
 #include <vector>
 
 #include "base/bind.h"
@@ -11,7 +12,7 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -154,12 +155,12 @@
 
   void TearDown() override { sandbox_file_system_.TearDown(); }
 
-  scoped_ptr<FileSystemOperationContext> NewContext() {
+  std::unique_ptr<FileSystemOperationContext> NewContext() {
     FileSystemOperationContext* context =
         sandbox_file_system_.NewOperationContext();
     // Grant enough quota for all test cases.
     context->set_allowed_bytes_growth(1000000);
-    return make_scoped_ptr(context);
+    return base::WrapUnique(context);
   }
 
   storage::FileSystemFileUtil* file_util() {
@@ -200,11 +201,10 @@
   FileSystemURL src_file(CreateFile("src"));
 
   base::File::Error error = base::File::FILE_ERROR_FAILED;
-  scoped_ptr<FileSystemOperationContext> context = NewContext();
-  scoped_ptr<LoggingRecursiveOperation> operation(
-      new LoggingRecursiveOperation(
-          context->file_system_context(), src_file,
-          base::Bind(&ReportStatus, &error)));
+  std::unique_ptr<FileSystemOperationContext> context = NewContext();
+  std::unique_ptr<LoggingRecursiveOperation> operation(
+      new LoggingRecursiveOperation(context->file_system_context(), src_file,
+                                    base::Bind(&ReportStatus, &error)));
   operation->RunRecursively();
   base::RunLoop().RunUntilIdle();
   ASSERT_EQ(base::File::FILE_OK, error);
@@ -225,11 +225,10 @@
   FileSystemURL src_file3(CreateFile("src/dir1/file3"));
 
   base::File::Error error = base::File::FILE_ERROR_FAILED;
-  scoped_ptr<FileSystemOperationContext> context = NewContext();
-  scoped_ptr<LoggingRecursiveOperation> operation(
-      new LoggingRecursiveOperation(
-          context->file_system_context(), src_root,
-          base::Bind(&ReportStatus, &error)));
+  std::unique_ptr<FileSystemOperationContext> context = NewContext();
+  std::unique_ptr<LoggingRecursiveOperation> operation(
+      new LoggingRecursiveOperation(context->file_system_context(), src_root,
+                                    base::Bind(&ReportStatus, &error)));
   operation->RunRecursively();
   base::RunLoop().RunUntilIdle();
   ASSERT_EQ(base::File::FILE_OK, error);
@@ -281,11 +280,10 @@
   FileSystemURL src_file2(CreateFile("src/dir1/file2"));
 
   base::File::Error error = base::File::FILE_ERROR_FAILED;
-  scoped_ptr<FileSystemOperationContext> context = NewContext();
-  scoped_ptr<LoggingRecursiveOperation> operation(
-      new LoggingRecursiveOperation(
-          context->file_system_context(), src_root,
-          base::Bind(&ReportStatus, &error)));
+  std::unique_ptr<FileSystemOperationContext> context = NewContext();
+  std::unique_ptr<LoggingRecursiveOperation> operation(
+      new LoggingRecursiveOperation(context->file_system_context(), src_root,
+                                    base::Bind(&ReportStatus, &error)));
   operation->RunRecursively();
 
   // Invoke Cancel(), after 5 times message posting.
@@ -302,8 +300,8 @@
   FileSystemURL src_file3(CreateFile("src/dir1/file3"));
 
   base::File::Error error = base::File::FILE_ERROR_FAILED;
-  scoped_ptr<FileSystemOperationContext> context = NewContext();
-  scoped_ptr<LoggingRecursiveOperation> operation(
+  std::unique_ptr<FileSystemOperationContext> context = NewContext();
+  std::unique_ptr<LoggingRecursiveOperation> operation(
       new LoggingRecursiveOperation(context->file_system_context(), src_root,
                                     base::Bind(&ReportStatus, &error)));
   operation->SetEntryToFail(src_file1);
@@ -338,8 +336,8 @@
   FileSystemURL src_file3(CreateFile("src/dir1/file3"));
 
   base::File::Error error = base::File::FILE_ERROR_FAILED;
-  scoped_ptr<FileSystemOperationContext> context = NewContext();
-  scoped_ptr<LoggingRecursiveOperation> operation(
+  std::unique_ptr<FileSystemOperationContext> context = NewContext();
+  std::unique_ptr<LoggingRecursiveOperation> operation(
       new LoggingRecursiveOperation(context->file_system_context(), src_root,
                                     base::Bind(&ReportStatus, &error)));
   operation->SetEntryToFail(src_file1);
diff --git a/content/browser/fileapi/sandbox_directory_database_unittest.cc b/content/browser/fileapi/sandbox_directory_database_unittest.cc
index 74148565..3539107 100644
--- a/content/browser/fileapi/sandbox_directory_database_unittest.cc
+++ b/content/browser/fileapi/sandbox_directory_database_unittest.cc
@@ -7,13 +7,14 @@
 #include <math.h>
 #include <stddef.h>
 #include <stdint.h>
+
 #include <limits>
+#include <memory>
 
 #include "base/files/file.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "content/browser/fileapi/sandbox_database_test_helper.h"
@@ -140,7 +141,7 @@
  protected:
   // Common temp base for nondestructive uses.
   base::ScopedTempDir base_;
-  scoped_ptr<SandboxDirectoryDatabase> db_;
+  std::unique_ptr<SandboxDirectoryDatabase> db_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabaseTest);
diff --git a/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
index d021229..db406f59 100644
--- a/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
+++ b/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
@@ -4,9 +4,10 @@
 
 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h"
 
+#include <memory>
+
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/public/test/test_file_system_options.h"
 #include "storage/browser/fileapi/file_system_url.h"
@@ -45,7 +46,7 @@
 
   base::ScopedTempDir data_dir_;
   base::MessageLoop message_loop_;
-  scoped_ptr<storage::SandboxFileSystemBackendDelegate> delegate_;
+  std::unique_ptr<storage::SandboxFileSystemBackendDelegate> delegate_;
 };
 
 TEST_F(SandboxFileSystemBackendDelegateTest, IsAccessValid) {
diff --git a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
index 2787be01..a07a6817 100644
--- a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
+++ b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
@@ -6,12 +6,12 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <set>
 
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/public/test/test_file_system_options.h"
@@ -130,14 +130,14 @@
 
   base::ScopedTempDir data_dir_;
   base::MessageLoop message_loop_;
-  scoped_ptr<storage::SandboxFileSystemBackendDelegate> delegate_;
-  scoped_ptr<storage::SandboxFileSystemBackend> backend_;
+  std::unique_ptr<storage::SandboxFileSystemBackendDelegate> delegate_;
+  std::unique_ptr<storage::SandboxFileSystemBackend> backend_;
 };
 
 TEST_F(SandboxFileSystemBackendTest, Empty) {
   SetUpNewBackend(CreateAllowFileAccessOptions());
-  scoped_ptr<SandboxFileSystemBackendDelegate::OriginEnumerator> enumerator(
-      CreateOriginEnumerator());
+  std::unique_ptr<SandboxFileSystemBackendDelegate::OriginEnumerator>
+      enumerator(CreateOriginEnumerator());
   ASSERT_TRUE(enumerator->Next().is_empty());
 }
 
@@ -169,8 +169,8 @@
     persistent_set.insert(GURL(persistent_origins[i]));
   }
 
-  scoped_ptr<SandboxFileSystemBackendDelegate::OriginEnumerator> enumerator(
-      CreateOriginEnumerator());
+  std::unique_ptr<SandboxFileSystemBackendDelegate::OriginEnumerator>
+      enumerator(CreateOriginEnumerator());
   size_t temporary_actual_size = 0;
   size_t persistent_actual_size = 0;
   GURL current;
diff --git a/content/browser/fileapi/sandbox_origin_database_unittest.cc b/content/browser/fileapi/sandbox_origin_database_unittest.cc
index ce89ae6..79ebb281 100644
--- a/content/browser/fileapi/sandbox_origin_database_unittest.cc
+++ b/content/browser/fileapi/sandbox_origin_database_unittest.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 #include <functional>
 #include <limits>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -15,7 +16,6 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "content/browser/fileapi/sandbox_database_test_helper.h"
 #include "storage/browser/fileapi/sandbox_origin_database.h"
@@ -213,7 +213,7 @@
     "fuga.example.com",
   };
 
-  scoped_ptr<SandboxOriginDatabase> database(
+  std::unique_ptr<SandboxOriginDatabase> database(
       new SandboxOriginDatabase(kFSDir, NULL));
   for (size_t i = 0; i < arraysize(kOrigins); ++i) {
     base::FilePath path;
@@ -283,7 +283,7 @@
     const std::string kOrigin = "foo.example.com";
     base::FilePath path;
 
-    scoped_ptr<SandboxOriginDatabase> database(
+    std::unique_ptr<SandboxOriginDatabase> database(
         new SandboxOriginDatabase(kFSDir, NULL));
     EXPECT_FALSE(database->HasOriginPath(kOrigin));
     EXPECT_TRUE(database->GetPathForOrigin(kOrigin, &path));
diff --git a/content/browser/fileapi/timed_task_helper_unittest.cc b/content/browser/fileapi/timed_task_helper_unittest.cc
index 11bdc02..c22b7979 100644
--- a/content/browser/fileapi/timed_task_helper_unittest.cc
+++ b/content/browser/fileapi/timed_task_helper_unittest.cc
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
diff --git a/content/browser/fileapi/transient_file_util_unittest.cc b/content/browser/fileapi/transient_file_util_unittest.cc
index 07e13f7..0a55d029 100644
--- a/content/browser/fileapi/transient_file_util_unittest.cc
+++ b/content/browser/fileapi/transient_file_util_unittest.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "content/public/test/test_file_system_context.h"
 #include "storage/browser/blob/scoped_file.h"
@@ -57,8 +59,8 @@
         GURL("http://foo"), storage::kFileSystemTypeIsolated, virtual_path);
   }
 
-  scoped_ptr<storage::FileSystemOperationContext> NewOperationContext() {
-    return make_scoped_ptr(
+  std::unique_ptr<storage::FileSystemOperationContext> NewOperationContext() {
+    return base::WrapUnique(
         new storage::FileSystemOperationContext(file_system_context_.get()));
   }
 
@@ -70,7 +72,7 @@
   base::MessageLoop message_loop_;
   base::ScopedTempDir data_dir_;
   scoped_refptr<storage::FileSystemContext> file_system_context_;
-  scoped_ptr<storage::TransientFileUtil> transient_file_util_;
+  std::unique_ptr<storage::TransientFileUtil> transient_file_util_;
 
   DISALLOW_COPY_AND_ASSIGN(TransientFileUtilTest);
 };
diff --git a/content/browser/fileapi/upload_file_system_file_element_reader.h b/content/browser/fileapi/upload_file_system_file_element_reader.h
index cba9fa79..3a9ab9c 100644
--- a/content/browser/fileapi/upload_file_system_file_element_reader.h
+++ b/content/browser/fileapi/upload_file_system_file_element_reader.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
@@ -55,7 +56,7 @@
   const uint64_t range_length_;
   const base::Time expected_modification_time_;
 
-  scoped_ptr<storage::FileStreamReader> stream_reader_;
+  std::unique_ptr<storage::FileStreamReader> stream_reader_;
 
   uint64_t stream_length_;
   uint64_t position_;
diff --git a/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc b/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc
index 61ef550..9c0ae4d 100644
--- a/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc
+++ b/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc
@@ -123,7 +123,7 @@
   std::vector<char> file_data_;
   GURL file_url_;
   base::Time file_modification_time_;
-  scoped_ptr<UploadFileSystemFileElementReader> reader_;
+  std::unique_ptr<UploadFileSystemFileElementReader> reader_;
 };
 
 TEST_F(UploadFileSystemFileElementReaderTest, ReadAll) {
diff --git a/content/browser/frame_host/frame_mojo_shell.h b/content/browser/frame_host/frame_mojo_shell.h
index 893ade42..a9b757cb 100644
--- a/content/browser/frame_host/frame_mojo_shell.h
+++ b/content/browser/frame_host/frame_mojo_shell.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
 #define CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/shell/public/interfaces/connector.mojom.h"
@@ -42,7 +43,7 @@
   mojo::BindingSet<mojo::shell::mojom::Connector> connectors_;
 
   // ServiceRegistry providing browser services to connected applications.
-  scoped_ptr<ServiceRegistryImpl> service_registry_;
+  std::unique_ptr<ServiceRegistryImpl> service_registry_;
   mojo::BindingSet<mojo::shell::mojom::InterfaceProvider>
       service_provider_bindings_;
 
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index 388c878..0090c38 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -13,6 +13,7 @@
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/lazy_instance.h"
+#include "base/memory/ptr_util.h"
 #include "content/browser/frame_host/frame_tree_node.h"
 #include "content/browser/frame_host/navigator.h"
 #include "content/browser/frame_host/render_frame_host_factory.h"
@@ -184,7 +185,7 @@
 
   // AddChild is what creates the RenderFrameHost.
   FrameTreeNode* added_node = parent->AddChild(
-      make_scoped_ptr(new FrameTreeNode(
+      base::WrapUnique(new FrameTreeNode(
           this, parent->navigator(), render_frame_delegate_,
           render_view_delegate_, render_widget_delegate_, manager_delegate_,
           scope, frame_name, frame_unique_name, frame_owner_properties)),
diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h
index 840228d..fe57d89 100644
--- a/content/browser/frame_host/frame_tree.h
+++ b/content/browser/frame_host/frame_tree.h
@@ -8,12 +8,12 @@
 #include <stdint.h>
 
 #include <iterator>
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/frame_host/frame_tree_node.h"
 #include "content/common/content_export.h"
 
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 7f1d2f5..35ad0374 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/stl_util.h"
 #include "content/browser/frame_host/frame_tree.h"
@@ -142,7 +143,7 @@
   return frame_tree_->root() == this;
 }
 
-FrameTreeNode* FrameTreeNode::AddChild(scoped_ptr<FrameTreeNode> child,
+FrameTreeNode* FrameTreeNode::AddChild(std::unique_ptr<FrameTreeNode> child,
                                        int process_id,
                                        int frame_routing_id) {
   // Child frame must always be created in the same process as the parent.
@@ -174,7 +175,7 @@
     if (iter->get() == child) {
       // Subtle: we need to make sure the node is gone from the tree before
       // observers are notified of its deletion.
-      scoped_ptr<FrameTreeNode> node_to_delete(std::move(*iter));
+      std::unique_ptr<FrameTreeNode> node_to_delete(std::move(*iter));
       children_.erase(iter);
       node_to_delete.reset();
       return;
@@ -188,7 +189,7 @@
 
   // Remove child nodes from the tree, then delete them. This destruction
   // operation will notify observers.
-  std::vector<scoped_ptr<FrameTreeNode>>().swap(children_);
+  std::vector<std::unique_ptr<FrameTreeNode>>().swap(children_);
 }
 
 void FrameTreeNode::SetOpener(FrameTreeNode* opener) {
@@ -201,7 +202,7 @@
 
   if (opener_) {
     if (!opener_observer_)
-      opener_observer_ = make_scoped_ptr(new OpenerDestroyedObserver(this));
+      opener_observer_ = base::WrapUnique(new OpenerDestroyedObserver(this));
     opener_->AddObserver(opener_observer_.get());
   }
 }
@@ -314,7 +315,7 @@
 }
 
 void FrameTreeNode::CreatedNavigationRequest(
-    scoped_ptr<NavigationRequest> navigation_request) {
+    std::unique_ptr<NavigationRequest> navigation_request) {
   CHECK(IsBrowserSideNavigationEnabled());
 
   bool was_previously_loading = frame_tree()->IsLoading();
@@ -484,7 +485,7 @@
   TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
       "navigation", "FrameTreeNode",
       TRACE_ID_WITH_SCOPE("FrameTreeNode", frame_tree_node_id_),
-      scoped_ptr<base::trace_event::ConvertableToTraceFormat>(
+      std::unique_ptr<base::trace_event::ConvertableToTraceFormat>(
           new TracedFrameTreeNode(*this)));
 }
 
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index 044764b..0972447 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -7,12 +7,12 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
 #include "content/browser/frame_host/render_frame_host_manager.h"
 #include "content/common/content_export.h"
@@ -71,7 +71,7 @@
 
   bool IsMainFrame() const;
 
-  FrameTreeNode* AddChild(scoped_ptr<FrameTreeNode> child,
+  FrameTreeNode* AddChild(std::unique_ptr<FrameTreeNode> child,
                           int process_id,
                           int frame_routing_id);
   void RemoveChild(FrameTreeNode* child);
@@ -217,7 +217,7 @@
   // navigation. If there was an ongoing navigation request before calling this
   // function, it is canceled. |navigation_request| should not be null.
   void CreatedNavigationRequest(
-      scoped_ptr<NavigationRequest> navigation_request);
+      std::unique_ptr<NavigationRequest> navigation_request);
 
   // PlzNavigate
   // Resets the current navigation request. If |keep_state| is true, any state
@@ -307,10 +307,10 @@
   // is set to a non-null node, and it is removed from that list when |opener_|
   // changes or when this node is destroyed.  It is also cleared if |opener_|
   // is disowned.
-  scoped_ptr<OpenerDestroyedObserver> opener_observer_;
+  std::unique_ptr<OpenerDestroyedObserver> opener_observer_;
 
   // The immediate children of this specific frame.
-  std::vector<scoped_ptr<FrameTreeNode>> children_;
+  std::vector<std::unique_ptr<FrameTreeNode>> children_;
 
   // Whether this frame has committed any real load, replacing its initial
   // about:blank page.
@@ -341,7 +341,7 @@
   // PlzNavigate
   // Owns an ongoing NavigationRequest until it is ready to commit. It will then
   // be reset and a RenderFrameHost will be responsible for the navigation.
-  scoped_ptr<NavigationRequest> navigation_request_;
+  std::unique_ptr<NavigationRequest> navigation_request_;
 
   // List of objects observing this FrameTreeNode.
   base::ObserverList<Observer> observers_;
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index 62fd22e6..fcb33292 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -11,6 +11,7 @@
 #include "base/compiler_specific.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -223,8 +224,8 @@
   (*g_web_contents_to_interstitial_page)[web_contents_] = this;
 
   if (new_navigation_) {
-    scoped_ptr<NavigationEntryImpl> entry =
-        make_scoped_ptr(new NavigationEntryImpl);
+    std::unique_ptr<NavigationEntryImpl> entry =
+        base::WrapUnique(new NavigationEntryImpl);
     entry->SetURL(url_);
     entry->SetVirtualURL(url_);
     entry->set_page_type(PAGE_TYPE_INTERSTITIAL);
diff --git a/content/browser/frame_host/interstitial_page_impl.h b/content/browser/frame_host/interstitial_page_impl.h
index 18e3df7e7..86f96558 100644
--- a/content/browser/frame_host/interstitial_page_impl.h
+++ b/content/browser/frame_host/interstitial_page_impl.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "build/build_config.h"
 #include "content/browser/frame_host/frame_tree.h"
@@ -283,7 +284,7 @@
   base::string16 original_web_contents_title_;
 
   // Our RenderViewHostDelegateView, necessary for accelerators to work.
-  scoped_ptr<InterstitialPageRVHDelegateView> rvh_delegate_view_;
+  std::unique_ptr<InterstitialPageRVHDelegateView> rvh_delegate_view_;
 
   // Settings passed to the renderer.
   mutable RendererPreferences renderer_preferences_;
@@ -295,11 +296,11 @@
   // user chooses to proceed.
   bool pause_throbber_;
 
-  scoped_ptr<InterstitialPageDelegate> delegate_;
+  std::unique_ptr<InterstitialPageDelegate> delegate_;
 
   scoped_refptr<SessionStorageNamespace> session_storage_namespace_;
 
-  scoped_ptr<TextInputState> text_input_state_;
+  std::unique_ptr<TextInputState> text_input_state_;
 
   base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_;
 
diff --git a/content/browser/frame_host/interstitial_page_impl_browsertest.cc b/content/browser/frame_host/interstitial_page_impl_browsertest.cc
index 05cf0fa..b483282 100644
--- a/content/browser/frame_host/interstitial_page_impl_browsertest.cc
+++ b/content/browser/frame_host/interstitial_page_impl_browsertest.cc
@@ -108,7 +108,7 @@
   }
 
   base::string16 expected_title_;
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
 
   DISALLOW_COPY_AND_ASSIGN(InterstitialTitleUpdateWatcher);
 };
@@ -169,7 +169,7 @@
     return false;
   }
 
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
   std::string last_text_;
 
   DISALLOW_COPY_AND_ASSIGN(ClipboardMessageWatcher);
@@ -327,7 +327,7 @@
     completion->Signal();
   }
 
-  scoped_ptr<InterstitialPageImpl> interstitial_;
+  std::unique_ptr<InterstitialPageImpl> interstitial_;
   scoped_refptr<ClipboardMessageWatcher> clipboard_message_watcher_;
   scoped_refptr<InterstitialTitleUpdateWatcher> title_update_watcher_;
 
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index ac57709..6732fefb 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -40,6 +40,7 @@
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string_number_conversions.h"  // Temporary
 #include "base/strings/string_util.h"
@@ -130,7 +131,7 @@
 // Configure all the NavigationEntries in entries for restore. This resets
 // the transition type to reload and makes sure the content state isn't empty.
 void ConfigureEntriesForRestore(
-    std::vector<scoped_ptr<NavigationEntryImpl>>* entries,
+    std::vector<std::unique_ptr<NavigationEntryImpl>>* entries,
     NavigationController::RestoreType type) {
   for (size_t i = 0; i < entries->size(); ++i) {
     // Use a transition type of reload so that we don't incorrectly increase
@@ -163,13 +164,13 @@
 static bool g_check_for_repost = true;
 
 // static
-scoped_ptr<NavigationEntry> NavigationController::CreateNavigationEntry(
-      const GURL& url,
-      const Referrer& referrer,
-      ui::PageTransition transition,
-      bool is_renderer_initiated,
-      const std::string& extra_headers,
-      BrowserContext* browser_context) {
+std::unique_ptr<NavigationEntry> NavigationController::CreateNavigationEntry(
+    const GURL& url,
+    const Referrer& referrer,
+    ui::PageTransition transition,
+    bool is_renderer_initiated,
+    const std::string& extra_headers,
+    BrowserContext* browser_context) {
   // Fix up the given URL before letting it be rewritten, so that any minor
   // cleanup (e.g., removing leading dots) will not lead to a virtual URL.
   GURL dest_url(url);
@@ -198,7 +199,7 @@
   entry->set_user_typed_url(dest_url);
   entry->set_update_virtual_url_with_url(reverse_on_redirect);
   entry->set_extra_headers(extra_headers);
-  return make_scoped_ptr(entry);
+  return base::WrapUnique(entry);
 }
 
 // static
@@ -263,7 +264,7 @@
 void NavigationControllerImpl::Restore(
     int selected_navigation,
     RestoreType type,
-    std::vector<scoped_ptr<NavigationEntry>>* entries) {
+    std::vector<std::unique_ptr<NavigationEntry>>* entries) {
   // Verify that this controller is unused and that the input is valid.
   DCHECK(GetEntryCount() == 0 && !GetPendingEntry());
   DCHECK(selected_navigation >= 0 &&
@@ -453,7 +454,7 @@
 }
 
 void NavigationControllerImpl::LoadEntry(
-    scoped_ptr<NavigationEntryImpl> entry) {
+    std::unique_ptr<NavigationEntryImpl> entry) {
   // When navigating to a new page, we don't know for sure if we will actually
   // end up leaving the current page.  The new page load could for example
   // result in a download or a 'no content' response (e.g., a mailto: URL).
@@ -462,7 +463,7 @@
 }
 
 void NavigationControllerImpl::SetPendingEntry(
-    scoped_ptr<NavigationEntryImpl> entry) {
+    std::unique_ptr<NavigationEntryImpl> entry) {
   DiscardNonCommittedEntriesInternal();
   pending_entry_ = entry.release();
   NotificationService::current()->Notify(
@@ -567,7 +568,7 @@
 }
 
 void NavigationControllerImpl::SetScreenshotManager(
-    scoped_ptr<NavigationEntryScreenshotManager> manager) {
+    std::unique_ptr<NavigationEntryScreenshotManager> manager) {
   if (manager.get())
     screenshot_manager_ = std::move(manager);
   else
@@ -715,7 +716,7 @@
       break;
   }
 
-  scoped_ptr<NavigationEntryImpl> entry;
+  std::unique_ptr<NavigationEntryImpl> entry;
 
   // For subframes, create a pending entry with a corresponding frame entry.
   int frame_tree_node_id = params.frame_tree_node_id;
@@ -1067,7 +1068,7 @@
     RenderFrameHostImpl* rfh,
     const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
     bool replace_entry) {
-  scoped_ptr<NavigationEntryImpl> new_entry;
+  std::unique_ptr<NavigationEntryImpl> new_entry;
   bool update_virtual_url;
   // Only make a copy of the pending entry if it is appropriate for the new page
   // that was just loaded. Verify this by checking if the entry corresponds
@@ -1088,7 +1089,7 @@
 
     update_virtual_url = new_entry->update_virtual_url_with_url();
   } else {
-    new_entry = make_scoped_ptr(new NavigationEntryImpl);
+    new_entry = base::WrapUnique(new NavigationEntryImpl);
 
     // Find out whether the new entry needs to update its virtual URL on URL
     // change and set up the entry accordingly. This is needed to correctly
@@ -1260,7 +1261,7 @@
   DCHECK(GetLastCommittedEntry()) << "ClassifyNavigation should guarantee "
                                   << "that a last committed entry exists.";
 
-  scoped_ptr<NavigationEntryImpl> new_entry;
+  std::unique_ptr<NavigationEntryImpl> new_entry;
   if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
     // Make sure new_entry takes ownership of frame_entry in a scoped_refptr.
     FrameNavigationEntry* frame_entry = new FrameNavigationEntry(
@@ -1658,7 +1659,8 @@
 }
 
 void NavigationControllerImpl::InsertOrReplaceEntry(
-    scoped_ptr<NavigationEntryImpl> entry, bool replace) {
+    std::unique_ptr<NavigationEntryImpl> entry,
+    bool replace) {
   DCHECK(entry->GetTransitionType() != ui::PAGE_TRANSITION_AUTO_SUBFRAME);
 
   // If the pending_entry_index_ is -1, the navigation was to a new page, and we
@@ -2011,7 +2013,7 @@
 }
 
 void NavigationControllerImpl::SetTransientEntry(
-    scoped_ptr<NavigationEntry> entry) {
+    std::unique_ptr<NavigationEntry> entry) {
   // Discard any current transient entry, we can only have one at a time.
   int index = 0;
   if (last_committed_entry_index_ != -1)
diff --git a/content/browser/frame_host/navigation_controller_impl.h b/content/browser/frame_host/navigation_controller_impl.h
index a0067f4..f4310623 100644
--- a/content/browser/frame_host/navigation_controller_impl.h
+++ b/content/browser/frame_host/navigation_controller_impl.h
@@ -45,7 +45,7 @@
   void SetBrowserContext(BrowserContext* browser_context) override;
   void Restore(int selected_navigation,
                RestoreType type,
-               std::vector<scoped_ptr<NavigationEntry>>* entries) override;
+               std::vector<std::unique_ptr<NavigationEntry>>* entries) override;
   NavigationEntryImpl* GetActiveEntry() const override;
   NavigationEntryImpl* GetVisibleEntry() const override;
   int GetCurrentEntryIndex() const override;
@@ -59,7 +59,7 @@
   NavigationEntryImpl* GetPendingEntry() const override;
   int GetPendingEntryIndex() const override;
   NavigationEntryImpl* GetTransientEntry() const override;
-  void SetTransientEntry(scoped_ptr<NavigationEntry> entry) override;
+  void SetTransientEntry(std::unique_ptr<NavigationEntry> entry) override;
   void LoadURL(const GURL& url,
                const Referrer& referrer,
                ui::PageTransition type,
@@ -134,7 +134,7 @@
 
   // Allow renderer-initiated navigations to create a pending entry when the
   // provisional load starts.
-  void SetPendingEntry(scoped_ptr<NavigationEntryImpl> entry);
+  void SetPendingEntry(std::unique_ptr<NavigationEntryImpl> entry);
 
   // Handles updating the navigation state after the renderer has navigated.
   // This is used by the WebContentsImpl.
@@ -207,7 +207,7 @@
   // Sets the screenshot manager for this NavigationControllerImpl. Setting a
   // NULL manager recreates the default screenshot manager and uses that.
   void SetScreenshotManager(
-      scoped_ptr<NavigationEntryScreenshotManager> manager);
+      std::unique_ptr<NavigationEntryScreenshotManager> manager);
 
   // Discards only the pending entry. |was_failure| should be set if the pending
   // entry is being discarded because it failed to load.
@@ -244,7 +244,7 @@
   // Causes the controller to load the specified entry. The function assumes
   // ownership of the pointer since it is put in the navigation list.
   // NOTE: Do not pass an entry that the controller already owns!
-  void LoadEntry(scoped_ptr<NavigationEntryImpl> entry);
+  void LoadEntry(std::unique_ptr<NavigationEntryImpl> entry);
 
   // Identifies which frames need to be navigated for the pending
   // NavigationEntry and instructs their Navigator to navigate them.  Returns
@@ -322,7 +322,7 @@
 
   // Inserts a new entry or replaces the current entry with a new one, removing
   // all entries after it. The new entry will become the active one.
-  void InsertOrReplaceEntry(scoped_ptr<NavigationEntryImpl> entry,
+  void InsertOrReplaceEntry(std::unique_ptr<NavigationEntryImpl> entry,
                             bool replace);
 
   // Removes the entry at |index|, as long as it is not the current entry.
@@ -365,7 +365,7 @@
   BrowserContext* browser_context_;
 
   // List of |NavigationEntry|s for this controller.
-  std::vector<scoped_ptr<NavigationEntryImpl>> entries_;
+  std::vector<std::unique_ptr<NavigationEntryImpl>> entries_;
 
   // An entry we haven't gotten a response for yet.  This will be discarded
   // when we navigate again.  It's used only so we know what the currently
@@ -448,7 +448,7 @@
   // the wrong order in the history view.
   TimeSmoother time_smoother_;
 
-  scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
+  std::unique_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
 };
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index cf9c8c7..5dec7a8 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -635,7 +635,7 @@
     // Don't pay attention to swapped out RenderFrameHosts in the main frame.
     // TODO(nasko): Remove once swappedout:// is gone.
     // See https://crbug.com/357747.
-    if (!RenderFrameHostImpl::IsRFHStateActive(rfh->rfh_state())) {
+    if (!rfh->is_active()) {
       DLOG(INFO) << "Skipping swapped out RFH: "
                  << rfh->GetSiteInstance()->GetSiteURL();
       return;
@@ -2549,7 +2549,7 @@
 
   // 4. Create a NavigationEntry with the same PageState as |entry2| and verify
   // it has the same FrameNavigationEntry structure.
-  scoped_ptr<NavigationEntryImpl> restored_entry =
+  std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationControllerImpl::CreateNavigationEntry(
               main_url_a, Referrer(), ui::PAGE_TRANSITION_RELOAD, false,
@@ -2571,7 +2571,7 @@
   }
 
   // 5. Restore the new entry in a new tab and verify the correct URLs load.
-  std::vector<scoped_ptr<NavigationEntry>> entries;
+  std::vector<std::unique_ptr<NavigationEntry>> entries;
   entries.push_back(std::move(restored_entry));
   Shell* new_shell = Shell::CreateNewWindow(
       controller.GetBrowserContext(), GURL::EmptyGURL(), nullptr, gfx::Size());
@@ -2835,7 +2835,7 @@
   NavigationEntryImpl* entry2 = controller.GetLastCommittedEntry();
 
   // 3. Create a NavigationEntry with the same PageState as |entry2|.
-  scoped_ptr<NavigationEntryImpl> restored_entry =
+  std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationControllerImpl::CreateNavigationEntry(
               main_url_a, Referrer(), ui::PAGE_TRANSITION_RELOAD, false,
@@ -2850,7 +2850,7 @@
       restored_entry->root_node()->children[0]->frame_entry->site_instance());
 
   // 4. Restore the new entry in a new tab and verify the correct URLs load.
-  std::vector<scoped_ptr<NavigationEntry>> entries;
+  std::vector<std::unique_ptr<NavigationEntry>> entries;
   entries.push_back(std::move(restored_entry));
   Shell* new_shell = Shell::CreateNewWindow(
       controller.GetBrowserContext(), GURL::EmptyGURL(), nullptr, gfx::Size());
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index e86f1fd..a4f4aba 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -6,12 +6,14 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -1082,7 +1084,8 @@
   RegisterForAllNavNotifications(&notifications, &controller);
 
   // Set a WebContentsDelegate to listen for state changes.
-  scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
+  std::unique_ptr<TestWebContentsDelegate> delegate(
+      new TestWebContentsDelegate());
   EXPECT_FALSE(contents()->GetDelegate());
   contents()->SetDelegate(delegate.get());
 
@@ -1124,7 +1127,8 @@
   RegisterForAllNavNotifications(&notifications, &controller);
 
   // Set a WebContentsDelegate to listen for state changes.
-  scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
+  std::unique_ptr<TestWebContentsDelegate> delegate(
+      new TestWebContentsDelegate());
   EXPECT_FALSE(contents()->GetDelegate());
   contents()->SetDelegate(delegate.get());
 
@@ -1186,7 +1190,8 @@
   navigation_entry_committed_counter_ = 0;
 
   // Set a WebContentsDelegate to listen for state changes.
-  scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
+  std::unique_ptr<TestWebContentsDelegate> delegate(
+      new TestWebContentsDelegate());
   EXPECT_FALSE(contents()->GetDelegate());
   contents()->SetDelegate(delegate.get());
 
@@ -2868,8 +2873,8 @@
 TEST_F(NavigationControllerTest, RestoreNavigate) {
   // Create a NavigationController with a restored set of tabs.
   GURL url("http://foo");
-  std::vector<scoped_ptr<NavigationEntry>> entries;
-  scoped_ptr<NavigationEntry> entry =
+  std::vector<std::unique_ptr<NavigationEntry>> entries;
+  std::unique_ptr<NavigationEntry> entry =
       NavigationControllerImpl::CreateNavigationEntry(
           url, Referrer(), ui::PAGE_TRANSITION_RELOAD, false, std::string(),
           browser_context());
@@ -2879,7 +2884,7 @@
   const base::Time timestamp = base::Time::Now();
   entry->SetTimestamp(timestamp);
   entries.push_back(std::move(entry));
-  scoped_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
+  std::unique_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
       WebContents::Create(WebContents::CreateParams(browser_context()))));
   NavigationControllerImpl& our_controller = our_contents->GetController();
   our_controller.Restore(
@@ -2942,8 +2947,8 @@
 TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) {
   // Create a NavigationController with a restored set of tabs.
   GURL url("http://foo");
-  std::vector<scoped_ptr<NavigationEntry>> entries;
-  scoped_ptr<NavigationEntry> new_entry =
+  std::vector<std::unique_ptr<NavigationEntry>> entries;
+  std::unique_ptr<NavigationEntry> new_entry =
       NavigationControllerImpl::CreateNavigationEntry(
           url, Referrer(), ui::PAGE_TRANSITION_RELOAD, false, std::string(),
           browser_context());
@@ -2951,7 +2956,7 @@
   new_entry->SetTitle(base::ASCIIToUTF16("Title"));
   new_entry->SetPageState(PageState::CreateFromEncodedData("state"));
   entries.push_back(std::move(new_entry));
-  scoped_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
+  std::unique_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
       WebContents::Create(WebContents::CreateParams(browser_context()))));
   NavigationControllerImpl& our_controller = our_contents->GetController();
   our_controller.Restore(
@@ -3190,7 +3195,7 @@
   notifications.Reset();
 
   // Adding a transient with no pending entry.
-  scoped_ptr<NavigationEntry> transient_entry(new NavigationEntryImpl);
+  std::unique_ptr<NavigationEntry> transient_entry(new NavigationEntryImpl);
   transient_entry->SetURL(transient_url);
   controller.SetTransientEntry(std::move(transient_entry));
 
@@ -3349,7 +3354,7 @@
       url1, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
 
   // A transient entry is added, interrupting the navigation.
-  scoped_ptr<NavigationEntry> transient_entry(new NavigationEntryImpl);
+  std::unique_ptr<NavigationEntry> transient_entry(new NavigationEntryImpl);
   transient_entry->SetURL(transient_url);
   controller.SetTransientEntry(std::move(transient_entry));
   EXPECT_TRUE(controller.GetTransientEntry());
@@ -3841,7 +3846,7 @@
   controller.GetVisibleEntry()->SetTitle(title);
   NavigateAndCommit(url2);
 
-  scoped_ptr<WebContents> clone(controller.GetWebContents()->Clone());
+  std::unique_ptr<WebContents> clone(controller.GetWebContents()->Clone());
 
   ASSERT_EQ(2, clone->GetController().GetEntryCount());
   EXPECT_TRUE(clone->GetController().NeedsReload());
@@ -3866,7 +3871,7 @@
   controller.GetVisibleEntry()->SetTitle(title);
   NavigateAndCommit(url2);
 
-  scoped_ptr<WebContents> clone(controller.GetWebContents()->Clone());
+  std::unique_ptr<WebContents> clone(controller.GetWebContents()->Clone());
   clone->GetController().LoadIfNecessary();
 
   ASSERT_EQ(2, clone->GetController().GetEntryCount());
@@ -3888,9 +3893,9 @@
   // Add an interstitial entry.  Should be deleted with controller.
   NavigationEntryImpl* interstitial_entry = new NavigationEntryImpl();
   interstitial_entry->set_page_type(PAGE_TYPE_INTERSTITIAL);
-  controller.SetTransientEntry(make_scoped_ptr(interstitial_entry));
+  controller.SetTransientEntry(base::WrapUnique(interstitial_entry));
 
-  scoped_ptr<WebContents> clone(controller.GetWebContents()->Clone());
+  std::unique_ptr<WebContents> clone(controller.GetWebContents()->Clone());
 
   ASSERT_EQ(2, clone->GetController().GetEntryCount());
 }
@@ -4013,7 +4018,7 @@
   controller.GoBack();
   contents()->CommitPendingNavigation();
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_controller.CopyStateFrom(controller);
@@ -4074,7 +4079,7 @@
   EXPECT_EQ(1, controller.GetEntryAtIndex(1)->GetPageID());
   EXPECT_EQ(1, contents()->GetMaxPageIDForSiteInstance(instance1));
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4120,7 +4125,7 @@
   controller.GoBack();
   contents()->CommitPendingNavigation();
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4155,7 +4160,7 @@
   NavigateAndCommit(url1);
   NavigateAndCommit(url2);
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4191,7 +4196,7 @@
   NavigateAndCommit(url1);
   NavigateAndCommit(url2);
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4231,7 +4236,7 @@
   controller.GoBack();
   contents()->CommitPendingNavigation();
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4272,7 +4277,7 @@
 
   NavigateAndCommit(url1);
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url2a);
@@ -4322,7 +4327,7 @@
   NavigateAndCommit(url2);
   controller.GoBack();
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4367,7 +4372,7 @@
   NavigateAndCommit(url2);
   NavigateAndCommit(url3);
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url4);
@@ -4414,7 +4419,7 @@
   EXPECT_EQ(1, controller.GetEntryAtIndex(1)->GetPageID());
   EXPECT_EQ(1, contents()->GetMaxPageIDForSiteInstance(instance1));
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url3);
@@ -4466,7 +4471,7 @@
   NavigateAndCommit(url2);
   NavigateAndCommit(url3);
 
-  scoped_ptr<TestWebContents> other_contents(
+  std::unique_ptr<TestWebContents> other_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& other_controller = other_contents->GetController();
   other_contents->NavigateAndCommit(url4);
@@ -4501,9 +4506,9 @@
   };
   const GURL kInitialUrl("http://site3.com");
 
-  std::vector<scoped_ptr<NavigationEntry>> entries;
+  std::vector<std::unique_ptr<NavigationEntry>> entries;
   for (size_t i = 0; i < arraysize(kRestoredUrls); ++i) {
-    scoped_ptr<NavigationEntry> entry =
+    std::unique_ptr<NavigationEntry> entry =
         NavigationControllerImpl::CreateNavigationEntry(
             kRestoredUrls[i], Referrer(), ui::PAGE_TRANSITION_RELOAD, false,
             std::string(), browser_context());
@@ -4512,7 +4517,7 @@
   }
 
   // Create a WebContents with restored entries.
-  scoped_ptr<TestWebContents> source_contents(
+  std::unique_ptr<TestWebContents> source_contents(
       static_cast<TestWebContents*>(CreateTestWebContents()));
   NavigationControllerImpl& source_controller =
       source_contents->GetController();
@@ -4738,7 +4743,7 @@
 
   // For cloned tabs, IsInitialNavigationShould be true but
   // IsInitialBlankNavigation should be false.
-  scoped_ptr<WebContents> clone(controller.GetWebContents()->Clone());
+  std::unique_ptr<WebContents> clone(controller.GetWebContents()->Clone());
   EXPECT_TRUE(clone->GetController().IsInitialNavigation());
   EXPECT_FALSE(clone->GetController().IsInitialBlankNavigation());
 }
@@ -4853,7 +4858,7 @@
 
   MockScreenshotManager* screenshot_manager =
       new MockScreenshotManager(&controller);
-  controller.SetScreenshotManager(make_scoped_ptr(screenshot_manager));
+  controller.SetScreenshotManager(base::WrapUnique(screenshot_manager));
   for (int i = 0; i < controller.GetEntryCount(); ++i) {
     entry = controller.GetEntryAtIndex(i);
     screenshot_manager->TakeScreenshotFor(entry);
@@ -5006,7 +5011,8 @@
 }
 
 TEST_F(NavigationControllerTest, PostThenReplaceStateThenReload) {
-  scoped_ptr<TestWebContentsDelegate> delegate(new TestWebContentsDelegate());
+  std::unique_ptr<TestWebContentsDelegate> delegate(
+      new TestWebContentsDelegate());
   EXPECT_FALSE(contents()->GetDelegate());
   contents()->SetDelegate(delegate.get());
 
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
index ecf43c45..dad94ba0 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -9,6 +9,7 @@
 #include <queue>
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -109,19 +110,19 @@
          frame_entry->frame_tree_node_id() == -1;
 }
 
-scoped_ptr<NavigationEntryImpl::TreeNode>
+std::unique_ptr<NavigationEntryImpl::TreeNode>
 NavigationEntryImpl::TreeNode::CloneAndReplace(
     FrameTreeNode* frame_tree_node,
     FrameNavigationEntry* frame_navigation_entry) const {
   if (frame_tree_node && MatchesFrame(frame_tree_node)) {
     // Replace this node in the cloned tree and prune its children.
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new NavigationEntryImpl::TreeNode(frame_navigation_entry));
   }
 
   // Clone the tree using a copy of the FrameNavigationEntry, without sharing.
   // TODO(creis): Share FNEs unless it's for another tab.
-  scoped_ptr<NavigationEntryImpl::TreeNode> copy(
+  std::unique_ptr<NavigationEntryImpl::TreeNode> copy(
       new NavigationEntryImpl::TreeNode(frame_entry->Clone()));
 
   // Recursively clone the children.
@@ -133,8 +134,8 @@
   return copy;
 }
 
-scoped_ptr<NavigationEntry> NavigationEntry::Create() {
-  return make_scoped_ptr(new NavigationEntryImpl());
+std::unique_ptr<NavigationEntry> NavigationEntry::Create() {
+  return base::WrapUnique(new NavigationEntryImpl());
 }
 
 NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry(
@@ -147,9 +148,9 @@
   return static_cast<const NavigationEntryImpl*>(entry);
 }
 
-scoped_ptr<NavigationEntryImpl> NavigationEntryImpl::FromNavigationEntry(
-    scoped_ptr<NavigationEntry> entry) {
-  return make_scoped_ptr(FromNavigationEntry(entry.release()));
+std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::FromNavigationEntry(
+    std::unique_ptr<NavigationEntry> entry) {
+  return base::WrapUnique(FromNavigationEntry(entry.release()));
 }
 
 NavigationEntryImpl::NavigationEntryImpl()
@@ -517,15 +518,15 @@
   extra_data_.erase(key);
 }
 
-scoped_ptr<NavigationEntryImpl> NavigationEntryImpl::Clone() const {
+std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::Clone() const {
   return NavigationEntryImpl::CloneAndReplace(nullptr, nullptr);
 }
 
-scoped_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace(
+std::unique_ptr<NavigationEntryImpl> NavigationEntryImpl::CloneAndReplace(
     FrameTreeNode* frame_tree_node,
     FrameNavigationEntry* frame_navigation_entry) const {
-  scoped_ptr<NavigationEntryImpl> copy =
-      make_scoped_ptr(new NavigationEntryImpl());
+  std::unique_ptr<NavigationEntryImpl> copy =
+      base::WrapUnique(new NavigationEntryImpl());
 
   // TODO(creis): Only share the same FrameNavigationEntries if cloning within
   // the same tab.
diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
index ff84033..5907b6c 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -47,7 +47,7 @@
     // to make a complete clone.
     // TODO(creis): For --site-per-process, share FrameNavigationEntries between
     // NavigationEntries of the same tab.
-    scoped_ptr<TreeNode> CloneAndReplace(
+    std::unique_ptr<TreeNode> CloneAndReplace(
         FrameTreeNode* frame_tree_node,
         FrameNavigationEntry* frame_navigation_entry) const;
 
@@ -62,8 +62,8 @@
   static NavigationEntryImpl* FromNavigationEntry(NavigationEntry* entry);
   static const NavigationEntryImpl* FromNavigationEntry(
       const NavigationEntry* entry);
-  static scoped_ptr<NavigationEntryImpl> FromNavigationEntry(
-      scoped_ptr<NavigationEntry> entry);
+  static std::unique_ptr<NavigationEntryImpl> FromNavigationEntry(
+      std::unique_ptr<NavigationEntry> entry);
 
   // The value of bindings() before it is set during commit.
   static int kInvalidBindings;
@@ -138,7 +138,7 @@
   // Creates a copy of this NavigationEntryImpl that can be modified
   // independently from the original.  Does not copy any value that would be
   // cleared in ResetForCommit.
-  scoped_ptr<NavigationEntryImpl> Clone() const;
+  std::unique_ptr<NavigationEntryImpl> Clone() const;
 
   // Like |Clone|, but replaces the FrameNavigationEntry corresponding to
   // |frame_tree_node| (and all its children) with |frame_entry|.
@@ -146,8 +146,9 @@
   // NavigationEntryImpls, we will need to support two versions of Clone: one
   // that shares the existing FrameNavigationEntries (for use within the same
   // tab) and one that draws them from a different pool (for use in a new tab).
-  scoped_ptr<NavigationEntryImpl> CloneAndReplace(
-      FrameTreeNode* frame_tree_node, FrameNavigationEntry* frame_entry) const;
+  std::unique_ptr<NavigationEntryImpl> CloneAndReplace(
+      FrameTreeNode* frame_tree_node,
+      FrameNavigationEntry* frame_entry) const;
 
   // Helper functions to construct NavigationParameters for a navigation to this
   // NavigationEntry.
@@ -378,7 +379,7 @@
   // TODO(creis): Once FrameNavigationEntries can be shared across multiple
   // NavigationEntries, we will need to update Session/Tab restore.  For now,
   // each NavigationEntry's tree has its own unshared FrameNavigationEntries.
-  scoped_ptr<TreeNode> frame_tree_;
+  std::unique_ptr<TreeNode> frame_tree_;
 
   // See the accessors above for descriptions.
   int unique_id_;
diff --git a/content/browser/frame_host/navigation_entry_impl_unittest.cc b/content/browser/frame_host/navigation_entry_impl_unittest.cc
index ccea60b0..0b239e08e 100644
--- a/content/browser/frame_host/navigation_entry_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_entry_impl_unittest.cc
@@ -37,8 +37,8 @@
   void TearDown() override {}
 
  protected:
-  scoped_ptr<NavigationEntryImpl> entry1_;
-  scoped_ptr<NavigationEntryImpl> entry2_;
+  std::unique_ptr<NavigationEntryImpl> entry1_;
+  std::unique_ptr<NavigationEntryImpl> entry2_;
   // SiteInstances are deleted when their NavigationEntries are gone.
   scoped_refptr<SiteInstanceImpl> instance_;
 };
@@ -233,7 +233,7 @@
   entry2_->SetTransitionType(ui::PAGE_TRANSITION_RELOAD);
   entry2_->set_should_replace_entry(true);
 
-  scoped_ptr<NavigationEntryImpl> clone(entry2_->Clone());
+  std::unique_ptr<NavigationEntryImpl> clone(entry2_->Clone());
 
   // Value from FrameNavigationEntry.
   EXPECT_EQ(entry2_->site_instance(), clone->site_instance());
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index dde5fa7..6b140ef 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -30,14 +30,14 @@
 }  // namespace
 
 // static
-scoped_ptr<NavigationHandleImpl> NavigationHandleImpl::Create(
+std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create(
     const GURL& url,
     FrameTreeNode* frame_tree_node,
     bool is_synchronous,
     bool is_srcdoc,
     const base::TimeTicks& navigation_start,
     int pending_nav_entry_id) {
-  return scoped_ptr<NavigationHandleImpl>(
+  return std::unique_ptr<NavigationHandleImpl>(
       new NavigationHandleImpl(url, frame_tree_node, is_synchronous, is_srcdoc,
                                navigation_start, pending_nav_entry_id));
 }
@@ -219,7 +219,7 @@
 }
 
 void NavigationHandleImpl::RegisterThrottleForTesting(
-    scoped_ptr<NavigationThrottle> navigation_throttle) {
+    std::unique_ptr<NavigationThrottle> navigation_throttle) {
   throttles_.push_back(std::move(navigation_throttle));
 }
 
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index 252a2e0..be65134 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -66,7 +66,7 @@
   // both renderer-initiated and browser-initiated navigation start.
   // PlzNavigate: This value always comes from the CommonNavigationParams
   // associated with this navigation.
-  static scoped_ptr<NavigationHandleImpl> Create(
+  static std::unique_ptr<NavigationHandleImpl> Create(
       const GURL& url,
       FrameTreeNode* frame_tree_node,
       bool is_synchronous,
@@ -99,7 +99,7 @@
   void CancelDeferredNavigation(
       NavigationThrottle::ThrottleCheckResult result) override;
   void RegisterThrottleForTesting(
-      scoped_ptr<NavigationThrottle> navigation_throttle) override;
+      std::unique_ptr<NavigationThrottle> navigation_throttle) override;
   NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting(
       bool is_post,
       const Referrer& sanitized_referrer,
@@ -290,7 +290,7 @@
   // PlzNavigate
   // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a
   // corresponding ServiceWorkerNetworkProvider is created in the renderer.
-  scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_;
+  std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_;
 
   DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
 };
diff --git a/content/browser/frame_host/navigation_handle_impl_browsertest.cc b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
index 7630a743..c43f46f4 100644
--- a/content/browser/frame_host/navigation_handle_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
@@ -214,7 +214,7 @@
 
  private:
   void DidStartNavigation(NavigationHandle* handle) override {
-    scoped_ptr<NavigationThrottle> throttle(new TestNavigationThrottle(
+    std::unique_ptr<NavigationThrottle> throttle(new TestNavigationThrottle(
         handle, will_start_result_, will_redirect_result_, will_process_result_,
         base::Bind(&TestNavigationThrottleInstaller::DidCallWillStartRequest,
                    base::Unretained(this)),
diff --git a/content/browser/frame_host/navigation_handle_impl_unittest.cc b/content/browser/frame_host/navigation_handle_impl_unittest.cc
index 65adc6b..6f8e87c 100644
--- a/content/browser/frame_host/navigation_handle_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_unittest.cc
@@ -160,7 +160,7 @@
     TestNavigationThrottle* test_throttle =
         new TestNavigationThrottle(test_handle(), result);
     test_handle()->RegisterThrottleForTesting(
-        scoped_ptr<TestNavigationThrottle>(test_throttle));
+        std::unique_ptr<TestNavigationThrottle>(test_throttle));
     return test_throttle;
   }
 
@@ -173,7 +173,7 @@
     was_callback_called_ = true;
   }
 
-  scoped_ptr<NavigationHandleImpl> test_handle_;
+  std::unique_ptr<NavigationHandleImpl> test_handle_;
   bool was_callback_called_;
   NavigationThrottle::ThrottleCheckResult callback_result_;
 };
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 617fc26..d03296c 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -62,7 +62,7 @@
 }  // namespace
 
 // static
-scoped_ptr<NavigationRequest> NavigationRequest::CreateBrowserInitiated(
+std::unique_ptr<NavigationRequest> NavigationRequest::CreateBrowserInitiated(
     FrameTreeNode* frame_tree_node,
     const GURL& dest_url,
     const Referrer& dest_referrer,
@@ -90,7 +90,7 @@
         entry.GetBrowserInitiatedPostData()->size());
   }
 
-  scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest(
+  std::unique_ptr<NavigationRequest> navigation_request(new NavigationRequest(
       frame_tree_node, entry.ConstructCommonNavigationParams(
                            dest_url, dest_referrer, navigation_type, lofi_state,
                            navigation_start),
@@ -111,7 +111,7 @@
 }
 
 // static
-scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
+std::unique_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
     FrameTreeNode* frame_tree_node,
     const CommonNavigationParams& common_params,
     const BeginNavigationParams& begin_params,
@@ -139,7 +139,7 @@
       current_history_list_offset, current_history_list_length,
       false,                   // is_view_source
       false);                  // should_clear_history_list
-  scoped_ptr<NavigationRequest> navigation_request(
+  std::unique_ptr<NavigationRequest> navigation_request(
       new NavigationRequest(frame_tree_node, common_params, begin_params,
                             request_params, body, false, nullptr, nullptr));
   return navigation_request;
@@ -274,7 +274,7 @@
 
 void NavigationRequest::OnResponseStarted(
     const scoped_refptr<ResourceResponse>& response,
-    scoped_ptr<StreamHandle> body) {
+    std::unique_ptr<StreamHandle> body) {
   DCHECK(state_ == STARTED);
   state_ = RESPONSE_STARTED;
 
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h
index da8f9d7b..7d3744c3 100644
--- a/content/browser/frame_host/navigation_request.h
+++ b/content/browser/frame_host/navigation_request.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/frame_host/navigation_entry_impl.h"
 #include "content/browser/loader/navigation_url_loader_delegate.h"
 #include "content/common/content_export.h"
@@ -68,7 +69,7 @@
   };
 
   // Creates a request for a browser-intiated navigation.
-  static scoped_ptr<NavigationRequest> CreateBrowserInitiated(
+  static std::unique_ptr<NavigationRequest> CreateBrowserInitiated(
       FrameTreeNode* frame_tree_node,
       const GURL& dest_url,
       const Referrer& dest_referrer,
@@ -85,7 +86,7 @@
   // should no longer be manipulated afterwards on the UI thread.
   // TODO(clamy): see if ResourceRequestBody could be un-refcounted to avoid
   // threading subtleties.
-  static scoped_ptr<NavigationRequest> CreateRendererInitiated(
+  static std::unique_ptr<NavigationRequest> CreateRendererInitiated(
       FrameTreeNode* frame_tree_node,
       const CommonNavigationParams& common_params,
       const BeginNavigationParams& begin_params,
@@ -173,7 +174,7 @@
       const net::RedirectInfo& redirect_info,
       const scoped_refptr<ResourceResponse>& response) override;
   void OnResponseStarted(const scoped_refptr<ResourceResponse>& response,
-                         scoped_ptr<StreamHandle> body) override;
+                         std::unique_ptr<StreamHandle> body) override;
   void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) override;
   void OnRequestStarted(base::TimeTicks timestamp) override;
 
@@ -212,9 +213,9 @@
 
   // The parameters to send to the IO thread. |loader_| takes ownership of
   // |info_| after calling BeginNavigation.
-  scoped_ptr<NavigationRequestInfo> info_;
+  std::unique_ptr<NavigationRequestInfo> info_;
 
-  scoped_ptr<NavigationURLLoader> loader_;
+  std::unique_ptr<NavigationURLLoader> loader_;
 
   // These next items are used in browser-initiated navigations to store
   // information from the NavigationEntryImpl that is required after request
@@ -228,12 +229,12 @@
   // The type of SiteInstance associated with this navigation.
   AssociatedSiteInstanceType associated_site_instance_type_;
 
-  scoped_ptr<NavigationHandleImpl> navigation_handle_;
+  std::unique_ptr<NavigationHandleImpl> navigation_handle_;
 
   // Holds the ResourceResponse and the StreamHandle for the navigation while
   // the WillProcessResponse checks are performed by the NavigationHandle.
   scoped_refptr<ResourceResponse> response_;
-  scoped_ptr<StreamHandle> body_;
+  std::unique_ptr<StreamHandle> body_;
 
   DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
 };
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 755178b..546b119 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -171,7 +171,8 @@
     // This ensures that notifications about the end of the previous
     // navigation are sent before notifications about the start of the
     // new navigation.
-    render_frame_host->SetNavigationHandle(scoped_ptr<NavigationHandleImpl>());
+    render_frame_host->SetNavigationHandle(
+        std::unique_ptr<NavigationHandleImpl>());
   }
 
   NavigationEntry* pending_entry = controller_->GetPendingEntry();
@@ -928,7 +929,7 @@
       frame_tree_node->current_frame_host()->ShouldDispatchBeforeUnload();
   FrameMsg_Navigate_Type::Value navigation_type =
       GetNavigationType(controller_->GetBrowserContext(), entry, reload_type);
-  scoped_ptr<NavigationRequest> scoped_request =
+  std::unique_ptr<NavigationRequest> scoped_request =
       NavigationRequest::CreateBrowserInitiated(
           frame_tree_node, dest_url, dest_referrer, frame_entry, entry,
           navigation_type, lofi_state, is_same_document_history_load,
@@ -1025,7 +1026,7 @@
   bool has_browser_initiated_pending_entry =
       pending_entry && !pending_entry->is_renderer_initiated();
   if (!has_browser_initiated_pending_entry) {
-    scoped_ptr<NavigationEntryImpl> entry =
+    std::unique_ptr<NavigationEntryImpl> entry =
         NavigationEntryImpl::FromNavigationEntry(
             controller_->CreateNavigationEntry(
                 url, content::Referrer(), ui::PAGE_TRANSITION_LINK,
diff --git a/content/browser/frame_host/navigator_impl.h b/content/browser/frame_host/navigator_impl.h
index da3762f..14958713 100644
--- a/content/browser/frame_host/navigator_impl.h
+++ b/content/browser/frame_host/navigator_impl.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
 
+#include <memory>
+
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "content/browser/frame_host/navigation_controller_impl.h"
 #include "content/browser/frame_host/navigator.h"
@@ -149,7 +150,7 @@
   // events. Can be NULL in tests.
   NavigatorDelegate* delegate_;
 
-  scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_;
+  std::unique_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_;
 
   DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
 };
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index 97ae80f6..2da67a0 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -49,7 +49,7 @@
   void SetUp() override {
 #if !defined(OS_ANDROID)
     ImageTransportFactory::InitializeForUnitTests(
-        scoped_ptr<ImageTransportFactory>(
+        std::unique_ptr<ImageTransportFactory>(
             new NoTransportImageTransportFactory));
 #endif
     EnableBrowserSideNavigation();
@@ -151,7 +151,7 @@
 
   // Commit the navigation.
   main_test_rfh()->SendNavigate(0, entry_id, true, kUrl);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, main_test_rfh()->rfh_state());
+  EXPECT_TRUE(main_test_rfh()->is_active());
   EXPECT_EQ(SiteInstanceImpl::GetSiteForURL(browser_context(), kUrl),
             main_test_rfh()->GetSiteInstance()->GetSiteURL());
   EXPECT_EQ(kUrl, contents()->GetLastCommittedURL());
@@ -204,7 +204,7 @@
 
   // Commit the navigation.
   main_test_rfh()->SendNavigate(1, 0, true, kUrl2);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, main_test_rfh()->rfh_state());
+  EXPECT_TRUE(main_test_rfh()->is_active());
   EXPECT_EQ(SiteInstanceImpl::GetSiteForURL(browser_context(), kUrl2),
             main_test_rfh()->GetSiteInstance()->GetSiteURL());
   EXPECT_EQ(kUrl2, contents()->GetLastCommittedURL());
@@ -258,7 +258,7 @@
 
   // Commit the navigation.
   main_test_rfh()->SendNavigate(1, 0, true, kUrl2);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, main_test_rfh()->rfh_state());
+  EXPECT_TRUE(main_test_rfh()->is_active());
   EXPECT_EQ(kUrl2, contents()->GetLastCommittedURL());
   EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
   EXPECT_FALSE(node->render_manager()->pending_frame_host());
diff --git a/content/browser/frame_host/render_frame_host_delegate.cc b/content/browser/frame_host/render_frame_host_delegate.cc
index b9dca1d..9b00f6bf 100644
--- a/content/browser/frame_host/render_frame_host_delegate.cc
+++ b/content/browser/frame_host/render_frame_host_delegate.cc
@@ -45,9 +45,8 @@
     const MediaResponseCallback& callback) {
   LOG(ERROR) << "RenderFrameHostDelegate::RequestMediaAccessPermission: "
              << "Not supported.";
-  callback.Run(MediaStreamDevices(),
-               MEDIA_DEVICE_NOT_SUPPORTED,
-               scoped_ptr<MediaStreamUI>());
+  callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED,
+               std::unique_ptr<MediaStreamUI>());
 }
 
 bool RenderFrameHostDelegate::CheckMediaAccessPermission(
@@ -83,8 +82,8 @@
   return false;
 }
 
-scoped_ptr<WebUIImpl> RenderFrameHostDelegate::CreateWebUIForRenderFrameHost(
-    const GURL& url) {
+std::unique_ptr<WebUIImpl>
+RenderFrameHostDelegate::CreateWebUIForRenderFrameHost(const GURL& url) {
   return nullptr;
 }
 
diff --git a/content/browser/frame_host/render_frame_host_delegate.h b/content/browser/frame_host/render_frame_host_delegate.h
index 1cec9c7..28b9570 100644
--- a/content/browser/frame_host/render_frame_host_delegate.h
+++ b/content/browser/frame_host/render_frame_host_delegate.h
@@ -184,7 +184,8 @@
 
   // Creates a WebUI object for a frame navigating to |url|. If no WebUI
   // applies, returns null.
-  virtual scoped_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(const GURL& url);
+  virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(
+      const GURL& url);
 
  protected:
   virtual ~RenderFrameHostDelegate() {}
diff --git a/content/browser/frame_host/render_frame_host_factory.cc b/content/browser/frame_host/render_frame_host_factory.cc
index 92a449f..cc6d962 100644
--- a/content/browser/frame_host/render_frame_host_factory.cc
+++ b/content/browser/frame_host/render_frame_host_factory.cc
@@ -5,6 +5,7 @@
 #include "content/browser/frame_host/render_frame_host_factory.h"
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "content/browser/frame_host/frame_tree_node.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
 
@@ -14,7 +15,7 @@
 RenderFrameHostFactory* RenderFrameHostFactory::factory_ = NULL;
 
 // static
-scoped_ptr<RenderFrameHostImpl> RenderFrameHostFactory::Create(
+std::unique_ptr<RenderFrameHostImpl> RenderFrameHostFactory::Create(
     SiteInstance* site_instance,
     RenderViewHostImpl* render_view_host,
     RenderFrameHostDelegate* delegate,
@@ -29,7 +30,7 @@
         site_instance, render_view_host, delegate, rwh_delegate, frame_tree,
         frame_tree_node, routing_id, widget_routing_id, hidden);
   }
-  return make_scoped_ptr(new RenderFrameHostImpl(
+  return base::WrapUnique(new RenderFrameHostImpl(
       site_instance, render_view_host, delegate, rwh_delegate, frame_tree,
       frame_tree_node, routing_id, widget_routing_id, hidden));
 }
diff --git a/content/browser/frame_host/render_frame_host_factory.h b/content/browser/frame_host/render_frame_host_factory.h
index d6eb490..52bef4a 100644
--- a/content/browser/frame_host/render_frame_host_factory.h
+++ b/content/browser/frame_host/render_frame_host_factory.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
 namespace content {
@@ -28,7 +29,7 @@
  public:
   // Creates a new RenderFrameHostImpl using the currently registered factory,
   // or a regular RenderFrameHostImpl if no factory is registered.
-  static scoped_ptr<RenderFrameHostImpl> Create(
+  static std::unique_ptr<RenderFrameHostImpl> Create(
       SiteInstance* site_instance,
       RenderViewHostImpl* render_view_host,
       RenderFrameHostDelegate* delegate,
@@ -48,7 +49,7 @@
 
   // You can derive from this class and specify an implementation for this
   // function to create an alternate kind of RenderFrameHostImpl for testing.
-  virtual scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(
+  virtual std::unique_ptr<RenderFrameHostImpl> CreateRenderFrameHost(
       SiteInstance* site_instance,
       RenderViewHostImpl* render_view_host,
       RenderFrameHostDelegate* delegate,
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index a5cf74d7..9c7c7653 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -10,6 +10,7 @@
 #include "base/command_line.h"
 #include "base/containers/hash_tables.h"
 #include "base/lazy_instance.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/process/kill.h"
 #include "base/time/time.h"
@@ -136,11 +137,6 @@
 }  // namespace
 
 // static
-bool RenderFrameHostImpl::IsRFHStateActive(RenderFrameHostImplState rfh_state) {
-  return rfh_state == STATE_DEFAULT;
-}
-
-// static
 RenderFrameHost* RenderFrameHost::FromID(int render_process_id,
                                          int render_frame_id) {
   return RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
@@ -197,7 +193,7 @@
       frame_tree_node_(frame_tree_node),
       render_widget_host_(nullptr),
       routing_id_(routing_id),
-      rfh_state_(STATE_DEFAULT),
+      is_waiting_for_swapout_ack_(false),
       render_frame_created_(false),
       navigations_suspended_(false),
       is_waiting_for_beforeunload_ack_(false),
@@ -267,18 +263,16 @@
   if (delegate_ && render_frame_created_)
     delegate_->RenderFrameDeleted(this);
 
-  bool is_active = IsRFHStateActive(rfh_state_);
-
   // If this RenderFrameHost is swapped out, it already decremented the active
   // frame count of the SiteInstance it belongs to.
-  if (is_active)
+  if (is_active())
     GetSiteInstance()->DecrementActiveFrameCount();
 
   // If this RenderFrameHost is swapping with a RenderFrameProxyHost, the
   // RenderFrame will already be deleted in the renderer process. Main frame
   // RenderFrames will be cleaned up as part of deleting its RenderView. In all
   // other cases, the RenderFrame should be cleaned up (if it exists).
-  if (is_active && !frame_tree_node_->IsMainFrame() && render_frame_created_)
+  if (is_active() && !frame_tree_node_->IsMainFrame() && render_frame_created_)
     Send(new FrameMsg_Delete(routing_id_));
 
   // NULL out the swapout timer; in crash dumps this member will be null only if
@@ -458,7 +452,7 @@
 bool RenderFrameHostImpl::Send(IPC::Message* message) {
   if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) {
     return render_view_host_->GetWidget()->input_router()->SendInput(
-        make_scoped_ptr(message));
+        base::WrapUnique(message));
   }
 
   return GetProcess()->Send(message);
@@ -844,8 +838,7 @@
   // RenderFrame corresponding to this host sent an IPC message to create a
   // frame and it is delivered after this host is swapped out.
   // Ignore such messages, as we know this RenderFrameHost is going away.
-  if (rfh_state_ != RenderFrameHostImpl::STATE_DEFAULT ||
-      frame_tree_node_->current_frame_host() != this)
+  if (!is_active() || frame_tree_node_->current_frame_host() != this)
     return;
 
   frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(), new_routing_id,
@@ -1145,13 +1138,13 @@
 }
 
 void RenderFrameHostImpl::SetNavigationHandle(
-    scoped_ptr<NavigationHandleImpl> navigation_handle) {
+    std::unique_ptr<NavigationHandleImpl> navigation_handle) {
   navigation_handle_ = std::move(navigation_handle);
   if (navigation_handle_)
     navigation_handle_->set_render_frame_host(this);
 }
 
-scoped_ptr<NavigationHandleImpl>
+std::unique_ptr<NavigationHandleImpl>
 RenderFrameHostImpl::PassNavigationHandleOwnership() {
   DCHECK(!IsBrowserSideNavigationEnabled());
   navigation_handle_->set_is_transferring(true);
@@ -1160,7 +1153,8 @@
 
 void RenderFrameHostImpl::OnCrossSiteResponse(
     const GlobalRequestID& global_request_id,
-    scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
+    std::unique_ptr<CrossSiteTransferringRequest>
+        cross_site_transferring_request,
     const std::vector<GURL>& transfer_url_chain,
     const Referrer& referrer,
     ui::PageTransition page_transition,
@@ -1180,9 +1174,9 @@
   // to be fixed when RenderViewHostImpl::OnSwapOut moves to RenderFrameHost.
   TRACE_EVENT_ASYNC_BEGIN0("navigation", "RenderFrameHostImpl::SwapOut", this);
 
-  // If this RenderFrameHost is not in the default state, it must have already
+  // If this RenderFrameHost is already pending deletion, it must have already
   // gone through this, therefore just return.
-  if (rfh_state_ != RenderFrameHostImpl::STATE_DEFAULT) {
+  if (!is_active()) {
     NOTREACHED() << "RFH should be in default state when calling SwapOut.";
     return;
   }
@@ -1204,9 +1198,16 @@
                               replication_state));
   }
 
-  // If this is the last active frame in the SiteInstance, the SetState call
-  // below will trigger the deletion of the SiteInstance's proxies.
-  SetState(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT);
+  // TODO(nasko): If the frame is not live, the RFH should just be deleted by
+  // simulating the receipt of swap out ack.
+  is_waiting_for_swapout_ack_ = true;
+  if (frame_tree_node_->IsMainFrame())
+    render_view_host_->set_is_active(false);
+
+  // If this is the last active frame in the SiteInstance, the
+  // DecrementActiveFrameCount call will trigger the deletion of the
+  // SiteInstance's proxies.
+  GetSiteInstance()->DecrementActiveFrameCount();
 
   if (!GetParent())
     delegate_->SwappedOut(this);
@@ -1306,7 +1307,7 @@
 
 bool RenderFrameHostImpl::IsWaitingForUnloadACK() const {
   return render_view_host_->is_waiting_for_close_ack_ ||
-      rfh_state_ == STATE_PENDING_SWAP_OUT;
+         is_waiting_for_swapout_ack_;
 }
 
 void RenderFrameHostImpl::OnSwapOutACK() {
@@ -1340,7 +1341,7 @@
   // If the process has died, we don't need to wait for the swap out ack from
   // this RenderFrame if it is pending deletion.  Complete the swap out to
   // destroy it.
-  if (!IsRFHStateActive(rfh_state()))
+  if (!is_active())
     OnSwappedOut();
 
   // Note: don't add any more code at this point in the function because
@@ -1350,7 +1351,7 @@
 
 void RenderFrameHostImpl::OnSwappedOut() {
   // Ignore spurious swap out ack.
-  if (rfh_state_ != STATE_PENDING_SWAP_OUT)
+  if (!is_waiting_for_swapout_ack_)
     return;
 
   TRACE_EVENT_ASYNC_END0("navigation", "RenderFrameHostImpl::SwapOut", this);
@@ -1359,8 +1360,7 @@
   ClearAllWebUI();
 
   // If this is a main frame RFH that's about to be deleted, update its RVH's
-  // swapped-out state here, since SetState won't be called once this RFH is
-  // deleted below. https://crbug.com/505887
+  // swapped-out state here. https://crbug.com/505887
   if (frame_tree_node_->IsMainFrame()) {
     render_view_host_->set_is_active(false);
     render_view_host_->set_is_swapped_out(true);
@@ -1637,8 +1637,7 @@
   RenderWidgetHostViewBase* view = GetViewForAccessibility();
 
   AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
-  if ((accessibility_mode != AccessibilityModeOff) && view &&
-      RenderFrameHostImpl::IsRFHStateActive(rfh_state())) {
+  if ((accessibility_mode != AccessibilityModeOff) && view && is_active()) {
     if (accessibility_mode & AccessibilityModeFlagPlatform)
       GetOrCreateBrowserAccessibilityManager();
 
@@ -1708,7 +1707,7 @@
 
   RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
       render_view_host_->GetWidget()->GetView());
-  if (view && RenderFrameHostImpl::IsRFHStateActive(rfh_state())) {
+  if (view && is_active()) {
     AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
     if (accessibility_mode & AccessibilityModeFlagPlatform) {
       BrowserAccessibilityManager* manager =
@@ -1788,7 +1787,7 @@
 
   // Only inform the FrameTreeNode of a change in load state if the load state
   // of this RenderFrameHost is being tracked.
-  if (rfh_state_ == STATE_DEFAULT) {
+  if (is_active()) {
     frame_tree_node_->DidStartLoading(to_different_document,
                                       was_previously_loading);
   }
@@ -1810,7 +1809,7 @@
 
   // Only inform the FrameTreeNode of a change in load state if the load state
   // of this RenderFrameHost is being tracked.
-  if (rfh_state_ == STATE_DEFAULT)
+  if (is_active())
     frame_tree_node_->DidStopLoading();
 }
 
@@ -1926,34 +1925,26 @@
       GetServiceRegistry(), this);
 }
 
-void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) {
-  // We decrement the number of RenderFrameHosts in a SiteInstance when the
-  // status of a RenderFrameHost gets flipped from active.
-  if (IsRFHStateActive(rfh_state_) && !IsRFHStateActive(rfh_state))
-    GetSiteInstance()->DecrementActiveFrameCount();
+void RenderFrameHostImpl::ResetWaitingState() {
+  DCHECK(is_active());
 
   // The active state of the RVH is determined by its main frame, since
   // subframes should have their own widgets.
   if (frame_tree_node_->IsMainFrame()) {
-    render_view_host_->set_is_active(IsRFHStateActive(rfh_state));
+    render_view_host_->set_is_active(true);
     render_view_host_->set_is_swapped_out(false);
   }
 
-  // Whenever we change the RFH state to and from active state, we should not be
-  // waiting for beforeunload or close acks.  We clear them here to be safe,
-  // since they can cause navigations to be ignored in
-  // OnDidCommitProvisionalLoad.
-  // TODO(creis): Move is_waiting_for_beforeunload_ack_ into the state machine.
-  if (rfh_state == STATE_DEFAULT || rfh_state_ == STATE_DEFAULT) {
-    if (is_waiting_for_beforeunload_ack_) {
-      is_waiting_for_beforeunload_ack_ = false;
-      render_view_host_->GetWidget()->decrement_in_flight_event_count();
-      render_view_host_->GetWidget()->StopHangMonitorTimeout();
-    }
-    send_before_unload_start_time_ = base::TimeTicks();
-    render_view_host_->is_waiting_for_close_ack_ = false;
+  // Whenever we reset the RFH state, we should not be waiting for beforeunload
+  // or close acks.  We clear them here to be safe, since they can cause
+  // navigations to be ignored in OnDidCommitProvisionalLoad.
+  if (is_waiting_for_beforeunload_ack_) {
+    is_waiting_for_beforeunload_ack_ = false;
+    render_view_host_->GetWidget()->decrement_in_flight_event_count();
+    render_view_host_->GetWidget()->StopHangMonitorTimeout();
   }
-  rfh_state_ = rfh_state;
+  send_before_unload_start_time_ = base::TimeTicks();
+  render_view_host_->is_waiting_for_close_ack_ = false;
 }
 
 bool RenderFrameHostImpl::CanCommitURL(const GURL& url) {
@@ -2019,8 +2010,8 @@
         new NavigationParams(common_params, start_params, request_params));
   } else {
     // Get back to a clean state, in case we start a new navigation without
-    // completing a RFH swap or unload handler.
-    SetState(RenderFrameHostImpl::STATE_DEFAULT);
+    // completing an unload handler.
+    ResetWaitingState();
     SendNavigateMessage(common_params, start_params, request_params);
   }
 
@@ -2176,7 +2167,7 @@
 // PlzNavigate
 void RenderFrameHostImpl::CommitNavigation(
     ResourceResponse* response,
-    scoped_ptr<StreamHandle> body,
+    std::unique_ptr<StreamHandle> body,
     const CommonNavigationParams& common_params,
     const RequestNavigationParams& request_params,
     bool is_view_source) {
@@ -2185,8 +2176,8 @@
   UpdatePermissionsForNavigation(common_params, request_params);
 
   // Get back to a clean state, in case we start a new navigation without
-  // completing a RFH swap or unload handler.
-  SetState(RenderFrameHostImpl::STATE_DEFAULT);
+  // completing an unload handler.
+  ResetWaitingState();
 
   // The renderer can exit view source mode when any error or cancellation
   // happen. When reusing the same renderer, overwrite to recover the mode.
@@ -2226,8 +2217,8 @@
     bool has_stale_copy_in_cache,
     int error_code) {
   // Get back to a clean state, in case a new navigation started without
-  // completing a RFH swap or unload handler.
-  SetState(RenderFrameHostImpl::STATE_DEFAULT);
+  // completing an unload handler.
+  ResetWaitingState();
 
   Send(new FrameMsg_FailedNavigation(routing_id_, common_params, request_params,
                                      has_stale_copy_in_cache, error_code));
@@ -2394,13 +2385,17 @@
     // When pending deletion, just set the loading state to not loading.
     // Otherwise, OnDidStopLoading will take care of that, as well as sending
     // notification to the FrameTreeNode about the change in loading state.
-    if (rfh_state_ != STATE_DEFAULT)
+    if (!is_active())
       is_loading_ = false;
     else
       OnDidStopLoading();
   }
 }
 
+void RenderFrameHostImpl::SuppressFurtherDialogs() {
+  Send(new FrameMsg_SuppressFurtherDialogs(GetRoutingID()));
+}
+
 bool RenderFrameHostImpl::IsSameSiteInstance(
     RenderFrameHostImpl* other_render_frame_host) {
   // As a sanity check, make sure the frame belongs to the same BrowserContext.
@@ -2429,8 +2424,7 @@
 
 void RenderFrameHostImpl::UpdateAXTreeData() {
   AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
-  if (accessibility_mode == AccessibilityModeOff ||
-      !RenderFrameHostImpl::IsRFHStateActive(rfh_state())) {
+  if (accessibility_mode == AccessibilityModeOff || !is_active()) {
     return;
   }
 
@@ -2561,9 +2555,8 @@
 
   if (!suspend && suspended_nav_params_) {
     // There's navigation message params waiting to be sent. Now that we're not
-    // suspended anymore, resume navigation by sending them. If we were swapped
-    // out, we should also stop filtering out the IPC messages now.
-    SetState(RenderFrameHostImpl::STATE_DEFAULT);
+    // suspended anymore, resume navigation by sending them.
+    ResetWaitingState();
 
     DCHECK(!proceed_time.is_null());
     // TODO(csharrison): Make sure that PlzNavigate and the current architecture
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index e4c4f08..8e5046c 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -103,21 +103,6 @@
       base::Callback<void(
           const ui::AXTreeUpdate&)>;
 
-  // Keeps track of the state of the RenderFrameHostImpl, particularly with
-  // respect to swap out.
-  enum RenderFrameHostImplState {
-    // The standard state for a RFH handling the communication with an active
-    // RenderFrame.
-    STATE_DEFAULT = 0,
-    // The RFH has not received the SwapOutACK yet, but the new page has
-    // committed in a different RFH.  Upon reception of the SwapOutACK, the RFH
-    // will be deleted.
-    STATE_PENDING_SWAP_OUT,
-  };
-  // Helper function to determine whether the RFH state should contribute to the
-  // number of active frames of a SiteInstance or not.
-  static bool IsRFHStateActive(RenderFrameHostImplState rfh_state);
-
   // An accessibility reset is only allowed to prevent very rare corner cases
   // or race conditions where the browser and renderer get out of sync. If
   // this happens more than this many times, kill the renderer.
@@ -315,25 +300,26 @@
   // |navigation_handle| is transferred.
   // PlzNavigate: called when a navigation is ready to commit in this
   // RenderFrameHost.
-  void SetNavigationHandle(scoped_ptr<NavigationHandleImpl> navigation_handle);
+  void SetNavigationHandle(
+      std::unique_ptr<NavigationHandleImpl> navigation_handle);
 
   // Gives the ownership of |navigation_handle_| to the caller.
   // This happens during transfer navigations, where it should be transferred
   // from the RenderFrameHost that issued the initial request to the new
   // RenderFrameHost that will issue the transferring request.
-  scoped_ptr<NavigationHandleImpl> PassNavigationHandleOwnership();
+  std::unique_ptr<NavigationHandleImpl> PassNavigationHandleOwnership();
 
   // Called on the pending RenderFrameHost when the network response is ready to
   // commit.  We should ensure that the old RenderFrameHost runs its unload
   // handler and determine whether a transfer to a different RenderFrameHost is
   // needed.
-  void OnCrossSiteResponse(
-      const GlobalRequestID& global_request_id,
-      scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
-      const std::vector<GURL>& transfer_url_chain,
-      const Referrer& referrer,
-      ui::PageTransition page_transition,
-      bool should_replace_current_entry);
+  void OnCrossSiteResponse(const GlobalRequestID& global_request_id,
+                           std::unique_ptr<CrossSiteTransferringRequest>
+                               cross_site_transferring_request,
+                           const std::vector<GURL>& transfer_url_chain,
+                           const Referrer& referrer,
+                           ui::PageTransition page_transition,
+                           bool should_replace_current_entry);
 
   // Tells the renderer that this RenderFrame is being swapped out for one in a
   // different renderer process.  It should run its unload handler and move to
@@ -359,8 +345,9 @@
   // out.
   void OnSwappedOut();
 
-  // The current state of this RFH.
-  RenderFrameHostImplState rfh_state() const { return rfh_state_; }
+  // This method returns true from the time this RenderFrameHost is created
+  // until SwapOut is called, at which point it is pending deletion.
+  bool is_active() { return !is_waiting_for_swapout_ack_; }
 
   // Sends the given navigation message. Use this rather than sending it
   // yourself since this does the internal bookkeeping described below. This
@@ -506,7 +493,7 @@
   // PlzNavigate: Indicates that a navigation is ready to commit and can be
   // handled by this RenderFrame.
   void CommitNavigation(ResourceResponse* response,
-                        scoped_ptr<StreamHandle> body,
+                        std::unique_ptr<StreamHandle> body,
                         const CommonNavigationParams& common_params,
                         const RequestNavigationParams& request_params,
                         bool is_view_source);
@@ -559,6 +546,12 @@
   // in a non-loading state.
   void ResetLoadingState();
 
+  // Tells the renderer that this RenderFrame will soon be swapped out, and thus
+  // not to create any new modal dialogs until it happens.  This must be done
+  // separately so that the ScopedPageLoadDeferrers of any current dialogs are
+  // no longer on the stack when we attempt to swap it out.
+  void SuppressFurtherDialogs();
+
   // PlzNavigate: returns the LoFi state of the last successful navigation that
   // made a network request.
   LoFiState last_navigation_lofi_state() const {
@@ -684,9 +677,9 @@
   // Registers Mojo services that this frame host makes available.
   void RegisterMojoServices();
 
-  // Updates the state of this RenderFrameHost and clears any waiting state
-  // that is no longer relevant.
-  void SetState(RenderFrameHostImplState rfh_state);
+  // Resets any waiting state of this RenderFrameHost that is no longer
+  // relevant.
+  void ResetWaitingState();
 
   // Returns whether the given URL is allowed to commit in the current process.
   // This is a more conservative check than RenderProcessHost::FilterURL, since
@@ -830,8 +823,9 @@
 
   int routing_id_;
 
-  // The current state of this RenderFrameHost.
-  RenderFrameHostImplState rfh_state_;
+  // Boolean indicating whether this RenderFrameHost is being actively used or
+  // is waiting for FrameHostMsg_SwapOut_ACK and thus pending deletion.
+  bool is_waiting_for_swapout_ack_;
 
   // Tracks whether the RenderFrame for this RenderFrameHost has been created in
   // the renderer process.  Currently only used for subframes.
@@ -850,7 +844,7 @@
   // will destroy the pending RenderFrameHost and create a new one if a second
   // navigation occurs.
   // PlzNavigate: unused as navigations are never suspended.
-  scoped_ptr<NavigationParams> suspended_nav_params_;
+  std::unique_ptr<NavigationParams> suspended_nav_params_;
 
   // When the last BeforeUnload message was sent.
   base::TimeTicks send_before_unload_start_time_;
@@ -891,18 +885,18 @@
   // Used to swap out or shut down this RFH when the unload event is taking too
   // long to execute, depending on the number of active frames in the
   // SiteInstance.
-  scoped_ptr<TimeoutMonitor> swapout_event_monitor_timeout_;
+  std::unique_ptr<TimeoutMonitor> swapout_event_monitor_timeout_;
 
-  scoped_ptr<ServiceRegistryImpl> service_registry_;
+  std::unique_ptr<ServiceRegistryImpl> service_registry_;
 
 #if defined(OS_ANDROID)
-  scoped_ptr<ServiceRegistryAndroid> service_registry_android_;
+  std::unique_ptr<ServiceRegistryAndroid> service_registry_android_;
 #endif
 
-  scoped_ptr<WebBluetoothServiceImpl> web_bluetooth_service_;
+  std::unique_ptr<WebBluetoothServiceImpl> web_bluetooth_service_;
 
   // The object managing the accessibility tree for this frame.
-  scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_;
+  std::unique_ptr<BrowserAccessibilityManager> browser_accessibility_manager_;
 
   // This is nonzero if we sent an accessibility reset to the renderer and
   // we're waiting for an IPC containing this reset token (sequentially
@@ -927,21 +921,21 @@
   base::Callback<void(RenderFrameHostImpl*, ui::AXEvent, int)>
       accessibility_testing_callback_;
   // The most recently received accessibility tree - for testing only.
-  scoped_ptr<ui::AXTree> ax_tree_for_testing_;
+  std::unique_ptr<ui::AXTree> ax_tree_for_testing_;
   // Flag to not create a BrowserAccessibilityManager, for testing. If one
   // already exists it will still be used.
   bool no_create_browser_accessibility_manager_for_testing_;
 
   // PlzNavigate: Owns the stream used in navigations to store the body of the
   // response once it has started.
-  scoped_ptr<StreamHandle> stream_handle_;
+  std::unique_ptr<StreamHandle> stream_handle_;
 
   // Context shared for each mojom::PermissionService instance created for this
   // RFH.
-  scoped_ptr<PermissionServiceContext> permission_service_context_;
+  std::unique_ptr<PermissionServiceContext> permission_service_context_;
 
   // The frame's Mojo Shell service.
-  scoped_ptr<FrameMojoShell> frame_mojo_shell_;
+  std::unique_ptr<FrameMojoShell> frame_mojo_shell_;
 
   // Holder of Mojo connection with ImageDownloader service in RenderFrame.
   content::mojom::ImageDownloaderPtr mojo_image_downloader_;
@@ -951,18 +945,18 @@
   // navigation per RenderFrameHost.
   // PlzNavigate: before the navigation is ready to be committed, the
   // NavigationHandle for it is owned by the NavigationRequest.
-  scoped_ptr<NavigationHandleImpl> navigation_handle_;
+  std::unique_ptr<NavigationHandleImpl> navigation_handle_;
 
   // The associated WebUIImpl and its type. They will be set if the current
   // document is from WebUI source. Otherwise they will be null and
   // WebUI::kNoWebUI, respectively.
-  scoped_ptr<WebUIImpl> web_ui_;
+  std::unique_ptr<WebUIImpl> web_ui_;
   WebUI::TypeID web_ui_type_;
 
   // The pending WebUIImpl and its type. These values will be used exclusively
   // for same-site navigations to keep a transition of a WebUI in a pending
   // state until the navigation commits.
-  scoped_ptr<WebUIImpl> pending_web_ui_;
+  std::unique_ptr<WebUIImpl> pending_web_ui_;
   WebUI::TypeID pending_web_ui_type_;
 
   // If true the associated WebUI should be reused when CommitPendingWebUI is
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index d8216c4..d7c04743 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -13,6 +13,7 @@
 #include "base/debug/crash_logging.h"
 #include "base/debug/dump_without_crashing.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/trace_event/trace_event.h"
 #include "content/browser/child_process_security_policy_impl.h"
@@ -81,7 +82,7 @@
   ResetProxyHosts();
 
   // We should always have a current RenderFrameHost except in some tests.
-  SetRenderFrameHost(scoped_ptr<RenderFrameHostImpl>());
+  SetRenderFrameHost(std::unique_ptr<RenderFrameHostImpl>());
 }
 
 void RenderFrameHostManager::Init(SiteInstance* site_instance,
@@ -427,7 +428,8 @@
 void RenderFrameHostManager::OnCrossSiteResponse(
     RenderFrameHostImpl* transferring_render_frame_host,
     const GlobalRequestID& global_request_id,
-    scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
+    std::unique_ptr<CrossSiteTransferringRequest>
+        cross_site_transferring_request,
     const std::vector<GURL>& transfer_url_chain,
     const Referrer& referrer,
     ui::PageTransition page_transition,
@@ -626,18 +628,17 @@
 }
 
 void RenderFrameHostManager::SwapOutOldFrame(
-    scoped_ptr<RenderFrameHostImpl> old_render_frame_host) {
+    std::unique_ptr<RenderFrameHostImpl> old_render_frame_host) {
   TRACE_EVENT1("navigation", "RenderFrameHostManager::SwapOutOldFrame",
                "FrameTreeNode id", frame_tree_node_->frame_tree_node_id());
 
   // Tell the renderer to suppress any further modal dialogs so that we can swap
   // it out.  This must be done before canceling any current dialog, in case
   // there is a loop creating additional dialogs.
-  // TODO(creis): Handle modal dialogs in subframe processes.
-  old_render_frame_host->render_view_host()->SuppressDialogsUntilSwapOut();
+  old_render_frame_host->SuppressFurtherDialogs();
 
   // Now close any modal dialogs that would prevent us from swapping out.  This
-  // must be done separately from SwapOut, so that the PageGroupLoadDeferrer is
+  // must be done separately from SwapOut, so that the ScopedPageLoadDeferrer is
   // no longer on the stack when we send the SwapOut message.
   delegate_->CancelModalDialogsForRenderManager();
 
@@ -672,7 +673,7 @@
 }
 
 void RenderFrameHostManager::DiscardUnusedFrame(
-    scoped_ptr<RenderFrameHostImpl> render_frame_host) {
+    std::unique_ptr<RenderFrameHostImpl> render_frame_host) {
   // TODO(carlosk): this code is very similar to what can be found in
   // SwapOutOldFrame and we should see that these are unified at some point.
 
@@ -701,7 +702,7 @@
 }
 
 void RenderFrameHostManager::MoveToPendingDeleteHosts(
-    scoped_ptr<RenderFrameHostImpl> render_frame_host) {
+    std::unique_ptr<RenderFrameHostImpl> render_frame_host) {
   // |render_frame_host| will be deleted when its SwapOut ACK is received, or
   // when the timer times out, or when the RFHM itself is deleted (whichever
   // comes first).
@@ -934,7 +935,7 @@
 }
 
 // PlzNavigate
-scoped_ptr<RenderFrameHostImpl>
+std::unique_ptr<RenderFrameHostImpl>
 RenderFrameHostManager::UnsetSpeculativeRenderFrameHost() {
   CHECK(IsBrowserSideNavigationEnabled());
   speculative_render_frame_host_->GetProcess()->RemovePendingView();
@@ -1019,7 +1020,7 @@
       << "A proxy already existed for this SiteInstance.";
   RenderFrameProxyHost* proxy_host =
       new RenderFrameProxyHost(site_instance, rvh, frame_tree_node_);
-  proxy_hosts_[site_instance_id] = make_scoped_ptr(proxy_host);
+  proxy_hosts_[site_instance_id] = base::WrapUnique(proxy_host);
   static_cast<SiteInstanceImpl*>(site_instance)->AddObserver(this);
   return proxy_host;
 }
@@ -1580,12 +1581,12 @@
   }
 }
 
-scoped_ptr<RenderFrameHostImpl> RenderFrameHostManager::CreateRenderFrameHost(
-    SiteInstance* site_instance,
-    int32_t view_routing_id,
-    int32_t frame_routing_id,
-    int32_t widget_routing_id,
-    bool hidden) {
+std::unique_ptr<RenderFrameHostImpl>
+RenderFrameHostManager::CreateRenderFrameHost(SiteInstance* site_instance,
+                                              int32_t view_routing_id,
+                                              int32_t frame_routing_id,
+                                              int32_t widget_routing_id,
+                                              bool hidden) {
   if (frame_routing_id == MSG_ROUTING_NONE)
     frame_routing_id = site_instance->GetProcess()->GetNextRoutingID();
 
@@ -1642,7 +1643,7 @@
   return !!speculative_render_frame_host_;
 }
 
-scoped_ptr<RenderFrameHostImpl> RenderFrameHostManager::CreateRenderFrame(
+std::unique_ptr<RenderFrameHostImpl> RenderFrameHostManager::CreateRenderFrame(
     SiteInstance* instance,
     bool hidden,
     int* view_routing_id_ptr) {
@@ -1653,7 +1654,7 @@
   CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible() ||
         frame_tree_node_->IsMainFrame());
 
-  scoped_ptr<RenderFrameHostImpl> new_render_frame_host;
+  std::unique_ptr<RenderFrameHostImpl> new_render_frame_host;
   bool success = true;
   if (view_routing_id_ptr)
     *view_routing_id_ptr = MSG_ROUTING_NONE;
@@ -2033,7 +2034,7 @@
 
   // Swap in the pending or speculative frame and make it active. Also ensure
   // the FrameTree stays in sync.
-  scoped_ptr<RenderFrameHostImpl> old_render_frame_host;
+  std::unique_ptr<RenderFrameHostImpl> old_render_frame_host;
   if (!IsBrowserSideNavigationEnabled()) {
     DCHECK(!speculative_render_frame_host_);
     old_render_frame_host =
@@ -2314,9 +2315,9 @@
     frame_tree_node_->DidStopLoading();
 }
 
-scoped_ptr<RenderFrameHostImpl>
+std::unique_ptr<RenderFrameHostImpl>
 RenderFrameHostManager::UnsetPendingRenderFrameHost() {
-  scoped_ptr<RenderFrameHostImpl> pending_render_frame_host =
+  std::unique_ptr<RenderFrameHostImpl> pending_render_frame_host =
       std::move(pending_render_frame_host_);
 
   RenderFrameDevToolsAgentHost::OnCancelPendingNavigation(
@@ -2329,10 +2330,10 @@
   return pending_render_frame_host;
 }
 
-scoped_ptr<RenderFrameHostImpl> RenderFrameHostManager::SetRenderFrameHost(
-    scoped_ptr<RenderFrameHostImpl> render_frame_host) {
+std::unique_ptr<RenderFrameHostImpl> RenderFrameHostManager::SetRenderFrameHost(
+    std::unique_ptr<RenderFrameHostImpl> render_frame_host) {
   // Swap the two.
-  scoped_ptr<RenderFrameHostImpl> old_render_frame_host =
+  std::unique_ptr<RenderFrameHostImpl> old_render_frame_host =
       std::move(render_frame_host_);
   render_frame_host_ = std::move(render_frame_host);
 
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h
index 63a4277..a3cb203 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -9,12 +9,12 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <unordered_map>
 
 #include "base/containers/hash_tables.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
 #include "content/browser/renderer_host/render_view_host_delegate.h"
@@ -299,14 +299,14 @@
   // determine whether a RenderFrameHost transfer is needed.
   // |cross_site_transferring_request| is NULL if a request is not being
   // transferred between renderers.
-  void OnCrossSiteResponse(
-      RenderFrameHostImpl* pending_render_frame_host,
-      const GlobalRequestID& global_request_id,
-      scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
-      const std::vector<GURL>& transfer_url_chain,
-      const Referrer& referrer,
-      ui::PageTransition page_transition,
-      bool should_replace_current_entry);
+  void OnCrossSiteResponse(RenderFrameHostImpl* pending_render_frame_host,
+                           const GlobalRequestID& global_request_id,
+                           std::unique_ptr<CrossSiteTransferringRequest>
+                               cross_site_transferring_request,
+                           const std::vector<GURL>& transfer_url_chain,
+                           const Referrer& referrer,
+                           ui::PageTransition page_transition,
+                           bool should_replace_current_entry);
 
   // Determines whether a navigation to |dest_url| may be completed using an
   // existing RenderFrameHost, or whether transferring to a new RenderFrameHost
@@ -338,9 +338,10 @@
   // Creates and initializes a RenderFrameHost. If |view_routing_id_ptr|
   // is not nullptr it will be set to the routing id of the view associated with
   // the frame.
-  scoped_ptr<RenderFrameHostImpl> CreateRenderFrame(SiteInstance* instance,
-                                                    bool hidden,
-                                                    int* view_routing_id_ptr);
+  std::unique_ptr<RenderFrameHostImpl> CreateRenderFrame(
+      SiteInstance* instance,
+      bool hidden,
+      int* view_routing_id_ptr);
 
   // Helper method to create and initialize a RenderFrameProxyHost and return
   // its routing id.
@@ -425,7 +426,7 @@
   // PlzNavigate
   // Clears the speculative members, returning the RenderFrameHost to the caller
   // for disposal.
-  scoped_ptr<RenderFrameHostImpl> UnsetSpeculativeRenderFrameHost();
+  std::unique_ptr<RenderFrameHostImpl> UnsetSpeculativeRenderFrameHost();
 
   // Notification methods to tell this RenderFrameHostManager that the frame it
   // is responsible for has started or stopped loading a document.
@@ -493,7 +494,7 @@
 
   // Returns a const reference to the map of proxy hosts. The keys are
   // SiteInstance IDs, the values are RenderFrameProxyHosts.
-  const std::unordered_map<int32_t, scoped_ptr<RenderFrameProxyHost>>&
+  const std::unordered_map<int32_t, std::unique_ptr<RenderFrameProxyHost>>&
   GetAllProxyHostsForTesting() const {
     return proxy_hosts_;
   }
@@ -657,7 +658,7 @@
                                        FrameTreeNode* skip_this_node);
 
   // Creates a RenderFrameHost and corresponding RenderViewHost if necessary.
-  scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(
+  std::unique_ptr<RenderFrameHostImpl> CreateRenderFrameHost(
       SiteInstance* instance,
       int32_t view_routing_id,
       int32_t frame_routing_id,
@@ -696,28 +697,30 @@
   // Runs the unload handler in the old RenderFrameHost, after the new
   // RenderFrameHost has committed.  |old_render_frame_host| will either be
   // deleted or put on the pending delete list during this call.
-  void SwapOutOldFrame(scoped_ptr<RenderFrameHostImpl> old_render_frame_host);
+  void SwapOutOldFrame(
+      std::unique_ptr<RenderFrameHostImpl> old_render_frame_host);
 
   // Discards a RenderFrameHost that was never made active (for active ones
   // SwapOutOldFrame is used instead).
-  void DiscardUnusedFrame(scoped_ptr<RenderFrameHostImpl> render_frame_host);
+  void DiscardUnusedFrame(
+      std::unique_ptr<RenderFrameHostImpl> render_frame_host);
 
   // Holds |render_frame_host| until it can be deleted when its swap out ACK
   // arrives.
   void MoveToPendingDeleteHosts(
-      scoped_ptr<RenderFrameHostImpl> render_frame_host);
+      std::unique_ptr<RenderFrameHostImpl> render_frame_host);
 
   // Helper method to terminate the pending RenderFrameHost. The frame may be
   // deleted immediately, or it may be kept around in hopes of later reuse.
   void CancelPending();
 
   // Clears pending_render_frame_host_, returning it to the caller for disposal.
-  scoped_ptr<RenderFrameHostImpl> UnsetPendingRenderFrameHost();
+  std::unique_ptr<RenderFrameHostImpl> UnsetPendingRenderFrameHost();
 
   // Helper method to set the active RenderFrameHost. Returns the old
   // RenderFrameHost and updates counts.
-  scoped_ptr<RenderFrameHostImpl> SetRenderFrameHost(
-      scoped_ptr<RenderFrameHostImpl> render_frame_host);
+  std::unique_ptr<RenderFrameHostImpl> SetRenderFrameHost(
+      std::unique_ptr<RenderFrameHostImpl> render_frame_host);
 
   RenderFrameHostImpl* UpdateStateForNavigate(
       const GURL& dest_url,
@@ -750,17 +753,18 @@
   // RenderFrame instance.
   // For now, RenderFrameHost keeps a RenderViewHost in its SiteInstance alive.
   // Eventually, RenderViewHost will be replaced with a page context.
-  scoped_ptr<RenderFrameHostImpl> render_frame_host_;
+  std::unique_ptr<RenderFrameHostImpl> render_frame_host_;
 
   // A RenderFrameHost used to load a cross-site page. This remains hidden
   // while a cross-site request is pending until it calls DidNavigate.
   // Note: This member is not used in PlzNavigate.
-  scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_;
+  std::unique_ptr<RenderFrameHostImpl> pending_render_frame_host_;
 
   // If a pending request needs to be transferred to another process, this
   // owns the request until it's transferred to the new process, so it will be
   // cleaned up if the navigation is cancelled.  Otherwise, this is NULL.
-  scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request_;
+  std::unique_ptr<CrossSiteTransferringRequest>
+      cross_site_transferring_request_;
 
   // This is used to temporarily store the NavigationHandle during
   // transferring navigations. The handle needs to be stored because the old
@@ -768,13 +772,14 @@
   // for the navigation.
   // PlzNavigate: this will never be set since there are no transferring
   // navigations in PlzNavigate.
-  scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_;
+  std::unique_ptr<NavigationHandleImpl> transfer_navigation_handle_;
 
   // Proxy hosts, indexed by site instance ID.
-  std::unordered_map<int32_t, scoped_ptr<RenderFrameProxyHost>> proxy_hosts_;
+  std::unordered_map<int32_t, std::unique_ptr<RenderFrameProxyHost>>
+      proxy_hosts_;
 
   // A list of RenderFrameHosts waiting to shut down after swapping out.
-  using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>;
+  using RFHPendingDeleteList = std::list<std::unique_ptr<RenderFrameHostImpl>>;
   RFHPendingDeleteList pending_delete_hosts_;
 
   // The intersitial page currently shown if any, not own by this class
@@ -790,7 +795,7 @@
   // it.
   // Note: PlzNavigate only uses the speculative RenderFrameHost, not the
   // pending one.
-  scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
+  std::unique_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
 
   base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
 
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index b70475dd..8708039c 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -1862,7 +1862,7 @@
   GURL url1(embedded_test_server()->GetURL("/file_input.html"));
   NavigateToURL(shell(), url1);
   int process_id = shell()->web_contents()->GetRenderProcessHost()->GetID();
-  scoped_ptr<FileChooserDelegate> delegate(new FileChooserDelegate(file));
+  std::unique_ptr<FileChooserDelegate> delegate(new FileChooserDelegate(file));
   shell()->web_contents()->SetDelegate(delegate.get());
   EXPECT_TRUE(ExecuteScript(shell()->web_contents(),
                             "document.getElementById('fileinput').click();"));
@@ -1920,7 +1920,7 @@
   WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
   FrameTreeNode* root = wc->GetFrameTree()->root();
   int process_id = shell()->web_contents()->GetRenderProcessHost()->GetID();
-  scoped_ptr<FileChooserDelegate> delegate(new FileChooserDelegate(file));
+  std::unique_ptr<FileChooserDelegate> delegate(new FileChooserDelegate(file));
   shell()->web_contents()->SetDelegate(delegate.get());
   EXPECT_TRUE(ExecuteScript(root->child_at(0)->current_frame_host(),
                             "document.getElementById('fileinput').click();"));
@@ -2407,7 +2407,7 @@
   // The previous RFH should still be pending deletion, as we wait for either
   // the SwapOut ACK or a timeout.
   ASSERT_TRUE(rfh_a->IsRenderFrameLive());
-  ASSERT_FALSE(rfh_a->IsRFHStateActive(rfh_a->rfh_state()));
+  ASSERT_FALSE(rfh_a->is_active());
 
   // The corresponding RVH should not be pending deletion due to the proxy.
   EXPECT_FALSE(root->render_manager()->IsViewPendingDeletion(
@@ -2465,7 +2465,7 @@
   // The previous RFH and RVH should still be pending deletion, as we wait for
   // either the SwapOut ACK or a timeout.
   ASSERT_TRUE(rfh_a->IsRenderFrameLive());
-  ASSERT_FALSE(rfh_a->IsRFHStateActive(rfh_a->rfh_state()));
+  ASSERT_FALSE(rfh_a->is_active());
   EXPECT_TRUE(root->render_manager()->IsViewPendingDeletion(
                   rfh_a->render_view_host()));
 
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 0dbef0e..1e1c090 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -5,11 +5,13 @@
 #include "content/browser/frame_host/render_frame_host_manager.h"
 
 #include <stdint.h>
+
 #include <utility>
 
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/histogram_tester.h"
 #include "base/time/time.h"
@@ -304,7 +306,7 @@
     WebUIControllerFactory::RegisterFactory(&factory_);
 #if !defined(OS_ANDROID)
     ImageTransportFactory::InitializeForUnitTests(
-        make_scoped_ptr(new NoTransportImageTransportFactory));
+        base::WrapUnique(new NoTransportImageTransportFactory));
 #endif
   }
 
@@ -347,7 +349,7 @@
     TestRenderFrameHost* active_rfh = contents()->GetPendingMainFrame()
                                           ? contents()->GetPendingMainFrame()
                                           : old_rfh;
-    EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, old_rfh->rfh_state());
+    EXPECT_TRUE(old_rfh->is_active());
 
     // Commit the navigation with a new page ID.
     int32_t max_page_id =
@@ -361,8 +363,7 @@
 
     // Make sure that we start to run the unload handler at the time of commit.
     if (old_rfh != active_rfh && !rfh_observer.deleted()) {
-      EXPECT_EQ(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT,
-                old_rfh->rfh_state());
+      EXPECT_FALSE(old_rfh->is_active());
     }
 
     // Simulate the swap out ACK coming from the pending renderer.  This should
@@ -444,7 +445,7 @@
           entry.restore_type() == NavigationEntryImpl::RESTORE_NONE
               ? FrameMsg_Navigate_Type::NORMAL
               : FrameMsg_Navigate_Type::RESTORE;
-      scoped_ptr<NavigationRequest> navigation_request =
+      std::unique_ptr<NavigationRequest> navigation_request =
           NavigationRequest::CreateBrowserInitiated(
               manager->frame_tree_node_, frame_entry->url(),
               frame_entry->referrer(), *frame_entry, entry, navigate_type,
@@ -520,7 +521,7 @@
   EXPECT_FALSE(contents()->GetPendingMainFrame());
 
   // Make a second tab.
-  scoped_ptr<TestWebContents> contents2(
+  std::unique_ptr<TestWebContents> contents2(
       TestWebContents::Create(browser_context(), NULL));
 
   // Load the two URLs in the second tab. Note that the first navigation creates
@@ -659,8 +660,8 @@
   TestRenderFrameHost* rfh2 = contents()->GetPendingMainFrame();
   contents()->TestDidNavigate(rfh2, 1, entry_id, true, kDestUrl,
                               ui::PAGE_TRANSITION_TYPED);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh2->rfh_state());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT, rfh1->rfh_state());
+  EXPECT_FALSE(rfh1->is_active());
+  EXPECT_TRUE(rfh2->is_active());
 
   // The new RVH should be able to update its favicons.
   {
@@ -686,7 +687,7 @@
 // widgets.
 TEST_F(RenderFrameHostManagerTest, GetRenderWidgetHostsReturnsActiveViews) {
   CreateSwappedOutRenderViewHost();
-  scoped_ptr<RenderWidgetHostIterator> widgets(
+  std::unique_ptr<RenderWidgetHostIterator> widgets(
       RenderWidgetHost::GetRenderWidgetHosts());
 
   // We know that there is the only one active widget. Another view is
@@ -706,12 +707,12 @@
 TEST_F(RenderFrameHostManagerTest,
        GetRenderWidgetHostsWithinGetAllRenderWidgetHosts) {
   CreateSwappedOutRenderViewHost();
-  scoped_ptr<RenderWidgetHostIterator> widgets(
+  std::unique_ptr<RenderWidgetHostIterator> widgets(
       RenderWidgetHost::GetRenderWidgetHosts());
 
   while (RenderWidgetHost* w = widgets->GetNextHost()) {
     bool found = false;
-    scoped_ptr<RenderWidgetHostIterator> all_widgets(
+    std::unique_ptr<RenderWidgetHostIterator> all_widgets(
         RenderWidgetHostImpl::GetAllRenderWidgetHosts());
     while (RenderWidgetHost* widget = all_widgets->GetNextHost()) {
       if (w == widget) {
@@ -738,11 +739,11 @@
 
   // Create 2 new tabs and simulate them being the opener chain for the main
   // tab.  They should be in the same SiteInstance.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), instance1));
   contents()->SetOpener(opener1.get());
 
-  scoped_ptr<TestWebContents> opener2(
+  std::unique_ptr<TestWebContents> opener2(
       TestWebContents::Create(browser_context(), instance1));
   opener1->SetOpener(opener2.get());
 
@@ -900,7 +901,7 @@
       SiteInstanceImpl::Create(browser_context());
   EXPECT_FALSE(instance->HasSite());
 
-  scoped_ptr<TestWebContents> web_contents(
+  std::unique_ptr<TestWebContents> web_contents(
       TestWebContents::Create(browser_context(), instance));
 
   RenderFrameHostManager* manager = web_contents->GetRenderManagerForTesting();
@@ -919,7 +920,7 @@
 // Tests the Navigate function. We navigate three sites consecutively and check
 // how the pending/committed RenderViewHost are modified.
 TEST_F(RenderFrameHostManagerTest, Navigate) {
-  scoped_ptr<TestWebContents> web_contents(TestWebContents::Create(
+  std::unique_ptr<TestWebContents> web_contents(TestWebContents::Create(
       browser_context(), SiteInstance::Create(browser_context())));
   RenderViewHostChangedObserver change_observer(web_contents.get());
 
@@ -998,7 +999,7 @@
   scoped_refptr<SiteInstance> instance =
       SiteInstance::Create(browser_context());
 
-  scoped_ptr<TestWebContents> web_contents(
+  std::unique_ptr<TestWebContents> web_contents(
       TestWebContents::Create(browser_context(), instance));
   RenderFrameHostManager* manager = web_contents->GetRenderManagerForTesting();
   RenderFrameHostImpl* initial_rfh = manager->current_frame_host();
@@ -1059,7 +1060,7 @@
   blank_instance->GetProcess()->Init();
 
   // Create a blank tab.
-  scoped_ptr<TestWebContents> web_contents1(
+  std::unique_ptr<TestWebContents> web_contents1(
       TestWebContents::Create(browser_context(), blank_instance));
   RenderFrameHostManager* manager1 =
       web_contents1->GetRenderManagerForTesting();
@@ -1092,7 +1093,7 @@
       host1->render_view_host()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI);
 
   // Now simulate clicking a link that opens in a new tab.
-  scoped_ptr<TestWebContents> web_contents2(
+  std::unique_ptr<TestWebContents> web_contents2(
       TestWebContents::Create(browser_context(), webui_instance));
   RenderFrameHostManager* manager2 =
       web_contents2->GetRenderManagerForTesting();
@@ -1282,7 +1283,7 @@
   contents()->GetPendingMainFrame()->SendNavigate(
       entry1->GetPageID(), entry1->GetUniqueID(), false, entry1->GetURL());
   EXPECT_TRUE(rfh2->IsWaitingForUnloadACK());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT, rfh2->rfh_state());
+  EXPECT_FALSE(rfh2->is_active());
 
   // We should be able to navigate forward.
   contents()->GetController().GoForward();
@@ -1290,7 +1291,7 @@
   const NavigationEntry* entry2 = contents()->GetController().GetPendingEntry();
   contents()->GetPendingMainFrame()->SendNavigate(
       entry2->GetPageID(), entry2->GetUniqueID(), false, entry2->GetURL());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, main_test_rfh()->rfh_state());
+  EXPECT_TRUE(main_test_rfh()->is_active());
 }
 
 // Test that we create swapped out RFHs for the opener chain when navigating an
@@ -1311,13 +1312,13 @@
 
   // Create 2 new tabs and simulate them being the opener chain for the main
   // tab.  They should be in the same SiteInstance.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   RenderFrameHostManager* opener1_manager =
       opener1->GetRenderManagerForTesting();
   contents()->SetOpener(opener1.get());
 
-  scoped_ptr<TestWebContents> opener2(
+  std::unique_ptr<TestWebContents> opener2(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   RenderFrameHostManager* opener2_manager =
       opener2->GetRenderManagerForTesting();
@@ -1384,7 +1385,7 @@
   scoped_refptr<SiteInstanceImpl> site_instance1 = rfh1->GetSiteInstance();
 
   // Create a new tab and simulate having it be the opener for the main tab.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), rfh1->GetSiteInstance()));
   contents()->SetOpener(opener1.get());
   EXPECT_TRUE(contents()->HasOpener());
@@ -1411,7 +1412,7 @@
   TestRenderFrameHost* rfh1 = main_test_rfh();
 
   // Create a new tab and simulate having it be the opener for the main tab.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), rfh1->GetSiteInstance()));
   contents()->SetOpener(opener1.get());
   EXPECT_TRUE(contents()->HasOpener());
@@ -1435,7 +1436,7 @@
       main_test_rfh()->GetSiteInstance();
 
   // Create a new tab and simulate having it be the opener for the main tab.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   contents()->SetOpener(opener1.get());
   EXPECT_TRUE(contents()->HasOpener());
@@ -1477,7 +1478,7 @@
       main_test_rfh()->GetSiteInstance();
 
   // Create a new tab and simulate having it be the opener for the main tab.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   contents()->SetOpener(opener1.get());
   EXPECT_TRUE(contents()->HasOpener());
@@ -1511,7 +1512,7 @@
   TestRenderFrameHost* rfh1 = contents()->GetMainFrame();
 
   // Create a new tab as an opener for the main tab.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), rfh1->GetSiteInstance()));
   RenderFrameHostManager* opener1_manager =
       opener1->GetRenderManagerForTesting();
@@ -1579,7 +1580,7 @@
 
   // Create a new tab and simulate it being the opener for the main
   // tab.  It should be in the same SiteInstance.
-  scoped_ptr<TestWebContents> opener1(
+  std::unique_ptr<TestWebContents> opener1(
       TestWebContents::Create(browser_context(), rvh1->GetSiteInstance()));
   RenderFrameHostManager* opener1_manager =
       opener1->GetRenderManagerForTesting();
@@ -1611,7 +1612,7 @@
   GURL guest_url(std::string(kGuestScheme).append("://abc123"));
   scoped_refptr<SiteInstance> instance =
       SiteInstance::CreateForURL(browser_context(), guest_url);
-  scoped_ptr<TestWebContents> web_contents(
+  std::unique_ptr<TestWebContents> web_contents(
       TestWebContents::Create(browser_context(), instance));
 
   RenderFrameHostManager* manager = web_contents->GetRenderManagerForTesting();
@@ -1668,7 +1669,7 @@
       SiteInstance::Create(browser_context());
 
   BeforeUnloadFiredWebContentsDelegate delegate;
-  scoped_ptr<TestWebContents> web_contents(
+  std::unique_ptr<TestWebContents> web_contents(
       TestWebContents::Create(browser_context(), instance));
   RenderViewHostChangedObserver change_observer(web_contents.get());
   web_contents->SetDelegate(&delegate);
@@ -1763,7 +1764,7 @@
   contents()->NavigateAndCommit(kUrl1);
   TestRenderFrameHost* rfh1 = contents()->GetMainFrame();
   RenderFrameDeletedObserver rfh_deleted_observer(rfh1);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
 
   // Navigate to new site, simulating onbeforeunload approval.
   controller().LoadURL(
@@ -1771,14 +1772,14 @@
   int entry_id = controller().GetPendingEntry()->GetUniqueID();
   contents()->GetMainFrame()->PrepareForCommit();
   EXPECT_TRUE(contents()->CrossProcessNavigationPending());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
   TestRenderFrameHost* rfh2 = contents()->GetPendingMainFrame();
 
   // Simulate the swap out ack, unexpectedly early (before commit).  It should
   // have no effect.
   rfh1->OnSwappedOut();
   EXPECT_TRUE(contents()->CrossProcessNavigationPending());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
 
   // The new page commits.
   contents()->TestDidNavigate(rfh2, 1, entry_id, true, kUrl2,
@@ -1786,8 +1787,8 @@
   EXPECT_FALSE(contents()->CrossProcessNavigationPending());
   EXPECT_EQ(rfh2, contents()->GetMainFrame());
   EXPECT_TRUE(contents()->GetPendingMainFrame() == NULL);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh2->rfh_state());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh2->is_active());
+  EXPECT_FALSE(rfh1->is_active());
 
   // Simulate the swap out ack.
   rfh1->OnSwappedOut();
@@ -1807,7 +1808,7 @@
   contents()->NavigateAndCommit(kUrl1);
   TestRenderFrameHost* rfh1 = contents()->GetMainFrame();
   RenderFrameDeletedObserver rfh_deleted_observer(rfh1);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
 
   // Increment the number of active frames in SiteInstanceImpl so that rfh1 is
   // not deleted on swap out.
@@ -1819,7 +1820,7 @@
   int entry_id = controller().GetPendingEntry()->GetUniqueID();
   contents()->GetMainFrame()->PrepareForCommit();
   EXPECT_TRUE(contents()->CrossProcessNavigationPending());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
   TestRenderFrameHost* rfh2 = contents()->GetPendingMainFrame();
 
   // The new page commits.
@@ -1828,8 +1829,8 @@
   EXPECT_FALSE(contents()->CrossProcessNavigationPending());
   EXPECT_EQ(rfh2, contents()->GetMainFrame());
   EXPECT_TRUE(contents()->GetPendingMainFrame() == NULL);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh2->rfh_state());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT, rfh1->rfh_state());
+  EXPECT_FALSE(rfh1->is_active());
+  EXPECT_TRUE(rfh2->is_active());
 
   // Simulate the swap out ack.
   rfh1->OnSwappedOut();
@@ -1851,7 +1852,7 @@
   contents()->NavigateAndCommit(kUrl1);
   TestRenderFrameHost* rfh1 = contents()->GetMainFrame();
   RenderFrameDeletedObserver rfh_deleted_observer(rfh1);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
 
   // Increment the number of active frames in SiteInstanceImpl so that rfh1 is
   // not deleted on swap out.
@@ -1872,8 +1873,8 @@
   EXPECT_FALSE(contents()->CrossProcessNavigationPending());
   EXPECT_EQ(rfh2, contents()->GetMainFrame());
   EXPECT_TRUE(contents()->GetPendingMainFrame() == NULL);
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh2->rfh_state());
-  EXPECT_EQ(RenderFrameHostImpl::STATE_PENDING_SWAP_OUT, rfh1->rfh_state());
+  EXPECT_FALSE(rfh1->is_active());
+  EXPECT_TRUE(rfh2->is_active());
 
   // Simulate the swap out ack.
   rfh1->OnSwappedOut();
@@ -1896,7 +1897,7 @@
   // Navigate to the first page.
   contents()->NavigateAndCommit(kUrl1);
   TestRenderFrameHost* rfh1 = main_test_rfh();
-  EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, rfh1->rfh_state());
+  EXPECT_TRUE(rfh1->is_active());
 
   // Navigate to a new site, starting a cross-site navigation.
   controller().LoadURL(
@@ -2003,10 +2004,8 @@
   EXPECT_TRUE(GetPendingFrameHost(iframe2));
   EXPECT_EQ(host1, GetPendingFrameHost(iframe1));
   EXPECT_EQ(host2, GetPendingFrameHost(iframe2));
-  EXPECT_TRUE(RenderFrameHostImpl::IsRFHStateActive(
-      GetPendingFrameHost(iframe1)->rfh_state()));
-  EXPECT_TRUE(RenderFrameHostImpl::IsRFHStateActive(
-      GetPendingFrameHost(iframe2)->rfh_state()));
+  EXPECT_TRUE(GetPendingFrameHost(iframe1)->is_active());
+  EXPECT_TRUE(GetPendingFrameHost(iframe2)->is_active());
   EXPECT_NE(GetPendingFrameHost(iframe1), GetPendingFrameHost(iframe2));
   EXPECT_EQ(GetPendingFrameHost(iframe1)->GetSiteInstance(),
             GetPendingFrameHost(iframe2)->GetSiteInstance());
@@ -2079,7 +2078,7 @@
 
   // |contents1| and |contents2| navigate to the same page and then crash.
   TestWebContents* contents1 = contents();
-  scoped_ptr<TestWebContents> contents2(
+  std::unique_ptr<TestWebContents> contents2(
       TestWebContents::Create(browser_context(), contents1->GetSiteInstance()));
   contents1->NavigateAndCommit(kUrl1);
   contents2->NavigateAndCommit(kUrl1);
@@ -2195,10 +2194,10 @@
   //        |       ^
   //        +-------+
   //
-  scoped_ptr<TestWebContents> tab1(
+  std::unique_ptr<TestWebContents> tab1(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   RenderFrameHostManager* tab1_manager = tab1->GetRenderManagerForTesting();
-  scoped_ptr<TestWebContents> tab2(
+  std::unique_ptr<TestWebContents> tab2(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   RenderFrameHostManager* tab2_manager = tab2->GetRenderManagerForTesting();
 
@@ -2253,7 +2252,7 @@
   scoped_refptr<SiteInstanceImpl> site_instance1 = rfh1->GetSiteInstance();
 
   // Create an opener tab, and simulate that its opener points to itself.
-  scoped_ptr<TestWebContents> opener(
+  std::unique_ptr<TestWebContents> opener(
       TestWebContents::Create(browser_context(), site_instance1.get()));
   RenderFrameHostManager* opener_manager = opener->GetRenderManagerForTesting();
   contents()->SetOpener(opener.get());
@@ -2314,7 +2313,7 @@
                   std::string(), "uniqueName1", blink::WebSandboxFlags::None,
                   blink::WebFrameOwnerProperties());
 
-  scoped_ptr<TestWebContents> tab2(
+  std::unique_ptr<TestWebContents> tab2(
       TestWebContents::Create(browser_context(), nullptr));
   tab2->NavigateAndCommit(GURL("http://tab2.com"));
   FrameTree* tree2 = tab2->GetFrameTree();
@@ -2327,12 +2326,12 @@
                   std::string(), "uniqueName3", blink::WebSandboxFlags::None,
                   blink::WebFrameOwnerProperties());
 
-  scoped_ptr<TestWebContents> tab3(
+  std::unique_ptr<TestWebContents> tab3(
       TestWebContents::Create(browser_context(), nullptr));
   FrameTree* tree3 = tab3->GetFrameTree();
   FrameTreeNode* root3 = tree3->root();
 
-  scoped_ptr<TestWebContents> tab4(
+  std::unique_ptr<TestWebContents> tab4(
       TestWebContents::Create(browser_context(), nullptr));
   tab4->NavigateAndCommit(GURL("http://tab4.com"));
   FrameTree* tree4 = tab4->GetFrameTree();
@@ -2535,14 +2534,14 @@
   scoped_refptr<SiteInstanceImpl> initial_instance =
       SiteInstanceImpl::Create(browser_context());
   initial_instance->SetSite(kInitUrl);
-  scoped_ptr<TestWebContents> web_contents(
+  std::unique_ptr<TestWebContents> web_contents(
       TestWebContents::Create(browser_context(), initial_instance));
   RenderFrameHostManager* manager = web_contents->GetRenderManagerForTesting();
   NavigationControllerImpl& controller = web_contents->GetController();
 
   // Setup a restored entry.
-  std::vector<scoped_ptr<NavigationEntry>> entries;
-  scoped_ptr<NavigationEntry> new_entry =
+  std::vector<std::unique_ptr<NavigationEntry>> entries;
+  std::unique_ptr<NavigationEntry> new_entry =
       NavigationControllerImpl::CreateNavigationEntry(
           kInitUrl, Referrer(), ui::PAGE_TRANSITION_TYPED, false, std::string(),
           browser_context());
@@ -2860,7 +2859,7 @@
                             ui::PAGE_TRANSITION_TYPED,
                             false /* is_renderer_init */);
   FrameNavigationEntry* frame_entry = entry.root_node()->frame_entry.get();
-  scoped_ptr<NavigationRequest> navigation_request =
+  std::unique_ptr<NavigationRequest> navigation_request =
       NavigationRequest::CreateBrowserInitiated(
           contents()->GetFrameTree()->root(), frame_entry->url(),
           frame_entry->referrer(), *frame_entry, entry,
@@ -2921,7 +2920,7 @@
                             ui::PAGE_TRANSITION_TYPED,
                             false /* is_renderer_init */);
   FrameNavigationEntry* frame_entry = entry.root_node()->frame_entry.get();
-  scoped_ptr<NavigationRequest> navigation_request =
+  std::unique_ptr<NavigationRequest> navigation_request =
       NavigationRequest::CreateBrowserInitiated(
           contents()->GetFrameTree()->root(), frame_entry->url(),
           frame_entry->referrer(), *frame_entry, entry,
@@ -2979,7 +2978,7 @@
                             ui::PAGE_TRANSITION_TYPED,
                             false /* is_renderer_init */);
   FrameNavigationEntry* frame_entry = entry.root_node()->frame_entry.get();
-  scoped_ptr<NavigationRequest> navigation_request =
+  std::unique_ptr<NavigationRequest> navigation_request =
       NavigationRequest::CreateBrowserInitiated(
           contents()->GetFrameTree()->root(), frame_entry->url(),
           frame_entry->referrer(), *frame_entry, entry,
diff --git a/content/browser/frame_host/render_frame_message_filter.cc b/content/browser/frame_host/render_frame_message_filter.cc
index c21a25e..98bd0fd 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -208,7 +208,6 @@
     IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_GetCookies, OnGetCookies)
     IPC_MESSAGE_HANDLER(FrameHostMsg_CookiesEnabled, OnCookiesEnabled)
     IPC_MESSAGE_HANDLER(FrameHostMsg_Are3DAPIsBlocked, OnAre3DAPIsBlocked)
-    IPC_MESSAGE_HANDLER(FrameHostMsg_DidLose3DContext, OnDidLose3DContext)
     IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_RenderProcessGone,
                                 OnRenderProcessGone())
 #if defined(ENABLE_PLUGINS)
@@ -364,27 +363,6 @@
       top_origin_url, render_process_id_, render_frame_id, requester);
 }
 
-void RenderFrameMessageFilter::OnDidLose3DContext(
-    const GURL& top_origin_url,
-    ThreeDAPIType /* unused */,
-    int arb_robustness_status_code) {
-  GpuDataManagerImpl::DomainGuilt guilt;
-  switch (arb_robustness_status_code) {
-    case GL_GUILTY_CONTEXT_RESET_ARB:
-      guilt = GpuDataManagerImpl::DOMAIN_GUILT_KNOWN;
-      break;
-    case GL_UNKNOWN_CONTEXT_RESET_ARB:
-      guilt = GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN;
-      break;
-    default:
-      // Ignore lost contexts known to be innocent.
-      return;
-  }
-
-  GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(
-      top_origin_url, guilt);
-}
-
 void RenderFrameMessageFilter::OnRenderProcessGone() {
   // FrameHostMessage_RenderProcessGone is a synthetic IPC message used by
   // RenderProcessHostImpl to clean things up after a crash (it's injected
diff --git a/content/browser/frame_host/render_frame_message_filter.h b/content/browser/frame_host/render_frame_message_filter.h
index 9f059465f..16190cf3 100644
--- a/content/browser/frame_host/render_frame_message_filter.h
+++ b/content/browser/frame_host/render_frame_message_filter.h
@@ -89,9 +89,6 @@
                           const GURL& top_origin_url,
                           ThreeDAPIType requester,
                           bool* blocked);
-  void OnDidLose3DContext(const GURL& top_origin_url,
-                          ThreeDAPIType context_type,
-                          int arb_robustness_status_code);
 
   void OnRenderProcessGone();
 
diff --git a/content/browser/frame_host/render_frame_proxy_host.h b/content/browser/frame_host/render_frame_proxy_host.h
index 6aa2848..aa234473 100644
--- a/content/browser/frame_host/render_frame_proxy_host.h
+++ b/content/browser/frame_host/render_frame_proxy_host.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
 #include "content/browser/site_instance_impl.h"
 #include "ipc/ipc_listener.h"
@@ -154,11 +155,11 @@
   // frame tree, this class connects its associated RenderWidgetHostView
   // to this RenderFrameProxyHost, which corresponds to the same frame in the
   // parent's renderer process.
-  scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_;
+  std::unique_ptr<CrossProcessFrameConnector> cross_process_frame_connector_;
 
   // TODO(nasko): This can be removed once we don't have a swapped out state on
   // RenderFrameHosts. See https://crbug.com/357747.
-  scoped_ptr<RenderFrameHostImpl> render_frame_host_;
+  std::unique_ptr<RenderFrameHostImpl> render_frame_host_;
 
   // The RenderViewHost that this RenderFrameProxyHost is associated with. It is
   // kept alive as long as any RenderFrameHosts or RenderFrameProxyHosts
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 5a3c8f7..0a548e41 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -8,6 +8,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/memory/ptr_util.h"
 #include "build/build_config.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/output/copy_output_result.h"
@@ -304,7 +305,7 @@
 
 void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
     uint32_t output_surface_id,
-    scoped_ptr<cc::CompositorFrame> frame) {
+    std::unique_ptr<cc::CompositorFrame> frame) {
   TRACE_EVENT0("content",
                "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
 
@@ -336,7 +337,7 @@
 
   if (!surface_factory_) {
     cc::SurfaceManager* manager = GetSurfaceManager();
-    surface_factory_ = make_scoped_ptr(new cc::SurfaceFactory(manager, this));
+    surface_factory_ = base::WrapUnique(new cc::SurfaceFactory(manager, this));
   }
 
   if (surface_id_.is_null()) {
@@ -370,7 +371,7 @@
   // before we start, and discard the old list entries when we are done.
   FrameSwappedCallbackList process_callbacks;
   process_callbacks.swap(frame_swapped_callbacks_);
-  for (scoped_ptr<base::Closure>& callback : process_callbacks)
+  for (std::unique_ptr<base::Closure>& callback : process_callbacks)
     callback->Run();
 }
 
@@ -487,7 +488,7 @@
 #endif  // defined(OS_MACOSX)
 
 void RenderWidgetHostViewChildFrame::RegisterFrameSwappedCallback(
-    scoped_ptr<base::Closure> callback) {
+    std::unique_ptr<base::Closure> callback) {
   frame_swapped_callbacks_.push_back(std::move(callback));
 }
 
@@ -499,7 +500,7 @@
   if (!IsSurfaceAvailableForCopy()) {
     // Defer submitting the copy request until after a frame is drawn, at which
     // point we should be guaranteed that the surface is available.
-    RegisterFrameSwappedCallback(make_scoped_ptr(new base::Closure(base::Bind(
+    RegisterFrameSwappedCallback(base::WrapUnique(new base::Closure(base::Bind(
         &RenderWidgetHostViewChildFrame::SubmitSurfaceCopyRequest, AsWeakPtr(),
         src_subrect, output_size, callback, preferred_color_type))));
     return;
@@ -516,7 +517,7 @@
     const SkColorType preferred_color_type) {
   DCHECK(IsSurfaceAvailableForCopy());
 
-  scoped_ptr<cc::CopyOutputRequest> request =
+  std::unique_ptr<cc::CopyOutputRequest> request =
       cc::CopyOutputRequest::CreateRequest(
           base::Bind(&CopyFromCompositingSurfaceHasResult, output_size,
                      preferred_color_type, callback));
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h
index f4dc64a..c2fb267 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.h
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.h
@@ -9,11 +9,11 @@
 #include <stdint.h>
 
 #include <deque>
+#include <memory>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "cc/resources/returned_resource.h"
 #include "cc/surfaces/surface_factory_client.h"
@@ -69,7 +69,7 @@
   // pointer is released.
   // TODO(wjmaclean): We should consider making this available in other view
   // types, such as RenderWidgetHostViewAura.
-  void RegisterFrameSwappedCallback(scoped_ptr<base::Closure> callback);
+  void RegisterFrameSwappedCallback(std::unique_ptr<base::Closure> callback);
 
   // RenderWidgetHostView implementation.
   void InitAsChild(gfx::NativeView parent_view) override;
@@ -121,8 +121,9 @@
       const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
   bool CanCopyToVideoFrame() const override;
   bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
-  void OnSwapCompositorFrame(uint32_t output_surface_id,
-                             scoped_ptr<cc::CompositorFrame> frame) override;
+  void OnSwapCompositorFrame(
+      uint32_t output_surface_id,
+      std::unique_ptr<cc::CompositorFrame> frame) override;
   // Since the URL of content rendered by this class is not displayed in
   // the URL bar, this method does not need an implementation.
   void ClearCompositorFrame() override {}
@@ -196,8 +197,8 @@
   RenderWidgetHostImpl* host_;
 
   // Surface-related state.
-  scoped_ptr<cc::SurfaceIdAllocator> id_allocator_;
-  scoped_ptr<cc::SurfaceFactory> surface_factory_;
+  std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
+  std::unique_ptr<cc::SurfaceFactory> surface_factory_;
   cc::SurfaceId surface_id_;
   uint32_t next_surface_sequence_;
   uint32_t last_output_surface_id_;
@@ -221,7 +222,7 @@
                                 const ReadbackRequestCallback& callback,
                                 const SkColorType preferred_color_type);
 
-  using FrameSwappedCallbackList = std::deque<scoped_ptr<base::Closure>>;
+  using FrameSwappedCallbackList = std::deque<std::unique_ptr<base::Closure>>;
   // Since frame-drawn callbacks are "fire once", we use std::deque to make
   // it convenient to swap() when processing the list.
   FrameSwappedCallbackList frame_swapped_callbacks_;
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
index abd4423..870ca1c 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
@@ -5,9 +5,11 @@
 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
 
 #include <stdint.h>
+
 #include <utility>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "build/build_config.h"
 #include "cc/surfaces/surface.h"
@@ -44,7 +46,7 @@
   void Paste() override {}
   void SelectAll() override {}
 
-  scoped_ptr<TextInputState> text_input_state_;
+  std::unique_ptr<TextInputState> text_input_state_;
 };
 
 class MockCrossProcessFrameConnector : public CrossProcessFrameConnector {
@@ -79,7 +81,7 @@
 // ImageTransportFactory doesn't exist on Android.
 #if !defined(OS_ANDROID)
     ImageTransportFactory::InitializeForUnitTests(
-        make_scoped_ptr(new NoTransportImageTransportFactory));
+        base::WrapUnique(new NoTransportImageTransportFactory));
 #endif
 
     MockRenderProcessHost* process_host =
@@ -112,7 +114,7 @@
 
  protected:
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<BrowserContext> browser_context_;
+  std::unique_ptr<BrowserContext> browser_context_;
   MockRenderWidgetHostDelegate delegate_;
 
   // Tests should set these to NULL if they've already triggered their
@@ -125,14 +127,15 @@
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest);
 };
 
-scoped_ptr<cc::CompositorFrame> CreateDelegatedFrame(float scale_factor,
-                                                     gfx::Size size,
-                                                     const gfx::Rect& damage) {
-  scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
+std::unique_ptr<cc::CompositorFrame> CreateDelegatedFrame(
+    float scale_factor,
+    gfx::Size size,
+    const gfx::Rect& damage) {
+  std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
   frame->metadata.device_scale_factor = scale_factor;
   frame->delegated_frame_data.reset(new cc::DelegatedFrameData);
 
-  scoped_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
+  std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
   pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(size), damage,
                gfx::Transform());
   frame->delegated_frame_data->render_pass_list.push_back(std::move(pass));
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 41e31c0a..727c106 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -9,6 +9,7 @@
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "build/build_config.h"
 #include "cc/surfaces/surface.h"
@@ -206,7 +207,7 @@
 
 void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
     uint32_t output_surface_id,
-    scoped_ptr<cc::CompositorFrame> frame) {
+    std::unique_ptr<cc::CompositorFrame> frame) {
   TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame");
 
   last_scroll_offset_ = frame->metadata.root_scroll_offset;
@@ -235,7 +236,7 @@
 
   if (!surface_factory_) {
     cc::SurfaceManager* manager = GetSurfaceManager();
-    surface_factory_ = make_scoped_ptr(new cc::SurfaceFactory(manager, this));
+    surface_factory_ = base::WrapUnique(new cc::SurfaceFactory(manager, this));
   }
 
   if (surface_id_.is_null()) {
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index 7581832..06232ba 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
 #include "content/common/content_export.h"
@@ -91,8 +91,9 @@
                         const gfx::Range& range) override;
   void SelectionBoundsChanged(
       const ViewHostMsg_SelectionBounds_Params& params) override;
-  void OnSwapCompositorFrame(uint32_t output_surface_id,
-                             scoped_ptr<cc::CompositorFrame> frame) override;
+  void OnSwapCompositorFrame(
+      uint32_t output_surface_id,
+      std::unique_ptr<cc::CompositorFrame> frame) override;
 #if defined(USE_AURA)
   void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
                               InputEventAckState ack_result) override;
diff --git a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
index 20db376..e99204f 100644
--- a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
@@ -48,7 +48,7 @@
   void Paste() override {}
   void SelectAll() override {}
 
-  scoped_ptr<TextInputState> text_input_state_;
+  std::unique_ptr<TextInputState> text_input_state_;
 };
 
 class RenderWidgetHostViewGuestTest : public testing::Test {
@@ -58,7 +58,7 @@
   void SetUp() override {
 #if !defined(OS_ANDROID)
     ImageTransportFactory::InitializeForUnitTests(
-        scoped_ptr<ImageTransportFactory>(
+        std::unique_ptr<ImageTransportFactory>(
             new NoTransportImageTransportFactory));
 #endif
     browser_context_.reset(new TestBrowserContext);
@@ -88,7 +88,7 @@
 
  protected:
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<BrowserContext> browser_context_;
+  std::unique_ptr<BrowserContext> browser_context_;
   MockRenderWidgetHostDelegate delegate_;
 
   // Tests should set these to NULL if they've already triggered their
@@ -161,7 +161,7 @@
   void SetUp() override {
 #if !defined(OS_ANDROID)
     ImageTransportFactory::InitializeForUnitTests(
-        scoped_ptr<ImageTransportFactory>(
+        std::unique_ptr<ImageTransportFactory>(
             new NoTransportImageTransportFactory));
 #endif
     browser_context_.reset(new TestBrowserContext);
@@ -202,10 +202,10 @@
 
  protected:
   TestBrowserThreadBundle thread_bundle_;
-  scoped_ptr<BrowserContext> browser_context_;
+  std::unique_ptr<BrowserContext> browser_context_;
   MockRenderWidgetHostDelegate delegate_;
   BrowserPluginGuestDelegate browser_plugin_guest_delegate_;
-  scoped_ptr<TestWebContents> web_contents_;
+  std::unique_ptr<TestWebContents> web_contents_;
   TestBrowserPluginGuest* browser_plugin_guest_;
 
   // Tests should set these to NULL if they've already triggered their
@@ -218,14 +218,15 @@
 };
 
 namespace {
-scoped_ptr<cc::CompositorFrame> CreateDelegatedFrame(float scale_factor,
-                                                     gfx::Size size,
-                                                     const gfx::Rect& damage) {
-  scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
+std::unique_ptr<cc::CompositorFrame> CreateDelegatedFrame(
+    float scale_factor,
+    gfx::Size size,
+    const gfx::Rect& damage) {
+  std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
   frame->metadata.device_scale_factor = scale_factor;
   frame->delegated_frame_data.reset(new cc::DelegatedFrameData);
 
-  scoped_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
+  std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
   pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(size), damage,
                gfx::Transform());
   frame->delegated_frame_data->render_pass_list.push_back(std::move(pass));
diff --git a/content/browser/frame_host/traced_frame_tree_node.cc b/content/browser/frame_host/traced_frame_tree_node.cc
index 0141b38e..7026011 100644
--- a/content/browser/frame_host/traced_frame_tree_node.cc
+++ b/content/browser/frame_host/traced_frame_tree_node.cc
@@ -41,17 +41,17 @@
 }
 
 void TracedFrameTreeNode::AppendAsTraceFormat(std::string* out) const {
-  scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
 
   if (parent_node_id_ >= 0) {
-    scoped_ptr<base::DictionaryValue> ref(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> ref(new base::DictionaryValue());
     ref->SetString("id_ref", base::StringPrintf("0x%x", parent_node_id_));
     ref->SetString("scope", "FrameTreeNode");
     value->Set("parent", std::move(ref));
   }
 
   if (process_id_ >= 0) {
-    scoped_ptr<base::DictionaryValue> ref(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> ref(new base::DictionaryValue());
     ref->SetInteger("pid_ref", process_id_);
     ref->SetString("id_ref", base::StringPrintf("0x%x", routing_id_));
     ref->SetString("scope", "RenderFrame");
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index c16a639..de21595 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -494,7 +494,11 @@
         // Don't block offscreen contexts (and force page reload for webgl)
         // if this was an intentional shutdown or the OOM killer on Android
         // killed us while Chrome was in the background.
+// TODO(crbug.com/598400): Restrict this to Android for now, since other
+// platforms might fall through here for the 'exit_on_context_lost' workaround.
+#if defined(OS_ANDROID)
         block_offscreen_contexts = false;
+#endif
         message = "The GPU process exited normally. Everything is okay.";
         break;
       case base::TERMINATION_STATUS_ABNORMAL_TERMINATION:
diff --git a/content/browser/leveldb_wrapper_impl.cc b/content/browser/leveldb_wrapper_impl.cc
index 0d393891..7b7deb5a 100644
--- a/content/browser/leveldb_wrapper_impl.cc
+++ b/content/browser/leveldb_wrapper_impl.cc
@@ -28,7 +28,7 @@
 }
 
 void LevelDBWrapperImpl::AddObserver(mojom::LevelDBObserverPtr observer) {
-  observers_.AddInterfacePtr(std::move(observer));
+  observers_.AddPtr(std::move(observer));
 }
 
 LevelDBWrapperImpl::~LevelDBWrapperImpl() {}
diff --git a/content/browser/loader/async_resource_handler.h b/content/browser/loader/async_resource_handler.h
index 5097413..0991021 100644
--- a/content/browser/loader/async_resource_handler.h
+++ b/content/browser/loader/async_resource_handler.h
@@ -87,7 +87,7 @@
   bool sent_received_response_msg_;
   bool sent_data_buffer_msg_;
 
-  scoped_ptr<InliningHelper> inlining_helper_;
+  std::unique_ptr<InliningHelper> inlining_helper_;
   base::TimeTicks response_started_ticks_;
 
   uint64_t last_upload_position_;
diff --git a/content/browser/loader/async_resource_handler_browsertest.cc b/content/browser/loader/async_resource_handler_browsertest.cc
index 456c31a..4a9c440 100644
--- a/content/browser/loader/async_resource_handler_browsertest.cc
+++ b/content/browser/loader/async_resource_handler_browsertest.cc
@@ -40,10 +40,10 @@
 const size_t kPayloadSize = 28697814;  // 2*3^15
 #endif
 
-scoped_ptr<net::test_server::HttpResponse> HandlePostAndRedirectURLs(
-  const std::string& request_path,
-  const net::test_server::HttpRequest& request) {
-  scoped_ptr<net::test_server::BasicHttpResponse> http_response(
+std::unique_ptr<net::test_server::HttpResponse> HandlePostAndRedirectURLs(
+    const std::string& request_path,
+    const net::test_server::HttpRequest& request) {
+  std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
       new net::test_server::BasicHttpResponse());
   if (base::StartsWith(request.relative_url, kRedirectPostPath,
                        base::CompareCase::SENSITIVE)) {
@@ -58,7 +58,7 @@
     EXPECT_EQ(request.content.length(), kPayloadSize);
     return std::move(http_response);
   } else {
-    return scoped_ptr<net::test_server::HttpResponse>();
+    return std::unique_ptr<net::test_server::HttpResponse>();
   }
 }
 
diff --git a/content/browser/loader/async_revalidation_driver.cc b/content/browser/loader/async_revalidation_driver.cc
index 3c5d45bc..b04d32a 100644
--- a/content/browser/loader/async_revalidation_driver.cc
+++ b/content/browser/loader/async_revalidation_driver.cc
@@ -37,8 +37,8 @@
 }  // namespace
 
 AsyncRevalidationDriver::AsyncRevalidationDriver(
-    scoped_ptr<net::URLRequest> request,
-    scoped_ptr<ResourceThrottle> throttle,
+    std::unique_ptr<net::URLRequest> request,
+    std::unique_ptr<ResourceThrottle> throttle,
     const base::Closure& completion_callback)
     : request_(std::move(request)),
       throttle_(std::move(throttle)),
diff --git a/content/browser/loader/async_revalidation_driver.h b/content/browser/loader/async_revalidation_driver.h
index b96e06e..4caf263 100644
--- a/content/browser/loader/async_revalidation_driver.h
+++ b/content/browser/loader/async_revalidation_driver.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_BROWSER_LOADER_ASYNC_REVALIDATION_DRIVER_H_
 #define CONTENT_BROWSER_LOADER_ASYNC_REVALIDATION_DRIVER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
@@ -33,8 +33,8 @@
  public:
   // |completion_callback| is guaranteed to be called on completion,
   // regardless of success or failure.
-  AsyncRevalidationDriver(scoped_ptr<net::URLRequest> request,
-                          scoped_ptr<ResourceThrottle> throttle,
+  AsyncRevalidationDriver(std::unique_ptr<net::URLRequest> request,
+                          std::unique_ptr<ResourceThrottle> throttle,
                           const base::Closure& completion_callback);
   ~AsyncRevalidationDriver() override;
 
@@ -89,8 +89,8 @@
   scoped_refptr<net::IOBuffer> read_buffer_;
   base::OneShotTimer timer_;
 
-  scoped_ptr<net::URLRequest> request_;
-  scoped_ptr<ResourceThrottle> throttle_;
+  std::unique_ptr<net::URLRequest> request_;
+  std::unique_ptr<ResourceThrottle> throttle_;
 
   base::Closure completion_callback_;
 
diff --git a/content/browser/loader/async_revalidation_driver_unittest.cc b/content/browser/loader/async_revalidation_driver_unittest.cc
index 893bc211..a39d9fe 100644
--- a/content/browser/loader/async_revalidation_driver_unittest.cc
+++ b/content/browser/loader/async_revalidation_driver_unittest.cc
@@ -13,6 +13,7 @@
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "content/public/browser/client_certificate_delegate.h"
 #include "content/public/common/content_client.h"
@@ -63,8 +64,8 @@
 // There are multiple layers of boilerplate needed to use a URLRequestTestJob
 // subclass.  Subclasses of AsyncRevalidationDriverTest can use
 // BindCreateProtocolHandlerCallback() to bypass most of that boilerplate.
-using CreateProtocolHandlerCallback =
-    base::Callback<scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>()>;
+using CreateProtocolHandlerCallback = base::Callback<
+    std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>()>;
 
 template <typename T>
 CreateProtocolHandlerCallback BindCreateProtocolHandlerCallback() {
@@ -75,8 +76,9 @@
   class TemplatedProtocolHandler
       : public net::URLRequestJobFactory::ProtocolHandler {
    public:
-    static scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> Create() {
-      return make_scoped_ptr(new TemplatedProtocolHandler());
+    static std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>
+    Create() {
+      return base::WrapUnique(new TemplatedProtocolHandler());
     }
 
     // URLRequestJobFactory::ProtocolHandler implementation:
@@ -132,14 +134,15 @@
   }
 
   void SetUpAsyncRevalidationDriverWithRequestToUrl(const GURL& url) {
-    scoped_ptr<net::URLRequest> request(test_url_request_context_.CreateRequest(
-        url, net::DEFAULT_PRIORITY, nullptr /* delegate */));
+    std::unique_ptr<net::URLRequest> request(
+        test_url_request_context_.CreateRequest(url, net::DEFAULT_PRIORITY,
+                                                nullptr /* delegate */));
     raw_ptr_request_ = request.get();
     raw_ptr_resource_throttle_ = new ResourceThrottleStub();
     // This use of base::Unretained() is safe because |driver_|, and the closure
     // passed to it, will be destroyed before this object is.
     driver_.reset(new AsyncRevalidationDriver(
-        std::move(request), make_scoped_ptr(raw_ptr_resource_throttle_),
+        std::move(request), base::WrapUnique(raw_ptr_resource_throttle_),
         base::Bind(&AsyncRevalidationDriverTest::OnAsyncRevalidationComplete,
                    base::Unretained(this))));
   }
@@ -170,7 +173,7 @@
   // The AsyncRevalidationDriver owns the URLRequest and the ResourceThrottle.
   ResourceThrottleStub* raw_ptr_resource_throttle_;
   net::URLRequest* raw_ptr_request_;
-  scoped_ptr<AsyncRevalidationDriver> driver_;
+  std::unique_ptr<AsyncRevalidationDriver> driver_;
   bool async_revalidation_complete_called_ = false;
 };
 
@@ -277,7 +280,7 @@
   void SelectClientCertificate(
       WebContents* web_contents,
       net::SSLCertRequestInfo* cert_request_info,
-      scoped_ptr<ClientCertificateDelegate> delegate) override {
+      std::unique_ptr<ClientCertificateDelegate> delegate) override {
     ADD_FAILURE() << "SelectClientCertificate was called.";
   }
 
diff --git a/content/browser/loader/async_revalidation_manager.cc b/content/browser/loader/async_revalidation_manager.cc
index aaaeb68..4b364023 100644
--- a/content/browser/loader/async_revalidation_manager.cc
+++ b/content/browser/loader/async_revalidation_manager.cc
@@ -96,7 +96,7 @@
       for_request.url());
   std::pair<AsyncRevalidationMap::iterator, bool> insert_result =
       in_progress_.insert(AsyncRevalidationMap::value_type(
-          async_revalidation_key, scoped_ptr<AsyncRevalidationDriver>()));
+          async_revalidation_key, std::unique_ptr<AsyncRevalidationDriver>()));
   if (!insert_result.second) {
     // A matching async revalidation is already in progress for this cache; we
     // don't need another one.
@@ -107,7 +107,7 @@
   headers.AddHeadersFromString(info->original_headers());
 
   // Construct the request.
-  scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest(
+  std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest(
       for_request.url(), net::MINIMUM_PRIORITY, nullptr);
 
   new_request->set_method(for_request.method());
@@ -139,7 +139,7 @@
   int child_id = info->GetChildID();
   int route_id = info->GetRouteID();
 
-  scoped_ptr<ResourceThrottle> throttle =
+  std::unique_ptr<ResourceThrottle> throttle =
       scheduler->ScheduleRequest(child_id, route_id, false, new_request.get());
 
   // AsyncRevalidationDriver does not outlive its entry in |in_progress_|,
diff --git a/content/browser/loader/async_revalidation_manager.h b/content/browser/loader/async_revalidation_manager.h
index 1070ea9c..e866b4ab 100644
--- a/content/browser/loader/async_revalidation_manager.h
+++ b/content/browser/loader/async_revalidation_manager.h
@@ -6,10 +6,10 @@
 #define CONTENT_BROWSER_LOADER_ASYNC_REVALIDATION_MANAGER_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 
 class GURL;
 struct ResourceHostMsg_Request;
@@ -89,9 +89,10 @@
     };
   };
 
-  using AsyncRevalidationMap = std::map<AsyncRevalidationKey,
-                                        scoped_ptr<AsyncRevalidationDriver>,
-                                        AsyncRevalidationKey::LessThan>;
+  using AsyncRevalidationMap =
+      std::map<AsyncRevalidationKey,
+               std::unique_ptr<AsyncRevalidationDriver>,
+               AsyncRevalidationKey::LessThan>;
 
   void OnAsyncRevalidationComplete(AsyncRevalidationMap::iterator it);
 
diff --git a/content/browser/loader/async_revalidation_manager_browsertest.cc b/content/browser/loader/async_revalidation_manager_browsertest.cc
index 9be15a4..56b6a128 100644
--- a/content/browser/loader/async_revalidation_manager_browsertest.cc
+++ b/content/browser/loader/async_revalidation_manager_browsertest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <string>
 #include <utility>
 
@@ -9,7 +10,6 @@
 #include "base/bind_helpers.h"
 #include "base/feature_list.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_piece.h"
@@ -44,7 +44,7 @@
 
   void SetUp() override {
     base::FeatureList::ClearInstanceForTesting();
-    scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+    std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
     feature_list->InitializeFromCommandLine(
         "StaleWhileRevalidate2", std::string());
     base::FeatureList::SetInstance(std::move(feature_list));
@@ -83,13 +83,15 @@
  private:
   // A request handler which increases the number in the title tag on every
   // request.
-  scoped_ptr<HttpResponse> CountingRequestHandler(const HttpRequest& request) {
+  std::unique_ptr<HttpResponse> CountingRequestHandler(
+      const HttpRequest& request) {
     if (request.relative_url != kCountedHtmlPath)
       return nullptr;
 
     int version = ++requests_counted_;
 
-    scoped_ptr<BasicHttpResponse> http_response(StaleWhileRevalidateHeaders());
+    std::unique_ptr<BasicHttpResponse> http_response(
+        StaleWhileRevalidateHeaders());
     http_response->set_content(
         base::StringPrintf("<title>Version %d</title>", version));
 
@@ -101,7 +103,8 @@
   }
 
   // A request handler which increases a cookie value on every request.
-  scoped_ptr<HttpResponse> CookieRequestHandler(const HttpRequest& request) {
+  std::unique_ptr<HttpResponse> CookieRequestHandler(
+      const HttpRequest& request) {
     static const char kHtml[] =
         "<script>\n"
         "var intervalId;\n"
@@ -120,7 +123,8 @@
 
     int version = ++requests_counted_;
 
-    scoped_ptr<BasicHttpResponse> http_response(StaleWhileRevalidateHeaders());
+    std::unique_ptr<BasicHttpResponse> http_response(
+        StaleWhileRevalidateHeaders());
     http_response->AddCustomHeader("Set-Cookie",
                                    base::StringPrintf("version=%d", version));
     http_response->set_content(kHtml);
@@ -129,8 +133,8 @@
   }
 
   // Generate the standard response headers common to all request handlers.
-  scoped_ptr<BasicHttpResponse> StaleWhileRevalidateHeaders() {
-    scoped_ptr<BasicHttpResponse> http_response(new BasicHttpResponse);
+  std::unique_ptr<BasicHttpResponse> StaleWhileRevalidateHeaders() {
+    std::unique_ptr<BasicHttpResponse> http_response(new BasicHttpResponse);
     http_response->set_code(net::HTTP_OK);
     http_response->set_content_type("text/html; charset=utf-8");
     http_response->AddCustomHeader("Cache-Control",
diff --git a/content/browser/loader/async_revalidation_manager_unittest.cc b/content/browser/loader/async_revalidation_manager_unittest.cc
index d0ec2061..09a7092 100644
--- a/content/browser/loader/async_revalidation_manager_unittest.cc
+++ b/content/browser/loader/async_revalidation_manager_unittest.cc
@@ -11,6 +11,7 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory_handle.h"
 #include "base/pickle.h"
 #include "base/run_loop.h"
@@ -216,7 +217,7 @@
   }
 
   bool Send(IPC::Message* msg) override {
-    scoped_ptr<IPC::Message> take_ownership(msg);
+    std::unique_ptr<IPC::Message> take_ownership(msg);
     ReleaseHandlesInMessage(*msg);
     return true;
   }
@@ -265,7 +266,7 @@
 class AsyncRevalidationManagerTest : public ::testing::Test {
  protected:
   AsyncRevalidationManagerTest(
-      scoped_ptr<net::TestNetworkDelegate> network_delegate)
+      std::unique_ptr<net::TestNetworkDelegate> network_delegate)
       : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
         network_delegate_(std::move(network_delegate)) {
     browser_context_.reset(new TestBrowserContext());
@@ -283,7 +284,7 @@
 
   AsyncRevalidationManagerTest()
       : AsyncRevalidationManagerTest(
-            make_scoped_ptr(new net::TestNetworkDelegate)) {}
+            base::WrapUnique(new net::TestNetworkDelegate)) {}
 
   void TearDown() override {
     host_.CancelRequestsForProcess(filter_->child_id());
@@ -315,10 +316,10 @@
   }
 
   content::TestBrowserThreadBundle thread_bundle_;
-  scoped_ptr<TestBrowserContext> browser_context_;
-  scoped_ptr<TestURLRequestJobFactory> job_factory_;
+  std::unique_ptr<TestBrowserContext> browser_context_;
+  std::unique_ptr<TestURLRequestJobFactory> job_factory_;
   scoped_refptr<BlackholeFilter> filter_;
-  scoped_ptr<net::TestNetworkDelegate> network_delegate_;
+  std::unique_ptr<net::TestNetworkDelegate> network_delegate_;
   ResourceDispatcherHostImpl host_;
 };
 
@@ -417,7 +418,7 @@
  public:
   AsyncRevalidationManagerRecordingTest()
       : AsyncRevalidationManagerTest(
-            make_scoped_ptr(new URLRequestRecordingNetworkDelegate)) {}
+            base::WrapUnique(new URLRequestRecordingNetworkDelegate)) {}
 
   void TearDown() override {
     EXPECT_TRUE(IsEmpty());
diff --git a/content/browser/loader/cross_site_resource_handler.cc b/content/browser/loader/cross_site_resource_handler.cc
index 21193d9..c645670d 100644
--- a/content/browser/loader/cross_site_resource_handler.cc
+++ b/content/browser/loader/cross_site_resource_handler.cc
@@ -63,7 +63,7 @@
 };
 
 void OnCrossSiteResponseHelper(const CrossSiteResponseParams& params) {
-  scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request(
+  std::unique_ptr<CrossSiteTransferringRequest> cross_site_transferring_request(
       new CrossSiteTransferringRequest(params.global_request_id));
 
   RenderFrameHostImpl* rfh =
@@ -110,7 +110,7 @@
 }  // namespace
 
 CrossSiteResourceHandler::CrossSiteResourceHandler(
-    scoped_ptr<ResourceHandler> next_handler,
+    std::unique_ptr<ResourceHandler> next_handler,
     net::URLRequest* request)
     : LayeredResourceHandler(request, std::move(next_handler)),
       has_started_response_(false),
diff --git a/content/browser/loader/cross_site_resource_handler.h b/content/browser/loader/cross_site_resource_handler.h
index 3c38fc7..61cb935 100644
--- a/content/browser/loader/cross_site_resource_handler.h
+++ b/content/browser/loader/cross_site_resource_handler.h
@@ -33,7 +33,7 @@
     CANCEL_REQUEST
   };
 
-  CrossSiteResourceHandler(scoped_ptr<ResourceHandler> next_handler,
+  CrossSiteResourceHandler(std::unique_ptr<ResourceHandler> next_handler,
                            net::URLRequest* request);
   ~CrossSiteResourceHandler() override;
 
diff --git a/content/browser/loader/cross_site_resource_handler_browsertest.cc b/content/browser/loader/cross_site_resource_handler_browsertest.cc
index dd26035e..eea5230 100644
--- a/content/browser/loader/cross_site_resource_handler_browsertest.cc
+++ b/content/browser/loader/cross_site_resource_handler_browsertest.cc
@@ -172,7 +172,7 @@
   RequestDeferredHook run_on_start_;
 
   // This lives on the UI thread.
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
 
   // Set on the IO thread while |run_loop_| is non-nullptr, read on the UI
   // thread after deleting run_loop_.
diff --git a/content/browser/loader/detachable_resource_handler.cc b/content/browser/loader/detachable_resource_handler.cc
index 786252f5..4e1bb8a 100644
--- a/content/browser/loader/detachable_resource_handler.cc
+++ b/content/browser/loader/detachable_resource_handler.cc
@@ -24,7 +24,7 @@
 DetachableResourceHandler::DetachableResourceHandler(
     net::URLRequest* request,
     base::TimeDelta cancel_delay,
-    scoped_ptr<ResourceHandler> next_handler)
+    std::unique_ptr<ResourceHandler> next_handler)
     : ResourceHandler(request),
       next_handler_(std::move(next_handler)),
       cancel_delay_(cancel_delay),
diff --git a/content/browser/loader/detachable_resource_handler.h b/content/browser/loader/detachable_resource_handler.h
index 95072269..5db9a1597 100644
--- a/content/browser/loader/detachable_resource_handler.h
+++ b/content/browser/loader/detachable_resource_handler.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_BROWSER_LOADER_DETACHABLE_RESOURCE_HANDLER_H_
 #define CONTENT_BROWSER_LOADER_DETACHABLE_RESOURCE_HANDLER_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "content/browser/loader/resource_handler.h"
@@ -36,7 +37,7 @@
  public:
   DetachableResourceHandler(net::URLRequest* request,
                             base::TimeDelta cancel_delay,
-                            scoped_ptr<ResourceHandler> next_handler);
+                            std::unique_ptr<ResourceHandler> next_handler);
   ~DetachableResourceHandler() override;
 
   bool is_detached() const { return next_handler_ == NULL; }
@@ -70,10 +71,10 @@
   void CancelWithError(int error_code) override;
 
  private:
-  scoped_ptr<ResourceHandler> next_handler_;
+  std::unique_ptr<ResourceHandler> next_handler_;
   scoped_refptr<net::IOBuffer> read_buffer_;
 
-  scoped_ptr<base::OneShotTimer> detached_timer_;
+  std::unique_ptr<base::OneShotTimer> detached_timer_;
   base::TimeDelta cancel_delay_;
 
   bool is_deferred_;
diff --git a/content/browser/loader/layered_resource_handler.cc b/content/browser/loader/layered_resource_handler.cc
index 9ff3d55..eada59a 100644
--- a/content/browser/loader/layered_resource_handler.cc
+++ b/content/browser/loader/layered_resource_handler.cc
@@ -12,7 +12,7 @@
 
 LayeredResourceHandler::LayeredResourceHandler(
     net::URLRequest* request,
-    scoped_ptr<ResourceHandler> next_handler)
+    std::unique_ptr<ResourceHandler> next_handler)
     : ResourceHandler(request), next_handler_(std::move(next_handler)) {}
 
 LayeredResourceHandler::~LayeredResourceHandler() {
diff --git a/content/browser/loader/layered_resource_handler.h b/content/browser/loader/layered_resource_handler.h
index 6c37dff..a71b40c 100644
--- a/content/browser/loader/layered_resource_handler.h
+++ b/content/browser/loader/layered_resource_handler.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_BROWSER_LOADER_LAYERED_RESOURCE_HANDLER_H_
 #define CONTENT_BROWSER_LOADER_LAYERED_RESOURCE_HANDLER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/browser/loader/resource_handler.h"
 #include "content/common/content_export.h"
 
@@ -20,7 +21,7 @@
 class CONTENT_EXPORT LayeredResourceHandler : public ResourceHandler {
  public:
   LayeredResourceHandler(net::URLRequest* request,
-                         scoped_ptr<ResourceHandler> next_handler);
+                         std::unique_ptr<ResourceHandler> next_handler);
   ~LayeredResourceHandler() override;
 
   // ResourceHandler implementation:
@@ -40,7 +41,7 @@
                            bool* defer) override;
   void OnDataDownloaded(int bytes_downloaded) override;
 
-  scoped_ptr<ResourceHandler> next_handler_;
+  std::unique_ptr<ResourceHandler> next_handler_;
 };
 
 }  // namespace content
diff --git a/content/browser/loader/mime_type_resource_handler.cc b/content/browser/loader/mime_type_resource_handler.cc
index 9451182..2d23d13 100644
--- a/content/browser/loader/mime_type_resource_handler.cc
+++ b/content/browser/loader/mime_type_resource_handler.cc
@@ -66,7 +66,7 @@
 }  // namespace
 
 MimeTypeResourceHandler::MimeTypeResourceHandler(
-    scoped_ptr<ResourceHandler> next_handler,
+    std::unique_ptr<ResourceHandler> next_handler,
     ResourceDispatcherHostImpl* host,
     PluginService* plugin_service,
     net::URLRequest* request)
@@ -346,7 +346,7 @@
   if (has_plugin)
     plugin_path = plugin.path;
   std::string payload;
-  scoped_ptr<ResourceHandler> handler(host_->MaybeInterceptAsStream(
+  std::unique_ptr<ResourceHandler> handler(host_->MaybeInterceptAsStream(
       plugin_path, request(), response_.get(), &payload));
   if (handler) {
     *handled_by_plugin = true;
@@ -406,7 +406,7 @@
 
   // Install download handler
   info->set_is_download(true);
-  scoped_ptr<ResourceHandler> handler(
+  std::unique_ptr<ResourceHandler> handler(
       host_->CreateResourceHandlerForDownload(request(),
                                               true,  // is_content_initiated
                                               must_download));
@@ -414,7 +414,7 @@
 }
 
 bool MimeTypeResourceHandler::UseAlternateNextHandler(
-    scoped_ptr<ResourceHandler> new_handler,
+    std::unique_ptr<ResourceHandler> new_handler,
     const std::string& payload_for_old_handler) {
   if (response_->head.headers.get() &&  // Can be NULL if FTP.
       response_->head.headers->response_code() / 100 != 2) {
diff --git a/content/browser/loader/mime_type_resource_handler.h b/content/browser/loader/mime_type_resource_handler.h
index 411ffd1..cef22b7 100644
--- a/content/browser/loader/mime_type_resource_handler.h
+++ b/content/browser/loader/mime_type_resource_handler.h
@@ -43,7 +43,7 @@
       public ResourceController {
  public:
   // If ENABLE_PLUGINS is defined, |plugin_service| must not be NULL.
-  MimeTypeResourceHandler(scoped_ptr<ResourceHandler> next_handler,
+  MimeTypeResourceHandler(std::unique_ptr<ResourceHandler> next_handler,
                           ResourceDispatcherHostImpl* host,
                           PluginService* plugin_service,
                           net::URLRequest* request);
@@ -82,7 +82,7 @@
   bool SelectPluginHandler(bool* defer, bool* handled_by_plugin);
   // Returns false if the request should be cancelled.
   bool SelectNextHandler(bool* defer);
-  bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler,
+  bool UseAlternateNextHandler(std::unique_ptr<ResourceHandler> handler,
                                const std::string& payload_for_old_handler);
 
   bool ReplayReadCompleted(bool* defer);
diff --git a/content/browser/loader/mime_type_resource_handler_unittest.cc b/content/browser/loader/mime_type_resource_handler_unittest.cc
index 360e035..ca9de0b 100644
--- a/content/browser/loader/mime_type_resource_handler_unittest.cc
+++ b/content/browser/loader/mime_type_resource_handler_unittest.cc
@@ -6,10 +6,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file_path.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/public/browser/resource_controller.h"
 #include "content/public/browser/resource_dispatcher_host_delegate.h"
@@ -87,14 +88,14 @@
 
   bool intercepted_as_stream() const { return intercepted_as_stream_; }
 
-  scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload(
+  std::unique_ptr<ResourceHandler> CreateResourceHandlerForDownload(
       net::URLRequest* request,
       bool is_content_initiated,
       bool must_download) override {
-    return scoped_ptr<ResourceHandler>(new TestResourceHandler);
+    return std::unique_ptr<ResourceHandler>(new TestResourceHandler);
   }
 
-  scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
+  std::unique_ptr<ResourceHandler> MaybeInterceptAsStream(
       const base::FilePath& plugin_path,
       net::URLRequest* request,
       ResourceResponse* response,
@@ -102,9 +103,9 @@
     intercepted_as_stream_count_++;
     if (stream_has_handler_) {
       intercepted_as_stream_ = true;
-      return scoped_ptr<ResourceHandler>(new TestResourceHandler);
+      return std::unique_ptr<ResourceHandler>(new TestResourceHandler);
     } else {
-      return scoped_ptr<ResourceHandler>();
+      return std::unique_ptr<ResourceHandler>();
     }
   }
 
@@ -238,7 +239,7 @@
     bool must_download,
     ResourceType request_resource_type) {
   net::URLRequestContext context;
-  scoped_ptr<net::URLRequest> request(context.CreateRequest(
+  std::unique_ptr<net::URLRequest> request(context.CreateRequest(
       GURL("http://www.google.com"), net::DEFAULT_PRIORITY, nullptr));
   bool is_main_frame = request_resource_type == RESOURCE_TYPE_MAIN_FRAME;
   ResourceRequestInfo::AllocateForTesting(
@@ -259,9 +260,10 @@
   host.SetDelegate(&host_delegate);
 
   TestFakePluginService plugin_service(plugin_available_, plugin_stale_);
-  scoped_ptr<ResourceHandler> mime_sniffing_handler(new MimeTypeResourceHandler(
-      scoped_ptr<ResourceHandler>(new TestResourceHandler()), &host,
-      &plugin_service, request.get()));
+  std::unique_ptr<ResourceHandler> mime_sniffing_handler(
+      new MimeTypeResourceHandler(
+          std::unique_ptr<ResourceHandler>(new TestResourceHandler()), &host,
+          &plugin_service, request.get()));
   TestResourceController resource_controller;
   mime_sniffing_handler->SetController(&resource_controller);
 
@@ -280,7 +282,7 @@
 std::string MimeTypeResourceHandlerTest::TestAcceptHeaderSetting(
     ResourceType request_resource_type) {
   net::URLRequestContext context;
-  scoped_ptr<net::URLRequest> request(context.CreateRequest(
+  std::unique_ptr<net::URLRequest> request(context.CreateRequest(
       GURL("http://www.google.com"), net::DEFAULT_PRIORITY, nullptr));
   return TestAcceptHeaderSettingWithURLRequest(
       request_resource_type, request.get());
@@ -307,9 +309,10 @@
   TestResourceDispatcherHostDelegate host_delegate(false);
   host.SetDelegate(&host_delegate);
 
-  scoped_ptr<ResourceHandler> mime_sniffing_handler(new MimeTypeResourceHandler(
-      scoped_ptr<ResourceHandler>(new TestResourceHandler()), &host,
-      nullptr, request));
+  std::unique_ptr<ResourceHandler> mime_sniffing_handler(
+      new MimeTypeResourceHandler(
+          std::unique_ptr<ResourceHandler>(new TestResourceHandler()), &host,
+          nullptr, request));
 
   bool defer = false;
   mime_sniffing_handler->OnWillStart(request->url(), &defer);
@@ -352,7 +355,7 @@
 
   // Ensure that if an Accept header is already set, it is not overwritten.
   net::URLRequestContext context;
-  scoped_ptr<net::URLRequest> request(context.CreateRequest(
+  std::unique_ptr<net::URLRequest> request(context.CreateRequest(
       GURL("http://www.google.com"), net::DEFAULT_PRIORITY, nullptr));
   request->SetExtraRequestHeaderByName("Accept", "*", true);
   EXPECT_EQ("*",
diff --git a/content/browser/loader/navigation_url_loader.cc b/content/browser/loader/navigation_url_loader.cc
index e250765..d9b0c927 100644
--- a/content/browser/loader/navigation_url_loader.cc
+++ b/content/browser/loader/navigation_url_loader.cc
@@ -14,16 +14,16 @@
 
 static NavigationURLLoaderFactory* g_factory = nullptr;
 
-scoped_ptr<NavigationURLLoader> NavigationURLLoader::Create(
+std::unique_ptr<NavigationURLLoader> NavigationURLLoader::Create(
     BrowserContext* browser_context,
-    scoped_ptr<NavigationRequestInfo> request_info,
+    std::unique_ptr<NavigationRequestInfo> request_info,
     ServiceWorkerNavigationHandle* service_worker_handle,
     NavigationURLLoaderDelegate* delegate) {
   if (g_factory) {
     return g_factory->CreateLoader(browser_context, std::move(request_info),
                                    service_worker_handle, delegate);
   }
-  return scoped_ptr<NavigationURLLoader>(
+  return std::unique_ptr<NavigationURLLoader>(
       new NavigationURLLoaderImpl(browser_context, std::move(request_info),
                                   service_worker_handle, delegate));
 }
diff --git a/content/browser/loader/navigation_url_loader.h b/content/browser/loader/navigation_url_loader.h
index 2a36264..f7d3280 100644
--- a/content/browser/loader/navigation_url_loader.h
+++ b/content/browser/loader/navigation_url_loader.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_
 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
 namespace content {
@@ -32,9 +33,9 @@
   // request parameters should not come in as a navigation-specific
   // structure. Information like has_user_gesture and
   // should_replace_current_entry shouldn't be needed at this layer.
-  static scoped_ptr<NavigationURLLoader> Create(
+  static std::unique_ptr<NavigationURLLoader> Create(
       BrowserContext* browser_context,
-      scoped_ptr<NavigationRequestInfo> request_info,
+      std::unique_ptr<NavigationRequestInfo> request_info,
       ServiceWorkerNavigationHandle* service_worker_handle,
       NavigationURLLoaderDelegate* delegate);
 
diff --git a/content/browser/loader/navigation_url_loader_delegate.h b/content/browser/loader/navigation_url_loader_delegate.h
index 62351aeb..201fa86 100644
--- a/content/browser/loader/navigation_url_loader_delegate.h
+++ b/content/browser/loader/navigation_url_loader_delegate.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_
 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
 namespace net {
@@ -33,7 +34,7 @@
   // |body_stream|.
   virtual void OnResponseStarted(
       const scoped_refptr<ResourceResponse>& response,
-      scoped_ptr<StreamHandle> body_stream) = 0;
+      std::unique_ptr<StreamHandle> body_stream) = 0;
 
   // Called if the request fails before receving a response. |net_error| is a
   // network error code for the failure. |has_stale_copy_in_cache| is true if
diff --git a/content/browser/loader/navigation_url_loader_factory.h b/content/browser/loader/navigation_url_loader_factory.h
index a2fd3713..df7ae0c0 100644
--- a/content/browser/loader/navigation_url_loader_factory.h
+++ b/content/browser/loader/navigation_url_loader_factory.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_FACTORY_H_
 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_FACTORY_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/loader/navigation_url_loader.h"
 
 namespace content {
@@ -15,9 +16,9 @@
 // the loader. This is intended for testing.
 class NavigationURLLoaderFactory {
  public:
-  virtual scoped_ptr<NavigationURLLoader> CreateLoader(
+  virtual std::unique_ptr<NavigationURLLoader> CreateLoader(
       BrowserContext* browser_context,
-      scoped_ptr<NavigationRequestInfo> request_info,
+      std::unique_ptr<NavigationRequestInfo> request_info,
       ServiceWorkerNavigationHandle* service_worker_handle,
       NavigationURLLoaderDelegate* delegate) = 0;
 
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc
index 1d0edd41..8b4c6702 100644
--- a/content/browser/loader/navigation_url_loader_impl.cc
+++ b/content/browser/loader/navigation_url_loader_impl.cc
@@ -21,7 +21,7 @@
 
 NavigationURLLoaderImpl::NavigationURLLoaderImpl(
     BrowserContext* browser_context,
-    scoped_ptr<NavigationRequestInfo> request_info,
+    std::unique_ptr<NavigationRequestInfo> request_info,
     ServiceWorkerNavigationHandle* service_worker_handle,
     NavigationURLLoaderDelegate* delegate)
     : delegate_(delegate), weak_factory_(this) {
@@ -81,7 +81,7 @@
 
 void NavigationURLLoaderImpl::NotifyResponseStarted(
     const scoped_refptr<ResourceResponse>& response,
-    scoped_ptr<StreamHandle> body) {
+    std::unique_ptr<StreamHandle> body) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   delegate_->OnResponseStarted(response, std::move(body));
diff --git a/content/browser/loader/navigation_url_loader_impl.h b/content/browser/loader/navigation_url_loader_impl.h
index acbab763..51131cc 100644
--- a/content/browser/loader/navigation_url_loader_impl.h
+++ b/content/browser/loader/navigation_url_loader_impl.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "content/browser/loader/navigation_url_loader.h"
@@ -27,7 +28,7 @@
  public:
   // The caller is responsible for ensuring that |delegate| outlives the loader.
   NavigationURLLoaderImpl(BrowserContext* browser_context,
-                          scoped_ptr<NavigationRequestInfo> request_info,
+                          std::unique_ptr<NavigationRequestInfo> request_info,
                           ServiceWorkerNavigationHandle* service_worker_handle,
                           NavigationURLLoaderDelegate* delegate);
   ~NavigationURLLoaderImpl() override;
@@ -45,7 +46,7 @@
 
   // Notifies the delegate that the response has started.
   void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response,
-                             scoped_ptr<StreamHandle> body);
+                             std::unique_ptr<StreamHandle> body);
 
   // Notifies the delegate the request failed to return a response.
   void NotifyRequestFailed(bool in_cache, int net_error);
diff --git a/content/browser/loader/navigation_url_loader_impl_core.cc b/content/browser/loader/navigation_url_loader_impl_core.cc
index 73cd58e..84001fa 100644
--- a/content/browser/loader/navigation_url_loader_impl_core.cc
+++ b/content/browser/loader/navigation_url_loader_impl_core.cc
@@ -39,7 +39,7 @@
 void NavigationURLLoaderImplCore::Start(
     ResourceContext* resource_context,
     ServiceWorkerNavigationHandleCore* service_worker_handle_core,
-    scoped_ptr<NavigationRequestInfo> request_info) {
+    std::unique_ptr<NavigationRequestInfo> request_info) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   BrowserThread::PostTask(
@@ -94,7 +94,7 @@
 
 void NavigationURLLoaderImplCore::NotifyResponseStarted(
     ResourceResponse* response,
-    scoped_ptr<StreamHandle> body) {
+    std::unique_ptr<StreamHandle> body) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   TRACE_EVENT_ASYNC_END0("navigation", "Navigation redirectDelay", this);
   TRACE_EVENT_ASYNC_END2("navigation", "Navigation timeToResponseStarted", this,
diff --git a/content/browser/loader/navigation_url_loader_impl_core.h b/content/browser/loader/navigation_url_loader_impl_core.h
index d4f106b..67a2925 100644
--- a/content/browser/loader/navigation_url_loader_impl_core.h
+++ b/content/browser/loader/navigation_url_loader_impl_core.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/loader/navigation_url_loader_impl.h"
 
@@ -41,7 +42,7 @@
   // Starts the request.
   void Start(ResourceContext* resource_context,
              ServiceWorkerNavigationHandleCore* service_worker_handle_core,
-             scoped_ptr<NavigationRequestInfo> request_info);
+             std::unique_ptr<NavigationRequestInfo> request_info);
 
   // Follows the current pending redirect.
   void FollowRedirect();
@@ -59,7 +60,7 @@
 
   // Notifies |loader_| on the UI thread that the response started.
   void NotifyResponseStarted(ResourceResponse* response,
-                             scoped_ptr<StreamHandle> body);
+                             std::unique_ptr<StreamHandle> body);
 
   // Notifies |loader_| on the UI thread that the request failed.
   void NotifyRequestFailed(bool in_cache, int net_error);
diff --git a/content/browser/loader/navigation_url_loader_unittest.cc b/content/browser/loader/navigation_url_loader_unittest.cc
index bcd71a63..8b7c5cc 100644
--- a/content/browser/loader/navigation_url_loader_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_unittest.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include <utility>
 
 #include "base/command_line.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "content/browser/frame_host/navigation_request_info.h"
 #include "content/browser/loader/navigation_url_loader_delegate.h"
@@ -110,7 +111,7 @@
   }
 
   void OnResponseStarted(const scoped_refptr<ResourceResponse>& response,
-                         scoped_ptr<StreamHandle> body) override {
+                         std::unique_ptr<StreamHandle> body) override {
     response_ = response;
     body_ = std::move(body);
     ASSERT_TRUE(response_started_);
@@ -132,13 +133,13 @@
   net::RedirectInfo redirect_info_;
   scoped_refptr<ResourceResponse> redirect_response_;
   scoped_refptr<ResourceResponse> response_;
-  scoped_ptr<StreamHandle> body_;
+  std::unique_ptr<StreamHandle> body_;
   int net_error_;
   int on_request_handled_counter_;
 
-  scoped_ptr<base::RunLoop> request_redirected_;
-  scoped_ptr<base::RunLoop> response_started_;
-  scoped_ptr<base::RunLoop> request_failed_;
+  std::unique_ptr<base::RunLoop> request_redirected_;
+  std::unique_ptr<base::RunLoop> response_started_;
+  std::unique_ptr<base::RunLoop> request_failed_;
 };
 
 class RequestBlockingResourceDispatcherHostDelegate
@@ -169,7 +170,7 @@
         "test", net::URLRequestTestJob::CreateProtocolHandler());
     job_factory_.SetProtocolHandler(
         "blob",
-        make_scoped_ptr(new StreamProtocolHandler(
+        base::WrapUnique(new StreamProtocolHandler(
             StreamContext::GetFor(browser_context_.get())->registry())));
     request_context->set_job_factory(&job_factory_);
 
@@ -178,16 +179,17 @@
         switches::kEnableBrowserSideNavigation);
   }
 
-  scoped_ptr<NavigationURLLoader> MakeTestLoader(
+  std::unique_ptr<NavigationURLLoader> MakeTestLoader(
       const GURL& url,
       NavigationURLLoaderDelegate* delegate) {
     BeginNavigationParams begin_params(std::string(), net::LOAD_NORMAL, false,
                                        false, REQUEST_CONTEXT_TYPE_LOCATION);
     CommonNavigationParams common_params;
     common_params.url = url;
-    scoped_ptr<NavigationRequestInfo> request_info(new NavigationRequestInfo(
-        common_params, begin_params, url, url::Origin(url), true, false, -1,
-        scoped_refptr<ResourceRequestBody>()));
+    std::unique_ptr<NavigationRequestInfo> request_info(
+        new NavigationRequestInfo(common_params, begin_params, url,
+                                  url::Origin(url), true, false, -1,
+                                  scoped_refptr<ResourceRequestBody>()));
 
     return NavigationURLLoader::Create(
         browser_context_.get(), std::move(request_info), nullptr, delegate);
@@ -198,8 +200,8 @@
     net::TestDelegate delegate;
     net::URLRequestContext* request_context =
         browser_context_->GetResourceContext()->GetRequestContext();
-    scoped_ptr<net::URLRequest> request(request_context->CreateRequest(
-        url, net::DEFAULT_PRIORITY, &delegate));
+    std::unique_ptr<net::URLRequest> request(
+        request_context->CreateRequest(url, net::DEFAULT_PRIORITY, &delegate));
     request->Start();
     base::RunLoop().Run();
 
@@ -211,14 +213,14 @@
  protected:
   TestBrowserThreadBundle thread_bundle_;
   net::URLRequestJobFactoryImpl job_factory_;
-  scoped_ptr<TestBrowserContext> browser_context_;
+  std::unique_ptr<TestBrowserContext> browser_context_;
   ResourceDispatcherHostImpl host_;
 };
 
 // Tests that a basic request works.
 TEST_F(NavigationURLLoaderTest, Basic) {
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
+  std::unique_ptr<NavigationURLLoader> loader =
       MakeTestLoader(net::URLRequestTestJob::test_url_1(), &delegate);
 
   // Wait for the response to come back.
@@ -241,7 +243,7 @@
 // Tests that request failures are propagated correctly.
 TEST_F(NavigationURLLoaderTest, RequestFailed) {
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
+  std::unique_ptr<NavigationURLLoader> loader =
       MakeTestLoader(GURL("bogus:bogus"), &delegate);
 
   // Wait for the request to fail as expected.
@@ -255,9 +257,8 @@
   // Fake a top-level request. Choose a URL which redirects so the request can
   // be paused before the response comes in.
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
-      MakeTestLoader(net::URLRequestTestJob::test_url_redirect_to_url_2(),
-                     &delegate);
+  std::unique_ptr<NavigationURLLoader> loader = MakeTestLoader(
+      net::URLRequestTestJob::test_url_redirect_to_url_2(), &delegate);
 
   // Wait for the request to redirect.
   delegate.WaitForRequestRedirected();
@@ -293,9 +294,8 @@
   // Fake a top-level request. Choose a URL which redirects so the request can
   // be paused before the response comes in.
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
-      MakeTestLoader(net::URLRequestTestJob::test_url_redirect_to_url_2(),
-                     &delegate);
+  std::unique_ptr<NavigationURLLoader> loader = MakeTestLoader(
+      net::URLRequestTestJob::test_url_redirect_to_url_2(), &delegate);
 
   // Wait for the request to redirect.
   delegate.WaitForRequestRedirected();
@@ -311,9 +311,8 @@
 // loader race.
 TEST_F(NavigationURLLoaderTest, CancelResponseRace) {
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
-      MakeTestLoader(net::URLRequestTestJob::test_url_redirect_to_url_2(),
-                     &delegate);
+  std::unique_ptr<NavigationURLLoader> loader = MakeTestLoader(
+      net::URLRequestTestJob::test_url_redirect_to_url_2(), &delegate);
 
   // Wait for the request to redirect.
   delegate.WaitForRequestRedirected();
@@ -333,9 +332,8 @@
 // Tests that the loader may be canceled by context.
 TEST_F(NavigationURLLoaderTest, CancelByContext) {
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
-      MakeTestLoader(net::URLRequestTestJob::test_url_redirect_to_url_2(),
-                     &delegate);
+  std::unique_ptr<NavigationURLLoader> loader = MakeTestLoader(
+      net::URLRequestTestJob::test_url_redirect_to_url_2(), &delegate);
 
   // Wait for the request to redirect.
   delegate.WaitForRequestRedirected();
@@ -356,7 +354,7 @@
   host_.SetDelegate(&rdh_delegate);
 
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
+  std::unique_ptr<NavigationURLLoader> loader =
       MakeTestLoader(net::URLRequestTestJob::test_url_1(), &delegate);
 
   // Wait for the request to fail as expected.
@@ -371,7 +369,7 @@
 TEST_F(NavigationURLLoaderTest, LoaderDetached) {
   // Fake a top-level request to a URL whose body does not load immediately.
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
+  std::unique_ptr<NavigationURLLoader> loader =
       MakeTestLoader(net::URLRequestTestJob::test_url_2(), &delegate);
 
   // Wait for the response to come back.
@@ -398,7 +396,7 @@
 TEST_F(NavigationURLLoaderTest, OwnedByHandle) {
   // Fake a top-level request to a URL whose body does not load immediately.
   TestNavigationURLLoaderDelegate delegate;
-  scoped_ptr<NavigationURLLoader> loader =
+  std::unique_ptr<NavigationURLLoader> loader =
       MakeTestLoader(net::URLRequestTestJob::test_url_2(), &delegate);
 
   // Wait for the response to come back.
diff --git a/content/browser/loader/power_save_block_resource_throttle.h b/content/browser/loader/power_save_block_resource_throttle.h
index 4c67842..3f6f1d36 100644
--- a/content/browser/loader/power_save_block_resource_throttle.h
+++ b/content/browser/loader/power_save_block_resource_throttle.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
 #define CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "content/public/browser/resource_throttle.h"
 
@@ -33,7 +33,7 @@
 
   const std::string host_;
   base::OneShotTimer timer_;
-  scoped_ptr<PowerSaveBlocker> power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> power_save_blocker_;
 
   DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockResourceThrottle);
 };
diff --git a/content/browser/loader/redirect_to_file_resource_handler.cc b/content/browser/loader/redirect_to_file_resource_handler.cc
index 670b334..df246069 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.cc
+++ b/content/browser/loader/redirect_to_file_resource_handler.cc
@@ -61,7 +61,7 @@
 class RedirectToFileResourceHandler::Writer {
  public:
   Writer(RedirectToFileResourceHandler* handler,
-         scoped_ptr<net::FileStream> file_stream,
+         std::unique_ptr<net::FileStream> file_stream,
          ShareableFileReference* deletable_file)
       : handler_(handler),
         file_stream_(std::move(file_stream)),
@@ -119,7 +119,7 @@
 
   RedirectToFileResourceHandler* handler_;
 
-  scoped_ptr<net::FileStream> file_stream_;
+  std::unique_ptr<net::FileStream> file_stream_;
   bool is_writing_;
 
   // We create a ShareableFileReference that's deletable for the temp file
@@ -130,7 +130,7 @@
 };
 
 RedirectToFileResourceHandler::RedirectToFileResourceHandler(
-    scoped_ptr<ResourceHandler> next_handler,
+    std::unique_ptr<ResourceHandler> next_handler,
     net::URLRequest* request)
     : LayeredResourceHandler(request, std::move(next_handler)),
       buf_(new net::GrowableIOBuffer()),
@@ -243,7 +243,7 @@
 
 void RedirectToFileResourceHandler::DidCreateTemporaryFile(
     base::File::Error error_code,
-    scoped_ptr<net::FileStream> file_stream,
+    std::unique_ptr<net::FileStream> file_stream,
     ShareableFileReference* deletable_file) {
   DCHECK(!writer_);
   if (error_code != base::File::FILE_OK) {
diff --git a/content/browser/loader/redirect_to_file_resource_handler.h b/content/browser/loader/redirect_to_file_resource_handler.h
index cd4d60d..6f9db88b 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.h
+++ b/content/browser/loader/redirect_to_file_resource_handler.h
@@ -5,13 +5,14 @@
 #ifndef CONTENT_BROWSER_LOADER_REDIRECT_TO_FILE_RESOURCE_HANDLER_H_
 #define CONTENT_BROWSER_LOADER_REDIRECT_TO_FILE_RESOURCE_HANDLER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/files/file.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/loader/layered_resource_handler.h"
 #include "content/browser/loader/temporary_file_stream.h"
@@ -44,7 +45,7 @@
 
   // Create a RedirectToFileResourceHandler for |request| which wraps
   // |next_handler|.
-  RedirectToFileResourceHandler(scoped_ptr<ResourceHandler> next_handler,
+  RedirectToFileResourceHandler(std::unique_ptr<ResourceHandler> next_handler,
                                 net::URLRequest* request);
   ~RedirectToFileResourceHandler() override;
 
@@ -68,7 +69,7 @@
 
  private:
   void DidCreateTemporaryFile(base::File::Error error_code,
-                              scoped_ptr<net::FileStream> file_stream,
+                              std::unique_ptr<net::FileStream> file_stream,
                               storage::ShareableFileReference* deletable_file);
 
   // Called by RedirectToFileResourceHandler::Writer.
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index bad9b86..3a3a13d 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -280,14 +280,14 @@
 namespace {
 
 // Handles |request| by serving a redirect response.
-scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler(
+std::unique_ptr<net::test_server::HttpResponse> NoContentResponseHandler(
     const std::string& path,
     const net::test_server::HttpRequest& request) {
   if (!base::StartsWith(path, request.relative_url,
                         base::CompareCase::SENSITIVE))
-    return scoped_ptr<net::test_server::HttpResponse>();
+    return std::unique_ptr<net::test_server::HttpResponse>();
 
-  scoped_ptr<net::test_server::BasicHttpResponse> http_response(
+  std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
       new net::test_server::BasicHttpResponse);
   http_response->set_code(net::HTTP_NO_CONTENT);
   return std::move(http_response);
@@ -465,14 +465,14 @@
 
 namespace {
 
-scoped_ptr<net::test_server::HttpResponse> HandleRedirectRequest(
+std::unique_ptr<net::test_server::HttpResponse> HandleRedirectRequest(
     const std::string& request_path,
     const net::test_server::HttpRequest& request) {
   if (!base::StartsWith(request.relative_url, request_path,
                         base::CompareCase::SENSITIVE))
-    return scoped_ptr<net::test_server::HttpResponse>();
+    return std::unique_ptr<net::test_server::HttpResponse>();
 
-  scoped_ptr<net::test_server::BasicHttpResponse> http_response(
+  std::unique_ptr<net::test_server::BasicHttpResponse> http_response(
       new net::test_server::BasicHttpResponse);
   http_response->set_code(net::HTTP_FOUND);
   http_response->AddCustomHeader(
@@ -678,7 +678,7 @@
   }
 
  private:
-  scoped_ptr<LoFiModeResourceDispatcherHostDelegate> delegate_;
+  std::unique_ptr<LoFiModeResourceDispatcherHostDelegate> delegate_;
 };
 
 // Test that navigating with ShouldEnableLoFiMode returning true fetches the
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index a30ce2d..21f43ed3 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -7,7 +7,9 @@
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 
 #include <stddef.h>
+
 #include <algorithm>
+#include <memory>
 #include <set>
 #include <utility>
 #include <vector>
@@ -20,7 +22,7 @@
 #include "base/feature_list.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/field_trial.h"
@@ -359,7 +361,7 @@
 
 void NotifyRedirectOnUI(int render_process_id,
                         int render_frame_host,
-                        scoped_ptr<ResourceRedirectDetails> details) {
+                        std::unique_ptr<ResourceRedirectDetails> details) {
   RenderFrameHostImpl* host =
       RenderFrameHostImpl::FromID(render_process_id, render_frame_host);
   WebContentsImpl* web_contents =
@@ -371,7 +373,7 @@
 
 void NotifyResponseOnUI(int render_process_id,
                         int render_frame_host,
-                        scoped_ptr<ResourceRequestDetails> details) {
+                        std::unique_ptr<ResourceRequestDetails> details) {
   RenderFrameHostImpl* host =
       RenderFrameHostImpl::FromID(render_process_id, render_frame_host);
   WebContentsImpl* web_contents =
@@ -401,7 +403,7 @@
     const ResourceRequestBody::Element& element = (*body->elements())[i];
     if (element.type() != ResourceRequestBody::Element::TYPE_BLOB)
       continue;
-    scoped_ptr<storage::BlobDataHandle> handle =
+    std::unique_ptr<storage::BlobDataHandle> handle =
         blob_context->GetBlobDataFromUUID(element.blob_uuid());
     DCHECK(handle);
     if (!handle)
@@ -478,7 +480,7 @@
 void NotifyForRouteSetOnIO(
     base::Callback<void(ResourceDispatcherHostImpl*,
                         const GlobalFrameRoutingId&)> frame_callback,
-    scoped_ptr<std::set<GlobalFrameRoutingId>> routing_ids) {
+    std::unique_ptr<std::set<GlobalFrameRoutingId>> routing_ids) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   for (const auto& routing_id : *routing_ids)
     NotifyForRouteOnIO(frame_callback, routing_id);
@@ -493,7 +495,7 @@
                               ->frame_tree_node()
                               ->frame_tree();
   DCHECK_EQ(root_frame_host, frame_tree->GetMainFrame());
-  scoped_ptr<std::set<GlobalFrameRoutingId>> routing_ids(
+  std::unique_ptr<std::set<GlobalFrameRoutingId>> routing_ids(
       new std::set<GlobalFrameRoutingId>());
   for (FrameTreeNode* node : frame_tree->Nodes()) {
     RenderFrameHostImpl* frame_host = node->current_frame_host();
@@ -652,7 +654,7 @@
   // the requests to cancel first, and then we start cancelling. We assert at
   // the end that there are no more to cancel since the context is about to go
   // away.
-  typedef std::vector<scoped_ptr<ResourceLoader>> LoaderList;
+  typedef std::vector<std::unique_ptr<ResourceLoader>> LoaderList;
   LoaderList loaders_to_cancel;
 
   for (LoaderMap::iterator i = pending_loaders_.begin();
@@ -678,7 +680,7 @@
     }
     ResourceRequestInfoImpl* info = loaders->front()->GetRequestInfo();
     if (info->GetContext() == context) {
-      scoped_ptr<BlockedLoadersList> deleter(std::move(i->second));
+      std::unique_ptr<BlockedLoadersList> deleter(std::move(i->second));
       blocked_loaders_map_.erase(i++);
       for (auto& loader : *loaders) {
         info = loader->GetRequestInfo();
@@ -736,7 +738,7 @@
 }
 
 DownloadInterruptReason ResourceDispatcherHostImpl::BeginDownload(
-    scoped_ptr<net::URLRequest> request,
+    std::unique_ptr<net::URLRequest> request,
     const Referrer& referrer,
     bool is_content_initiated,
     ResourceContext* context,
@@ -800,7 +802,7 @@
 
   // From this point forward, the |DownloadResourceHandler| is responsible for
   // |started_callback|.
-  scoped_ptr<ResourceHandler> handler(CreateResourceHandlerForDownload(
+  std::unique_ptr<ResourceHandler> handler(CreateResourceHandlerForDownload(
       request.get(), is_content_initiated, true));
 
   BeginRequestInternal(std::move(request), std::move(handler));
@@ -826,12 +828,13 @@
                                      base::Unretained(this)));
 }
 
-scoped_ptr<ResourceHandler>
+std::unique_ptr<ResourceHandler>
 ResourceDispatcherHostImpl::CreateResourceHandlerForDownload(
     net::URLRequest* request,
     bool is_content_initiated,
     bool must_download) {
-  scoped_ptr<ResourceHandler> handler(new DownloadResourceHandler(request));
+  std::unique_ptr<ResourceHandler> handler(
+      new DownloadResourceHandler(request));
   if (delegate_) {
     const ResourceRequestInfoImpl* request_info(
         ResourceRequestInfoImpl::ForRequest(request));
@@ -849,7 +852,8 @@
   return handler;
 }
 
-scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::MaybeInterceptAsStream(
+std::unique_ptr<ResourceHandler>
+ResourceDispatcherHostImpl::MaybeInterceptAsStream(
     const base::FilePath& plugin_path,
     net::URLRequest* request,
     ResourceResponse* response,
@@ -862,19 +866,17 @@
   if (!delegate_ ||
       !delegate_->ShouldInterceptResourceAsStream(
           request, plugin_path, mime_type, &origin, payload)) {
-    return scoped_ptr<ResourceHandler>();
+    return std::unique_ptr<ResourceHandler>();
   }
 
   StreamContext* stream_context =
       GetStreamContextForResourceContext(info->GetContext());
 
-  scoped_ptr<StreamResourceHandler> handler(
-      new StreamResourceHandler(request,
-                                stream_context->registry(),
-                                origin));
+  std::unique_ptr<StreamResourceHandler> handler(
+      new StreamResourceHandler(request, stream_context->registry(), origin));
 
   info->set_is_stream(true);
-  scoped_ptr<StreamInfo> stream_info(new StreamInfo);
+  std::unique_ptr<StreamInfo> stream_info(new StreamInfo);
   stream_info->handle = handler->stream()->CreateHandle();
   stream_info->original_url = request->url();
   stream_info->mime_type = mime_type;
@@ -966,7 +968,7 @@
     return;
 
   // Notify the observers on the UI thread.
-  scoped_ptr<ResourceRedirectDetails> detail(new ResourceRedirectDetails(
+  std::unique_ptr<ResourceRedirectDetails> detail(new ResourceRedirectDetails(
       loader->request(),
       GetCertID(GetCertStore(), loader->request(), info->GetChildID()),
       new_url));
@@ -1006,7 +1008,7 @@
     return;
 
   // Notify the observers on the UI thread.
-  scoped_ptr<ResourceRequestDetails> detail(new ResourceRequestDetails(
+  std::unique_ptr<ResourceRequestDetails> detail(new ResourceRequestDetails(
       request, GetCertID(GetCertStore(), request, info->GetChildID())));
   BrowserThread::PostTask(
       BrowserThread::UI, FROM_HERE,
@@ -1288,7 +1290,7 @@
     IncrementOutstandingRequestsCount(-1, info);
 
   DCHECK(pending_loaders_.find(old_request_id) == iter);
-  scoped_ptr<ResourceLoader> loader = std::move(iter->second);
+  std::unique_ptr<ResourceLoader> loader = std::move(iter->second);
   ResourceLoader* loader_ptr = loader.get();
   pending_loaders_.erase(iter);
 
@@ -1445,7 +1447,7 @@
   }
 
   // Construct the request.
-  scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest(
+  std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest(
       is_navigation_stream_request ? request_data.resource_body_stream_url
                                    : request_data.url,
       request_data.priority, nullptr);
@@ -1619,17 +1621,16 @@
       request_data.appcache_host_id, request_data.resource_type,
       request_data.should_reset_appcache);
 
-  scoped_ptr<ResourceHandler> handler(
-       CreateResourceHandler(
-           new_request.get(),
-           request_data, sync_result, route_id, process_type, child_id,
-           resource_context));
+  std::unique_ptr<ResourceHandler> handler(CreateResourceHandler(
+      new_request.get(), request_data, sync_result, route_id, process_type,
+      child_id, resource_context));
 
   if (handler)
     BeginRequestInternal(std::move(new_request), std::move(handler));
 }
 
-scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::CreateResourceHandler(
+std::unique_ptr<ResourceHandler>
+ResourceDispatcherHostImpl::CreateResourceHandler(
     net::URLRequest* request,
     const ResourceHostMsg_Request& request_data,
     IPC::Message* sync_result,
@@ -1642,12 +1643,12 @@
       FROM_HERE_WITH_EXPLICIT_FUNCTION(
           "456331 ResourceDispatcherHostImpl::CreateResourceHandler"));
   // Construct the IPC resource handler.
-  scoped_ptr<ResourceHandler> handler;
+  std::unique_ptr<ResourceHandler> handler;
   if (sync_result) {
     // download_to_file is not supported for synchronous requests.
     if (request_data.download_to_file) {
       bad_message::ReceivedBadMessage(filter_, bad_message::RDH_BAD_DOWNLOAD);
-      return scoped_ptr<ResourceHandler>();
+      return std::unique_ptr<ResourceHandler>();
     }
 
     handler.reset(new SyncResourceHandler(request, sync_result, this));
@@ -1696,14 +1697,15 @@
                              child_id, route_id, std::move(handler));
 }
 
-scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::AddStandardHandlers(
+std::unique_ptr<ResourceHandler>
+ResourceDispatcherHostImpl::AddStandardHandlers(
     net::URLRequest* request,
     ResourceType resource_type,
     ResourceContext* resource_context,
     AppCacheService* appcache_service,
     int child_id,
     int route_id,
-    scoped_ptr<ResourceHandler> handler) {
+    std::unique_ptr<ResourceHandler> handler) {
   // PlzNavigate: do not add ResourceThrottles for main resource requests from
   // the renderer.  Decisions about the navigation should have been done in the
   // initial request.
@@ -1927,7 +1929,7 @@
     return;
   }
 
-  scoped_ptr<net::URLRequest> request(
+  std::unique_ptr<net::URLRequest> request(
       request_context->CreateRequest(url, net::DEFAULT_PRIORITY, NULL));
   request->set_method("GET");
   SetReferrerForRequest(request.get(), referrer);
@@ -1942,7 +1944,7 @@
                         render_frame_route_id, false, context);
   extra_info->AssociateWithRequest(request.get());  // Request takes ownership.
 
-  scoped_ptr<ResourceHandler> handler(new SaveFileResourceHandler(
+  std::unique_ptr<ResourceHandler> handler(new SaveFileResourceHandler(
       request.get(), save_item_id, save_package_id, child_id,
       render_frame_route_id, url, save_file_manager_.get()));
 
@@ -2221,7 +2223,7 @@
   // requests that have the ignore limits flag set.
   DCHECK(!(load_flags & net::LOAD_IGNORE_LIMITS));
 
-  scoped_ptr<net::URLRequest> new_request;
+  std::unique_ptr<net::URLRequest> new_request;
   new_request = request_context->CreateRequest(
       info.common_params.url, net::HIGHEST, nullptr);
 
@@ -2323,8 +2325,8 @@
 
   // TODO(davidben): Attach AppCacheInterceptor.
 
-  scoped_ptr<ResourceHandler> handler(new NavigationResourceHandler(
-      new_request.get(), loader));
+  std::unique_ptr<ResourceHandler> handler(
+      new NavigationResourceHandler(new_request.get(), loader));
 
   // TODO(davidben): Pass in the appropriate appcache_service. Also fix the
   // dependency on child_id/route_id. Those are used by the ResourceScheduler;
@@ -2361,8 +2363,8 @@
 }
 
 void ResourceDispatcherHostImpl::BeginRequestInternal(
-    scoped_ptr<net::URLRequest> request,
-    scoped_ptr<ResourceHandler> handler) {
+    std::unique_ptr<net::URLRequest> request,
+    std::unique_ptr<ResourceHandler> handler) {
   DCHECK(!request->is_pending());
   ResourceRequestInfoImpl* info =
       ResourceRequestInfoImpl::ForRequest(request.get());
@@ -2398,7 +2400,7 @@
     return;
   }
 
-  scoped_ptr<ResourceLoader> loader(new ResourceLoader(
+  std::unique_ptr<ResourceLoader> loader(new ResourceLoader(
       std::move(request), std::move(handler), GetCertStore(), this));
 
   GlobalFrameRoutingId id(info->GetChildID(), info->GetRenderFrameID());
@@ -2414,7 +2416,7 @@
 
 void ResourceDispatcherHostImpl::StartLoading(
     ResourceRequestInfoImpl* info,
-    scoped_ptr<ResourceLoader> loader) {
+    std::unique_ptr<ResourceLoader> loader) {
   // TODO(pkasting): Remove ScopedTracker below once crbug.com/456331 is fixed.
   tracked_objects::ScopedTracker tracking_profile(
       FROM_HERE_WITH_EXPLICIT_FUNCTION(
@@ -2461,7 +2463,7 @@
 
 // static
 void ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread(
-    scoped_ptr<LoadInfoMap> info_map) {
+    std::unique_ptr<LoadInfoMap> info_map) {
   // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
   // is fixed.
   tracked_objects::ScopedTracker tracking_profile(
@@ -2480,11 +2482,11 @@
   }
 }
 
-scoped_ptr<ResourceDispatcherHostImpl::LoadInfoMap>
+std::unique_ptr<ResourceDispatcherHostImpl::LoadInfoMap>
 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes() {
   // Populate this map with load state changes, and then send them on to the UI
   // thread where they can be passed along to the respective RVHs.
-  scoped_ptr<LoadInfoMap> info_map(new LoadInfoMap());
+  std::unique_ptr<LoadInfoMap> info_map(new LoadInfoMap());
 
   for (const auto& loader : pending_loaders_) {
     net::URLRequest* request = loader.second->request();
@@ -2508,7 +2510,7 @@
 }
 
 void ResourceDispatcherHostImpl::UpdateLoadInfo() {
-  scoped_ptr<LoadInfoMap> info_map(GetLoadInfoForAllRoutes());
+  std::unique_ptr<LoadInfoMap> info_map(GetLoadInfoForAllRoutes());
 
   // Stop the timer if there are no more pending requests. Future new requests
   // will restart it as necessary.
@@ -2532,7 +2534,7 @@
          blocked_loaders_map_.end())
       << "BlockRequestsForRoute called  multiple time for the same RFH";
   blocked_loaders_map_[global_routing_id] =
-      make_scoped_ptr(new BlockedLoadersList());
+      base::WrapUnique(new BlockedLoadersList());
 }
 
 void ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute(
@@ -2557,12 +2559,12 @@
   }
 
   BlockedLoadersList* loaders = iter->second.get();
-  scoped_ptr<BlockedLoadersList> deleter(std::move(iter->second));
+  std::unique_ptr<BlockedLoadersList> deleter(std::move(iter->second));
 
   // Removing the vector from the map unblocks any subsequent requests.
   blocked_loaders_map_.erase(iter);
 
-  for (scoped_ptr<ResourceLoader>& loader : *loaders) {
+  for (std::unique_ptr<ResourceLoader>& loader : *loaders) {
     ResourceRequestInfoImpl* info = loader->GetRequestInfo();
     if (cancel_requests) {
       IncrementOutstandingRequestsMemory(-1, *info);
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index bf2ce4b..086f39be 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -15,13 +15,13 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -150,14 +150,15 @@
   bool OnMessageReceived(const IPC::Message& message,
                          ResourceMessageFilter* filter);
 
-  DownloadInterruptReason BeginDownload(scoped_ptr<net::URLRequest> request,
-                                        const Referrer& referrer,
-                                        bool is_content_initiated,
-                                        ResourceContext* context,
-                                        int child_id,
-                                        int render_view_route_id,
-                                        int render_frame_route_id,
-                                        bool do_not_prompt_for_login);
+  DownloadInterruptReason BeginDownload(
+      std::unique_ptr<net::URLRequest> request,
+      const Referrer& referrer,
+      bool is_content_initiated,
+      ResourceContext* context,
+      int child_id,
+      int render_view_route_id,
+      int render_frame_route_id,
+      bool do_not_prompt_for_login);
 
   // Initiates a save file from the browser process (as opposed to a resource
   // request from the renderer or another child process).
@@ -269,7 +270,7 @@
   // and associated with the request.
   // |id| should be |content::DownloadItem::kInvalidId| to request automatic
   // assignment. This is marked virtual so it can be overriden in testing.
-  virtual scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload(
+  virtual std::unique_ptr<ResourceHandler> CreateResourceHandlerForDownload(
       net::URLRequest* request,
       bool is_content_initiated,
       bool must_download);
@@ -286,7 +287,7 @@
   // and associated with the request. If |payload| is set to a non-empty value,
   // the caller must send it to the old resource handler instead of cancelling
   // it.
-  virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
+  virtual std::unique_ptr<ResourceHandler> MaybeInterceptAsStream(
       const base::FilePath& plugin_path,
       net::URLRequest* request,
       ResourceResponse* response,
@@ -370,11 +371,11 @@
   void OnRenderFrameDeleted(const GlobalFrameRoutingId& global_routing_id);
 
   // Helper function for regular and download requests.
-  void BeginRequestInternal(scoped_ptr<net::URLRequest> request,
-                            scoped_ptr<ResourceHandler> handler);
+  void BeginRequestInternal(std::unique_ptr<net::URLRequest> request,
+                            std::unique_ptr<ResourceHandler> handler);
 
   void StartLoading(ResourceRequestInfoImpl* info,
-                    scoped_ptr<ResourceLoader> loader);
+                    std::unique_ptr<ResourceLoader> loader);
 
   // We keep track of how much memory each request needs and how many requests
   // are issued by each renderer. These are known as OustandingRequestStats.
@@ -422,7 +423,7 @@
   // It may be enhanced in the future to provide some kind of prioritization
   // mechanism. We should also consider a hashtable or binary tree if it turns
   // out we have a lot of things here.
-  using LoaderMap = std::map<GlobalRequestID, scoped_ptr<ResourceLoader>>;
+  using LoaderMap = std::map<GlobalRequestID, std::unique_ptr<ResourceLoader>>;
 
   // Deletes the pending request identified by the iterator passed in.
   // This function will invalidate the iterator passed in. Callers should
@@ -449,10 +450,10 @@
 
   // Used to marshal calls to LoadStateChanged from the IO to UI threads.  All
   // are done as a single callback to avoid spamming the UI thread.
-  static void UpdateLoadInfoOnUIThread(scoped_ptr<LoadInfoMap> info_map);
+  static void UpdateLoadInfoOnUIThread(std::unique_ptr<LoadInfoMap> info_map);
 
   // Gets the most interesting LoadInfo for each GlobalRoutingID.
-  scoped_ptr<LoadInfoMap> GetLoadInfoForAllRoutes();
+  std::unique_ptr<LoadInfoMap> GetLoadInfoForAllRoutes();
 
   // Checks all pending requests and updates the load info if necessary.
   void UpdateLoadInfo();
@@ -486,7 +487,7 @@
 
   // Creates a ResourceHandler to be used by BeginRequest() for normal resource
   // loading.
-  scoped_ptr<ResourceHandler> CreateResourceHandler(
+  std::unique_ptr<ResourceHandler> CreateResourceHandler(
       net::URLRequest* request,
       const ResourceHostMsg_Request& request_data,
       IPC::Message* sync_result,
@@ -498,14 +499,14 @@
   // Wraps |handler| in the standard resource handlers for normal resource
   // loading and navigation requests. This adds MimeTypeResourceHandler and
   // ResourceThrottles.
-  scoped_ptr<ResourceHandler> AddStandardHandlers(
+  std::unique_ptr<ResourceHandler> AddStandardHandlers(
       net::URLRequest* request,
       ResourceType resource_type,
       ResourceContext* resource_context,
       AppCacheService* appcache_service,
       int child_id,
       int route_id,
-      scoped_ptr<ResourceHandler> handler);
+      std::unique_ptr<ResourceHandler> handler);
 
   void OnDataDownloadedACK(int request_id);
   void OnCancelRequest(int request_id);
@@ -579,7 +580,7 @@
 
   // A timer that periodically calls UpdateLoadInfo while pending_loaders_ is
   // not empty and at least one RenderViewHost is loading.
-  scoped_ptr<base::RepeatingTimer> update_load_states_timer_;
+  std::unique_ptr<base::RepeatingTimer> update_load_states_timer_;
 
   // We own the save file manager.
   scoped_refptr<SaveFileManager> save_file_manager_;
@@ -596,9 +597,9 @@
   // True if the resource dispatcher host has been shut down.
   bool is_shutdown_;
 
-  using BlockedLoadersList = std::vector<scoped_ptr<ResourceLoader>>;
+  using BlockedLoadersList = std::vector<std::unique_ptr<ResourceLoader>>;
   using BlockedLoadersMap =
-      std::map<GlobalFrameRoutingId, scoped_ptr<BlockedLoadersList>>;
+      std::map<GlobalFrameRoutingId, std::unique_ptr<BlockedLoadersList>>;
   BlockedLoadersMap blocked_loaders_map_;
 
   // Maps the child_ids to the approximate number of bytes
@@ -646,7 +647,7 @@
 
   // AsyncRevalidationManager is non-NULL if and only if
   // stale-while-revalidate is enabled.
-  scoped_ptr<AsyncRevalidationManager> async_revalidation_manager_;
+  std::unique_ptr<AsyncRevalidationManager> async_revalidation_manager_;
 
   // http://crbug.com/90971 - Assists in tracking down use-after-frees on
   // shutdown.
@@ -656,7 +657,7 @@
                    base::ObserverList<ResourceMessageDelegate>*> DelegateMap;
   DelegateMap delegate_map_;
 
-  scoped_ptr<ResourceScheduler> scheduler_;
+  std::unique_ptr<ResourceScheduler> scheduler_;
 
   // Allows tests to use a mock CertStore. If set, the CertStore must
   // outlive this ResourceDispatcherHostImpl.
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index c3cbb353..606da908 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -92,9 +92,8 @@
   ASSERT_TRUE(IPC::ReadParam(&messages[0], &iter, response_head));
 }
 
-void GenerateIPCMessage(
-    scoped_refptr<ResourceMessageFilter> filter,
-    scoped_ptr<IPC::Message> message) {
+void GenerateIPCMessage(scoped_refptr<ResourceMessageFilter> filter,
+                        std::unique_ptr<IPC::Message> message) {
   ResourceDispatcherHostImpl::Get()->OnMessageReceived(
       *message, filter.get());
 }
@@ -767,7 +766,7 @@
   bool create_two_throttles_;
   int flags_;
   int error_code_for_cancellation_;
-  scoped_ptr<base::SupportsUserData::Data> user_data_;
+  std::unique_ptr<base::SupportsUserData::Data> user_data_;
 };
 
 // Waits for a ShareableFileReference to be released.
@@ -909,8 +908,9 @@
     return true;
   }
 
-  scoped_ptr<LoadInfoMap> RunLoadInfoTest(LoadInfoTestRequestInfo* request_info,
-                                          size_t num_requests) {
+  std::unique_ptr<LoadInfoMap> RunLoadInfoTest(
+      LoadInfoTestRequestInfo* request_info,
+      size_t num_requests) {
     for (size_t i = 0; i < num_requests; ++i) {
       loader_test_request_info_.reset(
           new LoadInfoTestRequestInfo(request_info[i]));
@@ -946,7 +946,7 @@
         base::FeatureList::InitializeInstance(std::string(), std::string());
         break;
       case TestConfig::kOptimizeIPCForSmallResourceEnabled: {
-        scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+        std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
         feature_list->InitializeFromCommandLine(
             features::kOptimizeIPCForSmallResource.name, std::string());
         base::FeatureList::SetInstance(std::move(feature_list));
@@ -1079,7 +1079,7 @@
     int request_id = -1;
     bool result = base::PickleIterator(msg).ReadInt(&request_id);
     DCHECK(result);
-    scoped_ptr<IPC::Message> ack(
+    std::unique_ptr<IPC::Message> ack(
         new ResourceHostMsg_DataReceived_ACK(request_id));
 
     base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -1106,14 +1106,14 @@
     host_.OnRenderFrameDeleted(global_routing_id);
   }
 
-  scoped_ptr<LoadInfoTestRequestInfo> loader_test_request_info_;
-  scoped_ptr<base::RunLoop> wait_for_request_create_loop_;
+  std::unique_ptr<LoadInfoTestRequestInfo> loader_test_request_info_;
+  std::unique_ptr<base::RunLoop> wait_for_request_create_loop_;
 
   content::TestBrowserThreadBundle thread_bundle_;
-  scoped_ptr<TestBrowserContext> browser_context_;
-  scoped_ptr<TestURLRequestJobFactory> job_factory_;
-  scoped_ptr<WebContents> web_contents_;
-  scoped_ptr<TestWebContentsObserver> web_contents_observer_;
+  std::unique_ptr<TestBrowserContext> browser_context_;
+  std::unique_ptr<TestURLRequestJobFactory> job_factory_;
+  std::unique_ptr<WebContents> web_contents_;
+  std::unique_ptr<TestWebContentsObserver> web_contents_observer_;
   scoped_refptr<ForwardingFilter> filter_;
   scoped_refptr<TestFilterSpecifyingChild> web_contents_filter_;
   net::TestNetworkDelegate network_delegate_;
@@ -1126,7 +1126,7 @@
   net::URLRequest::ProtocolFactory* old_factory_;
   bool send_data_received_acks_;
   std::set<int> child_ids_;
-  scoped_ptr<base::RunLoop> wait_for_request_complete_loop_;
+  std::unique_ptr<base::RunLoop> wait_for_request_complete_loop_;
   RenderViewHostTestEnabler render_view_host_test_enabler_;
   MockCertStore mock_cert_store_;
 };
@@ -1210,7 +1210,7 @@
     const GURL& url) {
   net::URLRequestContext* request_context =
       browser_context_->GetResourceContext()->GetRequestContext();
-  scoped_ptr<net::URLRequest> request(
+  std::unique_ptr<net::URLRequest> request(
       request_context->CreateRequest(url, net::DEFAULT_PRIORITY, NULL));
   host_.BeginDownload(std::move(request), Referrer(),
                       false,  // is_content_initiated
@@ -2186,7 +2186,7 @@
 // Test the private helper method "CalculateApproximateMemoryCost()".
 TEST_P(ResourceDispatcherHostTest, CalculateApproximateMemoryCost) {
   net::URLRequestContext context;
-  scoped_ptr<net::URLRequest> req(context.CreateRequest(
+  std::unique_ptr<net::URLRequest> req(context.CreateRequest(
       GURL("http://www.google.com"), net::DEFAULT_PRIORITY, NULL));
   EXPECT_EQ(
       4427,
@@ -2202,8 +2202,9 @@
   std::string upload_content;
   upload_content.resize(33);
   std::fill(upload_content.begin(), upload_content.end(), 'x');
-  scoped_ptr<net::UploadElementReader> reader(new net::UploadBytesElementReader(
-      upload_content.data(), upload_content.size()));
+  std::unique_ptr<net::UploadElementReader> reader(
+      new net::UploadBytesElementReader(upload_content.data(),
+                                        upload_content.size()));
   req->set_upload(
       net::ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
 
@@ -3518,7 +3519,7 @@
 
 // Tests GetLoadInfoForAllRoutes when there are no pending requests.
 TEST_P(ResourceDispatcherHostTest, LoadInfoNoRequests) {
-  scoped_ptr<LoadInfoMap> load_info_map = RunLoadInfoTest(nullptr, 0);
+  std::unique_ptr<LoadInfoMap> load_info_map = RunLoadInfoTest(nullptr, 0);
   EXPECT_EQ(0u, load_info_map->size());
 }
 
@@ -3540,7 +3541,7 @@
        net::LOAD_STATE_SENDING_REQUEST,
        net::UploadProgress(0, 0)},
   };
-  scoped_ptr<LoadInfoMap> load_info_map =
+  std::unique_ptr<LoadInfoMap> load_info_map =
       RunLoadInfoTest(request_info, arraysize(request_info));
   ASSERT_EQ(1u, load_info_map->size());
   ASSERT_TRUE(load_info_map->find(kId) != load_info_map->end());
@@ -3565,7 +3566,7 @@
        net::LOAD_STATE_IDLE,
        net::UploadProgress(0, 0)},
   };
-  scoped_ptr<LoadInfoMap> load_info_map =
+  std::unique_ptr<LoadInfoMap> load_info_map =
       RunLoadInfoTest(request_info, arraysize(request_info));
   ASSERT_EQ(1u, load_info_map->size());
   ASSERT_TRUE(load_info_map->find(kId) != load_info_map->end());
@@ -3600,7 +3601,7 @@
        net::LOAD_STATE_READING_RESPONSE,
        net::UploadProgress(0, 0)},
   };
-  scoped_ptr<LoadInfoMap> load_info_map =
+  std::unique_ptr<LoadInfoMap> load_info_map =
       RunLoadInfoTest(request_info, arraysize(request_info));
   ASSERT_EQ(1u, load_info_map->size());
   ASSERT_TRUE(load_info_map->find(kId) != load_info_map->end());
@@ -3635,7 +3636,7 @@
        net::LOAD_STATE_CONNECTING,
        net::UploadProgress(0, 0)},
   };
-  scoped_ptr<LoadInfoMap> load_info_map =
+  std::unique_ptr<LoadInfoMap> load_info_map =
       RunLoadInfoTest(request_info, arraysize(request_info));
   ASSERT_EQ(2u, load_info_map->size());
 
@@ -3770,7 +3771,7 @@
     test_fixture_->wait_for_request_create_loop_->Quit();
   if (test_fixture_->loader_test_request_info_) {
     DCHECK_EQ(test_fixture_->loader_test_request_info_->url, request->url());
-    scoped_ptr<LoadInfoTestRequestInfo> info =
+    std::unique_ptr<LoadInfoTestRequestInfo> info =
         std::move(test_fixture_->loader_test_request_info_);
     return new URLRequestLoadInfoJob(request, network_delegate,
                                      info->load_state, info->upload_progress);
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 3d6a1e5..40e1f2a6 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -132,8 +132,8 @@
 
 }  // namespace
 
-ResourceLoader::ResourceLoader(scoped_ptr<net::URLRequest> request,
-                               scoped_ptr<ResourceHandler> handler,
+ResourceLoader::ResourceLoader(std::unique_ptr<net::URLRequest> request,
+                               std::unique_ptr<ResourceHandler> handler,
                                CertStore* cert_store,
                                ResourceLoaderDelegate* delegate)
     : deferred_stage_(DEFERRED_NONE),
diff --git a/content/browser/loader/resource_loader.h b/content/browser/loader/resource_loader.h
index 5f9129f..976111a7 100644
--- a/content/browser/loader/resource_loader.h
+++ b/content/browser/loader/resource_loader.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/timer/timer.h"
 #include "content/browser/loader/resource_handler.h"
@@ -35,8 +36,8 @@
                                       public SSLClientAuthHandler::Delegate,
                                       public ResourceController {
  public:
-  ResourceLoader(scoped_ptr<net::URLRequest> request,
-                 scoped_ptr<ResourceHandler> handler,
+  ResourceLoader(std::unique_ptr<net::URLRequest> request,
+                 std::unique_ptr<ResourceHandler> handler,
                  CertStore* cert_store,
                  ResourceLoaderDelegate* delegate);
   ~ResourceLoader() override;
@@ -136,12 +137,12 @@
   };
   DeferredStage deferred_stage_;
 
-  scoped_ptr<net::URLRequest> request_;
-  scoped_ptr<ResourceHandler> handler_;
+  std::unique_ptr<net::URLRequest> request_;
+  std::unique_ptr<ResourceHandler> handler_;
   ResourceLoaderDelegate* delegate_;
 
   scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_;
-  scoped_ptr<SSLClientAuthHandler> ssl_client_auth_handler_;
+  std::unique_ptr<SSLClientAuthHandler> ssl_client_auth_handler_;
 
   base::TimeTicks read_deferral_start_time_;
 
diff --git a/content/browser/loader/resource_loader_unittest.cc b/content/browser/loader/resource_loader_unittest.cc
index 56eac13d..32197c7b 100644
--- a/content/browser/loader/resource_loader_unittest.cc
+++ b/content/browser/loader/resource_loader_unittest.cc
@@ -6,13 +6,15 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/files/file.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
@@ -111,11 +113,10 @@
   // Creates a client certificate store which, when looked up, posts a task to
   // reset |loader| and then call the callback. The caller is responsible for
   // ensuring the pointers remain valid until the process is complete.
-  LoaderDestroyingCertStore(scoped_ptr<ResourceLoader>* loader,
+  LoaderDestroyingCertStore(std::unique_ptr<ResourceLoader>* loader,
                             const base::Closure& on_loader_deleted_callback)
       : loader_(loader),
-        on_loader_deleted_callback_(on_loader_deleted_callback) {
-  }
+        on_loader_deleted_callback_(on_loader_deleted_callback) {}
 
   // net::ClientCertStore:
   void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info,
@@ -133,7 +134,7 @@
   // This needs to be static because |loader| owns the
   // LoaderDestroyingCertStore (ClientCertStores are actually handles, and not
   // global cert stores).
-  static void DoCallback(scoped_ptr<ResourceLoader>* loader,
+  static void DoCallback(std::unique_ptr<ResourceLoader>* loader,
                          const base::Closure& cert_selected_callback,
                          const base::Closure& on_loader_deleted_callback) {
     loader->reset();
@@ -141,7 +142,7 @@
     on_loader_deleted_callback.Run();
   }
 
-  scoped_ptr<ResourceLoader>* loader_;
+  std::unique_ptr<ResourceLoader>* loader_;
   base::Closure on_loader_deleted_callback_;
 
   DISALLOW_COPY_AND_ASSIGN(LoaderDestroyingCertStore);
@@ -427,7 +428,7 @@
   int total_bytes_downloaded_;
   base::RunLoop deferred_run_loop_;
   base::RunLoop response_completed_run_loop_;
-  scoped_ptr<base::RunLoop> wait_for_progress_run_loop_;
+  std::unique_ptr<base::RunLoop> wait_for_progress_run_loop_;
 };
 
 // Test browser client that captures calls to SelectClientCertificates and
@@ -447,7 +448,7 @@
   void SelectClientCertificate(
       WebContents* web_contents,
       net::SSLCertRequestInfo* cert_request_info,
-      scoped_ptr<ClientCertificateDelegate> delegate) override {
+      std::unique_ptr<ClientCertificateDelegate> delegate) override {
     EXPECT_FALSE(delegate_.get());
 
     ++call_count_;
@@ -469,7 +470,7 @@
  private:
   net::CertificateList passed_certs_;
   int call_count_;
-  scoped_ptr<ClientCertificateDelegate> delegate_;
+  std::unique_ptr<ClientCertificateDelegate> delegate_;
 
   base::RunLoop select_certificate_run_loop_;
 
@@ -481,16 +482,16 @@
   explicit ResourceContextStub(net::URLRequestContext* test_request_context)
       : MockResourceContext(test_request_context) {}
 
-  scoped_ptr<net::ClientCertStore> CreateClientCertStore() override {
+  std::unique_ptr<net::ClientCertStore> CreateClientCertStore() override {
     return std::move(dummy_cert_store_);
   }
 
-  void SetClientCertStore(scoped_ptr<net::ClientCertStore> store) {
+  void SetClientCertStore(std::unique_ptr<net::ClientCertStore> store) {
     dummy_cert_store_ = std::move(store);
   }
 
  private:
-  scoped_ptr<net::ClientCertStore> dummy_cert_store_;
+  std::unique_ptr<net::ClientCertStore> dummy_cert_store_;
 };
 
 // Wraps a ChunkedUploadDataStream to behave as non-chunked to enable upload
@@ -532,8 +533,8 @@
     const CreateTemporaryFileStreamCallback& callback) {
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE,
-      base::Bind(callback, error, base::Passed(scoped_ptr<net::FileStream>()),
-                 nullptr));
+      base::Bind(callback, error,
+                 base::Passed(std::unique_ptr<net::FileStream>()), nullptr));
 }
 
 }  // namespace
@@ -555,19 +556,19 @@
     return net::URLRequestTestJob::test_data_1();
   }
 
-  virtual scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+  virtual std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>
   CreateProtocolHandler() {
     return net::URLRequestTestJob::CreateProtocolHandler();
   }
 
-  virtual scoped_ptr<ResourceHandler> WrapResourceHandler(
-      scoped_ptr<ResourceHandlerStub> leaf_handler,
+  virtual std::unique_ptr<ResourceHandler> WrapResourceHandler(
+      std::unique_ptr<ResourceHandlerStub> leaf_handler,
       net::URLRequest* request) {
     return std::move(leaf_handler);
   }
 
   // Replaces loader_ with a new one for |request|.
-  void SetUpResourceLoader(scoped_ptr<net::URLRequest> request) {
+  void SetUpResourceLoader(std::unique_ptr<net::URLRequest> request) {
     raw_ptr_to_request_ = request.get();
 
     RenderFrameHost* rfh = web_contents_->GetMainFrame();
@@ -577,7 +578,7 @@
         rfh->GetRoutingID(), true /* is_main_frame */,
         false /* parent_is_main_frame */, true /* allow_download */,
         false /* is_async */, false /* is_using_lofi_ */);
-    scoped_ptr<ResourceHandlerStub> resource_handler(
+    std::unique_ptr<ResourceHandlerStub> resource_handler(
         new ResourceHandlerStub(request.get()));
     raw_ptr_resource_handler_ = resource_handler.get();
     loader_.reset(new ResourceLoader(
@@ -595,11 +596,9 @@
     web_contents_.reset(
         TestWebContents::Create(browser_context_.get(), site_instance.get()));
 
-    scoped_ptr<net::URLRequest> request(
+    std::unique_ptr<net::URLRequest> request(
         resource_context_.GetRequestContext()->CreateRequest(
-            test_url(),
-            net::DEFAULT_PRIORITY,
-            nullptr /* delegate */));
+            test_url(), net::DEFAULT_PRIORITY, nullptr /* delegate */));
     SetUpResourceLoader(std::move(request));
   }
 
@@ -633,20 +632,20 @@
   net::URLRequestJobFactoryImpl job_factory_;
   net::TestURLRequestContext test_url_request_context_;
   ResourceContextStub resource_context_;
-  scoped_ptr<TestBrowserContext> browser_context_;
-  scoped_ptr<TestWebContents> web_contents_;
+  std::unique_ptr<TestBrowserContext> browser_context_;
+  std::unique_ptr<TestWebContents> web_contents_;
 
   // The ResourceLoader owns the URLRequest and the ResourceHandler.
   ResourceHandlerStub* raw_ptr_resource_handler_;
   net::URLRequest* raw_ptr_to_request_;
-  scoped_ptr<ResourceLoader> loader_;
+  std::unique_ptr<ResourceLoader> loader_;
 };
 
 class ClientCertResourceLoaderTest : public ResourceLoaderTest {
  protected:
-  scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> CreateProtocolHandler()
-      override {
-    return make_scoped_ptr(new MockClientCertJobProtocolHandler);
+  std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>
+  CreateProtocolHandler() override {
+    return base::WrapUnique(new MockClientCertJobProtocolHandler);
   }
 };
 
@@ -673,11 +672,11 @@
     net::URLRequestFilter::GetInstance()->ClearHandlers();
     net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
         "https", "example.test",
-        scoped_ptr<net::URLRequestInterceptor>(
+        std::unique_ptr<net::URLRequestInterceptor>(
             new MockHTTPSJobURLRequestInterceptor(false /* redirect */)));
     net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
         "https", "example-redirect.test",
-        scoped_ptr<net::URLRequestInterceptor>(
+        std::unique_ptr<net::URLRequestInterceptor>(
             new MockHTTPSJobURLRequestInterceptor(true /* redirect */)));
   }
 
@@ -693,7 +692,7 @@
   std::vector<std::string> store_requested_authorities;
   net::CertificateList dummy_certs(1, scoped_refptr<net::X509Certificate>(
       new net::X509Certificate("test", "test", base::Time(), base::Time())));
-  scoped_ptr<ClientCertStoreStub> test_store(new ClientCertStoreStub(
+  std::unique_ptr<ClientCertStoreStub> test_store(new ClientCertStoreStub(
       dummy_certs, &store_request_count, &store_requested_authorities));
   resource_context_.SetClientCertStore(std::move(test_store));
 
@@ -805,8 +804,7 @@
   LoaderDestroyingCertStore* test_store =
       new LoaderDestroyingCertStore(&loader_,
                                     loader_destroyed_run_loop.QuitClosure());
-  resource_context_.SetClientCertStore(
-      make_scoped_ptr(test_store));
+  resource_context_.SetClientCertStore(base::WrapUnique(test_store));
 
   loader_->StartRequest();
   loader_destroyed_run_loop.Run();
@@ -881,8 +879,8 @@
     return redirect_to_file_resource_handler_;
   }
 
-  scoped_ptr<ResourceHandler> WrapResourceHandler(
-      scoped_ptr<ResourceHandlerStub> leaf_handler,
+  std::unique_ptr<ResourceHandler> WrapResourceHandler(
+      std::unique_ptr<ResourceHandlerStub> leaf_handler,
       net::URLRequest* request) override {
     leaf_handler->set_expect_reads(false);
 
@@ -894,7 +892,7 @@
     CHECK(file.IsValid());
 
     // Create mock file streams and a ShareableFileReference.
-    scoped_ptr<net::testing::MockFileStream> file_stream(
+    std::unique_ptr<net::testing::MockFileStream> file_stream(
         new net::testing::MockFileStream(std::move(file),
                                          base::ThreadTaskRunnerHandle::Get()));
     file_stream_ = file_stream.get();
@@ -905,7 +903,7 @@
             BrowserThread::FILE).get());
 
     // Inject them into the handler.
-    scoped_ptr<RedirectToFileResourceHandler> handler(
+    std::unique_ptr<RedirectToFileResourceHandler> handler(
         new RedirectToFileResourceHandler(std::move(leaf_handler), request));
     redirect_to_file_resource_handler_ = handler.get();
     handler->SetCreateTemporaryFileStreamFunctionForTesting(
@@ -916,9 +914,8 @@
   }
 
  private:
-  void PostCallback(
-      scoped_ptr<net::FileStream> file_stream,
-      const CreateTemporaryFileStreamCallback& callback) {
+  void PostCallback(std::unique_ptr<net::FileStream> file_stream,
+                    const CreateTemporaryFileStreamCallback& callback) {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE,
         base::Bind(callback, base::File::FILE_OK, base::Passed(&file_stream),
@@ -1081,7 +1078,7 @@
 // to it.
 TEST_F(HTTPSSecurityInfoResourceLoaderTest, SecurityInfoOnHTTPSResource) {
   // Start the request and wait for it to finish.
-  scoped_ptr<net::URLRequest> request(
+  std::unique_ptr<net::URLRequest> request(
       resource_context_.GetRequestContext()->CreateRequest(
           test_https_url(), net::DEFAULT_PRIORITY, nullptr /* delegate */));
   SetUpResourceLoader(std::move(request));
@@ -1119,7 +1116,7 @@
 TEST_F(HTTPSSecurityInfoResourceLoaderTest,
        SecurityInfoOnHTTPSRedirectResource) {
   // Start the request and wait for it to finish.
-  scoped_ptr<net::URLRequest> request(
+  std::unique_ptr<net::URLRequest> request(
       resource_context_.GetRequestContext()->CreateRequest(
           test_https_redirect_url(), net::DEFAULT_PRIORITY,
           nullptr /* delegate */));
diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h
index 9bac419..7047aa64 100644
--- a/content/browser/loader/resource_message_filter.h
+++ b/content/browser/loader/resource_message_filter.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_LOADER_RESOURCE_MESSAGE_FILTER_H_
 
+#include <memory>
+
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_message_filter.h"
diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h
index 625e58c..1e383504 100644
--- a/content/browser/loader/resource_request_info_impl.h
+++ b/content/browser/loader/resource_request_info_impl.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/supports_user_data.h"
 #include "content/public/browser/resource_request_info.h"
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index cda8a6c..ea4c6df 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -776,16 +776,17 @@
   DCHECK(client_map_.empty());
 }
 
-scoped_ptr<ResourceThrottle> ResourceScheduler::ScheduleRequest(
+std::unique_ptr<ResourceThrottle> ResourceScheduler::ScheduleRequest(
     int child_id,
     int route_id,
     bool is_async,
     net::URLRequest* url_request) {
   DCHECK(CalledOnValidThread());
   ClientId client_id = MakeClientId(child_id, route_id);
-  scoped_ptr<ScheduledResourceRequest> request(new ScheduledResourceRequest(
-      client_id, url_request, this,
-      RequestPriorityParams(url_request->priority(), 0), is_async));
+  std::unique_ptr<ScheduledResourceRequest> request(
+      new ScheduledResourceRequest(
+          client_id, url_request, this,
+          RequestPriorityParams(url_request->priority(), 0), is_async));
 
   ClientMap::iterator it = client_map_.find(client_id);
   if (it == client_map_.end()) {
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index 37971bcd..a2f114a1 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -9,11 +9,11 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <set>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "content/common/content_export.h"
 #include "net/base/priority_queue.h"
@@ -61,10 +61,11 @@
   // Requests that this ResourceScheduler schedule, and eventually loads, the
   // specified |url_request|. Caller should delete the returned ResourceThrottle
   // when the load completes or is canceled, before |url_request| is deleted.
-  scoped_ptr<ResourceThrottle> ScheduleRequest(int child_id,
-                                               int route_id,
-                                               bool is_async,
-                                               net::URLRequest* url_request);
+  std::unique_ptr<ResourceThrottle> ScheduleRequest(
+      int child_id,
+      int route_id,
+      bool is_async,
+      net::URLRequest* url_request);
 
   // Signals from the UI thread, posted as tasks on the IO thread:
 
diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc
index 12200b8..59b6d00 100644
--- a/content/browser/loader/resource_scheduler_unittest.cc
+++ b/content/browser/loader/resource_scheduler_unittest.cc
@@ -49,8 +49,8 @@
 
 class TestRequest : public ResourceController {
  public:
-  TestRequest(scoped_ptr<net::URLRequest> url_request,
-              scoped_ptr<ResourceThrottle> throttle,
+  TestRequest(std::unique_ptr<net::URLRequest> url_request,
+              std::unique_ptr<ResourceThrottle> throttle,
               ResourceScheduler* scheduler)
       : started_(false),
         url_request_(std::move(url_request)),
@@ -92,19 +92,19 @@
 
  private:
   bool started_;
-  scoped_ptr<net::URLRequest> url_request_;
-  scoped_ptr<ResourceThrottle> throttle_;
+  std::unique_ptr<net::URLRequest> url_request_;
+  std::unique_ptr<ResourceThrottle> throttle_;
   ResourceScheduler* scheduler_;
 };
 
 class CancelingTestRequest : public TestRequest {
  public:
-  CancelingTestRequest(scoped_ptr<net::URLRequest> url_request,
-                       scoped_ptr<ResourceThrottle> throttle,
+  CancelingTestRequest(std::unique_ptr<net::URLRequest> url_request,
+                       std::unique_ptr<ResourceThrottle> throttle,
                        ResourceScheduler* scheduler)
       : TestRequest(std::move(url_request), std::move(throttle), scheduler) {}
 
-  void set_request_to_cancel(scoped_ptr<TestRequest> request_to_cancel) {
+  void set_request_to_cancel(std::unique_ptr<TestRequest> request_to_cancel) {
     request_to_cancel_ = std::move(request_to_cancel);
   }
 
@@ -114,7 +114,7 @@
     request_to_cancel_.reset();
   }
 
-  scoped_ptr<TestRequest> request_to_cancel_;
+  std::unique_ptr<TestRequest> request_to_cancel_;
 };
 
 class FakeResourceContext : public ResourceContext {
@@ -165,18 +165,19 @@
         force_field_trial_argument, std::set<std::string>());
   }
 
-  scoped_ptr<net::URLRequest> NewURLRequestWithChildAndRoute(
+  std::unique_ptr<net::URLRequest> NewURLRequestWithChildAndRoute(
       const char* url,
       net::RequestPriority priority,
       int child_id,
       int route_id) {
-    scoped_ptr<net::URLRequest> url_request(
+    std::unique_ptr<net::URLRequest> url_request(
         context_.CreateRequest(GURL(url), priority, NULL));
     return url_request;
   }
 
-  scoped_ptr<net::URLRequest> NewURLRequest(const char* url,
-                                            net::RequestPriority priority) {
+  std::unique_ptr<net::URLRequest> NewURLRequest(
+      const char* url,
+      net::RequestPriority priority) {
     return NewURLRequestWithChildAndRoute(url, priority, kChildId, kRouteId);
   }
 
@@ -225,9 +226,9 @@
                                  int child_id,
                                  int route_id,
                                  bool is_async) {
-    scoped_ptr<net::URLRequest> url_request(
+    std::unique_ptr<net::URLRequest> url_request(
         NewURLRequestWithChildAndRoute(url, priority, child_id, route_id));
-    scoped_ptr<ResourceThrottle> throttle(scheduler_->ScheduleRequest(
+    std::unique_ptr<ResourceThrottle> throttle(scheduler_->ScheduleRequest(
         child_id, route_id, is_async, url_request.get()));
     TestRequest* request = new TestRequest(std::move(url_request),
                                            std::move(throttle), scheduler());
@@ -254,7 +255,7 @@
   BrowserThreadImpl ui_thread_;
   BrowserThreadImpl io_thread_;
   ResourceDispatcherHostImpl rdh_;
-  scoped_ptr<ResourceScheduler> scheduler_;
+  std::unique_ptr<ResourceScheduler> scheduler_;
   base::FieldTrialList field_trial_list_;
   base::MockTimer* mock_timer_;
   net::HttpServerPropertiesImpl http_server_properties_;
@@ -262,14 +263,16 @@
 };
 
 TEST_F(ResourceSchedulerTest, OneIsolatedLowRequest) {
-  scoped_ptr<TestRequest> request(NewRequest("http://host/1", net::LOWEST));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/1", net::LOWEST));
   EXPECT_TRUE(request->started());
 }
 
 TEST_F(ResourceSchedulerTest, OneLowLoadsUntilIdle) {
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(low->started());
   EXPECT_FALSE(low2->started());
@@ -280,9 +283,10 @@
 }
 
 TEST_F(ResourceSchedulerTest, OneLowLoadsUntilBodyInserted) {
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(low->started());
   EXPECT_FALSE(low2->started());
@@ -299,9 +303,10 @@
 }
 
 TEST_F(ResourceSchedulerTest, OneLowLoadsUntilCriticalComplete) {
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(low->started());
   EXPECT_FALSE(low2->started());
@@ -316,9 +321,10 @@
 }
 
 TEST_F(ResourceSchedulerTest, LowDoesNotBlockCriticalComplete) {
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOW));
-  scoped_ptr<TestRequest> lowest(NewRequest("http://host/lowest", net::LOWEST));
-  scoped_ptr<TestRequest> lowest2(
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOW));
+  std::unique_ptr<TestRequest> lowest(
+      NewRequest("http://host/lowest", net::LOWEST));
+  std::unique_ptr<TestRequest> lowest2(
       NewRequest("http://host/lowest", net::LOWEST));
   EXPECT_TRUE(low->started());
   EXPECT_TRUE(lowest->started());
@@ -332,11 +338,12 @@
 TEST_F(ResourceSchedulerTest, OneLowLoadsUntilBodyInsertedExceptSpdy) {
   http_server_properties_.SetSupportsSpdy(
       net::HostPortPair("spdyhost", 443), true);
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low_spdy(
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low_spdy(
       NewRequest("https://spdyhost/low", net::LOWEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(low_spdy->started());
   EXPECT_TRUE(low->started());
@@ -351,9 +358,10 @@
 TEST_F(ResourceSchedulerTest, NavigationResetsState) {
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
   scheduler()->OnNavigate(kChildId, kRouteId);
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(low->started());
   EXPECT_FALSE(low2->started());
@@ -361,16 +369,18 @@
 
 TEST_F(ResourceSchedulerTest, BackgroundRequestStartsImmediately) {
   const int route_id = 0;  // Indicates a background request.
-  scoped_ptr<TestRequest> request(NewRequestWithRoute("http://host/1",
-                                                      net::LOWEST, route_id));
+  std::unique_ptr<TestRequest> request(
+      NewRequestWithRoute("http://host/1", net::LOWEST, route_id));
   EXPECT_TRUE(request->started());
 }
 
 TEST_F(ResourceSchedulerTest, StartMultipleLowRequestsWhenIdle) {
-  scoped_ptr<TestRequest> high1(NewRequest("http://host/high1", net::HIGHEST));
-  scoped_ptr<TestRequest> high2(NewRequest("http://host/high2", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high1(
+      NewRequest("http://host/high1", net::HIGHEST));
+  std::unique_ptr<TestRequest> high2(
+      NewRequest("http://host/high2", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high1->started());
   EXPECT_TRUE(high2->started());
   EXPECT_TRUE(low->started());
@@ -386,20 +396,24 @@
 }
 
 TEST_F(ResourceSchedulerTest, CancelOtherRequestsWhileResuming) {
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low1(NewRequest("http://host/low1", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low1(
+      NewRequest("http://host/low1", net::LOWEST));
 
-  scoped_ptr<net::URLRequest> url_request(
+  std::unique_ptr<net::URLRequest> url_request(
       NewURLRequest("http://host/low2", net::LOWEST));
-  scoped_ptr<ResourceThrottle> throttle(scheduler()->ScheduleRequest(
+  std::unique_ptr<ResourceThrottle> throttle(scheduler()->ScheduleRequest(
       kChildId, kRouteId, true, url_request.get()));
-  scoped_ptr<CancelingTestRequest> low2(new CancelingTestRequest(
+  std::unique_ptr<CancelingTestRequest> low2(new CancelingTestRequest(
       std::move(url_request), std::move(throttle), scheduler()));
   low2->Start();
 
-  scoped_ptr<TestRequest> low3(NewRequest("http://host/low3", net::LOWEST));
+  std::unique_ptr<TestRequest> low3(
+      NewRequest("http://host/low3", net::LOWEST));
   low2->set_request_to_cancel(std::move(low3));
-  scoped_ptr<TestRequest> low4(NewRequest("http://host/low4", net::LOWEST));
+  std::unique_ptr<TestRequest> low4(
+      NewRequest("http://host/low4", net::LOWEST));
 
   EXPECT_TRUE(high->started());
   EXPECT_FALSE(low2->started());
@@ -416,7 +430,8 @@
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
 
   // Throw in one high priority request to make sure that's not a factor.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
   EXPECT_TRUE(high->started());
 
   const int kMaxNumDelayableRequestsPerClient = 10;  // Should match the .cc.
@@ -429,10 +444,10 @@
     EXPECT_TRUE(lows_singlehost[i]->started());
   }
 
-  scoped_ptr<TestRequest> second_last_singlehost(NewRequest("http://host/last",
-                                                            net::LOWEST));
-  scoped_ptr<TestRequest> last_singlehost(NewRequest("http://host/s_last",
-                                                     net::LOWEST));
+  std::unique_ptr<TestRequest> second_last_singlehost(
+      NewRequest("http://host/last", net::LOWEST));
+  std::unique_ptr<TestRequest> last_singlehost(
+      NewRequest("http://host/s_last", net::LOWEST));
 
   EXPECT_FALSE(second_last_singlehost->started());
 
@@ -457,17 +472,19 @@
     EXPECT_TRUE(lows_different_host[i]->started());
   }
 
-  scoped_ptr<TestRequest> last_different_host(NewRequest("http://host_new/last",
-                                                         net::LOWEST));
+  std::unique_ptr<TestRequest> last_different_host(
+      NewRequest("http://host_new/last", net::LOWEST));
   EXPECT_FALSE(last_different_host->started());
 }
 
 TEST_F(ResourceSchedulerTest, RaisePriorityAndStart) {
   // Dummies to enforce scheduling.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/req", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/req", net::LOWEST));
 
-  scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::LOWEST));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/req", net::LOWEST));
   EXPECT_FALSE(request->started());
 
   ChangeRequestPriority(request.get(), net::HIGHEST);
@@ -477,11 +494,13 @@
 
 TEST_F(ResourceSchedulerTest, RaisePriorityInQueue) {
   // Dummies to enforce scheduling.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
 
-  scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::IDLE));
-  scoped_ptr<TestRequest> idle(NewRequest("http://host/idle", net::IDLE));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/req", net::IDLE));
+  std::unique_ptr<TestRequest> idle(NewRequest("http://host/idle", net::IDLE));
   EXPECT_FALSE(request->started());
   EXPECT_FALSE(idle->started());
 
@@ -507,11 +526,13 @@
 
 TEST_F(ResourceSchedulerTest, LowerPriority) {
   // Dummies to enforce scheduling.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
 
-  scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::LOWEST));
-  scoped_ptr<TestRequest> idle(NewRequest("http://host/idle", net::IDLE));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/req", net::LOWEST));
+  std::unique_ptr<TestRequest> idle(NewRequest("http://host/idle", net::IDLE));
   EXPECT_FALSE(request->started());
   EXPECT_FALSE(idle->started());
 
@@ -540,11 +561,13 @@
 
 TEST_F(ResourceSchedulerTest, ReprioritizedRequestGoesToBackOfQueue) {
   // Dummies to enforce scheduling.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
 
-  scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::LOWEST));
-  scoped_ptr<TestRequest> idle(NewRequest("http://host/idle", net::IDLE));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/req", net::LOWEST));
+  std::unique_ptr<TestRequest> idle(NewRequest("http://host/idle", net::IDLE));
   EXPECT_FALSE(request->started());
   EXPECT_FALSE(idle->started());
 
@@ -573,8 +596,9 @@
 
 TEST_F(ResourceSchedulerTest, HigherIntraPriorityGoesToFrontOfQueue) {
   // Dummies to enforce scheduling.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
 
   const int kMaxNumDelayableRequestsPerClient = 10;  // Should match the .cc.
   ScopedVector<TestRequest> lows;
@@ -583,7 +607,8 @@
     lows.push_back(NewRequest(url.c_str(), net::IDLE));
   }
 
-  scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::IDLE));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/req", net::IDLE));
   EXPECT_FALSE(request->started());
 
   ChangeRequestPriority(request.get(), net::IDLE, 1);
@@ -598,26 +623,30 @@
 
 TEST_F(ResourceSchedulerTest, NonHTTPSchedulesImmediately) {
   // Dummies to enforce scheduling.
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
 
-  scoped_ptr<TestRequest> request(
+  std::unique_ptr<TestRequest> request(
       NewRequest("chrome-extension://req", net::LOWEST));
   EXPECT_TRUE(request->started());
 }
 
 TEST_F(ResourceSchedulerTest, SpdyProxySchedulesImmediately) {
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
 
-  scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::IDLE));
+  std::unique_ptr<TestRequest> request(
+      NewRequest("http://host/req", net::IDLE));
   EXPECT_FALSE(request->started());
 
   scheduler()->OnReceivedSpdyProxiedHttpResponse(kChildId, kRouteId);
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(request->started());
 
-  scoped_ptr<TestRequest> after(NewRequest("http://host/after", net::IDLE));
+  std::unique_ptr<TestRequest> after(
+      NewRequest("http://host/after", net::IDLE));
   EXPECT_TRUE(after->started());
 }
 
@@ -625,7 +654,7 @@
   scheduler()->OnWillInsertBody(kChildId, kRouteId);
   const int kMaxNumDelayableRequestsPerClient = 10;  // Should match the .cc.
 
-  scoped_ptr<TestRequest> low1_spdy(
+  std::unique_ptr<TestRequest> low1_spdy(
       NewRequest("http://spdyhost1:8080/low", net::LOWEST));
   // Cancel a request after we learn the server supports SPDY.
   ScopedVector<TestRequest> lows;
@@ -633,7 +662,7 @@
     string url = "http://host" + base::IntToString(i) + "/low";
     lows.push_back(NewRequest(url.c_str(), net::LOWEST));
   }
-  scoped_ptr<TestRequest> low1(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low1(NewRequest("http://host/low", net::LOWEST));
   EXPECT_FALSE(low1->started());
   http_server_properties_.SetSupportsSpdy(
       net::HostPortPair("spdyhost1", 8080), true);
@@ -643,7 +672,7 @@
 
   low1.reset();
   base::RunLoop().RunUntilIdle();
-  scoped_ptr<TestRequest> low2_spdy(
+  std::unique_ptr<TestRequest> low2_spdy(
       NewRequest("http://spdyhost2:8080/low", net::IDLE));
   // Reprioritize a request after we learn the server supports SPDY.
   EXPECT_TRUE(low2_spdy->started());
@@ -651,7 +680,7 @@
       net::HostPortPair("spdyhost2", 8080), true);
   ChangeRequestPriority(low2_spdy.get(), net::LOWEST);
   base::RunLoop().RunUntilIdle();
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(low2->started());
 }
 
@@ -710,9 +739,10 @@
                          kRequestLimit)));
 
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_FALSE(low->started());
   EXPECT_FALSE(low2->started());
@@ -728,11 +758,11 @@
 // async revalidations to the same URL from being issued.
 TEST_F(ResourceSchedulerTest, RequestStartedAfterClientDeleted) {
   scheduler_->OnClientCreated(kChildId2, kRouteId2);
-  scoped_ptr<TestRequest> high(NewRequestWithChildAndRoute(
+  std::unique_ptr<TestRequest> high(NewRequestWithChildAndRoute(
       "http://host/high", net::HIGHEST, kChildId2, kRouteId2));
-  scoped_ptr<TestRequest> lowest1(NewRequestWithChildAndRoute(
+  std::unique_ptr<TestRequest> lowest1(NewRequestWithChildAndRoute(
       "http://host/lowest", net::LOWEST, kChildId2, kRouteId2));
-  scoped_ptr<TestRequest> lowest2(NewRequestWithChildAndRoute(
+  std::unique_ptr<TestRequest> lowest2(NewRequestWithChildAndRoute(
       "http://host/lowest", net::LOWEST, kChildId2, kRouteId2));
   EXPECT_FALSE(lowest2->started());
 
@@ -749,7 +779,7 @@
 // even if they were not started by the destructor.
 TEST_F(ResourceSchedulerTest, RequestStartedAfterClientDeletedManyDelayable) {
   scheduler_->OnClientCreated(kChildId2, kRouteId2);
-  scoped_ptr<TestRequest> high(NewRequestWithChildAndRoute(
+  std::unique_ptr<TestRequest> high(NewRequestWithChildAndRoute(
       "http://host/high", net::HIGHEST, kChildId2, kRouteId2));
   const int kMaxNumDelayableRequestsPerClient = 10;
   ScopedVector<TestRequest> delayable_requests;
@@ -757,7 +787,7 @@
     delayable_requests.push_back(NewRequestWithChildAndRoute(
         "http://host/lowest", net::LOWEST, kChildId2, kRouteId2));
   }
-  scoped_ptr<TestRequest> lowest(NewRequestWithChildAndRoute(
+  std::unique_ptr<TestRequest> lowest(NewRequestWithChildAndRoute(
       "http://host/lowest", net::LOWEST, kChildId2, kRouteId2));
   EXPECT_FALSE(lowest->started());
 
@@ -788,18 +818,19 @@
       kMaxNumDelayableWhileLayoutBlocking,
       kMaxNumDelayableRequestsPerClient)));
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(
+  std::unique_ptr<TestRequest> high(
       NewRequest("http://hosthigh/high", net::HIGHEST));
-  scoped_ptr<TestRequest> high2(
+  std::unique_ptr<TestRequest> high2(
       NewRequest("http://hosthigh/high", net::HIGHEST));
-  scoped_ptr<TestRequest> medium(
+  std::unique_ptr<TestRequest> medium(
       NewRequest("http://hostmedium/medium", net::MEDIUM));
-  scoped_ptr<TestRequest> medium2(
+  std::unique_ptr<TestRequest> medium2(
       NewRequest("http://hostmedium/medium", net::MEDIUM));
-  scoped_ptr<TestRequest> low(NewRequest("http://hostlow/low", net::LOW));
-  scoped_ptr<TestRequest> low2(NewRequest("http://hostlow/low", net::LOW));
-  scoped_ptr<TestRequest> lowest(NewRequest("http://hostlowest/lowest", net::LOWEST));
-  scoped_ptr<TestRequest> lowest2(
+  std::unique_ptr<TestRequest> low(NewRequest("http://hostlow/low", net::LOW));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://hostlow/low", net::LOW));
+  std::unique_ptr<TestRequest> lowest(
+      NewRequest("http://hostlowest/lowest", net::LOWEST));
+  std::unique_ptr<TestRequest> lowest2(
       NewRequest("http://hostlowest/lowest", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(high2->started());
@@ -837,18 +868,19 @@
       kMaxNumDelayableWhileLayoutBlocking,
       kMaxNumDelayableRequestsPerClient)));
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(
+  std::unique_ptr<TestRequest> high(
       NewRequest("http://hosthigh/high", net::HIGHEST));
-  scoped_ptr<TestRequest> high2(
+  std::unique_ptr<TestRequest> high2(
       NewRequest("http://hosthigh/high", net::HIGHEST));
-  scoped_ptr<TestRequest> medium(
+  std::unique_ptr<TestRequest> medium(
       NewRequest("http://hostmedium/medium", net::MEDIUM));
-  scoped_ptr<TestRequest> medium2(
+  std::unique_ptr<TestRequest> medium2(
       NewRequest("http://hostmedium/medium", net::MEDIUM));
-  scoped_ptr<TestRequest> low(NewRequest("http://hostlow/low", net::LOW));
-  scoped_ptr<TestRequest> low2(NewRequest("http://hostlow/low", net::LOW));
-  scoped_ptr<TestRequest> lowest(NewRequest("http://hostlowest/lowest", net::LOWEST));
-  scoped_ptr<TestRequest> lowest2(
+  std::unique_ptr<TestRequest> low(NewRequest("http://hostlow/low", net::LOW));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://hostlow/low", net::LOW));
+  std::unique_ptr<TestRequest> lowest(
+      NewRequest("http://hostlowest/lowest", net::LOWEST));
+  std::unique_ptr<TestRequest> lowest2(
       NewRequest("http://hostlowest/lowest", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(high2->started());
@@ -897,10 +929,12 @@
       kMaxNumDelayableWhileLayoutBlocking,
       kMaxNumDelayableRequestsPerClient)));
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> high2(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> high2(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(high2->started());
   EXPECT_FALSE(low->started());
@@ -942,11 +976,14 @@
       kMaxNumDelayableWhileLayoutBlocking,
       kMaxNumDelayableRequestsPerClient)));
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> high2(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> high3(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> high2(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> high3(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(high2->started());
   EXPECT_TRUE(high3->started());
@@ -990,10 +1027,11 @@
       kMaxNumDelayableWhileLayoutBlocking,
       kMaxNumDelayableRequestsPerClient)));
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low3(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low3(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(low->started());
   EXPECT_TRUE(low2->started());
@@ -1029,11 +1067,13 @@
       kMaxNumDelayableWhileLayoutBlocking,
       kMaxNumDelayableRequestsPerClient)));
   InitializeScheduler();
-  scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> high2(NewRequest("http://host/high", net::HIGHEST));
-  scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
-  scoped_ptr<TestRequest> low3(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> high(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> high2(
+      NewRequest("http://host/high", net::HIGHEST));
+  std::unique_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low2(NewRequest("http://host/low", net::LOWEST));
+  std::unique_ptr<TestRequest> low3(NewRequest("http://host/low", net::LOWEST));
   EXPECT_TRUE(high->started());
   EXPECT_TRUE(high2->started());
   EXPECT_FALSE(low->started());
@@ -1086,8 +1126,8 @@
     EXPECT_TRUE(lows_different_host[i]->started());
   }
 
-  scoped_ptr<TestRequest> last_different_host(NewRequest("http://host_new/last",
-                                                        net::LOWEST));
+  std::unique_ptr<TestRequest> last_different_host(
+      NewRequest("http://host_new/last", net::LOWEST));
   EXPECT_FALSE(last_different_host->started());
 }
 
@@ -1127,8 +1167,8 @@
     EXPECT_TRUE(lows_different_host[i]->started());
   }
 
-  scoped_ptr<TestRequest> last_different_host(NewRequest("http://host_new/last",
-                                                         net::LOWEST));
+  std::unique_ptr<TestRequest> last_different_host(
+      NewRequest("http://host_new/last", net::LOWEST));
   EXPECT_FALSE(last_different_host->started());
 }
 
diff --git a/content/browser/loader/stream_resource_handler.h b/content/browser/loader/stream_resource_handler.h
index 6bc4253..42c71e8f 100644
--- a/content/browser/loader/stream_resource_handler.h
+++ b/content/browser/loader/stream_resource_handler.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/loader/resource_handler.h"
 #include "content/browser/loader/stream_writer.h"
 
diff --git a/content/browser/loader/temporary_file_stream.cc b/content/browser/loader/temporary_file_stream.cc
index c8bb3338..bff6ed4 100644
--- a/content/browser/loader/temporary_file_stream.cc
+++ b/content/browser/loader/temporary_file_stream.cc
@@ -20,15 +20,14 @@
 
 namespace {
 
-void DidCreateTemporaryFile(
-    const CreateTemporaryFileStreamCallback& callback,
-    scoped_ptr<base::FileProxy> file_proxy,
-    base::File::Error error_code,
-    const base::FilePath& file_path) {
+void DidCreateTemporaryFile(const CreateTemporaryFileStreamCallback& callback,
+                            std::unique_ptr<base::FileProxy> file_proxy,
+                            base::File::Error error_code,
+                            const base::FilePath& file_path) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   if (!file_proxy->IsValid()) {
-    callback.Run(error_code, scoped_ptr<net::FileStream>(), NULL);
+    callback.Run(error_code, std::unique_ptr<net::FileStream>(), NULL);
     return;
   }
 
@@ -42,7 +41,7 @@
           ShareableFileReference::DELETE_ON_FINAL_RELEASE,
           task_runner.get());
 
-  scoped_ptr<net::FileStream> file_stream(
+  std::unique_ptr<net::FileStream> file_stream(
       new net::FileStream(file_proxy->TakeFile(), task_runner));
 
   callback.Run(error_code, std::move(file_stream), deletable_file.get());
@@ -54,7 +53,7 @@
     const CreateTemporaryFileStreamCallback& callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
-  scoped_ptr<base::FileProxy> file_proxy(new base::FileProxy(
+  std::unique_ptr<base::FileProxy> file_proxy(new base::FileProxy(
       BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get()));
   base::FileProxy* proxy = file_proxy.get();
   proxy->CreateTemporary(
diff --git a/content/browser/loader/temporary_file_stream.h b/content/browser/loader/temporary_file_stream.h
index 2803596..406fcc4 100644
--- a/content/browser/loader/temporary_file_stream.h
+++ b/content/browser/loader/temporary_file_stream.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_
 #define CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_
 
+#include <memory>
+
 #include "base/callback_forward.h"
 #include "base/files/file.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
 namespace net {
@@ -21,7 +22,7 @@
 namespace content {
 
 typedef base::Callback<void(base::File::Error,
-                            scoped_ptr<net::FileStream>,
+                            std::unique_ptr<net::FileStream>,
                             storage::ShareableFileReference*)>
     CreateTemporaryFileStreamCallback;
 
diff --git a/content/browser/loader/temporary_file_stream_unittest.cc b/content/browser/loader/temporary_file_stream_unittest.cc
index a5fe145..d492254e 100644
--- a/content/browser/loader/temporary_file_stream_unittest.cc
+++ b/content/browser/loader/temporary_file_stream_unittest.cc
@@ -39,7 +39,7 @@
   }
 
   void OnFileStreamCreated(base::File::Error error,
-                           scoped_ptr<net::FileStream> file_stream,
+                           std::unique_ptr<net::FileStream> file_stream,
                            ShareableFileReference* deletable_file) {
     error_ = error;
     file_stream_ = std::move(file_stream);
@@ -58,7 +58,7 @@
  private:
   base::RunLoop loop_;
   base::File::Error error_;
-  scoped_ptr<net::FileStream> file_stream_;
+  std::unique_ptr<net::FileStream> file_stream_;
   scoped_refptr<ShareableFileReference> deletable_file_;
 };
 
diff --git a/content/browser/loader/throttling_resource_handler.cc b/content/browser/loader/throttling_resource_handler.cc
index 93b9ad7..99d84e6 100644
--- a/content/browser/loader/throttling_resource_handler.cc
+++ b/content/browser/loader/throttling_resource_handler.cc
@@ -14,7 +14,7 @@
 namespace content {
 
 ThrottlingResourceHandler::ThrottlingResourceHandler(
-    scoped_ptr<ResourceHandler> next_handler,
+    std::unique_ptr<ResourceHandler> next_handler,
     net::URLRequest* request,
     ScopedVector<ResourceThrottle> throttles)
     : LayeredResourceHandler(request, std::move(next_handler)),
diff --git a/content/browser/loader/throttling_resource_handler.h b/content/browser/loader/throttling_resource_handler.h
index 6abefc4..32cc6fa 100644
--- a/content/browser/loader/throttling_resource_handler.h
+++ b/content/browser/loader/throttling_resource_handler.h
@@ -28,7 +28,7 @@
                                   public ResourceController {
  public:
   // Takes ownership of the ResourceThrottle instances.
-  ThrottlingResourceHandler(scoped_ptr<ResourceHandler> next_handler,
+  ThrottlingResourceHandler(std::unique_ptr<ResourceHandler> next_handler,
                             net::URLRequest* request,
                             ScopedVector<ResourceThrottle> throttles);
   ~ThrottlingResourceHandler() override;
diff --git a/content/browser/loader/upload_data_stream_builder.cc b/content/browser/loader/upload_data_stream_builder.cc
index bcabe99..f6d614a 100644
--- a/content/browser/loader/upload_data_stream_builder.cc
+++ b/content/browser/loader/upload_data_stream_builder.cc
@@ -12,6 +12,7 @@
 
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
 #include "content/browser/fileapi/upload_file_system_file_element_reader.h"
 #include "content/common/resource_request_body.h"
@@ -75,20 +76,20 @@
 
 }  // namespace
 
-scoped_ptr<net::UploadDataStream> UploadDataStreamBuilder::Build(
+std::unique_ptr<net::UploadDataStream> UploadDataStreamBuilder::Build(
     ResourceRequestBody* body,
     storage::BlobStorageContext* blob_context,
     storage::FileSystemContext* file_system_context,
     base::SingleThreadTaskRunner* file_task_runner) {
-  std::vector<scoped_ptr<net::UploadElementReader>> element_readers;
+  std::vector<std::unique_ptr<net::UploadElementReader>> element_readers;
   for (const auto& element : *body->elements()) {
     switch (element.type()) {
       case ResourceRequestBody::Element::TYPE_BYTES:
         element_readers.push_back(
-            make_scoped_ptr(new BytesElementReader(body, element)));
+            base::WrapUnique(new BytesElementReader(body, element)));
         break;
       case ResourceRequestBody::Element::TYPE_FILE:
-        element_readers.push_back(make_scoped_ptr(
+        element_readers.push_back(base::WrapUnique(
             new FileElementReader(body, file_task_runner, element)));
         break;
       case ResourceRequestBody::Element::TYPE_FILE_FILESYSTEM:
@@ -96,17 +97,17 @@
         // supplied a FileSystemContext.
         DCHECK(file_system_context);
         element_readers.push_back(
-            make_scoped_ptr(new content::UploadFileSystemFileElementReader(
+            base::WrapUnique(new content::UploadFileSystemFileElementReader(
                 file_system_context, element.filesystem_url(), element.offset(),
                 element.length(), element.expected_modification_time())));
         break;
       case ResourceRequestBody::Element::TYPE_BLOB: {
         DCHECK_EQ(std::numeric_limits<uint64_t>::max(), element.length());
         DCHECK_EQ(0ul, element.offset());
-        scoped_ptr<storage::BlobDataHandle> handle =
+        std::unique_ptr<storage::BlobDataHandle> handle =
             blob_context->GetBlobDataFromUUID(element.blob_uuid());
         element_readers.push_back(
-            make_scoped_ptr(new storage::UploadBlobElementReader(
+            base::WrapUnique(new storage::UploadBlobElementReader(
                 std::move(handle), file_system_context, file_task_runner)));
         break;
       }
@@ -118,7 +119,7 @@
     }
   }
 
-  return make_scoped_ptr(new net::ElementsUploadDataStream(
+  return base::WrapUnique(new net::ElementsUploadDataStream(
       std::move(element_readers), body->identifier()));
 }
 
diff --git a/content/browser/loader/upload_data_stream_builder.h b/content/browser/loader/upload_data_stream_builder.h
index abbcae82..fae5f3a 100644
--- a/content/browser/loader/upload_data_stream_builder.h
+++ b/content/browser/loader/upload_data_stream_builder.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
 #define CONTENT_BROWSER_LOADER_UPLOAD_DATA_STREAM_BUILDER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/common/content_export.h"
 
 namespace base {
@@ -40,7 +41,7 @@
   // |file_system_context| is used to create a FileStreamReader for files with
   // filesystem URLs.  |file_task_runner| is used to perform file operations
   // when the data gets uploaded.
-  static scoped_ptr<net::UploadDataStream> Build(
+  static std::unique_ptr<net::UploadDataStream> Build(
       ResourceRequestBody* body,
       storage::BlobStorageContext* blob_context,
       storage::FileSystemContext* file_system_context,
diff --git a/content/browser/loader/upload_data_stream_builder_unittest.cc b/content/browser/loader/upload_data_stream_builder_unittest.cc
index fc92cc1..6db17f6 100644
--- a/content/browser/loader/upload_data_stream_builder_unittest.cc
+++ b/content/browser/loader/upload_data_stream_builder_unittest.cc
@@ -52,7 +52,7 @@
     BlobStorageContext context;
     BlobDataBuilder builder(kBlob);
     builder.AppendData(kBlobData);
-    scoped_ptr<BlobDataHandle> handle = context.AddFinishedBlob(&builder);
+    std::unique_ptr<BlobDataHandle> handle = context.AddFinishedBlob(&builder);
 
     request_body->AppendBytes(kData, arraysize(kData) - 1);
     request_body->AppendFileRange(base::FilePath(kFilePath), kFileOffset,
@@ -60,9 +60,10 @@
     request_body->AppendBlob(kBlob);
     request_body->set_identifier(kIdentifier);
 
-    scoped_ptr<net::UploadDataStream> upload(UploadDataStreamBuilder::Build(
-        request_body.get(), &context, NULL,
-        base::ThreadTaskRunnerHandle::Get().get()));
+    std::unique_ptr<net::UploadDataStream> upload(
+        UploadDataStreamBuilder::Build(
+            request_body.get(), &context, NULL,
+            base::ThreadTaskRunnerHandle::Get().get()));
 
     EXPECT_EQ(kIdentifier, upload->identifier());
     ASSERT_TRUE(upload->GetElementReaders());
@@ -108,15 +109,17 @@
 
     // A blob created from an empty file added several times.
     const std::string blob_id("id-0");
-    scoped_ptr<BlobDataBuilder> blob_data_builder(new BlobDataBuilder(blob_id));
+    std::unique_ptr<BlobDataBuilder> blob_data_builder(
+        new BlobDataBuilder(blob_id));
     blob_data_builder->AppendFile(test_blob_path, 0, kZeroLength, blob_time);
-    scoped_ptr<BlobDataHandle> handle =
+    std::unique_ptr<BlobDataHandle> handle =
         blob_storage_context.AddFinishedBlob(blob_data_builder.get());
 
     scoped_refptr<ResourceRequestBody> request_body(new ResourceRequestBody());
-    scoped_ptr<net::UploadDataStream> upload(UploadDataStreamBuilder::Build(
-        request_body.get(), &blob_storage_context, NULL,
-        base::ThreadTaskRunnerHandle::Get().get()));
+    std::unique_ptr<net::UploadDataStream> upload(
+        UploadDataStreamBuilder::Build(
+            request_body.get(), &blob_storage_context, NULL,
+            base::ThreadTaskRunnerHandle::Get().get()));
 
     request_body = new ResourceRequestBody();
     request_body->AppendBlob(blob_id);
@@ -139,7 +142,7 @@
     // Purposely (try to) read more than what is in the stream. If we try to
     // read zero bytes then UploadDataStream::Read will fail a DCHECK.
     int kBufferLength = kZeroLength + 1;
-    scoped_ptr<char[]> buffer(new char[kBufferLength]);
+    std::unique_ptr<char[]> buffer(new char[kBufferLength]);
     scoped_refptr<net::IOBuffer> io_buffer =
         new net::WrappedIOBuffer(buffer.get());
     net::TestCompletionCallback read_callback;
@@ -166,14 +169,15 @@
     BlobStorageContext blob_storage_context;
     BlobDataBuilder builder(kBlob);
     builder.AppendData(kBlobData);
-    scoped_ptr<BlobDataHandle> handle =
+    std::unique_ptr<BlobDataHandle> handle =
         blob_storage_context.AddFinishedBlob(&builder);
     request_body->AppendBlob(kBlob);
     request_body->set_identifier(kIdentifier);
 
-    scoped_ptr<net::UploadDataStream> upload(UploadDataStreamBuilder::Build(
-        request_body.get(), &blob_storage_context, nullptr,
-        base::ThreadTaskRunnerHandle::Get().get()));
+    std::unique_ptr<net::UploadDataStream> upload(
+        UploadDataStreamBuilder::Build(
+            request_body.get(), &blob_storage_context, nullptr,
+            base::ThreadTaskRunnerHandle::Get().get()));
 
     net::TestCompletionCallback init_callback;
     ASSERT_EQ(net::OK, upload->Init(init_callback.callback()));
diff --git a/content/browser/media/android/browser_demuxer_android.cc b/content/browser/media/android/browser_demuxer_android.cc
index 9da7170..ed56bf7 100644
--- a/content/browser/media/android/browser_demuxer_android.cc
+++ b/content/browser/media/android/browser_demuxer_android.cc
@@ -97,9 +97,9 @@
   return handled;
 }
 
-scoped_ptr<media::DemuxerAndroid> BrowserDemuxerAndroid::CreateDemuxer(
+std::unique_ptr<media::DemuxerAndroid> BrowserDemuxerAndroid::CreateDemuxer(
     int demuxer_client_id) {
-  return scoped_ptr<media::DemuxerAndroid>(
+  return std::unique_ptr<media::DemuxerAndroid>(
       new Internal(this, demuxer_client_id));
 }
 
diff --git a/content/browser/media/android/browser_demuxer_android.h b/content/browser/media/android/browser_demuxer_android.h
index f1b28d3..5ff37f0a 100644
--- a/content/browser/media/android/browser_demuxer_android.h
+++ b/content/browser/media/android/browser_demuxer_android.h
@@ -32,7 +32,7 @@
   // Returns an uninitialized demuxer implementation associated with
   // |demuxer_client_id|, which can be used to communicate with the real demuxer
   // in the renderer process.
-  scoped_ptr<media::DemuxerAndroid> CreateDemuxer(int demuxer_client_id);
+  std::unique_ptr<media::DemuxerAndroid> CreateDemuxer(int demuxer_client_id);
 
  protected:
   friend class base::RefCountedThreadSafe<BrowserDemuxerAndroid>;
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc
index e57b55a..96f6fcde 100644
--- a/content/browser/media/android/browser_media_player_manager.cc
+++ b/content/browser/media/android/browser_media_player_manager.cc
@@ -638,8 +638,9 @@
     fullscreen_player_is_released_ = true;
 }
 
-scoped_ptr<media::MediaPlayerAndroid> BrowserMediaPlayerManager::SwapPlayer(
-      int player_id, media::MediaPlayerAndroid* player) {
+std::unique_ptr<media::MediaPlayerAndroid>
+BrowserMediaPlayerManager::SwapPlayer(int player_id,
+                                      media::MediaPlayerAndroid* player) {
   media::MediaPlayerAndroid* previous_player = NULL;
   for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin();
       it != players_.end(); ++it) {
@@ -656,7 +657,7 @@
       break;
     }
   }
-  return scoped_ptr<media::MediaPlayerAndroid>(previous_player);
+  return std::unique_ptr<media::MediaPlayerAndroid>(previous_player);
 }
 
 bool BrowserMediaPlayerManager::RequestDecoderResources(
diff --git a/content/browser/media/android/browser_media_player_manager.h b/content/browser/media/android/browser_media_player_manager.h
index 9fcac9b..8bacb71b 100644
--- a/content/browser/media/android/browser_media_player_manager.h
+++ b/content/browser/media/android/browser_media_player_manager.h
@@ -6,10 +6,10 @@
 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
 
 #include <map>
+#include <memory>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/time/time.h"
 #include "content/browser/android/content_video_view.h"
@@ -148,7 +148,7 @@
   // Replaces a player with the specified id with a given MediaPlayerAndroid
   // object. This will also return the original MediaPlayerAndroid object that
   // was replaced.
-  scoped_ptr<media::MediaPlayerAndroid> SwapPlayer(
+  std::unique_ptr<media::MediaPlayerAndroid> SwapPlayer(
       int player_id,
       media::MediaPlayerAndroid* player);
 
@@ -208,10 +208,11 @@
 
   // The fullscreen video view object or NULL if video is not played in
   // fullscreen.
-  scoped_ptr<ContentVideoView> video_view_;
+  std::unique_ptr<ContentVideoView> video_view_;
 
 #if defined(VIDEO_HOLE)
-  scoped_ptr<ExternalVideoSurfaceContainer> external_video_surface_container_;
+  std::unique_ptr<ExternalVideoSurfaceContainer>
+      external_video_surface_container_;
 #endif
 
   // Player ID of the fullscreen media player.
@@ -223,7 +224,7 @@
   WebContents* const web_contents_;
 
   // Object for retrieving resources media players.
-  scoped_ptr<media::MediaResourceGetter> media_resource_getter_;
+  std::unique_ptr<media::MediaResourceGetter> media_resource_getter_;
 
   // Map of player IDs to delegate IDs for use with
   // MediaWebContentsObserverAndroid.
diff --git a/content/browser/media/android/browser_surface_view_manager.h b/content/browser/media/android/browser_surface_view_manager.h
index df6b2594..2bff709 100644
--- a/content/browser/media/android/browser_surface_view_manager.h
+++ b/content/browser/media/android/browser_surface_view_manager.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/android/content_video_view.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/geometry/size.h"
@@ -43,7 +44,7 @@
   int surface_id_;
 
   // The fullscreen view that contains a SurfaceView.
-  scoped_ptr<ContentVideoView> content_video_view_;
+  std::unique_ptr<ContentVideoView> content_video_view_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceViewManager);
 };
diff --git a/content/browser/media/android/media_resource_getter_impl.cc b/content/browser/media/android/media_resource_getter_impl.cc
index e0d6aff..473c532 100644
--- a/content/browser/media/android/media_resource_getter_impl.cc
+++ b/content/browser/media/android/media_resource_getter_impl.cc
@@ -54,7 +54,7 @@
   ChromeBlobStorageContext* blob_storage_context =
       GetChromeBlobStorageContextForResourceContext(resource_context);
 
-  scoped_ptr<storage::BlobDataHandle> handle =
+  std::unique_ptr<storage::BlobDataHandle> handle =
       blob_storage_context->context()->GetBlobDataFromPublicURL(url);
   if (!handle) {
     // There are plenty of cases where handle can be empty. The most trivial is
@@ -62,7 +62,7 @@
     ReturnResultOnUIThread(callback, std::string());
     return;
   }
-  scoped_ptr<storage::BlobDataSnapshot> data = handle->CreateSnapshot();
+  std::unique_ptr<storage::BlobDataSnapshot> data = handle->CreateSnapshot();
   if (!data) {
     ReturnResultOnUIThread(callback, std::string());
     NOTREACHED();
diff --git a/content/browser/media/android/media_web_contents_observer_android.cc b/content/browser/media/android/media_web_contents_observer_android.cc
index f099339..5a6c451f 100644
--- a/content/browser/media/android/media_web_contents_observer_android.cc
+++ b/content/browser/media/android/media_web_contents_observer_android.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/media/android/media_web_contents_observer_android.h"
 
+#include "base/memory/ptr_util.h"
 #include "content/browser/media/android/browser_media_player_manager.h"
 #include "content/browser/media/android/browser_media_session_manager.h"
 #include "content/browser/media/android/browser_surface_view_manager.h"
@@ -49,7 +50,7 @@
 
   BrowserMediaPlayerManager* manager =
       BrowserMediaPlayerManager::Create(render_frame_host);
-  media_player_managers_.set(render_frame_host, make_scoped_ptr(manager));
+  media_player_managers_.set(render_frame_host, base::WrapUnique(manager));
   return manager;
 }
 
@@ -62,7 +63,7 @@
 
   BrowserMediaSessionManager* manager =
       new BrowserMediaSessionManager(render_frame_host);
-  media_session_managers_.set(render_frame_host, make_scoped_ptr(manager));
+  media_session_managers_.set(render_frame_host, base::WrapUnique(manager));
   return manager;
 }
 
@@ -75,7 +76,7 @@
 
   BrowserSurfaceViewManager* manager =
       new BrowserSurfaceViewManager(render_frame_host);
-  surface_view_managers_.set(render_frame_host, make_scoped_ptr(manager));
+  surface_view_managers_.set(render_frame_host, base::WrapUnique(manager));
   return manager;
 }
 
diff --git a/content/browser/media/android/media_web_contents_observer_android.h b/content/browser/media/android/media_web_contents_observer_android.h
index cd87306..0f3a2a9 100644
--- a/content/browser/media/android/media_web_contents_observer_android.h
+++ b/content/browser/media/android/media_web_contents_observer_android.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/media/media_web_contents_observer.h"
 #include "content/common/content_export.h"
 
@@ -89,18 +90,18 @@
   // Map from RenderFrameHost* to BrowserMediaPlayerManager.
   using MediaPlayerManagerMap =
       base::ScopedPtrHashMap<RenderFrameHost*,
-                             scoped_ptr<BrowserMediaPlayerManager>>;
+                             std::unique_ptr<BrowserMediaPlayerManager>>;
   MediaPlayerManagerMap media_player_managers_;
 
   // Map from RenderFrameHost* to BrowserMediaSessionManager.
   using MediaSessionManagerMap =
       base::ScopedPtrHashMap<RenderFrameHost*,
-                             scoped_ptr<BrowserMediaSessionManager>>;
+                             std::unique_ptr<BrowserMediaSessionManager>>;
   MediaSessionManagerMap media_session_managers_;
 
   using SurfaceViewManagerMap =
       base::ScopedPtrHashMap<RenderFrameHost*,
-                             scoped_ptr<BrowserSurfaceViewManager>>;
+                             std::unique_ptr<BrowserSurfaceViewManager>>;
   SurfaceViewManagerMap surface_view_managers_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid);
diff --git a/content/browser/media/android/provision_fetcher_impl.cc b/content/browser/media/android/provision_fetcher_impl.cc
index 8e9f689..6ca51d7c 100644
--- a/content/browser/media/android/provision_fetcher_impl.cc
+++ b/content/browser/media/android/provision_fetcher_impl.cc
@@ -26,7 +26,7 @@
 }
 
 ProvisionFetcherImpl::ProvisionFetcherImpl(
-    scoped_ptr<media::ProvisionFetcher> provision_fetcher,
+    std::unique_ptr<media::ProvisionFetcher> provision_fetcher,
     mojo::InterfaceRequest<ProvisionFetcher> request)
     : binding_(this, std::move(request)),
       provision_fetcher_(std::move(provision_fetcher)),
diff --git a/content/browser/media/android/provision_fetcher_impl.h b/content/browser/media/android/provision_fetcher_impl.h
index 3f009fb8..38ae9cb2 100644
--- a/content/browser/media/android/provision_fetcher_impl.h
+++ b/content/browser/media/android/provision_fetcher_impl.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_PROVISION_FETCHER_IMPL_H_
 #define CONTENT_BROWSER_MEDIA_ANDROID_PROVISION_FETCHER_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/android/provision_fetcher_factory.h"
 #include "media/base/android/provision_fetcher.h"
@@ -25,8 +26,9 @@
       RenderFrameHost* render_frame_host,
       mojo::InterfaceRequest<media::interfaces::ProvisionFetcher> request);
 
-  ProvisionFetcherImpl(scoped_ptr<media::ProvisionFetcher> provision_fetcher,
-                       mojo::InterfaceRequest<ProvisionFetcher> request);
+  ProvisionFetcherImpl(
+      std::unique_ptr<media::ProvisionFetcher> provision_fetcher,
+      mojo::InterfaceRequest<ProvisionFetcher> request);
   ~ProvisionFetcherImpl() override;
 
   // media::interfaces::ProvisionFetcher implementation.
@@ -41,7 +43,7 @@
                   const std::string& response);
 
   mojo::StrongBinding<media::interfaces::ProvisionFetcher> binding_;
-  scoped_ptr<media::ProvisionFetcher> provision_fetcher_;
+  std::unique_ptr<media::ProvisionFetcher> provision_fetcher_;
 
   base::WeakPtrFactory<ProvisionFetcherImpl> weak_factory_;
 
diff --git a/content/browser/media/android/url_provision_fetcher.cc b/content/browser/media/android/url_provision_fetcher.cc
index 7607480..83a34b7 100644
--- a/content/browser/media/android/url_provision_fetcher.cc
+++ b/content/browser/media/android/url_provision_fetcher.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/media/android/url_provision_fetcher.h"
 
+#include "base/memory/ptr_util.h"
 #include "content/public/browser/android/provision_fetcher_factory.h"
 #include "media/base/bind_to_current_loop.h"
 #include "net/url_request/url_fetcher.h"
@@ -68,10 +69,10 @@
 
 // Implementation of content public method CreateProvisionFetcher().
 
-scoped_ptr<media::ProvisionFetcher> CreateProvisionFetcher(
+std::unique_ptr<media::ProvisionFetcher> CreateProvisionFetcher(
     net::URLRequestContextGetter* context_getter) {
   DCHECK(context_getter);
-  return make_scoped_ptr(new URLProvisionFetcher(context_getter));
+  return base::WrapUnique(new URLProvisionFetcher(context_getter));
 }
 
 }  // namespace content
diff --git a/content/browser/media/android/url_provision_fetcher.h b/content/browser/media/android/url_provision_fetcher.h
index 7e3d139..b551c3b0 100644
--- a/content/browser/media/android/url_provision_fetcher.h
+++ b/content/browser/media/android/url_provision_fetcher.h
@@ -30,7 +30,7 @@
   void OnURLFetchComplete(const net::URLFetcher* source) override;
 
   net::URLRequestContextGetter* context_getter_;
-  scoped_ptr<net::URLFetcher> request_;
+  std::unique_ptr<net::URLFetcher> request_;
   media::ProvisionFetcher::ResponseCB response_cb_;
 
   DISALLOW_COPY_AND_ASSIGN(URLProvisionFetcher);
diff --git a/content/browser/media/audible_metrics.cc b/content/browser/media/audible_metrics.cc
index 4a74028..3c17ccc 100644
--- a/content/browser/media/audible_metrics.cc
+++ b/content/browser/media/audible_metrics.cc
@@ -31,7 +31,8 @@
     RemoveAudibleWebContents(web_contents);
 }
 
-void AudibleMetrics::SetClockForTest(scoped_ptr<base::TickClock> test_clock) {
+void AudibleMetrics::SetClockForTest(
+    std::unique_ptr<base::TickClock> test_clock) {
   clock_ = std::move(test_clock);
 }
 
diff --git a/content/browser/media/audible_metrics.h b/content/browser/media/audible_metrics.h
index 408bc8cb..6ff93517 100644
--- a/content/browser/media/audible_metrics.h
+++ b/content/browser/media/audible_metrics.h
@@ -5,9 +5,9 @@
 #ifndef CONTENT_BROWSER_MEDIA_AUDIBLE_METRICS_H_
 #define CONTENT_BROWSER_MEDIA_AUDIBLE_METRICS_H_
 
+#include <memory>
 #include <set>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/time/tick_clock.h"
 #include "content/common/content_export.h"
 
@@ -29,7 +29,7 @@
   void UpdateAudibleWebContentsState(const WebContents* web_contents,
                                      bool audible);
 
-  void SetClockForTest(scoped_ptr<base::TickClock> test_clock);
+  void SetClockForTest(std::unique_ptr<base::TickClock> test_clock);
 
  private:
   void AddAudibleWebContents(const WebContents* web_contents);
@@ -37,7 +37,7 @@
 
   base::TimeTicks concurrent_web_contents_start_time_;
   size_t max_concurrent_audible_web_contents_in_session_;
-  scoped_ptr<base::TickClock> clock_;
+  std::unique_ptr<base::TickClock> clock_;
 
   std::set<const WebContents*> audible_web_contents_;
 
diff --git a/content/browser/media/audible_metrics_unittest.cc b/content/browser/media/audible_metrics_unittest.cc
index 1a6216b6..a337bb1 100644
--- a/content/browser/media/audible_metrics_unittest.cc
+++ b/content/browser/media/audible_metrics_unittest.cc
@@ -39,7 +39,7 @@
     // recognized as initialized.
     clock_->Advance(base::TimeDelta::FromMilliseconds(1));
     audible_metrics_.SetClockForTest(
-        scoped_ptr<base::SimpleTestTickClock>(clock_));
+        std::unique_ptr<base::SimpleTestTickClock>(clock_));
   }
 
   void TearDown() override {
@@ -56,7 +56,7 @@
     return user_action_tester_;
   }
 
-  scoped_ptr<base::HistogramSamples> GetHistogramSamplesSinceTestStart(
+  std::unique_ptr<base::HistogramSamples> GetHistogramSamplesSinceTestStart(
       const std::string& name) {
     return histogram_tester_.GetHistogramSamplesSinceCreation(name);
   }
@@ -73,26 +73,24 @@
 }  // anonymous namespace
 
 TEST_F(AudibleMetricsTest, CreateAndKillDoesNothing) {
-  {
-    scoped_ptr<AudibleMetrics> audible_metrics(new AudibleMetrics());
-  }
+  { std::unique_ptr<AudibleMetrics> audible_metrics(new AudibleMetrics()); }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(0, samples->TotalCount());
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
     EXPECT_EQ(0, samples->TotalCount());
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -105,7 +103,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_0, true);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
@@ -113,7 +111,7 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
@@ -121,7 +119,7 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -135,7 +133,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_0, false);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
@@ -143,7 +141,7 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
@@ -151,7 +149,7 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -168,7 +166,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_0, true);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
@@ -176,7 +174,7 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
@@ -184,7 +182,7 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -214,8 +212,9 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_2, true);
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_3, true);
 
-  scoped_ptr<base::HistogramSamples> samples(GetHistogramSamplesSinceTestStart(
-      MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
+  std::unique_ptr<base::HistogramSamples> samples(
+      GetHistogramSamplesSinceTestStart(
+          MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
   EXPECT_EQ(4, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1));
   EXPECT_EQ(1, samples->GetCount(2));
@@ -235,8 +234,9 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_2, false);
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_3, true);
 
-  scoped_ptr<base::HistogramSamples> samples(GetHistogramSamplesSinceTestStart(
-      MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
+  std::unique_ptr<base::HistogramSamples> samples(
+      GetHistogramSamplesSinceTestStart(
+          MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
   EXPECT_EQ(2, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1));
   EXPECT_EQ(1, samples->GetCount(2));
@@ -261,8 +261,9 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_2, true);
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_3, true);
 
-  scoped_ptr<base::HistogramSamples> samples(GetHistogramSamplesSinceTestStart(
-      MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
+  std::unique_ptr<base::HistogramSamples> samples(
+      GetHistogramSamplesSinceTestStart(
+          MAX_CONCURRENT_TAB_IN_SESSION_HISTOGRAM));
   EXPECT_EQ(4, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1));
   EXPECT_EQ(1, samples->GetCount(2));
@@ -278,7 +279,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_1, true);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(2, samples->TotalCount());
@@ -294,7 +295,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_1, true);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(2, samples->TotalCount());
@@ -310,7 +311,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_1, false);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(2, samples->TotalCount());
@@ -326,7 +327,7 @@
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_1, true);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(
             CONCURRENT_TAB_WHEN_STARTING_HISTOGRAM));
     EXPECT_EQ(4, samples->TotalCount());
@@ -351,7 +352,7 @@
   // No longer concurrent.
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_0, false);
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
     EXPECT_EQ(1, samples->GetCount(1000));
@@ -360,7 +361,7 @@
   // Stopping the second tab is a no-op.
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_1, false);
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
     EXPECT_EQ(1, samples->GetCount(1000));
@@ -387,7 +388,7 @@
   // Mutes the first audible tab.
   audible_metrics()->UpdateAudibleWebContentsState(WEB_CONTENTS_0, false);
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart(CONCURRENT_TABS_TIME_HISTOGRAM));
     EXPECT_EQ(1, samples->TotalCount());
     EXPECT_EQ(1, samples->GetCount(1500));
diff --git a/content/browser/media/audio_stream_monitor_unittest.cc b/content/browser/media/audio_stream_monitor_unittest.cc
index 9ecee0a..f1d5103d 100644
--- a/content/browser/media/audio_stream_monitor_unittest.cc
+++ b/content/browser/media/audio_stream_monitor_unittest.cc
@@ -5,12 +5,12 @@
 #include "content/browser/media/audio_stream_monitor.h"
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/browser/invalidate_type.h"
diff --git a/content/browser/media/capture/audio_mirroring_manager_unittest.cc b/content/browser/media/capture/audio_mirroring_manager_unittest.cc
index 0f471c88..17a4697 100644
--- a/content/browser/media/capture/audio_mirroring_manager_unittest.cc
+++ b/content/browser/media/capture/audio_mirroring_manager_unittest.cc
@@ -120,7 +120,7 @@
     delete diverter;
   }
 
-  void StartMirroringTo(const scoped_ptr<MockMirroringDestination>& dest,
+  void StartMirroringTo(const std::unique_ptr<MockMirroringDestination>& dest,
                         int expected_inputs_added) {
     EXPECT_CALL(*dest, QueryForMatches(_, _))
         .WillRepeatedly(Invoke(dest.get(),
@@ -136,12 +136,12 @@
     mirroring_manager_.StartMirroring(dest.get());
   }
 
-  void StopMirroringTo(const scoped_ptr<MockMirroringDestination>& dest) {
+  void StopMirroringTo(const std::unique_ptr<MockMirroringDestination>& dest) {
     mirroring_manager_.StopMirroring(dest.get());
   }
 
   int CountStreamsDivertedTo(
-      const scoped_ptr<MockMirroringDestination>& dest) const {
+      const std::unique_ptr<MockMirroringDestination>& dest) const {
     int count = 0;
     for (StreamRoutes::const_iterator it = mirroring_manager_.routes_.begin();
          it != mirroring_manager_.routes_.end(); ++it) {
@@ -175,7 +175,7 @@
 }
 
 TEST_F(AudioMirroringManagerTest, MirroringSessionOfNothing) {
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 0);
   EXPECT_EQ(0, CountStreamsDivertedTo(destination));
@@ -187,7 +187,7 @@
 }
 
 TEST_F(AudioMirroringManagerTest, TwoMirroringSessionsOfNothing) {
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 0);
   EXPECT_EQ(0, CountStreamsDivertedTo(destination));
@@ -195,7 +195,7 @@
   StopMirroringTo(destination);
   EXPECT_EQ(0, destination->query_count());
 
-  const scoped_ptr<MockMirroringDestination> another_destination(
+  const std::unique_ptr<MockMirroringDestination> another_destination(
       new MockMirroringDestination(kAnotherRenderProcessId,
                                    kAnotherRenderFrameId));
   StartMirroringTo(another_destination, 0);
@@ -212,7 +212,7 @@
 TEST_F(AudioMirroringManagerTest, StreamLifetimeAroundMirroringSession) {
   MockDiverter* const stream =
       CreateStream(kRenderProcessId, kRenderFrameId, 1);
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(1, destination->query_count());
@@ -232,7 +232,7 @@
 // Tests that a mirroring session starts before, and ends after, a stream that
 // will be diverted to it.
 TEST_F(AudioMirroringManagerTest, StreamLifetimeWithinMirroringSession) {
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(0, destination->query_count());
@@ -260,7 +260,7 @@
   MockDiverter* const stream =
       CreateStream(kRenderProcessId, kRenderFrameId, 2);
 
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(1, destination->query_count());
@@ -270,7 +270,7 @@
   EXPECT_EQ(1, destination->query_count());
   EXPECT_EQ(0, CountStreamsDivertedTo(destination));
 
-  const scoped_ptr<MockMirroringDestination> second_destination(
+  const std::unique_ptr<MockMirroringDestination> second_destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(second_destination, 1);
   EXPECT_EQ(1, destination->query_count());
@@ -299,13 +299,13 @@
   MockDiverter* const stream =
       CreateStream(kRenderProcessId, kRenderFrameId, 2);
 
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(1, destination->query_count());
   EXPECT_EQ(1, CountStreamsDivertedTo(destination));
 
-  const scoped_ptr<MockMirroringDestination> replacement_destination(
+  const std::unique_ptr<MockMirroringDestination> replacement_destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(replacement_destination, 1);
   EXPECT_EQ(1, destination->query_count());
@@ -340,13 +340,13 @@
   MockDiverter* const stream =
       CreateStream(kRenderProcessId, kRenderFrameId, 2);
 
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(1, destination->query_count());
   EXPECT_EQ(1, CountStreamsDivertedTo(destination));
 
-  const scoped_ptr<MockMirroringDestination> replacement_destination(
+  const std::unique_ptr<MockMirroringDestination> replacement_destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(replacement_destination, 1);
   EXPECT_EQ(1, destination->query_count());
@@ -382,13 +382,13 @@
   MockDiverter* const stream =
       CreateStream(kRenderProcessId, kRenderFrameId, 1);
 
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(1, destination->query_count());
   EXPECT_EQ(1, CountStreamsDivertedTo(destination));
 
-  const scoped_ptr<MockMirroringDestination> replacement_destination(
+  const std::unique_ptr<MockMirroringDestination> replacement_destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(replacement_destination, 0);
   EXPECT_EQ(1, destination->query_count());
@@ -422,7 +422,7 @@
   MockDiverter* const stream1 =
       CreateStream(kRenderProcessId, kRenderFrameId, 1);
 
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 3);
   EXPECT_EQ(1, destination->query_count());
@@ -463,13 +463,13 @@
   MockDiverter* const stream =
       CreateStream(kRenderProcessId, kRenderFrameId, 1);
 
-  const scoped_ptr<MockMirroringDestination> destination(
+  const std::unique_ptr<MockMirroringDestination> destination(
       new MockMirroringDestination(kRenderProcessId, kRenderFrameId));
   StartMirroringTo(destination, 1);
   EXPECT_EQ(1, destination->query_count());
   EXPECT_EQ(1, CountStreamsDivertedTo(destination));
 
-  const scoped_ptr<MockMirroringDestination> another_destination(
+  const std::unique_ptr<MockMirroringDestination> another_destination(
       new MockMirroringDestination(kAnotherRenderProcessId,
                                    kAnotherRenderFrameId));
   StartMirroringTo(another_destination, 1);
@@ -498,7 +498,7 @@
   EXPECT_EQ(2, another_destination->query_count());
   EXPECT_EQ(1, CountStreamsDivertedTo(another_destination));
 
-  const scoped_ptr<MockMirroringDestination> yet_another_destination(
+  const std::unique_ptr<MockMirroringDestination> yet_another_destination(
       new MockMirroringDestination(kYetAnotherRenderProcessId,
                                    kYetAnotherRenderFrameId));
   StartMirroringTo(yet_another_destination, 1);
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc
index 26e33cf..1469bca3 100644
--- a/content/browser/media/capture/aura_window_capture_machine.cc
+++ b/content/browser/media/capture/aura_window_capture_machine.cc
@@ -179,11 +179,10 @@
             : media::VideoCaptureOracle::kActiveRefreshRequest;
   if (oracle_proxy_->ObserveEventAndDecideCapture(
           event, gfx::Rect(), start_time, &frame, &capture_frame_cb)) {
-    scoped_ptr<cc::CopyOutputRequest> request =
-        cc::CopyOutputRequest::CreateRequest(
-            base::Bind(&AuraWindowCaptureMachine::DidCopyOutput,
-                       weak_factory_.GetWeakPtr(),
-                       frame, start_time, capture_frame_cb));
+    std::unique_ptr<cc::CopyOutputRequest> request =
+        cc::CopyOutputRequest::CreateRequest(base::Bind(
+            &AuraWindowCaptureMachine::DidCopyOutput,
+            weak_factory_.GetWeakPtr(), frame, start_time, capture_frame_cb));
     gfx::Rect window_rect = gfx::Rect(desktop_window_->bounds().width(),
                                       desktop_window_->bounds().height());
     request->set_area(window_rect);
@@ -195,7 +194,7 @@
     scoped_refptr<media::VideoFrame> video_frame,
     base::TimeTicks start_time,
     const CaptureFrameCallback& capture_frame_cb,
-    scoped_ptr<cc::CopyOutputResult> result) {
+    std::unique_ptr<cc::CopyOutputResult> result) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   static bool first_call = true;
@@ -230,7 +229,7 @@
     scoped_refptr<media::VideoFrame> video_frame,
     base::TimeTicks start_time,
     const CaptureFrameCallback& capture_frame_cb,
-    scoped_ptr<cc::CopyOutputResult> result) {
+    std::unique_ptr<cc::CopyOutputResult> result) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   if (result->IsEmpty() || result->size().IsEmpty() || !desktop_window_)
@@ -258,7 +257,7 @@
     return false;
 
   cc::TextureMailbox texture_mailbox;
-  scoped_ptr<cc::SingleReleaseCallback> release_callback;
+  std::unique_ptr<cc::SingleReleaseCallback> release_callback;
   result->TakeTexture(&texture_mailbox, &release_callback);
   DCHECK(texture_mailbox.IsTexture());
   if (!texture_mailbox.IsTexture())
@@ -296,7 +295,7 @@
     base::TimeTicks start_time,
     const CaptureFrameCallback& capture_frame_cb,
     const scoped_refptr<media::VideoFrame>& target,
-    scoped_ptr<cc::SingleReleaseCallback> release_callback,
+    std::unique_ptr<cc::SingleReleaseCallback> release_callback,
     bool result) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
diff --git a/content/browser/media/capture/aura_window_capture_machine.h b/content/browser/media/capture/aura_window_capture_machine.h
index 6f206afe..70aad807 100644
--- a/content/browser/media/capture/aura_window_capture_machine.h
+++ b/content/browser/media/capture/aura_window_capture_machine.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_
 #define CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/media/capture/cursor_renderer_aura.h"
 #include "media/capture/content/screen_capture_device_core.h"
@@ -79,19 +80,17 @@
       media::ThreadSafeCaptureOracle::CaptureFrameCallback;
 
   // Response callback for cc::Layer::RequestCopyOfOutput().
-  void DidCopyOutput(
-      scoped_refptr<media::VideoFrame> video_frame,
-      base::TimeTicks start_time,
-      const CaptureFrameCallback& capture_frame_cb,
-      scoped_ptr<cc::CopyOutputResult> result);
+  void DidCopyOutput(scoped_refptr<media::VideoFrame> video_frame,
+                     base::TimeTicks start_time,
+                     const CaptureFrameCallback& capture_frame_cb,
+                     std::unique_ptr<cc::CopyOutputResult> result);
 
   // A helper which does the real work for DidCopyOutput. Returns true if
   // succeeded.
-  bool ProcessCopyOutputResponse(
-      scoped_refptr<media::VideoFrame> video_frame,
-      base::TimeTicks start_time,
-      const CaptureFrameCallback& capture_frame_cb,
-      scoped_ptr<cc::CopyOutputResult> result);
+  bool ProcessCopyOutputResponse(scoped_refptr<media::VideoFrame> video_frame,
+                                 base::TimeTicks start_time,
+                                 const CaptureFrameCallback& capture_frame_cb,
+                                 std::unique_ptr<cc::CopyOutputResult> result);
 
   // Renders the cursor if needed and then delivers the captured frame.
   static void CopyOutputFinishedForVideo(
@@ -99,7 +98,7 @@
       base::TimeTicks start_time,
       const CaptureFrameCallback& capture_frame_cb,
       const scoped_refptr<media::VideoFrame>& target,
-      scoped_ptr<cc::SingleReleaseCallback> release_callback,
+      std::unique_ptr<cc::SingleReleaseCallback> release_callback,
       bool result);
 
   // The window associated with the desktop.
@@ -115,14 +114,14 @@
   media::VideoCaptureParams capture_params_;
 
   // YUV readback pipeline.
-  scoped_ptr<content::ReadbackYUVInterface> yuv_readback_pipeline_;
+  std::unique_ptr<content::ReadbackYUVInterface> yuv_readback_pipeline_;
 
   // Renders mouse cursor on frame.
-  scoped_ptr<content::CursorRendererAura> cursor_renderer_;
+  std::unique_ptr<content::CursorRendererAura> cursor_renderer_;
 
   // TODO(jiayl): Remove power_save_blocker_ when there is an API to keep the
   // screen from sleeping for the drive-by web.
-  scoped_ptr<PowerSaveBlocker> power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> power_save_blocker_;
 
   // WeakPtrs are used for the asynchronous capture callbacks passed to external
   // modules.  They are only valid on the UI thread and become invalidated
diff --git a/content/browser/media/capture/cursor_renderer.h b/content/browser/media/capture/cursor_renderer.h
index 7d3536a..9ac912e 100644
--- a/content/browser/media/capture/cursor_renderer.h
+++ b/content/browser/media/capture/cursor_renderer.h
@@ -21,7 +21,7 @@
 // will listen to mouse events.
 class CONTENT_EXPORT CursorRenderer {
  public:
-  static scoped_ptr<CursorRenderer> Create(gfx::NativeView view);
+  static std::unique_ptr<CursorRenderer> Create(gfx::NativeView view);
 
   virtual ~CursorRenderer() {}
 
diff --git a/content/browser/media/capture/cursor_renderer_aura.cc b/content/browser/media/capture/cursor_renderer_aura.cc
index e5d3fc2b..6beceea 100644
--- a/content/browser/media/capture/cursor_renderer_aura.cc
+++ b/content/browser/media/capture/cursor_renderer_aura.cc
@@ -36,8 +36,9 @@
 }  // namespace
 
 // static
-scoped_ptr<CursorRenderer> CursorRenderer::Create(gfx::NativeWindow window) {
-  return scoped_ptr<CursorRenderer>(
+std::unique_ptr<CursorRenderer> CursorRenderer::Create(
+    gfx::NativeWindow window) {
+  return std::unique_ptr<CursorRenderer>(
       new CursorRendererAura(window, kCursorEnabledOnMouseMovement));
 }
 
diff --git a/content/browser/media/capture/cursor_renderer_aura_unittest.cc b/content/browser/media/capture/cursor_renderer_aura_unittest.cc
index 8b08f83..c398945 100644
--- a/content/browser/media/capture/cursor_renderer_aura_unittest.cc
+++ b/content/browser/media/capture/cursor_renderer_aura_unittest.cc
@@ -6,8 +6,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/path_service.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "base/time/time.h"
@@ -126,8 +127,8 @@
   }
 
  protected:
-  scoped_ptr<aura::Window> window_;
-  scoped_ptr<CursorRendererAura> cursor_renderer_;
+  std::unique_ptr<aura::Window> window_;
+  std::unique_ptr<CursorRendererAura> cursor_renderer_;
 };
 
 TEST_F(CursorRendererAuraTest, CursorAlwaysDisplayed) {
@@ -193,7 +194,7 @@
   EXPECT_TRUE(CursorDisplayed());
 
   // Cursor not be displayed if a second window is activated.
-  scoped_ptr<aura::Window> window2(aura::test::CreateTestWindowWithBounds(
+  std::unique_ptr<aura::Window> window2(aura::test::CreateTestWindowWithBounds(
       gfx::Rect(0, 0, 800, 600), root_window()));
   wm::ActivateWindow(window2.get());
   SnapshotCursorState(gfx::Rect(10, 10, 200, 200));
@@ -237,7 +238,7 @@
   EXPECT_TRUE(CursorDisplayed());
 
   // Cursor being displayed even if another window is activated.
-  scoped_ptr<aura::Window> window2(aura::test::CreateTestWindowWithBounds(
+  std::unique_ptr<aura::Window> window2(aura::test::CreateTestWindowWithBounds(
       gfx::Rect(0, 0, 800, 600), root_window()));
   wm::ActivateWindow(window2.get());
   SnapshotCursorState(gfx::Rect(0, 0, 800, 600));
diff --git a/content/browser/media/capture/cursor_renderer_mac.mm b/content/browser/media/capture/cursor_renderer_mac.mm
index bf382bf..b00394e 100644
--- a/content/browser/media/capture/cursor_renderer_mac.mm
+++ b/content/browser/media/capture/cursor_renderer_mac.mm
@@ -31,8 +31,8 @@
 }  // namespace
 
 // static
-scoped_ptr<CursorRenderer> CursorRenderer::Create(gfx::NativeView view) {
-  return scoped_ptr<CursorRenderer>(new CursorRendererMac(view));
+std::unique_ptr<CursorRenderer> CursorRenderer::Create(gfx::NativeView view) {
+  return std::unique_ptr<CursorRenderer>(new CursorRendererMac(view));
 }
 
 CursorRendererMac::CursorRendererMac(NSView* view)
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
index 73eafee4..a76bc8d 100644
--- a/content/browser/media/capture/desktop_capture_device.cc
+++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -64,13 +64,13 @@
 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback {
  public:
   Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
-       scoped_ptr<webrtc::DesktopCapturer> capturer,
+       std::unique_ptr<webrtc::DesktopCapturer> capturer,
        DesktopMediaID::Type type);
   ~Core() override;
 
   // Implementation of VideoCaptureDevice methods.
   void AllocateAndStart(const media::VideoCaptureParams& params,
-                        scoped_ptr<Client> client);
+                        std::unique_ptr<Client> client);
 
   void SetNotificationWindowId(gfx::NativeViewId window_id);
 
@@ -93,11 +93,11 @@
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
 
   // The underlying DesktopCapturer instance used to capture frames.
-  scoped_ptr<webrtc::DesktopCapturer> desktop_capturer_;
+  std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer_;
 
   // The device client which proxies device events to the controller. Accessed
   // on the task_runner_ thread.
-  scoped_ptr<Client> client_;
+  std::unique_ptr<Client> client_;
 
   // Requested video capture frame rate.
   float requested_frame_rate_;
@@ -106,12 +106,12 @@
   webrtc::DesktopSize previous_frame_size_;
 
   // Determines the size of frames to deliver to the |client_|.
-  scoped_ptr<media::CaptureResolutionChooser> resolution_chooser_;
+  std::unique_ptr<media::CaptureResolutionChooser> resolution_chooser_;
 
   // DesktopFrame into which captured frames are down-scaled and/or letterboxed,
   // depending upon the caller's requested capture capabilities. If frames can
   // be returned to the caller directly then this is NULL.
-  scoped_ptr<webrtc::DesktopFrame> output_frame_;
+  std::unique_ptr<webrtc::DesktopFrame> output_frame_;
 
   // Timer used to capture the frame.
   base::OneShotTimer capture_timer_;
@@ -126,18 +126,18 @@
   // The type of the capturer.
   DesktopMediaID::Type capturer_type_;
 
-  scoped_ptr<webrtc::BasicDesktopFrame> black_frame_;
+  std::unique_ptr<webrtc::BasicDesktopFrame> black_frame_;
 
   // TODO(jiayl): Remove power_save_blocker_ when there is an API to keep the
   // screen from sleeping for the drive-by web.
-  scoped_ptr<PowerSaveBlocker> power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> power_save_blocker_;
 
   DISALLOW_COPY_AND_ASSIGN(Core);
 };
 
 DesktopCaptureDevice::Core::Core(
     scoped_refptr<base::SingleThreadTaskRunner> task_runner,
-    scoped_ptr<webrtc::DesktopCapturer> capturer,
+    std::unique_ptr<webrtc::DesktopCapturer> capturer,
     DesktopMediaID::Type type)
     : task_runner_(task_runner),
       desktop_capturer_(std::move(capturer)),
@@ -155,7 +155,7 @@
 
 void DesktopCaptureDevice::Core::AllocateAndStart(
     const media::VideoCaptureParams& params,
-    scoped_ptr<Client> client) {
+    std::unique_ptr<Client> client) {
   DCHECK(task_runner_->BelongsToCurrentThread());
   DCHECK_GT(params.requested_format.frame_size.GetArea(), 0);
   DCHECK_GT(params.requested_format.frame_rate, 0);
@@ -224,7 +224,7 @@
     UMA_HISTOGRAM_TIMES(kUmaWindowCaptureTime, capture_time);
   }
 
-  scoped_ptr<webrtc::DesktopFrame> owned_frame(frame);
+  std::unique_ptr<webrtc::DesktopFrame> owned_frame(frame);
 
   // If the frame size has changed, drop the output frame (if any), and
   // determine the new output size.
@@ -356,7 +356,7 @@
 }
 
 // static
-scoped_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
+std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
     const DesktopMediaID& source) {
   webrtc::DesktopCaptureOptions options =
       webrtc::DesktopCaptureOptions::CreateDefault();
@@ -367,40 +367,40 @@
       options.set_allow_use_magnification_api(true);
 #endif
 
-  scoped_ptr<webrtc::DesktopCapturer> capturer;
+      std::unique_ptr<webrtc::DesktopCapturer> capturer;
 
-  switch (source.type) {
-    case DesktopMediaID::TYPE_SCREEN: {
-      scoped_ptr<webrtc::ScreenCapturer> screen_capturer(
-          webrtc::ScreenCapturer::Create(options));
-      if (screen_capturer && screen_capturer->SelectScreen(source.id)) {
-        capturer.reset(new webrtc::DesktopAndCursorComposer(
-            screen_capturer.release(),
-            webrtc::MouseCursorMonitor::CreateForScreen(options, source.id)));
-        IncrementDesktopCaptureCounter(SCREEN_CAPTURER_CREATED);
-      }
-      break;
-    }
+      switch (source.type) {
+        case DesktopMediaID::TYPE_SCREEN: {
+          std::unique_ptr<webrtc::ScreenCapturer> screen_capturer(
+              webrtc::ScreenCapturer::Create(options));
+          if (screen_capturer && screen_capturer->SelectScreen(source.id)) {
+            capturer.reset(new webrtc::DesktopAndCursorComposer(
+                screen_capturer.release(),
+                webrtc::MouseCursorMonitor::CreateForScreen(options,
+                                                            source.id)));
+            IncrementDesktopCaptureCounter(SCREEN_CAPTURER_CREATED);
+          }
+          break;
+        }
 
-    case DesktopMediaID::TYPE_WINDOW: {
-      scoped_ptr<webrtc::WindowCapturer> window_capturer(
-          webrtc::CroppingWindowCapturer::Create(options));
-      if (window_capturer && window_capturer->SelectWindow(source.id)) {
-        window_capturer->BringSelectedWindowToFront();
-        capturer.reset(new webrtc::DesktopAndCursorComposer(
-            window_capturer.release(),
-            webrtc::MouseCursorMonitor::CreateForWindow(options, source.id)));
-        IncrementDesktopCaptureCounter(WINDOW_CAPTURER_CREATED);
-      }
-      break;
-    }
+        case DesktopMediaID::TYPE_WINDOW: {
+          std::unique_ptr<webrtc::WindowCapturer> window_capturer(
+              webrtc::CroppingWindowCapturer::Create(options));
+          if (window_capturer && window_capturer->SelectWindow(source.id)) {
+            window_capturer->BringSelectedWindowToFront();
+            capturer.reset(new webrtc::DesktopAndCursorComposer(
+                window_capturer.release(),
+                webrtc::MouseCursorMonitor::CreateForWindow(options,
+                                                            source.id)));
+            IncrementDesktopCaptureCounter(WINDOW_CAPTURER_CREATED);
+          }
+          break;
+        }
 
-    default: {
-      NOTREACHED();
-    }
+        default: { NOTREACHED(); }
   }
 
-  scoped_ptr<media::VideoCaptureDevice> result;
+  std::unique_ptr<media::VideoCaptureDevice> result;
   if (capturer)
     result.reset(new DesktopCaptureDevice(std::move(capturer), source.type));
 
@@ -413,7 +413,7 @@
 
 void DesktopCaptureDevice::AllocateAndStart(
     const media::VideoCaptureParams& params,
-    scoped_ptr<Client> client) {
+    std::unique_ptr<Client> client) {
   thread_.task_runner()->PostTask(
       FROM_HERE,
       base::Bind(&Core::AllocateAndStart, base::Unretained(core_.get()), params,
@@ -440,7 +440,7 @@
 }
 
 DesktopCaptureDevice::DesktopCaptureDevice(
-    scoped_ptr<webrtc::DesktopCapturer> capturer,
+    std::unique_ptr<webrtc::DesktopCapturer> capturer,
     DesktopMediaID::Type type)
     : thread_("desktopCaptureThread") {
 #if defined(OS_WIN)
diff --git a/content/browser/media/capture/desktop_capture_device.h b/content/browser/media/capture/desktop_capture_device.h
index 7afdedc..2cb77e6 100644
--- a/content/browser/media/capture/desktop_capture_device.h
+++ b/content/browser/media/capture/desktop_capture_device.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_
 #define CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/desktop_media_id.h"
@@ -33,14 +34,14 @@
   // Creates capturer for the specified |source| and then creates
   // DesktopCaptureDevice for it. May return NULL in case of a failure (e.g. if
   // requested window was destroyed).
-  static scoped_ptr<media::VideoCaptureDevice> Create(
+  static std::unique_ptr<media::VideoCaptureDevice> Create(
       const DesktopMediaID& source);
 
   ~DesktopCaptureDevice() override;
 
   // VideoCaptureDevice interface.
   void AllocateAndStart(const media::VideoCaptureParams& params,
-                        scoped_ptr<Client> client) override;
+                        std::unique_ptr<Client> client) override;
   void StopAndDeAllocate() override;
 
   // Set the platform-dependent window id for the notification window.
@@ -50,11 +51,12 @@
   friend class DesktopCaptureDeviceTest;
   class Core;
 
-  DesktopCaptureDevice(scoped_ptr<webrtc::DesktopCapturer> desktop_capturer,
-                       DesktopMediaID::Type type);
+  DesktopCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer,
+      DesktopMediaID::Type type);
 
   base::Thread thread_;
-  scoped_ptr<Core> core_;
+  std::unique_ptr<Core> core_;
 
   DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDevice);
 };
diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc
index b67f44a8..ac8929b 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/timer/timer.h"
 #include "content/browser/media/capture/aura_window_capture_machine.h"
 #include "content/public/browser/browser_thread.h"
@@ -30,7 +31,7 @@
 DesktopCaptureDeviceAura::DesktopCaptureDeviceAura(
     const DesktopMediaID& source) {
   AuraWindowCaptureMachine* machine = new AuraWindowCaptureMachine();
-  core_.reset(new media::ScreenCaptureDeviceCore(make_scoped_ptr(machine)));
+  core_.reset(new media::ScreenCaptureDeviceCore(base::WrapUnique(machine)));
   // |core_| owns |machine| and deletes it on UI thread so passing the raw
   // pointer to the UI thread is safe here.
   BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
@@ -42,17 +43,17 @@
 }
 
 // static
-scoped_ptr<media::VideoCaptureDevice> DesktopCaptureDeviceAura::Create(
+std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDeviceAura::Create(
     const DesktopMediaID& source) {
   if (source.aura_id == DesktopMediaID::kNullId)
     return nullptr;
-  return scoped_ptr<media::VideoCaptureDevice>(
+  return std::unique_ptr<media::VideoCaptureDevice>(
       new DesktopCaptureDeviceAura(source));
 }
 
 void DesktopCaptureDeviceAura::AllocateAndStart(
     const media::VideoCaptureParams& params,
-    scoped_ptr<Client> client) {
+    std::unique_ptr<Client> client) {
   DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString();
   core_->AllocateAndStart(params, std::move(client));
 }
diff --git a/content/browser/media/capture/desktop_capture_device_aura.h b/content/browser/media/capture/desktop_capture_device_aura.h
index 8c83a37..73a7d53 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.h
+++ b/content/browser/media/capture/desktop_capture_device_aura.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_AURA_H_
 #define CONTENT_BROWSER_MEDIA_CAPTURE_DESKTOP_CAPTURE_DEVICE_AURA_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/desktop_media_id.h"
 #include "media/capture/content/screen_capture_device_core.h"
@@ -26,21 +26,21 @@
  public:
   // Creates a VideoCaptureDevice for the Aura desktop.  If |source| does not
   // reference a registered aura window, returns nullptr instead.
-  static scoped_ptr<media::VideoCaptureDevice> Create(
+  static std::unique_ptr<media::VideoCaptureDevice> Create(
       const DesktopMediaID& source);
 
   ~DesktopCaptureDeviceAura() override;
 
   // VideoCaptureDevice implementation.
   void AllocateAndStart(const media::VideoCaptureParams& params,
-                        scoped_ptr<Client> client) override;
+                        std::unique_ptr<Client> client) override;
   void RequestRefreshFrame() override;
   void StopAndDeAllocate() override;
 
  private:
   explicit DesktopCaptureDeviceAura(const DesktopMediaID& source);
 
-  scoped_ptr<media::ScreenCaptureDeviceCore> core_;
+  std::unique_ptr<media::ScreenCaptureDeviceCore> core_;
 
   DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDeviceAura);
 };
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
index 0bcb066..e4bef80 100644
--- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
@@ -65,35 +65,35 @@
                void(const tracked_objects::Location& from_here,
                     const std::string& reason));
 
-  // Trampoline methods to workaround GMOCK problems with scoped_ptr<>.
-  scoped_ptr<Buffer> ReserveOutputBuffer(
+  // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>.
+  std::unique_ptr<Buffer> ReserveOutputBuffer(
       const gfx::Size& dimensions,
       media::VideoPixelFormat format,
       media::VideoPixelStorage storage) override {
     EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
     EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
     DoReserveOutputBuffer();
-    return scoped_ptr<Buffer>();
+    return std::unique_ptr<Buffer>();
   }
-  void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer,
+  void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
                                 const media::VideoCaptureFormat& frame_format,
                                 const base::TimeTicks& timestamp) override {
     DoOnIncomingCapturedBuffer();
   }
   void OnIncomingCapturedVideoFrame(
-      scoped_ptr<Buffer> buffer,
+      std::unique_ptr<Buffer> buffer,
       const scoped_refptr<media::VideoFrame>& frame,
       const base::TimeTicks& timestamp) override {
     DoOnIncomingCapturedVideoFrame();
   }
-  scoped_ptr<Buffer> ResurrectLastOutputBuffer(
+  std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
       const gfx::Size& dimensions,
       media::VideoPixelFormat format,
       media::VideoPixelStorage storage) override {
     EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
     EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
     DoResurrectLastOutputBuffer();
-    return scoped_ptr<Buffer>();
+    return std::unique_ptr<Buffer>();
   }
   double GetBufferPoolUtilization() const override { return 0.0; }
 };
@@ -142,21 +142,21 @@
  private:
   base::MessageLoopForUI message_loop_;
   BrowserThreadImpl browser_thread_for_ui_;
-  scoped_ptr<aura::test::AuraTestHelper> helper_;
-  scoped_ptr<aura::Window> desktop_window_;
-  scoped_ptr<aura::test::TestWindowDelegate> window_delegate_;
+  std::unique_ptr<aura::test::AuraTestHelper> helper_;
+  std::unique_ptr<aura::Window> desktop_window_;
+  std::unique_ptr<aura::test::TestWindowDelegate> window_delegate_;
 
   DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDeviceAuraTest);
 };
 
 TEST_F(DesktopCaptureDeviceAuraTest, StartAndStop) {
-  scoped_ptr<media::VideoCaptureDevice> capture_device =
+  std::unique_ptr<media::VideoCaptureDevice> capture_device =
       DesktopCaptureDeviceAura::Create(
           content::DesktopMediaID::RegisterAuraWindow(
               content::DesktopMediaID::TYPE_SCREEN, root_window()));
   ASSERT_TRUE(capture_device);
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_, _)).Times(0);
 
   media::VideoCaptureParams capture_params;
diff --git a/content/browser/media/capture/desktop_capture_device_unittest.cc b/content/browser/media/capture/desktop_capture_device_unittest.cc
index 3dd6bbcb..a1dc0213 100644
--- a/content/browser/media/capture/desktop_capture_device_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_unittest.cc
@@ -84,35 +84,35 @@
                void(const tracked_objects::Location& from_here,
                     const std::string& reason));
 
-  // Trampoline methods to workaround GMOCK problems with scoped_ptr<>.
-  scoped_ptr<Buffer> ReserveOutputBuffer(
+  // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>.
+  std::unique_ptr<Buffer> ReserveOutputBuffer(
       const gfx::Size& dimensions,
       media::VideoPixelFormat format,
       media::VideoPixelStorage storage) override {
     EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 &&
                 storage == media::PIXEL_STORAGE_CPU);
     DoReserveOutputBuffer();
-    return scoped_ptr<Buffer>();
+    return std::unique_ptr<Buffer>();
   }
-  void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer,
+  void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
                                 const media::VideoCaptureFormat& frame_format,
                                 const base::TimeTicks& timestamp) override {
     DoOnIncomingCapturedBuffer();
   }
   void OnIncomingCapturedVideoFrame(
-      scoped_ptr<Buffer> buffer,
+      std::unique_ptr<Buffer> buffer,
       const scoped_refptr<media::VideoFrame>& frame,
       const base::TimeTicks& timestamp) override {
     DoOnIncomingCapturedVideoFrame();
   }
-  scoped_ptr<Buffer> ResurrectLastOutputBuffer(
+  std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
       const gfx::Size& dimensions,
       media::VideoPixelFormat format,
       media::VideoPixelStorage storage) override {
     EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 &&
                 storage == media::PIXEL_STORAGE_CPU);
     DoResurrectLastOutputBuffer();
-    return scoped_ptr<Buffer>();
+    return std::unique_ptr<Buffer>();
   }
   double GetBufferPoolUtilization() const override { return 0.0; }
 };
@@ -152,7 +152,7 @@
   ~InvertedDesktopFrame() override {}
 
  private:
-  scoped_ptr<webrtc::DesktopFrame> original_frame_;
+  std::unique_ptr<webrtc::DesktopFrame> original_frame_;
 
   DISALLOW_COPY_AND_ASSIGN(InvertedDesktopFrame);
 };
@@ -263,7 +263,8 @@
 
 class DesktopCaptureDeviceTest : public testing::Test {
  public:
-  void CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer> capturer) {
+  void CreateScreenCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer> capturer) {
     capture_device_.reset(new DesktopCaptureDevice(
         std::move(capturer), DesktopMediaID::TYPE_SCREEN));
   }
@@ -276,8 +277,8 @@
   }
 
  protected:
-  scoped_ptr<DesktopCaptureDevice> capture_device_;
-  scoped_ptr<webrtc::DesktopFrame> output_frame_;
+  std::unique_ptr<DesktopCaptureDevice> capture_device_;
+  std::unique_ptr<webrtc::DesktopFrame> output_frame_;
 };
 
 // There is currently no screen capturer implementation for ozone. So disable
@@ -289,7 +290,7 @@
 #define MAYBE_Capture Capture
 #endif
 TEST_F(DesktopCaptureDeviceTest, MAYBE_Capture) {
-  scoped_ptr<webrtc::DesktopCapturer> capturer(
+  std::unique_ptr<webrtc::DesktopCapturer> capturer(
       webrtc::ScreenCapturer::Create(
           webrtc::DesktopCaptureOptions::CreateDefault()));
   CreateScreenCaptureDevice(std::move(capturer));
@@ -298,7 +299,7 @@
   base::WaitableEvent done_event(false, false);
   int frame_size;
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_, _)).Times(0);
   EXPECT_CALL(*client, OnIncomingCapturedData(_, _, _, _, _)).WillRepeatedly(
       DoAll(SaveArg<1>(&frame_size),
@@ -326,13 +327,14 @@
 TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeConstantResolution) {
   FakeScreenCapturer* mock_capturer = new FakeScreenCapturer();
 
-  CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer>(mock_capturer));
+  CreateScreenCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
 
   FormatChecker format_checker(gfx::Size(kTestFrameWidth1, kTestFrameHeight1),
                                gfx::Size(kTestFrameWidth1, kTestFrameHeight1));
   base::WaitableEvent done_event(false, false);
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_, _)).Times(0);
   EXPECT_CALL(*client, OnIncomingCapturedData(_, _, _, _, _)).WillRepeatedly(
       DoAll(WithArg<2>(Invoke(&format_checker,
@@ -367,12 +369,13 @@
 TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeFixedAspectRatio) {
   FakeScreenCapturer* mock_capturer = new FakeScreenCapturer();
 
-  CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer>(mock_capturer));
+  CreateScreenCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
 
   FormatChecker format_checker(gfx::Size(888, 500), gfx::Size(532, 300));
   base::WaitableEvent done_event(false, false);
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_,_)).Times(0);
   EXPECT_CALL(*client, OnIncomingCapturedData(_, _, _, _, _)).WillRepeatedly(
       DoAll(WithArg<2>(Invoke(&format_checker,
@@ -410,13 +413,14 @@
 TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeVariableResolution) {
   FakeScreenCapturer* mock_capturer = new FakeScreenCapturer();
 
-  CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer>(mock_capturer));
+  CreateScreenCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
 
   FormatChecker format_checker(gfx::Size(kTestFrameWidth1, kTestFrameHeight1),
                                gfx::Size(kTestFrameWidth2, kTestFrameHeight2));
   base::WaitableEvent done_event(false, false);
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_,_)).Times(0);
   EXPECT_CALL(*client, OnIncomingCapturedData(_, _, _, _, _)).WillRepeatedly(
       DoAll(WithArg<2>(Invoke(&format_checker,
@@ -453,7 +457,8 @@
 TEST_F(DesktopCaptureDeviceTest, UnpackedFrame) {
   FakeScreenCapturer* mock_capturer = new FakeScreenCapturer();
   mock_capturer->set_generate_cropped_frames(true);
-  CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer>(mock_capturer));
+  CreateScreenCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
 
   media::VideoCaptureFormat format;
   base::WaitableEvent done_event(false, false);
@@ -462,7 +467,7 @@
   output_frame_.reset(new webrtc::BasicDesktopFrame(
       webrtc::DesktopSize(kTestFrameWidth1, kTestFrameHeight1)));
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_,_)).Times(0);
   EXPECT_CALL(*client, OnIncomingCapturedData(_, _, _, _, _)).WillRepeatedly(
       DoAll(Invoke(this, &DesktopCaptureDeviceTest::CopyFrame),
@@ -484,7 +489,7 @@
 
   // Verifies that |output_frame_| has the same data as a packed frame of the
   // same size.
-  scoped_ptr<webrtc::BasicDesktopFrame> expected_frame(CreateBasicFrame(
+  std::unique_ptr<webrtc::BasicDesktopFrame> expected_frame(CreateBasicFrame(
       webrtc::DesktopSize(kTestFrameWidth1, kTestFrameHeight1)));
   EXPECT_EQ(output_frame_->stride() * output_frame_->size().height(),
             frame_size);
@@ -496,7 +501,8 @@
 TEST_F(DesktopCaptureDeviceTest, InvertedFrame) {
   FakeScreenCapturer* mock_capturer = new FakeScreenCapturer();
   mock_capturer->set_generate_inverted_frames(true);
-  CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer>(mock_capturer));
+  CreateScreenCaptureDevice(
+      std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
 
   media::VideoCaptureFormat format;
   base::WaitableEvent done_event(false, false);
@@ -505,7 +511,7 @@
   output_frame_.reset(new webrtc::BasicDesktopFrame(
       webrtc::DesktopSize(kTestFrameWidth1, kTestFrameHeight1)));
 
-  scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
+  std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
   EXPECT_CALL(*client, OnError(_,_)).Times(0);
   EXPECT_CALL(*client, OnIncomingCapturedData(_, _, _, _, _)).WillRepeatedly(
       DoAll(Invoke(this, &DesktopCaptureDeviceTest::CopyFrame),
@@ -526,7 +532,7 @@
 
   // Verifies that |output_frame_| has the same pixel values as the inverted
   // frame.
-  scoped_ptr<webrtc::DesktopFrame> inverted_frame(
+  std::unique_ptr<webrtc::DesktopFrame> inverted_frame(
       new InvertedDesktopFrame(CreateBasicFrame(
           webrtc::DesktopSize(kTestFrameWidth1, kTestFrameHeight1))));
   EXPECT_EQ(output_frame_->stride() * output_frame_->size().height(),
diff --git a/content/browser/media/capture/web_contents_audio_input_stream.cc b/content/browser/media/capture/web_contents_audio_input_stream.cc
index a211ebd5..ce8f7f4 100644
--- a/content/browser/media/capture/web_contents_audio_input_stream.cc
+++ b/content/browser/media/capture/web_contents_audio_input_stream.cc
@@ -4,13 +4,13 @@
 
 #include "content/browser/media/capture/web_contents_audio_input_stream.h"
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/browser/media/capture/audio_mirroring_manager.h"
 #include "content/browser/media/capture/web_contents_tracker.h"
@@ -101,7 +101,7 @@
   const scoped_refptr<WebContentsTracker> tracker_;
   // The AudioInputStream implementation that handles the audio conversion and
   // mixing details.
-  const scoped_ptr<media::VirtualAudioInputStream> mixer_stream_;
+  const std::unique_ptr<media::VirtualAudioInputStream> mixer_stream_;
 
   State state_;
 
diff --git a/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc b/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
index 1e8ef1f8..6ec220f 100644
--- a/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
+++ b/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
@@ -361,10 +361,10 @@
     change_callback_.Run(render_process_id != -1 && render_frame_id != -1);
   }
 
-  scoped_ptr<TestBrowserThreadBundle> thread_bundle_;
+  std::unique_ptr<TestBrowserThreadBundle> thread_bundle_;
   base::Thread audio_thread_;
 
-  scoped_ptr<MockAudioMirroringManager> mock_mirroring_manager_;
+  std::unique_ptr<MockAudioMirroringManager> mock_mirroring_manager_;
   scoped_refptr<MockWebContentsTracker> mock_tracker_;
 
   MockVirtualAudioInputStream* mock_vais_;  // Owned by wcais_.
diff --git a/content/browser/media/capture/web_contents_audio_muter.cc b/content/browser/media/capture/web_contents_audio_muter.cc
index 7423498..e99c768 100644
--- a/content/browser/media/capture/web_contents_audio_muter.cc
+++ b/content/browser/media/capture/web_contents_audio_muter.cc
@@ -55,7 +55,7 @@
 
   // Calls FetchAudioData() at regular intervals and discards the data.
   media::FakeAudioWorker worker_;
-  scoped_ptr<media::AudioBus> audio_bus_;
+  std::unique_ptr<media::AudioBus> audio_bus_;
 
   DISALLOW_COPY_AND_ASSIGN(AudioDiscarder);
 };
diff --git a/content/browser/media/capture/web_contents_video_capture_device.cc b/content/browser/media/capture/web_contents_video_capture_device.cc
index 461a211..0733a1f 100644
--- a/content/browser/media/capture/web_contents_video_capture_device.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device.cc
@@ -51,7 +51,9 @@
 #include "content/browser/media/capture/web_contents_video_capture_device.h"
 
 #include <stdint.h>
+
 #include <algorithm>
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
@@ -59,7 +61,6 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/histogram.h"
 #include "base/sequenced_task_runner.h"
@@ -105,7 +106,7 @@
   kMinPeriodNoAnimationMillis = 3000
 };
 
-void DeleteOnWorkerThread(scoped_ptr<base::Thread> render_thread,
+void DeleteOnWorkerThread(std::unique_ptr<base::Thread> render_thread,
                           const base::Closure& callback) {
   render_thread.reset();
 
@@ -220,18 +221,18 @@
   const int render_widget_id_;
 
   VideoFrameDeliveryLog delivery_log_;
-  scoped_ptr<FrameSubscriber> refresh_subscriber_;
-  scoped_ptr<FrameSubscriber> mouse_activity_subscriber_;
+  std::unique_ptr<FrameSubscriber> refresh_subscriber_;
+  std::unique_ptr<FrameSubscriber> mouse_activity_subscriber_;
   CaptureCallback capture_callback_;
 
   // Responsible for tracking the cursor state and input events to make
   // decisions and then render the mouse cursor on the video frame after
   // capture is completed.
-  scoped_ptr<content::CursorRenderer> cursor_renderer_;
+  std::unique_ptr<content::CursorRenderer> cursor_renderer_;
 
   // Responsible for tracking the UI events and making a decision on whether
   // user is actively interacting with content.
-  scoped_ptr<content::WindowActivityTracker> window_activity_tracker_;
+  std::unique_ptr<content::WindowActivityTracker> window_activity_tracker_;
 
   DISALLOW_COPY_AND_ASSIGN(ContentCaptureSubscription);
 };
@@ -329,7 +330,7 @@
 
   // A dedicated worker thread on which SkBitmap->VideoFrame conversion will
   // occur. Only used when this activity cannot be done on the GPU.
-  scoped_ptr<base::Thread> render_thread_;
+  std::unique_ptr<base::Thread> render_thread_;
 
   // Makes all the decisions about which frames to copy, and how.
   scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy_;
@@ -342,7 +343,7 @@
 
   // Responsible for forwarding events from the active RenderWidgetHost to the
   // oracle, and initiating captures accordingly.
-  scoped_ptr<ContentCaptureSubscription> subscription_;
+  std::unique_ptr<ContentCaptureSubscription> subscription_;
 
   // Weak pointer factory used to invalidate callbacks.
   // NOTE: Weak pointers must be invalidated before all other member variables.
@@ -457,7 +458,7 @@
   // Subscribe to compositor updates. These will be serviced directly by the
   // oracle.
   if (view) {
-    scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber(
+    std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber(
         new FrameSubscriber(
             media::VideoCaptureOracle::kCompositorUpdate, oracle_proxy,
             &delivery_log_, cursor_renderer_ ? cursor_renderer_->GetWeakPtr()
@@ -939,7 +940,7 @@
     int main_render_frame_id,
     bool enable_auto_throttling)
     : core_(new media::ScreenCaptureDeviceCore(
-          scoped_ptr<media::VideoCaptureMachine>(
+          std::unique_ptr<media::VideoCaptureMachine>(
               new WebContentsCaptureMachine(render_process_id,
                                             main_render_frame_id,
                                             enable_auto_throttling)))) {}
@@ -966,7 +967,7 @@
 
 void WebContentsVideoCaptureDevice::AllocateAndStart(
     const media::VideoCaptureParams& params,
-    scoped_ptr<Client> client) {
+    std::unique_ptr<Client> client) {
   DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString();
   core_->AllocateAndStart(params, std::move(client));
 }
diff --git a/content/browser/media/capture/web_contents_video_capture_device.h b/content/browser/media/capture/web_contents_video_capture_device.h
index a30557d..ea92b3b 100644
--- a/content/browser/media/capture/web_contents_video_capture_device.h
+++ b/content/browser/media/capture/web_contents_video_capture_device.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "media/capture/content/screen_capture_device_core.h"
 #include "media/capture/video/video_capture_device.h"
@@ -36,7 +36,7 @@
 
   // VideoCaptureDevice implementation.
   void AllocateAndStart(const media::VideoCaptureParams& params,
-                        scoped_ptr<Client> client) override;
+                        std::unique_ptr<Client> client) override;
   void RequestRefreshFrame() override;
   void StopAndDeAllocate() override;
 
@@ -46,7 +46,7 @@
       int main_render_frame_id,
       bool enable_auto_throttling);
 
-  const scoped_ptr<media::ScreenCaptureDeviceCore> core_;
+  const std::unique_ptr<media::ScreenCaptureDeviceCore> core_;
 
   DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice);
 };
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
index d089f63..81674324 100644
--- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
@@ -6,11 +6,13 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
 #include <utility>
 
 #include "base/bind_helpers.h"
 #include "base/debug/debugger.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/test/test_timeouts.h"
 #include "base/time/time.h"
@@ -196,7 +198,8 @@
   }
 
   void BeginFrameSubscription(
-      scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override {
+      std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber)
+      override {
     subscriber_.reset(subscriber.release());
   }
 
@@ -220,7 +223,7 @@
   }
 
  private:
-  scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber_;
+  std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber_;
   CaptureTestSourceController* const controller_;
   gfx::Rect fake_bounds_;
 
@@ -273,7 +276,7 @@
                             bool swapped_out,
                             CaptureTestSourceController* controller)
       : TestRenderViewHost(instance,
-                           make_scoped_ptr(new CaptureTestRenderWidgetHost(
+                           base::WrapUnique(new CaptureTestRenderWidgetHost(
                                widget_delegate,
                                instance->GetProcess(),
                                routing_id,
@@ -355,10 +358,10 @@
 
   MOCK_METHOD0(DoOnIncomingCapturedBuffer, void(void));
 
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> ReserveOutputBuffer(
-      const gfx::Size& dimensions,
-      media::VideoPixelFormat format,
-      media::VideoPixelStorage storage) override {
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
+  ReserveOutputBuffer(const gfx::Size& dimensions,
+                      media::VideoPixelFormat format,
+                      media::VideoPixelStorage storage) override {
     CHECK_EQ(format, media::PIXEL_FORMAT_I420);
     int buffer_id_to_drop = VideoCaptureBufferPool::kInvalidId;  // Ignored.
     const int buffer_id = buffer_pool_->ReserveForProducer(
@@ -366,20 +369,20 @@
     if (buffer_id == VideoCaptureBufferPool::kInvalidId)
       return NULL;
 
-    return scoped_ptr<media::VideoCaptureDevice::Client::Buffer>(
+    return std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>(
         new AutoReleaseBuffer(
             buffer_pool_, buffer_pool_->GetBufferHandle(buffer_id), buffer_id));
   }
 
-  // Trampoline method to workaround GMOCK problems with scoped_ptr<>.
-  void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer,
+  // Trampoline method to workaround GMOCK problems with std::unique_ptr<>.
+  void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
                                 const media::VideoCaptureFormat& frame_format,
                                 const base::TimeTicks& timestamp) override {
     DoOnIncomingCapturedBuffer();
   }
 
   void OnIncomingCapturedVideoFrame(
-      scoped_ptr<Buffer> buffer,
+      std::unique_ptr<Buffer> buffer,
       const scoped_refptr<media::VideoFrame>& frame,
       const base::TimeTicks& timestamp) override {
     EXPECT_FALSE(frame->visible_rect().IsEmpty());
@@ -407,7 +410,7 @@
         frame->visible_rect().size());
   }
 
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer>
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
   ResurrectLastOutputBuffer(const gfx::Size& dimensions,
                             media::VideoPixelFormat format,
                             media::VideoPixelStorage storage) override {
@@ -416,7 +419,7 @@
         buffer_pool_->ResurrectLastForProducer(dimensions, format, storage);
     if (buffer_id == VideoCaptureBufferPool::kInvalidId)
       return nullptr;
-    return scoped_ptr<media::VideoCaptureDevice::Client::Buffer>(
+    return std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>(
         new AutoReleaseBuffer(
             buffer_pool_, buffer_pool_->GetBufferHandle(buffer_id), buffer_id));
   }
@@ -433,7 +436,7 @@
    public:
     AutoReleaseBuffer(
         const scoped_refptr<VideoCaptureBufferPool>& pool,
-        scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle,
+        std::unique_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle,
         int buffer_id)
         : id_(buffer_id),
           pool_(pool),
@@ -460,7 +463,7 @@
 
     const int id_;
     const scoped_refptr<VideoCaptureBufferPool> pool_;
-    const scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle_;
+    const std::unique_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle_;
   };
 
   scoped_refptr<VideoCaptureBufferPool> buffer_pool_;
@@ -483,7 +486,7 @@
 
   virtual ~StubClientObserver() {}
 
-  scoped_ptr<media::VideoCaptureDevice::Client> PassClient() {
+  std::unique_ptr<media::VideoCaptureDevice::Client> PassClient() {
     return std::move(client_);
   }
 
@@ -571,7 +574,7 @@
   SkColor wait_color_yuv_;
   SkColor last_frame_color_yuv_;
   gfx::Size last_frame_size_;
-  scoped_ptr<StubClient> client_;
+  std::unique_ptr<StubClient> client_;
 
   DISALLOW_COPY_AND_ASSIGN(StubClientObserver);
 };
@@ -775,21 +778,21 @@
   CaptureTestSourceController controller_;
 
   // Self-registering RenderProcessHostFactory.
-  scoped_ptr<MockRenderProcessHostFactory> render_process_host_factory_;
+  std::unique_ptr<MockRenderProcessHostFactory> render_process_host_factory_;
 
   // Creates capture-capable RenderViewHosts whose pixel content production is
   // under the control of |controller_|.
-  scoped_ptr<CaptureTestRenderViewHostFactory> render_view_host_factory_;
+  std::unique_ptr<CaptureTestRenderViewHostFactory> render_view_host_factory_;
 
   // Self-registering RenderFrameHostFactory.
-  scoped_ptr<TestRenderFrameHostFactory> render_frame_host_factory_;
+  std::unique_ptr<TestRenderFrameHostFactory> render_frame_host_factory_;
 
   // A mocked-out browser and tab.
-  scoped_ptr<TestBrowserContext> browser_context_;
-  scoped_ptr<WebContents> web_contents_;
+  std::unique_ptr<TestBrowserContext> browser_context_;
+  std::unique_ptr<WebContents> web_contents_;
 
   // Finally, the WebContentsVideoCaptureDevice under test.
-  scoped_ptr<media::VideoCaptureDevice> device_;
+  std::unique_ptr<media::VideoCaptureDevice> device_;
 
   TestBrowserThreadBundle thread_bundle_;
 };
diff --git a/content/browser/media/capture/window_activity_tracker.h b/content/browser/media/capture/window_activity_tracker.h
index f1a90d6..1d07a8b 100644
--- a/content/browser/media/capture/window_activity_tracker.h
+++ b/content/browser/media/capture/window_activity_tracker.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WINDOW_ACTIVITY_TRACKER_H_
 #define CONTENT_BROWSER_MEDIA_CAPTURE_WINDOW_ACTIVITY_TRACKER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/native_widget_types.h"
@@ -18,7 +19,7 @@
 // whether the user is actively interacting with UI.
 class CONTENT_EXPORT WindowActivityTracker {
  public:
-  static scoped_ptr<WindowActivityTracker> Create(gfx::NativeView view);
+  static std::unique_ptr<WindowActivityTracker> Create(gfx::NativeView view);
 
   WindowActivityTracker();
   virtual ~WindowActivityTracker();
diff --git a/content/browser/media/capture/window_activity_tracker_aura.cc b/content/browser/media/capture/window_activity_tracker_aura.cc
index bc139aa..e5a178314 100644
--- a/content/browser/media/capture/window_activity_tracker_aura.cc
+++ b/content/browser/media/capture/window_activity_tracker_aura.cc
@@ -12,9 +12,9 @@
 namespace content {
 
 // static
-scoped_ptr<WindowActivityTracker> WindowActivityTracker::Create(
+std::unique_ptr<WindowActivityTracker> WindowActivityTracker::Create(
     gfx::NativeView window) {
-  return scoped_ptr<WindowActivityTracker>(
+  return std::unique_ptr<WindowActivityTracker>(
       new WindowActivityTrackerAura(window));
 }
 
diff --git a/content/browser/media/capture/window_activity_tracker_mac.mm b/content/browser/media/capture/window_activity_tracker_mac.mm
index 3b71cd61..a0ec7d3 100644
--- a/content/browser/media/capture/window_activity_tracker_mac.mm
+++ b/content/browser/media/capture/window_activity_tracker_mac.mm
@@ -53,9 +53,10 @@
 namespace content {
 
 // static
-scoped_ptr<WindowActivityTracker> WindowActivityTracker::Create(
+std::unique_ptr<WindowActivityTracker> WindowActivityTracker::Create(
     gfx::NativeView view) {
-  return scoped_ptr<WindowActivityTracker>(new WindowActivityTrackerMac(view));
+  return std::unique_ptr<WindowActivityTracker>(
+      new WindowActivityTrackerMac(view));
 }
 
 WindowActivityTrackerMac::WindowActivityTrackerMac(NSView* view)
diff --git a/content/browser/media/cdm/browser_cdm_manager.cc b/content/browser/media/cdm/browser_cdm_manager.cc
index 11f361d..b2bc2c9 100644
--- a/content/browser/media/cdm/browser_cdm_manager.cc
+++ b/content/browser/media/cdm/browser_cdm_manager.cc
@@ -5,13 +5,14 @@
 #include "content/browser/media/cdm/browser_cdm_manager.h"
 
 #include <stddef.h>
+
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/task_runner.h"
 #include "build/build_config.h"
 #include "content/public/browser/browser_context.h"
@@ -375,7 +376,7 @@
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
   DCHECK(!GetCdm(render_frame_id, cdm_id));
 
-  scoped_ptr<SimplePromise> promise(new SimplePromise(
+  std::unique_ptr<SimplePromise> promise(new SimplePromise(
       weak_ptr_factory_.GetWeakPtr(), render_frame_id, cdm_id, promise_id));
 
   if (params.key_system.size() > media::limits::kMaxKeySystemLength) {
@@ -417,7 +418,7 @@
     const std::vector<uint8_t>& certificate) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
-  scoped_ptr<SimplePromise> promise(new SimplePromise(
+  std::unique_ptr<SimplePromise> promise(new SimplePromise(
       weak_ptr_factory_.GetWeakPtr(), render_frame_id, cdm_id, promise_id));
 
   scoped_refptr<MediaKeys> cdm = GetCdm(render_frame_id, cdm_id);
@@ -441,9 +442,9 @@
   int render_frame_id = params.render_frame_id;
   int cdm_id = params.cdm_id;
   const std::vector<uint8_t>& init_data = params.init_data;
-  scoped_ptr<NewSessionPromise> promise(
-      new NewSessionPromise(weak_ptr_factory_.GetWeakPtr(),
-                            render_frame_id, cdm_id, params.promise_id));
+  std::unique_ptr<NewSessionPromise> promise(
+      new NewSessionPromise(weak_ptr_factory_.GetWeakPtr(), render_frame_id,
+                            cdm_id, params.promise_id));
 
   if (init_data.size() > media::limits::kMaxInitDataLength) {
     LOG(WARNING) << "InitData for ID: " << cdm_id
@@ -500,7 +501,7 @@
     const std::string& session_id) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
-  scoped_ptr<NewSessionPromise> promise(new NewSessionPromise(
+  std::unique_ptr<NewSessionPromise> promise(new NewSessionPromise(
       weak_ptr_factory_.GetWeakPtr(), render_frame_id, cdm_id, promise_id));
 
   scoped_refptr<MediaKeys> cdm = GetCdm(render_frame_id, cdm_id);
@@ -524,7 +525,7 @@
                                         const std::vector<uint8_t>& response) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
-  scoped_ptr<SimplePromise> promise(new SimplePromise(
+  std::unique_ptr<SimplePromise> promise(new SimplePromise(
       weak_ptr_factory_.GetWeakPtr(), render_frame_id, cdm_id, promise_id));
 
   scoped_refptr<MediaKeys> cdm = GetCdm(render_frame_id, cdm_id);
@@ -554,7 +555,7 @@
                                        const std::string& session_id) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
-  scoped_ptr<SimplePromise> promise(new SimplePromise(
+  std::unique_ptr<SimplePromise> promise(new SimplePromise(
       weak_ptr_factory_.GetWeakPtr(), render_frame_id, cdm_id, promise_id));
 
   scoped_refptr<MediaKeys> cdm = GetCdm(render_frame_id, cdm_id);
@@ -572,7 +573,7 @@
                                         const std::string& session_id) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
-  scoped_ptr<SimplePromise> promise(new SimplePromise(
+  std::unique_ptr<SimplePromise> promise(new SimplePromise(
       weak_ptr_factory_.GetWeakPtr(), render_frame_id, cdm_id, promise_id));
 
   scoped_refptr<MediaKeys> cdm = GetCdm(render_frame_id, cdm_id);
@@ -593,7 +594,7 @@
     int render_frame_id,
     int cdm_id,
     const GURL& security_origin,
-    scoped_ptr<media::SimpleCdmPromise> promise,
+    std::unique_ptr<media::SimpleCdmPromise> promise,
     const scoped_refptr<media::MediaKeys>& cdm,
     const std::string& error_message) {
   if (!cdm) {
@@ -691,7 +692,7 @@
     media::MediaKeys::SessionType session_type,
     media::EmeInitDataType init_data_type,
     const std::vector<uint8_t>& init_data,
-    scoped_ptr<media::NewSessionCdmPromise> promise,
+    std::unique_ptr<media::NewSessionCdmPromise> promise,
     bool permission_was_allowed) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
@@ -715,7 +716,7 @@
     int cdm_id,
     media::MediaKeys::SessionType session_type,
     const std::string& session_id,
-    scoped_ptr<media::NewSessionCdmPromise> promise,
+    std::unique_ptr<media::NewSessionCdmPromise> promise,
     bool permission_was_allowed) {
   DCHECK_NE(media::MediaKeys::SessionType::TEMPORARY_SESSION, session_type);
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
diff --git a/content/browser/media/cdm/browser_cdm_manager.h b/content/browser/media/cdm/browser_cdm_manager.h
index 02dad96..cdf088f3 100644
--- a/content/browser/media/cdm/browser_cdm_manager.h
+++ b/content/browser/media/cdm/browser_cdm_manager.h
@@ -8,12 +8,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/media/cdm_messages.h"
@@ -151,7 +151,7 @@
   void OnCdmCreated(int render_frame_id,
                     int cdm_id,
                     const GURL& security_origin,
-                    scoped_ptr<media::SimpleCdmPromise> promise,
+                    std::unique_ptr<media::SimpleCdmPromise> promise,
                     const scoped_refptr<media::MediaKeys>& cdm,
                     const std::string& error_message);
 
@@ -184,17 +184,18 @@
       media::MediaKeys::SessionType session_type,
       media::EmeInitDataType init_data_type,
       const std::vector<uint8_t>& init_data,
-      scoped_ptr<media::NewSessionCdmPromise> promise,
+      std::unique_ptr<media::NewSessionCdmPromise> promise,
       bool permission_was_allowed);
 
   // Calls LoadSession() on the CDM if |permission_was_allowed| is true.
   // Otherwise rejects |promise|.
-  void LoadSessionIfPermitted(int render_frame_id,
-                              int cdm_id,
-                              media::MediaKeys::SessionType session_type,
-                              const std::string& session_id,
-                              scoped_ptr<media::NewSessionCdmPromise> promise,
-                              bool permission_was_allowed);
+  void LoadSessionIfPermitted(
+      int render_frame_id,
+      int cdm_id,
+      media::MediaKeys::SessionType session_type,
+      const std::string& session_id,
+      std::unique_ptr<media::NewSessionCdmPromise> promise,
+      bool permission_was_allowed);
 
   const int render_process_id_;
 
@@ -202,7 +203,7 @@
   // dispatched to the browser UI thread.
   scoped_refptr<base::TaskRunner> task_runner_;
 
-  scoped_ptr<media::CdmFactory> cdm_factory_;
+  std::unique_ptr<media::CdmFactory> cdm_factory_;
 
   // The key in the following maps is a combination of |render_frame_id| and
   // |cdm_id|.
diff --git a/content/browser/media/media_browsertest.cc b/content/browser/media/media_browsertest.cc
index c90be2e..4f677992 100644
--- a/content/browser/media/media_browsertest.cc
+++ b/content/browser/media/media_browsertest.cc
@@ -27,7 +27,7 @@
                                         bool http) {
   GURL gurl;
   std::string query = media::GetURLQueryString(query_params);
-  scoped_ptr<net::EmbeddedTestServer> http_test_server;
+  std::unique_ptr<net::EmbeddedTestServer> http_test_server;
   if (http) {
     http_test_server.reset(new net::EmbeddedTestServer);
     http_test_server->ServeFilesFromSourceDirectory(media::GetTestDataPath());
diff --git a/content/browser/media/media_internals.cc b/content/browser/media/media_internals.cc
index b5ef0c14..02e40ce3 100644
--- a/content/browser/media/media_internals.cc
+++ b/content/browser/media/media_internals.cc
@@ -123,10 +123,11 @@
   void StoreComponentMetadata(int component_id, base::DictionaryValue* dict);
   std::string FormatCacheKey(int component_id);
 
-  static void SendWebContentsTitleHelper(const std::string& cache_key,
-                                         scoped_ptr<base::DictionaryValue> dict,
-                                         int render_process_id,
-                                         int render_frame_id);
+  static void SendWebContentsTitleHelper(
+      const std::string& cache_key,
+      std::unique_ptr<base::DictionaryValue> dict,
+      int render_process_id,
+      int render_frame_id);
 
   const int owner_id_;
   const media::AudioLogFactory::AudioComponent component_;
@@ -208,7 +209,7 @@
 void AudioLogImpl::SendWebContentsTitle(int component_id,
                                         int render_process_id,
                                         int render_frame_id) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   StoreComponentMetadata(component_id, dict.get());
   SendWebContentsTitleHelper(FormatCacheKey(component_id), std::move(dict),
                              render_process_id, render_frame_id);
@@ -221,7 +222,7 @@
 // static
 void AudioLogImpl::SendWebContentsTitleHelper(
     const std::string& cache_key,
-    scoped_ptr<base::DictionaryValue> dict,
+    std::unique_ptr<base::DictionaryValue> dict,
     int render_process_id,
     int render_frame_id) {
   // Page title information can only be retrieved from the UI thread.
@@ -620,11 +621,11 @@
   SendVideoCaptureDeviceCapabilities();
 }
 
-scoped_ptr<media::AudioLog> MediaInternals::CreateAudioLog(
+std::unique_ptr<media::AudioLog> MediaInternals::CreateAudioLog(
     AudioComponent component) {
   base::AutoLock auto_lock(lock_);
-  return scoped_ptr<media::AudioLog>(new AudioLogImpl(
-      owner_ids_[component]++, component, this));
+  return std::unique_ptr<media::AudioLog>(
+      new AudioLogImpl(owner_ids_[component]++, component, this));
 }
 
 void MediaInternals::SetWebContentsTitleForAudioLogEntry(
@@ -683,7 +684,7 @@
       DCHECK_EQ(type, CREATE);
       audio_streams_cached_data_.Set(cache_key, value->DeepCopy());
     } else if (type == UPDATE_AND_DELETE) {
-      scoped_ptr<base::Value> out_value;
+      std::unique_ptr<base::Value> out_value;
       CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value));
     } else {
       base::DictionaryValue* existing_dict = NULL;
diff --git a/content/browser/media/media_internals.h b/content/browser/media/media_internals.h
index e4869281..7203b2f 100644
--- a/content/browser/media/media_internals.h
+++ b/content/browser/media/media_internals.h
@@ -76,7 +76,8 @@
       const media::VideoCaptureDeviceInfos& video_capture_device_infos);
 
   // AudioLogFactory implementation.  Safe to call from any thread.
-  scoped_ptr<media::AudioLog> CreateAudioLog(AudioComponent component) override;
+  std::unique_ptr<media::AudioLog> CreateAudioLog(
+      AudioComponent component) override;
 
   // If possible, i.e. a WebContents exists for the given RenderFrameHostID,
   // tells an existing AudioLogEntry the WebContents title for easier
@@ -137,7 +138,7 @@
   bool can_update_;
   base::DictionaryValue audio_streams_cached_data_;
   int owner_ids_[AUDIO_COMPONENT_MAX];
-  scoped_ptr<MediaInternalsUMAHandler> uma_handler_;
+  std::unique_ptr<MediaInternalsUMAHandler> uma_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaInternals);
 };
diff --git a/content/browser/media/media_internals_proxy.cc b/content/browser/media/media_internals_proxy.cc
index 0ff34cf..a8ef882 100644
--- a/content/browser/media/media_internals_proxy.cc
+++ b/content/browser/media/media_internals_proxy.cc
@@ -178,7 +178,7 @@
 void MediaInternalsProxy::CallJavaScriptFunctionOnUIThread(
     const std::string& function, base::Value* args) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  scoped_ptr<base::Value> args_value(args);
+  std::unique_ptr<base::Value> args_value(args);
   std::vector<const base::Value*> args_vector;
   args_vector.push_back(args_value.get());
   base::string16 update = WebUI::GetJavascriptCall(function, args_vector);
diff --git a/content/browser/media/media_internals_proxy.h b/content/browser/media/media_internals_proxy.h
index 5eb9294f..84b4a1b 100644
--- a/content/browser/media/media_internals_proxy.h
+++ b/content/browser/media/media_internals_proxy.h
@@ -78,7 +78,7 @@
                                         base::Value* args);
 
   MediaInternalsMessageHandler* handler_;
-  scoped_ptr<base::ListValue> pending_net_updates_;
+  std::unique_ptr<base::ListValue> pending_net_updates_;
   NotificationRegistrar registrar_;
   MediaInternals::UpdateCallback update_callback_;
 
diff --git a/content/browser/media/media_internals_unittest.cc b/content/browser/media/media_internals_unittest.cc
index 754eb4b..808ae85 100644
--- a/content/browser/media/media_internals_unittest.cc
+++ b/content/browser/media/media_internals_unittest.cc
@@ -44,7 +44,7 @@
     std::string utf8_update = base::UTF16ToUTF8(update);
     const std::string::size_type first_brace = utf8_update.find('{');
     const std::string::size_type last_brace = utf8_update.rfind('}');
-    scoped_ptr<base::Value> output_value = base::JSONReader::Read(
+    std::unique_ptr<base::Value> output_value = base::JSONReader::Read(
         utf8_update.substr(first_brace, last_brace - first_brace + 1));
     CHECK(output_value);
 
@@ -245,7 +245,7 @@
   MediaInternals::UpdateCallback update_cb_;
   const media::AudioParameters test_params_;
   const media::AudioLogFactory::AudioComponent test_component_;
-  scoped_ptr<media::AudioLog> audio_log_;
+  std::unique_ptr<media::AudioLog> audio_log_;
 
  private:
   static media::AudioParameters MakeAudioParams() {
diff --git a/content/browser/media/media_web_contents_observer.cc b/content/browser/media/media_web_contents_observer.cc
index 7d1c924..c301e2e 100644
--- a/content/browser/media/media_web_contents_observer.cc
+++ b/content/browser/media/media_web_contents_observer.cc
@@ -4,8 +4,9 @@
 
 #include "content/browser/media/media_web_contents_observer.h"
 
+#include <memory>
+
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "content/browser/media/audible_metrics.h"
 #include "content/browser/media/audio_stream_monitor.h"
diff --git a/content/browser/media/media_web_contents_observer.h b/content/browser/media/media_web_contents_observer.h
index 891d7c8b..072ef4239 100644
--- a/content/browser/media/media_web_contents_observer.h
+++ b/content/browser/media/media_web_contents_observer.h
@@ -8,10 +8,10 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <set>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/media/session/media_session_controllers_manager.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/web_contents_observer.h"
@@ -94,8 +94,8 @@
   // Tracking variables and associated power save blockers for media playback.
   ActiveMediaPlayerMap active_audio_players_;
   ActiveMediaPlayerMap active_video_players_;
-  scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_;
-  scoped_ptr<PowerSaveBlocker> video_power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> audio_power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> video_power_save_blocker_;
 
   MediaSessionControllersManager session_controllers_manager_;
 
diff --git a/content/browser/media/midi_host.h b/content/browser/media/midi_host.h
index ca3706c..fc126ac 100644
--- a/content/browser/media/midi_host.h
+++ b/content/browser/media/midi_host.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/synchronization/lock.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/media/midi_host_unittest.cc b/content/browser/media/midi_host_unittest.cc
index 655414e8..21306af 100644
--- a/content/browser/media/midi_host_unittest.cc
+++ b/content/browser/media/midi_host_unittest.cc
@@ -126,7 +126,7 @@
   }
 
   void OnSendData(uint32_t port) {
-    scoped_ptr<IPC::Message> message(
+    std::unique_ptr<IPC::Message> message(
         new MidiHostMsg_SendData(port, data_, 0.0));
     host_->OnMessageReceived(*message.get());
   }
diff --git a/content/browser/media/session/media_session.cc b/content/browser/media/session/media_session.cc
index e31f53a..5c63545 100644
--- a/content/browser/media/session/media_session.cc
+++ b/content/browser/media/session/media_session.cc
@@ -209,14 +209,14 @@
          audio_focus_type_ == Type::Content;
 }
 
-scoped_ptr<base::CallbackList<void(MediaSession::State)>::Subscription>
+std::unique_ptr<base::CallbackList<void(MediaSession::State)>::Subscription>
 MediaSession::RegisterMediaSessionStateChangedCallbackForTest(
     const StateChangedCallback& cb) {
   return media_session_state_listeners_.Add(cb);
 }
 
 void MediaSession::SetDelegateForTests(
-    scoped_ptr<MediaSessionDelegate> delegate) {
+    std::unique_ptr<MediaSessionDelegate> delegate) {
   delegate_ = std::move(delegate);
 }
 
diff --git a/content/browser/media/session/media_session.h b/content/browser/media/session/media_session.h
index 9a00a75..3c0cf159 100644
--- a/content/browser/media/session/media_session.h
+++ b/content/browser/media/session/media_session.h
@@ -130,7 +130,7 @@
   friend class content::MediaSessionStateObserver;
 
   CONTENT_EXPORT void SetDelegateForTests(
-      scoped_ptr<MediaSessionDelegate> delegate);
+      std::unique_ptr<MediaSessionDelegate> delegate);
   CONTENT_EXPORT bool IsActiveForTest() const;
   CONTENT_EXPORT Type audio_focus_type_for_test() const;
   CONTENT_EXPORT void RemoveAllPlayersForTest();
@@ -184,11 +184,11 @@
   void SetAudioFocusState(State audio_focus_state);
 
   // Registers a MediaSession state change callback.
-  CONTENT_EXPORT scoped_ptr<base::CallbackList<void(State)>::Subscription>
+  CONTENT_EXPORT std::unique_ptr<base::CallbackList<void(State)>::Subscription>
   RegisterMediaSessionStateChangedCallbackForTest(
       const StateChangedCallback& cb);
 
-  scoped_ptr<MediaSessionDelegate> delegate_;
+  std::unique_ptr<MediaSessionDelegate> delegate_;
   PlayersMap players_;
 
   State audio_focus_state_;
diff --git a/content/browser/media/session/media_session_browsertest.cc b/content/browser/media/session/media_session_browsertest.cc
index c8388f7..db7a67e 100644
--- a/content/browser/media/session/media_session_browsertest.cc
+++ b/content/browser/media/session/media_session_browsertest.cc
@@ -66,7 +66,7 @@
         new MockWebContentsObserver(shell()->web_contents()));
     media_session_ = MediaSession::Get(shell()->web_contents());
     media_session_->SetDelegateForTests(
-        scoped_ptr<MediaSessionDelegate>(new MockMediaSessionDelegate()));
+        std::unique_ptr<MediaSessionDelegate>(new MockMediaSessionDelegate()));
     ASSERT_TRUE(media_session_);
   }
 
@@ -145,8 +145,8 @@
     return mock_web_contents_observer_.get();
   }
 
-  scoped_ptr<MediaSession> CreateDummyMediaSession() {
-      return scoped_ptr<MediaSession>(new MediaSession(nullptr));
+  std::unique_ptr<MediaSession> CreateDummyMediaSession() {
+    return std::unique_ptr<MediaSession>(new MediaSession(nullptr));
   }
 
   MediaSessionUmaHelper* GetMediaSessionUMAHelper() {
@@ -155,14 +155,14 @@
 
  protected:
   MediaSession* media_session_;
-  scoped_ptr<MockWebContentsObserver> mock_web_contents_observer_;
+  std::unique_ptr<MockWebContentsObserver> mock_web_contents_observer_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaSessionBrowserTest);
 };
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        PlayersFromSameObserverDoNotStopEachOtherInSameSession) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -176,11 +176,11 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        PlayersFromManyObserverDoNotStopEachOtherInSameSession) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_1(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_1(
       new MockMediaSessionObserver);
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_2(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_2(
       new MockMediaSessionObserver);
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_3(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_3(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer_1.get(), MediaSession::Type::Content);
@@ -194,7 +194,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        SuspendedMediaSessionStopsPlayers) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -210,7 +210,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        ResumedMediaSessionRestartsPlayers) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -227,7 +227,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        StartedPlayerOnSuspendedSessionPlaysAlone) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -252,7 +252,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        MediaSessionSetVolumeMultiplier) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -274,7 +274,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, StartPlayerGivesFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -283,7 +283,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, SuspendGivesAwayAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -294,7 +294,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, StopGivesAwayAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -305,7 +305,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, ResumeGivesBackAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -318,7 +318,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        RemovingLastPlayerDropsAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -335,11 +335,11 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        RemovingLastPlayerFromManyObserversDropsAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_1(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_1(
       new MockMediaSessionObserver);
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_2(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_2(
       new MockMediaSessionObserver);
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_3(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_3(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer_1.get(), MediaSession::Type::Content);
@@ -356,9 +356,9 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        RemovingAllPlayersFromObserversDropsAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_1(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_1(
       new MockMediaSessionObserver);
-  scoped_ptr<MockMediaSessionObserver> media_session_observer_2(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer_2(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer_1.get(), MediaSession::Type::Content);
@@ -373,7 +373,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, ResumePlayGivesAudioFocus) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -388,7 +388,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        ResumeSuspendAreSentOnlyOncePerPlayers) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -407,7 +407,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        ResumeSuspendAreSentOnlyOncePerPlayersAddedTwice) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -434,7 +434,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        RemovingTheSamePlayerTwiceIsANoop) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -444,7 +444,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, MediaSessionType) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   // Starting a player with a given type should set the session to that type.
@@ -491,7 +491,7 @@
   EXPECT_CALL(*mock_web_contents_observer(),
               MediaSessionStateChanged(true, false, testing::_));
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   // Starting a player with a content type should show the media controls.
@@ -505,7 +505,7 @@
   EXPECT_CALL(*mock_web_contents_observer(),
               MediaSessionStateChanged(false, false, testing::_));
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   // Starting a player with a transient type should not show the media controls.
@@ -522,7 +522,7 @@
               MediaSessionStateChanged(false, true, testing::_))
       .After(showControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -537,7 +537,7 @@
   EXPECT_CALL(*mock_web_contents_observer(),
               MediaSessionStateChanged(true, false, testing::_));
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -557,7 +557,7 @@
               MediaSessionStateChanged(true, false, testing::_))
       .After(dontShowControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Transient);
@@ -574,7 +574,7 @@
   EXPECT_CALL(*mock_web_contents_observer(),
               MediaSessionStateChanged(true, false, testing::_));
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -595,7 +595,7 @@
   EXPECT_CALL(*mock_web_contents_observer(),
               MediaSessionStateChanged(false, true, testing::_))
       .After(showControls);
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -620,7 +620,7 @@
               MediaSessionStateChanged(false, true, testing::_))
       .After(showControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -640,7 +640,7 @@
               MediaSessionStateChanged(true, true, testing::_))
       .After(showControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -665,7 +665,7 @@
               MediaSessionStateChanged(true, true, testing::_))
       .After(showControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -685,7 +685,7 @@
               MediaSessionStateChanged(true, false, testing::_))
       .After(pauseControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -704,7 +704,7 @@
               MediaSessionStateChanged(false, true, testing::_))
       .After(showControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -725,7 +725,7 @@
               MediaSessionStateChanged(false, true, testing::_))
       .After(pauseControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -746,7 +746,7 @@
               MediaSessionStateChanged(false, false, testing::_))
       .After(pauseControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -770,7 +770,7 @@
               MediaSessionStateChanged(true, false, testing::_))
       .After(pauseControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -793,7 +793,7 @@
               MediaSessionStateChanged(true, false, testing::_))
       .After(pauseControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -814,7 +814,7 @@
               MediaSessionStateChanged(true, true, testing::_))
       .After(showControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -834,7 +834,7 @@
               MediaSessionStateChanged(true, false, testing::_))
       .After(pauseControls);
 
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
@@ -847,7 +847,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        DontResumeBySystemUISuspendedSessions) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
@@ -862,7 +862,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        AllowUIResumeForSystemSuspend) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
@@ -876,7 +876,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, ResumeSuspendFromUI) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
@@ -890,7 +890,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, ResumeSuspendFromSystem) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
@@ -904,14 +904,14 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, UMA_Suspended_SystemTransient) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   SystemSuspend(true);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.Suspended"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(0)); // System Transient
@@ -922,14 +922,14 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_Suspended_SystemPermantent) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   SystemSuspend(false);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.Suspended"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(0, samples->GetCount(0)); // System Transient
@@ -938,14 +938,14 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, UMA_Suspended_UI) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   UISuspend();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.Suspended"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(0, samples->GetCount(0)); // System Transient
@@ -954,7 +954,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, UMA_Suspended_Multiple) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   base::HistogramTester tester;
 
@@ -971,7 +971,7 @@
 
   SystemSuspend(false);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.Suspended"));
   EXPECT_EQ(4, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(0)); // System Transient
@@ -980,7 +980,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, UMA_Suspended_Crossing) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   base::HistogramTester tester;
 
@@ -996,7 +996,7 @@
   SystemSuspend(false);
   SystemResume();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.Suspended"));
   EXPECT_EQ(2, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(0)); // System Transient
@@ -1005,14 +1005,14 @@
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, UMA_Suspended_Stop) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   media_session_->Stop(MediaSession::SuspendType::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.Suspended"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(0, samples->GetCount(0)); // System Transient
@@ -1023,33 +1023,33 @@
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest, UMA_ActiveTime_NoActivation) {
   base::HistogramTester tester;
 
-  scoped_ptr<MediaSession> media_session = CreateDummyMediaSession();
+  std::unique_ptr<MediaSession> media_session = CreateDummyMediaSession();
   media_session.reset();
 
   // A MediaSession that wasn't active doesn't register an active time.
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
   EXPECT_EQ(0, samples->TotalCount());
 }
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_ActiveTime_SimpleActivation) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
-    new MockMediaSessionObserver);
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
+      new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   MediaSessionUmaHelper* media_session_uma_helper = GetMediaSessionUMAHelper();
   base::SimpleTestClock* clock = new base::SimpleTestClock();
   clock->SetNow(base::Time::Now());
   media_session_uma_helper->SetClockForTest(
-      scoped_ptr<base::SimpleTestClock>(clock));
+      std::unique_ptr<base::SimpleTestClock>(clock));
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
   clock->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_->Stop(MediaSession::SuspendType::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1000));
@@ -1057,15 +1057,15 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_ActiveTime_ActivationWithUISuspension) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
-    new MockMediaSessionObserver);
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
+      new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   MediaSessionUmaHelper* media_session_uma_helper = GetMediaSessionUMAHelper();
   base::SimpleTestClock* clock = new base::SimpleTestClock();
   clock->SetNow(base::Time::Now());
   media_session_uma_helper->SetClockForTest(
-      scoped_ptr<base::SimpleTestClock>(clock));
+      std::unique_ptr<base::SimpleTestClock>(clock));
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
@@ -1078,7 +1078,7 @@
   clock->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_->Stop(MediaSession::SuspendType::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(2000));
@@ -1086,15 +1086,15 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_ActiveTime_ActivationWithSystemSuspension) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
-    new MockMediaSessionObserver);
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
+      new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   MediaSessionUmaHelper* media_session_uma_helper = GetMediaSessionUMAHelper();
   base::SimpleTestClock* clock = new base::SimpleTestClock();
   clock->SetNow(base::Time::Now());
   media_session_uma_helper->SetClockForTest(
-      scoped_ptr<base::SimpleTestClock>(clock));
+      std::unique_ptr<base::SimpleTestClock>(clock));
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
 
@@ -1107,7 +1107,7 @@
   clock->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_->Stop(MediaSession::SuspendType::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(2000));
@@ -1115,22 +1115,22 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_ActiveTime_ActivateSuspendedButNotStopped) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
-    new MockMediaSessionObserver);
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
+      new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   MediaSessionUmaHelper* media_session_uma_helper = GetMediaSessionUMAHelper();
   base::SimpleTestClock* clock = new base::SimpleTestClock();
   clock->SetNow(base::Time::Now());
   media_session_uma_helper->SetClockForTest(
-      scoped_ptr<base::SimpleTestClock>(clock));
+      std::unique_ptr<base::SimpleTestClock>(clock));
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   clock->Advance(base::TimeDelta::FromMilliseconds(500));
   SystemSuspend(true);
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -1140,7 +1140,7 @@
   UISuspend();
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -1148,15 +1148,15 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_ActiveTime_ActivateSuspendStopTwice) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
-    new MockMediaSessionObserver);
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
+      new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   MediaSessionUmaHelper* media_session_uma_helper = GetMediaSessionUMAHelper();
   base::SimpleTestClock* clock = new base::SimpleTestClock();
   clock->SetNow(base::Time::Now());
   media_session_uma_helper->SetClockForTest(
-      scoped_ptr<base::SimpleTestClock>(clock));
+      std::unique_ptr<base::SimpleTestClock>(clock));
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   clock->Advance(base::TimeDelta::FromMilliseconds(500));
@@ -1168,7 +1168,7 @@
   SystemResume();
   media_session_->Stop(MediaSession::SuspendType::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
   EXPECT_EQ(2, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(500));
@@ -1177,15 +1177,15 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionBrowserTest,
                        UMA_ActiveTime_MultipleActivations) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
-    new MockMediaSessionObserver);
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
+      new MockMediaSessionObserver);
   base::HistogramTester tester;
 
   MediaSessionUmaHelper* media_session_uma_helper = GetMediaSessionUMAHelper();
   base::SimpleTestClock* clock = new base::SimpleTestClock();
   clock->SetNow(base::Time::Now());
   media_session_uma_helper->SetClockForTest(
-      scoped_ptr<base::SimpleTestClock>(clock));
+      std::unique_ptr<base::SimpleTestClock>(clock));
 
   StartNewPlayer(media_session_observer.get(), MediaSession::Type::Content);
   clock->Advance(base::TimeDelta::FromMilliseconds(10000));
@@ -1195,7 +1195,7 @@
   clock->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_->Stop(MediaSession::SuspendType::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
   EXPECT_EQ(2, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1000));
diff --git a/content/browser/media/session/media_session_controller_unittest.cc b/content/browser/media/session/media_session_controller_unittest.cc
index 7ed5a4a..1b04aac3 100644
--- a/content/browser/media/session/media_session_controller_unittest.cc
+++ b/content/browser/media/session/media_session_controller_unittest.cc
@@ -29,8 +29,8 @@
   }
 
  protected:
-  scoped_ptr<MediaSessionController> CreateController() {
-    return scoped_ptr<MediaSessionController>(new MediaSessionController(
+  std::unique_ptr<MediaSessionController> CreateController() {
+    return std::unique_ptr<MediaSessionController>(new MediaSessionController(
         id_, contents()->media_web_contents_observer()));
   }
 
@@ -98,7 +98,7 @@
   }
 
   WebContentsObserver::MediaPlayerId id_;
-  scoped_ptr<MediaSessionController> controller_;
+  std::unique_ptr<MediaSessionController> controller_;
 };
 
 TEST_F(MediaSessionControllerTest, NoAudioNoSession) {
diff --git a/content/browser/media/session/media_session_controllers_manager.cc b/content/browser/media/session/media_session_controllers_manager.cc
index 0b93dc89..426f3ceb 100644
--- a/content/browser/media/session/media_session_controllers_manager.cc
+++ b/content/browser/media/session/media_session_controllers_manager.cc
@@ -64,7 +64,7 @@
     return false;
   }
 
-  scoped_ptr<MediaSessionController> controller(
+  std::unique_ptr<MediaSessionController> controller(
       new MediaSessionController(id, media_web_contents_observer_));
 
   if (!controller->Initialize(has_audio, is_remote, duration))
diff --git a/content/browser/media/session/media_session_controllers_manager.h b/content/browser/media/session/media_session_controllers_manager.h
index 84dcdeb..f89898a 100644
--- a/content/browser/media/session/media_session_controllers_manager.h
+++ b/content/browser/media/session/media_session_controllers_manager.h
@@ -6,12 +6,12 @@
 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_CONTROLLERS_MANAGER_H_
 
 #include <map>
+#include <memory>
 #include <utility>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
-#include "content/public/browser/web_contents_observer.h" // For MediaPlayerId.
+#include "content/public/browser/web_contents_observer.h"  // For MediaPlayerId.
 
 namespace content {
 
@@ -52,7 +52,7 @@
   MediaWebContentsObserver* const media_web_contents_observer_;
 
   using ControllersMap =
-      std::map<MediaPlayerId, scoped_ptr<MediaSessionController>>;
+      std::map<MediaPlayerId, std::unique_ptr<MediaSessionController>>;
   ControllersMap controllers_map_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaSessionControllersManager);
diff --git a/content/browser/media/session/media_session_delegate.h b/content/browser/media/session/media_session_delegate.h
index 224674b..bc61e04 100644
--- a/content/browser/media/session/media_session_delegate.h
+++ b/content/browser/media/session/media_session_delegate.h
@@ -14,7 +14,8 @@
 class MediaSessionDelegate {
  public:
   // Factory method returning an implementation of MediaSessionDelegate.
-  static scoped_ptr<MediaSessionDelegate> Create(MediaSession* media_session);
+  static std::unique_ptr<MediaSessionDelegate> Create(
+      MediaSession* media_session);
 
   virtual bool RequestAudioFocus(MediaSession::Type type) = 0;
   virtual void AbandonAudioFocus() = 0;
diff --git a/content/browser/media/session/media_session_delegate_android.cc b/content/browser/media/session/media_session_delegate_android.cc
index d6b54316..9b89b1c 100644
--- a/content/browser/media/session/media_session_delegate_android.cc
+++ b/content/browser/media/session/media_session_delegate_android.cc
@@ -80,12 +80,12 @@
 }
 
 // static
-scoped_ptr<MediaSessionDelegate> MediaSessionDelegate::Create(
+std::unique_ptr<MediaSessionDelegate> MediaSessionDelegate::Create(
     MediaSession* media_session) {
   MediaSessionDelegateAndroid* delegate =
       new MediaSessionDelegateAndroid(media_session);
   delegate->Initialize();
-  return scoped_ptr<MediaSessionDelegate>(delegate);
+  return std::unique_ptr<MediaSessionDelegate>(delegate);
 }
 
 }  // namespace content
diff --git a/content/browser/media/session/media_session_delegate_default.cc b/content/browser/media/session/media_session_delegate_default.cc
index 5b066229..688ce53d 100644
--- a/content/browser/media/session/media_session_delegate_default.cc
+++ b/content/browser/media/session/media_session_delegate_default.cc
@@ -53,9 +53,9 @@
 }
 
 // static
-scoped_ptr<MediaSessionDelegate> MediaSessionDelegate::Create(
+std::unique_ptr<MediaSessionDelegate> MediaSessionDelegate::Create(
     MediaSession* media_session) {
-  return scoped_ptr<MediaSessionDelegate>(
+  return std::unique_ptr<MediaSessionDelegate>(
       new MediaSessionDelegateDefault(media_session));
 }
 
diff --git a/content/browser/media/session/media_session_delegate_default_browsertest.cc b/content/browser/media/session/media_session_delegate_default_browsertest.cc
index 99ddec64..cc269269 100644
--- a/content/browser/media/session/media_session_delegate_default_browsertest.cc
+++ b/content/browser/media/session/media_session_delegate_default_browsertest.cc
@@ -20,7 +20,7 @@
 
 IN_PROC_BROWSER_TEST_F(MediaSessionDelegateDefaultBrowserTest,
                        ActiveWebContentsPauseOthers) {
-  scoped_ptr<MockMediaSessionObserver> media_session_observer(
+  std::unique_ptr<MockMediaSessionObserver> media_session_observer(
       new MockMediaSessionObserver);
 
   MediaSession* media_session = MediaSession::Get(shell()->web_contents());
diff --git a/content/browser/media/session/media_session_uma_helper.cc b/content/browser/media/session/media_session_uma_helper.cc
index 88911db..17a43b0 100644
--- a/content/browser/media/session/media_session_uma_helper.cc
+++ b/content/browser/media/session/media_session_uma_helper.cc
@@ -59,7 +59,7 @@
 }
 
 void MediaSessionUmaHelper::SetClockForTest(
-    scoped_ptr<base::Clock> testing_clock) {
+    std::unique_ptr<base::Clock> testing_clock) {
   clock_ = std::move(testing_clock);
 }
 
diff --git a/content/browser/media/session/media_session_uma_helper.h b/content/browser/media/session/media_session_uma_helper.h
index 7043d7b..290c3b9 100644
--- a/content/browser/media/session/media_session_uma_helper.h
+++ b/content/browser/media/session/media_session_uma_helper.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_UMA_HELPER_H_
 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_UMA_HELPER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/time/clock.h"
 #include "content/common/content_export.h"
 
@@ -40,12 +41,12 @@
   void OnSessionSuspended();
   void OnSessionInactive();
 
-  void SetClockForTest(scoped_ptr<base::Clock> testing_clock);
+  void SetClockForTest(std::unique_ptr<base::Clock> testing_clock);
 
  private:
   base::TimeDelta total_active_time_;
   base::Time current_active_time_;
-  scoped_ptr<base::Clock> clock_;
+  std::unique_ptr<base::Clock> clock_;
 };
 
 }  // namespace content
diff --git a/content/browser/media/session/media_session_uma_helper_unittest.cc b/content/browser/media/session/media_session_uma_helper_unittest.cc
index 7c0419f..de9b2df 100644
--- a/content/browser/media/session/media_session_uma_helper_unittest.cc
+++ b/content/browser/media/session/media_session_uma_helper_unittest.cc
@@ -24,7 +24,7 @@
     clock_ = new base::SimpleTestClock();
     clock_->SetNow(base::Time::Now());
     media_session_uma_helper_.SetClockForTest(
-        scoped_ptr<base::SimpleTestClock>(clock_));
+        std::unique_ptr<base::SimpleTestClock>(clock_));
   }
 
   void TearDown() override {
@@ -37,7 +37,7 @@
     return media_session_uma_helper_;
   };
 
-  scoped_ptr<base::HistogramSamples> GetHistogramSamplesSinceTestStart(
+  std::unique_ptr<base::HistogramSamples> GetHistogramSamplesSinceTestStart(
       const std::string& name) {
     return histogram_tester_.GetHistogramSamplesSinceCreation(name);
   }
@@ -57,13 +57,13 @@
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart("Media.Session.Suspended"));
     EXPECT_EQ(0, samples->TotalCount());
   }
 
   {
-    scoped_ptr<base::HistogramSamples> samples(
+    std::unique_ptr<base::HistogramSamples> samples(
         GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
     EXPECT_EQ(0, samples->TotalCount());
   }
@@ -73,7 +73,7 @@
   media_session_uma_helper().RecordSessionSuspended(
       MediaSessionSuspendedSource::SystemTransient);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.Suspended"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(0)); // System Transient
@@ -89,7 +89,7 @@
   media_session_uma_helper().RecordSessionSuspended(
       MediaSessionSuspendedSource::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.Suspended"));
   EXPECT_EQ(3, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(0)); // System Transient
@@ -111,7 +111,7 @@
   media_session_uma_helper().RecordSessionSuspended(
       MediaSessionSuspendedSource::UI);
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.Suspended"));
   EXPECT_EQ(6, samples->TotalCount());
   EXPECT_EQ(2, samples->GetCount(0)); // System Transient
@@ -123,7 +123,7 @@
   media_session_uma_helper().OnSessionActive();
   clock()->Advance(base::TimeDelta::FromMilliseconds(1000));
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(0, samples->TotalCount());
 }
@@ -134,7 +134,7 @@
   clock()->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_uma_helper().OnSessionSuspended();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(0, samples->TotalCount());
 }
@@ -145,7 +145,7 @@
   clock()->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_uma_helper().OnSessionInactive();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1000));
@@ -163,7 +163,7 @@
   clock()->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_uma_helper().OnSessionInactive();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(2000));
@@ -187,7 +187,7 @@
   clock()->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_uma_helper().OnSessionInactive();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(3000));
@@ -222,7 +222,7 @@
   clock()->Advance(base::TimeDelta::FromMilliseconds(1000));
   media_session_uma_helper().OnSessionInactive();
 
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(2, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(2000));
@@ -243,7 +243,7 @@
 
   // Calling OnSessionActive() multiple times reset the start time of the
   // session.
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(500));
@@ -265,7 +265,7 @@
 
   // If the session is already suspended, OnSessionSuspended() calls are
   // ignored.
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1000));
@@ -287,7 +287,7 @@
 
   // If the session is already inactive, OnSessionSuspended() calls are
   // ignored.
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(1000));
@@ -306,7 +306,7 @@
   media_session_uma_helper().OnSessionInactive();
 
   // If the session is already inactive, OnSessionInactive() calls are ignored.
-  scoped_ptr<base::HistogramSamples> samples(
+  std::unique_ptr<base::HistogramSamples> samples(
       GetHistogramSamplesSinceTestStart("Media.Session.ActiveTime"));
   EXPECT_EQ(1, samples->TotalCount());
   EXPECT_EQ(1, samples->GetCount(3000));
diff --git a/content/browser/media/session/media_session_visibility_browsertest.cc b/content/browser/media/session/media_session_visibility_browsertest.cc
index 18ead53..f83cd85 100644
--- a/content/browser/media/session/media_session_visibility_browsertest.cc
+++ b/content/browser/media/session/media_session_visibility_browsertest.cc
@@ -175,8 +175,8 @@
   // state change after play().
   std::map<MediaSession::State, scoped_refptr<MessageLoopRunner> >
   media_session_state_loop_runners_;
-  scoped_ptr<base::CallbackList<void(MediaSession::State)>::Subscription>
-  media_session_state_callback_subscription_;
+  std::unique_ptr<base::CallbackList<void(MediaSession::State)>::Subscription>
+      media_session_state_callback_subscription_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MediaSessionVisibilityBrowserTest);
diff --git a/content/browser/media/webrtc/webrtc_getusermedia_browsertest.cc b/content/browser/media/webrtc/webrtc_getusermedia_browsertest.cc
index 3bf34cf..73c8dc9 100644
--- a/content/browser/media/webrtc/webrtc_getusermedia_browsertest.cc
+++ b/content/browser/media/webrtc/webrtc_getusermedia_browsertest.cc
@@ -147,7 +147,7 @@
     // would stop both this code and the browser underneath.
     StopTracing();
 
-    scoped_ptr<TraceAnalyzer> analyzer(CreateTraceAnalyzer());
+    std::unique_ptr<TraceAnalyzer> analyzer(CreateTraceAnalyzer());
     analyzer->AssociateBeginEndEvents();
     trace_analyzer::TraceEventVector events;
     DCHECK(measure_filter.size());
@@ -205,7 +205,7 @@
 
     int error_code;
     std::string error_message;
-    scoped_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
+    std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
         devices_as_json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code,
         &error_message);
 
diff --git a/content/browser/media/webrtc/webrtc_identity_store.cc b/content/browser/media/webrtc/webrtc_identity_store.cc
index a5b91ad..0dc62e4 100644
--- a/content/browser/media/webrtc/webrtc_identity_store.cc
+++ b/content/browser/media/webrtc/webrtc_identity_store.cc
@@ -43,7 +43,7 @@
   result->error = net::OK;
   int serial_number = base::RandInt(0, std::numeric_limits<int>::max());
 
-  scoped_ptr<crypto::RSAPrivateKey> key;
+  std::unique_ptr<crypto::RSAPrivateKey> key;
   base::Time now = base::Time::Now();
   bool success = net::x509_util::CreateKeyAndSelfSignedCert(
       "CN=" + common_name,
diff --git a/content/browser/media/webrtc/webrtc_identity_store_backend.cc b/content/browser/media/webrtc/webrtc_identity_store_backend.cc
index e098841..dc247b7a 100644
--- a/content/browser/media/webrtc/webrtc_identity_store_backend.cc
+++ b/content/browser/media/webrtc/webrtc_identity_store_backend.cc
@@ -175,7 +175,7 @@
   // The file path of the DB. Empty if temporary.
   base::FilePath path_;
   scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
-  scoped_ptr<sql::Connection> db_;
+  std::unique_ptr<sql::Connection> db_;
   // Batched DB operations pending to commit.
   PendingOperationList pending_operations_;
 
@@ -210,7 +210,7 @@
     DCHECK_EQ(state_, NOT_STARTED);
 
     // Kick off loading the DB.
-    scoped_ptr<IdentityMap> out_map(new IdentityMap());
+    std::unique_ptr<IdentityMap> out_map(new IdentityMap());
     base::Closure task(
         base::Bind(&SqlLiteStorage::Load, sql_lite_storage_, out_map.get()));
     // |out_map| will be NULL after this call.
@@ -346,7 +346,8 @@
 
 WebRTCIdentityStoreBackend::~WebRTCIdentityStoreBackend() {}
 
-void WebRTCIdentityStoreBackend::OnLoaded(scoped_ptr<IdentityMap> out_map) {
+void WebRTCIdentityStoreBackend::OnLoaded(
+    std::unique_ptr<IdentityMap> out_map) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   if (state_ != LOADING)
@@ -514,7 +515,7 @@
   static const size_t kCommitAfterBatchSize = 512;
 
   // We do a full copy of the cert here, and hopefully just here.
-  scoped_ptr<PendingOperation> operation(
+  std::unique_ptr<PendingOperation> operation(
       new PendingOperation(type, origin, identity_name, identity));
 
   pending_operations_.push_back(operation.release());
diff --git a/content/browser/media/webrtc/webrtc_identity_store_backend.h b/content/browser/media/webrtc/webrtc_identity_store_backend.h
index 37a5d55..e0948b7 100644
--- a/content/browser/media/webrtc/webrtc_identity_store_backend.h
+++ b/content/browser/media/webrtc/webrtc_identity_store_backend.h
@@ -6,13 +6,13 @@
 #define CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_IDENTITY_STORE_BACKEND_H_
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 
 class GURL;
@@ -102,8 +102,7 @@
 
   ~WebRTCIdentityStoreBackend();
 
-  void OnLoaded(scoped_ptr<IdentityMap> out_map);
-
+  void OnLoaded(std::unique_ptr<IdentityMap> out_map);
 
   // Identities expires after |validity_period_|.
   base::TimeDelta validity_period_;
diff --git a/content/browser/media/webrtc/webrtc_identity_store_unittest.cc b/content/browser/media/webrtc/webrtc_identity_store_unittest.cc
index 2e9a4da..710861c 100644
--- a/content/browser/media/webrtc/webrtc_identity_store_unittest.cc
+++ b/content/browser/media/webrtc/webrtc_identity_store_unittest.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/media/webrtc/webrtc_identity_store.h"
+
+#include <memory>
+
 #include "base/bind.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/sequenced_worker_pool_owner.h"
-#include "content/browser/media/webrtc/webrtc_identity_store.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "content/public/test/test_utils.h"
 #include "net/base/net_errors.h"
@@ -84,7 +86,7 @@
 
  protected:
   TestBrowserThreadBundle browser_thread_bundle_;
-  scoped_ptr<base::SequencedWorkerPoolOwner> pool_owner_;
+  std::unique_ptr<base::SequencedWorkerPoolOwner> pool_owner_;
   scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_;
 };
 
@@ -384,7 +386,7 @@
   RunUntilIdle();
 
   // Verifies the corrupted table was razed.
-  scoped_ptr<sql::Connection> db(new sql::Connection());
+  std::unique_ptr<sql::Connection> db(new sql::Connection());
   EXPECT_TRUE(db->Open(db_path));
   EXPECT_EQ(0U, sql::test::CountSQLTables(db.get()));
 
diff --git a/content/browser/media/webrtc/webrtc_internals.cc b/content/browser/media/webrtc/webrtc_internals.cc
index aa10c5e4..1ebc884 100644
--- a/content/browser/media/webrtc/webrtc_internals.cc
+++ b/content/browser/media/webrtc/webrtc_internals.cc
@@ -40,7 +40,8 @@
 }  // namespace
 
 WebRTCInternals::PendingUpdate::PendingUpdate(
-    const std::string& command, scoped_ptr<base::Value> value)
+    const std::string& command,
+    std::unique_ptr<base::Value> value)
     : command_(command), value_(std::move(value)) {}
 
 WebRTCInternals::PendingUpdate::PendingUpdate(PendingUpdate&& other)
@@ -145,7 +146,7 @@
     CreateOrReleasePowerSaveBlocker();
 
     if (observers_.might_have_observers()) {
-      scoped_ptr<base::DictionaryValue> id(new base::DictionaryValue());
+      std::unique_ptr<base::DictionaryValue> id(new base::DictionaryValue());
       id->SetInteger("pid", static_cast<int>(pid));
       id->SetInteger("lid", lid);
       SendUpdate("removePeerConnection", std::move(id));
@@ -186,7 +187,8 @@
     log->Append(log_entry);
 
     if (observers_.might_have_observers()) {
-      scoped_ptr<base::DictionaryValue> update(new base::DictionaryValue());
+      std::unique_ptr<base::DictionaryValue> update(
+          new base::DictionaryValue());
       update->SetInteger("pid", static_cast<int>(pid));
       update->SetInteger("lid", lid);
       update->MergeDictionary(log_entry);
@@ -202,7 +204,7 @@
   if (!observers_.might_have_observers())
     return;
 
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("pid", static_cast<int>(pid));
   dict->SetInteger("lid", lid);
 
@@ -363,7 +365,7 @@
 }
 
 void WebRTCInternals::SendUpdate(const string& command,
-                                 scoped_ptr<base::Value> value) {
+                                 std::unique_ptr<base::Value> value) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(observers_.might_have_observers());
 
@@ -430,7 +432,8 @@
         record->GetInteger("lid", &lid);
         record->GetInteger("pid", &pid);
 
-        scoped_ptr<base::DictionaryValue> update(new base::DictionaryValue());
+        std::unique_ptr<base::DictionaryValue> update(
+            new base::DictionaryValue());
         update->SetInteger("lid", lid);
         update->SetInteger("pid", pid);
         SendUpdate("removePeerConnection", std::move(update));
@@ -457,7 +460,7 @@
   }
 
   if (found_any && observers_.might_have_observers()) {
-    scoped_ptr<base::DictionaryValue> update(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue());
     update->SetInteger("rid", render_process_id);
     SendUpdate("removeGetUserMediaForRenderer", std::move(update));
   }
diff --git a/content/browser/media/webrtc/webrtc_internals.h b/content/browser/media/webrtc/webrtc_internals.h
index 57c0e44..e319313d 100644
--- a/content/browser/media/webrtc/webrtc_internals.h
+++ b/content/browser/media/webrtc/webrtc_internals.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_INTERNALS_H_
 #define CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_INTERNALS_H_
 
+#include <memory>
 #include <queue>
 
 #include "base/containers/hash_tables.h"
 #include "base/gtest_prod_util.h"
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/process/process.h"
@@ -124,7 +124,8 @@
   FRIEND_TEST_ALL_PREFIXES(WebRtcInternalsTest,
                            AudioDebugRecordingsFileSelectionCanceled);
 
-  void SendUpdate(const std::string& command, scoped_ptr<base::Value> value);
+  void SendUpdate(const std::string& command,
+                  std::unique_ptr<base::Value> value);
 
   // RenderProcessHostObserver implementation.
   void RenderProcessHostDestroyed(RenderProcessHost* host) override;
@@ -201,7 +202,7 @@
   // While |peer_connection_data_| is non-empty, hold an instance of
   // PowerSaveBlocker.  This prevents the application from being suspended while
   // remoting.
-  scoped_ptr<PowerSaveBlocker> power_save_blocker_;
+  std::unique_ptr<PowerSaveBlocker> power_save_blocker_;
 
   // Set of render process hosts that |this| is registered as an observer on.
   base::hash_set<int> render_process_id_set_;
@@ -216,7 +217,8 @@
   // thread.
   class PendingUpdate {
    public:
-    PendingUpdate(const std::string& command, scoped_ptr<base::Value> value);
+    PendingUpdate(const std::string& command,
+                  std::unique_ptr<base::Value> value);
     PendingUpdate(PendingUpdate&& other);
     ~PendingUpdate();
 
@@ -226,7 +228,7 @@
    private:
     base::ThreadChecker thread_checker_;
     std::string command_;
-    scoped_ptr<base::Value> value_;
+    std::unique_ptr<base::Value> value_;
     DISALLOW_COPY_AND_ASSIGN(PendingUpdate);
   };
 
diff --git a/content/browser/media/webrtc/webrtc_internals_browsertest.cc b/content/browser/media/webrtc/webrtc_internals_browsertest.cc
index a266d03..854bf09 100644
--- a/content/browser/media/webrtc/webrtc_internals_browsertest.cc
+++ b/content/browser/media/webrtc/webrtc_internals_browsertest.cc
@@ -236,7 +236,7 @@
         "window.domAutomationController.send("
             "JSON.stringify(userMediaRequests));",
         &json_requests));
-    scoped_ptr<base::Value> value_requests =
+    std::unique_ptr<base::Value> value_requests =
         base::JSONReader::Read(json_requests);
 
     EXPECT_EQ(base::Value::TYPE_LIST, value_requests->GetType());
@@ -786,7 +786,7 @@
       "window.domAutomationController.send("
       "JSON.stringify(peerConnectionDataStore));",
       &dump_json));
-  scoped_ptr<base::Value> dump = base::JSONReader::Read(dump_json);
+  std::unique_ptr<base::Value> dump = base::JSONReader::Read(dump_json);
   VerifyPageDumpStructure(dump.get(),
                           2 /*peer_connection_number*/,
                           2 /*update_number*/,
diff --git a/content/browser/media/webrtc/webrtc_internals_unittest.cc b/content/browser/media/webrtc/webrtc_internals_unittest.cc
index a1ba7e73d..f3b048f 100644
--- a/content/browser/media/webrtc/webrtc_internals_unittest.cc
+++ b/content/browser/media/webrtc/webrtc_internals_unittest.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/scoped_ptr.h"
+#include "content/browser/media/webrtc/webrtc_internals.h"
+
+#include <memory>
+
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/values.h"
-#include "content/browser/media/webrtc/webrtc_internals.h"
 #include "content/browser/media/webrtc/webrtc_internals_ui_observer.h"
 #include "content/public/test/test_browser_thread.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -41,7 +43,7 @@
   }
 
   std::string command_;
-  scoped_ptr<base::Value> value_;
+  std::unique_ptr<base::Value> value_;
   base::RunLoop* loop_;
 };
 
diff --git a/content/browser/renderer_host/media/audio_input_debug_writer.cc b/content/browser/renderer_host/media/audio_input_debug_writer.cc
index d00cebf5..7866c651 100644
--- a/content/browser/renderer_host/media/audio_input_debug_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_debug_writer.cc
@@ -146,7 +146,7 @@
   WriteHeader();
 }
 
-void AudioInputDebugWriter::Write(scoped_ptr<media::AudioBus> data) {
+void AudioInputDebugWriter::Write(std::unique_ptr<media::AudioBus> data) {
   BrowserThread::PostTask(
       BrowserThread::FILE,
       FROM_HERE,
@@ -155,7 +155,7 @@
                  base::Passed(&data)));
 }
 
-void AudioInputDebugWriter::DoWrite(scoped_ptr<media::AudioBus> data) {
+void AudioInputDebugWriter::DoWrite(std::unique_ptr<media::AudioBus> data) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   // Convert to 16 bit audio and write to file.
   int data_size = data->frames() * data->channels();
diff --git a/content/browser/renderer_host/media/audio_input_debug_writer.h b/content/browser/renderer_host/media/audio_input_debug_writer.h
index 208c7b2..0741001 100644
--- a/content/browser/renderer_host/media/audio_input_debug_writer.h
+++ b/content/browser/renderer_host/media/audio_input_debug_writer.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/files/file.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/move.h"
 #include "content/common/content_export.h"
@@ -38,11 +39,11 @@
   ~AudioInputDebugWriter() override;
 
   // Write data from |data| to file.
-  void Write(scoped_ptr<media::AudioBus> data) override;
+  void Write(std::unique_ptr<media::AudioBus> data) override;
 
  private:
   // Write data from |data| to file. Called on the FILE thread.
-  void DoWrite(scoped_ptr<media::AudioBus> data);
+  void DoWrite(std::unique_ptr<media::AudioBus> data);
 
   // Write wave header to file. Called on the FILE thread twice: on construction
   // of AudioInputDebugWriter size of the wave data is unknown, so the header is
@@ -60,7 +61,7 @@
   media::AudioParameters params_;
 
   // Intermediate buffer to be written to file. Interleaved 16 bit audio data.
-  scoped_ptr<int16_t[]> interleaved_data_;
+  std::unique_ptr<int16_t[]> interleaved_data_;
   int interleaved_data_size_;
 
   base::WeakPtrFactory<AudioInputDebugWriter> weak_factory_;
diff --git a/content/browser/renderer_host/media/audio_input_debug_writer_unittest.cc b/content/browser/renderer_host/media/audio_input_debug_writer_unittest.cc
index 0a94b0ff..ee8b5d5c 100644
--- a/content/browser/renderer_host/media/audio_input_debug_writer_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_debug_writer_unittest.cc
@@ -133,7 +133,8 @@
     VerifyHeader(wav_header, params_, writes_, file.GetLength());
 
     if (source_samples_ > 0) {
-      scoped_ptr<int16_t[]> result_interleaved(new int16_t[source_samples_]);
+      std::unique_ptr<int16_t[]> result_interleaved(
+          new int16_t[source_samples_]);
       memset(result_interleaved.get(), 0, source_samples_ * kBytesPerSample);
 
       // Recording is read from file as a byte sequence, so it stored as
@@ -164,7 +165,7 @@
         new AudioInputDebugWriter(std::move(file), params_));
     // Write tasks are posted to BrowserThread::FILE.
     for (int i = 0; i < writes_; ++i) {
-      scoped_ptr<media::AudioBus> bus = media::AudioBus::Create(
+      std::unique_ptr<media::AudioBus> bus = media::AudioBus::Create(
           params_.channels(), params_.frames_per_buffer());
 
       bus->FromInterleaved(
@@ -192,7 +193,7 @@
   TestBrowserThreadBundle thread_bundle_;
 
   // Writer under test.
-  scoped_ptr<AudioInputDebugWriter> input_debug_writer_;
+  std::unique_ptr<AudioInputDebugWriter> input_debug_writer_;
 
   // AudioBus parameters.
   media::AudioParameters params_;
@@ -204,7 +205,7 @@
   int source_samples_;
 
   // Source data.
-  scoped_ptr<int16_t[]> source_interleaved_;
+  std::unique_ptr<int16_t[]> source_interleaved_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(AudioInputDebugWriterTest);
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 65148e0..72f8ee0 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -4,8 +4,9 @@
 
 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
 
+#include <memory>
+
 #include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "build/build_config.h"
 #include "content/public/browser/browser_thread.h"
@@ -172,7 +173,7 @@
     audio_manager_->GetAudioInputDeviceNames(&device_names);
   }
 
-  scoped_ptr<StreamDeviceInfoArray> devices(new StreamDeviceInfoArray());
+  std::unique_ptr<StreamDeviceInfoArray> devices(new StreamDeviceInfoArray());
   for (media::AudioDeviceNames::iterator it = device_names.begin();
        it != device_names.end(); ++it) {
     // Add device information to device vector.
@@ -241,7 +242,7 @@
 
 void AudioInputDeviceManager::DevicesEnumeratedOnIOThread(
     MediaStreamType stream_type,
-    scoped_ptr<StreamDeviceInfoArray> devices) {
+    std::unique_ptr<StreamDeviceInfoArray> devices) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   // Ensure that |devices| gets deleted on exit.
   if (listener_)
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h
index d3f01b3..0f58242f 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.h
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h
@@ -84,8 +84,9 @@
 
   // Callback used by EnumerateOnDeviceThread(), called with a list of
   // enumerated devices on IO thread.
-  void DevicesEnumeratedOnIOThread(MediaStreamType stream_type,
-                                   scoped_ptr<StreamDeviceInfoArray> devices);
+  void DevicesEnumeratedOnIOThread(
+      MediaStreamType stream_type,
+      std::unique_ptr<StreamDeviceInfoArray> devices);
   // Callback used by OpenOnDeviceThread(), called with the session_id
   // referencing the opened device on IO thread.
   void OpenedOnIOThread(int session_id, const StreamDeviceInfo& info);
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index 4fac69d..dd387bbd 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -2,20 +2,21 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/renderer_host/media/audio_input_device_manager.h"
+
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/waitable_event.h"
 #include "build/build_config.h"
 #include "content/browser/browser_thread_impl.h"
-#include "content/browser/renderer_host/media/audio_input_device_manager.h"
 #include "content/public/common/media_stream_request.h"
 #include "media/audio/audio_manager_base.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -94,11 +95,11 @@
     io_thread_.reset();
   }
 
-  scoped_ptr<base::MessageLoop> message_loop_;
-  scoped_ptr<BrowserThreadImpl> io_thread_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<BrowserThreadImpl> io_thread_;
   scoped_refptr<AudioInputDeviceManager> manager_;
-  scoped_ptr<MockAudioInputDeviceManagerListener> audio_input_listener_;
-  scoped_ptr<media::AudioManager> audio_manager_;
+  std::unique_ptr<MockAudioInputDeviceManagerListener> audio_input_listener_;
+  std::unique_ptr<media::AudioManager> audio_manager_;
   StreamDeviceInfoArray devices_;
 
  private:
@@ -141,7 +142,7 @@
   InSequence s;
 
   int index = 0;
-  scoped_ptr<int[]> session_id(new int[devices_.size()]);
+  std::unique_ptr<int[]> session_id(new int[devices_.size()]);
 
   // Opens the devices in a loop.
   for (StreamDeviceInfoArray::const_iterator iter = devices_.begin();
@@ -238,7 +239,7 @@
   InSequence s;
 
   int index = 0;
-  scoped_ptr<int[]> session_id(new int[devices_.size()]);
+  std::unique_ptr<int[]> session_id(new int[devices_.size()]);
 
   // Loops through the devices and calls Open()/Close()/GetOpenedDeviceInfoById
   // for each device.
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 8f05a86..2d8a89a 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -66,7 +66,7 @@
 }
 
 void DeleteInputDebugWriterOnFileThread(
-    scoped_ptr<AudioInputDebugWriter> writer) {
+    std::unique_ptr<AudioInputDebugWriter> writer) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   // |writer| must be closed and destroyed on FILE thread.
 }
@@ -91,11 +91,11 @@
 
   // The synchronous writer to be used by the controller. We have the
   // ownership of the writer.
-  scoped_ptr<AudioInputSyncWriter> writer;
+  std::unique_ptr<AudioInputSyncWriter> writer;
 
   // Must be deleted on the file thread. Must be posted for deletion and nulled
   // before the AudioEntry is deleted.
-  scoped_ptr<AudioInputDebugWriter> input_debug_writer;
+  std::unique_ptr<AudioInputDebugWriter> input_debug_writer;
 
   // Set to true after we called Close() for the controller.
   bool pending_close;
@@ -403,7 +403,7 @@
   }
 
   // Create a new AudioEntry structure.
-  scoped_ptr<AudioEntry> entry(new AudioEntry());
+  std::unique_ptr<AudioEntry> entry(new AudioEntry());
 
   const uint32_t segment_size =
       (sizeof(media::AudioInputBufferParameters) +
@@ -422,7 +422,7 @@
     return;
   }
 
-  scoped_ptr<AudioInputSyncWriter> writer(new AudioInputSyncWriter(
+  std::unique_ptr<AudioInputSyncWriter> writer(new AudioInputSyncWriter(
       entry->shared_memory.memory(), entry->shared_memory.requested_size(),
       entry->shared_memory_segment_count, audio_params));
 
@@ -601,7 +601,7 @@
 #endif
 
   // Delete the entry when this method goes out of scope.
-  scoped_ptr<AudioEntry> entry_deleter(entry);
+  std::unique_ptr<AudioEntry> entry_deleter(entry);
 
   // Erase the entry from the map.
   audio_entries_.erase(entry->stream_id);
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.h b/content/browser/renderer_host/media/audio_input_renderer_host.h
index dd54996..cd6ed9d 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.h
@@ -24,15 +24,15 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
 
-#include <map>
-#include <string>
-
 #include <stdint.h>
 
+#include <map>
+#include <memory>
+#include <string>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/process/process.h"
 #include "base/sequenced_task_runner_helpers.h"
@@ -259,7 +259,7 @@
   // Raw pointer of the UserInputMonitor.
   media::UserInputMonitor* user_input_monitor_;
 
-  scoped_ptr<media::AudioLog> audio_log_;
+  std::unique_ptr<media::AudioLog> audio_log_;
 
   base::WeakPtrFactory<AudioInputRendererHost> weak_factory_;
 
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index 5cd755da..caa3261 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -61,7 +61,7 @@
     CHECK_EQ(0U, reinterpret_cast<uintptr_t>(ptr) &
         (AudioBus::kChannelAlignment - 1));
     AudioInputBuffer* buffer = reinterpret_cast<AudioInputBuffer*>(ptr);
-    scoped_ptr<AudioBus> audio_bus =
+    std::unique_ptr<AudioBus> audio_bus =
         AudioBus::WrapMemory(params, buffer->audio);
     audio_buses_.push_back(std::move(audio_bus));
     ptr += shared_memory_segment_size_;
@@ -132,7 +132,8 @@
   // writing. We verify that each buffer index is in sequence.
   size_t number_of_indices_available = socket_->Peek() / sizeof(uint32_t);
   if (number_of_indices_available > 0) {
-    scoped_ptr<uint32_t[]> indices(new uint32_t[number_of_indices_available]);
+    std::unique_ptr<uint32_t[]> indices(
+        new uint32_t[number_of_indices_available]);
     size_t bytes_received = socket_->Receive(
         &indices[0],
         number_of_indices_available * sizeof(indices[0]));
@@ -249,7 +250,7 @@
   overflow_params_.push_back(params);
 
   // Push audio data to fifo.
-  scoped_ptr<AudioBus> audio_bus =
+  std::unique_ptr<AudioBus> audio_bus =
       AudioBus::Create(data->channels(), data->frames());
   data->CopyTo(audio_bus.get());
   overflow_buses_.push_back(std::move(audio_bus));
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.h b/content/browser/renderer_host/media/audio_input_sync_writer.h
index 8429e44e..43290163 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.h
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.h
@@ -59,7 +59,7 @@
 
  protected:
   // Socket for transmitting audio data.
-  scoped_ptr<base::CancelableSyncSocket> socket_;
+  std::unique_ptr<base::CancelableSyncSocket> socket_;
 
  private:
   friend class AudioInputSyncWriterTest;
@@ -107,7 +107,7 @@
 
   // Socket to be used by the renderer. The reference is released after
   // PrepareForeignSocketHandle() is called and ran successfully.
-  scoped_ptr<base::CancelableSyncSocket> foreign_socket_;
+  std::unique_ptr<base::CancelableSyncSocket> foreign_socket_;
 
   // The time of the creation of this object.
   base::Time creation_time_;
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc b/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc
index d691b22..0fdf3420 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc
@@ -2,16 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/renderer_host/media/audio_input_sync_writer.h"
+
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sync_socket.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
-#include "content/browser/renderer_host/media/audio_input_sync_writer.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "media/audio/audio_parameters.h"
 #include "media/base/audio_bus.h"
@@ -181,9 +183,9 @@
   }
 
  protected:
-  scoped_ptr<AudioInputSyncWriterUnderTest> writer_;
+  std::unique_ptr<AudioInputSyncWriterUnderTest> writer_;
   MockCancelableSyncSocket* socket_;
-  scoped_ptr<AudioBus> audio_bus_;
+  std::unique_ptr<AudioBus> audio_bus_;
 
  private:
   TestBrowserThreadBundle thread_bundle_;
diff --git a/content/browser/renderer_host/media/audio_output_device_enumerator.h b/content/browser/renderer_host/media/audio_output_device_enumerator.h
index afb8204..1de0ea80 100644
--- a/content/browser/renderer_host/media/audio_output_device_enumerator.h
+++ b/content/browser/renderer_host/media/audio_output_device_enumerator.h
@@ -12,13 +12,14 @@
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DEVICE_ENUMERATOR_H_
 
 #include <stdint.h>
+
 #include <list>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc b/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
index ac6140c..f84f87e2 100644
--- a/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
+++ b/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
@@ -2,18 +2,19 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/renderer_host/media/audio_output_device_enumerator.h"
+
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/thread_task_runner_handle.h"
-#include "content/browser/renderer_host/media/audio_output_device_enumerator.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "media/audio/audio_manager_base.h"
 #include "media/audio/fake_audio_log_factory.h"
@@ -118,7 +119,7 @@
   }
 
  protected:
-  scoped_ptr<MockAudioManager> audio_manager_;
+  std::unique_ptr<MockAudioManager> audio_manager_;
   TestBrowserThreadBundle thread_bundle_;
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
   base::RunLoop run_loop_;
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index eadd484..20d5215 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -130,8 +130,8 @@
              int render_frame_id,
              const media::AudioParameters& params,
              const std::string& output_device_id,
-             scoped_ptr<base::SharedMemory> shared_memory,
-             scoped_ptr<media::AudioOutputController::SyncReader> reader);
+             std::unique_ptr<base::SharedMemory> shared_memory,
+             std::unique_ptr<media::AudioOutputController::SyncReader> reader);
   ~AudioEntry() override;
 
   int stream_id() const {
@@ -167,10 +167,10 @@
   const int render_frame_id_;
 
   // Shared memory for transmission of the audio data.  Used by |reader_|.
-  const scoped_ptr<base::SharedMemory> shared_memory_;
+  const std::unique_ptr<base::SharedMemory> shared_memory_;
 
   // The synchronous reader to be used by |controller_|.
-  const scoped_ptr<media::AudioOutputController::SyncReader> reader_;
+  const std::unique_ptr<media::AudioOutputController::SyncReader> reader_;
 
   // The AudioOutputController that manages the audio stream.
   const scoped_refptr<media::AudioOutputController> controller_;
@@ -184,8 +184,8 @@
     int render_frame_id,
     const media::AudioParameters& params,
     const std::string& output_device_id,
-    scoped_ptr<base::SharedMemory> shared_memory,
-    scoped_ptr<media::AudioOutputController::SyncReader> reader)
+    std::unique_ptr<base::SharedMemory> shared_memory,
+    std::unique_ptr<media::AudioOutputController::SyncReader> reader)
     : host_(host),
       stream_id_(stream_id),
       render_frame_id_(render_frame_id),
@@ -564,13 +564,13 @@
   // Create the shared memory and share with the renderer process.
   uint32_t shared_memory_size = sizeof(media::AudioOutputBufferParameters) +
                                 AudioBus::CalculateMemorySize(params);
-  scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory());
+  std::unique_ptr<base::SharedMemory> shared_memory(new base::SharedMemory());
   if (!shared_memory->CreateAndMapAnonymous(shared_memory_size)) {
     SendErrorMessage(stream_id);
     return;
   }
 
-  scoped_ptr<AudioSyncReader> reader(
+  std::unique_ptr<AudioSyncReader> reader(
       new AudioSyncReader(shared_memory.get(), params));
   if (!reader->Init()) {
     SendErrorMessage(stream_id);
@@ -582,7 +582,7 @@
   if (media_observer)
     media_observer->OnCreatingAudioStream(render_process_id_, render_frame_id);
 
-  scoped_ptr<AudioEntry> entry(
+  std::unique_ptr<AudioEntry> entry(
       new AudioEntry(this, stream_id, render_frame_id, params, device_unique_id,
                      std::move(shared_memory), std::move(reader)));
   if (mirroring_manager_) {
@@ -656,7 +656,7 @@
   AudioEntryMap::iterator i = audio_entries_.find(stream_id);
   if (i == audio_entries_.end())
     return;
-  scoped_ptr<AudioEntry> entry(i->second);
+  std::unique_ptr<AudioEntry> entry(i->second);
   audio_entries_.erase(i);
   g_audio_streams_tracker.Get().DecreaseStreamCount();
 
@@ -666,7 +666,7 @@
   audio_log_->OnClosed(stream_id);
 }
 
-void AudioRendererHost::DeleteEntry(scoped_ptr<AudioEntry> entry) {
+void AudioRendererHost::DeleteEntry(std::unique_ptr<AudioEntry> entry) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   // De-register the controller from the AudioMirroringManager now that the
@@ -771,7 +771,7 @@
   } else {
     // Check that MediaStream device permissions have been granted,
     // hence the use of a MediaStreamUIProxy.
-    scoped_ptr<MediaStreamUIProxy> ui_proxy = MediaStreamUIProxy::Create();
+    std::unique_ptr<MediaStreamUIProxy> ui_proxy = MediaStreamUIProxy::Create();
 
     // Use MEDIA_DEVICE_AUDIO_CAPTURE instead of MEDIA_DEVICE_AUDIO_OUTPUT
     // because MediaStreamUIProxy::CheckAccess does not currently support
@@ -785,9 +785,10 @@
   }
 }
 
-void AudioRendererHost::AccessChecked(scoped_ptr<MediaStreamUIProxy> ui_proxy,
-                                      const OutputDeviceAccessCB& callback,
-                                      bool have_access) {
+void AudioRendererHost::AccessChecked(
+    std::unique_ptr<MediaStreamUIProxy> ui_proxy,
+    const OutputDeviceAccessCB& callback,
+    bool have_access) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   callback.Run(have_access);
 }
diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h
index e549df20..b4e9d3f 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_renderer_host.h
@@ -40,17 +40,17 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
 
+#include <stddef.h>
+
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 
-#include <stddef.h>
-
 #include "base/atomic_ref_count.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/process/process.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "content/browser/renderer_host/media/audio_output_device_enumerator.h"
@@ -203,7 +203,7 @@
 
   // Delete an audio entry, notifying observers first.  This is called by
   // AudioOutputController after it has closed.
-  void DeleteEntry(scoped_ptr<AudioEntry> entry);
+  void DeleteEntry(std::unique_ptr<AudioEntry> entry);
 
   // Send an error message to the renderer, then close the stream.
   void ReportErrorAndClose(int stream_id);
@@ -223,7 +223,7 @@
                                const OutputDeviceAccessCB& callback);
 
   // Invoke |callback| after permission to use a device has been checked.
-  void AccessChecked(scoped_ptr<MediaStreamUIProxy> ui_proxy,
+  void AccessChecked(std::unique_ptr<MediaStreamUIProxy> ui_proxy,
                      const OutputDeviceAccessCB& callback,
                      bool have_access);
 
@@ -242,7 +242,7 @@
 
   media::AudioManager* const audio_manager_;
   AudioMirroringManager* const mirroring_manager_;
-  scoped_ptr<media::AudioLog> audio_log_;
+  std::unique_ptr<media::AudioLog> audio_log_;
 
   // Used to access to AudioInputDeviceManager.
   MediaStreamManager* media_stream_manager_;
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 5cbf383e..3e3b4f3d 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -2,18 +2,20 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/renderer_host/media/audio_renderer_host.h"
+
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/sync_socket.h"
 #include "content/browser/media/capture/audio_mirroring_manager.h"
 #include "content/browser/media/media_internals.h"
 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
-#include "content/browser/renderer_host/media/audio_renderer_host.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/common/media/audio_messages.h"
 #include "content/public/common/content_switches.h"
@@ -157,8 +159,8 @@
     }
   }
 
-  scoped_ptr<base::SharedMemory> shared_memory_;
-  scoped_ptr<base::SyncSocket> sync_socket_;
+  std::unique_ptr<base::SharedMemory> shared_memory_;
+  std::unique_ptr<base::SyncSocket> sync_socket_;
   uint32_t shared_memory_length_;
 
   DISALLOW_COPY_AND_ASSIGN(MockAudioRendererHost);
@@ -321,9 +323,9 @@
  private:
   // MediaStreamManager uses a DestructionObserver, so it must outlive the
   // TestBrowserThreadBundle.
-  scoped_ptr<MediaStreamManager> media_stream_manager_;
+  std::unique_ptr<MediaStreamManager> media_stream_manager_;
   TestBrowserThreadBundle thread_bundle_;
-  scoped_ptr<media::AudioManager> audio_manager_;
+  std::unique_ptr<media::AudioManager> audio_manager_;
   MockAudioMirroringManager mirroring_manager_;
   scoped_refptr<MockAudioRendererHost> host_;
 
diff --git a/content/browser/renderer_host/media/audio_sync_reader.h b/content/browser/renderer_host/media/audio_sync_reader.h
index 4f658a3..05c68e9d2 100644
--- a/content/browser/renderer_host/media/audio_sync_reader.h
+++ b/content/browser/renderer_host/media/audio_sync_reader.h
@@ -59,14 +59,14 @@
   const bool mute_audio_;
 
   // Socket for transmitting audio data.
-  scoped_ptr<base::CancelableSyncSocket> socket_;
+  std::unique_ptr<base::CancelableSyncSocket> socket_;
 
   // Socket to be used by the renderer. The reference is released after
   // PrepareForeignSocketHandle() is called and ran successfully.
-  scoped_ptr<base::CancelableSyncSocket> foreign_socket_;
+  std::unique_ptr<base::CancelableSyncSocket> foreign_socket_;
 
   // Shared memory wrapper used for transferring audio data to Read() callers.
-  scoped_ptr<media::AudioBus> output_bus_;
+  std::unique_ptr<media::AudioBus> output_bus_;
 
   // Maximum amount of audio data which can be transferred in one Read() call.
   const int packet_size_;
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index 9fee099..0c18286 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -288,7 +288,7 @@
       EXPECT_CALL(*stream_ui_, OnStarted(_, _));
     }
     media_stream_manager_->UseFakeUIForTests(
-      scoped_ptr<FakeMediaStreamUIProxy>(stream_ui_));
+        std::unique_ptr<FakeMediaStreamUIProxy>(stream_ui_));
   }
 
   void GenerateStreamAndWaitForResult(int render_frame_id,
@@ -422,11 +422,11 @@
   }
 
   scoped_refptr<MockMediaStreamDispatcherHost> host_;
-  scoped_ptr<media::AudioManager> audio_manager_;
-  scoped_ptr<MediaStreamManager> media_stream_manager_;
+  std::unique_ptr<media::AudioManager> audio_manager_;
+  std::unique_ptr<MediaStreamManager> media_stream_manager_;
   MockMediaStreamUIProxy* stream_ui_;
   ContentBrowserClient* old_browser_client_;
-  scoped_ptr<ContentClient> content_client_;
+  std::unique_ptr<ContentClient> content_client_;
   content::TestBrowserThreadBundle thread_bundle_;
   content::TestBrowserContext browser_context_;
   media::AudioDeviceNames physical_audio_devices_;
@@ -846,7 +846,8 @@
   StreamControls controls(false, true);
 
   base::Closure close_callback;
-  scoped_ptr<MockMediaStreamUIProxy> stream_ui(new MockMediaStreamUIProxy());
+  std::unique_ptr<MockMediaStreamUIProxy> stream_ui(
+      new MockMediaStreamUIProxy());
   EXPECT_CALL(*stream_ui, OnStarted(_, _))
       .WillOnce(SaveArg<0>(&close_callback));
   media_stream_manager_->UseFakeUIForTests(std::move(stream_ui));
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index cc5fe39..6d1f005 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -283,7 +283,7 @@
   }
 
   bool HasUIRequest() const { return ui_request_.get() != nullptr; }
-  scoped_ptr<MediaStreamRequest> DetachUIRequest() {
+  std::unique_ptr<MediaStreamRequest> DetachUIRequest() {
     return std::move(ui_request_);
   }
 
@@ -347,13 +347,13 @@
   // Currently it is only used by |DEVICE_ACCESS| type.
   MediaStreamManager::MediaRequestResponseCallback callback;
 
-  scoped_ptr<MediaStreamUIProxy> ui_proxy;
+  std::unique_ptr<MediaStreamUIProxy> ui_proxy;
 
   std::string tab_capture_device_id;
 
  private:
   std::vector<MediaRequestState> state_;
-  scoped_ptr<MediaStreamRequest> ui_request_;
+  std::unique_ptr<MediaStreamRequest> ui_request_;
   MediaStreamType audio_type_;
   MediaStreamType video_type_;
   int target_process_id_;
@@ -1106,7 +1106,7 @@
   for (DeviceRequests::iterator request_it = requests_.begin();
        request_it != requests_.end(); ++request_it) {
     if (request_it->first == label) {
-      scoped_ptr<DeviceRequest> request(request_it->second);
+      std::unique_ptr<DeviceRequest> request(request_it->second);
       requests_.erase(request_it);
       return;
     }
@@ -1792,7 +1792,7 @@
 }
 
 void MediaStreamManager::UseFakeUIForTests(
-    scoped_ptr<FakeMediaStreamUIProxy> fake_ui) {
+    std::unique_ptr<FakeMediaStreamUIProxy> fake_ui) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   use_fake_ui_ = true;
   fake_ui_ = std::move(fake_ui);
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index 653e055..52c3fa7 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -28,12 +28,12 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/power_monitor/power_observer.h"
 #include "base/system_monitor/system_monitor.h"
@@ -72,7 +72,7 @@
  public:
   // Callback to deliver the result of a media request.
   typedef base::Callback<void(const MediaStreamDevices& devices,
-                              scoped_ptr<MediaStreamUIProxy> ui)>
+                              std::unique_ptr<MediaStreamUIProxy> ui)>
       MediaRequestResponseCallback;
 
   // Adds |message| to native logs for outstanding device requests, for use by
@@ -212,7 +212,7 @@
 
   // Called by the tests to specify a fake UI that should be used for next
   // generated stream (or when using --use-fake-ui-for-media-stream).
-  void UseFakeUIForTests(scoped_ptr<FakeMediaStreamUIProxy> fake_ui);
+  void UseFakeUIForTests(std::unique_ptr<FakeMediaStreamUIProxy> fake_ui);
 
   // Register and unregister a new callback for receiving native log entries.
   // The registered callback will be invoked on the IO thread.
@@ -410,7 +410,7 @@
   media::AudioManager* const audio_manager_;  // not owned
   scoped_refptr<AudioInputDeviceManager> audio_input_device_manager_;
   scoped_refptr<VideoCaptureManager> video_capture_manager_;
-  scoped_ptr<AudioOutputDeviceEnumerator> audio_output_device_enumerator_;
+  std::unique_ptr<AudioOutputDeviceEnumerator> audio_output_device_enumerator_;
 #if defined(OS_WIN)
   base::Thread video_capture_thread_;
 #endif
@@ -431,7 +431,7 @@
   DeviceRequests requests_;
 
   bool use_fake_ui_;
-  scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
+  std::unique_ptr<FakeMediaStreamUIProxy> fake_ui_;
 
   // Maps render process hosts to log callbacks. Used on the IO thread.
   std::map<int, base::Callback<void(const std::string&)>> log_callbacks_;
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
index a48700a..9c60632 100644
--- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -190,7 +190,7 @@
   MOCK_METHOD1(Response, void(int index));
   void ResponseCallback(int index,
                         const MediaStreamDevices& devices,
-                        scoped_ptr<MediaStreamUIProxy> ui_proxy) {
+                        std::unique_ptr<MediaStreamUIProxy> ui_proxy) {
     Response(index);
     task_runner_->PostTask(FROM_HERE, run_loop_.QuitClosure());
   }
@@ -210,8 +210,8 @@
         security_origin, callback);
   }
 
-  scoped_ptr<MockAudioManager> audio_manager_;
-  scoped_ptr<MediaStreamManager> media_stream_manager_;
+  std::unique_ptr<MockAudioManager> audio_manager_;
+  std::unique_ptr<MediaStreamManager> media_stream_manager_;
   content::TestBrowserThreadBundle thread_bundle_;
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
   base::RunLoop run_loop_;
diff --git a/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc b/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc
index f21618f4..f0f93b4 100644
--- a/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc
@@ -70,10 +70,10 @@
                                   std::string());
   }
 
-  scoped_ptr<base::MessageLoop> message_loop_;
-  scoped_ptr<BrowserThreadImpl> ui_thread_;
-  scoped_ptr<BrowserThreadImpl> io_thread_;
-  scoped_ptr<MediaStreamUIController> ui_controller_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<BrowserThreadImpl> ui_thread_;
+  std::unique_ptr<BrowserThreadImpl> io_thread_;
+  std::unique_ptr<MediaStreamUIController> ui_controller_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceUIControllerTest);
@@ -97,7 +97,7 @@
 }
 
 TEST_F(MediaStreamDeviceUIControllerTest, HandleRequestUsingFakeUI) {
-  ui_controller_->UseFakeUI(scoped_ptr<MediaStreamUI>());
+  ui_controller_->UseFakeUI(std::unique_ptr<MediaStreamUI>());
 
   const std::string label = "label";
   CreateDummyRequest(label, true, true);
@@ -111,7 +111,7 @@
 }
 
 TEST_F(MediaStreamDeviceUIControllerTest, CreateRequestsAndCancelTheFirst) {
-  ui_controller_->UseFakeUI(scoped_ptr<MediaStreamUI>());
+  ui_controller_->UseFakeUI(std::unique_ptr<MediaStreamUI>());
 
   // Create the first audio request.
   const std::string label_1 = "label_1";
@@ -139,7 +139,7 @@
 }
 
 TEST_F(MediaStreamDeviceUIControllerTest, CreateRequestsAndCancelTheLast) {
-  ui_controller_->UseFakeUI(scoped_ptr<MediaStreamUI>());
+  ui_controller_->UseFakeUI(std::unique_ptr<MediaStreamUI>());
 
   // Create the first audio request.
   const std::string label_1 = "label_1";
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy.cc b/content/browser/renderer_host/media/media_stream_ui_proxy.cc
index 6cecbec..79ae89de 100644
--- a/content/browser/renderer_host/media/media_stream_ui_proxy.cc
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy.cc
@@ -45,7 +45,7 @@
                 RenderFrameHostDelegate* test_render_delegate);
   ~Core();
 
-  void RequestAccess(scoped_ptr<MediaStreamRequest> request);
+  void RequestAccess(std::unique_ptr<MediaStreamRequest> request);
   bool CheckAccess(const GURL& security_origin,
                    MediaStreamType type,
                    int process_id,
@@ -55,13 +55,13 @@
  private:
   void ProcessAccessRequestResponse(const MediaStreamDevices& devices,
                                     content::MediaStreamRequestResult result,
-                                    scoped_ptr<MediaStreamUI> stream_ui);
+                                    std::unique_ptr<MediaStreamUI> stream_ui);
   void ProcessStopRequestFromUI();
   RenderFrameHostDelegate* GetRenderFrameHostDelegate(int render_process_id,
                                                       int render_frame_id);
 
   base::WeakPtr<MediaStreamUIProxy> proxy_;
-  scoped_ptr<MediaStreamUI> ui_;
+  std::unique_ptr<MediaStreamUI> ui_;
 
   RenderFrameHostDelegate* const test_render_delegate_;
 
@@ -84,7 +84,7 @@
 }
 
 void MediaStreamUIProxy::Core::RequestAccess(
-    scoped_ptr<MediaStreamRequest> request) {
+    std::unique_ptr<MediaStreamRequest> request) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   RenderFrameHostDelegate* render_delegate = GetRenderFrameHostDelegate(
@@ -94,7 +94,7 @@
   if (!render_delegate) {
     ProcessAccessRequestResponse(MediaStreamDevices(),
                                  MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN,
-                                 scoped_ptr<MediaStreamUI>());
+                                 std::unique_ptr<MediaStreamUI>());
     return;
   }
   SetAndCheckAncestorFlag(request.get());
@@ -129,7 +129,7 @@
 void MediaStreamUIProxy::Core::ProcessAccessRequestResponse(
     const MediaStreamDevices& devices,
     content::MediaStreamRequestResult result,
-    scoped_ptr<MediaStreamUI> stream_ui) {
+    std::unique_ptr<MediaStreamUI> stream_ui) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   ui_ = std::move(stream_ui);
@@ -158,14 +158,14 @@
 }
 
 // static
-scoped_ptr<MediaStreamUIProxy> MediaStreamUIProxy::Create() {
-  return scoped_ptr<MediaStreamUIProxy>(new MediaStreamUIProxy(NULL));
+std::unique_ptr<MediaStreamUIProxy> MediaStreamUIProxy::Create() {
+  return std::unique_ptr<MediaStreamUIProxy>(new MediaStreamUIProxy(NULL));
 }
 
 // static
-scoped_ptr<MediaStreamUIProxy> MediaStreamUIProxy::CreateForTests(
+std::unique_ptr<MediaStreamUIProxy> MediaStreamUIProxy::CreateForTests(
     RenderFrameHostDelegate* render_delegate) {
-  return scoped_ptr<MediaStreamUIProxy>(
+  return std::unique_ptr<MediaStreamUIProxy>(
       new MediaStreamUIProxy(render_delegate));
 }
 
@@ -181,7 +181,7 @@
 }
 
 void MediaStreamUIProxy::RequestAccess(
-    scoped_ptr<MediaStreamRequest> request,
+    std::unique_ptr<MediaStreamRequest> request,
     const ResponseCallback& response_callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
@@ -290,7 +290,7 @@
 }
 
 void FakeMediaStreamUIProxy::RequestAccess(
-    scoped_ptr<MediaStreamRequest> request,
+    std::unique_ptr<MediaStreamRequest> request,
     const ResponseCallback& response_callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy.h b/content/browser/renderer_host/media/media_stream_ui_proxy.h
index 0c2eaea..a89d35b8 100644
--- a/content/browser/renderer_host/media/media_stream_ui_proxy.h
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/media_stream_request.h"
@@ -28,8 +29,8 @@
 
   typedef base::Callback<void(gfx::NativeViewId window_id)> WindowIdCallback;
 
-  static scoped_ptr<MediaStreamUIProxy> Create();
-  static scoped_ptr<MediaStreamUIProxy> CreateForTests(
+  static std::unique_ptr<MediaStreamUIProxy> Create();
+  static std::unique_ptr<MediaStreamUIProxy> CreateForTests(
       RenderFrameHostDelegate* render_delegate);
 
   virtual ~MediaStreamUIProxy();
@@ -38,7 +39,7 @@
   // WebContentsDelegate::RequestMediaAccessPermission(). The specified
   // |response_callback| is called when the WebContentsDelegate approves or
   // denies request.
-  virtual void RequestAccess(scoped_ptr<MediaStreamRequest> request,
+  virtual void RequestAccess(std::unique_ptr<MediaStreamRequest> request,
                              const ResponseCallback& response_callback);
 
   // Checks if we have permission to access the microphone or camera. Note that
@@ -78,7 +79,7 @@
   void OnCheckedAccess(const base::Callback<void(bool)>& callback,
                        bool have_access);
 
-  scoped_ptr<Core, content::BrowserThread::DeleteOnUIThread> core_;
+  std::unique_ptr<Core, content::BrowserThread::DeleteOnUIThread> core_;
   ResponseCallback response_callback_;
   base::Closure stop_callback_;
 
@@ -97,7 +98,7 @@
   void SetCameraAccess(bool access);
 
   // MediaStreamUIProxy overrides.
-  void RequestAccess(scoped_ptr<MediaStreamRequest> request,
+  void RequestAccess(std::unique_ptr<MediaStreamRequest> request,
                      const ResponseCallback& response_callback) override;
   void CheckAccess(const GURL& security_origin,
                    MediaStreamType type,
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc b/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc
index eae9607..a3ce770 100644
--- a/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc
@@ -72,7 +72,7 @@
 
   MockRenderFrameHostDelegate delegate_;
   MockResponseCallback response_callback_;
-  scoped_ptr<MediaStreamUIProxy> proxy_;
+  std::unique_ptr<MediaStreamUIProxy> proxy_;
 };
 
 MATCHER_P(SameRequest, expected, "") {
@@ -88,13 +88,10 @@
 }
 
 TEST_F(MediaStreamUIProxyTest, Deny) {
-  scoped_ptr<MediaStreamRequest> request (
-      new MediaStreamRequest(0, 0, 0, GURL("http://origin/"),
-                             false,
-                             MEDIA_GENERATE_STREAM, std::string(),
-                             std::string(),
-                             MEDIA_DEVICE_AUDIO_CAPTURE,
-                             MEDIA_DEVICE_VIDEO_CAPTURE));
+  std::unique_ptr<MediaStreamRequest> request(new MediaStreamRequest(
+      0, 0, 0, GURL("http://origin/"), false, MEDIA_GENERATE_STREAM,
+      std::string(), std::string(), MEDIA_DEVICE_AUDIO_CAPTURE,
+      MEDIA_DEVICE_VIDEO_CAPTURE));
   MediaStreamRequest* request_ptr = request.get();
   proxy_->RequestAccess(
       std::move(request),
@@ -108,7 +105,7 @@
   ASSERT_FALSE(callback.is_null());
 
   MediaStreamDevices devices;
-  callback.Run(devices, MEDIA_DEVICE_OK, scoped_ptr<MediaStreamUI>());
+  callback.Run(devices, MEDIA_DEVICE_OK, std::unique_ptr<MediaStreamUI>());
 
   MediaStreamDevices response;
   EXPECT_CALL(response_callback_, OnAccessRequestResponse(_, _))
@@ -119,13 +116,10 @@
 }
 
 TEST_F(MediaStreamUIProxyTest, AcceptAndStart) {
-  scoped_ptr<MediaStreamRequest> request (
-      new MediaStreamRequest(0, 0, 0,
-                             GURL("http://origin/"), false,
-                             MEDIA_GENERATE_STREAM, std::string(),
-                             std::string(),
-                             MEDIA_DEVICE_AUDIO_CAPTURE,
-                             MEDIA_DEVICE_VIDEO_CAPTURE));
+  std::unique_ptr<MediaStreamRequest> request(new MediaStreamRequest(
+      0, 0, 0, GURL("http://origin/"), false, MEDIA_GENERATE_STREAM,
+      std::string(), std::string(), MEDIA_DEVICE_AUDIO_CAPTURE,
+      MEDIA_DEVICE_VIDEO_CAPTURE));
   MediaStreamRequest* request_ptr = request.get();
   proxy_->RequestAccess(
       std::move(request),
@@ -141,7 +135,7 @@
   MediaStreamDevices devices;
   devices.push_back(
       MediaStreamDevice(MEDIA_DEVICE_AUDIO_CAPTURE, "Mic", "Mic"));
-  scoped_ptr<MockMediaStreamUI> ui(new MockMediaStreamUI());
+  std::unique_ptr<MockMediaStreamUI> ui(new MockMediaStreamUI());
   EXPECT_CALL(*ui, OnStarted(_)).WillOnce(Return(0));
   callback.Run(devices, MEDIA_DEVICE_OK, std::move(ui));
 
@@ -158,13 +152,10 @@
 
 // Verify that the proxy can be deleted before the request is processed.
 TEST_F(MediaStreamUIProxyTest, DeleteBeforeAccepted) {
-  scoped_ptr<MediaStreamRequest> request (
-      new MediaStreamRequest(0, 0, 0,
-                             GURL("http://origin/"), false,
-                             MEDIA_GENERATE_STREAM, std::string(),
-                             std::string(),
-                             MEDIA_DEVICE_AUDIO_CAPTURE,
-                             MEDIA_DEVICE_VIDEO_CAPTURE));
+  std::unique_ptr<MediaStreamRequest> request(new MediaStreamRequest(
+      0, 0, 0, GURL("http://origin/"), false, MEDIA_GENERATE_STREAM,
+      std::string(), std::string(), MEDIA_DEVICE_AUDIO_CAPTURE,
+      MEDIA_DEVICE_VIDEO_CAPTURE));
   MediaStreamRequest* request_ptr = request.get();
   proxy_->RequestAccess(
       std::move(request),
@@ -180,18 +171,15 @@
   proxy_.reset();
 
   MediaStreamDevices devices;
-  scoped_ptr<MediaStreamUI> ui;
+  std::unique_ptr<MediaStreamUI> ui;
   callback.Run(devices, MEDIA_DEVICE_OK, std::move(ui));
 }
 
 TEST_F(MediaStreamUIProxyTest, StopFromUI) {
-  scoped_ptr<MediaStreamRequest> request (
-      new MediaStreamRequest(0, 0, 0,
-                             GURL("http://origin/"), false,
-                             MEDIA_GENERATE_STREAM, std::string(),
-                             std::string(),
-                             MEDIA_DEVICE_AUDIO_CAPTURE,
-                             MEDIA_DEVICE_VIDEO_CAPTURE));
+  std::unique_ptr<MediaStreamRequest> request(new MediaStreamRequest(
+      0, 0, 0, GURL("http://origin/"), false, MEDIA_GENERATE_STREAM,
+      std::string(), std::string(), MEDIA_DEVICE_AUDIO_CAPTURE,
+      MEDIA_DEVICE_VIDEO_CAPTURE));
   MediaStreamRequest* request_ptr = request.get();
   proxy_->RequestAccess(
       std::move(request),
@@ -209,7 +197,7 @@
   MediaStreamDevices devices;
   devices.push_back(
       MediaStreamDevice(MEDIA_DEVICE_AUDIO_CAPTURE, "Mic", "Mic"));
-  scoped_ptr<MockMediaStreamUI> ui(new MockMediaStreamUI());
+  std::unique_ptr<MockMediaStreamUI> ui(new MockMediaStreamUI());
   EXPECT_CALL(*ui, OnStarted(_))
       .WillOnce(testing::DoAll(SaveArg<0>(&stop_callback), Return(0)));
   callback.Run(devices, MEDIA_DEVICE_OK, std::move(ui));
@@ -234,13 +222,10 @@
 }
 
 TEST_F(MediaStreamUIProxyTest, WindowIdCallbackCalled) {
-  scoped_ptr<MediaStreamRequest> request (
-      new MediaStreamRequest(0, 0, 0,
-                             GURL("http://origin/"), false,
-                             MEDIA_GENERATE_STREAM, std::string(),
-                             std::string(),
-                             MEDIA_NO_SERVICE,
-                             MEDIA_DESKTOP_VIDEO_CAPTURE));
+  std::unique_ptr<MediaStreamRequest> request(new MediaStreamRequest(
+      0, 0, 0, GURL("http://origin/"), false, MEDIA_GENERATE_STREAM,
+      std::string(), std::string(), MEDIA_NO_SERVICE,
+      MEDIA_DESKTOP_VIDEO_CAPTURE));
   MediaStreamRequest* request_ptr = request.get();
 
   proxy_->RequestAccess(
@@ -254,7 +239,7 @@
   message_loop_.RunUntilIdle();
 
   const int kWindowId = 1;
-  scoped_ptr<MockMediaStreamUI> ui(new MockMediaStreamUI());
+  std::unique_ptr<MockMediaStreamUI> ui(new MockMediaStreamUI());
   EXPECT_CALL(*ui, OnStarted(_)).WillOnce(Return(kWindowId));
 
   callback.Run(MediaStreamDevices(), MEDIA_DEVICE_OK, std::move(ui));
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.cc b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
index 6c6a654..df4e70b 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.cc
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
@@ -4,8 +4,10 @@
 
 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "build/build_config.h"
 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
@@ -39,8 +41,8 @@
     return shared_memory_.CreateAndMapAnonymous(mapped_size_);
   }
 
-  scoped_ptr<BufferHandle> GetBufferHandle() override {
-    return make_scoped_ptr(new SharedMemBufferHandle(this));
+  std::unique_ptr<BufferHandle> GetBufferHandle() override {
+    return base::WrapUnique(new SharedMemBufferHandle(this));
   }
   bool ShareToProcess(base::ProcessHandle process_handle,
                       base::SharedMemoryHandle* new_handle) override {
@@ -138,10 +140,10 @@
     return true;
   }
 
-  scoped_ptr<BufferHandle> GetBufferHandle() override {
+  std::unique_ptr<BufferHandle> GetBufferHandle() override {
     DCHECK_EQ(gpu_memory_buffers_.size(),
               media::VideoFrame::NumPlanes(pixel_format()));
-    return make_scoped_ptr(new GpuMemoryBufferBufferHandle(this));
+    return base::WrapUnique(new GpuMemoryBufferBufferHandle(this));
   }
 
   bool ShareToProcess(base::ProcessHandle process_handle,
@@ -220,21 +222,21 @@
   };
 
   // Owned references to GpuMemoryBuffers.
-  std::vector<scoped_ptr<gfx::GpuMemoryBuffer>> gpu_memory_buffers_;
+  std::vector<std::unique_ptr<gfx::GpuMemoryBuffer>> gpu_memory_buffers_;
 };
 
 // static
-scoped_ptr<VideoCaptureBufferPool::Tracker>
+std::unique_ptr<VideoCaptureBufferPool::Tracker>
 VideoCaptureBufferPool::Tracker::CreateTracker(
     media::VideoPixelStorage storage) {
   switch (storage) {
     case media::PIXEL_STORAGE_GPUMEMORYBUFFER:
-      return make_scoped_ptr(new GpuMemoryBufferTracker());
+      return base::WrapUnique(new GpuMemoryBufferTracker());
     case media::PIXEL_STORAGE_CPU:
-      return make_scoped_ptr(new SharedMemTracker());
+      return base::WrapUnique(new SharedMemTracker());
   }
   NOTREACHED();
-  return scoped_ptr<VideoCaptureBufferPool::Tracker>();
+  return std::unique_ptr<VideoCaptureBufferPool::Tracker>();
 }
 
 VideoCaptureBufferPool::Tracker::~Tracker() {}
@@ -285,14 +287,14 @@
   return false;
 }
 
-scoped_ptr<VideoCaptureBufferPool::BufferHandle>
+std::unique_ptr<VideoCaptureBufferPool::BufferHandle>
 VideoCaptureBufferPool::GetBufferHandle(int buffer_id) {
   base::AutoLock lock(lock_);
 
   Tracker* tracker = GetTracker(buffer_id);
   if (!tracker) {
     NOTREACHED() << "Invalid buffer_id.";
-    return scoped_ptr<BufferHandle>();
+    return std::unique_ptr<BufferHandle>();
   }
 
   DCHECK(tracker->held_by_producer());
@@ -457,7 +459,7 @@
   // Create the new tracker.
   const int buffer_id = next_buffer_id_++;
 
-  scoped_ptr<Tracker> tracker = Tracker::CreateTracker(storage_type);
+  std::unique_ptr<Tracker> tracker = Tracker::CreateTracker(storage_type);
   // TODO(emircan): We pass the lock here to solve GMB allocation issue, see
   // crbug.com/545238.
   if (!tracker->Init(dimensions, pixel_format, storage_type, &lock_)) {
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.h b/content/browser/renderer_host/media/video_capture_buffer_pool.h
index bc86447..ba92d4d 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.h
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.h
@@ -76,7 +76,7 @@
                        gfx::GpuMemoryBufferHandle* new_handle);
 
   // Try and obtain a BufferHandle for |buffer_id|.
-  scoped_ptr<BufferHandle> GetBufferHandle(int buffer_id);
+  std::unique_ptr<BufferHandle> GetBufferHandle(int buffer_id);
 
   // Reserve or allocate a buffer to support a packed frame of |dimensions| of
   // pixel |format| and return its id. This will fail (returning kInvalidId) if
@@ -134,7 +134,8 @@
   // Tracker carries indication of pixel format and storage type.
   class Tracker {
    public:
-    static scoped_ptr<Tracker> CreateTracker(media::VideoPixelStorage storage);
+    static std::unique_ptr<Tracker> CreateTracker(
+        media::VideoPixelStorage storage);
 
     Tracker()
         : max_pixel_count_(0),
@@ -167,7 +168,7 @@
 
     // Returns a handle to the underlying storage, be that a block of Shared
     // Memory, or a GpuMemoryBuffer.
-    virtual scoped_ptr<BufferHandle> GetBufferHandle() = 0;
+    virtual std::unique_ptr<BufferHandle> GetBufferHandle() = 0;
 
     virtual bool ShareToProcess(base::ProcessHandle process_handle,
                                 base::SharedMemoryHandle* new_handle) = 0;
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc b/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
index f5c3d87..cb867b5 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
@@ -10,13 +10,14 @@
 #include <stdint.h>
 #include <string.h>
 
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "build/build_config.h"
 #include "cc/test/test_context_provider.h"
@@ -104,12 +105,12 @@
    public:
     StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1, 1) {}
 
-    scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
+    std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
         const gfx::Size& size,
         gfx::BufferFormat format,
         gfx::BufferUsage usage,
         int32_t surface_id) override {
-      return make_scoped_ptr(new MockGpuMemoryBuffer(size));
+      return base::WrapUnique(new MockGpuMemoryBuffer(size));
     }
   };
   class MockBufferQueue : public BufferQueue {
@@ -133,7 +134,7 @@
   class Buffer {
    public:
     Buffer(const scoped_refptr<VideoCaptureBufferPool> pool,
-           scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle,
+           std::unique_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle,
            int id)
         : id_(id), pool_(pool), buffer_handle_(std::move(buffer_handle)) {}
     ~Buffer() { pool_->RelinquishProducerReservation(id()); }
@@ -144,7 +145,7 @@
    private:
     const int id_;
     const scoped_refptr<VideoCaptureBufferPool> pool_;
-    const scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle_;
+    const std::unique_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle_;
   };
 
   VideoCaptureBufferPoolTest()
@@ -168,8 +169,9 @@
     expected_dropped_id_ = expected_dropped_id;
   }
 
-  scoped_ptr<Buffer> ReserveBuffer(const gfx::Size& dimensions,
-                                   PixelFormatAndStorage format_and_storage) {
+  std::unique_ptr<Buffer> ReserveBuffer(
+      const gfx::Size& dimensions,
+      PixelFormatAndStorage format_and_storage) {
     // To verify that ReserveBuffer always sets |buffer_id_to_drop|,
     // initialize it to something different than the expected value.
     int buffer_id_to_drop = ~expected_dropped_id_;
@@ -181,24 +183,24 @@
         dimensions, format_and_storage.pixel_format,
         format_and_storage.pixel_storage, &buffer_id_to_drop);
     if (buffer_id == VideoCaptureBufferPool::kInvalidId)
-      return scoped_ptr<Buffer>();
+      return std::unique_ptr<Buffer>();
     EXPECT_EQ(expected_dropped_id_, buffer_id_to_drop);
 
-    scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle =
+    std::unique_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle =
         pool_->GetBufferHandle(buffer_id);
-    return scoped_ptr<Buffer>(
+    return std::unique_ptr<Buffer>(
         new Buffer(pool_, std::move(buffer_handle), buffer_id));
   }
 
-  scoped_ptr<Buffer> ResurrectLastBuffer(
+  std::unique_ptr<Buffer> ResurrectLastBuffer(
       const gfx::Size& dimensions,
       PixelFormatAndStorage format_and_storage) {
     const int buffer_id = pool_->ResurrectLastForProducer(
         dimensions, format_and_storage.pixel_format,
         format_and_storage.pixel_storage);
     if (buffer_id == VideoCaptureBufferPool::kInvalidId)
-      return scoped_ptr<Buffer>();
-    return scoped_ptr<Buffer>(
+      return std::unique_ptr<Buffer>();
+    return std::unique_ptr<Buffer>(
         new Buffer(pool_, pool_->GetBufferHandle(buffer_id), buffer_id));
   }
 
@@ -208,8 +210,8 @@
 
  private:
 #if !defined(OS_ANDROID)
-  scoped_ptr<StubBrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_;
-  scoped_ptr<MockBufferQueue> output_surface_;
+  std::unique_ptr<StubBrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_;
+  std::unique_ptr<MockBufferQueue> output_surface_;
 #endif
 
   DISALLOW_COPY_AND_ASSIGN(VideoCaptureBufferPoolTest);
@@ -230,13 +232,13 @@
   // reserved.
   ASSERT_EQ(0.0, pool_->GetBufferPoolUtilization());
 
-  scoped_ptr<Buffer> buffer1 = ReserveBuffer(size_lo, GetParam());
+  std::unique_ptr<Buffer> buffer1 = ReserveBuffer(size_lo, GetParam());
   ASSERT_NE(nullptr, buffer1.get());
   ASSERT_EQ(1.0 / kTestBufferPoolSize, pool_->GetBufferPoolUtilization());
-  scoped_ptr<Buffer> buffer2 = ReserveBuffer(size_lo, GetParam());
+  std::unique_ptr<Buffer> buffer2 = ReserveBuffer(size_lo, GetParam());
   ASSERT_NE(nullptr, buffer2.get());
   ASSERT_EQ(2.0 / kTestBufferPoolSize, pool_->GetBufferPoolUtilization());
-  scoped_ptr<Buffer> buffer3 = ReserveBuffer(size_lo, GetParam());
+  std::unique_ptr<Buffer> buffer3 = ReserveBuffer(size_lo, GetParam());
   ASSERT_NE(nullptr, buffer3.get());
   ASSERT_EQ(3.0 / kTestBufferPoolSize, pool_->GetBufferPoolUtilization());
 
@@ -266,7 +268,7 @@
   // Release 1st buffer and retry; this should succeed.
   buffer1.reset();
   ASSERT_EQ(2.0 / kTestBufferPoolSize, pool_->GetBufferPoolUtilization());
-  scoped_ptr<Buffer> buffer4 = ReserveBuffer(size_lo, GetParam());
+  std::unique_ptr<Buffer> buffer4 = ReserveBuffer(size_lo, GetParam());
   ASSERT_NE(nullptr, buffer4.get());
   ASSERT_EQ(3.0 / kTestBufferPoolSize, pool_->GetBufferPoolUtilization());
 
@@ -392,12 +394,13 @@
   ExpectDroppedId(VideoCaptureBufferPool::kInvalidId);
 
   // At the start, there should be nothing to resurrect.
-  scoped_ptr<Buffer> resurrected =
+  std::unique_ptr<Buffer> resurrected =
       ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
   ASSERT_EQ(nullptr, resurrected.get());
 
   // Reserve a 10x10 buffer and fill it with 0xab values.
-  scoped_ptr<Buffer> original = ReserveBuffer(gfx::Size(10, 10), GetParam());
+  std::unique_ptr<Buffer> original =
+      ReserveBuffer(gfx::Size(10, 10), GetParam());
   ASSERT_NE(nullptr, original.get());
   const size_t original_mapped_size = original->mapped_size();
   memset(original->data(), 0xab, original_mapped_size);
@@ -435,7 +438,8 @@
   ExpectDroppedId(VideoCaptureBufferPool::kInvalidId);
 
   // Reserve a 10x10 buffer, fill it with 0xcd values, and release it.
-  scoped_ptr<Buffer> original = ReserveBuffer(gfx::Size(10, 10), GetParam());
+  std::unique_ptr<Buffer> original =
+      ReserveBuffer(gfx::Size(10, 10), GetParam());
   ASSERT_NE(nullptr, original.get());
   const size_t original_mapped_size = original->mapped_size();
   memset(original->data(), 0xcd, original_mapped_size);
@@ -443,7 +447,7 @@
 
   // Expect that the buffer cannot be resurrected if the dimensions do not
   // match.
-  scoped_ptr<Buffer> resurrected =
+  std::unique_ptr<Buffer> resurrected =
       ResurrectLastBuffer(gfx::Size(8, 8), GetParam());
   ASSERT_EQ(nullptr, resurrected.get());
 
@@ -484,21 +488,22 @@
   ExpectDroppedId(VideoCaptureBufferPool::kInvalidId);
 
   // Reserve a 10x10 buffer, fill it with 0xde values, and release it.
-  scoped_ptr<Buffer> original = ReserveBuffer(gfx::Size(10, 10), GetParam());
+  std::unique_ptr<Buffer> original =
+      ReserveBuffer(gfx::Size(10, 10), GetParam());
   ASSERT_NE(nullptr, original.get());
   const size_t original_mapped_size = original->mapped_size();
   memset(original->data(), 0xde, original_mapped_size);
   original.reset();
 
   // Reserve all but one of the pool's buffers.
-  std::vector<scoped_ptr<Buffer>> held_buffers;
+  std::vector<std::unique_ptr<Buffer>> held_buffers;
   for (int i = 0; i < kTestBufferPoolSize - 1; ++i) {
     held_buffers.push_back(ReserveBuffer(gfx::Size(10, 10), GetParam()));
     ASSERT_NE(nullptr, held_buffers.back().get());
   }
 
   // Now, attempt to resurrect the original buffer.  This should succeed.
-  scoped_ptr<Buffer> resurrected =
+  std::unique_ptr<Buffer> resurrected =
       ResurrectLastBuffer(gfx::Size(10, 10), GetParam());
   ASSERT_NE(nullptr, resurrected.get());
   ASSERT_EQ(original_mapped_size, resurrected->mapped_size());
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index 1c40696..bad1a51 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -12,6 +12,7 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/stl_util.h"
@@ -141,10 +142,10 @@
   return weak_ptr_factory_.GetWeakPtr();
 }
 
-scoped_ptr<media::VideoCaptureDevice::Client>
+std::unique_ptr<media::VideoCaptureDevice::Client>
 VideoCaptureController::NewDeviceClient() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  return make_scoped_ptr(new VideoCaptureDeviceClient(
+  return base::WrapUnique(new VideoCaptureDeviceClient(
       this->GetWeakPtrForIOThread(), buffer_pool_));
 }
 
@@ -352,7 +353,7 @@
 }
 
 void VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread(
-    scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
+    std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
     const scoped_refptr<VideoFrame>& frame,
     const base::TimeTicks& timestamp) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -365,7 +366,8 @@
       frame->metadata()->SetDouble(VideoFrameMetadata::FRAME_RATE,
                                    video_capture_format_.frame_rate);
     }
-    scoped_ptr<base::DictionaryValue> metadata(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> metadata(
+        new base::DictionaryValue());
     frame->metadata()->MergeInternalValuesInto(metadata.get());
 
     // Only I420 pixel format is currently supported.
diff --git a/content/browser/renderer_host/media/video_capture_controller.h b/content/browser/renderer_host/media/video_capture_controller.h
index 283847e..8baca91 100644
--- a/content/browser/renderer_host/media/video_capture_controller.h
+++ b/content/browser/renderer_host/media/video_capture_controller.h
@@ -41,11 +41,11 @@
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
 
 #include <list>
+#include <memory>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/process/process.h"
 #include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
@@ -71,7 +71,7 @@
 
   // Return a new VideoCaptureDeviceClient to forward capture events to this
   // instance.
-  scoped_ptr<media::VideoCaptureDevice::Client> NewDeviceClient();
+  std::unique_ptr<media::VideoCaptureDevice::Client> NewDeviceClient();
 
   // Start video capturing and try to use the resolution specified in |params|.
   // Buffers will be shared to the client as necessary. The client will continue
@@ -127,7 +127,7 @@
 
   // Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
   virtual void DoIncomingCapturedVideoFrameOnIOThread(
-      scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
+      std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
       const scoped_refptr<media::VideoFrame>& frame,
       const base::TimeTicks& timestamp);
   virtual void DoErrorOnIOThread();
diff --git a/content/browser/renderer_host/media/video_capture_controller_event_handler.h b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
index e7d8d21..3285de9 100644
--- a/content/browser/renderer_host/media/video_capture_controller_event_handler.h
+++ b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDLER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/memory/shared_memory.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/content/browser/renderer_host/media/video_capture_controller_unittest.cc b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
index cdd8c16..0e28d30 100644
--- a/content/browser/renderer_host/media/video_capture_controller_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
@@ -8,6 +8,8 @@
 
 #include <stdint.h>
 #include <string.h>
+
+#include <memory>
 #include <string>
 #include <utility>
 
@@ -16,7 +18,6 @@
 #include "base/location.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -133,10 +134,10 @@
   }
 
   TestBrowserThreadBundle bundle_;
-  scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_;
-  scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_;
-  scoped_ptr<VideoCaptureController> controller_;
-  scoped_ptr<media::VideoCaptureDevice::Client> device_;
+  std::unique_ptr<MockVideoCaptureControllerEventHandler> client_a_;
+  std::unique_ptr<MockVideoCaptureControllerEventHandler> client_b_;
+  std::unique_ptr<VideoCaptureController> controller_;
+  std::unique_ptr<media::VideoCaptureDevice::Client> device_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest);
@@ -290,9 +291,8 @@
   // side effect this will cause the first buffer to be shared with clients.
   uint8_t buffer_no = 1;
   ASSERT_EQ(0.0, device_->GetBufferPoolUtilization());
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
-      device_->ReserveOutputBuffer(capture_resolution,
-                                   media::PIXEL_FORMAT_I420,
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
+      device_->ReserveOutputBuffer(capture_resolution, media::PIXEL_FORMAT_I420,
                                    media::PIXEL_STORAGE_CPU));
   ASSERT_TRUE(buffer.get());
   ASSERT_EQ(1.0 / kPoolSize, device_->GetBufferPoolUtilization());
@@ -343,9 +343,8 @@
   // Second buffer which ought to use the same shared memory buffer. In this
   // case pretend that the Buffer pointer is held by the device for a long
   // delay. This shouldn't affect anything.
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer2 =
-      device_->ReserveOutputBuffer(capture_resolution,
-                                   media::PIXEL_FORMAT_I420,
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer2 =
+      device_->ReserveOutputBuffer(capture_resolution, media::PIXEL_FORMAT_I420,
                                    media::PIXEL_STORAGE_CPU);
   ASSERT_TRUE(buffer2.get());
   memset(buffer2->data(), buffer_no++, buffer2->mapped_size());
@@ -402,7 +401,7 @@
 
   // Third, fourth, and fifth buffers. Pretend they all arrive at the same time.
   for (int i = 0; i < kPoolSize; i++) {
-    scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer =
+    std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer =
         device_->ReserveOutputBuffer(capture_resolution,
                                      media::PIXEL_FORMAT_I420,
                                      media::PIXEL_STORAGE_CPU);
@@ -452,9 +451,8 @@
   EXPECT_CALL(*client_b_, DoEnded(client_b_route_1)).Times(1);
   controller_->StopSession(300);
   // Queue up another buffer.
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer3 =
-      device_->ReserveOutputBuffer(capture_resolution,
-                                   media::PIXEL_FORMAT_I420,
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer3 =
+      device_->ReserveOutputBuffer(capture_resolution, media::PIXEL_FORMAT_I420,
                                    media::PIXEL_STORAGE_CPU);
   ASSERT_TRUE(buffer3.get());
   memset(buffer3->data(), buffer_no++, buffer3->mapped_size());
@@ -464,9 +462,8 @@
   device_->OnIncomingCapturedVideoFrame(std::move(buffer3), video_frame,
                                         base::TimeTicks());
 
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer4 =
-      device_->ReserveOutputBuffer(capture_resolution,
-                                   media::PIXEL_FORMAT_I420,
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer4 =
+      device_->ReserveOutputBuffer(capture_resolution, media::PIXEL_FORMAT_I420,
                                    media::PIXEL_STORAGE_CPU);
   {
     // Kill A2 via session close (posts a task to disconnect, but A2 must not
@@ -520,9 +517,8 @@
   base::RunLoop().RunUntilIdle();
   Mock::VerifyAndClearExpectations(client_b_.get());
 
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
-      device_->ReserveOutputBuffer(capture_resolution,
-                                   media::PIXEL_FORMAT_I420,
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
+      device_->ReserveOutputBuffer(capture_resolution, media::PIXEL_FORMAT_I420,
                                    media::PIXEL_STORAGE_CPU));
   ASSERT_TRUE(buffer.get());
   scoped_refptr<media::VideoFrame> video_frame =
@@ -558,7 +554,7 @@
   Mock::VerifyAndClearExpectations(client_a_.get());
 
   const gfx::Size dims(320, 240);
-  scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
+  std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
       device_->ReserveOutputBuffer(dims, media::PIXEL_FORMAT_I420,
                                    media::PIXEL_STORAGE_CPU));
   ASSERT_TRUE(buffer.get());
diff --git a/content/browser/renderer_host/media/video_capture_device_client.cc b/content/browser/renderer_host/media/video_capture_device_client.cc
index 4d508c4..cf6ad3a 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -10,6 +10,7 @@
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
@@ -58,7 +59,7 @@
 
   const int id_;
   const scoped_refptr<VideoCaptureBufferPool> pool_;
-  const scoped_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle_;
+  const std::unique_ptr<VideoCaptureBufferPool::BufferHandle> buffer_handle_;
 };
 
 VideoCaptureDeviceClient::VideoCaptureDeviceClient(
@@ -133,7 +134,7 @@
       use_gpu_memory_buffers_ ? media::PIXEL_STORAGE_GPUMEMORYBUFFER
                               : media::PIXEL_STORAGE_CPU;
   uint8_t *y_plane_data, *u_plane_data, *v_plane_data;
-  scoped_ptr<Buffer> buffer(
+  std::unique_ptr<Buffer> buffer(
       ReserveI420OutputBuffer(dimensions, output_pixel_storage, &y_plane_data,
                               &u_plane_data, &v_plane_data));
   if (!buffer.get()) {
@@ -256,7 +257,7 @@
   OnIncomingCapturedBuffer(std::move(buffer), output_format, timestamp);
 }
 
-scoped_ptr<media::VideoCaptureDevice::Client::Buffer>
+std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
 VideoCaptureDeviceClient::ReserveOutputBuffer(
     const gfx::Size& frame_size,
     media::VideoPixelFormat pixel_format,
@@ -279,12 +280,12 @@
   }
   if (buffer_id == VideoCaptureBufferPool::kInvalidId)
     return nullptr;
-  return make_scoped_ptr<Buffer>(
+  return base::WrapUnique<Buffer>(
       new AutoReleaseBuffer(buffer_pool_, buffer_id));
 }
 
 void VideoCaptureDeviceClient::OnIncomingCapturedBuffer(
-    scoped_ptr<Buffer> buffer,
+    std::unique_ptr<Buffer> buffer,
     const VideoCaptureFormat& frame_format,
     const base::TimeTicks& timestamp) {
   // Currently, only I420 pixel format is supported.
@@ -322,7 +323,7 @@
 }
 
 void VideoCaptureDeviceClient::OnIncomingCapturedVideoFrame(
-    scoped_ptr<Buffer> buffer,
+    std::unique_ptr<Buffer> buffer,
     const scoped_refptr<VideoFrame>& frame,
     const base::TimeTicks& timestamp) {
   BrowserThread::PostTask(
@@ -336,7 +337,7 @@
           timestamp));
 }
 
-scoped_ptr<media::VideoCaptureDevice::Client::Buffer>
+std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
 VideoCaptureDeviceClient::ResurrectLastOutputBuffer(
     const gfx::Size& dimensions,
     media::VideoPixelFormat format,
@@ -345,7 +346,7 @@
       buffer_pool_->ResurrectLastForProducer(dimensions, format, storage);
   if (buffer_id == VideoCaptureBufferPool::kInvalidId)
     return nullptr;
-  return make_scoped_ptr<Buffer>(
+  return base::WrapUnique<Buffer>(
       new AutoReleaseBuffer(buffer_pool_, buffer_id));
 }
 
@@ -376,7 +377,7 @@
   return buffer_pool_->GetBufferPoolUtilization();
 }
 
-scoped_ptr<media::VideoCaptureDevice::Client::Buffer>
+std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
 VideoCaptureDeviceClient::ReserveI420OutputBuffer(
     const gfx::Size& dimensions,
     media::VideoPixelStorage storage,
@@ -389,10 +390,10 @@
   DCHECK(dimensions.width());
 
   const media::VideoPixelFormat format = media::PIXEL_FORMAT_I420;
-  scoped_ptr<Buffer> buffer(ReserveOutputBuffer(
-      dimensions, media::PIXEL_FORMAT_I420, storage));
+  std::unique_ptr<Buffer> buffer(
+      ReserveOutputBuffer(dimensions, media::PIXEL_FORMAT_I420, storage));
   if (!buffer)
-    return scoped_ptr<Buffer>();
+    return std::unique_ptr<Buffer>();
 
   switch (storage) {
     case media::PIXEL_STORAGE_CPU:
@@ -418,7 +419,7 @@
       return buffer;
   }
   NOTREACHED();
-  return scoped_ptr<Buffer>();
+  return std::unique_ptr<Buffer>();
 }
 
 }  // namespace content
diff --git a/content/browser/renderer_host/media/video_capture_device_client.h b/content/browser/renderer_host/media/video_capture_device_client.h
index 0273c32..46a8d106 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.h
+++ b/content/browser/renderer_host/media/video_capture_device_client.h
@@ -8,9 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "media/capture/video/video_capture_device.h"
@@ -49,18 +50,18 @@
                               const media::VideoCaptureFormat& frame_format,
                               int rotation,
                               const base::TimeTicks& timestamp) override;
-  scoped_ptr<Buffer> ReserveOutputBuffer(
+  std::unique_ptr<Buffer> ReserveOutputBuffer(
       const gfx::Size& dimensions,
       media::VideoPixelFormat format,
       media::VideoPixelStorage storage) override;
-  void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer,
+  void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
                                 const media::VideoCaptureFormat& frame_format,
                                 const base::TimeTicks& timestamp) override;
   void OnIncomingCapturedVideoFrame(
-      scoped_ptr<Buffer> buffer,
+      std::unique_ptr<Buffer> buffer,
       const scoped_refptr<media::VideoFrame>& frame,
       const base::TimeTicks& timestamp) override;
-  scoped_ptr<Buffer> ResurrectLastOutputBuffer(
+  std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
       const gfx::Size& dimensions,
       media::VideoPixelFormat format,
       media::VideoPixelStorage storage) override;
@@ -82,17 +83,18 @@
   // GpuMemoryBuffers in R_8 format representing I420 planes are reserved. The
   // output buffers stay reserved and mapped for use until the Buffer objects
   // are destroyed or returned.
-  scoped_ptr<Buffer> ReserveI420OutputBuffer(const gfx::Size& dimensions,
-                                             media::VideoPixelStorage storage,
-                                             uint8_t** y_plane_data,
-                                             uint8_t** u_plane_data,
-                                             uint8_t** v_plane_data);
+  std::unique_ptr<Buffer> ReserveI420OutputBuffer(
+      const gfx::Size& dimensions,
+      media::VideoPixelStorage storage,
+      uint8_t** y_plane_data,
+      uint8_t** u_plane_data,
+      uint8_t** v_plane_data);
 
   // The controller to which we post events.
   const base::WeakPtr<VideoCaptureController> controller_;
 
   // Hardware JPEG decoder.
-  scoped_ptr<VideoCaptureGpuJpegDecoder> external_jpeg_decoder_;
+  std::unique_ptr<VideoCaptureGpuJpegDecoder> external_jpeg_decoder_;
 
   // Whether |external_jpeg_decoder_| has been initialized.
   bool external_jpeg_decoder_initialized_;
diff --git a/content/browser/renderer_host/media/video_capture_device_client_unittest.cc b/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
index e5847f1..d96b9d9 100644
--- a/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
@@ -2,19 +2,21 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/renderer_host/media/video_capture_device_client.h"
+
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "build/build_config.h"
 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
 #include "content/browser/renderer_host/media/video_capture_controller.h"
-#include "content/browser/renderer_host/media/video_capture_device_client.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "media/base/limits.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -42,7 +44,7 @@
   MOCK_METHOD1(DoBufferDestroyedOnIOThread, void(int buffer_id_to_drop));
 
   void DoIncomingCapturedVideoFrameOnIOThread(
-      scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
+      std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
       const scoped_refptr<media::VideoFrame>& frame,
       const base::TimeTicks& timestamp) override {
     MockDoIncomingCapturedVideoFrameOnIOThread(frame->coded_size());
@@ -61,8 +63,8 @@
 
  protected:
   const content::TestBrowserThreadBundle thread_bundle_;
-  const scoped_ptr<MockVideoCaptureController> controller_;
-  const scoped_ptr<media::VideoCaptureDevice::Client> device_client_;
+  const std::unique_ptr<MockVideoCaptureController> controller_;
+  const std::unique_ptr<media::VideoCaptureDevice::Client> device_client_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClientTest);
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
index c1656e9..043587f3 100644
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
@@ -80,7 +80,7 @@
     size_t in_buffer_size,
     const media::VideoCaptureFormat& frame_format,
     const base::TimeTicks& timestamp,
-    scoped_ptr<media::VideoCaptureDevice::Client::Buffer> out_buffer) {
+    std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> out_buffer) {
   DCHECK(CalledOnValidThread());
   DCHECK(decoder_);
 
@@ -229,7 +229,7 @@
         BrowserGpuChannelHostFactory::instance()->GetIOThreadTaskRunner();
 
     int32_t route_id = gpu_channel_host_->GenerateRouteID();
-    scoped_ptr<media::GpuJpegDecodeAcceleratorHost> decoder(
+    std::unique_ptr<media::GpuJpegDecodeAcceleratorHost> decoder(
         new media::GpuJpegDecodeAcceleratorHost(gpu_channel_host_.get(),
                                                 route_id, io_task_runner));
     if (decoder->Initialize(this)) {
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h
index 71636b05..1650357 100644
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread.h"
@@ -53,9 +53,10 @@
   };
 
   typedef base::Callback<void(
-      scoped_ptr<media::VideoCaptureDevice::Client::Buffer>,
+      std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>,
       const scoped_refptr<media::VideoFrame>&,
-      const base::TimeTicks&)> DecodeDoneCB;
+      const base::TimeTicks&)>
+      DecodeDoneCB;
 
   // |decode_done_cb| is called on the IO thread when decode succeed. This can
   // be on any thread. |decode_done_cb| is never called after
@@ -75,7 +76,7 @@
       size_t in_buffer_size,
       const media::VideoCaptureFormat& frame_format,
       const base::TimeTicks& timestamp,
-      scoped_ptr<media::VideoCaptureDevice::Client::Buffer> out_buffer);
+      std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> out_buffer);
 
   // JpegDecodeAccelerator::Client implementation.
   // These will be called on IO thread.
@@ -105,7 +106,7 @@
   scoped_refptr<gpu::GpuChannelHost> gpu_channel_host_;
 
   // The underlying JPEG decode accelerator.
-  scoped_ptr<media::JpegDecodeAccelerator> decoder_;
+  std::unique_ptr<media::JpegDecodeAccelerator> decoder_;
 
   // The callback to run when decode succeeds.
   const DecodeDoneCB decode_done_cb_;
@@ -124,7 +125,7 @@
 
   // Shared memory to store JPEG stream buffer. The input BitstreamBuffer is
   // backed by this.
-  scoped_ptr<base::SharedMemory> in_shared_memory_;
+  std::unique_ptr<base::SharedMemory> in_shared_memory_;
 
   STATUS decoder_status_;
 
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 3720897..46db2279 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -4,9 +4,10 @@
 
 #include "content/browser/renderer_host/media/video_capture_host.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/browser/browser_main_loop.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/video_capture_manager.h"
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index b1d991a9..933c58d 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/browser/renderer_host/media/video_capture_host.h"
+
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
@@ -13,7 +16,6 @@
 #include "base/files/scoped_file.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
@@ -24,7 +26,6 @@
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/media_stream_requester.h"
 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
-#include "content/browser/renderer_host/media/video_capture_host.h"
 #include "content/browser/renderer_host/media/video_capture_manager.h"
 #include "content/common/media/video_capture_messages.h"
 #include "content/public/common/content_switches.h"
@@ -280,7 +281,7 @@
 #endif
     media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
     media_stream_manager_->UseFakeUIForTests(
-        scoped_ptr<FakeMediaStreamUIProxy>());
+        std::unique_ptr<FakeMediaStreamUIProxy>());
 
     // Create a Host and connect it to a simulated IPC channel.
     host_ = new MockVideoCaptureHost(media_stream_manager_.get());
@@ -483,8 +484,8 @@
 
  private:
   StrictMock<MockMediaStreamRequester> stream_requester_;
-  scoped_ptr<media::AudioManager> audio_manager_;
-  scoped_ptr<MediaStreamManager> media_stream_manager_;
+  std::unique_ptr<media::AudioManager> audio_manager_;
+  std::unique_ptr<MediaStreamManager> media_stream_manager_;
   content::TestBrowserThreadBundle thread_bundle_;
   content::TestBrowserContext browser_context_;
   content::TestContentBrowserClient browser_client_;
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 629d8d63..cf31a65f 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -128,7 +128,7 @@
 VideoCaptureManager::DeviceEntry::DeviceEntry(
     MediaStreamType stream_type,
     const std::string& id,
-    scoped_ptr<VideoCaptureController> controller,
+    std::unique_ptr<VideoCaptureController> controller,
     const media::VideoCaptureParams& params)
     : serial_id(g_device_start_id++),
       stream_type(stream_type),
@@ -145,12 +145,12 @@
 }
 
 void VideoCaptureManager::DeviceEntry::SetVideoCaptureDevice(
-    scoped_ptr<media::VideoCaptureDevice> device) {
+    std::unique_ptr<media::VideoCaptureDevice> device) {
   DCHECK(thread_checker_.CalledOnValidThread());
   video_capture_device_.swap(device);
 }
 
-scoped_ptr<media::VideoCaptureDevice>
+std::unique_ptr<media::VideoCaptureDevice>
 VideoCaptureManager::DeviceEntry::ReleaseVideoCaptureDevice() {
   DCHECK(thread_checker_.CalledOnValidThread());
   return std::move(video_capture_device_);
@@ -179,7 +179,7 @@
 }
 
 VideoCaptureManager::VideoCaptureManager(
-    scoped_ptr<media::VideoCaptureDeviceFactory> factory)
+    std::unique_ptr<media::VideoCaptureDeviceFactory> factory)
     : listener_(NULL),
       new_capture_session_id_(1),
       video_capture_device_factory_(std::move(factory)) {}
@@ -226,17 +226,13 @@
   // Bind a callback to ConsolidateDevicesInfoOnDeviceThread() with an argument
   // for another callback to OnDevicesInfoEnumerated() to be run in the current
   // loop, i.e. IO loop. Pass a timer for UMA histogram collection.
-  base::Callback<void(scoped_ptr<media::VideoCaptureDevice::Names>)>
-      devices_enumerated_callback =
-          base::Bind(&VideoCaptureManager::ConsolidateDevicesInfoOnDeviceThread,
-                     this,
-                     media::BindToCurrentLoop(base::Bind(
-                         &VideoCaptureManager::OnDevicesInfoEnumerated,
-                         this,
-                         stream_type,
-                         base::Owned(new base::ElapsedTimer()))),
-                     stream_type,
-                     devices_info_cache_);
+  base::Callback<void(std::unique_ptr<media::VideoCaptureDevice::Names>)>
+      devices_enumerated_callback = base::Bind(
+          &VideoCaptureManager::ConsolidateDevicesInfoOnDeviceThread, this,
+          media::BindToCurrentLoop(
+              base::Bind(&VideoCaptureManager::OnDevicesInfoEnumerated, this,
+                         stream_type, base::Owned(new base::ElapsedTimer()))),
+          stream_type, devices_info_cache_);
   // OK to use base::Unretained() since we own the VCDFactory and |this| is
   // bound in |devices_enumerated_callback|.
   device_task_runner_->PostTask(FROM_HERE,
@@ -371,7 +367,7 @@
   DVLOG(3) << "HandleQueuedStartRequest, Post start to device thread, device = "
            << entry->id << " start id = " << entry->serial_id;
 
-  base::Callback<scoped_ptr<media::VideoCaptureDevice>(void)>
+  base::Callback<std::unique_ptr<media::VideoCaptureDevice>(void)>
       start_capture_function;
 
   switch (entry->stream_type) {
@@ -437,7 +433,7 @@
 
 void VideoCaptureManager::OnDeviceStarted(
     int serial_id,
-    scoped_ptr<media::VideoCaptureDevice> device) {
+    std::unique_ptr<media::VideoCaptureDevice> device) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(serial_id == device_start_queue_.begin()->serial_id());
   DVLOG(3) << "OnDeviceStarted";
@@ -477,15 +473,15 @@
   HandleQueuedStartRequest();
 }
 
-scoped_ptr<media::VideoCaptureDevice>
+std::unique_ptr<media::VideoCaptureDevice>
 VideoCaptureManager::DoStartDeviceCaptureOnDeviceThread(
     const media::VideoCaptureDevice::Name& name,
     const media::VideoCaptureParams& params,
-    scoped_ptr<media::VideoCaptureDevice::Client> device_client) {
+    std::unique_ptr<media::VideoCaptureDevice::Client> device_client) {
   SCOPED_UMA_HISTOGRAM_TIMER("Media.VideoCaptureManager.StartDeviceTime");
   DCHECK(IsOnDeviceThread());
 
-  scoped_ptr<media::VideoCaptureDevice> video_capture_device;
+  std::unique_ptr<media::VideoCaptureDevice> video_capture_device;
   video_capture_device = video_capture_device_factory_->Create(name);
 
   if (!video_capture_device) {
@@ -497,15 +493,15 @@
   return video_capture_device;
 }
 
-scoped_ptr<media::VideoCaptureDevice>
+std::unique_ptr<media::VideoCaptureDevice>
 VideoCaptureManager::DoStartTabCaptureOnDeviceThread(
     const std::string& id,
     const media::VideoCaptureParams& params,
-    scoped_ptr<media::VideoCaptureDevice::Client> device_client) {
+    std::unique_ptr<media::VideoCaptureDevice::Client> device_client) {
   SCOPED_UMA_HISTOGRAM_TIMER("Media.VideoCaptureManager.StartDeviceTime");
   DCHECK(IsOnDeviceThread());
 
-  scoped_ptr<media::VideoCaptureDevice> video_capture_device;
+  std::unique_ptr<media::VideoCaptureDevice> video_capture_device;
   video_capture_device.reset(WebContentsVideoCaptureDevice::Create(id));
 
   if (!video_capture_device) {
@@ -517,15 +513,15 @@
   return video_capture_device;
 }
 
-scoped_ptr<media::VideoCaptureDevice>
+std::unique_ptr<media::VideoCaptureDevice>
 VideoCaptureManager::DoStartDesktopCaptureOnDeviceThread(
     const std::string& id,
     const media::VideoCaptureParams& params,
-    scoped_ptr<media::VideoCaptureDevice::Client> device_client) {
+    std::unique_ptr<media::VideoCaptureDevice::Client> device_client) {
   SCOPED_UMA_HISTOGRAM_TIMER("Media.VideoCaptureManager.StartDeviceTime");
   DCHECK(IsOnDeviceThread());
 
-  scoped_ptr<media::VideoCaptureDevice> video_capture_device;
+  std::unique_ptr<media::VideoCaptureDevice> video_capture_device;
 #if defined(ENABLE_SCREEN_CAPTURE)
   DesktopMediaID desktop_id = DesktopMediaID::Parse(id);
   if (desktop_id.is_null()) {
@@ -791,7 +787,7 @@
 }
 
 void VideoCaptureManager::DoStopDeviceOnDeviceThread(
-    scoped_ptr<media::VideoCaptureDevice> device) {
+    std::unique_ptr<media::VideoCaptureDevice> device) {
   SCOPED_UMA_HISTOGRAM_TIMER("Media.VideoCaptureManager.StopDeviceTime");
   DCHECK(IsOnDeviceThread());
   device->StopAndDeAllocate();
@@ -856,7 +852,7 @@
         on_devices_enumerated_callback,
     MediaStreamType stream_type,
     const media::VideoCaptureDeviceInfos& old_device_info_cache,
-    scoped_ptr<media::VideoCaptureDevice::Names> names_snapshot) {
+    std::unique_ptr<media::VideoCaptureDevice::Names> names_snapshot) {
   DCHECK(IsOnDeviceThread());
   // Construct |new_devices_info_cache| with the cached devices that are still
   // present in the system, and remove their names from |names_snapshot|, so we
@@ -956,7 +952,7 @@
 
   const int max_buffers = device_info.type == MEDIA_TAB_VIDEO_CAPTURE ?
       kMaxNumberOfBuffersForTabCapture : kMaxNumberOfBuffers;
-  scoped_ptr<VideoCaptureController> video_capture_controller(
+  std::unique_ptr<VideoCaptureController> video_capture_controller(
       new VideoCaptureController(max_buffers));
   DeviceEntry* new_device =
       new DeviceEntry(device_info.type, device_info.id,
@@ -1042,7 +1038,13 @@
 
   for (auto& entry : devices_) {
     // Do not resume Content Video Capture devices, e.g. Tab or Screen capture.
-    if (entry->stream_type != MEDIA_DEVICE_VIDEO_CAPTURE)
+    // Do not try to restart already running devices. A device will be running
+    // if the Application state changes from
+    // APPLICATION_STATE_HAS_RUNNING_ACTIVITIES
+    // ->APPLICATION_STATE_HAS_PAUSED_ACTIVITIES
+    // ->APPLICATION_STATE_HAS_RUNNING_ACTIVITIES
+    if (entry->stream_type != MEDIA_DEVICE_VIDEO_CAPTURE ||
+        entry->video_capture_device())
       continue;
 
     // Session ID is only valid for Screen capture. So we can fake it to resume
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index c1d2403..6e3e956 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -51,7 +51,7 @@
       void(const base::WeakPtr<VideoCaptureController>&)> DoneCB;
 
   explicit VideoCaptureManager(
-      scoped_ptr<media::VideoCaptureDeviceFactory> factory);
+      std::unique_ptr<media::VideoCaptureDeviceFactory> factory);
 
   void Unregister();
 
@@ -199,7 +199,7 @@
           on_devices_enumerated_callback,
       MediaStreamType stream_type,
       const media::VideoCaptureDeviceInfos& old_device_info_cache,
-      scoped_ptr<media::VideoCaptureDevice::Names> names_snapshot);
+      std::unique_ptr<media::VideoCaptureDevice::Names> names_snapshot);
 
   // Starting a capture device can take 1-2 seconds.
   // To avoid multiple unnecessary start/stop commands to the OS, each start
@@ -211,7 +211,7 @@
                         DeviceEntry* entry,
                         const media::VideoCaptureParams& params);
   void OnDeviceStarted(int serial_id,
-                       scoped_ptr<media::VideoCaptureDevice> device);
+                       std::unique_ptr<media::VideoCaptureDevice> device);
   void DoStopDevice(DeviceEntry* entry);
   void HandleQueuedStartRequest();
 
@@ -219,24 +219,26 @@
   // VideoCaptureDevice is returned to the IO-thread and stored in
   // a DeviceEntry in |devices_|. Ownership of |client| passes to
   // the device.
-  scoped_ptr<media::VideoCaptureDevice> DoStartDeviceCaptureOnDeviceThread(
+  std::unique_ptr<media::VideoCaptureDevice> DoStartDeviceCaptureOnDeviceThread(
       const media::VideoCaptureDevice::Name& name,
       const media::VideoCaptureParams& params,
-      scoped_ptr<media::VideoCaptureDevice::Client> client);
+      std::unique_ptr<media::VideoCaptureDevice::Client> client);
 
-  scoped_ptr<media::VideoCaptureDevice> DoStartTabCaptureOnDeviceThread(
+  std::unique_ptr<media::VideoCaptureDevice> DoStartTabCaptureOnDeviceThread(
       const std::string& device_id,
       const media::VideoCaptureParams& params,
-      scoped_ptr<media::VideoCaptureDevice::Client> client);
+      std::unique_ptr<media::VideoCaptureDevice::Client> client);
 
-  scoped_ptr<media::VideoCaptureDevice> DoStartDesktopCaptureOnDeviceThread(
+  std::unique_ptr<media::VideoCaptureDevice>
+  DoStartDesktopCaptureOnDeviceThread(
       const std::string& device_id,
       const media::VideoCaptureParams& params,
-      scoped_ptr<media::VideoCaptureDevice::Client> client);
+      std::unique_ptr<media::VideoCaptureDevice::Client> client);
 
   // Stops and destroys the VideoCaptureDevice held in
   // |device|.
-  void DoStopDeviceOnDeviceThread(scoped_ptr<media::VideoCaptureDevice> device);
+  void DoStopDeviceOnDeviceThread(
+      std::unique_ptr<media::VideoCaptureDevice> device);
 
   media::VideoCaptureDeviceInfo* FindDeviceInfoById(
       const std::string& id,
@@ -277,7 +279,8 @@
   void ReleaseDevices();
   void ResumeDevices();
 
-  scoped_ptr<base::android::ApplicationStatusListener> app_status_listener_;
+  std::unique_ptr<base::android::ApplicationStatusListener>
+      app_status_listener_;
 #endif
 
   // The message loop of media stream device thread, where VCD's live.
@@ -305,7 +308,7 @@
    public:
     DeviceEntry(MediaStreamType stream_type,
                 const std::string& id,
-                scoped_ptr<VideoCaptureController> controller,
+                std::unique_ptr<VideoCaptureController> controller,
                 const media::VideoCaptureParams& params);
     ~DeviceEntry();
 
@@ -317,15 +320,16 @@
     VideoCaptureController* video_capture_controller();
     media::VideoCaptureDevice* video_capture_device();
 
-    void SetVideoCaptureDevice(scoped_ptr<media::VideoCaptureDevice> device);
-    scoped_ptr<media::VideoCaptureDevice> ReleaseVideoCaptureDevice();
+    void SetVideoCaptureDevice(
+        std::unique_ptr<media::VideoCaptureDevice> device);
+    std::unique_ptr<media::VideoCaptureDevice> ReleaseVideoCaptureDevice();
 
    private:
     // The controller.
-    scoped_ptr<VideoCaptureController> video_capture_controller_;
+    std::unique_ptr<VideoCaptureController> video_capture_controller_;
 
     // The capture device.
-    scoped_ptr<media::VideoCaptureDevice> video_capture_device_;
+    std::unique_ptr<media::VideoCaptureDevice> video_capture_device_;
 
     base::ThreadChecker thread_checker_;
   };
@@ -364,7 +368,8 @@
 
   // Device creation factory injected on construction from MediaStreamManager or
   // from the test harness.
-  scoped_ptr<media::VideoCaptureDeviceFactory> video_capture_device_factory_;
+  std::unique_ptr<media::VideoCaptureDeviceFactory>
+      video_capture_device_factory_;
 
   // Local cache of the enumerated video capture devices' names and capture
   // supported formats. A snapshot of the current devices and their capabilities
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index 954544c..222dc5d0 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -4,19 +4,20 @@
 
 // Unit test for VideoCaptureManager.
 
+#include "content/browser/renderer_host/media/video_capture_manager.h"
+
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/renderer_host/media/media_stream_provider.h"
 #include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
-#include "content/browser/renderer_host/media/video_capture_manager.h"
 #include "content/common/media/media_stream_options.h"
 #include "media/capture/video/fake_video_capture_device_factory.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -81,8 +82,9 @@
                                            message_loop_.get()));
     io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO,
                                            message_loop_.get()));
-    vcm_ = new VideoCaptureManager(scoped_ptr<media::VideoCaptureDeviceFactory>(
-        new media::FakeVideoCaptureDeviceFactory()));
+    vcm_ = new VideoCaptureManager(
+        std::unique_ptr<media::VideoCaptureDeviceFactory>(
+            new media::FakeVideoCaptureDeviceFactory()));
     video_capture_device_factory_ =
         static_cast<media::FakeVideoCaptureDeviceFactory*>(
             vcm_->video_capture_device_factory());
@@ -161,11 +163,11 @@
   int next_client_id_;
   std::map<VideoCaptureControllerID, VideoCaptureController*> controllers_;
   scoped_refptr<VideoCaptureManager> vcm_;
-  scoped_ptr<MockMediaStreamProviderListener> listener_;
-  scoped_ptr<base::MessageLoop> message_loop_;
-  scoped_ptr<BrowserThreadImpl> ui_thread_;
-  scoped_ptr<BrowserThreadImpl> io_thread_;
-  scoped_ptr<MockFrameObserver> frame_observer_;
+  std::unique_ptr<MockMediaStreamProviderListener> listener_;
+  std::unique_ptr<base::MessageLoop> message_loop_;
+  std::unique_ptr<BrowserThreadImpl> ui_thread_;
+  std::unique_ptr<BrowserThreadImpl> io_thread_;
+  std::unique_ptr<MockFrameObserver> frame_observer_;
   media::FakeVideoCaptureDeviceFactory* video_capture_device_factory_;
 
  private:
diff --git a/content/browser/renderer_host/media/webrtc_identity_service_host_unittest.cc b/content/browser/renderer_host/media/webrtc_identity_service_host_unittest.cc
index 0fc87f7..49ff80430 100644
--- a/content/browser/renderer_host/media/webrtc_identity_service_host_unittest.cc
+++ b/content/browser/renderer_host/media/webrtc_identity_service_host_unittest.cc
@@ -178,7 +178,7 @@
 
  protected:
   TestBrowserThreadBundle browser_thread_bundle_;
-  scoped_ptr<MockResourceContext> mock_resource_context_;
+  std::unique_ptr<MockResourceContext> mock_resource_context_;
   scoped_refptr<MockWebRTCIdentityStore> store_;
   scoped_refptr<WebRTCIdentityServiceHostForTest> host_;
 };
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index a26e5841..f4891f2 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -532,10 +532,6 @@
   return prefs;
 }
 
-void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
-  Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
-}
-
 void RenderViewHostImpl::ClosePage() {
   is_waiting_for_close_ack_ = true;
   GetWidget()->StartHangMonitorTimeout(
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index a963733a..4ec87ca 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -197,12 +197,6 @@
   // TODO(creis): Remove as part of http://crbug.com/418265.
   bool is_waiting_for_close_ack() const { return is_waiting_for_close_ack_; }
 
-  // Tells the renderer that this RenderView will soon be swapped out, and thus
-  // not to create any new modal dialogs until it happens.  This must be done
-  // separately so that the PageGroupLoadDeferrers of any current dialogs are no
-  // longer on the stack when we attempt to swap it out.
-  void SuppressDialogsUntilSwapOut();
-
   // Tells the renderer process to run the page's unload handler.
   // A ClosePage_ACK ack is sent back when the handler execution completes.
   void ClosePage();
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index f9266bd..ed46e5d6 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -4135,7 +4135,7 @@
   // Since the SwapOut ACK for A->B is dropped, the first page's
   // RenderFrameHost and RenderViewHost should be pending deletion after the
   // last navigation.
-  EXPECT_FALSE(rfh->IsRFHStateActive(rfh->rfh_state()));
+  EXPECT_FALSE(rfh->is_active());
   EXPECT_TRUE(root->render_manager()->IsViewPendingDeletion(rvh));
 
   // Wait for process A to exit so we can reinitialize it cleanly for the next
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 28b0eb13..f78f9a45 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -9,6 +9,7 @@
 #include <set>
 #include <vector>
 
+#include "base/bind.h"
 #include "base/location.h"
 #include "base/sequenced_task_runner.h"
 #include "base/single_thread_task_runner.h"
@@ -28,6 +29,7 @@
 #include "content/public/browser/session_storage_usage_info.h"
 #include "net/base/completion_callback.h"
 #include "net/base/net_errors.h"
+#include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_monster.h"
 #include "net/url_request/url_request_context.h"
 #include "net/url_request/url_request_context_getter.h"
@@ -38,6 +40,11 @@
 
 namespace {
 
+bool DoesCookieMatchHost(const std::string& host,
+                         const net::CanonicalCookie& cookie) {
+  return cookie.IsHostCookie() && cookie.IsDomainMatch(host);
+}
+
 void OnClearedCookies(const base::Closure& callback, int num_deleted) {
   // The final callback needs to happen from UI thread.
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
@@ -65,10 +72,13 @@
         end,
         base::Bind(&OnClearedCookies, callback));
   } else {
-    cookie_store->DeleteAllCreatedBetweenForHostAsync(
-        begin,
-        end,
-        storage_origin, base::Bind(&OnClearedCookies, callback));
+    // TODO(mkwst): It's not clear whether removing host cookies is the correct
+    // behavior. We might want to remove all domain-matching cookies instead.
+    // Also, this code path may be dead anyways.
+    cookie_store->DeleteAllCreatedBetweenWithPredicateAsync(
+        begin, end,
+        StoragePartitionImpl::CreatePredicateForHostCookies(storage_origin),
+        base::Bind(&OnClearedCookies, callback));
   }
 }
 
@@ -221,6 +231,12 @@
   return quota_client_mask;
 }
 
+// static
+net::CookieStore::CookiePredicate
+StoragePartitionImpl::CreatePredicateForHostCookies(const GURL& url) {
+  return base::Bind(&DoesCookieMatchHost, url.host());
+}
+
 // Helper for deleting quota managed data from a partition.
 //
 // Most of the operations in this class are done on IO thread.
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index d564f9ec..45c02f5 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -25,6 +25,7 @@
 #include "content/common/storage_partition_service.mojom.h"
 #include "content/public/browser/storage_partition.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
+#include "net/cookies/cookie_store.h"
 #include "storage/browser/quota/special_storage_policy.h"
 
 namespace content {
@@ -38,6 +39,12 @@
   // StoragePartition uses. This method generates that mask.
   CONTENT_EXPORT static int GenerateQuotaClientMask(uint32_t remove_mask);
 
+  // This creates a CookiePredicate that matches all host (NOT domain) cookies
+  // that match the host of |url|. This is intended to be used with
+  // DeleteAllCreatedBetweenWithPredicateAsync.
+  CONTENT_EXPORT static net::CookieStore::CookiePredicate
+  CreatePredicateForHostCookies(const GURL& url);
+
   CONTENT_EXPORT void OverrideQuotaManagerForTesting(
       storage::QuotaManager* quota_manager);
   CONTENT_EXPORT void OverrideSpecialStoragePolicyForTesting(
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc
index e4b79096..22f0185 100644
--- a/content/browser/storage_partition_impl_unittest.cc
+++ b/content/browser/storage_partition_impl_unittest.cc
@@ -23,12 +23,15 @@
 #include "content/public/test/test_browser_thread.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "net/base/test_completion_callback.h"
+#include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_store.h"
 #include "net/url_request/url_request_context.h"
 #include "net/url_request/url_request_context_getter.h"
 #include "storage/browser/quota/quota_manager.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+using net::CanonicalCookie;
+
 namespace content {
 namespace {
 
@@ -919,4 +922,32 @@
   EXPECT_TRUE(tester.DOMStorageExistsForOrigin(kOrigin3));
 }
 
+TEST(StoragePartitionImplStaticTest, CreatePredicateForHostCookies) {
+  GURL url("http://www.example.com/");
+  GURL url2("https://www.example.com/");
+  GURL url3("https://www.google.com/");
+
+  net::CookieOptions options;
+  net::CookieStore::CookiePredicate predicate =
+      StoragePartitionImpl::CreatePredicateForHostCookies(url);
+
+  base::Time now = base::Time::Now();
+  std::vector<scoped_ptr<CanonicalCookie>> valid_cookies;
+  valid_cookies.push_back(CanonicalCookie::Create(url, "A=B", now, options));
+  valid_cookies.push_back(CanonicalCookie::Create(url, "C=F", now, options));
+  // We should match a different scheme with the same host.
+  valid_cookies.push_back(CanonicalCookie::Create(url2, "A=B", now, options));
+
+  std::vector<scoped_ptr<CanonicalCookie>> invalid_cookies;
+  // We don't match domain cookies.
+  invalid_cookies.push_back(
+      CanonicalCookie::Create(url2, "A=B;domain=.example.com", now, options));
+  invalid_cookies.push_back(CanonicalCookie::Create(url3, "A=B", now, options));
+
+  for (const auto& cookie : valid_cookies)
+    EXPECT_TRUE(predicate.Run(*cookie)) << cookie->DebugString();
+  for (const auto& cookie : invalid_cookies)
+    EXPECT_FALSE(predicate.Run(*cookie)) << cookie->DebugString();
+}
+
 }  // namespace content
diff --git a/content/browser/web_contents/aura/overscroll_window_animation.h b/content/browser/web_contents/aura/overscroll_window_animation.h
index 7de03fd..9295290 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation.h
+++ b/content/browser/web_contents/aura/overscroll_window_animation.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_ANIMATION_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
 #include "content/common/content_export.h"
 #include "ui/compositor/layer_animation_observer.h"
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a95aa74..61d8bf3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3948,7 +3948,7 @@
     delegate_->WillRunBeforeUnloadConfirm();
 
   bool suppress_this_message =
-      rfhi->rfh_state() != RenderFrameHostImpl::STATE_DEFAULT ||
+      !rfhi->is_active() ||
       ShowingInterstitialPage() || !delegate_ ||
       delegate_->ShouldSuppressDialogs(this) ||
       !delegate_->GetJavaScriptDialogManager(this);
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index 4ef5669..6534b14 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -968,7 +968,7 @@
   dialog_manager.Wait();
   EXPECT_EQ("about:blank", dialog_manager.last_message());
 
-  // Navigate cross-domain.
+  // Navigate the subframe cross-site.
   NavigateFrameToURL(frame,
                      embedded_test_server()->GetURL("b.com", "/title2.html"));
   EXPECT_TRUE(WaitForLoadStop(wc));
@@ -980,14 +980,6 @@
   EXPECT_EQ(GURL("http://b.com/title2.html"),
             GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
 
-  // Dialogs do not work with out-of-process iframes yet.
-  // http://crbug.com/453893
-  if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
-    wc->SetDelegate(nullptr);
-    wc->SetJavaScriptDialogManagerForTesting(nullptr);
-    return;  // :(
-  }
-
   // A dialog from the main frame.
   EXPECT_TRUE(
       content::ExecuteScript(root->current_frame_host(), alert_location));
@@ -995,6 +987,25 @@
   EXPECT_EQ(GURL("http://a.com/title1.html"),
             GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
 
+  // Navigate the top frame cross-site; ensure that dialogs work.
+  NavigateToURL(shell(),
+                embedded_test_server()->GetURL("c.com", "/title3.html"));
+  EXPECT_TRUE(WaitForLoadStop(wc));
+  EXPECT_TRUE(
+      content::ExecuteScript(root->current_frame_host(), alert_location));
+  dialog_manager.Wait();
+  EXPECT_EQ(GURL("http://c.com/title3.html"),
+            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+
+  // Navigate back; ensure that dialogs work.
+  wc->GetController().GoBack();
+  EXPECT_TRUE(WaitForLoadStop(wc));
+  EXPECT_TRUE(
+      content::ExecuteScript(root->current_frame_host(), alert_location));
+  dialog_manager.Wait();
+  EXPECT_EQ(GURL("http://a.com/title1.html"),
+            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+
   wc->SetDelegate(nullptr);
   wc->SetJavaScriptDialogManagerForTesting(nullptr);
 }
diff --git a/content/child/appcache/appcache_dispatcher.h b/content/child/appcache/appcache_dispatcher.h
index 4dffb18..f556756 100644
--- a/content/child/appcache/appcache_dispatcher.h
+++ b/content/child/appcache/appcache_dispatcher.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_CHILD_APPCACHE_APPCACHE_DISPATCHER_H_
 #define CONTENT_CHILD_APPCACHE_APPCACHE_DISPATCHER_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "content/child/appcache/appcache_backend_proxy.h"
 #include "content/common/appcache_interfaces.h"
 #include "ipc/ipc_listener.h"
@@ -45,7 +45,7 @@
   void OnContentBlocked(int host_id, const GURL& manifest_url);
 
   AppCacheBackendProxy backend_proxy_;
-  scoped_ptr<AppCacheFrontend> frontend_;
+  std::unique_ptr<AppCacheFrontend> frontend_;
 };
 
 }  // namespace content
diff --git a/content/child/background_sync/background_sync_provider.cc b/content/child/background_sync/background_sync_provider.cc
index 820ebf7..af6ed44e1 100644
--- a/content/child/background_sync/background_sync_provider.cc
+++ b/content/child/background_sync/background_sync_provider.cc
@@ -5,11 +5,12 @@
 #include "content/child/background_sync/background_sync_provider.h"
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_local.h"
 #include "content/child/background_sync/background_sync_type_converters.h"
@@ -92,8 +93,8 @@
   DCHECK(callbacks);
   int64_t service_worker_registration_id =
       GetServiceWorkerRegistrationId(service_worker_registration);
-  scoped_ptr<const blink::WebSyncRegistration> optionsPtr(options);
-  scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacksPtr(callbacks);
+  std::unique_ptr<const blink::WebSyncRegistration> optionsPtr(options);
+  std::unique_ptr<blink::WebSyncRegistrationCallbacks> callbacksPtr(callbacks);
 
   // base::Unretained is safe here, as the mojo channel will be deleted (and
   // will wipe its callbacks) before 'this' is deleted.
@@ -112,7 +113,8 @@
   DCHECK(callbacks);
   int64_t service_worker_registration_id =
       GetServiceWorkerRegistrationId(service_worker_registration);
-  scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacksPtr(callbacks);
+  std::unique_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacksPtr(
+      callbacks);
 
   // base::Unretained is safe here, as the mojo channel will be deleted (and
   // will wipe its callbacks) before 'this' is deleted.
@@ -128,16 +130,16 @@
 }
 
 void BackgroundSyncProvider::RegisterCallback(
-    scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
+    std::unique_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
     mojom::BackgroundSyncError error,
     const mojom::SyncRegistrationPtr& options) {
   // TODO(iclelland): Determine the correct error message to return in each case
-  scoped_ptr<blink::WebSyncRegistration> result;
+  std::unique_ptr<blink::WebSyncRegistration> result;
   switch (error) {
     case mojom::BackgroundSyncError::NONE:
       if (!options.is_null())
-        result =
-            mojo::ConvertTo<scoped_ptr<blink::WebSyncRegistration>>(options);
+        result = mojo::ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(
+            options);
       callbacks->onSuccess(std::move(result));
       break;
     case mojom::BackgroundSyncError::NOT_FOUND:
@@ -168,7 +170,7 @@
 }
 
 void BackgroundSyncProvider::GetRegistrationsCallback(
-    scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
+    std::unique_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
     mojom::BackgroundSyncError error,
     const mojo::Array<mojom::SyncRegistrationPtr>& registrations) {
   // TODO(iclelland): Determine the correct error message to return in each case
@@ -177,9 +179,10 @@
       blink::WebVector<blink::WebSyncRegistration*> results(
           registrations.size());
       for (size_t i = 0; i < registrations.size(); ++i) {
-        results[i] = mojo::ConvertTo<scoped_ptr<blink::WebSyncRegistration>>(
-                         registrations[i])
-                         .release();
+        results[i] =
+            mojo::ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(
+                registrations[i])
+                .release();
       }
       callbacks->onSuccess(results);
       break;
diff --git a/content/child/background_sync/background_sync_provider.h b/content/child/background_sync/background_sync_provider.h
index d7f83e4..cdfe270 100644
--- a/content/child/background_sync/background_sync_provider.h
+++ b/content/child/background_sync/background_sync_provider.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/background_sync_service.mojom.h"
 #include "content/public/child/worker_thread.h"
 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncProvider.h"
@@ -59,11 +59,11 @@
  private:
   // Callback handlers
   void RegisterCallback(
-      scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
+      std::unique_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
       mojom::BackgroundSyncError error,
       const mojom::SyncRegistrationPtr& options);
   void GetRegistrationsCallback(
-      scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
+      std::unique_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
       mojom::BackgroundSyncError error,
       const mojo::Array<mojom::SyncRegistrationPtr>& registrations);
 
diff --git a/content/child/background_sync/background_sync_type_converters.cc b/content/child/background_sync/background_sync_type_converters.cc
index d540261..c687da6 100644
--- a/content/child/background_sync/background_sync_type_converters.cc
+++ b/content/child/background_sync/background_sync_type_converters.cc
@@ -47,11 +47,11 @@
 }
 
 // static
-scoped_ptr<blink::WebSyncRegistration>
-TypeConverter<scoped_ptr<blink::WebSyncRegistration>,
+std::unique_ptr<blink::WebSyncRegistration>
+TypeConverter<std::unique_ptr<blink::WebSyncRegistration>,
               content::mojom::SyncRegistrationPtr>::
     Convert(const content::mojom::SyncRegistrationPtr& input) {
-  scoped_ptr<blink::WebSyncRegistration> result(
+  std::unique_ptr<blink::WebSyncRegistration> result(
       new blink::WebSyncRegistration());
   result->id = input->id;
   result->tag = blink::WebString::fromUTF8(input->tag);
diff --git a/content/child/background_sync/background_sync_type_converters.h b/content/child/background_sync/background_sync_type_converters.h
index bd7c1f1..fc9f59a 100644
--- a/content/child/background_sync/background_sync_type_converters.h
+++ b/content/child/background_sync/background_sync_type_converters.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_TYPE_CONVERTERS_H_
 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_TYPE_CONVERTERS_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/common/background_sync_service.mojom.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/type_converter.h"
@@ -37,9 +38,9 @@
 //     content::mojom::SyncRegistration
 
 template <>
-struct CONTENT_EXPORT TypeConverter<scoped_ptr<blink::WebSyncRegistration>,
+struct CONTENT_EXPORT TypeConverter<std::unique_ptr<blink::WebSyncRegistration>,
                                     content::mojom::SyncRegistrationPtr> {
-  static scoped_ptr<blink::WebSyncRegistration> Convert(
+  static std::unique_ptr<blink::WebSyncRegistration> Convert(
       const content::mojom::SyncRegistrationPtr& input);
 };
 
diff --git a/content/child/background_sync/background_sync_type_converters_unittest.cc b/content/child/background_sync/background_sync_type_converters_unittest.cc
index e12f23c..15270478 100644
--- a/content/child/background_sync/background_sync_type_converters_unittest.cc
+++ b/content/child/background_sync/background_sync_type_converters_unittest.cc
@@ -60,8 +60,8 @@
 TEST(BackgroundSyncTypeConverterTest, TestDefaultMojoToBlinkConversion) {
   content::mojom::SyncRegistrationPtr in(
       content::mojom::SyncRegistration::New());
-  scoped_ptr<blink::WebSyncRegistration> out =
-      ConvertTo<scoped_ptr<blink::WebSyncRegistration>>(in);
+  std::unique_ptr<blink::WebSyncRegistration> out =
+      ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(in);
 
   ASSERT_EQ(blink::WebSyncRegistration::UNREGISTERED_SYNC_ID, out->id);
   ASSERT_EQ("",out->tag);
@@ -75,8 +75,8 @@
   in->tag = mojo::String("MojoToBlink");
   in->network_state =
       content::mojom::BackgroundSyncNetworkState::AVOID_CELLULAR;
-  scoped_ptr<blink::WebSyncRegistration> out =
-      ConvertTo<scoped_ptr<blink::WebSyncRegistration>>(in);
+  std::unique_ptr<blink::WebSyncRegistration> out =
+      ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(in);
 
   ASSERT_EQ(41, out->id);
   ASSERT_EQ("MojoToBlink", out->tag.utf8());
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index aba472d..8c973f76 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -6,13 +6,14 @@
 
 #include <math.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/singleton.h"
 #include "base/metrics/user_metrics_action.h"
 #include "base/rand_util.h"
@@ -420,7 +421,7 @@
   // data URLs to bypass the ResourceDispatcher.
   return new WebURLLoaderImpl(
       child_thread ? child_thread->resource_dispatcher() : NULL,
-      make_scoped_ptr(currentThread()->getWebTaskRunner()->clone()));
+      base::WrapUnique(currentThread()->getWebTaskRunner()->clone()));
 }
 
 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() {
@@ -476,7 +477,7 @@
 }
 
 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) {
-  scoped_ptr<WebThreadImplForWorkerScheduler> thread(
+  std::unique_ptr<WebThreadImplForWorkerScheduler> thread(
       new WebThreadImplForWorkerScheduler(name));
   thread->Init();
   WaitUntilWebThreadTLSUpdate(thread.get());
@@ -509,14 +510,14 @@
     TraceLogEnabledStateObserver* observer) {
   TraceLogObserverAdapter* adapter = new TraceLogObserverAdapter(observer);
   bool did_insert =
-      trace_log_observers_.add(observer, make_scoped_ptr(adapter)).second;
+      trace_log_observers_.add(observer, base::WrapUnique(adapter)).second;
   DCHECK(did_insert);
   base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver(adapter);
 }
 
 void BlinkPlatformImpl::removeTraceLogEnabledStateObserver(
     TraceLogEnabledStateObserver* observer) {
-  scoped_ptr<TraceLogObserverAdapter> adapter =
+  std::unique_ptr<TraceLogObserverAdapter> adapter =
       trace_log_observers_.take_and_erase(observer);
   DCHECK(adapter);
   DCHECK(base::trace_event::TraceLog::GetInstance()->HasEnabledStateObserver(
diff --git a/content/child/blink_platform_impl.h b/content/child/blink_platform_impl.h
index 5b2a40be5..1b04587 100644
--- a/content/child/blink_platform_impl.h
+++ b/content/child/blink_platform_impl.h
@@ -158,16 +158,16 @@
   WebFallbackThemeEngineImpl fallback_theme_engine_;
   base::ThreadLocalStorage::Slot current_thread_slot_;
   webcrypto::WebCryptoImpl web_crypto_;
-  scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_;
+  std::unique_ptr<WebGeofencingProviderImpl> geofencing_provider_;
   base::ScopedPtrHashMap<blink::Platform::TraceLogEnabledStateObserver*,
-                         scoped_ptr<TraceLogObserverAdapter>>
+                         std::unique_ptr<TraceLogObserverAdapter>>
       trace_log_observers_;
 
   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
   scoped_refptr<NotificationDispatcher> notification_dispatcher_;
   scoped_refptr<PushDispatcher> push_dispatcher_;
-  scoped_ptr<PermissionDispatcher> permission_client_;
-  scoped_ptr<BackgroundSyncProvider> main_thread_sync_provider_;
+  std::unique_ptr<PermissionDispatcher> permission_client_;
+  std::unique_ptr<BackgroundSyncProvider> main_thread_sync_provider_;
 
   scheduler::WebThreadBase* compositor_thread_;
 };
diff --git a/content/child/blob_storage/blob_consolidation.h b/content/child/blob_storage/blob_consolidation.h
index 04a4664..7c581d4c 100644
--- a/content/child/blob_storage/blob_consolidation.h
+++ b/content/child/blob_storage/blob_consolidation.h
@@ -8,13 +8,13 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "storage/common/data_element.h"
 #include "third_party/WebKit/public/platform/WebThreadSafeData.h"
diff --git a/content/child/blob_storage/blob_transport_controller.cc b/content/child/blob_storage/blob_transport_controller.cc
index 87c22725..0bcadbc 100644
--- a/content/child/blob_storage/blob_transport_controller.cc
+++ b/content/child/blob_storage/blob_transport_controller.cc
@@ -62,7 +62,7 @@
 void BlobTransportController::InitiateBlobTransfer(
     const std::string& uuid,
     const std::string& content_type,
-    scoped_ptr<BlobConsolidation> consolidation,
+    std::unique_ptr<BlobConsolidation> consolidation,
     scoped_refptr<ThreadSafeSender> sender,
     base::SingleThreadTaskRunner* io_runner,
     scoped_refptr<base::SingleThreadTaskRunner> main_runner) {
@@ -200,7 +200,7 @@
 
 void BlobTransportController::StoreBlobDataForRequests(
     const std::string& uuid,
-    scoped_ptr<BlobConsolidation> consolidation,
+    std::unique_ptr<BlobConsolidation> consolidation,
     scoped_refptr<base::SingleThreadTaskRunner> main_runner) {
   if (!main_thread_runner_.get()) {
     main_thread_runner_ = std::move(main_runner);
@@ -255,7 +255,7 @@
         if (!memory) {
           SharedMemoryHandle& handle = (*memory_handles)[request.handle_index];
           DCHECK(SharedMemory::IsHandleValid(handle));
-          scoped_ptr<SharedMemory> shared_memory(
+          std::unique_ptr<SharedMemory> shared_memory(
               new SharedMemory(handle, false));
           if (!shared_memory->Map(request.size))
             return ResponsesStatus::SHARED_MEMORY_MAP_FAILED;
diff --git a/content/child/blob_storage/blob_transport_controller.h b/content/child/blob_storage/blob_transport_controller.h
index 77a8bb91..c9c62ce 100644
--- a/content/child/blob_storage/blob_transport_controller.h
+++ b/content/child/blob_storage/blob_transport_controller.h
@@ -8,13 +8,13 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory_handle.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_platform_file.h"
@@ -63,7 +63,7 @@
   static void InitiateBlobTransfer(
       const std::string& uuid,
       const std::string& content_type,
-      scoped_ptr<BlobConsolidation> consolidation,
+      std::unique_ptr<BlobConsolidation> consolidation,
       scoped_refptr<ThreadSafeSender> sender,
       base::SingleThreadTaskRunner* io_runner,
       scoped_refptr<base::SingleThreadTaskRunner> main_runner);
@@ -112,7 +112,7 @@
 
   void StoreBlobDataForRequests(
       const std::string& uuid,
-      scoped_ptr<BlobConsolidation> consolidation,
+      std::unique_ptr<BlobConsolidation> consolidation,
       scoped_refptr<base::SingleThreadTaskRunner> main_runner);
 
   ResponsesStatus GetResponses(
@@ -128,7 +128,7 @@
   void ReleaseBlobConsolidation(const std::string& uuid);
 
   scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_;
-  std::map<std::string, scoped_ptr<BlobConsolidation>> blob_storage_;
+  std::map<std::string, std::unique_ptr<BlobConsolidation>> blob_storage_;
 
   DISALLOW_COPY_AND_ASSIGN(BlobTransportController);
 };
diff --git a/content/child/blob_storage/blob_transport_controller_unittest.cc b/content/child/blob_storage/blob_transport_controller_unittest.cc
index 67dd7f9..08120fc 100644
--- a/content/child/blob_storage/blob_transport_controller_unittest.cc
+++ b/content/child/blob_storage/blob_transport_controller_unittest.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/tuple.h"
@@ -135,7 +136,7 @@
   const size_t kShortcutSize = 11;
 
   // The first two data elements should be combined and the data shortcut.
-  scoped_ptr<BlobConsolidation> consolidation(new BlobConsolidation());
+  std::unique_ptr<BlobConsolidation> consolidation(new BlobConsolidation());
   consolidation->AddBlobItem(KRefBlobUUID, 10, 10);
   consolidation->AddDataItem(CreateData("Hello"));
   consolidation->AddDataItem(CreateData("Hello2"));
@@ -170,7 +171,7 @@
   consolidation->AddDataItem(CreateData("Hello3"));
   // See the above test for the expected descriptions layout.
 
-  holder->blob_storage_[kBlobUUID] = make_scoped_ptr(consolidation);
+  holder->blob_storage_[kBlobUUID] = base::WrapUnique(consolidation);
 
   std::vector<BlobItemBytesRequest> requests;
   std::vector<base::SharedMemoryHandle> memory_handles;
@@ -228,7 +229,7 @@
   consolidation->AddDataItem(CreateData("Hello3"));
   // See the above test for the expected descriptions layout.
 
-  holder->blob_storage_[kBlobUUID] = make_scoped_ptr(consolidation);
+  holder->blob_storage_[kBlobUUID] = base::WrapUnique(consolidation);
 
   std::vector<BlobItemBytesRequest> requests;
   std::vector<base::SharedMemoryHandle> memory_handles;
@@ -274,7 +275,7 @@
   BlobConsolidation* consolidation = new BlobConsolidation();
   consolidation->AddBlobItem(KRefBlobUUID, 10, 10);
   BlobTransportController::InitiateBlobTransfer(
-      kBlobUUID, kBlobContentType, make_scoped_ptr(consolidation), sender_,
+      kBlobUUID, kBlobContentType, base::WrapUnique(consolidation), sender_,
       io_thread_runner_.get(), main_thread_runner_);
   // Check that we have the 'increase ref' pending task.
   EXPECT_TRUE(main_thread_runner_->HasPendingTask());
@@ -304,7 +305,7 @@
   BlobConsolidation* consolidation2 = new BlobConsolidation();
   consolidation2->AddBlobItem(KRefBlobUUID, 10, 10);
   BlobTransportController::InitiateBlobTransfer(
-      kBlob2UUID, kBlob2ContentType, make_scoped_ptr(consolidation2), sender_,
+      kBlob2UUID, kBlob2ContentType, base::WrapUnique(consolidation2), sender_,
       io_thread_runner_.get(), main_thread_runner_);
   EXPECT_TRUE(main_thread_runner_->HasPendingTask());
   main_thread_runner_->ClearPendingTasks();
@@ -330,7 +331,7 @@
   BlobConsolidation* consolidation = new BlobConsolidation();
   consolidation->AddBlobItem(KRefBlobUUID, 10, 10);
 
-  holder->blob_storage_[kBlobUUID] = make_scoped_ptr(consolidation);
+  holder->blob_storage_[kBlobUUID] = base::WrapUnique(consolidation);
 
   std::vector<BlobItemBytesRequest> requests;
   std::vector<base::SharedMemoryHandle> memory_handles;
diff --git a/content/child/browser_font_resource_trusted.h b/content/child/browser_font_resource_trusted.h
index 3595bdd..2e399ba 100644
--- a/content/child/browser_font_resource_trusted.h
+++ b/content/child/browser_font_resource_trusted.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_
 #define CONTENT_CHILD_BROWSER_FONT_RESOURCE_TRUSTED_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "ppapi/c/pp_bool.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
@@ -68,7 +68,7 @@
                         const PP_Rect* clip);
 
  private:
-  scoped_ptr<blink::WebFont> font_;
+  std::unique_ptr<blink::WebFont> font_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserFontResource_Trusted);
 };
diff --git a/content/child/child_discardable_shared_memory_manager.cc b/content/child/child_discardable_shared_memory_manager.cc
index 5116036..e798ea7 100644
--- a/content/child/child_discardable_shared_memory_manager.cc
+++ b/content/child/child_discardable_shared_memory_manager.cc
@@ -13,6 +13,7 @@
 #include "base/macros.h"
 #include "base/memory/discardable_memory.h"
 #include "base/memory/discardable_shared_memory.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/process/memory.h"
 #include "base/process/process_metrics.h"
@@ -34,7 +35,7 @@
 class DiscardableMemoryImpl : public base::DiscardableMemory {
  public:
   DiscardableMemoryImpl(ChildDiscardableSharedMemoryManager* manager,
-                        scoped_ptr<DiscardableSharedMemoryHeap::Span> span)
+                        std::unique_ptr<DiscardableSharedMemoryHeap::Span> span)
       : manager_(manager), span_(std::move(span)), is_locked_(true) {}
 
   ~DiscardableMemoryImpl() override {
@@ -73,7 +74,7 @@
 
  private:
   ChildDiscardableSharedMemoryManager* const manager_;
-  scoped_ptr<DiscardableSharedMemoryHeap::Span> span_;
+  std::unique_ptr<DiscardableSharedMemoryHeap::Span> span_;
   bool is_locked_;
 
   DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryImpl);
@@ -104,7 +105,7 @@
     MemoryUsageChanged(0, 0);
 }
 
-scoped_ptr<base::DiscardableMemory>
+std::unique_ptr<base::DiscardableMemory>
 ChildDiscardableSharedMemoryManager::AllocateLockedDiscardableMemory(
     size_t size) {
   base::AutoLock lock(lock_);
@@ -138,7 +139,7 @@
   size_t heap_size_prior_to_releasing_purged_memory = heap_.GetSize();
   for (;;) {
     // Search free lists for suitable span.
-    scoped_ptr<DiscardableSharedMemoryHeap::Span> free_span =
+    std::unique_ptr<DiscardableSharedMemoryHeap::Span> free_span =
         heap_.SearchFreeLists(pages, slack);
     if (!free_span.get())
       break;
@@ -163,7 +164,7 @@
     // at least one span from the free lists.
     MemoryUsageChanged(heap_.GetSize(), heap_.GetSizeOfFreeLists());
 
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new DiscardableMemoryImpl(this, std::move(free_span)));
   }
 
@@ -183,18 +184,18 @@
       g_next_discardable_shared_memory_id.GetNext();
 
   // Ask parent process to allocate a new discardable shared memory segment.
-  scoped_ptr<base::DiscardableSharedMemory> shared_memory(
+  std::unique_ptr<base::DiscardableSharedMemory> shared_memory(
       AllocateLockedDiscardableSharedMemory(allocation_size_in_bytes, new_id));
 
   // Create span for allocated memory.
-  scoped_ptr<DiscardableSharedMemoryHeap::Span> new_span(heap_.Grow(
+  std::unique_ptr<DiscardableSharedMemoryHeap::Span> new_span(heap_.Grow(
       std::move(shared_memory), allocation_size_in_bytes, new_id,
       base::Bind(&SendDeletedDiscardableSharedMemoryMessage, sender_, new_id)));
   new_span->set_is_locked(true);
 
   // Unlock and insert any left over memory into free lists.
   if (pages < pages_to_allocate) {
-    scoped_ptr<DiscardableSharedMemoryHeap::Span> leftover =
+    std::unique_ptr<DiscardableSharedMemoryHeap::Span> leftover =
         heap_.Split(new_span.get(), pages);
     leftover->shared_memory()->Unlock(
         leftover->start() * base::GetPageSize() -
@@ -206,7 +207,7 @@
 
   MemoryUsageChanged(heap_.GetSize(), heap_.GetSizeOfFreeLists());
 
-  return make_scoped_ptr(new DiscardableMemoryImpl(this, std::move(new_span)));
+  return base::WrapUnique(new DiscardableMemoryImpl(this, std::move(new_span)));
 }
 
 bool ChildDiscardableSharedMemoryManager::OnMemoryDump(
@@ -270,7 +271,7 @@
 }
 
 void ChildDiscardableSharedMemoryManager::ReleaseSpan(
-    scoped_ptr<DiscardableSharedMemoryHeap::Span> span) {
+    std::unique_ptr<DiscardableSharedMemoryHeap::Span> span) {
   base::AutoLock lock(lock_);
 
   // Delete span instead of merging it into free lists if memory is gone.
@@ -292,7 +293,7 @@
   return heap_.CreateMemoryAllocatorDump(span, name, pmd);
 }
 
-scoped_ptr<base::DiscardableSharedMemory>
+std::unique_ptr<base::DiscardableSharedMemory>
 ChildDiscardableSharedMemoryManager::AllocateLockedDiscardableSharedMemory(
     size_t size,
     DiscardableSharedMemoryId id) {
@@ -305,7 +306,7 @@
   sender_->Send(
       new ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory(
           size, id, &handle));
-  scoped_ptr<base::DiscardableSharedMemory> memory(
+  std::unique_ptr<base::DiscardableSharedMemory> memory(
       new base::DiscardableSharedMemory(handle));
   if (!memory->Map(size))
     base::TerminateBecauseOutOfMemory(size);
diff --git a/content/child/child_discardable_shared_memory_manager.h b/content/child/child_discardable_shared_memory_manager.h
index 8a37593..4a645fa 100644
--- a/content/child/child_discardable_shared_memory_manager.h
+++ b/content/child/child_discardable_shared_memory_manager.h
@@ -29,7 +29,7 @@
   ~ChildDiscardableSharedMemoryManager() override;
 
   // Overridden from base::DiscardableMemoryAllocator:
-  scoped_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemory(
+  std::unique_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemory(
       size_t size) override;
 
   // Overridden from base::trace_event::MemoryDumpProvider:
@@ -41,7 +41,7 @@
 
   bool LockSpan(DiscardableSharedMemoryHeap::Span* span);
   void UnlockSpan(DiscardableSharedMemoryHeap::Span* span);
-  void ReleaseSpan(scoped_ptr<DiscardableSharedMemoryHeap::Span> span);
+  void ReleaseSpan(std::unique_ptr<DiscardableSharedMemoryHeap::Span> span);
 
   base::trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
       DiscardableSharedMemoryHeap::Span* span,
@@ -49,7 +49,7 @@
       base::trace_event::ProcessMemoryDump* pmd) const;
 
  private:
-  scoped_ptr<base::DiscardableSharedMemory>
+  std::unique_ptr<base::DiscardableSharedMemory>
   AllocateLockedDiscardableSharedMemory(size_t size,
                                         DiscardableSharedMemoryId id);
   void MemoryUsageChanged(size_t new_bytes_allocated,
diff --git a/content/child/child_gpu_memory_buffer_manager.cc b/content/child/child_gpu_memory_buffer_manager.cc
index 2986b622..c636b508 100644
--- a/content/child/child_gpu_memory_buffer_manager.cc
+++ b/content/child/child_gpu_memory_buffer_manager.cc
@@ -31,7 +31,7 @@
 ChildGpuMemoryBufferManager::~ChildGpuMemoryBufferManager() {
 }
 
-scoped_ptr<gfx::GpuMemoryBuffer>
+std::unique_ptr<gfx::GpuMemoryBuffer>
 ChildGpuMemoryBufferManager::AllocateGpuMemoryBuffer(const gfx::Size& size,
                                                      gfx::BufferFormat format,
                                                      gfx::BufferUsage usage,
@@ -52,7 +52,7 @@
   if (!success || handle.is_null())
     return nullptr;
 
-  scoped_ptr<gpu::GpuMemoryBufferImpl> buffer(
+  std::unique_ptr<gpu::GpuMemoryBufferImpl> buffer(
       gpu::GpuMemoryBufferImpl::CreateFromHandle(
           handle, size, format, usage,
           base::Bind(&DeletedGpuMemoryBuffer, base::RetainedRef(sender_),
@@ -66,7 +66,7 @@
   return std::move(buffer);
 }
 
-scoped_ptr<gfx::GpuMemoryBuffer>
+std::unique_ptr<gfx::GpuMemoryBuffer>
 ChildGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle(
     const gfx::GpuMemoryBufferHandle& handle,
     const gfx::Size& size,
diff --git a/content/child/child_gpu_memory_buffer_manager.h b/content/child/child_gpu_memory_buffer_manager.h
index 3b6a456..97801f3a 100644
--- a/content/child/child_gpu_memory_buffer_manager.h
+++ b/content/child/child_gpu_memory_buffer_manager.h
@@ -17,12 +17,12 @@
   ~ChildGpuMemoryBufferManager() override;
 
   // Overridden from gpu::GpuMemoryBufferManager:
-  scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
+  std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
       const gfx::Size& size,
       gfx::BufferFormat format,
       gfx::BufferUsage usage,
       int32_t surface_id) override;
-  scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
+  std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
       const gfx::GpuMemoryBufferHandle& handle,
       const gfx::Size& size,
       gfx::BufferFormat format) override;
diff --git a/content/child/child_histogram_message_filter.h b/content/child/child_histogram_message_filter.h
index db0ac72..ff374298 100644
--- a/content/child/child_histogram_message_filter.h
+++ b/content/child/child_histogram_message_filter.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_CHILD_CHILD_HISTOGRAM_MESSAGE_FILTER_H_
 #define CONTENT_CHILD_CHILD_HISTOGRAM_MESSAGE_FILTER_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "ipc/message_filter.h"
 
@@ -50,7 +50,8 @@
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
 
   // Prepares histogram deltas for transmission.
-  scoped_ptr<base::HistogramDeltaSerialization> histogram_delta_serialization_;
+  std::unique_ptr<base::HistogramDeltaSerialization>
+      histogram_delta_serialization_;
 
   DISALLOW_COPY_AND_ASSIGN(ChildHistogramMessageFilter);
 };
diff --git a/content/child/child_process.h b/content/child/child_process.h
index 30e9dbf8..82ec7dd 100644
--- a/content/child/child_process.h
+++ b/content/child/child_process.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_CHILD_CHILD_PROCESS_H_
 #define CONTENT_CHILD_CHILD_PROCESS_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/threading/thread.h"
 #include "content/common/content_export.h"
@@ -85,7 +86,7 @@
   // NOTE: make sure that main_thread_ is listed after shutdown_event_, since
   // it depends on it (indirectly through IPC::SyncChannel).  Same for
   // io_thread_.
-  scoped_ptr<ChildThreadImpl> main_thread_;
+  std::unique_ptr<ChildThreadImpl> main_thread_;
 
   DISALLOW_COPY_AND_ASSIGN(ChildProcess);
 };
diff --git a/content/child/child_shared_bitmap_manager.cc b/content/child/child_shared_bitmap_manager.cc
index d83d431..daa46279 100644
--- a/content/child/child_shared_bitmap_manager.cc
+++ b/content/child/child_shared_bitmap_manager.cc
@@ -5,9 +5,11 @@
 #include "content/child/child_shared_bitmap_manager.h"
 
 #include <stddef.h>
+
 #include <utility>
 
 #include "base/debug/alias.h"
+#include "base/memory/ptr_util.h"
 #include "base/process/memory.h"
 #include "base/process/process_metrics.h"
 #include "build/build_config.h"
@@ -30,7 +32,7 @@
         sender_(sender) {}
 
   ChildSharedBitmap(scoped_refptr<ThreadSafeSender> sender,
-                    scoped_ptr<base::SharedMemory> shared_memory_holder,
+                    std::unique_ptr<base::SharedMemory> shared_memory_holder,
                     const cc::SharedBitmapId& id)
       : ChildSharedBitmap(sender, shared_memory_holder.get(), id) {
     shared_memory_holder_ = std::move(shared_memory_holder);
@@ -42,7 +44,7 @@
 
  private:
   scoped_refptr<ThreadSafeSender> sender_;
-  scoped_ptr<base::SharedMemory> shared_memory_holder_;
+  std::unique_ptr<base::SharedMemory> shared_memory_holder_;
 };
 
 // Collect extra information for debugging bitmap creation failures.
@@ -52,7 +54,7 @@
   int height = size.height();
   DWORD last_error = GetLastError();
 
-  scoped_ptr<base::ProcessMetrics> metrics(
+  std::unique_ptr<base::ProcessMetrics> metrics(
       base::ProcessMetrics::CreateProcessMetrics(
           base::GetCurrentProcessHandle()));
 
@@ -83,9 +85,9 @@
 
 ChildSharedBitmapManager::~ChildSharedBitmapManager() {}
 
-scoped_ptr<cc::SharedBitmap> ChildSharedBitmapManager::AllocateSharedBitmap(
-    const gfx::Size& size) {
-  scoped_ptr<SharedMemoryBitmap> bitmap = AllocateSharedMemoryBitmap(size);
+std::unique_ptr<cc::SharedBitmap>
+ChildSharedBitmapManager::AllocateSharedBitmap(const gfx::Size& size) {
+  std::unique_ptr<SharedMemoryBitmap> bitmap = AllocateSharedMemoryBitmap(size);
 #if defined(OS_POSIX)
   // Close file descriptor to avoid running out.
   if (bitmap)
@@ -94,21 +96,21 @@
   return std::move(bitmap);
 }
 
-scoped_ptr<SharedMemoryBitmap>
+std::unique_ptr<SharedMemoryBitmap>
 ChildSharedBitmapManager::AllocateSharedMemoryBitmap(const gfx::Size& size) {
   TRACE_EVENT2("renderer",
                "ChildSharedBitmapManager::AllocateSharedMemoryBitmap", "width",
                size.width(), "height", size.height());
   size_t memory_size;
   if (!cc::SharedBitmap::SizeInBytes(size, &memory_size))
-    return scoped_ptr<SharedMemoryBitmap>();
+    return std::unique_ptr<SharedMemoryBitmap>();
   cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
-  scoped_ptr<base::SharedMemory> memory;
+  std::unique_ptr<base::SharedMemory> memory;
 #if defined(OS_POSIX)
   base::SharedMemoryHandle handle;
   sender_->Send(new ChildProcessHostMsg_SyncAllocateSharedBitmap(
       memory_size, id, &handle));
-  memory = make_scoped_ptr(new base::SharedMemory(handle, false));
+  memory = base::WrapUnique(new base::SharedMemory(handle, false));
   if (!memory->Map(memory_size))
     CollectMemoryUsageAndDie(size, memory_size);
 #else
@@ -123,28 +125,29 @@
   sender_->Send(new ChildProcessHostMsg_AllocatedSharedBitmap(
       memory_size, handle_to_send, id));
 #endif
-  return make_scoped_ptr(new ChildSharedBitmap(sender_, std::move(memory), id));
+  return base::WrapUnique(
+      new ChildSharedBitmap(sender_, std::move(memory), id));
 }
 
-scoped_ptr<cc::SharedBitmap> ChildSharedBitmapManager::GetSharedBitmapFromId(
-    const gfx::Size&,
-    const cc::SharedBitmapId&) {
+std::unique_ptr<cc::SharedBitmap>
+ChildSharedBitmapManager::GetSharedBitmapFromId(const gfx::Size&,
+                                                const cc::SharedBitmapId&) {
   NOTREACHED();
-  return scoped_ptr<cc::SharedBitmap>();
+  return std::unique_ptr<cc::SharedBitmap>();
 }
 
-scoped_ptr<cc::SharedBitmap> ChildSharedBitmapManager::GetBitmapForSharedMemory(
-    base::SharedMemory* mem) {
+std::unique_ptr<cc::SharedBitmap>
+ChildSharedBitmapManager::GetBitmapForSharedMemory(base::SharedMemory* mem) {
   cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
   base::SharedMemoryHandle handle_to_send = mem->handle();
 #if defined(OS_POSIX)
   if (!mem->ShareToProcess(base::GetCurrentProcessHandle(), &handle_to_send))
-    return scoped_ptr<cc::SharedBitmap>();
+    return std::unique_ptr<cc::SharedBitmap>();
 #endif
   sender_->Send(new ChildProcessHostMsg_AllocatedSharedBitmap(
       mem->mapped_size(), handle_to_send, id));
 
-  return make_scoped_ptr(new ChildSharedBitmap(sender_, mem, id));
+  return base::WrapUnique(new ChildSharedBitmap(sender_, mem, id));
 }
 
 }  // namespace content
diff --git a/content/child/child_shared_bitmap_manager.h b/content/child/child_shared_bitmap_manager.h
index 792ed45..feb065b 100644
--- a/content/child/child_shared_bitmap_manager.h
+++ b/content/child/child_shared_bitmap_manager.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "cc/resources/shared_bitmap_manager.h"
 #include "content/child/thread_safe_sender.h"
@@ -34,15 +35,15 @@
   ~ChildSharedBitmapManager() override;
 
   // cc::SharedBitmapManager implementation.
-  scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap(
+  std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmap(
       const gfx::Size& size) override;
-  scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId(
+  std::unique_ptr<cc::SharedBitmap> GetSharedBitmapFromId(
       const gfx::Size&,
       const cc::SharedBitmapId&) override;
 
-  scoped_ptr<cc::SharedBitmap> GetBitmapForSharedMemory(
+  std::unique_ptr<cc::SharedBitmap> GetBitmapForSharedMemory(
       base::SharedMemory* mem);
-  scoped_ptr<SharedMemoryBitmap> AllocateSharedMemoryBitmap(
+  std::unique_ptr<SharedMemoryBitmap> AllocateSharedMemoryBitmap(
       const gfx::Size& size);
 
  private:
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 1aee05a..9188e48 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -111,7 +111,8 @@
 };
 
 bool CreateWaitAndExitThread(base::TimeDelta duration) {
-  scoped_ptr<WaitAndExitDelegate> delegate(new WaitAndExitDelegate(duration));
+  std::unique_ptr<WaitAndExitDelegate> delegate(
+      new WaitAndExitDelegate(duration));
 
   const bool thread_created =
       base::PlatformThread::CreateNonJoinable(0, delegate.get());
@@ -434,8 +435,8 @@
 
   // In single process mode we may already have a power monitor
   if (!base::PowerMonitor::Get()) {
-    scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source(
-      new PowerMonitorBroadcastSource());
+    std::unique_ptr<PowerMonitorBroadcastSource> power_monitor_source(
+        new PowerMonitorBroadcastSource());
     channel_->AddFilter(power_monitor_source->GetMessageFilter());
 
     power_monitor_.reset(
@@ -568,17 +569,17 @@
   return &router_;
 }
 
-scoped_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
+std::unique_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
     size_t buf_size) {
   DCHECK(base::MessageLoop::current() == message_loop());
   return AllocateSharedMemory(buf_size, this);
 }
 
 // static
-scoped_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
+std::unique_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
     size_t buf_size,
     IPC::Sender* sender) {
-  scoped_ptr<base::SharedMemory> shared_buf;
+  std::unique_ptr<base::SharedMemory> shared_buf;
   // Ask the browser to create the shared memory, since this is blocked by the
   // sandbox on most platforms.
   base::SharedMemoryHandle shared_mem_handle;
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h
index 139713c..fec7da769 100644
--- a/content/child/child_thread_impl.h
+++ b/content/child/child_thread_impl.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/memory/weak_ptr.h"
 #include "base/power_monitor/power_monitor.h"
@@ -99,11 +99,11 @@
   // failure.
   // Note: On posix, this requires a sync IPC to the browser process,
   // but on windows the child process directly allocates the block.
-  scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t buf_size);
+  std::unique_ptr<base::SharedMemory> AllocateSharedMemory(size_t buf_size);
 
   // A static variant that can be called on background threads provided
   // the |sender| passed in is safe to use on background threads.
-  static scoped_ptr<base::SharedMemory> AllocateSharedMemory(
+  static std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
       size_t buf_size,
       IPC::Sender* sender);
 
@@ -235,11 +235,11 @@
 
   void EnsureConnected();
 
-  scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
-  scoped_ptr<MojoApplication> mojo_application_;
+  std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
+  std::unique_ptr<MojoApplication> mojo_application_;
 
   std::string channel_name_;
-  scoped_ptr<IPC::SyncChannel> channel_;
+  std::unique_ptr<IPC::SyncChannel> channel_;
 
   // Allows threads other than the main thread to send sync messages.
   scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
@@ -251,9 +251,9 @@
   ChildThreadMessageRouter router_;
 
   // Handles resource loads for this process.
-  scoped_ptr<ResourceDispatcher> resource_dispatcher_;
+  std::unique_ptr<ResourceDispatcher> resource_dispatcher_;
 
-  scoped_ptr<WebSocketDispatcher> websocket_dispatcher_;
+  std::unique_ptr<WebSocketDispatcher> websocket_dispatcher_;
 
   // The OnChannelError() callback was invoked - the channel is dead, don't
   // attempt to communicate.
@@ -261,9 +261,9 @@
 
   base::MessageLoop* message_loop_;
 
-  scoped_ptr<FileSystemDispatcher> file_system_dispatcher_;
+  std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_;
 
-  scoped_ptr<QuotaDispatcher> quota_dispatcher_;
+  std::unique_ptr<QuotaDispatcher> quota_dispatcher_;
 
   scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_;
 
@@ -277,14 +277,14 @@
 
   scoped_refptr<PushDispatcher> push_dispatcher_;
 
-  scoped_ptr<ChildSharedBitmapManager> shared_bitmap_manager_;
+  std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_;
 
-  scoped_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_;
+  std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_;
 
-  scoped_ptr<ChildDiscardableSharedMemoryManager>
+  std::unique_ptr<ChildDiscardableSharedMemoryManager>
       discardable_shared_memory_manager_;
 
-  scoped_ptr<base::PowerMonitor> power_monitor_;
+  std::unique_ptr<base::PowerMonitor> power_monitor_;
 
   scoped_refptr<ChildMessageFilter> geofencing_message_filter_;
 
diff --git a/content/child/child_thread_impl_browsertest.cc b/content/child/child_thread_impl_browsertest.cc
index 278dfe5e..de921299 100644
--- a/content/child/child_thread_impl_browsertest.cc
+++ b/content/child/child_thread_impl_browsertest.cc
@@ -67,7 +67,7 @@
 IN_PROC_BROWSER_TEST_F(ChildThreadImplBrowserTest, LockDiscardableMemory) {
   const size_t kSize = 1024 * 1024;  // 1MiB.
 
-  scoped_ptr<base::DiscardableMemory> memory =
+  std::unique_ptr<base::DiscardableMemory> memory =
       child_discardable_shared_memory_manager()
           ->AllocateLockedDiscardableMemory(kSize);
 
@@ -91,7 +91,7 @@
 
   ScopedVector<base::DiscardableMemory> instances;
   for (size_t i = 0; i < kNumberOfInstances; ++i) {
-    scoped_ptr<base::DiscardableMemory> memory =
+    std::unique_ptr<base::DiscardableMemory> memory =
         child_discardable_shared_memory_manager()
             ->AllocateLockedDiscardableMemory(kLargeSize);
     ASSERT_TRUE(memory);
@@ -106,7 +106,7 @@
                        ReleaseFreeDiscardableMemory) {
   const size_t kSize = 1024 * 1024;  // 1MiB.
 
-  scoped_ptr<base::DiscardableMemory> memory =
+  std::unique_ptr<base::DiscardableMemory> memory =
       child_discardable_shared_memory_manager()
           ->AllocateLockedDiscardableMemory(kSize);
 
@@ -156,7 +156,7 @@
   gfx::BufferFormat format = ::testing::get<1>(GetParam());
   gfx::Size buffer_size(4, 4);
 
-  scoped_ptr<gfx::GpuMemoryBuffer> buffer =
+  std::unique_ptr<gfx::GpuMemoryBuffer> buffer =
       child_gpu_memory_buffer_manager()->AllocateGpuMemoryBuffer(
           buffer_size, format, gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
           0 /* surface_id */);
@@ -175,7 +175,7 @@
         gfx::RowSizeForBufferFormat(buffer_size.width(), format, plane);
     EXPECT_GT(row_size_in_bytes, 0u);
 
-    scoped_ptr<char[]> data(new char[row_size_in_bytes]);
+    std::unique_ptr<char[]> data(new char[row_size_in_bytes]);
     memset(data.get(), 0x2a + plane, row_size_in_bytes);
     size_t height = buffer_size.height() /
                     gfx::SubsamplingFactorForBufferFormat(format, plane);
diff --git a/content/child/content_child_helpers.cc b/content/child/content_child_helpers.cc
index 66775a2..7ddeb4d1 100644
--- a/content/child/content_child_helpers.cc
+++ b/content/child/content_child_helpers.cc
@@ -6,8 +6,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/process/process_metrics.h"
 #include "build/build_config.h"
 #include "v8/include/v8.h"
@@ -45,7 +46,7 @@
 }
 #elif defined(OS_MACOSX)
 size_t GetMemoryUsageKB() {
-  scoped_ptr<base::ProcessMetrics> process_metrics(
+  std::unique_ptr<base::ProcessMetrics> process_metrics(
       // The default port provider is sufficient to get data for the current
       // process.
       base::ProcessMetrics::CreateProcessMetrics(
@@ -54,7 +55,7 @@
 }
 #else
 size_t GetMemoryUsageKB() {
-  scoped_ptr<base::ProcessMetrics> process_metrics(
+  std::unique_ptr<base::ProcessMetrics> process_metrics(
       base::ProcessMetrics::CreateProcessMetrics(
           base::GetCurrentProcessHandle()));
   return process_metrics->GetPagefileUsage() >> 10;
diff --git a/content/child/dwrite_font_proxy/dwrite_font_proxy_win_unittest.cc b/content/child/dwrite_font_proxy/dwrite_font_proxy_win_unittest.cc
index 86203d6..88c02ee 100644
--- a/content/child/dwrite_font_proxy/dwrite_font_proxy_win_unittest.cc
+++ b/content/child/dwrite_font_proxy/dwrite_font_proxy_win_unittest.cc
@@ -8,8 +8,9 @@
 #include <shlobj.h>
 #include <wrl.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/dwrite_font_proxy_messages.h"
 #include "content/common/view_messages.h"
 #include "content/test/dwrite_font_fake_sender_win.h"
diff --git a/content/child/fileapi/webfilewriter_base_unittest.cc b/content/child/fileapi/webfilewriter_base_unittest.cc
index 686cd4e..94ad817 100644
--- a/content/child/fileapi/webfilewriter_base_unittest.cc
+++ b/content/child/fileapi/webfilewriter_base_unittest.cc
@@ -6,9 +6,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -178,7 +179,7 @@
     fail_error_received_ = static_cast<blink::WebFileError>(0);
   }
 
-  scoped_ptr<TestableFileWriter> testable_writer_;
+  std::unique_ptr<TestableFileWriter> testable_writer_;
   bool delete_in_client_callback_;
 
   // Observed WebFileWriterClient artifacts.
diff --git a/content/child/fileapi/webfilewriter_impl.cc b/content/child/fileapi/webfilewriter_impl.cc
index c62044e9..350f7fb 100644
--- a/content/child/fileapi/webfilewriter_impl.cc
+++ b/content/child/fileapi/webfilewriter_impl.cc
@@ -122,7 +122,7 @@
   const bool running_on_worker_;
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
   int written_bytes_;
-  scoped_ptr<base::WaitableEvent> waitable_event_;
+  std::unique_ptr<base::WaitableEvent> waitable_event_;
   base::Closure results_closure_;
 };
 
diff --git a/content/child/font_warmup_win_unittest.cc b/content/child/font_warmup_win_unittest.cc
index fd85d58f..91c0c84 100644
--- a/content/child/font_warmup_win_unittest.cc
+++ b/content/child/font_warmup_win_unittest.cc
@@ -7,11 +7,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/files/file_path.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sys_byteorder.h"
 #include "base/win/windows_version.h"
 #include "skia/ext/refptr.h"
@@ -254,7 +254,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_FALSE(!patch_data);
 
   HDC hdc = CreateCompatibleDC(0);
@@ -268,7 +268,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
 
   HDC hdc1 = CreateCompatibleDC(0);
@@ -286,7 +286,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   LOGFONTW logfont = {0};
   InitLogFont(&logfont, kTestFontFamilyW);
@@ -300,7 +300,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   LOGFONTW logfont = {0};
   InitLogFont(&logfont, kTestFontFamilyInvalid);
@@ -312,7 +312,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = CreateCompatibleDC(0);
   EXPECT_NE(hdc, nullptr);
@@ -327,7 +327,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = CreateCompatibleDC(0);
   EXPECT_NE(hdc, nullptr);
@@ -342,7 +342,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = reinterpret_cast<HDC>(0x55667788);
   EXPECT_FALSE(DeleteDC(hdc));
@@ -352,7 +352,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HFONT font = reinterpret_cast<HFONT>(0x88aabbcc);
   EXPECT_FALSE(DeleteObject(font));
@@ -362,7 +362,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = CreateCompatibleDC(0);
   EXPECT_NE(hdc, nullptr);
@@ -382,7 +382,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = CreateCompatibleDC(0);
   EXPECT_NE(hdc, nullptr);
@@ -401,7 +401,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = CreateCompatibleDC(0);
   EXPECT_NE(hdc, nullptr);
@@ -414,7 +414,7 @@
   if (base::win::GetVersion() < base::win::VERSION_WIN8)
     return;
   TestSkFontMgr fontmgr;
-  scoped_ptr<GdiFontPatchData> patch_data(SetupTest());
+  std::unique_ptr<GdiFontPatchData> patch_data(SetupTest());
   EXPECT_NE(patch_data, nullptr);
   HDC hdc = CreateCompatibleDC(0);
   EXPECT_NE(hdc, nullptr);
diff --git a/content/child/geofencing/geofencing_dispatcher.cc b/content/child/geofencing/geofencing_dispatcher.cc
index fcc746cb..7342e11ad 100644
--- a/content/child/geofencing/geofencing_dispatcher.cc
+++ b/content/child/geofencing/geofencing_dispatcher.cc
@@ -7,8 +7,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/child/service_worker/web_service_worker_registration_impl.h"
diff --git a/content/child/geofencing/geofencing_dispatcher.h b/content/child/geofencing/geofencing_dispatcher.h
index 951c0f8..bc9986b 100644
--- a/content/child/geofencing/geofencing_dispatcher.h
+++ b/content/child/geofencing/geofencing_dispatcher.h
@@ -6,12 +6,12 @@
 #define CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/id_map.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/geofencing_types.h"
 #include "content/public/child/worker_thread.h"
 #include "third_party/WebKit/public/platform/WebGeofencingProvider.h"
diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc
index e97af34..53113b19 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher.cc
@@ -175,7 +175,7 @@
   // Reset all cursor prefetch caches except for this cursor.
   ResetCursorPrefetchCaches(transaction_id, ipc_cursor_id);
 
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
 
   int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
   Send(new IndexedDBHostMsg_CursorAdvance(
@@ -191,7 +191,7 @@
   // Reset all cursor prefetch caches except for this cursor.
   ResetCursorPrefetchCaches(transaction_id, ipc_cursor_id);
 
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
 
   int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
   Send(new IndexedDBHostMsg_CursorContinue(
@@ -202,7 +202,7 @@
     int n,
     WebIDBCallbacks* callbacks_ptr,
     int32_t ipc_cursor_id) {
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
 
   int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
   Send(new IndexedDBHostMsg_CursorPrefetch(
@@ -223,8 +223,8 @@
     WebIDBCallbacks* callbacks_ptr,
     WebIDBDatabaseCallbacks* database_callbacks_ptr,
     const GURL& origin) {
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
-  scoped_ptr<WebIDBDatabaseCallbacks> database_callbacks(
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBDatabaseCallbacks> database_callbacks(
       database_callbacks_ptr);
 
   IndexedDBHostMsg_FactoryOpen_Params params;
@@ -242,7 +242,7 @@
 void IndexedDBDispatcher::RequestIDBFactoryGetDatabaseNames(
     WebIDBCallbacks* callbacks_ptr,
     const GURL& origin) {
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
 
   IndexedDBHostMsg_FactoryGetDatabaseNames_Params params;
   params.ipc_thread_id = CurrentWorkerId();
@@ -255,7 +255,7 @@
     const base::string16& name,
     WebIDBCallbacks* callbacks_ptr,
     const GURL& origin) {
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
 
   IndexedDBHostMsg_FactoryDeleteDatabase_Params params;
   params.ipc_thread_id = CurrentWorkerId();
@@ -286,7 +286,7 @@
     WebIDBDatabaseCallbacks* database_callbacks_ptr,
     WebVector<long long> object_store_ids,
     blink::WebIDBTransactionMode mode) {
-  scoped_ptr<WebIDBDatabaseCallbacks> database_callbacks(
+  std::unique_ptr<WebIDBDatabaseCallbacks> database_callbacks(
       database_callbacks_ptr);
   IndexedDBHostMsg_DatabaseCreateTransaction_Params params;
   params.ipc_thread_id = CurrentWorkerId();
@@ -476,7 +476,7 @@
     int64_t object_store_id,
     WebIDBCallbacks* callbacks_ptr) {
   ResetCursorPrefetchCaches(transaction_id, kAllCursors);
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
   int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
   Send(new IndexedDBHostMsg_DatabaseClear(CurrentWorkerId(),
                                           ipc_callbacks_id,
diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h
index 794ed27..a69f20e 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.h
+++ b/content/child/indexed_db/indexed_db_dispatcher.h
@@ -195,7 +195,7 @@
 
   template <typename T>
   void init_params(T* params, blink::WebIDBCallbacks* callbacks_ptr) {
-    scoped_ptr<blink::WebIDBCallbacks> callbacks(callbacks_ptr);
+    std::unique_ptr<blink::WebIDBCallbacks> callbacks(callbacks_ptr);
     params->ipc_thread_id = CurrentWorkerId();
     params->ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
   }
diff --git a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
index e9a0cc91..03b8808 100644
--- a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
@@ -2,15 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/child/indexed_db/indexed_db_dispatcher.h"
+
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/values.h"
-#include "content/child/indexed_db/indexed_db_dispatcher.h"
 #include "content/child/indexed_db/mock_webidbcallbacks.h"
 #include "content/child/indexed_db/webidbcursor_impl.h"
 #include "content/child/thread_safe_sender.h"
@@ -153,15 +155,16 @@
 
   // First case: successful cursor open.
   {
-    scoped_ptr<WebIDBCursor> cursor;
+    std::unique_ptr<WebIDBCursor> cursor;
     EXPECT_EQ(0UL, dispatcher.cursor_transaction_ids_.size());
 
     auto callbacks = new StrictMock<MockWebIDBCallbacks>();
     // Reference first param (cursor) to keep it alive.
     // TODO(cmumford): Cleanup (and below) once std::addressof() is allowed.
     ON_CALL(*callbacks, onSuccess(testing::A<WebIDBCursor*>(), _, _, _))
-        .WillByDefault(WithArgs<0>(Invoke(&cursor.operator=(nullptr),
-                                          &scoped_ptr<WebIDBCursor>::reset)));
+        .WillByDefault(
+            WithArgs<0>(Invoke(&cursor.operator=(nullptr),
+                               &std::unique_ptr<WebIDBCursor>::reset)));
     EXPECT_CALL(*callbacks, onSuccess(testing::A<WebIDBCursor*>(), _, _, _))
         .Times(1);
 
@@ -252,7 +255,7 @@
 }  // namespace
 
 TEST_F(IndexedDBDispatcherTest, CursorReset) {
-  scoped_ptr<WebIDBCursor> cursor;
+  std::unique_ptr<WebIDBCursor> cursor;
   MockDispatcher dispatcher(thread_safe_sender_.get());
 
   const int32_t ipc_database_id = 0;
@@ -266,14 +269,12 @@
   const int cursor2_transaction_id = 2;
   const int other_transaction_id = 3;
 
-  scoped_ptr<MockCursor> cursor1(
-      new MockCursor(WebIDBCursorImpl::kInvalidCursorId,
-                     cursor1_transaction_id,
+  std::unique_ptr<MockCursor> cursor1(
+      new MockCursor(WebIDBCursorImpl::kInvalidCursorId, cursor1_transaction_id,
                      thread_safe_sender_.get()));
 
-  scoped_ptr<MockCursor> cursor2(
-      new MockCursor(WebIDBCursorImpl::kInvalidCursorId,
-                     cursor2_transaction_id,
+  std::unique_ptr<MockCursor> cursor2(
+      new MockCursor(WebIDBCursorImpl::kInvalidCursorId, cursor2_transaction_id,
                      thread_safe_sender_.get()));
 
   dispatcher.cursors_[cursor1_ipc_id] = cursor1.get();
diff --git a/content/child/indexed_db/webidbcursor_impl.cc b/content/child/indexed_db/webidbcursor_impl.cc
index fb1c3bb..946b08dd 100644
--- a/content/child/indexed_db/webidbcursor_impl.cc
+++ b/content/child/indexed_db/webidbcursor_impl.cc
@@ -54,7 +54,7 @@
                                WebIDBCallbacks* callbacks_ptr) {
   IndexedDBDispatcher* dispatcher =
       IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
   if (count <= prefetch_keys_.size()) {
     CachedAdvance(count, callbacks.get());
     return;
@@ -74,7 +74,7 @@
                                         WebIDBCallbacks* callbacks_ptr) {
   IndexedDBDispatcher* dispatcher =
       IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
-  scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+  std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
 
   if (key.keyType() == blink::WebIDBKeyTypeNull &&
       primary_key.keyType() == blink::WebIDBKeyTypeNull) {
diff --git a/content/child/indexed_db/webidbcursor_impl_unittest.cc b/content/child/indexed_db/webidbcursor_impl_unittest.cc
index 053542b..e2031ff3 100644
--- a/content/child/indexed_db/webidbcursor_impl_unittest.cc
+++ b/content/child/indexed_db/webidbcursor_impl_unittest.cc
@@ -2,17 +2,20 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/child/indexed_db/webidbcursor_impl.h"
+
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/values.h"
 #include "content/child/indexed_db/indexed_db_dispatcher.h"
 #include "content/child/indexed_db/indexed_db_key_builders.h"
 #include "content/child/indexed_db/mock_webidbcallbacks.h"
-#include "content/child/indexed_db/webidbcursor_impl.h"
 #include "content/child/thread_safe_sender.h"
 #include "content/common/indexed_db/indexed_db_key.h"
 #include "ipc/ipc_sync_message_filter.h"
@@ -96,7 +99,7 @@
   int advance_calls_;
   int continue_calls_;
   int32_t destroyed_cursor_id_;
-  scoped_ptr<WebIDBCallbacks> callbacks_;
+  std::unique_ptr<WebIDBCallbacks> callbacks_;
 };
 
 class MockContinueCallbacks : public StrictMock<MockWebIDBCallbacks> {
@@ -137,14 +140,14 @@
     thread_safe_sender_ = new ThreadSafeSender(
         base::ThreadTaskRunnerHandle::Get(), new MockSyncMessageFilter);
     dispatcher_ =
-        make_scoped_ptr(new MockDispatcher(thread_safe_sender_.get()));
+        base::WrapUnique(new MockDispatcher(thread_safe_sender_.get()));
   }
 
  protected:
   base::MessageLoop message_loop_;
   WebIDBKey null_key_;
   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
-  scoped_ptr<MockDispatcher> dispatcher_;
+  std::unique_ptr<MockDispatcher> dispatcher_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(WebIDBCursorImplTest);
diff --git a/content/child/notifications/notification_image_loader.h b/content/child/notifications/notification_image_loader.h
index 37daebfa..96405f1 100644
--- a/content/child/notifications/notification_image_loader.h
+++ b/content/child/notifications/notification_image_loader.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "base/time/time.h"
 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
@@ -96,7 +96,7 @@
 
   bool completed_;
 
-  scoped_ptr<blink::WebURLLoader> url_loader_;
+  std::unique_ptr<blink::WebURLLoader> url_loader_;
 
   std::vector<uint8_t> buffer_;
 
diff --git a/content/child/notifications/notification_manager.cc b/content/child/notifications/notification_manager.cc
index ae4c1ba..8961f7a 100644
--- a/content/child/notifications/notification_manager.cc
+++ b/content/child/notifications/notification_manager.cc
@@ -113,7 +113,8 @@
           service_worker_registration)
           ->registration_id();
 
-  scoped_ptr<blink::WebNotificationShowCallbacks> owned_callbacks(callbacks);
+  std::unique_ptr<blink::WebNotificationShowCallbacks> owned_callbacks(
+      callbacks);
 
   // Verify that the author-provided payload size does not exceed our limit.
   // This is an implementation-defined limit to prevent abuse of notification
@@ -350,7 +351,7 @@
     const blink::WebSecurityOrigin& origin,
     const blink::WebNotificationData& notification_data,
     int64_t service_worker_registration_id,
-    scoped_ptr<blink::WebNotificationShowCallbacks> callbacks,
+    std::unique_ptr<blink::WebNotificationShowCallbacks> callbacks,
     const NotificationResources& notification_resources) {
   DCHECK_EQ(notification_data.actions.size(),
             notification_resources.action_icons.size());
diff --git a/content/child/notifications/notification_manager.h b/content/child/notifications/notification_manager.h
index 8b69a0b..0f383fa5 100644
--- a/content/child/notifications/notification_manager.h
+++ b/content/child/notifications/notification_manager.h
@@ -100,7 +100,7 @@
       const blink::WebSecurityOrigin& origin,
       const blink::WebNotificationData& notification_data,
       int64_t service_worker_registration_id,
-      scoped_ptr<blink::WebNotificationShowCallbacks> callbacks,
+      std::unique_ptr<blink::WebNotificationShowCallbacks> callbacks,
       const NotificationResources& notification_resources);
 
   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
diff --git a/content/child/notifications/pending_notifications_tracker.cc b/content/child/notifications/pending_notifications_tracker.cc
index c57bf94..bfe7dd3 100644
--- a/content/child/notifications/pending_notifications_tracker.cc
+++ b/content/child/notifications/pending_notifications_tracker.cc
@@ -4,10 +4,11 @@
 
 #include "content/child/notifications/pending_notifications_tracker.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/child/notifications/pending_notification.h"
 #include "content/public/common/notification_resources.h"
 
@@ -33,7 +34,7 @@
       base::Unretained(this) /* The pending notifications are owned by this. */,
       delegate, notification_id, resources_callback);
 
-  scoped_ptr<PendingNotification> pending_notification(
+  std::unique_ptr<PendingNotification> pending_notification(
       new PendingNotification(main_task_runner_));
   pending_notification->FetchResources(notification_data,
                                        fetches_finished_callback);
diff --git a/content/child/notifications/pending_notifications_tracker_unittest.cc b/content/child/notifications/pending_notifications_tracker_unittest.cc
index d06ee972..35c61a7 100644
--- a/content/child/notifications/pending_notifications_tracker_unittest.cc
+++ b/content/child/notifications/pending_notifications_tracker_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "content/child/notifications/pending_notifications_tracker.h"
 
+#include <memory>
 #include <vector>
 
 #include "base/base_paths.h"
@@ -13,7 +14,6 @@
 #include "base/files/file_util.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
@@ -133,7 +133,7 @@
 
  private:
   base::MessageLoop message_loop_;
-  scoped_ptr<PendingNotificationsTracker> tracker_;
+  std::unique_ptr<PendingNotificationsTracker> tracker_;
   std::vector<NotificationResources> resources_;
 
   DISALLOW_COPY_AND_ASSIGN(PendingNotificationsTrackerTest);
diff --git a/content/child/permissions/permission_dispatcher.cc b/content/child/permissions/permission_dispatcher.cc
index 4b1e305..3464648 100644
--- a/content/child/permissions/permission_dispatcher.cc
+++ b/content/child/permissions/permission_dispatcher.cc
@@ -215,14 +215,14 @@
 
 // static
 void PermissionDispatcher::RunPermissionCallbackOnWorkerThread(
-    scoped_ptr<blink::WebPermissionCallback> callback,
+    std::unique_ptr<blink::WebPermissionCallback> callback,
     blink::WebPermissionStatus status) {
   callback->onSuccess(status);
 }
 
 void PermissionDispatcher::RunPermissionsCallbackOnWorkerThread(
-    scoped_ptr<blink::WebPermissionsCallback> callback,
-    scoped_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses) {
+    std::unique_ptr<blink::WebPermissionsCallback> callback,
+    std::unique_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses) {
   callback->onSuccess(std::move(statuses));
 }
 
@@ -245,8 +245,8 @@
   // the |permission_service_| pipe will be destroyed too so OnQueryPermission
   // will not be called.
   uintptr_t callback_key = reinterpret_cast<uintptr_t>(callback);
-  permission_callbacks_.add(callback_key,
-      scoped_ptr<blink::WebPermissionCallback>(callback));
+  permission_callbacks_.add(
+      callback_key, std::unique_ptr<blink::WebPermissionCallback>(callback));
 
   GetPermissionServicePtr()->HasPermission(
       GetPermissionName(type),
@@ -267,8 +267,8 @@
   // the |permission_service_| pipe will be destroyed too so OnQueryPermission
   // will not be called.
   uintptr_t callback_key = reinterpret_cast<uintptr_t>(callback);
-  permission_callbacks_.add(callback_key,
-      scoped_ptr<blink::WebPermissionCallback>(callback));
+  permission_callbacks_.add(
+      callback_key, std::unique_ptr<blink::WebPermissionCallback>(callback));
 
   GetPermissionServicePtr()->RequestPermission(
       GetPermissionName(type),
@@ -289,8 +289,8 @@
   // the |permission_service_| pipe will be destroyed too so OnQueryPermission
   // will not be called.
   uintptr_t callback_key = reinterpret_cast<uintptr_t>(callback);
-  permissions_callbacks_.add(callback_key,
-      scoped_ptr<blink::WebPermissionsCallback>(callback));
+  permissions_callbacks_.add(
+      callback_key, std::unique_ptr<blink::WebPermissionsCallback>(callback));
 
   mojo::Array<PermissionName> names(types.size());
   for (size_t i = 0; i < types.size(); ++i)
@@ -312,8 +312,8 @@
   // the |permission_service_| pipe will be destroyed too so OnQueryPermission
   // will not be called.
   uintptr_t callback_key = reinterpret_cast<uintptr_t>(callback);
-  permission_callbacks_.add(callback_key,
-      scoped_ptr<blink::WebPermissionCallback>(callback));
+  permission_callbacks_.add(
+      callback_key, std::unique_ptr<blink::WebPermissionCallback>(callback));
 
   GetPermissionServicePtr()->RevokePermission(
       GetPermissionName(type),
@@ -327,7 +327,7 @@
 void PermissionDispatcher::OnPermissionResponse(int worker_thread_id,
                                                 uintptr_t callback_key,
                                                 PermissionStatus result) {
-  scoped_ptr<blink::WebPermissionCallback> callback =
+  std::unique_ptr<blink::WebPermissionCallback> callback =
       permission_callbacks_.take_and_erase(callback_key);
   blink::WebPermissionStatus status = GetWebPermissionStatus(result);
 
@@ -348,9 +348,9 @@
     int worker_thread_id,
     uintptr_t callback_key,
     const mojo::Array<PermissionStatus>& result) {
-  scoped_ptr<blink::WebPermissionsCallback> callback =
+  std::unique_ptr<blink::WebPermissionsCallback> callback =
       permissions_callbacks_.take_and_erase(callback_key);
-  scoped_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses(
+  std::unique_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses(
       new blink::WebVector<blink::WebPermissionStatus>(result.size()));
 
   for (size_t i = 0; i < result.size(); i++)
diff --git a/content/child/permissions/permission_dispatcher.h b/content/child/permissions/permission_dispatcher.h
index 2402689..e6409740 100644
--- a/content/child/permissions/permission_dispatcher.h
+++ b/content/child/permissions/permission_dispatcher.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_CHILD_PERMISSIONS_PERMISSION_DISPATCHER_H_
 #define CONTENT_CHILD_PERMISSIONS_PERMISSION_DISPATCHER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback_forward.h"
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/child/permissions/permission_observers_registry.h"
 #include "third_party/WebKit/public/platform/modules/permissions/WebPermissionClient.h"
 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojom.h"
@@ -86,19 +86,21 @@
       const base::Callback<void(blink::WebPermissionStatus)>& callback);
 
  private:
-   using PermissionCallbackMap = base::ScopedPtrHashMap<uintptr_t,
-      scoped_ptr<blink::WebPermissionCallback>>;
-   using PermissionsCallbackMap = base::ScopedPtrHashMap<uintptr_t,
-          scoped_ptr<blink::WebPermissionsCallback>>;
+  using PermissionCallbackMap =
+      base::ScopedPtrHashMap<uintptr_t,
+                             std::unique_ptr<blink::WebPermissionCallback>>;
+  using PermissionsCallbackMap =
+      base::ScopedPtrHashMap<uintptr_t,
+                             std::unique_ptr<blink::WebPermissionsCallback>>;
 
   // Runs the given |callback| with |status| as a parameter. It has to be run
   // on a worker thread.
   static void RunPermissionCallbackOnWorkerThread(
-      scoped_ptr<blink::WebPermissionCallback> callback,
+      std::unique_ptr<blink::WebPermissionCallback> callback,
       blink::WebPermissionStatus status);
   static void RunPermissionsCallbackOnWorkerThread(
-      scoped_ptr<blink::WebPermissionsCallback> callback,
-      scoped_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses);
+      std::unique_ptr<blink::WebPermissionsCallback> callback,
+      std::unique_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses);
 
   // Helper method that returns an initialized PermissionServicePtr.
   blink::mojom::PermissionService* GetPermissionServicePtr();
diff --git a/content/child/power_monitor_broadcast_source_unittest.cc b/content/child/power_monitor_broadcast_source_unittest.cc
index befcf24..2930c54e 100644
--- a/content/child/power_monitor_broadcast_source_unittest.cc
+++ b/content/child/power_monitor_broadcast_source_unittest.cc
@@ -17,7 +17,7 @@
   PowerMonitorBroadcastSourceTest() {
     power_monitor_source_ = new PowerMonitorBroadcastSource();
     power_monitor_.reset(new base::PowerMonitor(
-        scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)));
+        std::unique_ptr<base::PowerMonitorSource>(power_monitor_source_)));
   }
   ~PowerMonitorBroadcastSourceTest() override {}
 
@@ -28,7 +28,7 @@
 
  private:
   PowerMonitorBroadcastSource* power_monitor_source_;
-  scoped_ptr<base::PowerMonitor> power_monitor_;
+  std::unique_ptr<base::PowerMonitor> power_monitor_;
 
   DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSourceTest);
 };
diff --git a/content/child/push_messaging/push_provider.cc b/content/child/push_messaging/push_provider.cc
index 2062f8c..660e59b 100644
--- a/content/child/push_messaging/push_provider.cc
+++ b/content/child/push_messaging/push_provider.cc
@@ -4,9 +4,10 @@
 
 #include "content/child/push_messaging/push_provider.h"
 
+#include <memory>
+
 #include "base/lazy_instance.h"
 #include "base/memory/ptr_util.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/threading/thread_local.h"
 #include "content/child/push_messaging/push_dispatcher.h"
diff --git a/content/child/request_extra_data.h b/content/child/request_extra_data.h
index 64117c8..5bb859e 100644
--- a/content/child/request_extra_data.h
+++ b/content/child/request_extra_data.h
@@ -123,12 +123,12 @@
 
   // PlzNavigate: |stream_override| is used to override certain parameters of
   // navigation requests.
-  scoped_ptr<StreamOverrideParameters> TakeStreamOverrideOwnership() {
+  std::unique_ptr<StreamOverrideParameters> TakeStreamOverrideOwnership() {
     return std::move(stream_override_);
   }
 
   void set_stream_override(
-      scoped_ptr<StreamOverrideParameters> stream_override) {
+      std::unique_ptr<StreamOverrideParameters> stream_override) {
     stream_override_ = std::move(stream_override);
   }
 
@@ -148,7 +148,7 @@
   bool originated_from_service_worker_;
   blink::WebString custom_user_agent_;
   blink::WebString requested_with_;
-  scoped_ptr<StreamOverrideParameters> stream_override_;
+  std::unique_ptr<StreamOverrideParameters> stream_override_;
   LoFiState lofi_state_;
 
   DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index cbda6c4..64171df0 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -15,6 +15,7 @@
 #include "base/debug/stack_trace.h"
 #include "base/feature_list.h"
 #include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram.h"
@@ -156,7 +157,7 @@
   request_info->response_start = ConsumeIOTimestamp();
 
   if (delegate_) {
-    scoped_ptr<RequestPeer> new_peer = delegate_->OnReceivedResponse(
+    std::unique_ptr<RequestPeer> new_peer = delegate_->OnReceivedResponse(
         std::move(request_info->peer), response_head.mime_type,
         request_info->url);
     DCHECK(new_peer);
@@ -242,7 +243,7 @@
 
   DCHECK(!request_info->buffer.get());
 
-  scoped_ptr<RequestPeer::ReceivedData> received_data(
+  std::unique_ptr<RequestPeer::ReceivedData> received_data(
       new content::FixedReceivedData(data, encoded_data_length));
   request_info->peer->OnReceivedData(std::move(received_data));
 }
@@ -274,9 +275,9 @@
       request_info->site_isolation_metadata.reset();
     }
 
-    scoped_ptr<RequestPeer::ReceivedData> data =
-        request_info->received_data_factory->Create(
-            data_offset, data_length, encoded_data_length);
+    std::unique_ptr<RequestPeer::ReceivedData> data =
+        request_info->received_data_factory->Create(data_offset, data_length,
+                                                    encoded_data_length);
     // |data| takes care of ACKing.
     send_ack = false;
     request_info->peer->OnReceivedData(std::move(data));
@@ -361,7 +362,7 @@
   RequestPeer* peer = request_info->peer.get();
 
   if (delegate_) {
-    scoped_ptr<RequestPeer> new_peer = delegate_->OnRequestComplete(
+    std::unique_ptr<RequestPeer> new_peer = delegate_->OnRequestComplete(
         std::move(request_info->peer), request_info->resource_type,
         request_complete_data.error_code);
     DCHECK(new_peer);
@@ -478,7 +479,7 @@
 }
 
 ResourceDispatcher::PendingRequestInfo::PendingRequestInfo(
-    scoped_ptr<RequestPeer> peer,
+    std::unique_ptr<RequestPeer> peer,
     ResourceType resource_type,
     int origin_pid,
     const GURL& frame_origin,
@@ -491,8 +492,7 @@
       frame_origin(frame_origin),
       response_url(request_url),
       download_to_file(download_to_file),
-      request_start(base::TimeTicks::Now()) {
-}
+      request_start(base::TimeTicks::Now()) {}
 
 ResourceDispatcher::PendingRequestInfo::~PendingRequestInfo() {
 }
@@ -547,7 +547,7 @@
 void ResourceDispatcher::StartSync(const RequestInfo& request_info,
                                    ResourceRequestBody* request_body,
                                    SyncLoadResponse* response) {
-  scoped_ptr<ResourceHostMsg_Request> request =
+  std::unique_ptr<ResourceHostMsg_Request> request =
       CreateRequest(request_info, request_body, NULL);
 
   SyncLoadResult result;
@@ -577,14 +577,14 @@
 
 int ResourceDispatcher::StartAsync(const RequestInfo& request_info,
                                    ResourceRequestBody* request_body,
-                                   scoped_ptr<RequestPeer> peer) {
+                                   std::unique_ptr<RequestPeer> peer) {
   GURL frame_origin;
-  scoped_ptr<ResourceHostMsg_Request> request =
+  std::unique_ptr<ResourceHostMsg_Request> request =
       CreateRequest(request_info, request_body, &frame_origin);
 
   // Compute a unique request_id for this renderer process.
   int request_id = MakeRequestID();
-  pending_requests_[request_id] = make_scoped_ptr(new PendingRequestInfo(
+  pending_requests_[request_id] = base::WrapUnique(new PendingRequestInfo(
       std::move(peer), request->resource_type, request->origin_pid,
       frame_origin, request->url, request_info.download_to_file));
 
@@ -592,7 +592,7 @@
       request_info.loading_web_task_runner) {
     resource_scheduling_filter_->SetRequestIdTaskRunner(
         request_id,
-        make_scoped_ptr(request_info.loading_web_task_runner->clone()));
+        base::WrapUnique(request_info.loading_web_task_runner->clone()));
   }
 
   message_sender_->Send(new ResourceHostMsg_RequestResource(
@@ -735,11 +735,11 @@
   }
 }
 
-scoped_ptr<ResourceHostMsg_Request> ResourceDispatcher::CreateRequest(
+std::unique_ptr<ResourceHostMsg_Request> ResourceDispatcher::CreateRequest(
     const RequestInfo& request_info,
     ResourceRequestBody* request_body,
     GURL* frame_origin) {
-  scoped_ptr<ResourceHostMsg_Request> request(new ResourceHostMsg_Request);
+  std::unique_ptr<ResourceHostMsg_Request> request(new ResourceHostMsg_Request);
   request->method = request_info.method;
   request->url = request_info.url;
   request->first_party_for_cookies = request_info.first_party_for_cookies;
diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h
index 9b07c82..7931058 100644
--- a/content/child/resource_dispatcher.h
+++ b/content/child/resource_dispatcher.h
@@ -11,12 +11,12 @@
 
 #include <deque>
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
@@ -76,7 +76,7 @@
   // Returns the request id.
   virtual int StartAsync(const RequestInfo& request_info,
                          ResourceRequestBody* request_body,
-                         scoped_ptr<RequestPeer> peer);
+                         std::unique_ptr<RequestPeer> peer);
 
   // Removes a request from the |pending_requests_| list, returning true if the
   // request was found and removed.
@@ -124,17 +124,16 @@
 
   typedef std::deque<IPC::Message*> MessageQueue;
   struct PendingRequestInfo {
-    PendingRequestInfo(
-        scoped_ptr<RequestPeer> peer,
-        ResourceType resource_type,
-        int origin_pid,
-        const GURL& frame_origin,
-        const GURL& request_url,
-        bool download_to_file);
+    PendingRequestInfo(std::unique_ptr<RequestPeer> peer,
+                       ResourceType resource_type,
+                       int origin_pid,
+                       const GURL& frame_origin,
+                       const GURL& request_url,
+                       bool download_to_file);
 
     ~PendingRequestInfo();
 
-    scoped_ptr<RequestPeer> peer;
+    std::unique_ptr<RequestPeer> peer;
     ResourceType resource_type;
     // The PID of the original process which issued this request. This gets
     // non-zero only for a request proxied by another renderer, particularly
@@ -149,16 +148,16 @@
     // The url of the latest response even in case of redirection.
     GURL response_url;
     bool download_to_file;
-    scoped_ptr<IPC::Message> pending_redirect_message;
+    std::unique_ptr<IPC::Message> pending_redirect_message;
     base::TimeTicks request_start;
     base::TimeTicks response_start;
     base::TimeTicks completion_time;
     linked_ptr<base::SharedMemory> buffer;
     scoped_refptr<SharedMemoryReceivedDataFactory> received_data_factory;
-    scoped_ptr<SiteIsolationResponseMetaData> site_isolation_metadata;
+    std::unique_ptr<SiteIsolationResponseMetaData> site_isolation_metadata;
     int buffer_size;
   };
-  using PendingRequestMap = std::map<int, scoped_ptr<PendingRequestInfo>>;
+  using PendingRequestMap = std::map<int, std::unique_ptr<PendingRequestInfo>>;
 
   // Helper to lookup the info based on the request_id.
   // May return NULL if the request as been canceled from the client side.
@@ -224,7 +223,7 @@
   // for use on deferred message queues that are no longer needed.
   static void ReleaseResourcesInMessageQueue(MessageQueue* queue);
 
-  scoped_ptr<ResourceHostMsg_Request> CreateRequest(
+  std::unique_ptr<ResourceHostMsg_Request> CreateRequest(
       const RequestInfo& request_info,
       ResourceRequestBody* request_body,
       GURL* frame_origin);
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 9c593d5..1a7d58f 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -6,12 +6,14 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
 #include "base/process/process_handle.h"
@@ -77,7 +79,7 @@
     context_->total_encoded_data_length += encoded_data_length;
   }
 
-  void OnReceivedData(scoped_ptr<ReceivedData> data) override {
+  void OnReceivedData(std::unique_ptr<ReceivedData> data) override {
     if (context_->cancelled)
       return;
     EXPECT_TRUE(context_->received_response);
@@ -314,7 +316,7 @@
   int StartAsync(const RequestInfo& request_info,
                  ResourceRequestBody* request_body,
                  TestRequestPeer::Context* peer_context) {
-    scoped_ptr<TestRequestPeer> peer(
+    std::unique_ptr<TestRequestPeer> peer(
         new TestRequestPeer(dispatcher(), peer_context));
     int request_id =
         dispatcher()->StartAsync(request_info, request_body, std::move(peer));
@@ -328,7 +330,7 @@
 
   std::vector<IPC::Message> message_queue_;
   base::MessageLoop message_loop_;
-  scoped_ptr<ResourceDispatcher> dispatcher_;
+  std::unique_ptr<ResourceDispatcher> dispatcher_;
 };
 
 // Does a simple request and tests that the correct data is received.  Simulates
@@ -338,7 +340,7 @@
   const size_t kFirstReceiveSize = 2;
   ASSERT_LT(kFirstReceiveSize, strlen(kTestPageContents));
 
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   StartAsync(*request_info.get(), NULL, &peer_context);
 
@@ -369,11 +371,11 @@
 TEST_F(ResourceDispatcherTest, MultipleRequests) {
   const char kTestPageContents2[] = "Not kTestPageContents";
 
-  scoped_ptr<RequestInfo> request_info1(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info1(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context1;
   StartAsync(*request_info1.get(), NULL, &peer_context1);
 
-  scoped_ptr<RequestInfo> request_info2(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info2(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context2;
   StartAsync(*request_info2.get(), NULL, &peer_context2);
 
@@ -410,7 +412,7 @@
 
 // Tests that the cancel method prevents other messages from being received.
 TEST_F(ResourceDispatcherTest, Cancel) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   int request_id = StartAsync(*request_info.get(), NULL, &peer_context);
 
@@ -435,7 +437,7 @@
 
 // Tests that calling cancel during a callback works as expected.
 TEST_F(ResourceDispatcherTest, CancelDuringCallback) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   StartAsync(*request_info.get(), NULL, &peer_context);
   peer_context.cancel_on_receive_response = true;
@@ -463,23 +465,23 @@
   TestResourceDispatcherDelegate() {}
   ~TestResourceDispatcherDelegate() override {}
 
-  scoped_ptr<RequestPeer> OnRequestComplete(
-      scoped_ptr<RequestPeer> current_peer,
+  std::unique_ptr<RequestPeer> OnRequestComplete(
+      std::unique_ptr<RequestPeer> current_peer,
       ResourceType resource_type,
       int error_code) override {
     return current_peer;
   }
 
-  scoped_ptr<RequestPeer> OnReceivedResponse(
-      scoped_ptr<RequestPeer> current_peer,
+  std::unique_ptr<RequestPeer> OnReceivedResponse(
+      std::unique_ptr<RequestPeer> current_peer,
       const std::string& mime_type,
       const GURL& url) override {
-    return make_scoped_ptr(new WrapperPeer(std::move(current_peer)));
+    return base::WrapUnique(new WrapperPeer(std::move(current_peer)));
   }
 
   class WrapperPeer : public RequestPeer {
    public:
-    explicit WrapperPeer(scoped_ptr<RequestPeer> original_peer)
+    explicit WrapperPeer(std::unique_ptr<RequestPeer> original_peer)
         : original_peer_(std::move(original_peer)) {}
 
     void OnUploadProgress(uint64_t position, uint64_t size) override {}
@@ -495,7 +497,7 @@
 
     void OnDownloadedData(int len, int encoded_data_length) override {}
 
-    void OnReceivedData(scoped_ptr<ReceivedData> data) override {
+    void OnReceivedData(std::unique_ptr<ReceivedData> data) override {
       data_.append(data->payload(), data->length());
     }
 
@@ -507,7 +509,7 @@
                             int64_t total_transfer_size) override {
       original_peer_->OnReceivedResponse(response_info_);
       if (!data_.empty()) {
-        original_peer_->OnReceivedData(make_scoped_ptr(
+        original_peer_->OnReceivedData(base::WrapUnique(
             new FixedReceivedData(data_.data(), data_.size(), -1)));
       }
       original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler,
@@ -516,7 +518,7 @@
     }
 
    private:
-    scoped_ptr<RequestPeer> original_peer_;
+    std::unique_ptr<RequestPeer> original_peer_;
     ResourceResponseInfo response_info_;
     std::string data_;
 
@@ -528,7 +530,7 @@
 };
 
 TEST_F(ResourceDispatcherTest, DelegateTest) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   StartAsync(*request_info.get(), nullptr, &peer_context);
 
@@ -565,7 +567,7 @@
 }
 
 TEST_F(ResourceDispatcherTest, CancelDuringCallbackWithWrapperPeer) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   StartAsync(*request_info.get(), nullptr, &peer_context);
   peer_context.cancel_on_receive_response = true;
@@ -609,7 +611,7 @@
 
 // Checks that redirects work as expected.
 TEST_F(ResourceDispatcherTest, Redirect) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   StartAsync(*request_info.get(), NULL, &peer_context);
 
@@ -640,7 +642,7 @@
 // Tests that that cancelling during a redirect method prevents other messages
 // from being received.
 TEST_F(ResourceDispatcherTest, CancelDuringRedirect) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   StartAsync(*request_info.get(), NULL, &peer_context);
   peer_context.follow_redirects = false;
@@ -670,7 +672,7 @@
 
 // Checks that deferring a request delays messages until it's resumed.
 TEST_F(ResourceDispatcherTest, Defer) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   int request_id = StartAsync(*request_info.get(), NULL, &peer_context);
 
@@ -704,7 +706,7 @@
 // Checks that deferring a request during a redirect delays messages until it's
 // resumed.
 TEST_F(ResourceDispatcherTest, DeferOnRedirect) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   int request_id = StartAsync(*request_info.get(), NULL, &peer_context);
   peer_context.defer_on_redirect = true;
@@ -743,7 +745,7 @@
 
 // Checks that a deferred request that's cancelled doesn't receive any messages.
 TEST_F(ResourceDispatcherTest, CancelDeferredRequest) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
   TestRequestPeer::Context peer_context;
   int request_id = StartAsync(*request_info.get(), NULL, &peer_context);
 
@@ -766,7 +768,7 @@
 }
 
 TEST_F(ResourceDispatcherTest, DownloadToFile) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(true));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(true));
   TestRequestPeer::Context peer_context;
   int request_id = StartAsync(*request_info.get(), NULL, &peer_context);
   const int kDownloadedIncrement = 100;
@@ -808,7 +810,7 @@
 
 // Make sure that when a download to file is cancelled, the file is destroyed.
 TEST_F(ResourceDispatcherTest, CancelDownloadToFile) {
-  scoped_ptr<RequestInfo> request_info(CreateRequestInfo(true));
+  std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(true));
   TestRequestPeer::Context peer_context;
   int request_id = StartAsync(*request_info.get(), NULL, &peer_context);
 
@@ -841,7 +843,7 @@
   }
 
   void PerformTest(const ResourceResponseHead& response_head) {
-    scoped_ptr<RequestInfo> request_info(CreateRequestInfo(false));
+    std::unique_ptr<RequestInfo> request_info(CreateRequestInfo(false));
     TestRequestPeer::Context peer_context;
     StartAsync(*request_info.get(), NULL, &peer_context);
 
diff --git a/content/child/resource_scheduling_filter.cc b/content/child/resource_scheduling_filter.cc
index 1f0a20e..1cde0e6a 100644
--- a/content/child/resource_scheduling_filter.cc
+++ b/content/child/resource_scheduling_filter.cc
@@ -77,7 +77,8 @@
 }
 
 void ResourceSchedulingFilter::SetRequestIdTaskRunner(
-    int id, scoped_ptr<blink::WebTaskRunner> web_task_runner) {
+    int id,
+    std::unique_ptr<blink::WebTaskRunner> web_task_runner) {
   base::AutoLock lock(request_id_to_task_runner_map_lock_);
   request_id_to_task_runner_map_.insert(
       std::make_pair(id, std::move(web_task_runner)));
diff --git a/content/child/resource_scheduling_filter.h b/content/child/resource_scheduling_filter.h
index 9e89b11..93d243c9 100644
--- a/content/child/resource_scheduling_filter.h
+++ b/content/child/resource_scheduling_filter.h
@@ -8,10 +8,10 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "content/common/content_export.h"
@@ -40,7 +40,8 @@
 
   // Sets the task runner associated with request messages with |id|.
   void SetRequestIdTaskRunner(
-      int id, scoped_ptr<blink::WebTaskRunner> web_task_runner);
+      int id,
+      std::unique_ptr<blink::WebTaskRunner> web_task_runner);
 
   // Removes the task runner associated with |id|.
   void ClearRequestIdTaskRunner(int id);
@@ -51,7 +52,7 @@
   ~ResourceSchedulingFilter() override;
 
   using RequestIdToTaskRunnerMap =
-      std::map<int, scoped_ptr<blink::WebTaskRunner>>;
+      std::map<int, std::unique_ptr<blink::WebTaskRunner>>;
 
   // This lock guards |request_id_to_task_runner_map_|
   base::Lock request_id_to_task_runner_map_lock_;
diff --git a/content/child/scoped_web_callbacks.h b/content/child/scoped_web_callbacks.h
index 0d68230..fac33916 100644
--- a/content/child/scoped_web_callbacks.h
+++ b/content/child/scoped_web_callbacks.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_CHILD_SCOPED_WEB_CALLBACKS_H_
 #define CONTENT_CHILD_SCOPED_WEB_CALLBACKS_H_
 
+#include <memory>
 #include <utility>
 
 #include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/move.h"
 #include "third_party/WebKit/public/platform/WebCallbacks.h"
 
@@ -39,7 +40,7 @@
 //     callbacks.PassCallbacks()->onSuccess(Foo("everything is great"));
 //   }
 //
-//   void OnCallbacksDropped(scoped_ptr<FooCallbacks> callbacks) {
+//   void OnCallbacksDropped(std::unique_ptr<FooCallbacks> callbacks) {
 //     // Ownership of the FooCallbacks is passed to this function if
 //     // ScopedWebCallbacks::PassCallbacks isn't called before the
 //     // ScopedWebCallbacks is destroyed.
@@ -70,9 +71,9 @@
 
  public:
   using DestructionCallback =
-      base::Callback<void(scoped_ptr<CallbacksType> callbacks)>;
+      base::Callback<void(std::unique_ptr<CallbacksType> callbacks)>;
 
-  ScopedWebCallbacks(scoped_ptr<CallbacksType> callbacks,
+  ScopedWebCallbacks(std::unique_ptr<CallbacksType> callbacks,
                      const DestructionCallback& destruction_callback)
       : callbacks_(std::move(callbacks)),
         destruction_callback_(destruction_callback) {}
@@ -90,10 +91,12 @@
     return *this;
   }
 
-  scoped_ptr<CallbacksType> PassCallbacks() { return std::move(callbacks_); }
+  std::unique_ptr<CallbacksType> PassCallbacks() {
+    return std::move(callbacks_);
+  }
 
  private:
-  scoped_ptr<CallbacksType> callbacks_;
+  std::unique_ptr<CallbacksType> callbacks_;
   DestructionCallback destruction_callback_;
 };
 
@@ -102,7 +105,7 @@
     CallbacksType* callbacks,
     const typename ScopedWebCallbacks<CallbacksType>::DestructionCallback&
         destruction_callback) {
-  return ScopedWebCallbacks<CallbacksType>(make_scoped_ptr(callbacks),
+  return ScopedWebCallbacks<CallbacksType>(base::WrapUnique(callbacks),
                                            destruction_callback);
 }
 
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index 57d3ce1..b302e53 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -113,8 +113,8 @@
 
   if (pattern.possibly_invalid_spec().size() > url::kMaxURLChars ||
       script_url.possibly_invalid_spec().size() > url::kMaxURLChars) {
-    scoped_ptr<WebServiceWorkerRegistrationCallbacks>
-        owned_callbacks(callbacks);
+    std::unique_ptr<WebServiceWorkerRegistrationCallbacks> owned_callbacks(
+        callbacks);
     std::string error_message(kServiceWorkerRegisterErrorPrefix);
     error_message += "The provided scriptURL or scope is too long.";
     callbacks->onError(
@@ -163,7 +163,7 @@
   DCHECK(callbacks);
 
   if (document_url.possibly_invalid_spec().size() > url::kMaxURLChars) {
-    scoped_ptr<WebServiceWorkerGetRegistrationCallbacks> owned_callbacks(
+    std::unique_ptr<WebServiceWorkerGetRegistrationCallbacks> owned_callbacks(
         callbacks);
     std::string error_message(kServiceWorkerGetRegistrationErrorPrefix);
     error_message += "The provided documentURL is too long.";
@@ -267,7 +267,7 @@
 
 scoped_refptr<WebServiceWorkerImpl>
 ServiceWorkerDispatcher::GetOrCreateServiceWorker(
-    scoped_ptr<ServiceWorkerHandleReference> handle_ref) {
+    std::unique_ptr<ServiceWorkerHandleReference> handle_ref) {
   if (!handle_ref)
     return nullptr;
 
@@ -312,12 +312,14 @@
 ServiceWorkerDispatcher::GetOrAdoptRegistration(
     const ServiceWorkerRegistrationObjectInfo& info,
     const ServiceWorkerVersionAttributes& attrs) {
-  scoped_ptr<ServiceWorkerRegistrationHandleReference> registration_ref =
+  std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration_ref =
       Adopt(info);
-  scoped_ptr<ServiceWorkerHandleReference> installing_ref =
+  std::unique_ptr<ServiceWorkerHandleReference> installing_ref =
       Adopt(attrs.installing);
-  scoped_ptr<ServiceWorkerHandleReference> waiting_ref = Adopt(attrs.waiting);
-  scoped_ptr<ServiceWorkerHandleReference> active_ref = Adopt(attrs.active);
+  std::unique_ptr<ServiceWorkerHandleReference> waiting_ref =
+      Adopt(attrs.waiting);
+  std::unique_ptr<ServiceWorkerHandleReference> active_ref =
+      Adopt(attrs.active);
 
   RegistrationObjectMap::iterator found = registrations_.find(info.handle_id);
   if (found != registrations_.end())
@@ -341,11 +343,12 @@
     const ServiceWorkerVersionAttributes& attrs) {
   // Adopt the references sent from the browser process and pass them to the
   // provider context if it exists.
-  scoped_ptr<ServiceWorkerRegistrationHandleReference> registration =
+  std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration =
       Adopt(info);
-  scoped_ptr<ServiceWorkerHandleReference> installing = Adopt(attrs.installing);
-  scoped_ptr<ServiceWorkerHandleReference> waiting = Adopt(attrs.waiting);
-  scoped_ptr<ServiceWorkerHandleReference> active = Adopt(attrs.active);
+  std::unique_ptr<ServiceWorkerHandleReference> installing =
+      Adopt(attrs.installing);
+  std::unique_ptr<ServiceWorkerHandleReference> waiting = Adopt(attrs.waiting);
+  std::unique_ptr<ServiceWorkerHandleReference> active = Adopt(attrs.active);
   ProviderContextMap::iterator context = provider_contexts_.find(provider_id);
   if (context != provider_contexts_.end()) {
     context->second->OnAssociateRegistration(
@@ -473,7 +476,7 @@
 
   typedef blink::WebVector<blink::WebServiceWorkerRegistration::Handle*>
       WebServiceWorkerRegistrationArray;
-  scoped_ptr<WebServiceWorkerRegistrationArray> registrations(
+  std::unique_ptr<WebServiceWorkerRegistrationArray> registrations(
       new WebServiceWorkerRegistrationArray(infos.size()));
   for (size_t i = 0; i < infos.size(); ++i) {
     if (infos[i].handle_id != kInvalidServiceWorkerHandleId) {
@@ -652,9 +655,10 @@
 
   // Adopt the references sent from the browser process and pass it to the
   // registration if it exists.
-  scoped_ptr<ServiceWorkerHandleReference> installing = Adopt(attrs.installing);
-  scoped_ptr<ServiceWorkerHandleReference> waiting = Adopt(attrs.waiting);
-  scoped_ptr<ServiceWorkerHandleReference> active = Adopt(attrs.active);
+  std::unique_ptr<ServiceWorkerHandleReference> installing =
+      Adopt(attrs.installing);
+  std::unique_ptr<ServiceWorkerHandleReference> waiting = Adopt(attrs.waiting);
+  std::unique_ptr<ServiceWorkerHandleReference> active = Adopt(attrs.active);
 
   RegistrationObjectMap::iterator found =
       registrations_.find(registration_handle_id);
@@ -694,7 +698,7 @@
 
   // Adopt the reference sent from the browser process and pass it to the
   // provider context if it exists.
-  scoped_ptr<ServiceWorkerHandleReference> handle_ref = Adopt(info);
+  std::unique_ptr<ServiceWorkerHandleReference> handle_ref = Adopt(info);
   ProviderContextMap::iterator provider = provider_contexts_.find(provider_id);
   if (provider != provider_contexts_.end())
     provider->second->OnSetControllerServiceWorker(std::move(handle_ref));
@@ -764,14 +768,14 @@
   registrations_.erase(registration_handle_id);
 }
 
-scoped_ptr<ServiceWorkerRegistrationHandleReference>
+std::unique_ptr<ServiceWorkerRegistrationHandleReference>
 ServiceWorkerDispatcher::Adopt(
     const ServiceWorkerRegistrationObjectInfo& info) {
   return ServiceWorkerRegistrationHandleReference::Adopt(
       info, thread_safe_sender_.get());
 }
 
-scoped_ptr<ServiceWorkerHandleReference> ServiceWorkerDispatcher::Adopt(
+std::unique_ptr<ServiceWorkerHandleReference> ServiceWorkerDispatcher::Adopt(
     const ServiceWorkerObjectInfo& info) {
   return ServiceWorkerHandleReference::Adopt(info, thread_safe_sender_.get());
 }
diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h
index f83a820..4793971 100644
--- a/content/child/service_worker/service_worker_dispatcher.h
+++ b/content/child/service_worker/service_worker_dispatcher.h
@@ -8,12 +8,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <vector>
 
 #include "base/id_map.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "content/public/child/worker_thread.h"
 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h"
@@ -119,7 +119,7 @@
   // Returns the existing service worker or a newly created one with the given
   // handle reference. Returns nullptr if the given reference is invalid.
   scoped_refptr<WebServiceWorkerImpl> GetOrCreateServiceWorker(
-      scoped_ptr<ServiceWorkerHandleReference> handle_ref);
+      std::unique_ptr<ServiceWorkerHandleReference> handle_ref);
 
   // Returns the existing registration or a newly created one. When a new one is
   // created, increments interprocess references to the registration and its
@@ -254,9 +254,9 @@
 
   // Assumes that the given object information retains an interprocess handle
   // reference passed from the browser process, and adopts it.
-  scoped_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
+  std::unique_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
       const ServiceWorkerRegistrationObjectInfo& info);
-  scoped_ptr<ServiceWorkerHandleReference> Adopt(
+  std::unique_ptr<ServiceWorkerHandleReference> Adopt(
       const ServiceWorkerObjectInfo& info);
 
   RegistrationCallbackMap pending_registration_callbacks_;
diff --git a/content/child/service_worker/service_worker_dispatcher_unittest.cc b/content/child/service_worker/service_worker_dispatcher_unittest.cc
index 8149885..d00644b3 100644
--- a/content/child/service_worker/service_worker_dispatcher_unittest.cc
+++ b/content/child/service_worker/service_worker_dispatcher_unittest.cc
@@ -94,7 +94,7 @@
     dispatcher_->OnPostMessage(params);
   }
 
-  scoped_ptr<ServiceWorkerHandleReference> Adopt(
+  std::unique_ptr<ServiceWorkerHandleReference> Adopt(
       const ServiceWorkerObjectInfo& info) {
     return dispatcher_->Adopt(info);
   }
@@ -106,7 +106,7 @@
  private:
   base::MessageLoop message_loop_;
   IPC::TestSink ipc_sink_;
-  scoped_ptr<ServiceWorkerDispatcher> dispatcher_;
+  std::unique_ptr<ServiceWorkerDispatcher> dispatcher_;
   scoped_refptr<ServiceWorkerTestSender> sender_;
 
   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherTest);
@@ -293,7 +293,7 @@
   // mock provider client. See the comment on setController() of the mock).
   // In addition, the passed reference should be adopted but immediately
   // released because there is no provider context to own it.
-  scoped_ptr<MockWebServiceWorkerProviderClientImpl> provider_client(
+  std::unique_ptr<MockWebServiceWorkerProviderClientImpl> provider_client(
       new MockWebServiceWorkerProviderClientImpl(kProviderId, dispatcher()));
   ASSERT_FALSE(provider_client->is_set_controlled_called());
   OnSetControllerServiceWorker(kDocumentMainThreadId, kProviderId, attrs.active,
@@ -341,7 +341,7 @@
   ServiceWorkerVersionAttributes attrs;
   CreateObjectInfoAndVersionAttributes(&info, &attrs);
 
-  scoped_ptr<MockWebServiceWorkerProviderClientImpl> provider_client(
+  std::unique_ptr<MockWebServiceWorkerProviderClientImpl> provider_client(
       new MockWebServiceWorkerProviderClientImpl(kProviderId, dispatcher()));
   scoped_refptr<ServiceWorkerProviderContext> provider_context(
       new ServiceWorkerProviderContext(kProviderId,
@@ -382,7 +382,7 @@
             ipc_sink()->GetMessageAt(0)->type());
   ipc_sink()->ClearMessages();
 
-  scoped_ptr<MockWebServiceWorkerProviderClientImpl> provider_client(
+  std::unique_ptr<MockWebServiceWorkerProviderClientImpl> provider_client(
       new MockWebServiceWorkerProviderClientImpl(kProviderId, dispatcher()));
   ASSERT_FALSE(provider_client->is_dispatch_message_event_called());
 
diff --git a/content/child/service_worker/service_worker_handle_reference.cc b/content/child/service_worker/service_worker_handle_reference.cc
index ad739525..5cd79cc 100644
--- a/content/child/service_worker/service_worker_handle_reference.cc
+++ b/content/child/service_worker/service_worker_handle_reference.cc
@@ -4,28 +4,29 @@
 
 #include "content/child/service_worker/service_worker_handle_reference.h"
 
+#include "base/memory/ptr_util.h"
 #include "content/child/thread_safe_sender.h"
 #include "content/common/service_worker/service_worker_messages.h"
 
 namespace content {
 
-scoped_ptr<ServiceWorkerHandleReference>
-ServiceWorkerHandleReference::Create(
-    const ServiceWorkerObjectInfo& info,
-    ThreadSafeSender* sender) {
+std::unique_ptr<ServiceWorkerHandleReference>
+ServiceWorkerHandleReference::Create(const ServiceWorkerObjectInfo& info,
+                                     ThreadSafeSender* sender) {
   DCHECK(sender);
   if (info.handle_id == kInvalidServiceWorkerHandleId)
     return nullptr;
-  return make_scoped_ptr(new ServiceWorkerHandleReference(info, sender, true));
+  return base::WrapUnique(new ServiceWorkerHandleReference(info, sender, true));
 }
 
-scoped_ptr<ServiceWorkerHandleReference> ServiceWorkerHandleReference::Adopt(
-    const ServiceWorkerObjectInfo& info,
-    ThreadSafeSender* sender) {
+std::unique_ptr<ServiceWorkerHandleReference>
+ServiceWorkerHandleReference::Adopt(const ServiceWorkerObjectInfo& info,
+                                    ThreadSafeSender* sender) {
   DCHECK(sender);
   if (info.handle_id == kInvalidServiceWorkerHandleId)
     return nullptr;
-  return make_scoped_ptr(new ServiceWorkerHandleReference(info, sender, false));
+  return base::WrapUnique(
+      new ServiceWorkerHandleReference(info, sender, false));
 }
 
 ServiceWorkerHandleReference::ServiceWorkerHandleReference(
diff --git a/content/child/service_worker/service_worker_handle_reference.h b/content/child/service_worker/service_worker_handle_reference.h
index d82fb32..dc95284 100644
--- a/content/child/service_worker/service_worker_handle_reference.h
+++ b/content/child/service_worker/service_worker_handle_reference.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/service_worker/service_worker_types.h"
 
@@ -24,13 +25,13 @@
  public:
   // Creates a new ServiceWorkerHandleReference and increments ref-count. If
   // the handle id is kInvalidServiceWorkerHandleId, returns null instead.
-  static scoped_ptr<ServiceWorkerHandleReference> Create(
+  static std::unique_ptr<ServiceWorkerHandleReference> Create(
       const ServiceWorkerObjectInfo& info,
       ThreadSafeSender* sender);
 
   // Creates a new ServiceWorkerHandleReference by adopting a ref-count. If
   // the handle id is kInvalidServiceWorkerHandleId, returns null instead.
-  static scoped_ptr<ServiceWorkerHandleReference> Adopt(
+  static std::unique_ptr<ServiceWorkerHandleReference> Adopt(
       const ServiceWorkerObjectInfo& info,
       ThreadSafeSender* sender);
 
diff --git a/content/child/service_worker/service_worker_network_provider.cc b/content/child/service_worker/service_worker_network_provider.cc
index 7ce9697..dab3db75 100644
--- a/content/child/service_worker/service_worker_network_provider.cc
+++ b/content/child/service_worker/service_worker_network_provider.cc
@@ -37,7 +37,7 @@
 
 void ServiceWorkerNetworkProvider::AttachToDocumentState(
     base::SupportsUserData* datasource_userdata,
-    scoped_ptr<ServiceWorkerNetworkProvider> network_provider) {
+    std::unique_ptr<ServiceWorkerNetworkProvider> network_provider) {
   datasource_userdata->SetUserData(&kUserDataKey, network_provider.release());
 }
 
@@ -48,7 +48,7 @@
 }
 
 // static
-scoped_ptr<ServiceWorkerNetworkProvider>
+std::unique_ptr<ServiceWorkerNetworkProvider>
 ServiceWorkerNetworkProvider::CreateForNavigation(
     int route_id,
     const RequestNavigationParams& request_params,
@@ -57,7 +57,7 @@
   bool browser_side_navigation = IsBrowserSideNavigationEnabled();
   bool should_create_provider_for_window = false;
   int service_worker_provider_id = kInvalidServiceWorkerProviderId;
-  scoped_ptr<ServiceWorkerNetworkProvider> network_provider;
+  std::unique_ptr<ServiceWorkerNetworkProvider> network_provider;
 
   // Determine if a ServiceWorkerNetworkProvider should be created and properly
   // initialized for the navigation. A default ServiceWorkerNetworkProvider
@@ -81,20 +81,20 @@
   // Now create the ServiceWorkerNetworkProvider (with invalid id if needed).
   if (should_create_provider_for_window) {
     if (service_worker_provider_id == kInvalidServiceWorkerProviderId) {
-      network_provider = scoped_ptr<ServiceWorkerNetworkProvider>(
+      network_provider = std::unique_ptr<ServiceWorkerNetworkProvider>(
           new ServiceWorkerNetworkProvider(route_id,
                                            SERVICE_WORKER_PROVIDER_FOR_WINDOW));
     } else {
       CHECK(browser_side_navigation);
       DCHECK(ServiceWorkerUtils::IsBrowserAssignedProviderId(
           service_worker_provider_id));
-      network_provider = scoped_ptr<ServiceWorkerNetworkProvider>(
+      network_provider = std::unique_ptr<ServiceWorkerNetworkProvider>(
           new ServiceWorkerNetworkProvider(route_id,
                                            SERVICE_WORKER_PROVIDER_FOR_WINDOW,
                                            service_worker_provider_id));
     }
   } else {
-    network_provider = scoped_ptr<ServiceWorkerNetworkProvider>(
+    network_provider = std::unique_ptr<ServiceWorkerNetworkProvider>(
         new ServiceWorkerNetworkProvider());
   }
   return network_provider;
diff --git a/content/child/service_worker/service_worker_network_provider.h b/content/child/service_worker/service_worker_network_provider.h
index 74a12674..178adf5a 100644
--- a/content/child/service_worker/service_worker_network_provider.h
+++ b/content/child/service_worker/service_worker_network_provider.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/supports_user_data.h"
 #include "content/common/content_export.h"
 #include "content/common/service_worker/service_worker_types.h"
@@ -37,12 +38,12 @@
   // Ownership is transferred to the DocumentState.
   static void AttachToDocumentState(
       base::SupportsUserData* document_state,
-      scoped_ptr<ServiceWorkerNetworkProvider> network_provider);
+      std::unique_ptr<ServiceWorkerNetworkProvider> network_provider);
 
   static ServiceWorkerNetworkProvider* FromDocumentState(
       base::SupportsUserData* document_state);
 
-  static scoped_ptr<ServiceWorkerNetworkProvider> CreateForNavigation(
+  static std::unique_ptr<ServiceWorkerNetworkProvider> CreateForNavigation(
       int route_id,
       const RequestNavigationParams& request_params,
       blink::WebSandboxFlags sandbox_flags,
diff --git a/content/child/service_worker/service_worker_registration_handle_reference.cc b/content/child/service_worker/service_worker_registration_handle_reference.cc
index 7a9e284..9d11823 100644
--- a/content/child/service_worker/service_worker_registration_handle_reference.cc
+++ b/content/child/service_worker/service_worker_registration_handle_reference.cc
@@ -4,25 +4,26 @@
 
 #include "content/child/service_worker/service_worker_registration_handle_reference.h"
 
+#include "base/memory/ptr_util.h"
 #include "content/child/thread_safe_sender.h"
 #include "content/common/service_worker/service_worker_messages.h"
 
 namespace content {
 
-scoped_ptr<ServiceWorkerRegistrationHandleReference>
+std::unique_ptr<ServiceWorkerRegistrationHandleReference>
 ServiceWorkerRegistrationHandleReference::Create(
     const ServiceWorkerRegistrationObjectInfo& info,
     ThreadSafeSender* sender) {
-  return make_scoped_ptr(new ServiceWorkerRegistrationHandleReference(
-      info, sender, true));
+  return base::WrapUnique(
+      new ServiceWorkerRegistrationHandleReference(info, sender, true));
 }
 
-scoped_ptr<ServiceWorkerRegistrationHandleReference>
+std::unique_ptr<ServiceWorkerRegistrationHandleReference>
 ServiceWorkerRegistrationHandleReference::Adopt(
     const ServiceWorkerRegistrationObjectInfo& info,
     ThreadSafeSender* sender) {
-  return make_scoped_ptr(new ServiceWorkerRegistrationHandleReference(
-      info, sender, false));
+  return base::WrapUnique(
+      new ServiceWorkerRegistrationHandleReference(info, sender, false));
 }
 
 ServiceWorkerRegistrationHandleReference::
diff --git a/content/child/service_worker/service_worker_registration_handle_reference.h b/content/child/service_worker/service_worker_registration_handle_reference.h
index 5edb58a..8f37098 100644
--- a/content/child/service_worker/service_worker_registration_handle_reference.h
+++ b/content/child/service_worker/service_worker_registration_handle_reference.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "url/gurl.h"
 
@@ -25,13 +26,13 @@
  public:
   // Creates a new ServiceWorkerRegistrationHandleReference and increments
   // ref-count.
-  static scoped_ptr<ServiceWorkerRegistrationHandleReference> Create(
+  static std::unique_ptr<ServiceWorkerRegistrationHandleReference> Create(
       const ServiceWorkerRegistrationObjectInfo& info,
       ThreadSafeSender* sender);
 
   // Creates a new ServiceWorkerRegistrationHandleReference by adopting a
   // ref-count.
-  static scoped_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
+  static std::unique_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
       const ServiceWorkerRegistrationObjectInfo& info,
       ThreadSafeSender* sender);
 
diff --git a/content/child/service_worker/web_service_worker_impl.cc b/content/child/service_worker/web_service_worker_impl.cc
index 5441dc3..8e85e3bc 100644
--- a/content/child/service_worker/web_service_worker_impl.cc
+++ b/content/child/service_worker/web_service_worker_impl.cc
@@ -50,7 +50,7 @@
     int provider_id,
     const base::string16& message,
     const url::Origin& source_origin,
-    scoped_ptr<WebMessagePortChannelArray> channels) {
+    std::unique_ptr<WebMessagePortChannelArray> channels) {
   if (WebRuntimeFeatures::isServiceWorkerExtendableMessageEventEnabled()) {
     thread_safe_sender->Send(new ServiceWorkerHostMsg_PostMessageToWorker(
         handle_id, provider_id, message, source_origin,
@@ -67,7 +67,7 @@
 }  // namespace
 
 WebServiceWorkerImpl::WebServiceWorkerImpl(
-    scoped_ptr<ServiceWorkerHandleReference> handle_ref,
+    std::unique_ptr<ServiceWorkerHandleReference> handle_ref,
     ThreadSafeSender* thread_safe_sender)
     : handle_ref_(std::move(handle_ref)),
       state_(handle_ref_->state()),
@@ -130,7 +130,7 @@
                  // threads for thread-safety.
                  static_cast<base::string16>(message),
                  url::Origin(source_origin),
-                 base::Passed(make_scoped_ptr(channels))));
+                 base::Passed(base::WrapUnique(channels))));
 }
 
 void WebServiceWorkerImpl::terminate() {
diff --git a/content/child/service_worker/web_service_worker_impl.h b/content/child/service_worker/web_service_worker_impl.h
index b5ba505..fcc4918 100644
--- a/content/child/service_worker/web_service_worker_impl.h
+++ b/content/child/service_worker/web_service_worker_impl.h
@@ -11,7 +11,6 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
@@ -39,7 +38,7 @@
     : NON_EXPORTED_BASE(public blink::WebServiceWorker),
       public base::RefCounted<WebServiceWorkerImpl> {
  public:
-  WebServiceWorkerImpl(scoped_ptr<ServiceWorkerHandleReference> handle_ref,
+  WebServiceWorkerImpl(std::unique_ptr<ServiceWorkerHandleReference> handle_ref,
                        ThreadSafeSender* thread_safe_sender);
 
   void OnStateChanged(blink::WebServiceWorkerState new_state);
@@ -64,7 +63,7 @@
   friend class base::RefCounted<WebServiceWorkerImpl>;
   ~WebServiceWorkerImpl() override;
 
-  scoped_ptr<ServiceWorkerHandleReference> handle_ref_;
+  std::unique_ptr<ServiceWorkerHandleReference> handle_ref_;
   blink::WebServiceWorkerState state_;
   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
   blink::WebServiceWorkerProxy* proxy_;
diff --git a/content/child/service_worker/web_service_worker_registration_impl.cc b/content/child/service_worker/web_service_worker_registration_impl.cc
index 41d4ef6..8b40190 100644
--- a/content/child/service_worker/web_service_worker_registration_impl.cc
+++ b/content/child/service_worker/web_service_worker_registration_impl.cc
@@ -49,7 +49,7 @@
 WebServiceWorkerRegistrationImpl::QueuedTask::~QueuedTask() {}
 
 WebServiceWorkerRegistrationImpl::WebServiceWorkerRegistrationImpl(
-    scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref)
+    std::unique_ptr<ServiceWorkerRegistrationHandleReference> handle_ref)
     : handle_ref_(std::move(handle_ref)), proxy_(nullptr) {
   DCHECK(handle_ref_);
   DCHECK_NE(kInvalidServiceWorkerRegistrationHandleId,
diff --git a/content/child/service_worker/web_service_worker_registration_impl.h b/content/child/service_worker/web_service_worker_registration_impl.h
index 2c8d3c9..49904748 100644
--- a/content/child/service_worker/web_service_worker_registration_impl.h
+++ b/content/child/service_worker/web_service_worker_registration_impl.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h"
 
@@ -39,7 +39,7 @@
       public base::RefCounted<WebServiceWorkerRegistrationImpl> {
  public:
   explicit WebServiceWorkerRegistrationImpl(
-      scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref);
+      std::unique_ptr<ServiceWorkerRegistrationHandleReference> handle_ref);
 
   void SetInstalling(const scoped_refptr<WebServiceWorkerImpl>& service_worker);
   void SetWaiting(const scoped_refptr<WebServiceWorkerImpl>& service_worker);
@@ -95,7 +95,7 @@
 
   void RunQueuedTasks();
 
-  scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_;
+  std::unique_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_;
   blink::WebServiceWorkerRegistrationProxy* proxy_;
 
   std::vector<QueuedTask> queued_tasks_;
diff --git a/content/child/shared_memory_data_consumer_handle.cc b/content/child/shared_memory_data_consumer_handle.cc
index b7e4d11..6766fe8 100644
--- a/content/child/shared_memory_data_consumer_handle.cc
+++ b/content/child/shared_memory_data_consumer_handle.cc
@@ -10,6 +10,7 @@
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
@@ -24,7 +25,7 @@
     : public RequestPeer::ThreadSafeReceivedData {
  public:
   explicit DelegateThreadSafeReceivedData(
-      scoped_ptr<RequestPeer::ReceivedData> data)
+      std::unique_ptr<RequestPeer::ReceivedData> data)
       : data_(std::move(data)),
         task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
   ~DelegateThreadSafeReceivedData() override {
@@ -39,7 +40,7 @@
   int encoded_length() const override { return data_->encoded_length(); }
 
  private:
-  scoped_ptr<RequestPeer::ReceivedData> data_;
+  std::unique_ptr<RequestPeer::ReceivedData> data_;
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData);
@@ -93,7 +94,7 @@
     lock_.AssertAcquired();
     return queue_.front();
   }
-  void Push(scoped_ptr<RequestPeer::ThreadSafeReceivedData> data) {
+  void Push(std::unique_ptr<RequestPeer::ThreadSafeReceivedData> data) {
     lock_.AssertAcquired();
     queue_.push_back(data.release());
   }
@@ -255,7 +256,7 @@
   // |result_| stores the ultimate state of this handle if it has. Otherwise,
   // |Ok| is set.
   Result result_;
-  // TODO(yhirano): Use std::deque<scoped_ptr<ThreadSafeReceivedData>>
+  // TODO(yhirano): Use std::deque<std::unique_ptr<ThreadSafeReceivedData>>
   // once it is allowed.
   std::deque<RequestPeer::ThreadSafeReceivedData*> queue_;
   size_t first_offset_;
@@ -287,7 +288,7 @@
 }
 
 void SharedMemoryDataConsumerHandle::Writer::AddData(
-    scoped_ptr<RequestPeer::ReceivedData> data) {
+    std::unique_ptr<RequestPeer::ReceivedData> data) {
   if (!data->length()) {
     // We omit empty data.
     return;
@@ -302,12 +303,12 @@
     }
 
     needs_notification = context_->IsEmpty();
-    scoped_ptr<RequestPeer::ThreadSafeReceivedData> data_to_pass;
+    std::unique_ptr<RequestPeer::ThreadSafeReceivedData> data_to_pass;
     if (mode_ == kApplyBackpressure) {
       data_to_pass =
-          make_scoped_ptr(new DelegateThreadSafeReceivedData(std::move(data)));
+          base::WrapUnique(new DelegateThreadSafeReceivedData(std::move(data)));
     } else {
-      data_to_pass = make_scoped_ptr(new FixedReceivedData(data.get()));
+      data_to_pass = base::WrapUnique(new FixedReceivedData(data.get()));
     }
     context_->Push(std::move(data_to_pass));
   }
@@ -449,14 +450,13 @@
 
 SharedMemoryDataConsumerHandle::SharedMemoryDataConsumerHandle(
     BackpressureMode mode,
-    scoped_ptr<Writer>* writer)
-    : SharedMemoryDataConsumerHandle(mode, base::Closure(), writer) {
-}
+    std::unique_ptr<Writer>* writer)
+    : SharedMemoryDataConsumerHandle(mode, base::Closure(), writer) {}
 
 SharedMemoryDataConsumerHandle::SharedMemoryDataConsumerHandle(
     BackpressureMode mode,
     const base::Closure& on_reader_detached,
-    scoped_ptr<Writer>* writer)
+    std::unique_ptr<Writer>* writer)
     : context_(new Context(on_reader_detached)) {
   writer->reset(new Writer(context_, mode));
 }
@@ -467,9 +467,9 @@
   context_->ClearIfNecessary();
 }
 
-scoped_ptr<blink::WebDataConsumerHandle::Reader>
+std::unique_ptr<blink::WebDataConsumerHandle::Reader>
 SharedMemoryDataConsumerHandle::ObtainReader(Client* client) {
-  return make_scoped_ptr(obtainReaderInternal(client));
+  return base::WrapUnique(obtainReaderInternal(client));
 }
 
 SharedMemoryDataConsumerHandle::ReaderImpl*
diff --git a/content/child/shared_memory_data_consumer_handle.h b/content/child/shared_memory_data_consumer_handle.h
index aa33482e..4da9fd1 100644
--- a/content/child/shared_memory_data_consumer_handle.h
+++ b/content/child/shared_memory_data_consumer_handle.h
@@ -7,10 +7,11 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/child/request_peer.h"
 #include "third_party/WebKit/public/platform/WebDataConsumerHandle.h"
@@ -35,7 +36,7 @@
     ~Writer();
     // Note: Writer assumes |AddData| is not called in a client's didGetReadable
     // callback. There isn't such assumption for |Close| and |Fail|.
-    void AddData(scoped_ptr<RequestPeer::ReceivedData> data);
+    void AddData(std::unique_ptr<RequestPeer::ReceivedData> data);
     void Close();
     // TODO(yhirano): Consider providing error code.
     void Fail();
@@ -69,7 +70,7 @@
   // Creates a handle and a writer associated with the handle. The created
   // writer should be used on the calling thread.
   SharedMemoryDataConsumerHandle(BackpressureMode mode,
-                                 scoped_ptr<Writer>* writer);
+                                 std::unique_ptr<Writer>* writer);
   // |on_reader_detached| will be called aynchronously on the calling thread
   // when the reader (including the handle) is detached (i.e. both the handle
   // and the reader are destructed). The callback will be reset in the internal
@@ -77,10 +78,10 @@
   // and the callback will never be called.
   SharedMemoryDataConsumerHandle(BackpressureMode mode,
                                  const base::Closure& on_reader_detached,
-                                 scoped_ptr<Writer>* writer);
+                                 std::unique_ptr<Writer>* writer);
   ~SharedMemoryDataConsumerHandle() override;
 
-  scoped_ptr<Reader> ObtainReader(Client* client);
+  std::unique_ptr<Reader> ObtainReader(Client* client);
 
  private:
   ReaderImpl* obtainReaderInternal(Client* client) override;
diff --git a/content/child/shared_memory_data_consumer_handle_unittest.cc b/content/child/shared_memory_data_consumer_handle_unittest.cc
index 5694d588..1fd3107 100644
--- a/content/child/shared_memory_data_consumer_handle_unittest.cc
+++ b/content/child/shared_memory_data_consumer_handle_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 #include <string.h>
+
 #include <string>
 #include <utility>
 #include <vector>
@@ -14,6 +15,7 @@
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/task_runner.h"
@@ -125,7 +127,7 @@
   class ReadDataOperation final {
    public:
     typedef WebDataConsumerHandle::Result Result;
-    ReadDataOperation(scoped_ptr<SharedMemoryDataConsumerHandle> handle,
+    ReadDataOperation(std::unique_ptr<SharedMemoryDataConsumerHandle> handle,
                       base::MessageLoop* main_message_loop,
                       const base::Closure& on_done)
         : handle_(std::move(handle)),
@@ -167,9 +169,9 @@
     }
 
    private:
-    scoped_ptr<SharedMemoryDataConsumerHandle> handle_;
-    scoped_ptr<WebDataConsumerHandle::Reader> reader_;
-    scoped_ptr<WebDataConsumerHandle::Client> client_;
+    std::unique_ptr<SharedMemoryDataConsumerHandle> handle_;
+    std::unique_ptr<WebDataConsumerHandle::Reader> reader_;
+    std::unique_ptr<WebDataConsumerHandle::Client> client_;
     base::MessageLoop* main_message_loop_;
     base::Closure on_done_;
     std::string result_;
@@ -181,8 +183,8 @@
   }
 
   StrictMock<MockClient> client_;
-  scoped_ptr<SharedMemoryDataConsumerHandle> handle_;
-  scoped_ptr<Writer> writer_;
+  std::unique_ptr<SharedMemoryDataConsumerHandle> handle_;
+  std::unique_ptr<Writer> writer_;
   base::MessageLoop loop_;
 };
 
@@ -192,13 +194,13 @@
   void SetUp() override {
     handle_.reset(new SharedMemoryDataConsumerHandle(GetParam(), &writer_));
   }
-  scoped_ptr<FixedReceivedData> NewFixedData(const char* s) {
-    return make_scoped_ptr(new FixedReceivedData(s, strlen(s), strlen(s)));
+  std::unique_ptr<FixedReceivedData> NewFixedData(const char* s) {
+    return base::WrapUnique(new FixedReceivedData(s, strlen(s), strlen(s)));
   }
 
   StrictMock<MockClient> client_;
-  scoped_ptr<SharedMemoryDataConsumerHandle> handle_;
-  scoped_ptr<Writer> writer_;
+  std::unique_ptr<SharedMemoryDataConsumerHandle> handle_;
+  std::unique_ptr<Writer> writer_;
   base::MessageLoop loop_;
 };
 
@@ -896,18 +898,18 @@
   Result result;
   size_t size;
 
-  scoped_ptr<Writer> writer;
-  auto handle = make_scoped_ptr(
+  std::unique_ptr<Writer> writer;
+  auto handle = base::WrapUnique(
       new SharedMemoryDataConsumerHandle(kApplyBackpressure, &writer));
   scoped_refptr<Logger> logger(new Logger);
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data1", "Once ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data1", "Once ", logger)));
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data2", "upon ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data2", "upon ", logger)));
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data3", "a ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data3", "a ", logger)));
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data4", "time ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data4", "time ", logger)));
 
   auto reader = handle->ObtainReader(nullptr);
   logger->Add("1");
@@ -941,16 +943,16 @@
   Result result;
   size_t size;
 
-  scoped_ptr<Writer> writer;
-  auto handle = make_scoped_ptr(
+  std::unique_ptr<Writer> writer;
+  auto handle = base::WrapUnique(
       new SharedMemoryDataConsumerHandle(kApplyBackpressure, &writer));
   scoped_refptr<Logger> logger(new Logger);
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data1", "Once ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data1", "Once ", logger)));
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data2", "upon ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data2", "upon ", logger)));
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data3", "a ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data3", "a ", logger)));
 
   auto reader = handle->ObtainReader(nullptr);
   logger->Add("1");
@@ -977,17 +979,17 @@
 
 TEST(SharedMemoryDataConsumerHandleWithoutBackpressureTest, AddData) {
   base::MessageLoop loop;
-  scoped_ptr<Writer> writer;
-  auto handle = make_scoped_ptr(
+  std::unique_ptr<Writer> writer;
+  auto handle = base::WrapUnique(
       new SharedMemoryDataConsumerHandle(kDoNotApplyBackpressure, &writer));
   scoped_refptr<Logger> logger(new Logger);
 
   logger->Add("1");
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data1", "Once ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data1", "Once ", logger)));
   logger->Add("2");
   writer->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data2", "upon ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data2", "upon ", logger)));
   logger->Add("3");
 
   EXPECT_EQ(
@@ -1001,7 +1003,7 @@
 
 TEST_F(ThreadedSharedMemoryDataConsumerHandleTest, Read) {
   base::RunLoop run_loop;
-  auto operation = make_scoped_ptr(new ReadDataOperation(
+  auto operation = base::WrapUnique(new ReadDataOperation(
       std::move(handle_), &loop_, run_loop.QuitClosure()));
   scoped_refptr<Logger> logger(new Logger);
 
@@ -1014,15 +1016,15 @@
 
   logger->Add("1");
   writer_->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data1", "Once ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data1", "Once ", logger)));
   writer_->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data2", "upon ", logger)));
-  writer_->AddData(make_scoped_ptr(
+      base::WrapUnique(new LoggingFixedReceivedData("data2", "upon ", logger)));
+  writer_->AddData(base::WrapUnique(
       new LoggingFixedReceivedData("data3", "a time ", logger)));
+  writer_->AddData(base::WrapUnique(
+      new LoggingFixedReceivedData("data4", "there ", logger)));
   writer_->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data4", "there ", logger)));
-  writer_->AddData(
-      make_scoped_ptr(new LoggingFixedReceivedData("data5", "was ", logger)));
+      base::WrapUnique(new LoggingFixedReceivedData("data5", "was ", logger)));
   writer_->Close();
   logger->Add("2");
 
diff --git a/content/child/shared_memory_received_data_factory.cc b/content/child/shared_memory_received_data_factory.cc
index 49e805ef..4bfbb3e4 100644
--- a/content/child/shared_memory_received_data_factory.cc
+++ b/content/child/shared_memory_received_data_factory.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "content/common/resource_messages.h"
 #include "ipc/ipc_sender.h"
 
@@ -61,15 +62,15 @@
     SendAck(released_tickets_.size());
 }
 
-scoped_ptr<RequestPeer::ReceivedData> SharedMemoryReceivedDataFactory::Create(
-    int offset,
-    int length,
-    int encoded_length) {
+std::unique_ptr<RequestPeer::ReceivedData>
+SharedMemoryReceivedDataFactory::Create(int offset,
+                                        int length,
+                                        int encoded_length) {
   const char* start = static_cast<char*>(memory_->memory());
   const char* payload = start + offset;
   TicketId id = id_++;
 
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new SharedMemoryReceivedData(payload, length, encoded_length, this, id));
 }
 
diff --git a/content/child/shared_memory_received_data_factory.h b/content/child/shared_memory_received_data_factory.h
index e27f7ca..c60514e 100644
--- a/content/child/shared_memory_received_data_factory.h
+++ b/content/child/shared_memory_received_data_factory.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "content/common/content_export.h"
 #include "content/public/child/request_peer.h"
@@ -31,9 +31,9 @@
                                   int request_id,
                                   linked_ptr<base::SharedMemory> memory);
 
-  scoped_ptr<RequestPeer::ReceivedData> Create(int offset,
-                                               int length,
-                                               int encoded_length);
+  std::unique_ptr<RequestPeer::ReceivedData> Create(int offset,
+                                                    int length,
+                                                    int encoded_length);
 
   // Stops this factory. After calling this function, releasing issued data
   // won't send ack signal to the browser process.
diff --git a/content/child/shared_memory_received_data_factory_unittest.cc b/content/child/shared_memory_received_data_factory_unittest.cc
index 77ab7c6..05b6bed7 100644
--- a/content/child/shared_memory_received_data_factory_unittest.cc
+++ b/content/child/shared_memory_received_data_factory_unittest.cc
@@ -59,7 +59,7 @@
   }
 
   static const size_t memory_size = 4 * 1024;
-  scoped_ptr<MockSender> sender_;
+  std::unique_ptr<MockSender> sender_;
   int request_id_;
   linked_ptr<base::SharedMemory> memory_;
   scoped_refptr<SharedMemoryReceivedDataFactory> factory_;
@@ -72,7 +72,7 @@
   EXPECT_CALL(*sender_, SendAck(request_id_));
   EXPECT_CALL(checkpoint, Call(1));
 
-  scoped_ptr<ReceivedData> data = factory_->Create(12, 34, 56);
+  std::unique_ptr<ReceivedData> data = factory_->Create(12, 34, 56);
   const char* memory_start = static_cast<const char*>(memory_->memory());
 
   ASSERT_TRUE(data);
@@ -96,9 +96,9 @@
   EXPECT_CALL(*sender_, SendAck(request_id_));
   EXPECT_CALL(checkpoint, Call(3));
 
-  scoped_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
-  scoped_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
-  scoped_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
+  std::unique_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
+  std::unique_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
+  std::unique_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
 
   EXPECT_TRUE(data1);
   EXPECT_TRUE(data2);
@@ -124,9 +124,9 @@
   EXPECT_CALL(*sender_, SendAck(request_id_));
   EXPECT_CALL(checkpoint, Call(3));
 
-  scoped_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
-  scoped_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
-  scoped_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
+  std::unique_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
+  std::unique_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
+  std::unique_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
 
   EXPECT_TRUE(data1);
   EXPECT_TRUE(data2);
@@ -156,12 +156,12 @@
   EXPECT_CALL(*sender_, SendAck(request_id_));
   EXPECT_CALL(checkpoint, Call(4));
 
-  scoped_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
-  scoped_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
-  scoped_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
-  scoped_ptr<ReceivedData> data4 = factory_->Create(3, 1, 1);
-  scoped_ptr<ReceivedData> data5 = factory_->Create(4, 1, 1);
-  scoped_ptr<ReceivedData> data6 = factory_->Create(5, 1, 1);
+  std::unique_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
+  std::unique_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
+  std::unique_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
+  std::unique_ptr<ReceivedData> data4 = factory_->Create(3, 1, 1);
+  std::unique_ptr<ReceivedData> data5 = factory_->Create(4, 1, 1);
+  std::unique_ptr<ReceivedData> data6 = factory_->Create(5, 1, 1);
 
   EXPECT_TRUE(data1);
   EXPECT_TRUE(data2);
@@ -194,12 +194,12 @@
   EXPECT_CALL(checkpoint, Call(2));
   EXPECT_CALL(checkpoint, Call(3));
 
-  scoped_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
-  scoped_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
-  scoped_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
-  scoped_ptr<ReceivedData> data4 = factory_->Create(3, 1, 1);
-  scoped_ptr<ReceivedData> data5 = factory_->Create(4, 1, 1);
-  scoped_ptr<ReceivedData> data6 = factory_->Create(5, 1, 1);
+  std::unique_ptr<ReceivedData> data1 = factory_->Create(0, 1, 1);
+  std::unique_ptr<ReceivedData> data2 = factory_->Create(1, 1, 1);
+  std::unique_ptr<ReceivedData> data3 = factory_->Create(2, 1, 1);
+  std::unique_ptr<ReceivedData> data4 = factory_->Create(3, 1, 1);
+  std::unique_ptr<ReceivedData> data5 = factory_->Create(4, 1, 1);
+  std::unique_ptr<ReceivedData> data6 = factory_->Create(5, 1, 1);
 
   EXPECT_TRUE(data1);
   EXPECT_TRUE(data2);
diff --git a/content/child/site_isolation_stats_gatherer.cc b/content/child/site_isolation_stats_gatherer.cc
index f38ea385..b05101d 100644
--- a/content/child/site_isolation_stats_gatherer.cc
+++ b/content/child/site_isolation_stats_gatherer.cc
@@ -53,7 +53,7 @@
 
 void HistogramCountBlockedResponse(
     const std::string& bucket_prefix,
-    const scoped_ptr<SiteIsolationResponseMetaData>& resp_data,
+    const std::unique_ptr<SiteIsolationResponseMetaData>& resp_data,
     bool nosniff_block) {
   std::string block_label(nosniff_block ? ".NoSniffBlocked" : ".Blocked");
   IncrementHistogramCount(bucket_prefix + block_label);
@@ -96,7 +96,7 @@
   g_stats_gathering_enabled = enabled;
 }
 
-scoped_ptr<SiteIsolationResponseMetaData>
+std::unique_ptr<SiteIsolationResponseMetaData>
 SiteIsolationStatsGatherer::OnReceivedResponse(
     const GURL& frame_origin,
     const GURL& response_url,
@@ -150,7 +150,7 @@
   std::string no_sniff;
   info.headers->EnumerateHeader(NULL, "x-content-type-options", &no_sniff);
 
-  scoped_ptr<SiteIsolationResponseMetaData> resp_data(
+  std::unique_ptr<SiteIsolationResponseMetaData> resp_data(
       new SiteIsolationResponseMetaData);
   resp_data->frame_origin = frame_origin.spec();
   resp_data->response_url = response_url;
@@ -163,7 +163,7 @@
 }
 
 bool SiteIsolationStatsGatherer::OnReceivedFirstChunk(
-    const scoped_ptr<SiteIsolationResponseMetaData>& resp_data,
+    const std::unique_ptr<SiteIsolationResponseMetaData>& resp_data,
     const char* raw_data,
     int raw_length) {
   if (!g_stats_gathering_enabled)
diff --git a/content/child/site_isolation_stats_gatherer.h b/content/child/site_isolation_stats_gatherer.h
index 4530a16..36173193 100644
--- a/content/child/site_isolation_stats_gatherer.h
+++ b/content/child/site_isolation_stats_gatherer.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_
 #define CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "content/common/content_export.h"
 #include "content/common/cross_site_document_classifier.h"
@@ -69,7 +69,7 @@
   // Returns any bookkeeping data about the HTTP header information for the
   // request identified by |request_id|. Any data returned should then be
   // passed to OnReceivedFirstChunk() with the first data chunk.
-  static scoped_ptr<SiteIsolationResponseMetaData> OnReceivedResponse(
+  static std::unique_ptr<SiteIsolationResponseMetaData> OnReceivedResponse(
       const GURL& frame_origin,
       const GURL& response_url,
       ResourceType resource_type,
@@ -81,7 +81,7 @@
   // kinds of UMA data stats. This function is called only if the length of
   // received data is non-zero.
   static bool OnReceivedFirstChunk(
-      const scoped_ptr<SiteIsolationResponseMetaData>& resp_data,
+      const std::unique_ptr<SiteIsolationResponseMetaData>& resp_data,
       const char* payload,
       int length);
 
diff --git a/content/child/v8_value_converter_impl.cc b/content/child/v8_value_converter_impl.cc
index 1d4fe41..dc32d9f 100644
--- a/content/child/v8_value_converter_impl.cc
+++ b/content/child/v8_value_converter_impl.cc
@@ -8,12 +8,12 @@
 #include <stdint.h>
 
 #include <cmath>
+#include <memory>
 #include <string>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "third_party/WebKit/public/web/WebArrayBuffer.h"
 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h"
@@ -376,7 +376,7 @@
   if (!state->UpdateAndCheckUniqueness(val))
     return base::Value::CreateNullValue().release();
 
-  scoped_ptr<v8::Context::Scope> scope;
+  std::unique_ptr<v8::Context::Scope> scope;
   // If val was created in a different context than our current one, change to
   // that context, but change back after val is converted.
   if (!val->CreationContext().IsEmpty() &&
@@ -434,9 +434,9 @@
   char* data = NULL;
   size_t length = 0;
 
-  scoped_ptr<blink::WebArrayBuffer> array_buffer(
+  std::unique_ptr<blink::WebArrayBuffer> array_buffer(
       blink::WebArrayBufferConverter::createFromV8Value(val, isolate));
-  scoped_ptr<blink::WebArrayBufferView> view;
+  std::unique_ptr<blink::WebArrayBufferView> view;
   if (array_buffer) {
     data = reinterpret_cast<char*>(array_buffer->data());
     length = array_buffer->byteLength();
@@ -461,7 +461,7 @@
   if (!state->UpdateAndCheckUniqueness(val))
     return base::Value::CreateNullValue().release();
 
-  scoped_ptr<v8::Context::Scope> scope;
+  std::unique_ptr<v8::Context::Scope> scope;
   // If val was created in a different context than our current one, change to
   // that context, but change back after val is converted.
   if (!val->CreationContext().IsEmpty() &&
@@ -496,7 +496,7 @@
   if (val->InternalFieldCount())
     return new base::DictionaryValue();
 
-  scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
   v8::Local<v8::Array> property_names(val->GetOwnPropertyNames());
 
   for (uint32_t i = 0; i < property_names->Length(); ++i) {
@@ -521,7 +521,8 @@
       child_v8 = v8::Null(isolate);
     }
 
-    scoped_ptr<base::Value> child(FromV8ValueImpl(state, child_v8, isolate));
+    std::unique_ptr<base::Value> child(
+        FromV8ValueImpl(state, child_v8, isolate));
     if (!child)
       // JSON.stringify skips properties whose values don't serialize, for
       // example undefined and functions. Emulate that behavior.
diff --git a/content/child/v8_value_converter_impl_unittest.cc b/content/child/v8_value_converter_impl_unittest.cc
index ccb1db5..bcd5eeb 100644
--- a/content/child/v8_value_converter_impl_unittest.cc
+++ b/content/child/v8_value_converter_impl_unittest.cc
@@ -2,17 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/child/v8_value_converter_impl.h"
+
 #include <stddef.h>
 #include <stdint.h>
 
 #include <cmath>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/test/values_test_util.h"
 #include "base/values.h"
-#include "content/child/v8_value_converter_impl.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
 
@@ -143,10 +144,10 @@
   void TestWeirdType(const V8ValueConverterImpl& converter,
                      v8::Local<v8::Value> val,
                      base::Value::Type expected_type,
-                     scoped_ptr<base::Value> expected_value) {
+                     std::unique_ptr<base::Value> expected_value) {
     v8::Local<v8::Context> context =
         v8::Local<v8::Context>::New(isolate_, context_);
-    scoped_ptr<base::Value> raw(converter.FromV8Value(val, context));
+    std::unique_ptr<base::Value> raw(converter.FromV8Value(val, context));
 
     if (expected_value) {
       ASSERT_TRUE(raw.get());
@@ -158,7 +159,7 @@
 
     v8::Local<v8::Object> object(v8::Object::New(isolate_));
     object->Set(v8::String::NewFromUtf8(isolate_, "test"), val);
-    scoped_ptr<base::DictionaryValue> dictionary(
+    std::unique_ptr<base::DictionaryValue> dictionary(
         static_cast<base::DictionaryValue*>(
             converter.FromV8Value(object, context)));
     ASSERT_TRUE(dictionary.get());
@@ -174,7 +175,7 @@
 
     v8::Local<v8::Array> array(v8::Array::New(isolate_));
     array->Set(0, val);
-    scoped_ptr<base::ListValue> list(
+    std::unique_ptr<base::ListValue> list(
         static_cast<base::ListValue*>(converter.FromV8Value(array, context)));
     ASSERT_TRUE(list.get());
     if (expected_value) {
@@ -198,7 +199,7 @@
 };
 
 TEST_F(V8ValueConverterImplTest, BasicRoundTrip) {
-  scoped_ptr<base::Value> original_root = base::test::ParseJson(
+  std::unique_ptr<base::Value> original_root = base::test::ParseJson(
       "{ \n"
       "  \"null\": null, \n"
       "  \"true\": true, \n"
@@ -260,13 +261,14 @@
   EXPECT_TRUE(v8_object->Get(v8::String::NewFromUtf8(isolate_, "empty-list"))
                   ->IsArray());
 
-  scoped_ptr<base::Value> new_root(converter.FromV8Value(v8_object, context));
+  std::unique_ptr<base::Value> new_root(
+      converter.FromV8Value(v8_object, context));
   EXPECT_NE(original_root.get(), new_root.get());
   EXPECT_TRUE(original_root->Equals(new_root.get()));
 }
 
 TEST_F(V8ValueConverterImplTest, KeysWithDots) {
-  scoped_ptr<base::Value> original =
+  std::unique_ptr<base::Value> original =
       base::test::ParseJson("{ \"foo.bar\": \"baz\" }");
 
   v8::HandleScope handle_scope(isolate_);
@@ -275,9 +277,8 @@
   v8::Context::Scope context_scope(context);
 
   V8ValueConverterImpl converter;
-  scoped_ptr<base::Value> copy(
-      converter.FromV8Value(
-          converter.ToV8Value(original.get(), context), context));
+  std::unique_ptr<base::Value> copy(converter.FromV8Value(
+      converter.ToV8Value(original.get(), context), context));
 
   EXPECT_TRUE(original->Equals(copy.get()));
 }
@@ -307,7 +308,7 @@
 
   // Converting from v8 value should replace the foo property with null.
   V8ValueConverterImpl converter;
-  scoped_ptr<base::DictionaryValue> converted(
+  std::unique_ptr<base::DictionaryValue> converted(
       static_cast<base::DictionaryValue*>(
           converter.FromV8Value(object, context)));
   EXPECT_TRUE(converted.get());
@@ -351,8 +352,8 @@
 
   // Converting from v8 value should replace the first item with null.
   V8ValueConverterImpl converter;
-  scoped_ptr<base::ListValue> converted(static_cast<base::ListValue*>(
-      converter.FromV8Value(array, context)));
+  std::unique_ptr<base::ListValue> converted(
+      static_cast<base::ListValue*>(converter.FromV8Value(array, context)));
   ASSERT_TRUE(converted.get());
   // http://code.google.com/p/v8/issues/detail?id=1342
   EXPECT_EQ(2u, converted->GetSize());
@@ -378,30 +379,23 @@
       v8::String::NewFromUtf8(isolate_, "."), v8::RegExp::kNone));
 
   V8ValueConverterImpl converter;
-  TestWeirdType(converter,
-                v8::Undefined(isolate_),
+  TestWeirdType(converter, v8::Undefined(isolate_),
                 base::Value::TYPE_NULL,  // Arbitrary type, result is NULL.
-                scoped_ptr<base::Value>());
-  TestWeirdType(converter,
-                v8::Date::New(isolate_, 1000),
+                std::unique_ptr<base::Value>());
+  TestWeirdType(converter, v8::Date::New(isolate_, 1000),
                 base::Value::TYPE_DICTIONARY,
-                scoped_ptr<base::Value>(new base::DictionaryValue()));
-  TestWeirdType(converter,
-                regex,
-                base::Value::TYPE_DICTIONARY,
-                scoped_ptr<base::Value>(new base::DictionaryValue()));
+                std::unique_ptr<base::Value>(new base::DictionaryValue()));
+  TestWeirdType(converter, regex, base::Value::TYPE_DICTIONARY,
+                std::unique_ptr<base::Value>(new base::DictionaryValue()));
 
   converter.SetDateAllowed(true);
-  TestWeirdType(converter,
-                v8::Date::New(isolate_, 1000),
+  TestWeirdType(converter, v8::Date::New(isolate_, 1000),
                 base::Value::TYPE_DOUBLE,
-                scoped_ptr<base::Value>(new base::FundamentalValue(1.0)));
+                std::unique_ptr<base::Value>(new base::FundamentalValue(1.0)));
 
   converter.SetRegExpAllowed(true);
-  TestWeirdType(converter,
-                regex,
-                base::Value::TYPE_STRING,
-                scoped_ptr<base::Value>(new base::StringValue("/./")));
+  TestWeirdType(converter, regex, base::Value::TYPE_STRING,
+                std::unique_ptr<base::Value>(new base::StringValue("/./")));
 }
 
 TEST_F(V8ValueConverterImplTest, Prototype) {
@@ -423,7 +417,7 @@
   ASSERT_FALSE(object.IsEmpty());
 
   V8ValueConverterImpl converter;
-  scoped_ptr<base::DictionaryValue> result(
+  std::unique_ptr<base::DictionaryValue> result(
       static_cast<base::DictionaryValue*>(
           converter.FromV8Value(object, context)));
   ASSERT_TRUE(result.get());
@@ -450,7 +444,7 @@
   V8ValueConverterImpl converter;
   converter.SetStripNullFromObjects(true);
 
-  scoped_ptr<base::DictionaryValue> result(
+  std::unique_ptr<base::DictionaryValue> result(
       static_cast<base::DictionaryValue*>(
           converter.FromV8Value(object, context)));
   ASSERT_TRUE(result.get());
@@ -471,7 +465,7 @@
               v8::String::NewFromUtf8(isolate_, "bar"));
   object->Set(v8::String::NewFromUtf8(isolate_, "obj"), object);
 
-  scoped_ptr<base::DictionaryValue> object_result(
+  std::unique_ptr<base::DictionaryValue> object_result(
       static_cast<base::DictionaryValue*>(
           converter.FromV8Value(object, context)));
   ASSERT_TRUE(object_result.get());
@@ -483,7 +477,7 @@
   array->Set(0, v8::String::NewFromUtf8(isolate_, "1"));
   array->Set(1, array);
 
-  scoped_ptr<base::ListValue> list_result(
+  std::unique_ptr<base::ListValue> list_result(
       static_cast<base::ListValue*>(converter.FromV8Value(array, context)));
   ASSERT_TRUE(list_result.get());
   EXPECT_EQ(2u, list_result->GetSize());
@@ -515,9 +509,9 @@
   ASSERT_FALSE(object.IsEmpty());
 
   V8ValueConverterImpl converter;
-  scoped_ptr<base::Value> actual(converter.FromV8Value(object, context));
+  std::unique_ptr<base::Value> actual(converter.FromV8Value(object, context));
 
-  scoped_ptr<base::Value> expected = base::test::ParseJson(
+  std::unique_ptr<base::Value> expected = base::test::ParseJson(
       "{ \n"
       "  \"1\": \"foo\", \n"
       "  \"2\": \"bar\", \n"
@@ -550,7 +544,7 @@
   ASSERT_FALSE(array.IsEmpty());
 
   V8ValueConverterImpl converter;
-  scoped_ptr<base::ListValue> result(
+  std::unique_ptr<base::ListValue> result(
       static_cast<base::ListValue*>(converter.FromV8Value(array, context)));
   ASSERT_TRUE(result.get());
   EXPECT_EQ(2u, result->GetSize());
@@ -599,17 +593,18 @@
 
   V8ValueConverterImpl converter;
 
-  scoped_ptr<base::Value> actual_object(
+  std::unique_ptr<base::Value> actual_object(
       converter.FromV8Value(object, context));
   EXPECT_TRUE(base::Value::Equals(
       base::test::ParseJson("{ \"bar\": null }").get(), actual_object.get()));
 
   // Everything is null because JSON stringification preserves array length.
-  scoped_ptr<base::Value> actual_array(converter.FromV8Value(array, context));
+  std::unique_ptr<base::Value> actual_array(
+      converter.FromV8Value(array, context));
   EXPECT_TRUE(base::Value::Equals(
       base::test::ParseJson("[ null, null, null ]").get(), actual_array.get()));
 
-  scoped_ptr<base::Value> actual_sparse_array(
+  std::unique_ptr<base::Value> actual_sparse_array(
       converter.FromV8Value(sparse_array, context));
   EXPECT_TRUE(
       base::Value::Equals(base::test::ParseJson("[ null, null, null ]").get(),
@@ -635,11 +630,12 @@
   root->Set(3, v8::Local<v8::Object>(v8::Array::New(isolate_, 0)));
 
   // The expected base::Value result.
-  scoped_ptr<base::Value> expected = base::test::ParseJson("[{},{},[],[]]");
+  std::unique_ptr<base::Value> expected =
+      base::test::ParseJson("[{},{},[],[]]");
   ASSERT_TRUE(expected.get());
 
   // The actual result.
-  scoped_ptr<base::Value> value(converter.FromV8Value(root, context));
+  std::unique_ptr<base::Value> value(converter.FromV8Value(root, context));
   ASSERT_TRUE(value.get());
 
   EXPECT_TRUE(expected->Equals(value.get()));
@@ -661,7 +657,7 @@
   expected_list.Append(base::Value::CreateNullValue());
 
   // The actual result.
-  scoped_ptr<base::Value> actual_list(
+  std::unique_ptr<base::Value> actual_list(
       converter.FromV8Value(recursive_array, context));
   ASSERT_TRUE(actual_list.get());
 
@@ -682,7 +678,7 @@
   expected_dictionary.Set(key, base::Value::CreateNullValue());
 
   // The actual result.
-  scoped_ptr<base::Value> actual_dictionary(
+  std::unique_ptr<base::Value> actual_dictionary(
       converter.FromV8Value(recursive_object, context));
   ASSERT_TRUE(actual_dictionary.get());
 
@@ -709,7 +705,8 @@
   }
 
   V8ValueConverterImpl converter;
-  scoped_ptr<base::Value> value(converter.FromV8Value(deep_object, context));
+  std::unique_ptr<base::Value> value(
+      converter.FromV8Value(deep_object, context));
   ASSERT_TRUE(value);
 
   // Expected depth is kMaxRecursionDepth in v8_value_converter_impl.cc.
@@ -767,7 +764,7 @@
   static base::Value* NewReferenceValue() {
     return new base::StringValue("strategy");
   }
-  scoped_ptr<base::Value> reference_value_;
+  std::unique_ptr<base::Value> reference_value_;
 };
 
 TEST_F(V8ValueConverterImplTest, StrategyOverrides) {
@@ -781,19 +778,21 @@
   converter.SetStrategy(&strategy);
 
   v8::Local<v8::Object> object(v8::Object::New(isolate_));
-  scoped_ptr<base::Value> object_value(converter.FromV8Value(object, context));
+  std::unique_ptr<base::Value> object_value(
+      converter.FromV8Value(object, context));
   ASSERT_TRUE(object_value);
   EXPECT_TRUE(
       base::Value::Equals(strategy.reference_value(), object_value.get()));
 
   v8::Local<v8::Array> array(v8::Array::New(isolate_));
-  scoped_ptr<base::Value> array_value(converter.FromV8Value(array, context));
+  std::unique_ptr<base::Value> array_value(
+      converter.FromV8Value(array, context));
   ASSERT_TRUE(array_value);
   EXPECT_TRUE(
       base::Value::Equals(strategy.reference_value(), array_value.get()));
 
   v8::Local<v8::ArrayBuffer> array_buffer(v8::ArrayBuffer::New(isolate_, 0));
-  scoped_ptr<base::Value> array_buffer_value(
+  std::unique_ptr<base::Value> array_buffer_value(
       converter.FromV8Value(array_buffer, context));
   ASSERT_TRUE(array_buffer_value);
   EXPECT_TRUE(base::Value::Equals(strategy.reference_value(),
@@ -801,20 +800,21 @@
 
   v8::Local<v8::ArrayBufferView> array_buffer_view(
       v8::Uint8Array::New(array_buffer, 0, 0));
-  scoped_ptr<base::Value> array_buffer_view_value(
+  std::unique_ptr<base::Value> array_buffer_view_value(
       converter.FromV8Value(array_buffer_view, context));
   ASSERT_TRUE(array_buffer_view_value);
   EXPECT_TRUE(base::Value::Equals(strategy.reference_value(),
                                   array_buffer_view_value.get()));
 
   v8::Local<v8::Number> number(v8::Number::New(isolate_, 0.0));
-  scoped_ptr<base::Value> number_value(converter.FromV8Value(number, context));
+  std::unique_ptr<base::Value> number_value(
+      converter.FromV8Value(number, context));
   ASSERT_TRUE(number_value);
   EXPECT_TRUE(
       base::Value::Equals(strategy.reference_value(), number_value.get()));
 
   v8::Local<v8::Primitive> undefined(v8::Undefined(isolate_));
-  scoped_ptr<base::Value> undefined_value(
+  std::unique_ptr<base::Value> undefined_value(
       converter.FromV8Value(undefined, context));
   ASSERT_TRUE(undefined_value);
   EXPECT_TRUE(
@@ -861,16 +861,20 @@
   converter.SetStrategy(&strategy);
 
   v8::Local<v8::Object> object(v8::Object::New(isolate_));
-  scoped_ptr<base::Value> object_value(converter.FromV8Value(object, context));
+  std::unique_ptr<base::Value> object_value(
+      converter.FromV8Value(object, context));
   ASSERT_TRUE(object_value);
-  scoped_ptr<base::Value> reference_object_value(base::test::ParseJson("{}"));
+  std::unique_ptr<base::Value> reference_object_value(
+      base::test::ParseJson("{}"));
   EXPECT_TRUE(
       base::Value::Equals(reference_object_value.get(), object_value.get()));
 
   v8::Local<v8::Array> array(v8::Array::New(isolate_));
-  scoped_ptr<base::Value> array_value(converter.FromV8Value(array, context));
+  std::unique_ptr<base::Value> array_value(
+      converter.FromV8Value(array, context));
   ASSERT_TRUE(array_value);
-  scoped_ptr<base::Value> reference_array_value(base::test::ParseJson("[]"));
+  std::unique_ptr<base::Value> reference_array_value(
+      base::test::ParseJson("[]"));
   EXPECT_TRUE(
       base::Value::Equals(reference_array_value.get(), array_value.get()));
 
@@ -878,14 +882,16 @@
   // this requires having blink to be initialized.
 
   v8::Local<v8::Number> number(v8::Number::New(isolate_, 0.0));
-  scoped_ptr<base::Value> number_value(converter.FromV8Value(number, context));
+  std::unique_ptr<base::Value> number_value(
+      converter.FromV8Value(number, context));
   ASSERT_TRUE(number_value);
-  scoped_ptr<base::Value> reference_number_value(base::test::ParseJson("0"));
+  std::unique_ptr<base::Value> reference_number_value(
+      base::test::ParseJson("0"));
   EXPECT_TRUE(
       base::Value::Equals(reference_number_value.get(), number_value.get()));
 
   v8::Local<v8::Primitive> undefined(v8::Undefined(isolate_));
-  scoped_ptr<base::Value> undefined_value(
+  std::unique_ptr<base::Value> undefined_value(
       converter.FromV8Value(undefined, context));
   EXPECT_FALSE(undefined_value);
 }
diff --git a/content/child/web_data_consumer_handle_impl.cc b/content/child/web_data_consumer_handle_impl.cc
index f4ded9d..f8986f0 100644
--- a/content/child/web_data_consumer_handle_impl.cc
+++ b/content/child/web_data_consumer_handle_impl.cc
@@ -5,12 +5,14 @@
 #include "content/child/web_data_consumer_handle_impl.h"
 
 #include <stdint.h>
+
 #include <limits>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "mojo/public/c/system/types.h"
 
 namespace content {
@@ -127,9 +129,9 @@
 WebDataConsumerHandleImpl::~WebDataConsumerHandleImpl() {
 }
 
-scoped_ptr<blink::WebDataConsumerHandle::Reader>
+std::unique_ptr<blink::WebDataConsumerHandle::Reader>
 WebDataConsumerHandleImpl::ObtainReader(Client* client) {
-  return make_scoped_ptr(obtainReaderInternal(client));
+  return base::WrapUnique(obtainReaderInternal(client));
 }
 
 WebDataConsumerHandleImpl::ReaderImpl*
diff --git a/content/child/web_data_consumer_handle_impl.h b/content/child/web_data_consumer_handle_impl.h
index 1e26bda..5eb1aca 100644
--- a/content/child/web_data_consumer_handle_impl.h
+++ b/content/child/web_data_consumer_handle_impl.h
@@ -7,7 +7,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/common/content_export.h"
 #include "mojo/message_pump/handle_watcher.h"
 #include "mojo/public/cpp/system/data_pipe.h"
@@ -43,7 +44,7 @@
     mojo::common::HandleWatcher handle_watcher_;
     Client* client_;
   };
-  scoped_ptr<Reader> ObtainReader(Client* client);
+  std::unique_ptr<Reader> ObtainReader(Client* client);
 
   explicit WebDataConsumerHandleImpl(Handle handle);
   ~WebDataConsumerHandleImpl() override;
diff --git a/content/child/web_data_consumer_handle_impl_unittest.cc b/content/child/web_data_consumer_handle_impl_unittest.cc
index 747d8d86..2f75a2319 100644
--- a/content/child/web_data_consumer_handle_impl_unittest.cc
+++ b/content/child/web_data_consumer_handle_impl_unittest.cc
@@ -6,13 +6,15 @@
 
 #include <stddef.h>
 #include <stdint.h>
+
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/waitable_event.h"
@@ -103,9 +105,9 @@
   }
 
  private:
-  scoped_ptr<WebDataConsumerHandleImpl> handle_;
-  scoped_ptr<WebDataConsumerHandle::Reader> reader_;
-  scoped_ptr<WebDataConsumerHandle::Client> client_;
+  std::unique_ptr<WebDataConsumerHandleImpl> handle_;
+  std::unique_ptr<WebDataConsumerHandle::Reader> reader_;
+  std::unique_ptr<WebDataConsumerHandle::Client> client_;
   base::MessageLoop* main_message_loop_;
   base::Closure on_done_;
   std::string result_;
@@ -169,9 +171,9 @@
   }
 
  private:
-  scoped_ptr<WebDataConsumerHandleImpl> handle_;
-  scoped_ptr<WebDataConsumerHandle::Reader> reader_;
-  scoped_ptr<WebDataConsumerHandle::Client> client_;
+  std::unique_ptr<WebDataConsumerHandleImpl> handle_;
+  std::unique_ptr<WebDataConsumerHandle::Reader> reader_;
+  std::unique_ptr<WebDataConsumerHandle::Client> client_;
   base::MessageLoop* main_message_loop_;
   base::Closure on_done_;
   std::string result_;
@@ -229,7 +231,7 @@
 
 TEST_F(WebDataConsumerHandleImplTest, ReadData) {
   base::RunLoop run_loop;
-  auto operation = make_scoped_ptr(new ReadDataOperation(
+  auto operation = base::WrapUnique(new ReadDataOperation(
       std::move(consumer_), &message_loop_, run_loop.QuitClosure()));
 
   base::Thread t("DataConsumerHandle test thread");
@@ -250,7 +252,7 @@
 
 TEST_F(WebDataConsumerHandleImplTest, TwoPhaseReadData) {
   base::RunLoop run_loop;
-  auto operation = make_scoped_ptr(new TwoPhaseReadDataOperation(
+  auto operation = base::WrapUnique(new TwoPhaseReadDataOperation(
       std::move(consumer_), &message_loop_, run_loop.QuitClosure()));
 
   base::Thread t("DataConsumerHandle test thread");
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 3ece77c..41daeb0 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -5,7 +5,9 @@
 #include "content/child/web_url_loader_impl.h"
 
 #include <stdint.h>
+
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -13,7 +15,7 @@
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/time/time.h"
@@ -298,7 +300,7 @@
 
   Context(WebURLLoaderImpl* loader,
           ResourceDispatcher* resource_dispatcher,
-          scoped_ptr<blink::WebTaskRunner> task_runner);
+          std::unique_ptr<blink::WebTaskRunner> task_runner);
 
   WebURLLoaderClient* client() const { return client_; }
   void set_client(WebURLLoaderClient* client) { client_ = client; }
@@ -309,14 +311,14 @@
                          int intra_priority_value);
   void Start(const WebURLRequest& request,
              SyncLoadResponse* sync_load_response);
-  void SetWebTaskRunner(scoped_ptr<blink::WebTaskRunner> task_runner);
+  void SetWebTaskRunner(std::unique_ptr<blink::WebTaskRunner> task_runner);
 
   void OnUploadProgress(uint64_t position, uint64_t size);
   bool OnReceivedRedirect(const net::RedirectInfo& redirect_info,
                           const ResourceResponseInfo& info);
   void OnReceivedResponse(const ResourceResponseInfo& info);
   void OnDownloadedData(int len, int encoded_data_length);
-  void OnReceivedData(scoped_ptr<ReceivedData> data);
+  void OnReceivedData(std::unique_ptr<ReceivedData> data);
   void OnReceivedCachedMetadata(const char* data, int len);
   void OnCompletedRequest(int error_code,
                           bool was_ignored_by_handler,
@@ -352,11 +354,11 @@
   WebURLRequest request_;
   WebURLLoaderClient* client_;
   ResourceDispatcher* resource_dispatcher_;
-  scoped_ptr<blink::WebTaskRunner> web_task_runner_;
+  std::unique_ptr<blink::WebTaskRunner> web_task_runner_;
   WebReferrerPolicy referrer_policy_;
-  scoped_ptr<FtpDirectoryListingResponseDelegate> ftp_listing_delegate_;
-  scoped_ptr<StreamOverrideParameters> stream_override_;
-  scoped_ptr<SharedMemoryDataConsumerHandle::Writer> body_stream_writer_;
+  std::unique_ptr<FtpDirectoryListingResponseDelegate> ftp_listing_delegate_;
+  std::unique_ptr<StreamOverrideParameters> stream_override_;
+  std::unique_ptr<SharedMemoryDataConsumerHandle::Writer> body_stream_writer_;
   enum DeferState {NOT_DEFERRING, SHOULD_DEFER, DEFERRED_DATA};
   DeferState defers_loading_;
   int request_id_;
@@ -375,7 +377,7 @@
                           const ResourceResponseInfo& info) override;
   void OnReceivedResponse(const ResourceResponseInfo& info) override;
   void OnDownloadedData(int len, int encoded_data_length) override;
-  void OnReceivedData(scoped_ptr<ReceivedData> data) override;
+  void OnReceivedData(std::unique_ptr<ReceivedData> data) override;
   void OnReceivedCachedMetadata(const char* data, int len) override;
   void OnCompletedRequest(int error_code,
                           bool was_ignored_by_handler,
@@ -394,7 +396,7 @@
 WebURLLoaderImpl::Context::Context(
     WebURLLoaderImpl* loader,
     ResourceDispatcher* resource_dispatcher,
-    scoped_ptr<blink::WebTaskRunner> web_task_runner)
+    std::unique_ptr<blink::WebTaskRunner> web_task_runner)
     : loader_(loader),
       client_(NULL),
       resource_dispatcher_(resource_dispatcher),
@@ -560,11 +562,11 @@
 
   request_id_ = resource_dispatcher_->StartAsync(
       request_info, request_body.get(),
-      make_scoped_ptr(new WebURLLoaderImpl::RequestPeerImpl(this)));
+      base::WrapUnique(new WebURLLoaderImpl::RequestPeerImpl(this)));
 }
 
 void WebURLLoaderImpl::Context::SetWebTaskRunner(
-    scoped_ptr<blink::WebTaskRunner> web_task_runner) {
+    std::unique_ptr<blink::WebTaskRunner> web_task_runner) {
   web_task_runner_ = std::move(web_task_runner);
 }
 
@@ -662,7 +664,7 @@
       mode = SharedMemoryDataConsumerHandle::kApplyBackpressure;
     }
 
-    auto read_handle = make_scoped_ptr(new SharedMemoryDataConsumerHandle(
+    auto read_handle = base::WrapUnique(new SharedMemoryDataConsumerHandle(
         mode, base::Bind(&Context::CancelBodyStreaming, this),
         &body_stream_writer_));
 
@@ -698,7 +700,8 @@
     client_->didDownloadData(loader_, len, encoded_data_length);
 }
 
-void WebURLLoaderImpl::Context::OnReceivedData(scoped_ptr<ReceivedData> data) {
+void WebURLLoaderImpl::Context::OnReceivedData(
+    std::unique_ptr<ReceivedData> data) {
   const char* payload = data->payload();
   int data_length = data->length();
   int encoded_data_length = data->encoded_length();
@@ -845,7 +848,7 @@
     OnReceivedResponse(info);
     if (!data.empty())
       OnReceivedData(
-          make_scoped_ptr(new FixedReceivedData(data.data(), data.size(), 0)));
+          base::WrapUnique(new FixedReceivedData(data.data(), data.size(), 0)));
   }
 
   OnCompletedRequest(error_code, false, false, info.security_info,
@@ -880,7 +883,7 @@
 }
 
 void WebURLLoaderImpl::RequestPeerImpl::OnReceivedData(
-    scoped_ptr<ReceivedData> data) {
+    std::unique_ptr<ReceivedData> data) {
   context_->OnReceivedData(std::move(data));
 }
 
@@ -906,7 +909,7 @@
 
 WebURLLoaderImpl::WebURLLoaderImpl(
     ResourceDispatcher* resource_dispatcher,
-    scoped_ptr<blink::WebTaskRunner> web_task_runner)
+    std::unique_ptr<blink::WebTaskRunner> web_task_runner)
     : context_(
           new Context(this, resource_dispatcher, std::move(web_task_runner))) {}
 
@@ -1131,7 +1134,7 @@
     blink::WebTaskRunner* loading_task_runner) {
   // There's no guarantee on the lifetime of |loading_task_runner| so we take a
   // copy.
-  context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone()));
+  context_->SetWebTaskRunner(base::WrapUnique(loading_task_runner->clone()));
 }
 
 // This function is implemented here because it uses net functions. it is
diff --git a/content/child/web_url_loader_impl.h b/content/child/web_url_loader_impl.h
index 804d1b0..d1f4f8106 100644
--- a/content/child/web_url_loader_impl.h
+++ b/content/child/web_url_loader_impl.h
@@ -39,7 +39,7 @@
 
   // Takes ownership of |web_task_runner|.
   WebURLLoaderImpl(ResourceDispatcher* resource_dispatcher,
-                   scoped_ptr<blink::WebTaskRunner> web_task_runner);
+                   std::unique_ptr<blink::WebTaskRunner> web_task_runner);
   ~WebURLLoaderImpl() override;
 
   static void PopulateURLResponse(const GURL& url,
diff --git a/content/child/web_url_loader_impl_unittest.cc b/content/child/web_url_loader_impl_unittest.cc
index a85dd04..531ee51 100644
--- a/content/child/web_url_loader_impl_unittest.cc
+++ b/content/child/web_url_loader_impl_unittest.cc
@@ -6,11 +6,13 @@
 
 #include <stdint.h>
 #include <string.h>
+
 #include <utility>
 #include <vector>
 
 #include "base/command_line.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
@@ -66,7 +68,7 @@
 
   int StartAsync(const RequestInfo& request_info,
                  ResourceRequestBody* request_body,
-                 scoped_ptr<RequestPeer> peer) override {
+                 std::unique_ptr<RequestPeer> peer) override {
     EXPECT_FALSE(peer_);
     peer_ = std::move(peer);
     url_ = request_info.url;
@@ -87,7 +89,7 @@
   const GURL& stream_url() { return stream_url_; }
 
  private:
-  scoped_ptr<RequestPeer> peer_;
+  std::unique_ptr<RequestPeer> peer_;
   bool canceled_;
   GURL url_;
   GURL stream_url_;
@@ -101,7 +103,7 @@
                          scoped_refptr<scheduler::TaskQueue> task_runner)
       : loader_(new WebURLLoaderImpl(
             dispatcher,
-            make_scoped_ptr(new scheduler::WebTaskRunnerImpl(task_runner)))),
+            base::WrapUnique(new scheduler::WebTaskRunnerImpl(task_runner)))),
         delete_on_receive_redirect_(false),
         delete_on_receive_response_(false),
         delete_on_receive_data_(false),
@@ -222,7 +224,7 @@
   const blink::WebURLResponse& response() const { return response_; }
 
  private:
-  scoped_ptr<WebURLLoaderImpl> loader_;
+  std::unique_ptr<WebURLLoaderImpl> loader_;
 
   bool delete_on_receive_redirect_;
   bool delete_on_receive_response_;
@@ -246,7 +248,7 @@
       : worker_scheduler_(scheduler::WorkerScheduler::Create(
             scheduler::SchedulerTqmDelegateImpl::Create(
                 &message_loop_,
-                make_scoped_ptr(new base::DefaultTickClock())))) {
+                base::WrapUnique(new base::DefaultTickClock())))) {
     worker_scheduler_->Init();
     client_.reset(new TestWebURLLoaderClient(
         &dispatcher_, worker_scheduler_->DefaultTaskRunner()));
@@ -283,7 +285,7 @@
   // Assumes it is called only once for a request.
   void DoReceiveData() {
     EXPECT_EQ("", client()->received_data());
-    peer()->OnReceivedData(make_scoped_ptr(new FixedReceivedData(
+    peer()->OnReceivedData(base::WrapUnique(new FixedReceivedData(
         kTestData, strlen(kTestData), strlen(kTestData))));
     EXPECT_EQ(kTestData, client()->received_data());
   }
@@ -316,7 +318,7 @@
   }
 
   void DoReceiveDataFtp() {
-    peer()->OnReceivedData(make_scoped_ptr(new FixedReceivedData(
+    peer()->OnReceivedData(base::WrapUnique(new FixedReceivedData(
         kFtpDirListing, strlen(kFtpDirListing), strlen(kFtpDirListing))));
     // The FTP delegate should modify the data the client sees.
     EXPECT_NE(kFtpDirListing, client()->received_data());
@@ -331,9 +333,9 @@
   base::MessageLoop message_loop_;
   // WorkerScheduler is needed because WebURLLoaderImpl needs a
   // scheduler::TaskQueue.
-  scoped_ptr<scheduler::WorkerScheduler> worker_scheduler_;
+  std::unique_ptr<scheduler::WorkerScheduler> worker_scheduler_;
   TestResourceDispatcher dispatcher_;
-  scoped_ptr<TestWebURLLoaderClient> client_;
+  std::unique_ptr<TestWebURLLoaderClient> client_;
 };
 
 TEST_F(WebURLLoaderImplTest, Success) {
@@ -567,7 +569,7 @@
   request.setURL(kNavigationURL);
   request.setFrameType(blink::WebURLRequest::FrameTypeTopLevel);
   request.setRequestContext(blink::WebURLRequest::RequestContextFrame);
-  scoped_ptr<StreamOverrideParameters> stream_override(
+  std::unique_ptr<StreamOverrideParameters> stream_override(
       new StreamOverrideParameters());
   stream_override->stream_url = kStreamURL;
   stream_override->response.mime_type = kMimeType;
diff --git a/content/child/webfallbackthemeengine_impl.h b/content/child/webfallbackthemeengine_impl.h
index aa100d6..b0a4bcec 100644
--- a/content/child/webfallbackthemeengine_impl.h
+++ b/content/child/webfallbackthemeengine_impl.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_
 #define CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "third_party/WebKit/public/platform/WebFallbackThemeEngine.h"
 
 namespace content {
@@ -29,7 +30,7 @@
 
  private:
   class WebFallbackNativeTheme;
-  scoped_ptr<WebFallbackNativeTheme> theme_;
+  std::unique_ptr<WebFallbackNativeTheme> theme_;
 
   DISALLOW_COPY_AND_ASSIGN(WebFallbackThemeEngineImpl);
 };
diff --git a/content/child/webmessageportchannel_impl.cc b/content/child/webmessageportchannel_impl.cc
index 623dbb9..66a66ba1 100644
--- a/content/child/webmessageportchannel_impl.cc
+++ b/content/child/webmessageportchannel_impl.cc
@@ -87,7 +87,7 @@
 // static
 std::vector<TransferredMessagePort>
 WebMessagePortChannelImpl::ExtractMessagePortIDs(
-    scoped_ptr<WebMessagePortChannelArray> channels) {
+    std::unique_ptr<WebMessagePortChannelArray> channels) {
   std::vector<TransferredMessagePort> message_ports;
   if (channels)
     message_ports = ExtractMessagePortIDs(*channels);
@@ -117,7 +117,7 @@
 // static
 std::vector<TransferredMessagePort>
 WebMessagePortChannelImpl::ExtractMessagePortIDsWithoutQueueing(
-    scoped_ptr<WebMessagePortChannelArray> channels) {
+    std::unique_ptr<WebMessagePortChannelArray> channels) {
   if (!channels)
     return std::vector<TransferredMessagePort>();
 
@@ -175,15 +175,15 @@
     const WebString& message_as_string,
     WebMessagePortChannelArray* channels_ptr) {
   MessagePortMessage message(message_as_string);
-  scoped_ptr<WebMessagePortChannelArray> channels(channels_ptr);
+  std::unique_ptr<WebMessagePortChannelArray> channels(channels_ptr);
   if (send_messages_as_values_) {
     blink::WebSerializedScriptValue serialized_value =
         blink::WebSerializedScriptValue::fromString(message_as_string);
     v8::Local<v8::Value> v8_value = serialized_value.deserialize();
-    scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
+    std::unique_ptr<V8ValueConverter> converter(V8ValueConverter::create());
     converter->SetDateAllowed(true);
     converter->SetRegExpAllowed(true);
-    scoped_ptr<base::Value> message_as_value(converter->FromV8Value(
+    std::unique_ptr<base::Value> message_as_value(converter->FromV8Value(
         v8_value, v8::Isolate::GetCurrent()->GetCurrentContext()));
     message = MessagePortMessage(std::move(message_as_value));
   }
@@ -198,7 +198,7 @@
 
 void WebMessagePortChannelImpl::SendPostMessage(
     const MessagePortMessage& message,
-    scoped_ptr<WebMessagePortChannelArray> channels) {
+    std::unique_ptr<WebMessagePortChannelArray> channels) {
   IPC::Message* msg = new MessagePortHostMsg_PostMessage(
       message_port_id_, message, ExtractMessagePortIDs(std::move(channels)));
   Send(msg);
@@ -217,7 +217,7 @@
     v8::HandleScope handle_scope(client_->scriptIsolate());
     v8::Context::Scope context_scope(
         client_->scriptContextForMessageConversion());
-    scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
+    std::unique_ptr<V8ValueConverter> converter(V8ValueConverter::create());
     converter->SetDateAllowed(true);
     converter->SetRegExpAllowed(true);
     v8::Local<v8::Value> v8_value = converter->ToV8Value(
diff --git a/content/child/webmessageportchannel_impl.h b/content/child/webmessageportchannel_impl.h
index b8ea7fd..939186e 100644
--- a/content/child/webmessageportchannel_impl.h
+++ b/content/child/webmessageportchannel_impl.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
 #define CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
 
+#include <memory>
 #include <queue>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "base/synchronization/lock.h"
 #include "content/public/common/message_port_types.h"
@@ -49,7 +49,7 @@
   // Extracts port IDs for passing on to the browser process, and queues any
   // received messages.
   static std::vector<TransferredMessagePort> ExtractMessagePortIDs(
-      scoped_ptr<blink::WebMessagePortChannelArray> channels);
+      std::unique_ptr<blink::WebMessagePortChannelArray> channels);
 
   // Extracts port IDs for passing on to the browser process, and queues any
   // received messages.
@@ -63,7 +63,7 @@
   // does not share ordering guarentees with regular IPC.
   static std::vector<TransferredMessagePort>
   ExtractMessagePortIDsWithoutQueueing(
-      scoped_ptr<blink::WebMessagePortChannelArray> channels);
+      std::unique_ptr<blink::WebMessagePortChannelArray> channels);
 
   // Creates WebMessagePortChannelImpl instances for port IDs passed in from the
   // browser process.
@@ -93,8 +93,9 @@
   void Init();
   void Entangle(scoped_refptr<WebMessagePortChannelImpl> channel);
   void Send(IPC::Message* message);
-  void SendPostMessage(const MessagePortMessage& message,
-                       scoped_ptr<blink::WebMessagePortChannelArray> channels);
+  void SendPostMessage(
+      const MessagePortMessage& message,
+      std::unique_ptr<blink::WebMessagePortChannelArray> channels);
 
   // IPC::Listener implementation.
   bool OnMessageReceived(const IPC::Message& message) override;
diff --git a/content/child/worker_thread_registry.cc b/content/child/worker_thread_registry.cc
index 274987b..8c52ea00 100644
--- a/content/child/worker_thread_registry.cc
+++ b/content/child/worker_thread_registry.cc
@@ -4,11 +4,12 @@
 
 #include "content/child/worker_thread_registry.h"
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/lazy_instance.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
diff --git a/content/common/android/address_parser_internal.cc b/content/common/android/address_parser_internal.cc
index 4f114a3f..9892bd8 100644
--- a/content/common/android/address_parser_internal.cc
+++ b/content/common/android/address_parser_internal.cc
@@ -77,6 +77,8 @@
   DCHECK(begin <= end);
 }
 
+Word::Word(const Word& other) = default;
+
 HouseNumberParser::HouseNumberParser() {
 }
 
diff --git a/content/common/android/address_parser_internal.h b/content/common/android/address_parser_internal.h
index 5defd08..60c1483 100644
--- a/content/common/android/address_parser_internal.h
+++ b/content/common/android/address_parser_internal.h
@@ -28,6 +28,7 @@
   Word();
   Word(const base::string16::const_iterator& begin,
        const base::string16::const_iterator& end);
+  Word(const Word& other);
 };
 
 // Exposed for tests.
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 0ee5ac3..7d1f562 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -884,6 +884,10 @@
 // only be sent to the main frame.
 IPC_MESSAGE_ROUTED0(FrameMsg_EnableViewSourceMode)
 
+// Tells the frame to suppress any further modal dialogs. This ensures that no
+// ScopedPageLoadDeferrer is on the stack for SwapOut.
+IPC_MESSAGE_ROUTED0(FrameMsg_SuppressFurtherDialogs)
+
 // -----------------------------------------------------------------------------
 // Messages sent from the renderer to the browser.
 
@@ -1067,14 +1071,6 @@
                             content::ThreeDAPIType /* requester */,
                             bool /* blocked */)
 
-// Sent by the renderer process to indicate that a context was lost by
-// client 3D content (Pepper 3D, WebGL) running on the page at the
-// given URL.
-IPC_MESSAGE_CONTROL3(FrameHostMsg_DidLose3DContext,
-                     GURL /* top_origin_url */,
-                     content::ThreeDAPIType /* context_type */,
-                     int /* arb_robustness_status_code */)
-
 #if defined(ENABLE_PLUGINS)
 // Notification sent from a renderer to the browser that a Pepper plugin
 // instance is created in the DOM.
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 3d30266f..4b2f6f6a 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -401,13 +401,14 @@
       command_decoder->GetContextGroup()->texture_manager();
 
   std::vector<media::PictureBuffer> buffers;
-  std::vector<scoped_refptr<gpu::gles2::TextureRef> > textures;
+  std::vector<std::vector<scoped_refptr<gpu::gles2::TextureRef>>> textures;
   for (uint32_t i = 0; i < buffer_ids.size(); ++i) {
     if (buffer_ids[i] < 0) {
       DLOG(ERROR) << "Buffer id " << buffer_ids[i] << " out of range";
       NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
       return;
     }
+    std::vector<scoped_refptr<gpu::gles2::TextureRef>> current_textures;
     media::PictureBuffer::TextureIds buffer_texture_ids = texture_ids[i];
     media::PictureBuffer::TextureIds service_ids;
     if (buffer_texture_ids.size() != textures_per_buffer_) {
@@ -463,8 +464,9 @@
         }
       }
       service_ids.push_back(texture_ref->service_id());
-      textures.push_back(texture_ref);
+      current_textures.push_back(texture_ref);
     }
+    textures.push_back(current_textures);
     buffers.push_back(media::PictureBuffer(buffer_ids[i], texture_dimensions_,
                                            service_ids, buffer_texture_ids));
   }
@@ -505,17 +507,17 @@
     const media::Picture& picture) {
   DCHECK(child_task_runner_->BelongsToCurrentThread());
   DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
-  std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>>::iterator it;
-  it = uncleared_textures_.find(picture.picture_buffer_id());
+  auto it = uncleared_textures_.find(picture.picture_buffer_id());
   if (it == uncleared_textures_.end())
     return;  // the texture has been cleared
 
-  scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second;
-  GLenum target = texture_ref->texture()->target();
-  gpu::gles2::TextureManager* texture_manager =
-      stub_->decoder()->GetContextGroup()->texture_manager();
-  DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
-  texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
+  for (auto texture_ref : it->second) {
+    GLenum target = texture_ref->texture()->target();
+    gpu::gles2::TextureManager* texture_manager =
+        stub_->decoder()->GetContextGroup()->texture_manager();
+    DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
+    texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
+  }
   uncleared_textures_.erase(it);
 }
 
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h
index 47859d95..e090b59a 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h
@@ -156,8 +156,10 @@
   // |uncleared_textures_| is only accessed from the child thread.
   base::Lock debug_uncleared_textures_lock_;
 
-  // A map from picture buffer ID to TextureRef that have not been cleared.
-  std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_;
+  // A map from picture buffer ID to set of TextureRefs that have not been
+  // cleared.
+  std::map<int32_t, std::vector<scoped_refptr<gpu::gles2::TextureRef>>>
+      uncleared_textures_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
 };
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
index b3bde4491..2a19428b 100644
--- a/content/common/gpu/media/rendering_helper.cc
+++ b/content/common/gpu/media/rendering_helper.cc
@@ -160,6 +160,9 @@
     : rendering_fps(0), warm_up_iterations(0), render_as_thumbnails(false) {
 }
 
+RenderingHelperParams::RenderingHelperParams(
+    const RenderingHelperParams& other) = default;
+
 RenderingHelperParams::~RenderingHelperParams() {}
 
 VideoFrameTexture::VideoFrameTexture(uint32_t texture_target,
@@ -179,6 +182,9 @@
     : is_flushing(false), frames_to_drop(0) {
 }
 
+RenderingHelper::RenderedVideo::RenderedVideo(const RenderedVideo& other) =
+    default;
+
 RenderingHelper::RenderedVideo::~RenderedVideo() {
 }
 
diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h
index ad178f5f..250d382 100644
--- a/content/common/gpu/media/rendering_helper.h
+++ b/content/common/gpu/media/rendering_helper.h
@@ -54,6 +54,7 @@
 
 struct RenderingHelperParams {
   RenderingHelperParams();
+  RenderingHelperParams(const RenderingHelperParams& other);
   ~RenderingHelperParams();
 
   // The rendering FPS.
@@ -162,6 +163,7 @@
     std::queue<scoped_refptr<VideoFrameTexture> > pending_frames;
 
     RenderedVideo();
+    RenderedVideo(const RenderedVideo& other);
     ~RenderedVideo();
   };
 
diff --git a/content/common/gpu/media/vt_video_decode_accelerator_mac.cc b/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
index 3c706e9..1571e834 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
@@ -250,6 +250,8 @@
 VTVideoDecodeAccelerator::Task::Task(TaskType type) : type(type) {
 }
 
+VTVideoDecodeAccelerator::Task::Task(const Task& other) = default;
+
 VTVideoDecodeAccelerator::Task::~Task() {
 }
 
diff --git a/content/common/gpu/media/vt_video_decode_accelerator_mac.h b/content/common/gpu/media/vt_video_decode_accelerator_mac.h
index e3c0973..22fc8b1 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator_mac.h
+++ b/content/common/gpu/media/vt_video_decode_accelerator_mac.h
@@ -118,6 +118,7 @@
 
   struct Task {
     Task(TaskType type);
+    Task(const Task& other);
     ~Task();
 
     TaskType type;
diff --git a/content/common/text_input_state.cc b/content/common/text_input_state.cc
index f65442a4..bf6932b 100644
--- a/content/common/text_input_state.cc
+++ b/content/common/text_input_state.cc
@@ -13,4 +13,6 @@
       can_compose_inline(true),
       show_ime_if_needed(false) {}
 
+TextInputState::TextInputState(const TextInputState& other) = default;
+
 }  //  namespace content
diff --git a/content/common/text_input_state.h b/content/common/text_input_state.h
index 9b9c92b..0be6069 100644
--- a/content/common/text_input_state.h
+++ b/content/common/text_input_state.h
@@ -15,6 +15,7 @@
 
 struct CONTENT_EXPORT TextInputState {
   TextInputState();
+  TextInputState(const TextInputState& other);
 
   // Type of the input field.
   ui::TextInputType type;
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index a24a408..88290b4 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -710,11 +710,6 @@
                     int /* request_id */,
                     std::vector<base::FilePath> /* files_in_directory */)
 
-// Tells the renderer to suppress any further modal dialogs until it receives a
-// corresponding ViewMsg_SwapOut message.  This ensures that no
-// PageGroupLoadDeferrer is on the stack for SwapOut.
-IPC_MESSAGE_ROUTED0(ViewMsg_SuppressDialogsUntilSwapOut)
-
 // Instructs the renderer to close the current page, including running the
 // onunload event handler.
 //
diff --git a/content/public/browser/speech_recognition_session_config.cc b/content/public/browser/speech_recognition_session_config.cc
index 7bfdf5a..74392a1 100644
--- a/content/public/browser/speech_recognition_session_config.cc
+++ b/content/public/browser/speech_recognition_session_config.cc
@@ -18,6 +18,9 @@
       max_hypotheses(kDefaultMaxHypotheses) {
 }
 
+SpeechRecognitionSessionConfig::SpeechRecognitionSessionConfig(
+    const SpeechRecognitionSessionConfig& other) = default;
+
 SpeechRecognitionSessionConfig::~SpeechRecognitionSessionConfig() {
 }
 
diff --git a/content/public/browser/speech_recognition_session_config.h b/content/public/browser/speech_recognition_session_config.h
index 964f94f..da2b011 100644
--- a/content/public/browser/speech_recognition_session_config.h
+++ b/content/public/browser/speech_recognition_session_config.h
@@ -24,6 +24,7 @@
 // Configuration params for creating a new speech recognition session.
 struct CONTENT_EXPORT SpeechRecognitionSessionConfig {
   SpeechRecognitionSessionConfig();
+  SpeechRecognitionSessionConfig(const SpeechRecognitionSessionConfig& other);
   ~SpeechRecognitionSessionConfig();
 
   // TODO(hans): The legacy API is dead; remove this flag (crbug.com/223198).
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 920694e..d904a830 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -81,6 +81,11 @@
 const base::Feature kWebFontsIntervention{"WebFontsIntervention",
                                           base::FEATURE_DISABLED_BY_DEFAULT};
 
+// Makes WebRTC use ECDSA certs by default (i.e., when no cert type was
+// specified in JS).
+const base::Feature kWebRtcEcdsaDefault {"WebRTC-EnableWebRtcEcdsa",
+                                         base::FEATURE_DISABLED_BY_DEFAULT};
+
 // Controls whether the WebUSB API is enabled:
 // https://wicg.github.io/webusb
 const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 72c93b3..14205702 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -30,6 +30,7 @@
 CONTENT_EXPORT extern const base::Feature kStaleWhileRevalidate;
 CONTENT_EXPORT extern const base::Feature kTokenBinding;
 CONTENT_EXPORT extern const base::Feature kWebFontsIntervention;
+CONTENT_EXPORT extern const base::Feature kWebRtcEcdsaDefault;
 CONTENT_EXPORT extern const base::Feature kWebUsb;
 
 #if defined(OS_ANDROID)
diff --git a/content/public/common/platform_notification_data.cc b/content/public/common/platform_notification_data.cc
index 8c4d131..904015a 100644
--- a/content/public/common/platform_notification_data.cc
+++ b/content/public/common/platform_notification_data.cc
@@ -8,6 +8,9 @@
 
 PlatformNotificationAction::PlatformNotificationAction() {}
 
+PlatformNotificationAction::PlatformNotificationAction(
+    const PlatformNotificationAction& other) = default;
+
 PlatformNotificationAction::~PlatformNotificationAction() {}
 
 PlatformNotificationData::PlatformNotificationData() {}
diff --git a/content/public/common/platform_notification_data.h b/content/public/common/platform_notification_data.h
index d24c44f..97f72349 100644
--- a/content/public/common/platform_notification_data.h
+++ b/content/public/common/platform_notification_data.h
@@ -27,6 +27,7 @@
 // WebNotificationAction.
 struct CONTENT_EXPORT PlatformNotificationAction {
   PlatformNotificationAction();
+  PlatformNotificationAction(const PlatformNotificationAction& other);
   ~PlatformNotificationAction();
 
   // Type of the action (button or text input).
diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h
index 762ab12..64602eea 100644
--- a/content/public/test/layouttest_support.h
+++ b/content/public/test/layouttest_support.h
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
 #include "cc/layers/texture_layer.h"
 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationType.h"
 
diff --git a/content/renderer/accessibility/renderer_accessibility_browsertest.cc b/content/renderer/accessibility/renderer_accessibility_browsertest.cc
index ed8b4eb..1956652 100644
--- a/content/renderer/accessibility/renderer_accessibility_browsertest.cc
+++ b/content/renderer/accessibility/renderer_accessibility_browsertest.cc
@@ -116,7 +116,7 @@
   LoadHTML(html.c_str());
 
   // Creating a RendererAccessibility should sent the tree to the browser.
-  scoped_ptr<TestRendererAccessibility> accessibility(
+  std::unique_ptr<TestRendererAccessibility> accessibility(
       new TestRendererAccessibility(frame()));
   accessibility->SendPendingAccessibilityEvents();
   EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser());
@@ -181,7 +181,7 @@
       "</body>";
   LoadHTML(html.c_str());
 
-  scoped_ptr<TestRendererAccessibility> accessibility(
+  std::unique_ptr<TestRendererAccessibility> accessibility(
       new TestRendererAccessibility(frame()));
   accessibility->SendPendingAccessibilityEvents();
   EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser());
@@ -233,7 +233,7 @@
       "</body>";
   LoadHTML(html.c_str());
 
-  scoped_ptr<TestRendererAccessibility> accessibility(
+  std::unique_ptr<TestRendererAccessibility> accessibility(
       new TestRendererAccessibility(frame()));
   accessibility->SendPendingAccessibilityEvents();
   EXPECT_EQ(3, CountAccessibilityNodesSentToBrowser());
@@ -277,7 +277,7 @@
       "</body>";
   LoadHTML(html.c_str());
 
-  scoped_ptr<TestRendererAccessibility> accessibility(
+  std::unique_ptr<TestRendererAccessibility> accessibility(
       new TestRendererAccessibility(frame()));
   accessibility->SendPendingAccessibilityEvents();
   EXPECT_EQ(7, CountAccessibilityNodesSentToBrowser());
diff --git a/content/renderer/android/email_detector.cc b/content/renderer/android/email_detector.cc
index 9508679..564f341 100644
--- a/content/renderer/android/email_detector.cc
+++ b/content/renderer/android/email_detector.cc
@@ -4,8 +4,9 @@
 
 #include "content/renderer/android/email_detector.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/public/renderer/android_content_detection_prefixes.h"
 #include "net/base/escape.h"
@@ -52,11 +53,8 @@
   icu::UnicodeString pattern(kEmailRegex);
   icu::UnicodeString input(utf16_input.data(), utf16_input.length());
   UErrorCode status = U_ZERO_ERROR;
-  scoped_ptr<icu::RegexMatcher> matcher(
-      new icu::RegexMatcher(pattern,
-                            input,
-                            UREGEX_CASE_INSENSITIVE,
-                            status));
+  std::unique_ptr<icu::RegexMatcher> matcher(
+      new icu::RegexMatcher(pattern, input, UREGEX_CASE_INSENSITIVE, status));
   if (matcher->find()) {
     *start_pos = matcher->start(status);
     DCHECK(U_SUCCESS(status));
diff --git a/content/renderer/android/synchronous_compositor_factory.h b/content/renderer/android/synchronous_compositor_factory.h
index 91185ffb..d9bc10d2 100644
--- a/content/renderer/android/synchronous_compositor_factory.h
+++ b/content/renderer/android/synchronous_compositor_factory.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "gpu/config/gpu_info.h"
 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
 
@@ -48,7 +49,7 @@
 
   virtual scoped_refptr<base::SingleThreadTaskRunner>
   GetCompositorTaskRunner() = 0;
-  virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
+  virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface(
       int routing_id,
       uint32_t output_surface_id,
       const scoped_refptr<FrameSwapMessageQueue>& frame_swap_message_queue,
@@ -60,7 +61,7 @@
   virtual SynchronousInputHandlerProxyClient*
   GetSynchronousInputHandlerProxyClient() = 0;
 
-  virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
+  virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
       int routing_id) = 0;
 
  protected:
diff --git a/content/renderer/android/synchronous_compositor_filter.cc b/content/renderer/android/synchronous_compositor_filter.cc
index ae42cc3..94e800bf 100644
--- a/content/renderer/android/synchronous_compositor_filter.cc
+++ b/content/renderer/android/synchronous_compositor_filter.cc
@@ -186,9 +186,10 @@
   Entry& entry = entry_map_[routing_id];
   if (filter_ready_ && entry.IsReady()) {
     DCHECK(!sync_compositor_map_.contains(routing_id));
-    scoped_ptr<SynchronousCompositorProxy> proxy(new SynchronousCompositorProxy(
-        routing_id, this, entry.begin_frame_source,
-        entry.synchronous_input_handler_proxy, &input_handler_));
+    std::unique_ptr<SynchronousCompositorProxy> proxy(
+        new SynchronousCompositorProxy(
+            routing_id, this, entry.begin_frame_source,
+            entry.synchronous_input_handler_proxy, &input_handler_));
     if (entry.output_surface)
       proxy->SetOutputSurface(entry.output_surface);
     sync_compositor_map_.add(routing_id, std::move(proxy));
diff --git a/content/renderer/android/synchronous_compositor_filter.h b/content/renderer/android/synchronous_compositor_filter.h
index dc31ecff0..070f5a2c 100644
--- a/content/renderer/android/synchronous_compositor_filter.h
+++ b/content/renderer/android/synchronous_compositor_filter.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "content/renderer/android/synchronous_compositor_registry.h"
 #include "content/renderer/input/input_handler_manager_client.h"
@@ -100,7 +101,7 @@
   // Compositor thread-only fields.
   using SyncCompositorMap =
       base::ScopedPtrHashMap<int /* routing_id */,
-                             scoped_ptr<SynchronousCompositorProxy>>;
+                             std::unique_ptr<SynchronousCompositorProxy>>;
   SyncCompositorMap sync_compositor_map_;
   Handler input_handler_;
 
diff --git a/content/renderer/android/synchronous_compositor_output_surface.cc b/content/renderer/android/synchronous_compositor_output_surface.cc
index 567de40..9a9660f 100644
--- a/content/renderer/android/synchronous_compositor_output_surface.cc
+++ b/content/renderer/android/synchronous_compositor_output_surface.cc
@@ -70,7 +70,7 @@
     : cc::OutputSurface(
           context_provider,
           worker_context_provider,
-          scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareDevice(this))),
+          std::unique_ptr<cc::SoftwareOutputDevice>(new SoftwareDevice(this))),
       routing_id_(routing_id),
       output_surface_id_(output_surface_id),
       registry_(registry),
@@ -259,9 +259,9 @@
 }
 
 void SynchronousCompositorOutputSurface::GetMessagesToDeliver(
-    std::vector<scoped_ptr<IPC::Message>>* messages) {
+    std::vector<std::unique_ptr<IPC::Message>>* messages) {
   DCHECK(CalledOnValidThread());
-  scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
+  std::unique_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
       frame_swap_message_queue_->AcquireSendMessageScope();
   frame_swap_message_queue_->DrainMessages(messages);
 }
diff --git a/content/renderer/android/synchronous_compositor_output_surface.h b/content/renderer/android/synchronous_compositor_output_surface.h
index 97f4bf9..01315b8 100644
--- a/content/renderer/android/synchronous_compositor_output_surface.h
+++ b/content/renderer/android/synchronous_compositor_output_surface.h
@@ -7,6 +7,7 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/callback.h"
@@ -14,7 +15,6 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/managed_memory_policy.h"
@@ -90,7 +90,8 @@
   void DemandDrawSw(SkCanvas* canvas);
   void SetMemoryPolicy(size_t bytes_limit);
   void SetTreeActivationCallback(const base::Closure& callback);
-  void GetMessagesToDeliver(std::vector<scoped_ptr<IPC::Message>>* messages);
+  void GetMessagesToDeliver(
+      std::vector<std::unique_ptr<IPC::Message>>* messages);
 
   size_t GetMemoryPolicy() const {
     return memory_policy_.bytes_limit_when_visible;
diff --git a/content/renderer/android/synchronous_compositor_proxy.cc b/content/renderer/android/synchronous_compositor_proxy.cc
index dc9c00a..4b1eaca 100644
--- a/content/renderer/android/synchronous_compositor_proxy.cc
+++ b/content/renderer/android/synchronous_compositor_proxy.cc
@@ -128,7 +128,7 @@
 
 void SynchronousCompositorProxy::DeliverMessages() {
   DCHECK(output_surface_);
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
   output_surface_->GetMessagesToDeliver(&messages);
   for (auto& msg : messages) {
     Send(msg.release());
diff --git a/content/renderer/android/synchronous_compositor_proxy.h b/content/renderer/android/synchronous_compositor_proxy.h
index 8d89833..da1718c6 100644
--- a/content/renderer/android/synchronous_compositor_proxy.h
+++ b/content/renderer/android/synchronous_compositor_proxy.h
@@ -141,7 +141,7 @@
 
   // From browser.
   size_t bytes_limit_;
-  scoped_ptr<SharedMemoryWithSize> software_draw_shm_;
+  std::unique_ptr<SharedMemoryWithSize> software_draw_shm_;
 
   // To browser.
   mutable uint32_t version_;  // Mustable so PopulateCommonParams can be const.
diff --git a/content/renderer/bluetooth/bluetooth_dispatcher.cc b/content/renderer/bluetooth/bluetooth_dispatcher.cc
index 37805454..a57718c 100644
--- a/content/renderer/bluetooth/bluetooth_dispatcher.cc
+++ b/content/renderer/bluetooth/bluetooth_dispatcher.cc
@@ -11,7 +11,6 @@
 
 #include "base/lazy_instance.h"
 #include "base/memory/ptr_util.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/child/thread_safe_sender.h"
@@ -50,7 +49,7 @@
 
   blink::WebString device_id;
   blink::WebString service_uuid;
-  scoped_ptr<blink::WebBluetoothGetPrimaryServiceCallbacks> callbacks;
+  std::unique_ptr<blink::WebBluetoothGetPrimaryServiceCallbacks> callbacks;
 };
 
 struct BluetoothCharacteristicRequest {
@@ -65,7 +64,7 @@
 
   blink::WebString service_instance_id;
   blink::WebString characteristic_uuid;
-  scoped_ptr<blink::WebBluetoothGetCharacteristicCallbacks> callbacks;
+  std::unique_ptr<blink::WebBluetoothGetCharacteristicCallbacks> callbacks;
 };
 
 struct BluetoothCharacteristicsRequest {
@@ -76,7 +75,7 @@
   ~BluetoothCharacteristicsRequest() {}
 
   blink::WebString service_instance_id;
-  scoped_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks;
+  std::unique_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks;
 };
 
 // Struct that holds a pending Start/StopNotifications request.
@@ -103,7 +102,7 @@
   // characteristicObjectRemoved will null any pointers to the object
   // and queue a stop notifications request if necessary.
   blink::WebBluetoothRemoteGATTCharacteristic* characteristic;
-  scoped_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks;
+  std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks;
   NotificationsRequestType type;
 };
 
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.cc b/content/renderer/bluetooth/web_bluetooth_impl.cc
index 7665e80..01da671f 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.cc
+++ b/content/renderer/bluetooth/web_bluetooth_impl.cc
@@ -4,6 +4,7 @@
 
 #include "content/renderer/bluetooth/web_bluetooth_impl.h"
 
+#include "base/memory/ptr_util.h"
 #include "content/child/mojo/type_converters.h"
 #include "content/child/thread_safe_sender.h"
 #include "content/public/common/service_registry.h"
@@ -79,7 +80,7 @@
       mojo::Array<uint8_t>::From(value),
       base::Bind(&WebBluetoothImpl::OnWriteValueComplete,
                  base::Unretained(this), value,
-                 base::Passed(make_scoped_ptr(callbacks))));
+                 base::Passed(base::WrapUnique(callbacks))));
 }
 
 void WebBluetoothImpl::startNotifications(
@@ -114,7 +115,7 @@
 
 void WebBluetoothImpl::OnWriteValueComplete(
     const blink::WebVector<uint8_t>& value,
-    scoped_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
+    std::unique_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
     blink::mojom::WebBluetoothError error) {
   if (error == blink::mojom::WebBluetoothError::SUCCESS) {
     callbacks->onSuccess(value);
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.h b/content/renderer/bluetooth/web_bluetooth_impl.h
index 09fb5e0..682e2a3 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.h
+++ b/content/renderer/bluetooth/web_bluetooth_impl.h
@@ -80,7 +80,7 @@
  private:
   void OnWriteValueComplete(
       const blink::WebVector<uint8_t>& value,
-      scoped_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
+      std::unique_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
       blink::mojom::WebBluetoothError error);
 
   BluetoothDispatcher* GetDispatcher();
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index 3808e0f7..52156ba 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -7,8 +7,9 @@
 
 #include "third_party/WebKit/public/web/WebPlugin.h"
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "content/renderer/mouse_lock_dispatcher.h"
diff --git a/content/renderer/browser_plugin/browser_plugin_manager.cc b/content/renderer/browser_plugin/browser_plugin_manager.cc
index b6dbd2e9..1982073 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager.cc
+++ b/content/renderer/browser_plugin/browser_plugin_manager.cc
@@ -3,7 +3,9 @@
 // found in the LICENSE file.
 
 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
-#include "base/memory/scoped_ptr.h"
+
+#include <memory>
+
 #include "content/common/browser_plugin/browser_plugin_constants.h"
 #include "content/common/browser_plugin/browser_plugin_messages.h"
 #include "content/common/frame_messages.h"
diff --git a/content/renderer/browser_render_view_browsertest.cc b/content/renderer/browser_render_view_browsertest.cc
index 448120c..90f190e 100644
--- a/content/renderer/browser_render_view_browsertest.cc
+++ b/content/renderer/browser_render_view_browsertest.cc
@@ -84,7 +84,7 @@
   net::HttpCache* cache(
       getter->GetURLRequestContext()->http_transaction_factory()->GetCache());
   DCHECK(cache);
-  scoped_ptr<net::FailingHttpTransactionFactory> factory(
+  std::unique_ptr<net::FailingHttpTransactionFactory> factory(
       new net::FailingHttpTransactionFactory(cache->GetSession(), error));
   // Throw away old version; since this is a browser test, there is no
   // need to restore the old state.
@@ -100,7 +100,7 @@
 
 // Must be called on IO thread.  The callback will be called on
 // completion of cache clearing on the UI thread.
-void BackendClearCache(scoped_ptr<disk_cache::Backend*> backend,
+void BackendClearCache(std::unique_ptr<disk_cache::Backend*> backend,
                        const base::Closure& callback,
                        int rv) {
   DCHECK(*backend);
@@ -117,7 +117,7 @@
   net::HttpCache* cache(
       getter->GetURLRequestContext()->http_transaction_factory()->GetCache());
   DCHECK(cache);
-  scoped_ptr<disk_cache::Backend*> backend(new disk_cache::Backend*);
+  std::unique_ptr<disk_cache::Backend*> backend(new disk_cache::Backend*);
   *backend = NULL;
   disk_cache::Backend** backend_ptr = backend.get();
 
diff --git a/content/renderer/cache_storage/cache_storage_dispatcher.cc b/content/renderer/cache_storage/cache_storage_dispatcher.cc
index 25b5f867..5bc3521d 100644
--- a/content/renderer/cache_storage/cache_storage_dispatcher.cc
+++ b/content/renderer/cache_storage/cache_storage_dispatcher.cc
@@ -296,7 +296,7 @@
                                                        int request_id,
                                                        int cache_id) {
   DCHECK_EQ(thread_id, CurrentWorkerId());
-  scoped_ptr<WebCache> web_cache(
+  std::unique_ptr<WebCache> web_cache(
       new WebCache(weak_factory_.GetWeakPtr(), cache_id));
   web_caches_.AddWithID(web_cache.get(), cache_id);
   UMA_HISTOGRAM_TIMES("ServiceWorkerCache.CacheStorage.Open",
diff --git a/content/renderer/child_frame_compositing_helper.h b/content/renderer/child_frame_compositing_helper.h
index fda84a7..47c20251 100644
--- a/content/renderer/child_frame_compositing_helper.h
+++ b/content/renderer/child_frame_compositing_helper.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/surfaces/surface_id.h"
@@ -122,7 +122,7 @@
   base::WeakPtr<BrowserPlugin> browser_plugin_;
   RenderFrameProxy* render_frame_proxy_;
 
-  scoped_ptr<blink::WebLayer> web_layer_;
+  std::unique_ptr<blink::WebLayer> web_layer_;
   cc::SurfaceId surface_id_;
   blink::WebFrame* frame_;
 
diff --git a/content/renderer/device_sensors/device_light_event_pump.h b/content/renderer/device_sensors/device_light_event_pump.h
index 3561484..3091efb 100644
--- a/content/renderer/device_sensors/device_light_event_pump.h
+++ b/content/renderer/device_sensors/device_light_event_pump.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/device_sensors/device_light_data.h"
 #include "content/renderer/device_sensors/device_sensor_event_pump.h"
 #include "content/renderer/shared_memory_seqlock_reader.h"
@@ -46,7 +47,7 @@
  private:
   bool ShouldFireEvent(double data) const;
 
-  scoped_ptr<DeviceLightSharedMemoryReader> reader_;
+  std::unique_ptr<DeviceLightSharedMemoryReader> reader_;
   double last_seen_data_;
 
   DISALLOW_COPY_AND_ASSIGN(DeviceLightEventPump);
diff --git a/content/renderer/device_sensors/device_light_event_pump_unittest.cc b/content/renderer/device_sensors/device_light_event_pump_unittest.cc
index 8a4f30e..9195df2 100644
--- a/content/renderer/device_sensors/device_light_event_pump_unittest.cc
+++ b/content/renderer/device_sensors/device_light_event_pump_unittest.cc
@@ -90,8 +90,8 @@
   DeviceLightHardwareBuffer* buffer() { return buffer_; }
 
  private:
-  scoped_ptr<MockDeviceLightListener> listener_;
-  scoped_ptr<DeviceLightEventPumpForTesting> light_pump_;
+  std::unique_ptr<MockDeviceLightListener> listener_;
+  std::unique_ptr<DeviceLightEventPumpForTesting> light_pump_;
   base::SharedMemoryHandle handle_;
   base::SharedMemory shared_memory_;
   DeviceLightHardwareBuffer* buffer_;
diff --git a/content/renderer/device_sensors/device_motion_event_pump.h b/content/renderer/device_sensors/device_motion_event_pump.h
index 7ae880e..1fb222920e 100644
--- a/content/renderer/device_sensors/device_motion_event_pump.h
+++ b/content/renderer/device_sensors/device_motion_event_pump.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_
 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/device_sensors/device_sensor_event_pump.h"
 #include "content/renderer/shared_memory_seqlock_reader.h"
 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionData.h"
@@ -38,7 +39,7 @@
   void SendStartMessage() override;
   void SendStopMessage() override;
 
-  scoped_ptr<DeviceMotionSharedMemoryReader> reader_;
+  std::unique_ptr<DeviceMotionSharedMemoryReader> reader_;
 
   DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPump);
 };
diff --git a/content/renderer/device_sensors/device_motion_event_pump_unittest.cc b/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
index 5cb15e8e..1160478 100644
--- a/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
+++ b/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
@@ -2,14 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "device_motion_event_pump.h"
+#include "content/renderer/device_sensors/device_motion_event_pump.h"
 
 #include <string.h>
 
+#include <memory>
+
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/common/device_sensors/device_motion_hardware_buffer.h"
@@ -119,8 +120,8 @@
   base::SharedMemoryHandle handle() { return handle_; }
 
  private:
-  scoped_ptr<MockDeviceMotionListener> listener_;
-  scoped_ptr<DeviceMotionEventPumpForTesting> motion_pump_;
+  std::unique_ptr<MockDeviceMotionListener> listener_;
+  std::unique_ptr<DeviceMotionEventPumpForTesting> motion_pump_;
   base::SharedMemoryHandle handle_;
   base::SharedMemory shared_memory_;
   DeviceMotionHardwareBuffer* buffer_;
diff --git a/content/renderer/device_sensors/device_orientation_event_pump.h b/content/renderer/device_sensors/device_orientation_event_pump.h
index 74ecacd..26587e7 100644
--- a/content/renderer/device_sensors/device_orientation_event_pump.h
+++ b/content/renderer/device_sensors/device_orientation_event_pump.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/device_sensors/device_sensor_event_pump.h"
 #include "content/renderer/shared_memory_seqlock_reader.h"
 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationData.h"
@@ -45,7 +46,7 @@
   bool ShouldFireEvent(const blink::WebDeviceOrientationData& data) const;
 
   blink::WebDeviceOrientationData data_;
-  scoped_ptr<DeviceOrientationSharedMemoryReader> reader_;
+  std::unique_ptr<DeviceOrientationSharedMemoryReader> reader_;
 
   DISALLOW_COPY_AND_ASSIGN(DeviceOrientationEventPump);
 };
diff --git a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
index b6ca30a..1221271 100644
--- a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
+++ b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
@@ -114,8 +114,8 @@
   DeviceOrientationHardwareBuffer* buffer() { return buffer_; }
 
  private:
-  scoped_ptr<MockDeviceOrientationListener> listener_;
-  scoped_ptr<DeviceOrientationEventPumpForTesting> orientation_pump_;
+  std::unique_ptr<MockDeviceOrientationListener> listener_;
+  std::unique_ptr<DeviceOrientationEventPumpForTesting> orientation_pump_;
   base::SharedMemoryHandle handle_;
   base::SharedMemory shared_memory_;
   DeviceOrientationHardwareBuffer* buffer_;
diff --git a/content/renderer/devtools/devtools_agent.h b/content/renderer/devtools/devtools_agent.h
index a54e415..4ae5d7f5 100644
--- a/content/renderer/devtools/devtools_agent.h
+++ b/content/renderer/devtools/devtools_agent.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_
 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/common/console_message_level.h"
 #include "content/public/renderer/render_frame_observer.h"
@@ -93,7 +93,7 @@
   RenderFrameImpl* frame_;
   base::Callback<void(int, int, const std::string&, const std::string&)>
       send_protocol_message_callback_for_test_;
-  scoped_ptr<DevToolsCPUThrottler> cpu_throttler_;
+  std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_;
 
   DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
 };
diff --git a/content/renderer/devtools/devtools_client.h b/content/renderer/devtools/devtools_client.h
index befa179..3d14c4a6 100644
--- a/content/renderer/devtools/devtools_client.h
+++ b/content/renderer/devtools/devtools_client.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/render_frame_observer.h"
 #include "third_party/WebKit/public/web/WebDevToolsFrontendClient.h"
 
@@ -48,7 +48,7 @@
                                      uint32_t total_size);
 
   std::string compatibility_script_;
-  scoped_ptr<blink::WebDevToolsFrontend> web_tools_frontend_;
+  std::unique_ptr<blink::WebDevToolsFrontend> web_tools_frontend_;
 
   DISALLOW_COPY_AND_ASSIGN(DevToolsClient);
 };
diff --git a/content/renderer/devtools/devtools_cpu_throttler.h b/content/renderer/devtools/devtools_cpu_throttler.h
index 78c901a..28e1e61 100644
--- a/content/renderer/devtools/devtools_cpu_throttler.h
+++ b/content/renderer/devtools/devtools_cpu_throttler.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CPU_THROTTLER_H_
 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_CPU_THROTTLER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
 namespace content {
@@ -21,7 +22,7 @@
   void SetThrottlingRate(double rate);
 
  private:
-  scoped_ptr<CPUThrottlingThread> throttling_thread_;
+  std::unique_ptr<CPUThrottlingThread> throttling_thread_;
 
   DISALLOW_COPY_AND_ASSIGN(DevToolsCPUThrottler);
 };
diff --git a/content/renderer/devtools/render_widget_screen_metrics_emulator.h b/content/renderer/devtools/render_widget_screen_metrics_emulator.h
index 5650d0a3..9d12cd1 100644
--- a/content/renderer/devtools/render_widget_screen_metrics_emulator.h
+++ b/content/renderer/devtools/render_widget_screen_metrics_emulator.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_
 #define CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/common/resize_params.h"
 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
 
diff --git a/content/renderer/devtools/v8_sampling_profiler.cc b/content/renderer/devtools/v8_sampling_profiler.cc
index 4ad7ffa..50c268d 100644
--- a/content/renderer/devtools/v8_sampling_profiler.cc
+++ b/content/renderer/devtools/v8_sampling_profiler.cc
@@ -106,7 +106,7 @@
   void Collect(v8::Isolate* isolate,
                base::TimeTicks timestamp,
                const v8::RegisterState& state);
-  scoped_ptr<ConvertableToTraceFormat> ToTraceFormat() const;
+  std::unique_ptr<ConvertableToTraceFormat> ToTraceFormat() const;
 
  private:
   base::TimeTicks timestamp_;
@@ -128,8 +128,8 @@
   vm_state_ = sample_info.vm_state;
 }
 
-scoped_ptr<ConvertableToTraceFormat> SampleRecord::ToTraceFormat() const {
-  scoped_ptr<base::trace_event::TracedValue> data(
+std::unique_ptr<ConvertableToTraceFormat> SampleRecord::ToTraceFormat() const {
+  std::unique_ptr<base::trace_event::TracedValue> data(
       new base::trace_event::TracedValue());
   const char* vm_state = nullptr;
   switch (vm_state_) {
@@ -170,7 +170,7 @@
  public:
   ~Sampler();
 
-  static scoped_ptr<Sampler> CreateForCurrentThread();
+  static std::unique_ptr<Sampler> CreateForCurrentThread();
   static Sampler* GetInstance() { return tls_instance_.Pointer()->Get(); }
 
   // These methods are called from the sampling thread.
@@ -197,7 +197,7 @@
 
   static void InstallJitCodeEventHandler(Isolate* isolate, void* data);
   static void HandleJitCodeEvent(const v8::JitCodeEvent* event);
-  static scoped_ptr<ConvertableToTraceFormat> JitCodeEventToTraceFormat(
+  static std::unique_ptr<ConvertableToTraceFormat> JitCodeEventToTraceFormat(
       const v8::JitCodeEvent* event);
 
   void InjectPendingEvents();
@@ -207,7 +207,7 @@
 
   PlatformData platform_data_;
   Isolate* isolate_;
-  scoped_ptr<SamplingQueue> samples_data_;
+  std::unique_ptr<SamplingQueue> samples_data_;
   base::subtle::Atomic32 code_added_events_count_;
   base::subtle::Atomic32 samples_count_;
   int code_added_events_to_collect_for_test_;
@@ -237,8 +237,8 @@
 }
 
 // static
-scoped_ptr<Sampler> Sampler::CreateForCurrentThread() {
-  return scoped_ptr<Sampler>(new Sampler());
+std::unique_ptr<Sampler> Sampler::CreateForCurrentThread() {
+  return std::unique_ptr<Sampler>(new Sampler());
 }
 
 void Sampler::Start() {
@@ -360,11 +360,11 @@
 }
 
 // static
-scoped_ptr<ConvertableToTraceFormat> Sampler::JitCodeEventToTraceFormat(
+std::unique_ptr<ConvertableToTraceFormat> Sampler::JitCodeEventToTraceFormat(
     const v8::JitCodeEvent* event) {
   switch (event->type) {
     case v8::JitCodeEvent::CODE_ADDED: {
-      scoped_ptr<base::trace_event::TracedValue> data(
+      std::unique_ptr<base::trace_event::TracedValue> data(
           new base::trace_event::TracedValue());
       data->SetString("code_start", PtrToString(event->code_start));
       data->SetInteger("code_len", static_cast<unsigned>(event->code_len));
@@ -376,7 +376,7 @@
     }
 
     case v8::JitCodeEvent::CODE_MOVED: {
-      scoped_ptr<base::trace_event::TracedValue> data(
+      std::unique_ptr<base::trace_event::TracedValue> data(
           new base::trace_event::TracedValue());
       data->SetString("code_start", PtrToString(event->code_start));
       data->SetInteger("code_len", static_cast<unsigned>(event->code_len));
@@ -385,7 +385,7 @@
     }
 
     case v8::JitCodeEvent::CODE_REMOVED: {
-      scoped_ptr<base::trace_event::TracedValue> data(
+      std::unique_ptr<base::trace_event::TracedValue> data(
           new base::trace_event::TracedValue());
       data->SetString("code_start", PtrToString(event->code_start));
       data->SetInteger("code_len", static_cast<unsigned>(event->code_len));
diff --git a/content/renderer/devtools/v8_sampling_profiler.h b/content/renderer/devtools/v8_sampling_profiler.h
index 6d5b432..7604f5a 100644
--- a/content/renderer/devtools/v8_sampling_profiler.h
+++ b/content/renderer/devtools/v8_sampling_profiler.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_DEVTOOLS_V8_SAMPLING_PROFILER_H_
 #define CONTENT_RENDERER_DEVTOOLS_V8_SAMPLING_PROFILER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/trace_event/trace_log.h"
@@ -36,9 +37,9 @@
   void StartSamplingThread();
   void StopSamplingThread();
 
-  scoped_ptr<base::WaitableEvent> waitable_event_for_testing_;
-  scoped_ptr<V8SamplingThread> sampling_thread_;
-  scoped_ptr<Sampler> render_thread_sampler_;
+  std::unique_ptr<base::WaitableEvent> waitable_event_for_testing_;
+  std::unique_ptr<V8SamplingThread> sampling_thread_;
+  std::unique_ptr<Sampler> render_thread_sampler_;
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
 
   DISALLOW_COPY_AND_ASSIGN(V8SamplingProfiler);
diff --git a/content/renderer/devtools/v8_sampling_profiler_browsertest.cc b/content/renderer/devtools/v8_sampling_profiler_browsertest.cc
index 302b7454..af31cde 100644
--- a/content/renderer/devtools/v8_sampling_profiler_browsertest.cc
+++ b/content/renderer/devtools/v8_sampling_profiler_browsertest.cc
@@ -56,7 +56,7 @@
     trace_buffer_.AddFragment(events_str->data());
     trace_buffer_.Finish();
 
-    scoped_ptr<Value> root;
+    std::unique_ptr<Value> root;
     root = base::JSONReader::Read(
         json_output_.json_output,
         base::JSON_PARSE_RFC | base::JSON_DETACHABLE_CHILDREN);
@@ -71,7 +71,7 @@
 
     // Move items into our aggregate collection
     while (root_list->GetSize()) {
-      scoped_ptr<Value> item;
+      std::unique_ptr<Value> item;
       root_list->Remove(0, &item);
       trace_parsed_.Append(item.release());
     }
@@ -114,7 +114,7 @@
     return events_count;
   }
 
-  scoped_ptr<V8SamplingProfiler> sampling_profiler_;
+  std::unique_ptr<V8SamplingProfiler> sampling_profiler_;
   base::Lock lock_;
 
   ListValue trace_parsed_;
diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc
index 4087458..3f119b6 100644
--- a/content/renderer/dom_automation_controller.cc
+++ b/content/renderer/dom_automation_controller.cc
@@ -90,7 +90,7 @@
 
   std::string json;
   JSONStringValueSerializer serializer(&json);
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
 
   // Warning: note that JSON officially requires the root-level object to be
   // an object (e.g. {foo:3}) or an array, while here we're serializing
diff --git a/content/renderer/fetchers/manifest_fetcher.h b/content/renderer/fetchers/manifest_fetcher.h
index bfb3b8c..0efb8e4 100644
--- a/content/renderer/fetchers/manifest_fetcher.h
+++ b/content/renderer/fetchers/manifest_fetcher.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_RENDERER_FETCHERS_MANIFEST_FETCHER_H_
 #define CONTENT_RENDERER_FETCHERS_MANIFEST_FETCHER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/platform/WebURLResponse.h"
 
@@ -49,7 +49,7 @@
 
   bool completed_;
   Callback callback_;
-  scoped_ptr<ResourceFetcher> fetcher_;
+  std::unique_ptr<ResourceFetcher> fetcher_;
 
   DISALLOW_COPY_AND_ASSIGN(ManifestFetcher);
 };
diff --git a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h
index 4d132ce..37a22220 100644
--- a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h
+++ b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_FETCHERS_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
 #define CONTENT_RENDERER_FETCHERS_MULTI_RESOLUTION_IMAGE_RESOURCE_FETCHER_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "third_party/WebKit/public/platform/WebURLRequest.h"
 #include "url/gurl.h"
 
@@ -69,7 +69,7 @@
   const GURL image_url_;
 
   // Does the actual download.
-  scoped_ptr<ResourceFetcher> fetcher_;
+  std::unique_ptr<ResourceFetcher> fetcher_;
 
   DISALLOW_COPY_AND_ASSIGN(MultiResolutionImageResourceFetcher);
 };
diff --git a/content/renderer/fetchers/resource_fetcher_impl.h b/content/renderer/fetchers/resource_fetcher_impl.h
index d1f1907..38f3bb3 100644
--- a/content/renderer/fetchers/resource_fetcher_impl.h
+++ b/content/renderer/fetchers/resource_fetcher_impl.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_FETCHERS_RESOURCE_FETCHER_IMPL_H_
 #define CONTENT_RENDERER_FETCHERS_RESOURCE_FETCHER_IMPL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "content/public/renderer/resource_fetcher.h"
 #include "content/renderer/fetchers/web_url_loader_client_impl.h"
@@ -60,7 +60,7 @@
   void OnLoadComplete() override;
   void Cancel() override;
 
-  scoped_ptr<blink::WebURLLoader> loader_;
+  std::unique_ptr<blink::WebURLLoader> loader_;
 
   // Options to send to the loader.
   blink::WebURLLoaderOptions options_;
diff --git a/content/renderer/fetchers/web_url_loader_client_impl.h b/content/renderer/fetchers/web_url_loader_client_impl.h
index 70fb7da..f15d0a0c 100644
--- a/content/renderer/fetchers/web_url_loader_client_impl.h
+++ b/content/renderer/fetchers/web_url_loader_client_impl.h
@@ -7,10 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
 #include "third_party/WebKit/public/platform/WebURLResponse.h"
 
diff --git a/content/renderer/gamepad_shared_memory_reader.h b/content/renderer/gamepad_shared_memory_reader.h
index 3aed543..1fb8f1f 100644
--- a/content/renderer/gamepad_shared_memory_reader.h
+++ b/content/renderer/gamepad_shared_memory_reader.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "content/common/gamepad_messages.h"
 #include "content/public/renderer/renderer_gamepad_provider.h"
@@ -36,7 +37,7 @@
   void OnGamepadDisconnected(int index, const blink::WebGamepad& gamepad);
 
   base::SharedMemoryHandle renderer_shared_memory_handle_;
-  scoped_ptr<base::SharedMemory> renderer_shared_memory_;
+  std::unique_ptr<base::SharedMemory> renderer_shared_memory_;
   GamepadHardwareBuffer* gamepad_hardware_buffer_;
 
   bool ever_interacted_with_;
diff --git a/content/renderer/geolocation_dispatcher.h b/content/renderer/geolocation_dispatcher.h
index 71766be..437c5a8 100644
--- a/content/renderer/geolocation_dispatcher.h
+++ b/content/renderer/geolocation_dispatcher.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_
 #define CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/public/renderer/render_frame_observer.h"
 #include "third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom.h"
 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojom.h"
@@ -51,9 +52,9 @@
   void OnPermissionSet(int permission_request_id,
                        blink::mojom::PermissionStatus status);
 
-  scoped_ptr<blink::WebGeolocationController> controller_;
+  std::unique_ptr<blink::WebGeolocationController> controller_;
 
-  scoped_ptr<blink::WebGeolocationPermissionRequestManager>
+  std::unique_ptr<blink::WebGeolocationPermissionRequestManager>
       pending_permissions_;
   blink::mojom::GeolocationServicePtr geolocation_service_;
   bool enable_high_accuracy_;
diff --git a/content/renderer/gpu/compositor_dependencies.h b/content/renderer/gpu/compositor_dependencies.h
index 3f82883d..9ed2f78 100644
--- a/content/renderer/gpu/compositor_dependencies.h
+++ b/content/renderer/gpu/compositor_dependencies.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_
 #define CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 
 namespace base {
 class SingleThreadTaskRunner;
@@ -54,7 +54,7 @@
   virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0;
   virtual scheduler::RendererScheduler* GetRendererScheduler() = 0;
   virtual cc::ContextProvider* GetSharedMainThreadContextProvider() = 0;
-  virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
+  virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
       int routing_id) = 0;
   virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor() = 0;
   virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0;
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 72e0d01..7d3410f 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -36,7 +36,7 @@
 #if defined(ENABLE_VULKAN)
     const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
 #endif
-    scoped_ptr<cc::SoftwareOutputDevice> software_device,
+    std::unique_ptr<cc::SoftwareOutputDevice> software_device,
     scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue,
     bool use_swap_compositor_frame_message)
     : OutputSurface(context_provider,
@@ -97,7 +97,7 @@
 
 void CompositorOutputSurface::ShortcutSwapAck(
     uint32_t output_surface_id,
-    scoped_ptr<cc::GLFrameData> gl_frame_data) {
+    std::unique_ptr<cc::GLFrameData> gl_frame_data) {
   if (!layout_test_previous_frame_ack_) {
     layout_test_previous_frame_ack_.reset(new cc::CompositorFrameAck);
     layout_test_previous_frame_ack_->gl_frame_data.reset(new cc::GLFrameData);
@@ -143,10 +143,11 @@
     return;
   } else {
     {
-      std::vector<scoped_ptr<IPC::Message>> messages;
+      std::vector<std::unique_ptr<IPC::Message>> messages;
       std::vector<IPC::Message> messages_to_deliver_with_frame;
-      scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
-          frame_swap_message_queue_->AcquireSendMessageScope();
+      std::unique_ptr<FrameSwapMessageQueue::SendMessageScope>
+          send_message_scope =
+              frame_swap_message_queue_->AcquireSendMessageScope();
       frame_swap_message_queue_->DrainMessages(&messages);
       FrameSwapMessageQueue::TransferMessages(&messages,
                                               &messages_to_deliver_with_frame);
diff --git a/content/renderer/gpu/compositor_output_surface.h b/content/renderer/gpu/compositor_output_surface.h
index 97a14c0..908f045 100644
--- a/content/renderer/gpu/compositor_output_surface.h
+++ b/content/renderer/gpu/compositor_output_surface.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "base/threading/platform_thread.h"
@@ -50,7 +51,7 @@
 #if defined(ENABLE_VULKAN)
       const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
 #endif
-      scoped_ptr<cc::SoftwareOutputDevice> software,
+      std::unique_ptr<cc::SoftwareOutputDevice> software,
       scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue,
       bool use_swap_compositor_frame_message);
   ~CompositorOutputSurface() override;
@@ -62,7 +63,7 @@
 
  protected:
   void ShortcutSwapAck(uint32_t output_surface_id,
-                       scoped_ptr<cc::GLFrameData> gl_frame_data);
+                       std::unique_ptr<cc::GLFrameData> gl_frame_data);
   virtual void OnSwapAck(uint32_t output_surface_id,
                          const cc::CompositorFrameAck& ack);
   virtual void OnReclaimResources(uint32_t output_surface_id,
@@ -106,7 +107,7 @@
 
   // TODO(danakj): Remove this when crbug.com/311404
   bool layout_test_mode_;
-  scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_;
+  std::unique_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_;
   base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_;
 };
 
diff --git a/content/renderer/gpu/delegated_compositor_output_surface.cc b/content/renderer/gpu/delegated_compositor_output_surface.cc
index aff1ba5..b346e4d84 100644
--- a/content/renderer/gpu/delegated_compositor_output_surface.cc
+++ b/content/renderer/gpu/delegated_compositor_output_surface.cc
@@ -23,7 +23,7 @@
 #if defined(ENABLE_VULKAN)
                               vulkan_context_provider,
 #endif
-                              scoped_ptr<cc::SoftwareOutputDevice>(),
+                              std::unique_ptr<cc::SoftwareOutputDevice>(),
                               swap_frame_message_queue,
                               true) {
   capabilities_.delegated_rendering = true;
diff --git a/content/renderer/gpu/frame_swap_message_queue.cc b/content/renderer/gpu/frame_swap_message_queue.cc
index 8f8fb6bc..6e59dc1 100644
--- a/content/renderer/gpu/frame_swap_message_queue.cc
+++ b/content/renderer/gpu/frame_swap_message_queue.cc
@@ -11,6 +11,7 @@
 #include "base/containers/hash_tables.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "ipc/ipc_message.h"
 
@@ -24,11 +25,11 @@
   virtual ~FrameSwapMessageSubQueue() {}
   virtual bool Empty() const = 0;
   virtual void QueueMessage(int source_frame_number,
-                            scoped_ptr<IPC::Message> msg,
+                            std::unique_ptr<IPC::Message> msg,
                             bool* is_first) = 0;
   virtual void DrainMessages(
       int source_frame_number,
-      std::vector<scoped_ptr<IPC::Message>>* messages) = 0;
+      std::vector<std::unique_ptr<IPC::Message>>* messages) = 0;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(FrameSwapMessageSubQueue);
@@ -60,7 +61,7 @@
   bool Empty() const override { return queue_.empty(); }
 
   void QueueMessage(int source_frame_number,
-                    scoped_ptr<IPC::Message> msg,
+                    std::unique_ptr<IPC::Message> msg,
                     bool* is_first) override {
     if (is_first)
       *is_first = (queue_.count(source_frame_number) == 0);
@@ -68,13 +69,14 @@
     queue_[source_frame_number].push_back(msg.release());
   }
 
-  void DrainMessages(int source_frame_number,
-                     std::vector<scoped_ptr<IPC::Message>>* messages) override {
+  void DrainMessages(
+      int source_frame_number,
+      std::vector<std::unique_ptr<IPC::Message>>* messages) override {
     auto end = queue_.upper_bound(source_frame_number);
     for (auto i = queue_.begin(); i != end; i++) {
       DCHECK(i->first <= source_frame_number);
       for (IPC::Message* msg : i->second) {
-        messages->push_back(make_scoped_ptr(msg));
+        messages->push_back(base::WrapUnique(msg));
       }
       i->second.clear();
     }
@@ -95,21 +97,22 @@
   bool Empty() const override { return queue_.empty(); }
 
   void QueueMessage(int source_frame_number,
-                    scoped_ptr<IPC::Message> msg,
+                    std::unique_ptr<IPC::Message> msg,
                     bool* is_first) override {
     if (is_first)
       *is_first = Empty();
     queue_.push_back(std::move(msg));
   }
 
-  void DrainMessages(int source_frame_number,
-                     std::vector<scoped_ptr<IPC::Message>>* messages) override {
+  void DrainMessages(
+      int source_frame_number,
+      std::vector<std::unique_ptr<IPC::Message>>* messages) override {
     std::move(queue_.begin(), queue_.end(), std::back_inserter(*messages));
     queue_.clear();
   }
 
  private:
-  std::vector<scoped_ptr<IPC::Message>> queue_;
+  std::vector<std::unique_ptr<IPC::Message>> queue_;
 
   DISALLOW_COPY_AND_ASSIGN(SwapQueue);
 };
@@ -144,10 +147,11 @@
   return NULL;
 }
 
-void FrameSwapMessageQueue::QueueMessageForFrame(MessageDeliveryPolicy policy,
-                                                 int source_frame_number,
-                                                 scoped_ptr<IPC::Message> msg,
-                                                 bool* is_first) {
+void FrameSwapMessageQueue::QueueMessageForFrame(
+    MessageDeliveryPolicy policy,
+    int source_frame_number,
+    std::unique_ptr<IPC::Message> msg,
+    bool* is_first) {
   base::AutoLock lock(lock_);
   GetSubQueue(policy)
       ->QueueMessage(source_frame_number, std::move(msg), is_first);
@@ -167,7 +171,7 @@
 void FrameSwapMessageQueue::DidNotSwap(
     int source_frame_number,
     cc::SwapPromise::DidNotSwapReason reason,
-    std::vector<scoped_ptr<IPC::Message>>* messages) {
+    std::vector<std::unique_ptr<IPC::Message>>* messages) {
   base::AutoLock lock(lock_);
   switch (reason) {
     case cc::SwapPromise::SWAP_FAILS:
@@ -186,21 +190,21 @@
 }
 
 void FrameSwapMessageQueue::DrainMessages(
-    std::vector<scoped_ptr<IPC::Message>>* messages) {
+    std::vector<std::unique_ptr<IPC::Message>>* messages) {
   lock_.AssertAcquired();
   std::move(next_drain_messages_.begin(), next_drain_messages_.end(),
             std::back_inserter(*messages));
   next_drain_messages_.clear();
 }
 
-scoped_ptr<FrameSwapMessageQueue::SendMessageScope>
+std::unique_ptr<FrameSwapMessageQueue::SendMessageScope>
 FrameSwapMessageQueue::AcquireSendMessageScope() {
-  return make_scoped_ptr(new SendMessageScopeImpl(&lock_));
+  return base::WrapUnique(new SendMessageScopeImpl(&lock_));
 }
 
 // static
 void FrameSwapMessageQueue::TransferMessages(
-    std::vector<scoped_ptr<IPC::Message>>* source,
+    std::vector<std::unique_ptr<IPC::Message>>* source,
     vector<IPC::Message>* dest) {
   for (const auto& msg : *source) {
     dest->push_back(*msg.get());
diff --git a/content/renderer/gpu/frame_swap_message_queue.h b/content/renderer/gpu/frame_swap_message_queue.h
index f45a36a..0ac1a7e 100644
--- a/content/renderer/gpu/frame_swap_message_queue.h
+++ b/content/renderer/gpu/frame_swap_message_queue.h
@@ -6,12 +6,12 @@
 #define CONTENT_RENDERER_GPU_FRAME_SWAP_MESSAGE_QUEUE_H_
 
 #include <map>
+#include <memory>
 #include <vector>
 
 #include "base/auto_reset.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/synchronization/lock.h"
 #include "cc/output/swap_promise.h"
@@ -47,7 +47,7 @@
   //              enqueued for the given source_frame_number.
   void QueueMessageForFrame(MessageDeliveryPolicy policy,
                             int source_frame_number,
-                            scoped_ptr<IPC::Message> msg,
+                            std::unique_ptr<IPC::Message> msg,
                             bool* is_first);
 
   // Returns true if there are no messages in the queue.
@@ -74,7 +74,7 @@
   //            messages.
   void DidNotSwap(int source_frame_number,
                   cc::SwapPromise::DidNotSwapReason reason,
-                  std::vector<scoped_ptr<IPC::Message>>* messages);
+                  std::vector<std::unique_ptr<IPC::Message>>* messages);
 
   // A SendMessageScope object must be held by the caller when this method is
   // called.
@@ -82,17 +82,18 @@
   // |messages| vector to store messages, it's not cleared, only appended to.
   //            The method will append messages queued for frame numbers lower
   //            or equal to |source_frame_number|
-  void DrainMessages(std::vector<scoped_ptr<IPC::Message>>* messages);
+  void DrainMessages(std::vector<std::unique_ptr<IPC::Message>>* messages);
 
   // SendMessageScope is used to make sure that messages sent from different
   // threads (impl/main) are scheduled in the right order on the IO threads.
   //
   // Returns an object that must be kept in scope till an IPC message containing
   // |messages| is sent.
-  scoped_ptr<SendMessageScope> AcquireSendMessageScope();
+  std::unique_ptr<SendMessageScope> AcquireSendMessageScope();
 
-  static void TransferMessages(std::vector<scoped_ptr<IPC::Message>>* source,
-                               std::vector<IPC::Message>* dest);
+  static void TransferMessages(
+      std::vector<std::unique_ptr<IPC::Message>>* source,
+      std::vector<IPC::Message>* dest);
 
  private:
   friend class base::RefCountedThreadSafe<FrameSwapMessageQueue>;
@@ -102,9 +103,9 @@
   ~FrameSwapMessageQueue();
 
   mutable base::Lock lock_;
-  scoped_ptr<FrameSwapMessageSubQueue> visual_state_queue_;
-  scoped_ptr<FrameSwapMessageSubQueue> swap_queue_;
-  std::vector<scoped_ptr<IPC::Message>> next_drain_messages_;
+  std::unique_ptr<FrameSwapMessageSubQueue> visual_state_queue_;
+  std::unique_ptr<FrameSwapMessageSubQueue> swap_queue_;
+  std::vector<std::unique_ptr<IPC::Message>> next_drain_messages_;
 
   DISALLOW_COPY_AND_ASSIGN(FrameSwapMessageQueue);
 };
diff --git a/content/renderer/gpu/frame_swap_message_queue_unittest.cc b/content/renderer/gpu/frame_swap_message_queue_unittest.cc
index ef91720..0501640 100644
--- a/content/renderer/gpu/frame_swap_message_queue_unittest.cc
+++ b/content/renderer/gpu/frame_swap_message_queue_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "ipc/ipc_message.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -20,41 +21,42 @@
         queue_(new FrameSwapMessageQueue()) {}
 
  protected:
-  void QueueNextSwapMessage(scoped_ptr<IPC::Message> msg) {
+  void QueueNextSwapMessage(std::unique_ptr<IPC::Message> msg) {
     queue_->QueueMessageForFrame(MESSAGE_DELIVERY_POLICY_WITH_NEXT_SWAP, 0,
                                  std::move(msg), NULL);
   }
 
-  void QueueNextSwapMessage(scoped_ptr<IPC::Message> msg, bool* first) {
+  void QueueNextSwapMessage(std::unique_ptr<IPC::Message> msg, bool* first) {
     queue_->QueueMessageForFrame(MESSAGE_DELIVERY_POLICY_WITH_NEXT_SWAP, 0,
                                  std::move(msg), first);
   }
 
   void QueueVisualStateMessage(int source_frame_number,
-                               scoped_ptr<IPC::Message> msg) {
+                               std::unique_ptr<IPC::Message> msg) {
     queue_->QueueMessageForFrame(MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE,
                                  source_frame_number, std::move(msg), NULL);
   }
 
   void QueueVisualStateMessage(int source_frame_number,
-                               scoped_ptr<IPC::Message> msg,
+                               std::unique_ptr<IPC::Message> msg,
                                bool* first) {
     queue_->QueueMessageForFrame(MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE,
                                  source_frame_number, std::move(msg), first);
   }
 
   void DrainMessages(int source_frame_number,
-                     std::vector<scoped_ptr<IPC::Message>>* messages) {
+                     std::vector<std::unique_ptr<IPC::Message>>* messages) {
     messages->clear();
     queue_->DidActivate(source_frame_number);
     queue_->DidSwap(source_frame_number);
-    scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
-        queue_->AcquireSendMessageScope();
+    std::unique_ptr<FrameSwapMessageQueue::SendMessageScope>
+        send_message_scope = queue_->AcquireSendMessageScope();
     queue_->DrainMessages(messages);
   }
 
-  bool HasMessageForId(const std::vector<scoped_ptr<IPC::Message>>& messages,
-                       int routing_id) {
+  bool HasMessageForId(
+      const std::vector<std::unique_ptr<IPC::Message>>& messages,
+      int routing_id) {
     for (const auto& msg : messages) {
       if (msg->routing_id() == routing_id)
         return true;
@@ -62,8 +64,8 @@
     return false;
   }
 
-  scoped_ptr<IPC::Message> CloneMessage(const IPC::Message& other) {
-    return make_scoped_ptr(new IPC::Message(other));
+  std::unique_ptr<IPC::Message> CloneMessage(const IPC::Message& other) {
+    return base::WrapUnique(new IPC::Message(other));
   }
 
   void TestDidNotSwap(cc::SwapPromise::DidNotSwapReason reason);
@@ -75,14 +77,14 @@
 };
 
 TEST_F(FrameSwapMessageQueueTest, TestEmptyQueueDrain) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   DrainMessages(0, &messages);
   ASSERT_TRUE(messages.empty());
 }
 
 TEST_F(FrameSwapMessageQueueTest, TestEmpty) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
   ASSERT_TRUE(queue_->Empty());
   QueueNextSwapMessage(CloneMessage(first_message_));
   ASSERT_FALSE(queue_->Empty());
@@ -96,7 +98,7 @@
 }
 
 TEST_F(FrameSwapMessageQueueTest, TestQueueMessageFirst) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
   bool visual_state_first = false;
   bool next_swap_first = false;
 
@@ -125,7 +127,7 @@
 }
 
 TEST_F(FrameSwapMessageQueueTest, TestNextSwapMessageSentWithNextFrame) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   DrainMessages(1, &messages);
   QueueNextSwapMessage(CloneMessage(first_message_));
@@ -139,7 +141,7 @@
 }
 
 TEST_F(FrameSwapMessageQueueTest, TestNextSwapMessageSentWithCurrentFrame) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   DrainMessages(1, &messages);
   QueueNextSwapMessage(CloneMessage(first_message_));
@@ -154,7 +156,7 @@
 
 TEST_F(FrameSwapMessageQueueTest,
        TestDrainsVisualStateMessagesForCorrespondingFrames) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   QueueVisualStateMessage(1, CloneMessage(first_message_));
   QueueVisualStateMessage(2, CloneMessage(second_message_));
@@ -178,7 +180,7 @@
 
 TEST_F(FrameSwapMessageQueueTest,
        TestQueueNextSwapMessagePreservesFifoOrdering) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   QueueNextSwapMessage(CloneMessage(first_message_));
   QueueNextSwapMessage(CloneMessage(second_message_));
@@ -190,7 +192,7 @@
 
 TEST_F(FrameSwapMessageQueueTest,
        TestQueueVisualStateMessagePreservesFifoOrdering) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   QueueVisualStateMessage(1, CloneMessage(first_message_));
   QueueVisualStateMessage(1, CloneMessage(second_message_));
@@ -202,7 +204,7 @@
 
 void FrameSwapMessageQueueTest::TestDidNotSwap(
     cc::SwapPromise::DidNotSwapReason reason) {
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
 
   QueueNextSwapMessage(CloneMessage(first_message_));
   QueueVisualStateMessage(2, CloneMessage(second_message_));
@@ -262,7 +264,7 @@
 
 TEST_F(FrameSwapMessageQueueTest, TestDeletesNextSwapMessage) {
   bool message_deleted = false;
-  QueueNextSwapMessage(make_scoped_ptr(
+  QueueNextSwapMessage(base::WrapUnique(
       new NotifiesDeletionMessage(&message_deleted, first_message_)));
   queue_ = NULL;
   ASSERT_TRUE(message_deleted);
@@ -270,18 +272,16 @@
 
 TEST_F(FrameSwapMessageQueueTest, TestDeletesVisualStateMessage) {
   bool message_deleted = false;
-  QueueVisualStateMessage(1,
-                          make_scoped_ptr(new NotifiesDeletionMessage(
-                              &message_deleted, first_message_)));
+  QueueVisualStateMessage(1, base::WrapUnique(new NotifiesDeletionMessage(
+                                 &message_deleted, first_message_)));
   queue_ = NULL;
   ASSERT_TRUE(message_deleted);
 }
 
 TEST_F(FrameSwapMessageQueueTest, TestDeletesQueuedVisualStateMessage) {
   bool message_deleted = false;
-  QueueVisualStateMessage(1,
-                          make_scoped_ptr(new NotifiesDeletionMessage(
-                              &message_deleted, first_message_)));
+  QueueVisualStateMessage(1, base::WrapUnique(new NotifiesDeletionMessage(
+                                 &message_deleted, first_message_)));
   queue_->DidActivate(1);
   queue_->DidSwap(1);
   queue_ = NULL;
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index 028bdee..4a54057 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -5,6 +5,7 @@
 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
 
 #include <stddef.h>
+
 #include <string>
 #include <utility>
 
@@ -13,6 +14,7 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "cc/layers/layer.h"
 #include "content/common/child_process_messages.h"
@@ -282,17 +284,16 @@
   DISALLOW_COPY_AND_ASSIGN(GpuBenchmarkingContext);
 };
 
-void OnMicroBenchmarkCompleted(
-    CallbackAndContext* callback_and_context,
-    scoped_ptr<base::Value> result) {
+void OnMicroBenchmarkCompleted(CallbackAndContext* callback_and_context,
+                               std::unique_ptr<base::Value> result) {
   v8::Isolate* isolate = callback_and_context->isolate();
   v8::HandleScope scope(isolate);
   v8::Local<v8::Context> context = callback_and_context->GetContext();
   v8::Context::Scope context_scope(context);
   WebLocalFrame* frame = WebLocalFrame::frameForContext(context);
   if (frame) {
-    scoped_ptr<V8ValueConverter> converter =
-        make_scoped_ptr(V8ValueConverter::create());
+    std::unique_ptr<V8ValueConverter> converter =
+        base::WrapUnique(V8ValueConverter::create());
     v8::Local<v8::Value> value = converter->ToV8Value(result.get(), context);
     v8::Local<v8::Value> argv[] = { value };
 
@@ -350,7 +351,7 @@
       new CallbackAndContext(
           isolate, callback, context.web_frame()->mainWorldScriptContext());
 
-  scoped_ptr<SyntheticSmoothScrollGestureParams> gesture_params(
+  std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params(
       new SyntheticSmoothScrollGestureParams);
 
   if (gesture_source_type < 0 ||
@@ -420,7 +421,7 @@
       new CallbackAndContext(isolate, callback,
                              context.web_frame()->mainWorldScriptContext());
 
-  scoped_ptr<SyntheticSmoothDragGestureParams> gesture_params(
+  std::unique_ptr<SyntheticSmoothDragGestureParams> gesture_params(
       new SyntheticSmoothDragGestureParams);
 
   // Convert coordinates from CSS pixels to density independent pixels (DIPs).
@@ -701,7 +702,7 @@
                              callback,
                              context.web_frame()->mainWorldScriptContext());
 
-  scoped_ptr<SyntheticSmoothScrollGestureParams> gesture_params(
+  std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params(
       new SyntheticSmoothScrollGestureParams);
 
   gesture_params->speed_in_pixels_s = speed_in_pixels_s;
@@ -765,7 +766,7 @@
     return false;
   }
 
-  scoped_ptr<SyntheticPinchGestureParams> gesture_params(
+  std::unique_ptr<SyntheticPinchGestureParams> gesture_params(
       new SyntheticPinchGestureParams);
 
   // TODO(bokan): Remove page scale here when change land in Catapult.
@@ -849,7 +850,7 @@
     return false;
   }
 
-  scoped_ptr<SyntheticTapGestureParams> gesture_params(
+  std::unique_ptr<SyntheticTapGestureParams> gesture_params(
       new SyntheticTapGestureParams);
 
   // Convert coordinates from CSS pixels to density independent pixels (DIPs).
@@ -906,11 +907,11 @@
                              callback,
                              context.web_frame()->mainWorldScriptContext());
 
-  scoped_ptr<V8ValueConverter> converter =
-      make_scoped_ptr(V8ValueConverter::create());
+  std::unique_ptr<V8ValueConverter> converter =
+      base::WrapUnique(V8ValueConverter::create());
   v8::Local<v8::Context> v8_context = callback_and_context->GetContext();
-  scoped_ptr<base::Value> value =
-      make_scoped_ptr(converter->FromV8Value(arguments, v8_context));
+  std::unique_ptr<base::Value> value =
+      base::WrapUnique(converter->FromV8Value(arguments, v8_context));
 
   return context.compositor()->ScheduleMicroBenchmark(
       name, std::move(value),
@@ -925,12 +926,12 @@
   if (!context.Init(true))
     return false;
 
-  scoped_ptr<V8ValueConverter> converter =
-      make_scoped_ptr(V8ValueConverter::create());
+  std::unique_ptr<V8ValueConverter> converter =
+      base::WrapUnique(V8ValueConverter::create());
   v8::Local<v8::Context> v8_context =
       context.web_frame()->mainWorldScriptContext();
-  scoped_ptr<base::Value> value =
-      make_scoped_ptr(converter->FromV8Value(message, v8_context));
+  std::unique_ptr<base::Value> value =
+      base::WrapUnique(converter->FromV8Value(message, v8_context));
 
   return context.compositor()->SendMessageToMicroBenchmark(id,
                                                            std::move(value));
diff --git a/content/renderer/gpu/queue_message_swap_promise.cc b/content/renderer/gpu/queue_message_swap_promise.cc
index 5d8386d8..9653375e 100644
--- a/content/renderer/gpu/queue_message_swap_promise.cc
+++ b/content/renderer/gpu/queue_message_swap_promise.cc
@@ -53,7 +53,7 @@
 #if DCHECK_IS_ON()
   DCHECK(!completed_);
 #endif
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
   message_queue_->DidNotSwap(source_frame_number_, reason, &messages);
   for (auto& msg : messages) {
     message_sender_->Send(msg.release());
diff --git a/content/renderer/gpu/queue_message_swap_promise_unittest.cc b/content/renderer/gpu/queue_message_swap_promise_unittest.cc
index 38ea08f..02e1e2e7 100644
--- a/content/renderer/gpu/queue_message_swap_promise_unittest.cc
+++ b/content/renderer/gpu/queue_message_swap_promise_unittest.cc
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/scoped_vector.h"
 #include "cc/output/swap_promise.h"
 #include "content/renderer/gpu/frame_swap_message_queue.h"
@@ -37,16 +38,16 @@
   TestSyncMessageFilter() : IPC::SyncMessageFilter(NULL, false) {}
 
   bool Send(IPC::Message* message) override {
-    messages_.push_back(make_scoped_ptr(message));
+    messages_.push_back(base::WrapUnique(message));
     return true;
   }
 
-  std::vector<scoped_ptr<IPC::Message>>& messages() { return messages_; }
+  std::vector<std::unique_ptr<IPC::Message>>& messages() { return messages_; }
 
  private:
   ~TestSyncMessageFilter() override {}
 
-  std::vector<scoped_ptr<IPC::Message>> messages_;
+  std::vector<std::unique_ptr<IPC::Message>> messages_;
 
   DISALLOW_COPY_AND_ASSIGN(TestSyncMessageFilter);
 };
@@ -64,28 +65,31 @@
 
   ~QueueMessageSwapPromiseTest() override {}
 
-  scoped_ptr<cc::SwapPromise> QueueMessageImpl(IPC::Message* msg,
-                                               MessageDeliveryPolicy policy,
-                                               int source_frame_number) {
+  std::unique_ptr<cc::SwapPromise> QueueMessageImpl(
+      IPC::Message* msg,
+      MessageDeliveryPolicy policy,
+      int source_frame_number) {
     return TestRenderWidget::QueueMessageImpl(
         msg, policy, frame_swap_message_queue_.get(), sync_message_filter_,
         source_frame_number);
   }
 
-  const std::vector<scoped_ptr<IPC::Message>>& DirectSendMessages() {
+  const std::vector<std::unique_ptr<IPC::Message>>& DirectSendMessages() {
     return sync_message_filter_->messages();
   }
 
-  std::vector<scoped_ptr<IPC::Message>>& NextSwapMessages() {
+  std::vector<std::unique_ptr<IPC::Message>>& NextSwapMessages() {
     next_swap_messages_.clear();
-    scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
-        frame_swap_message_queue_->AcquireSendMessageScope();
+    std::unique_ptr<FrameSwapMessageQueue::SendMessageScope>
+        send_message_scope =
+            frame_swap_message_queue_->AcquireSendMessageScope();
     frame_swap_message_queue_->DrainMessages(&next_swap_messages_);
     return next_swap_messages_;
   }
 
-  bool ContainsMessage(const std::vector<scoped_ptr<IPC::Message>>& messages,
-                       const IPC::Message& message) {
+  bool ContainsMessage(
+      const std::vector<std::unique_ptr<IPC::Message>>& messages,
+      const IPC::Message& message) {
     if (messages.empty())
       return false;
     for (const auto& msg : messages) {
@@ -132,7 +136,7 @@
   ScopedVector<cc::SwapPromise> promises_;
 
  private:
-  std::vector<scoped_ptr<IPC::Message>> next_swap_messages_;
+  std::vector<std::unique_ptr<IPC::Message>> next_swap_messages_;
 
   DISALLOW_COPY_AND_ASSIGN(QueueMessageSwapPromiseTest);
 };
@@ -252,7 +256,7 @@
   promises_[0]->DidActivate();
   promises_[0]->DidSwap(NULL);
   ASSERT_FALSE(promises_[1]);
-  std::vector<scoped_ptr<IPC::Message>> messages;
+  std::vector<std::unique_ptr<IPC::Message>> messages;
   messages.swap(NextSwapMessages());
   EXPECT_EQ(2u, messages.size());
   EXPECT_TRUE(ContainsMessage(messages, messages_[0]));
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index f085fd5..4fa758cb 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -204,11 +204,11 @@
 }  // namespace
 
 // static
-scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
+std::unique_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
     RenderWidgetCompositorDelegate* delegate,
     float device_scale_factor,
     CompositorDependencies* compositor_deps) {
-  scoped_ptr<RenderWidgetCompositor> compositor(
+  std::unique_ptr<RenderWidgetCompositor> compositor(
       new RenderWidgetCompositor(delegate, compositor_deps));
   compositor->Initialize(device_scale_factor);
   return compositor;
@@ -483,7 +483,7 @@
   if (use_remote_compositing)
     settings.use_external_begin_frame_source = false;
 
-  scoped_ptr<cc::BeginFrameSource> external_begin_frame_source;
+  std::unique_ptr<cc::BeginFrameSource> external_begin_frame_source;
   if (settings.use_external_begin_frame_source) {
     external_begin_frame_source = delegate_->CreateExternalBeginFrameSource();
   }
@@ -545,16 +545,16 @@
   setNeedsAnimate();
 }
 
-scoped_ptr<cc::SwapPromiseMonitor>
+std::unique_ptr<cc::SwapPromiseMonitor>
 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor(
     ui::LatencyInfo* latency) {
-  return scoped_ptr<cc::SwapPromiseMonitor>(
-      new cc::LatencyInfoSwapPromiseMonitor(
-          latency, layer_tree_host_.get(), NULL));
+  return std::unique_ptr<cc::SwapPromiseMonitor>(
+      new cc::LatencyInfoSwapPromiseMonitor(latency, layer_tree_host_.get(),
+                                            NULL));
 }
 
 void RenderWidgetCompositor::QueueSwapPromise(
-    scoped_ptr<cc::SwapPromise> swap_promise) {
+    std::unique_ptr<cc::SwapPromise> swap_promise) {
   layer_tree_host_->QueueSwapPromise(std::move(swap_promise));
 }
 
@@ -580,15 +580,15 @@
 
 int RenderWidgetCompositor::ScheduleMicroBenchmark(
     const std::string& name,
-    scoped_ptr<base::Value> value,
-    const base::Callback<void(scoped_ptr<base::Value>)>& callback) {
+    std::unique_ptr<base::Value> value,
+    const base::Callback<void(std::unique_ptr<base::Value>)>& callback) {
   return layer_tree_host_->ScheduleMicroBenchmark(name, std::move(value),
                                                   callback);
 }
 
 bool RenderWidgetCompositor::SendMessageToMicroBenchmark(
     int id,
-    scoped_ptr<base::Value> value) {
+    std::unique_ptr<base::Value> value) {
   return layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(value));
 }
 
@@ -782,9 +782,9 @@
 
 void CompositeAndReadbackAsyncCallback(
     blink::WebCompositeAndReadbackAsyncCallback* callback,
-    scoped_ptr<cc::CopyOutputResult> result) {
+    std::unique_ptr<cc::CopyOutputResult> result) {
   if (result->HasBitmap()) {
-    scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap();
+    std::unique_ptr<SkBitmap> result_bitmap = result->TakeBitmap();
     callback->didCompositeAndReadback(*result_bitmap);
   } else {
     callback->didCompositeAndReadback(SkBitmap());
@@ -950,7 +950,7 @@
 
   bool fallback =
       num_failed_recreate_attempts_ >= OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK;
-  scoped_ptr<cc::OutputSurface> surface(
+  std::unique_ptr<cc::OutputSurface> surface(
       delegate_->CreateOutputSurface(fallback));
 
   if (!surface) {
@@ -1030,8 +1030,10 @@
 }
 
 void RenderWidgetCompositor::RecordFrameTimingEvents(
-    scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<cc::FrameTimingTracker::CompositeTimingSet>
+        composite_events,
+    std::unique_ptr<cc::FrameTimingTracker::MainFrameTimingSet>
+        main_frame_events) {
   delegate_->RecordFrameTimingEvents(std::move(composite_events),
                                      std::move(main_frame_events));
 }
@@ -1045,7 +1047,7 @@
     const std::vector<uint8_t>& proto) {
   DCHECK(remote_proto_channel_receiver_);
 
-  scoped_ptr<cc::proto::CompositorMessage> deserialized(
+  std::unique_ptr<cc::proto::CompositorMessage> deserialized(
       new cc::proto::CompositorMessage);
   int signed_size = base::checked_cast<int>(proto.size());
   if (!deserialized->ParseFromArray(proto.data(), signed_size)) {
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index aacbfac8..a9b0f190 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -53,7 +53,7 @@
  public:
   // Attempt to construct and initialize a compositor instance for the widget
   // with the given settings. Returns NULL if initialization fails.
-  static scoped_ptr<RenderWidgetCompositor> Create(
+  static std::unique_ptr<RenderWidgetCompositor> Create(
       RenderWidgetCompositorDelegate* delegate,
       float device_scale_factor,
       CompositorDependencies* compositor_deps);
@@ -74,11 +74,11 @@
   // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or
   // SetNeedsUpdateLayers() is called on LayerTreeHost, the original latency
   // info will be turned into a LatencyInfoSwapPromise.
-  scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
+  std::unique_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
       ui::LatencyInfo* latency);
   // Calling QueueSwapPromise() to directly queue a SwapPromise into
   // LayerTreeHost.
-  void QueueSwapPromise(scoped_ptr<cc::SwapPromise> swap_promise);
+  void QueueSwapPromise(std::unique_ptr<cc::SwapPromise> swap_promise);
   int GetSourceFrameNumber() const;
   void SetNeedsUpdateLayers();
   void SetNeedsCommit();
@@ -86,9 +86,9 @@
   const cc::Layer* GetRootLayer() const;
   int ScheduleMicroBenchmark(
       const std::string& name,
-      scoped_ptr<base::Value> value,
-      const base::Callback<void(scoped_ptr<base::Value>)>& callback);
-  bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value);
+      std::unique_ptr<base::Value> value,
+      const base::Callback<void(std::unique_ptr<base::Value>)>& callback);
+  bool SendMessageToMicroBenchmark(int id, std::unique_ptr<base::Value> value);
   void SetSurfaceIdNamespace(uint32_t surface_id_namespace);
   void OnHandleCompositorProto(const std::vector<uint8_t>& proto);
   cc::ManagedMemoryPolicy GetGpuMemoryPolicy(
@@ -173,9 +173,10 @@
   void DidCompleteSwapBuffers() override;
   void DidCompletePageScaleAnimation() override;
   void RecordFrameTimingEvents(
-      scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events)
-      override;
+      std::unique_ptr<cc::FrameTimingTracker::CompositeTimingSet>
+          composite_events,
+      std::unique_ptr<cc::FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events) override;
 
   // cc::LayerTreeHostSingleThreadClient implementation.
   void RequestScheduleAnimation() override;
@@ -209,11 +210,11 @@
   int num_failed_recreate_attempts_;
   RenderWidgetCompositorDelegate* const delegate_;
   CompositorDependencies* const compositor_deps_;
-  scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
+  std::unique_ptr<cc::LayerTreeHost> layer_tree_host_;
   bool never_visible_;
 
   blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_;
-  scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_;
+  std::unique_ptr<cc::CopyOutputRequest> temporary_copy_output_request_;
 
   cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_;
 
diff --git a/content/renderer/gpu/render_widget_compositor_delegate.h b/content/renderer/gpu/render_widget_compositor_delegate.h
index cd2d53f..0755d0c6 100644
--- a/content/renderer/gpu/render_widget_compositor_delegate.h
+++ b/content/renderer/gpu/render_widget_compositor_delegate.h
@@ -36,10 +36,12 @@
   virtual void BeginMainFrame(double frame_time_sec) = 0;
 
   // Requests an OutputSurface to render into.
-  virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) = 0;
+  virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface(
+      bool fallback) = 0;
 
   // Requests an external BeginFrameSource from the delegate.
-  virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource() = 0;
+  virtual std::unique_ptr<cc::BeginFrameSource>
+  CreateExternalBeginFrameSource() = 0;
 
   // Notifies that the draw commands for a committed frame have been issued.
   virtual void DidCommitAndDrawCompositorFrame() = 0;
@@ -77,8 +79,9 @@
 
   // Called by the compositor to request the delegate to record frame timing.
   virtual void RecordFrameTimingEvents(
-      scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet>
+      std::unique_ptr<cc::FrameTimingTracker::CompositeTimingSet>
+          composite_events,
+      std::unique_ptr<cc::FrameTimingTracker::MainFrameTimingSet>
           main_frame_events) = 0;
 
   // Requests that the client schedule a composite now, and calculate
diff --git a/content/renderer/gpu/render_widget_compositor_unittest.cc b/content/renderer/gpu/render_widget_compositor_unittest.cc
index b217639..39e1f609 100644
--- a/content/renderer/gpu/render_widget_compositor_unittest.cc
+++ b/content/renderer/gpu/render_widget_compositor_unittest.cc
@@ -8,6 +8,7 @@
 
 #include "base/location.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/output/begin_frame_args.h"
@@ -71,9 +72,9 @@
  protected:
   base::MessageLoop loop_;
   MockRenderThread render_thread_;
-  scoped_ptr<FakeCompositorDependencies> compositor_deps_;
+  std::unique_ptr<FakeCompositorDependencies> compositor_deps_;
   scoped_refptr<TestRenderWidget> render_widget_;
-  scoped_ptr<RenderWidgetCompositor> render_widget_compositor_;
+  std::unique_ptr<RenderWidgetCompositor> render_widget_compositor_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetCompositorTest);
@@ -101,7 +102,8 @@
       : TestRenderWidget(compositor_deps), compositor_(NULL) {}
   void SetCompositor(RenderWidgetCompositorOutputSurface* compositor);
 
-  scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) override;
+  std::unique_ptr<cc::OutputSurface> CreateOutputSurface(
+      bool fallback) override;
 
  protected:
   ~RenderWidgetOutputSurface() override {}
@@ -137,14 +139,14 @@
 
   using RenderWidgetCompositor::Initialize;
 
-  scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) {
+  std::unique_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) {
     EXPECT_EQ(num_requests_since_last_success_ >
                   OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK,
               fallback);
     last_create_was_fallback_ = fallback;
     bool success = num_failures_ >= num_failures_before_success_;
     if (success) {
-      scoped_ptr<cc::TestWebGraphicsContext3D> context =
+      std::unique_ptr<cc::TestWebGraphicsContext3D> context =
           cc::TestWebGraphicsContext3D::Create();
       // Image support required for synchronous compositing.
       context->set_support_image(true);
@@ -153,7 +155,7 @@
     }
     return use_null_output_surface_
                ? nullptr
-               : make_scoped_ptr(new cc::FailureOutputSurface(true));
+               : base::WrapUnique(new cc::FailureOutputSurface(true));
   }
 
   // Force a new output surface to be created.
@@ -268,16 +270,17 @@
  protected:
   base::MessageLoop ye_olde_message_loope_;
   MockRenderThread render_thread_;
-  scoped_ptr<FakeCompositorDependencies> compositor_deps_;
+  std::unique_ptr<FakeCompositorDependencies> compositor_deps_;
   scoped_refptr<RenderWidgetOutputSurface> render_widget_;
-  scoped_ptr<RenderWidgetCompositorOutputSurface> render_widget_compositor_;
+  std::unique_ptr<RenderWidgetCompositorOutputSurface>
+      render_widget_compositor_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetCompositorOutputSurfaceTest);
 };
 
-scoped_ptr<cc::OutputSurface> RenderWidgetOutputSurface::CreateOutputSurface(
-    bool fallback) {
+std::unique_ptr<cc::OutputSurface>
+RenderWidgetOutputSurface::CreateOutputSurface(bool fallback) {
   return compositor_->CreateOutputSurface(fallback);
 }
 
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc
index 12d0f1b8..c8553ff2 100644
--- a/content/renderer/history_controller.cc
+++ b/content/renderer/history_controller.cc
@@ -37,6 +37,7 @@
 
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "content/common/navigation_params.h"
 #include "content/common/site_isolation_policy.h"
 #include "content/renderer/render_frame_impl.h"
@@ -63,8 +64,8 @@
 
 bool HistoryController::GoToEntry(
     blink::WebLocalFrame* main_frame,
-    scoped_ptr<HistoryEntry> target_entry,
-    scoped_ptr<NavigationParams> navigation_params,
+    std::unique_ptr<HistoryEntry> target_entry,
+    std::unique_ptr<NavigationParams> navigation_params,
     WebCachePolicy cache_policy) {
   DCHECK(!main_frame->parent());
   HistoryFrameLoadVector same_document_loads;
@@ -96,8 +97,8 @@
     RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
     if (!render_frame)
       continue;
-    render_frame->SetPendingNavigationParams(make_scoped_ptr(
-        new NavigationParams(*navigation_params_.get())));
+    render_frame->SetPendingNavigationParams(
+        base::WrapUnique(new NavigationParams(*navigation_params_.get())));
     WebURLRequest request = frame->toWebLocalFrame()->requestFromHistoryItem(
         item.second, cache_policy);
     frame->toWebLocalFrame()->load(
@@ -111,8 +112,8 @@
     RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
     if (!render_frame)
       continue;
-    render_frame->SetPendingNavigationParams(make_scoped_ptr(
-        new NavigationParams(*navigation_params_.get())));
+    render_frame->SetPendingNavigationParams(
+        base::WrapUnique(new NavigationParams(*navigation_params_.get())));
     WebURLRequest request = frame->toWebLocalFrame()->requestFromHistoryItem(
         item.second, cache_policy);
     frame->toWebLocalFrame()->load(
@@ -226,8 +227,8 @@
 WebHistoryItem HistoryController::GetItemForNewChildFrame(
     RenderFrameImpl* frame) const {
   if (navigation_params_.get()) {
-    frame->SetPendingNavigationParams(make_scoped_ptr(
-        new NavigationParams(*navigation_params_.get())));
+    frame->SetPendingNavigationParams(
+        base::WrapUnique(new NavigationParams(*navigation_params_.get())));
   }
 
   if (!current_entry_)
diff --git a/content/renderer/history_controller.h b/content/renderer/history_controller.h
index 7787efb..ff205967 100644
--- a/content/renderer/history_controller.h
+++ b/content/renderer/history_controller.h
@@ -35,11 +35,11 @@
 #ifndef CONTENT_RENDERER_HISTORY_CONTROLLER_H_
 #define CONTENT_RENDERER_HISTORY_CONTROLLER_H_
 
+#include <memory>
 #include <utility>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/renderer/history_entry.h"
 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
@@ -113,15 +113,15 @@
   explicit HistoryController(RenderViewImpl* render_view);
   ~HistoryController();
 
-  void set_provisional_entry(scoped_ptr<HistoryEntry> entry) {
+  void set_provisional_entry(std::unique_ptr<HistoryEntry> entry) {
     provisional_entry_ = std::move(entry);
   }
 
   // Return true if the main frame ended up loading a request as part of the
   // history navigation.
   bool GoToEntry(blink::WebLocalFrame* main_frame,
-                 scoped_ptr<HistoryEntry> entry,
-                 scoped_ptr<NavigationParams> navigation_params,
+                 std::unique_ptr<HistoryEntry> entry,
+                 std::unique_ptr<NavigationParams> navigation_params,
                  blink::WebCachePolicy cache_policy);
 
   void UpdateForCommit(RenderFrameImpl* frame,
@@ -149,16 +149,16 @@
   RenderViewImpl* render_view_;
 
   // A HistoryEntry representing the currently-loaded page.
-  scoped_ptr<HistoryEntry> current_entry_;
+  std::unique_ptr<HistoryEntry> current_entry_;
   // A HistoryEntry representing the page that is being loaded, or an empty
   // scoped_ptr if no page is being loaded.
-  scoped_ptr<HistoryEntry> provisional_entry_;
+  std::unique_ptr<HistoryEntry> provisional_entry_;
   // The NavigationParams corresponding to the last load that was initiated by
   // |GoToEntry|. This is kept around so that it can be passed into existing
   // frames modified during a history navigation in GoToEntry(), and can be
   // passed into frames created after the commit that resulted from the
   // navigation in GetItemForNewChildFrame().
-  scoped_ptr<NavigationParams> navigation_params_;
+  std::unique_ptr<NavigationParams> navigation_params_;
 
   DISALLOW_COPY_AND_ASSIGN(HistoryController);
 };
diff --git a/content/renderer/history_entry.h b/content/renderer/history_entry.h
index 4209d72..22c988a 100644
--- a/content/renderer/history_entry.h
+++ b/content/renderer/history_entry.h
@@ -35,8 +35,9 @@
 #ifndef CONTENT_RENDERER_HISTORY_ENTRY_H_
 #define CONTENT_RENDERER_HISTORY_ENTRY_H_
 
+#include <memory>
+
 #include "base/containers/hash_tables.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
@@ -77,7 +78,7 @@
     // a dying HistoryEntry, or do unnecessary work when the whole entry is
     // being destroyed.
     base::WeakPtr<HistoryEntry> entry_;
-    scoped_ptr<ScopedVector<HistoryNode> > children_;
+    std::unique_ptr<ScopedVector<HistoryNode>> children_;
     blink::WebHistoryItem item_;
     // We need to track multiple names because the name of a frame can change
     // over its lifetime. This allows us to clean up all of the names this node
@@ -100,7 +101,7 @@
   HistoryNode* root_history_node() const { return root_.get(); }
 
  private:
-  scoped_ptr<HistoryNode> root_;
+  std::unique_ptr<HistoryNode> root_;
 
   typedef base::hash_map<std::string, HistoryNode*> UniqueNamesToItems;
   UniqueNamesToItems unique_names_to_items_;
diff --git a/content/renderer/history_serialization.cc b/content/renderer/history_serialization.cc
index f227ed3..0a4376c 100644
--- a/content/renderer/history_serialization.cc
+++ b/content/renderer/history_serialization.cc
@@ -198,12 +198,13 @@
   return PageState::CreateFromEncodedData(encoded_data);
 }
 
-scoped_ptr<HistoryEntry> PageStateToHistoryEntry(const PageState& page_state) {
+std::unique_ptr<HistoryEntry> PageStateToHistoryEntry(
+    const PageState& page_state) {
   ExplodedPageState state;
   if (!DecodePageState(page_state.ToEncodedData(), &state))
-    return scoped_ptr<HistoryEntry>();
+    return std::unique_ptr<HistoryEntry>();
 
-  scoped_ptr<HistoryEntry> entry(new HistoryEntry());
+  std::unique_ptr<HistoryEntry> entry(new HistoryEntry());
   RecursivelyGenerateHistoryItem(state.top, entry->root_history_node());
 
   return entry;
diff --git a/content/renderer/history_serialization.h b/content/renderer/history_serialization.h
index e9752af0..c9f4fe9 100644
--- a/content/renderer/history_serialization.h
+++ b/content/renderer/history_serialization.h
@@ -5,9 +5,9 @@
 #ifndef CONTENT_RENDERER_HISTORY_SERIALIZATION_H_
 #define CONTENT_RENDERER_HISTORY_SERIALIZATION_H_
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
 namespace blink {
@@ -21,7 +21,7 @@
 CONTENT_EXPORT PageState HistoryEntryToPageState(HistoryEntry* entry);
 CONTENT_EXPORT PageState SingleHistoryItemToPageState(
     const blink::WebHistoryItem& item);
-CONTENT_EXPORT scoped_ptr<HistoryEntry> PageStateToHistoryEntry(
+CONTENT_EXPORT std::unique_ptr<HistoryEntry> PageStateToHistoryEntry(
     const PageState& state);
 
 }  // namespace content
diff --git a/content/renderer/in_process_renderer_thread.h b/content/renderer/in_process_renderer_thread.h
index d7d0e718..73ae552 100644
--- a/content/renderer/in_process_renderer_thread.h
+++ b/content/renderer/in_process_renderer_thread.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
 #define CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread.h"
 #include "content/common/content_export.h"
 #include "content/common/in_process_child_thread_params.h"
@@ -29,7 +29,7 @@
 
  private:
   InProcessChildThreadParams params_;
-  scoped_ptr<RenderProcess> render_process_;
+  std::unique_ptr<RenderProcess> render_process_;
 
   DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread);
 };
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index 543e62a..e62ee2c 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -9,6 +9,7 @@
 #include "base/auto_reset.h"
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/memory/ptr_util.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
@@ -77,12 +78,12 @@
     return;
   }
 
-  SendMessage(scoped_ptr<IPC::Message>(
+  SendMessage(std::unique_ptr<IPC::Message>(
       new InputHostMsg_DidOverscroll(routing_id, params)));
 }
 
 void InputEventFilter::DidStopFlinging(int routing_id) {
-  SendMessage(make_scoped_ptr(new InputHostMsg_DidStopFlinging(routing_id)));
+  SendMessage(base::WrapUnique(new InputHostMsg_DidStopFlinging(routing_id)));
 }
 
 void InputEventFilter::NotifyInputEventHandled(
@@ -170,8 +171,8 @@
 
   // Intercept |DidOverscroll| notifications, bundling any triggered overscroll
   // response with the input event ack.
-  scoped_ptr<DidOverscrollParams> overscroll_params;
-  base::AutoReset<scoped_ptr<DidOverscrollParams>*>
+  std::unique_ptr<DidOverscrollParams> overscroll_params;
+  base::AutoReset<std::unique_ptr<DidOverscrollParams>*>
       auto_reset_current_overscroll_params(
           &current_overscroll_params_, send_ack ? &overscroll_params : NULL);
 
@@ -192,11 +193,11 @@
   InputEventAck ack(event->type, ack_state, latency_info,
                     std::move(overscroll_params),
                     WebInputEventTraits::GetUniqueTouchEventId(*event));
-  SendMessage(scoped_ptr<IPC::Message>(
+  SendMessage(std::unique_ptr<IPC::Message>(
       new InputHostMsg_HandleInputEvent_ACK(routing_id, ack)));
 }
 
-void InputEventFilter::SendMessage(scoped_ptr<IPC::Message> message) {
+void InputEventFilter::SendMessage(std::unique_ptr<IPC::Message> message) {
   DCHECK(target_task_runner_->BelongsToCurrentThread());
 
   io_task_runner_->PostTask(
@@ -204,7 +205,8 @@
                             base::Passed(&message)));
 }
 
-void InputEventFilter::SendMessageOnIOThread(scoped_ptr<IPC::Message> message) {
+void InputEventFilter::SendMessageOnIOThread(
+    std::unique_ptr<IPC::Message> message) {
   DCHECK(io_task_runner_->BelongsToCurrentThread());
 
   if (!sender_)
diff --git a/content/renderer/input/input_event_filter.h b/content/renderer/input/input_event_filter.h
index ed93fa4e..6457fb61 100644
--- a/content/renderer/input/input_event_filter.h
+++ b/content/renderer/input/input_event_filter.h
@@ -85,8 +85,8 @@
   ~InputEventFilter() override;
 
   void ForwardToHandler(const IPC::Message& message);
-  void SendMessage(scoped_ptr<IPC::Message> message);
-  void SendMessageOnIOThread(scoped_ptr<IPC::Message> message);
+  void SendMessage(std::unique_ptr<IPC::Message> message);
+  void SendMessageOnIOThread(std::unique_ptr<IPC::Message> message);
 
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
   base::Callback<void(const IPC::Message&)> main_listener_;
@@ -106,14 +106,14 @@
   std::set<int> routes_;
 
   using RouteQueueMap =
-      std::unordered_map<int, scoped_ptr<MainThreadEventQueue>>;
+      std::unordered_map<int, std::unique_ptr<MainThreadEventQueue>>;
   RouteQueueMap route_queues_;
 
   // Used to intercept overscroll notifications while an event is being
   // dispatched.  If the event causes overscroll, the overscroll metadata can be
   // bundled in the event ack, saving an IPC.  Note that we must continue
   // supporting overscroll IPC notifications due to fling animation updates.
-  scoped_ptr<DidOverscrollParams>* current_overscroll_params_;
+  std::unique_ptr<DidOverscrollParams>* current_overscroll_params_;
 };
 
 }  // namespace content
diff --git a/content/renderer/input/input_handler_manager.cc b/content/renderer/input/input_handler_manager.cc
index 092e428..74e8a4ae 100644
--- a/content/renderer/input/input_handler_manager.cc
+++ b/content/renderer/input/input_handler_manager.cc
@@ -104,7 +104,7 @@
   TRACE_EVENT1("input",
       "InputHandlerManager::AddInputHandlerOnCompositorThread",
       "result", "AddingRoute");
-  scoped_ptr<InputHandlerWrapper> wrapper(new InputHandlerWrapper(
+  std::unique_ptr<InputHandlerWrapper> wrapper(new InputHandlerWrapper(
       this, routing_id, main_task_runner, input_handler, render_view_impl,
       enable_smooth_scrolling, enable_wheel_gestures));
   client_->DidAddInputHandler(routing_id);
diff --git a/content/renderer/input/input_handler_manager.h b/content/renderer/input/input_handler_manager.h
index 948759c0..f9ec3520 100644
--- a/content/renderer/input/input_handler_manager.h
+++ b/content/renderer/input/input_handler_manager.h
@@ -114,7 +114,7 @@
                                                  blink::WebInputEvent::Type);
 
   typedef base::ScopedPtrHashMap<int,  // routing_id
-                                 scoped_ptr<InputHandlerWrapper>>
+                                 std::unique_ptr<InputHandlerWrapper>>
       InputHandlerMap;
   InputHandlerMap input_handlers_;
 
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc
index d57e69c..d2af3e28 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -77,7 +77,7 @@
 void MainThreadEventQueue::EventHandled(blink::WebInputEvent::Type type) {
   if (type == blink::WebInputEvent::MouseWheel) {
     if (!wheel_events_.empty()) {
-      scoped_ptr<PendingMouseWheelEvent> event = wheel_events_.Pop();
+      std::unique_ptr<PendingMouseWheelEvent> event = wheel_events_.Pop();
       client_->SendEventToMainThread(routing_id_, &event->event, event->latency,
                                      event->type);
     } else {
@@ -85,7 +85,7 @@
     }
   } else if (blink::WebInputEvent::isTouchEventType(type)) {
     if (!touch_events_.empty()) {
-      scoped_ptr<PendingTouchEvent> event = touch_events_.Pop();
+      std::unique_ptr<PendingTouchEvent> event = touch_events_.Pop();
       client_->SendEventToMainThread(routing_id_, &event->event, event->latency,
                                      event->type);
     } else {
diff --git a/content/renderer/input/render_widget_input_handler.cc b/content/renderer/input/render_widget_input_handler.cc
index 90734376..e407428 100644
--- a/content/renderer/input/render_widget_input_handler.cc
+++ b/content/renderer/input/render_widget_input_handler.cc
@@ -188,8 +188,8 @@
 
   // Calls into |didOverscroll()| while handling this event will populate
   // |event_overscroll|, which in turn will be bundled with the event ack.
-  scoped_ptr<DidOverscrollParams> event_overscroll;
-  base::AutoReset<scoped_ptr<DidOverscrollParams>*>
+  std::unique_ptr<DidOverscrollParams> event_overscroll;
+  base::AutoReset<std::unique_ptr<DidOverscrollParams>*>
       handling_event_overscroll_resetter(&handling_event_overscroll_,
                                          &event_overscroll);
 
@@ -241,7 +241,7 @@
   if (!start_time.is_null())
     LogInputEventLatencyUma(input_event, start_time);
 
-  scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
+  std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
   ui::LatencyInfo swap_latency_info(latency_info);
 
   if (widget_->compositor()) {
@@ -411,7 +411,7 @@
   if ((dispatch_type == DISPATCH_TYPE_BLOCKING ||
        dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) &&
       can_send_ack) {
-    scoped_ptr<InputEventAck> response(new InputEventAck(
+    std::unique_ptr<InputEventAck> response(new InputEventAck(
         input_event.type, ack_result, swap_latency_info,
         std::move(event_overscroll),
         WebInputEventTraits::GetUniqueTouchEventId(input_event)));
@@ -489,7 +489,7 @@
     const WebFloatSize& accumulatedRootOverScroll,
     const WebFloatPoint& position,
     const WebFloatSize& velocity) {
-  scoped_ptr<DidOverscrollParams> params(new DidOverscrollParams());
+  std::unique_ptr<DidOverscrollParams> params(new DidOverscrollParams());
   params->accumulated_overscroll = gfx::Vector2dF(
       accumulatedRootOverScroll.width, accumulatedRootOverScroll.height);
   params->latest_overscroll_delta =
@@ -515,7 +515,7 @@
     // If we pause multiple times during a single mouse move event, we should
     // only send ACK once.
     if (!ignore_ack_for_mouse_move_from_debugger_) {
-      scoped_ptr<InputEventAck> ack(new InputEventAck(
+      std::unique_ptr<InputEventAck> ack(new InputEventAck(
           handling_event_type_, INPUT_EVENT_ACK_STATE_CONSUMED));
       delegate_->OnInputEventAck(std::move(ack));
       return true;
diff --git a/content/renderer/input/render_widget_input_handler.h b/content/renderer/input/render_widget_input_handler.h
index a82968bf..c74459a 100644
--- a/content/renderer/input/render_widget_input_handler.h
+++ b/content/renderer/input/render_widget_input_handler.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_
 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "content/common/input/did_overscroll_params.h"
 #include "content/common/input/input_event_ack.h"
@@ -88,7 +89,7 @@
   // handled. If the event causes overscroll, the overscroll metadata can be
   // bundled in the event ack, saving an IPC.  Note that we must continue
   // supporting overscroll IPC notifications due to fling animation updates.
-  scoped_ptr<DidOverscrollParams>* handling_event_overscroll_;
+  std::unique_ptr<DidOverscrollParams>* handling_event_overscroll_;
 
   // Type of the input event we are currently handling.
   blink::WebInputEvent::Type handling_event_type_;
@@ -104,7 +105,7 @@
   // Whether we should not send ack for the current mouse move.
   bool ignore_ack_for_mouse_move_from_debugger_;
 
-  scoped_ptr<InputEventAck> pending_input_event_ack_;
+  std::unique_ptr<InputEventAck> pending_input_event_ack_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler);
 };
diff --git a/content/renderer/input/render_widget_input_handler_delegate.h b/content/renderer/input/render_widget_input_handler_delegate.h
index 9f49294c..4c42d8a 100644
--- a/content/renderer/input/render_widget_input_handler_delegate.h
+++ b/content/renderer/input/render_widget_input_handler_delegate.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_DELEGATE_H_
 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_DELEGATE_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/common/content_export.h"
 #include "content/common/input/input_event_ack.h"
 
@@ -63,7 +64,8 @@
   virtual void OnDidOverscroll(const DidOverscrollParams& params) = 0;
 
   // Called when an ACK is ready to be sent to the input event provider.
-  virtual void OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) = 0;
+  virtual void OnInputEventAck(
+      std::unique_ptr<InputEventAck> input_event_ack) = 0;
 
   // Called when an event with a notify dispatch type
   // (DISPATCH_TYPE_*_NOTIFY_MAIN) of |handled_type| has been processed
diff --git a/content/renderer/internal_document_state_data.h b/content/renderer/internal_document_state_data.h
index 3963daea..34e275d7 100644
--- a/content/renderer/internal_document_state_data.h
+++ b/content/renderer/internal_document_state_data.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_
 #define CONTENT_RENDERER_INTERNAL_DOCUMENT_STATE_DATA_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/supports_user_data.h"
 #include "third_party/WebKit/public/platform/WebCachePolicy.h"
 #include "url/gurl.h"
diff --git a/content/renderer/java/gin_java_bridge_dispatcher.cc b/content/renderer/java/gin_java_bridge_dispatcher.cc
index 820c6ce3..0d6d0735 100644
--- a/content/renderer/java/gin_java_bridge_dispatcher.cc
+++ b/content/renderer/java/gin_java_bridge_dispatcher.cc
@@ -92,7 +92,7 @@
   return result;
 }
 
-scoped_ptr<base::Value> GinJavaBridgeDispatcher::InvokeJavaMethod(
+std::unique_ptr<base::Value> GinJavaBridgeDispatcher::InvokeJavaMethod(
     ObjectID object_id,
     const std::string& method_name,
     const base::ListValue& arguments,
@@ -107,9 +107,9 @@
                                             error));
   base::Value* result;
   if (result_wrapper.Get(0, &result)) {
-    return scoped_ptr<base::Value>(result->DeepCopy());
+    return std::unique_ptr<base::Value>(result->DeepCopy());
   } else {
-    return scoped_ptr<base::Value>();
+    return std::unique_ptr<base::Value>();
   }
 }
 
diff --git a/content/renderer/java/gin_java_bridge_dispatcher.h b/content/renderer/java/gin_java_bridge_dispatcher.h
index 05e1427..f795c28 100644
--- a/content/renderer/java/gin_java_bridge_dispatcher.h
+++ b/content/renderer/java/gin_java_bridge_dispatcher.h
@@ -6,11 +6,11 @@
 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_
 
 #include <map>
+#include <memory>
 #include <set>
 
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"
 #include "content/common/android/gin_java_bridge_errors.h"
@@ -50,10 +50,11 @@
 
   void GetJavaMethods(ObjectID object_id, std::set<std::string>* methods);
   bool HasJavaMethod(ObjectID object_id, const std::string& method_name);
-  scoped_ptr<base::Value> InvokeJavaMethod(ObjectID object_id,
-                                           const std::string& method_name,
-                                           const base::ListValue& arguments,
-                                           GinJavaBridgeError* error);
+  std::unique_ptr<base::Value> InvokeJavaMethod(
+      ObjectID object_id,
+      const std::string& method_name,
+      const base::ListValue& arguments,
+      GinJavaBridgeError* error);
   GinJavaBridgeObject* GetObject(ObjectID object_id);
   void OnGinJavaBridgeObjectDeleted(GinJavaBridgeObject* object);
 
diff --git a/content/renderer/java/gin_java_bridge_value_converter.cc b/content/renderer/java/gin_java_bridge_value_converter.cc
index 78dd76e..527b541c 100644
--- a/content/renderer/java/gin_java_bridge_value_converter.cc
+++ b/content/renderer/java/gin_java_bridge_value_converter.cc
@@ -10,6 +10,7 @@
 #include <cmath>
 
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "content/common/android/gin_java_bridge_value.h"
 #include "content/renderer/java/gin_java_bridge_object.h"
@@ -34,10 +35,10 @@
   return converter_->ToV8Value(value, context);
 }
 
-scoped_ptr<base::Value> GinJavaBridgeValueConverter::FromV8Value(
+std::unique_ptr<base::Value> GinJavaBridgeValueConverter::FromV8Value(
     v8::Local<v8::Value> value,
     v8::Local<v8::Context> context) const {
-  return make_scoped_ptr(converter_->FromV8Value(value, context));
+  return base::WrapUnique(converter_->FromV8Value(value, context));
 }
 
 bool GinJavaBridgeValueConverter::FromV8Object(
@@ -59,7 +60,7 @@
 class TypedArraySerializer {
  public:
   virtual ~TypedArraySerializer() {}
-  static scoped_ptr<TypedArraySerializer> Create(
+  static std::unique_ptr<TypedArraySerializer> Create(
       v8::Local<v8::TypedArray> typed_array);
   virtual void serializeTo(char* data,
                            size_t data_length,
@@ -71,9 +72,9 @@
 template <typename ElementType, typename ListType>
 class TypedArraySerializerImpl : public TypedArraySerializer {
  public:
-  static scoped_ptr<TypedArraySerializer> Create(
+  static std::unique_ptr<TypedArraySerializer> Create(
       v8::Local<v8::TypedArray> typed_array) {
-    return make_scoped_ptr(
+    return base::WrapUnique(
         new TypedArraySerializerImpl<ElementType, ListType>(typed_array));
   }
 
@@ -100,7 +101,7 @@
 };
 
 // static
-scoped_ptr<TypedArraySerializer> TypedArraySerializer::Create(
+std::unique_ptr<TypedArraySerializer> TypedArraySerializer::Create(
     v8::Local<v8::TypedArray> typed_array) {
   if (typed_array->IsInt8Array() ||
       typed_array->IsUint8Array() ||
@@ -116,7 +117,7 @@
     return TypedArraySerializerImpl<double, double>::Create(typed_array);
   }
   NOTREACHED();
-  return scoped_ptr<TypedArraySerializer>();
+  return std::unique_ptr<TypedArraySerializer>();
 }
 
 }  // namespace
@@ -144,7 +145,7 @@
 
   base::ListValue* result = new base::ListValue();
   *out = result;
-  scoped_ptr<TypedArraySerializer> serializer(
+  std::unique_ptr<TypedArraySerializer> serializer(
       TypedArraySerializer::Create(value.As<v8::TypedArray>()));
   serializer->serializeTo(data, data_length, result);
   return true;
diff --git a/content/renderer/java/gin_java_bridge_value_converter.h b/content/renderer/java/gin_java_bridge_value_converter.h
index 5c4ee984..2e48f19 100644
--- a/content/renderer/java/gin_java_bridge_value_converter.h
+++ b/content/renderer/java/gin_java_bridge_value_converter.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/child/v8_value_converter.h"
 
@@ -20,7 +21,7 @@
   CONTENT_EXPORT v8::Local<v8::Value> ToV8Value(
       const base::Value* value,
       v8::Local<v8::Context> context) const;
-  CONTENT_EXPORT scoped_ptr<base::Value> FromV8Value(
+  CONTENT_EXPORT std::unique_ptr<base::Value> FromV8Value(
       v8::Local<v8::Value> value,
       v8::Local<v8::Context> context) const;
 
@@ -37,7 +38,7 @@
   bool FromV8Undefined(base::Value** out) const override;
 
  private:
-  scoped_ptr<V8ValueConverter> converter_;
+  std::unique_ptr<V8ValueConverter> converter_;
 
   DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeValueConverter);
 };
diff --git a/content/renderer/java/gin_java_bridge_value_converter_unittest.cc b/content/renderer/java/gin_java_bridge_value_converter_unittest.cc
index 33c3222..e766c0752 100644
--- a/content/renderer/java/gin_java_bridge_value_converter_unittest.cc
+++ b/content/renderer/java/gin_java_bridge_value_converter_unittest.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/java/gin_java_bridge_value_converter.h"
+
 #include <stddef.h>
 
 #include <cmath>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "content/common/android/gin_java_bridge_value.h"
-#include "content/renderer/java/gin_java_bridge_value_converter.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
 
@@ -43,27 +44,27 @@
       v8::Local<v8::Context>::New(isolate_, context_);
   v8::Context::Scope context_scope(context);
 
-  scoped_ptr<GinJavaBridgeValueConverter> converter(
+  std::unique_ptr<GinJavaBridgeValueConverter> converter(
       new GinJavaBridgeValueConverter());
 
   v8::Local<v8::Primitive> v8_undefined(v8::Undefined(isolate_));
-  scoped_ptr<base::Value> undefined(
+  std::unique_ptr<base::Value> undefined(
       converter->FromV8Value(v8_undefined, context));
   ASSERT_TRUE(undefined.get());
   EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(undefined.get()));
-  scoped_ptr<const GinJavaBridgeValue> undefined_value(
+  std::unique_ptr<const GinJavaBridgeValue> undefined_value(
       GinJavaBridgeValue::FromValue(undefined.get()));
   ASSERT_TRUE(undefined_value.get());
   EXPECT_TRUE(undefined_value->IsType(GinJavaBridgeValue::TYPE_UNDEFINED));
 
   v8::Local<v8::Number> v8_infinity(
       v8::Number::New(isolate_, std::numeric_limits<double>::infinity()));
-  scoped_ptr<base::Value> infinity(
+  std::unique_ptr<base::Value> infinity(
       converter->FromV8Value(v8_infinity, context));
   ASSERT_TRUE(infinity.get());
   EXPECT_TRUE(
       GinJavaBridgeValue::ContainsGinJavaBridgeValue(infinity.get()));
-  scoped_ptr<const GinJavaBridgeValue> infinity_value(
+  std::unique_ptr<const GinJavaBridgeValue> infinity_value(
       GinJavaBridgeValue::FromValue(infinity.get()));
   ASSERT_TRUE(infinity_value.get());
   float native_float;
@@ -79,16 +80,16 @@
       v8::Local<v8::Context>::New(isolate_, context_);
   v8::Context::Scope context_scope(context);
 
-  scoped_ptr<GinJavaBridgeValueConverter> converter(
+  std::unique_ptr<GinJavaBridgeValueConverter> converter(
       new GinJavaBridgeValueConverter());
 
   v8::Local<v8::ArrayBuffer> v8_array_buffer(
       v8::ArrayBuffer::New(isolate_, 0));
-  scoped_ptr<base::Value> undefined(
+  std::unique_ptr<base::Value> undefined(
       converter->FromV8Value(v8_array_buffer, context));
   ASSERT_TRUE(undefined.get());
   EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(undefined.get()));
-  scoped_ptr<const GinJavaBridgeValue> undefined_value(
+  std::unique_ptr<const GinJavaBridgeValue> undefined_value(
       GinJavaBridgeValue::FromValue(undefined.get()));
   ASSERT_TRUE(undefined_value.get());
   EXPECT_TRUE(undefined_value->IsType(GinJavaBridgeValue::TYPE_UNDEFINED));
@@ -102,7 +103,7 @@
   v8::MicrotasksScope microtasks_scope(
       isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
 
-  scoped_ptr<GinJavaBridgeValueConverter> converter(
+  std::unique_ptr<GinJavaBridgeValueConverter> converter(
       new GinJavaBridgeValueConverter());
 
   const char* source_template = "(function() {"
@@ -124,7 +125,7 @@
         base::StringPrintf(
             source_template, array_types[i], typed_array_type).c_str())));
     v8::Local<v8::Value> v8_typed_array = script->Run();
-    scoped_ptr<base::Value> list_value(
+    std::unique_ptr<base::Value> list_value(
         converter->FromV8Value(v8_typed_array, context));
     ASSERT_TRUE(list_value.get()) << typed_array_type;
     EXPECT_TRUE(list_value->IsType(base::Value::TYPE_LIST)) << typed_array_type;
diff --git a/content/renderer/java/gin_java_function_invocation_helper.cc b/content/renderer/java/gin_java_function_invocation_helper.cc
index 428a954..c1729e5 100644
--- a/content/renderer/java/gin_java_function_invocation_helper.cc
+++ b/content/renderer/java/gin_java_function_invocation_helper.cc
@@ -61,7 +61,7 @@
     v8::Local<v8::Context> context = args->isolate()->GetCurrentContext();
     v8::Local<v8::Value> val;
     while (args->GetNext(&val)) {
-      scoped_ptr<base::Value> arg(converter_->FromV8Value(val, context));
+      std::unique_ptr<base::Value> arg(converter_->FromV8Value(val, context));
       if (arg.get()) {
         arguments.Append(arg.release());
       } else {
@@ -71,7 +71,7 @@
   }
 
   GinJavaBridgeError error;
-  scoped_ptr<base::Value> result = dispatcher_->InvokeJavaMethod(
+  std::unique_ptr<base::Value> result = dispatcher_->InvokeJavaMethod(
       object->object_id(), method_name_, arguments, &error);
   if (!result.get()) {
     args->isolate()->ThrowException(v8::Exception::Error(gin::StringToV8(
@@ -83,7 +83,7 @@
                                  args->isolate()->GetCurrentContext());
   }
 
-  scoped_ptr<const GinJavaBridgeValue> gin_value =
+  std::unique_ptr<const GinJavaBridgeValue> gin_value =
       GinJavaBridgeValue::FromValue(result.get());
   if (gin_value->IsType(GinJavaBridgeValue::TYPE_OBJECT_ID)) {
     GinJavaBridgeObject* result = NULL;
diff --git a/content/renderer/java/gin_java_function_invocation_helper.h b/content/renderer/java/gin_java_function_invocation_helper.h
index 823420d5..b74083c 100644
--- a/content/renderer/java/gin_java_function_invocation_helper.h
+++ b/content/renderer/java/gin_java_function_invocation_helper.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_
 #define CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/renderer/java/gin_java_bridge_dispatcher.h"
 #include "gin/arguments.h"
@@ -28,7 +29,7 @@
  private:
   std::string method_name_;
   base::WeakPtr<GinJavaBridgeDispatcher> dispatcher_;
-  scoped_ptr<GinJavaBridgeValueConverter> converter_;
+  std::unique_ptr<GinJavaBridgeValueConverter> converter_;
 
   DISALLOW_COPY_AND_ASSIGN(GinJavaFunctionInvocationHelper);
 };
diff --git a/content/renderer/manifest/manifest_manager.cc b/content/renderer/manifest/manifest_manager.cc
index dcdf176..fda8c835 100644
--- a/content/renderer/manifest/manifest_manager.cc
+++ b/content/renderer/manifest/manifest_manager.cc
@@ -160,7 +160,7 @@
 
   fetcher_.reset();
 
-  for (const scoped_ptr<ManifestParser::ErrorInfo>& error_info :
+  for (const std::unique_ptr<ManifestParser::ErrorInfo>& error_info :
        parser.errors()) {
     blink::WebConsoleMessage message;
     message.level = blink::WebConsoleMessage::LevelError;
diff --git a/content/renderer/manifest/manifest_manager.h b/content/renderer/manifest/manifest_manager.h
index f78482f3..88304bbe 100644
--- a/content/renderer/manifest/manifest_manager.h
+++ b/content/renderer/manifest/manifest_manager.h
@@ -6,10 +6,10 @@
 #define CONTENT_RENDERER_MANIFEST_MANIFEST_MANAGER_H_
 
 #include <list>
+#include <memory>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/common/manifest.h"
 #include "content/public/renderer/render_frame_observer.h"
 
@@ -64,7 +64,7 @@
                                const std::string& data);
   void ResolveCallbacks(ResolveState state);
 
-  scoped_ptr<ManifestFetcher> fetcher_;
+  std::unique_ptr<ManifestFetcher> fetcher_;
 
   // Whether the RenderFrame may have an associated Manifest. If true, the frame
   // may have a manifest, if false, it can't have one. This boolean is true when
diff --git a/content/renderer/media/aec_dump_message_filter.h b/content/renderer/media/aec_dump_message_filter.h
index 0fb0cf930..a211a8ae 100644
--- a/content/renderer/media/aec_dump_message_filter.h
+++ b/content/renderer/media/aec_dump_message_filter.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_MEDIA_AEC_DUMP_MESSAGE_FILTER_H_
 #define CONTENT_RENDERER_MEDIA_AEC_DUMP_MESSAGE_FILTER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/renderer/render_thread_impl.h"
 #include "ipc/ipc_platform_file.h"
diff --git a/content/renderer/media/android/media_info_loader.cc b/content/renderer/media/android/media_info_loader.cc
index cf1764a..25a907f6 100644
--- a/content/renderer/media/android/media_info_loader.cc
+++ b/content/renderer/media/android/media_info_loader.cc
@@ -59,7 +59,7 @@
   // worse than the previous request+cancel code.  See http://crbug.com/400788
   request.addHTTPHeaderField("Range", "bytes=0-1");
 
-  scoped_ptr<WebURLLoader> loader;
+  std::unique_ptr<WebURLLoader> loader;
   if (test_loader_) {
     loader = std::move(test_loader_);
   } else {
diff --git a/content/renderer/media/android/media_info_loader.h b/content/renderer/media/android/media_info_loader.h
index d09ac13..99c35e2 100644
--- a/content/renderer/media/android/media_info_loader.h
+++ b/content/renderer/media/android/media_info_loader.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "media/blink/active_loader.h"
@@ -106,10 +106,10 @@
   void DidBecomeReady(Status status);
 
   // Injected WebURLLoader instance for testing purposes.
-  scoped_ptr<blink::WebURLLoader> test_loader_;
+  std::unique_ptr<blink::WebURLLoader> test_loader_;
 
   // Keeps track of an active WebURLLoader and associated state.
-  scoped_ptr<media::ActiveLoader> active_loader_;
+  std::unique_ptr<media::ActiveLoader> active_loader_;
 
   bool loader_failed_;
   GURL url_;
diff --git a/content/renderer/media/android/media_info_loader_unittest.cc b/content/renderer/media/android/media_info_loader_unittest.cc
index 8438924..306ccdb 100644
--- a/content/renderer/media/android/media_info_loader_unittest.cc
+++ b/content/renderer/media/android/media_info_loader_unittest.cc
@@ -62,7 +62,7 @@
 
     // |test_loader_| will be used when Start() is called.
     url_loader_ = new NiceMock<MockWebURLLoader>();
-    loader_->test_loader_ = scoped_ptr<blink::WebURLLoader>(url_loader_);
+    loader_->test_loader_ = std::unique_ptr<blink::WebURLLoader>(url_loader_);
   }
 
   void Start() {
@@ -112,7 +112,7 @@
  protected:
   GURL gurl_;
 
-  scoped_ptr<MediaInfoLoader> loader_;
+  std::unique_ptr<MediaInfoLoader> loader_;
   NiceMock<MockWebURLLoader>* url_loader_;
 
   MockWebFrameClient client_;
diff --git a/content/renderer/media/android/media_source_delegate.cc b/content/renderer/media/android/media_source_delegate.cc
index 5d547c8f..a642e6c4 100644
--- a/content/renderer/media/android/media_source_delegate.cc
+++ b/content/renderer/media/android/media_source_delegate.cc
@@ -347,15 +347,16 @@
   DCHECK(type == DemuxerStream::AUDIO || type == DemuxerStream::VIDEO);
   // The access unit size should have been initialized properly at this stage.
   DCHECK_GT(access_unit_size_, 0u);
-  scoped_ptr<DemuxerData> data(new DemuxerData());
+  std::unique_ptr<DemuxerData> data(new DemuxerData());
   data->type = type;
   data->access_units.resize(access_unit_size_);
   ReadFromDemuxerStream(type, std::move(data), 0);
 }
 
-void MediaSourceDelegate::ReadFromDemuxerStream(media::DemuxerStream::Type type,
-                                                scoped_ptr<DemuxerData> data,
-                                                size_t index) {
+void MediaSourceDelegate::ReadFromDemuxerStream(
+    media::DemuxerStream::Type type,
+    std::unique_ptr<DemuxerData> data,
+    size_t index) {
   DCHECK(media_task_runner_->BelongsToCurrentThread());
   // DemuxerStream::Read() always returns the read callback asynchronously.
   DemuxerStream* stream =
@@ -367,7 +368,7 @@
 
 void MediaSourceDelegate::OnBufferReady(
     media::DemuxerStream::Type type,
-    scoped_ptr<DemuxerData> data,
+    std::unique_ptr<DemuxerData> data,
     size_t index,
     DemuxerStream::Status status,
     const scoped_refptr<media::DecoderBuffer>& buffer) {
@@ -685,7 +686,7 @@
   if (!pending_cdm_attached_cb_.is_null())
     base::ResetAndReturn(&pending_cdm_attached_cb_).Run(is_cdm_attached);
 
-  scoped_ptr<DemuxerConfigs> configs(new DemuxerConfigs());
+  std::unique_ptr<DemuxerConfigs> configs(new DemuxerConfigs());
   GetDemuxerConfigFromStream(configs.get(), true);
   GetDemuxerConfigFromStream(configs.get(), false);
   configs->duration = GetDuration();
diff --git a/content/renderer/media/android/media_source_delegate.h b/content/renderer/media/android/media_source_delegate.h
index 6d9228ff..f3b7e37 100644
--- a/content/renderer/media/android/media_source_delegate.h
+++ b/content/renderer/media/android/media_source_delegate.h
@@ -8,13 +8,13 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "media/base/cdm_context.h"
@@ -168,10 +168,10 @@
   // Reads an access unit from the demuxer stream |stream| and stores it in
   // the |index|th access unit in |params|.
   void ReadFromDemuxerStream(media::DemuxerStream::Type type,
-                             scoped_ptr<media::DemuxerData> data,
+                             std::unique_ptr<media::DemuxerData> data,
                              size_t index);
   void OnBufferReady(media::DemuxerStream::Type type,
-                     scoped_ptr<media::DemuxerData> data,
+                     std::unique_ptr<media::DemuxerData> data,
                      size_t index,
                      media::DemuxerStream::Status status,
                      const scoped_refptr<media::DecoderBuffer>& buffer);
@@ -201,15 +201,17 @@
   UpdateNetworkStateCB update_network_state_cb_;
   DurationChangeCB duration_change_cb_;
 
-  scoped_ptr<media::ChunkDemuxer> chunk_demuxer_;
+  std::unique_ptr<media::ChunkDemuxer> chunk_demuxer_;
   bool is_demuxer_ready_;
 
   SetCdmReadyCB set_cdm_ready_cb_;
   media::CdmContext* cdm_context_;
   media::CdmAttachedCB pending_cdm_attached_cb_;
 
-  scoped_ptr<media::DecryptingDemuxerStream> audio_decrypting_demuxer_stream_;
-  scoped_ptr<media::DecryptingDemuxerStream> video_decrypting_demuxer_stream_;
+  std::unique_ptr<media::DecryptingDemuxerStream>
+      audio_decrypting_demuxer_stream_;
+  std::unique_ptr<media::DecryptingDemuxerStream>
+      video_decrypting_demuxer_stream_;
 
   media::DemuxerStream* audio_stream_;
   media::DemuxerStream* video_stream_;
diff --git a/content/renderer/media/android/renderer_media_session_manager.cc b/content/renderer/media/android/renderer_media_session_manager.cc
index bc60d3a..93d19281 100644
--- a/content/renderer/media/android/renderer_media_session_manager.cc
+++ b/content/renderer/media/android/renderer_media_session_manager.cc
@@ -45,14 +45,14 @@
 
 void RendererMediaSessionManager::Activate(
     int session_id,
-    scoped_ptr<blink::WebMediaSessionActivateCallback> callback) {
+    std::unique_ptr<blink::WebMediaSessionActivateCallback> callback) {
   int request_id = pending_activation_requests_.Add(callback.release());
   Send(new MediaSessionHostMsg_Activate(routing_id(), session_id, request_id));
 }
 
 void RendererMediaSessionManager::Deactivate(
     int session_id,
-    scoped_ptr<blink::WebMediaSessionDeactivateCallback> callback) {
+    std::unique_ptr<blink::WebMediaSessionDeactivateCallback> callback) {
   int request_id = pending_deactivation_requests_.Add(callback.release());
   Send(
       new MediaSessionHostMsg_Deactivate(routing_id(), session_id, request_id));
diff --git a/content/renderer/media/android/renderer_media_session_manager.h b/content/renderer/media/android/renderer_media_session_manager.h
index 850406c..bc1808c 100644
--- a/content/renderer/media/android/renderer_media_session_manager.h
+++ b/content/renderer/media/android/renderer_media_session_manager.h
@@ -6,10 +6,10 @@
 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_
 
 #include <map>
+#include <memory>
 
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/renderer/render_frame_observer.h"
 #include "third_party/WebKit/public/platform/modules/mediasession/WebMediaSession.h"
@@ -30,11 +30,12 @@
   int RegisterMediaSession(WebMediaSessionAndroid* session);
   void UnregisterMediaSession(int session_id);
 
-  void Activate(int session_id,
-                scoped_ptr<blink::WebMediaSessionActivateCallback> callback);
+  void Activate(
+      int session_id,
+      std::unique_ptr<blink::WebMediaSessionActivateCallback> callback);
   void Deactivate(
       int session_id,
-      scoped_ptr<blink::WebMediaSessionDeactivateCallback> callback);
+      std::unique_ptr<blink::WebMediaSessionDeactivateCallback> callback);
   void SetMetadata(int session_id, const MediaMetadata& metadata);
 
   void OnDidActivate(int request_id, bool success);
diff --git a/content/renderer/media/android/stream_texture_factory.h b/content/renderer/media/android/stream_texture_factory.h
index 4ce8612..d9c7323 100644
--- a/content/renderer/media/android/stream_texture_factory.h
+++ b/content/renderer/media/android/stream_texture_factory.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "cc/layers/video_frame_provider.h"
 #include "gpu/command_buffer/common/mailbox.h"
@@ -43,7 +44,7 @@
   };
 };
 
-typedef scoped_ptr<StreamTextureProxy, StreamTextureProxy::Deleter>
+typedef std::unique_ptr<StreamTextureProxy, StreamTextureProxy::Deleter>
     ScopedStreamTextureProxy;
 
 class StreamTextureFactoryContextObserver {
diff --git a/content/renderer/media/android/stream_texture_factory_impl.cc b/content/renderer/media/android/stream_texture_factory_impl.cc
index 81de90a..e79faa7 100644
--- a/content/renderer/media/android/stream_texture_factory_impl.cc
+++ b/content/renderer/media/android/stream_texture_factory_impl.cc
@@ -35,7 +35,7 @@
  private:
   void BindOnThread(int32_t stream_id);
 
-  const scoped_ptr<StreamTextureHost> host_;
+  const std::unique_ptr<StreamTextureHost> host_;
 
   // Protects access to |client_| and |loop_|.
   base::Lock lock_;
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 469e94d..9131680 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -517,7 +517,7 @@
     const blink::WebSecurityOrigin& security_origin,
     blink::WebSetSinkIdCallbacks* web_callback) {
   DCHECK(main_thread_checker_.CalledOnValidThread());
-  scoped_ptr<blink::WebSetSinkIdCallbacks> callback(web_callback);
+  std::unique_ptr<blink::WebSetSinkIdCallbacks> callback(web_callback);
   callback->onError(blink::WebSetSinkIdError::NotSupported);
 }
 
@@ -650,7 +650,7 @@
                                   unsigned char alpha,
                                   SkXfermode::Mode mode) {
   DCHECK(main_thread_checker_.CalledOnValidThread());
-  scoped_ptr<blink::WebGraphicsContext3DProvider> provider(
+  std::unique_ptr<blink::WebGraphicsContext3DProvider> provider(
       blink::Platform::current()
           ->createSharedOffscreenGraphicsContext3DProvider());
   if (!provider)
diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h
index bc1c762..a103827 100644
--- a/content/renderer/media/android/webmediaplayer_android.h
+++ b/content/renderer/media/android/webmediaplayer_android.h
@@ -7,12 +7,12 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/default_tick_clock.h"
@@ -450,7 +450,7 @@
   // blocked.
   cc::VideoFrameProvider::Client* video_frame_provider_client_;
 
-  scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_;
+  std::unique_ptr<cc_blink::WebLayerImpl> video_weblayer_;
 
 #if defined(VIDEO_HOLE)
   // A rectangle represents the geometry of video frame, when computed last
@@ -469,7 +469,7 @@
 
   scoped_refptr<media::MediaLog> media_log_;
 
-  scoped_ptr<MediaInfoLoader> info_loader_;
+  std::unique_ptr<MediaInfoLoader> info_loader_;
 
   // Non-owned pointer to the CdmContext. Updated in the constructor,
   // generateKeyRequest() or setContentDecryptionModule().
@@ -496,7 +496,7 @@
   // as playback progresses.
   media::TimeDeltaInterpolator interpolator_;
 
-  scoped_ptr<MediaSourceDelegate> media_source_delegate_;
+  std::unique_ptr<MediaSourceDelegate> media_source_delegate_;
 
   int frame_id_;
 
diff --git a/content/renderer/media/android/webmediasession_android.cc b/content/renderer/media/android/webmediasession_android.cc
index 7c50f52..c1a936d 100644
--- a/content/renderer/media/android/webmediasession_android.cc
+++ b/content/renderer/media/android/webmediasession_android.cc
@@ -4,8 +4,10 @@
 
 #include "content/renderer/media/android/webmediasession_android.h"
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "content/public/common/media_metadata.h"
 #include "content/renderer/media/android/renderer_media_session_manager.h"
 #include "third_party/WebKit/public/platform/modules/mediasession/WebMediaMetadata.h"
@@ -25,12 +27,12 @@
 
 void WebMediaSessionAndroid::activate(
     blink::WebMediaSessionActivateCallback* callback) {
-  session_manager_->Activate(media_session_id_, make_scoped_ptr(callback));
+  session_manager_->Activate(media_session_id_, base::WrapUnique(callback));
 }
 
 void WebMediaSessionAndroid::deactivate(
     blink::WebMediaSessionDeactivateCallback* callback) {
-  session_manager_->Deactivate(media_session_id_, make_scoped_ptr(callback));
+  session_manager_->Deactivate(media_session_id_, base::WrapUnique(callback));
 }
 
 void WebMediaSessionAndroid::setMetadata(
diff --git a/content/renderer/media/android/webmediasession_android_unittest.cc b/content/renderer/media/android/webmediasession_android_unittest.cc
index 69e8138..0b870bc3 100644
--- a/content/renderer/media/android/webmediasession_android_unittest.cc
+++ b/content/renderer/media/android/webmediasession_android_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "content/renderer/media/android/webmediasession_android.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/common/media/media_session_messages_android.h"
 #include "content/renderer/media/android/renderer_media_session_manager.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -65,11 +66,11 @@
 };
 
 TEST_F(WebMediaSessionTest, TestRegistration) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
   EXPECT_TRUE(IsSessionManagerEmpty(session_manager.get()));
   {
-    scoped_ptr<WebMediaSessionAndroid> session(
+    std::unique_ptr<WebMediaSessionAndroid> session(
         new WebMediaSessionAndroid(session_manager.get()));
     EXPECT_TRUE(SessionManagerHasSession(session_manager.get(), session.get()));
   }
@@ -77,18 +78,18 @@
 }
 
 TEST_F(WebMediaSessionTest, TestMultipleRegistration) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
   EXPECT_TRUE(IsSessionManagerEmpty(session_manager.get()));
 
   {
-    scoped_ptr<WebMediaSessionAndroid> session1(
+    std::unique_ptr<WebMediaSessionAndroid> session1(
         new WebMediaSessionAndroid(session_manager.get()));
     EXPECT_TRUE(
         SessionManagerHasSession(session_manager.get(), session1.get()));
 
     {
-      scoped_ptr<WebMediaSessionAndroid> session2(
+      std::unique_ptr<WebMediaSessionAndroid> session2(
           new WebMediaSessionAndroid(session_manager.get()));
       EXPECT_TRUE(
           SessionManagerHasSession(session_manager.get(), session2.get()));
@@ -102,7 +103,7 @@
 }
 
 TEST_F(WebMediaSessionTest, TestMultipleRegistrationOutOfOrder) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
   EXPECT_TRUE(IsSessionManagerEmpty(session_manager.get()));
 
@@ -122,10 +123,10 @@
 }
 
 TEST_F(WebMediaSessionTest, ActivationOutOfOrder) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
 
-  scoped_ptr<WebMediaSessionAndroid> session(
+  std::unique_ptr<WebMediaSessionAndroid> session(
       new WebMediaSessionAndroid(session_manager.get()));
 
   // Request activate three times
@@ -148,10 +149,10 @@
 }
 
 TEST_F(WebMediaSessionTest, ActivationInOrder) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
 
-  scoped_ptr<WebMediaSessionAndroid> session(
+  std::unique_ptr<WebMediaSessionAndroid> session(
       new WebMediaSessionAndroid(session_manager.get()));
 
   // Request activate three times
@@ -172,10 +173,10 @@
 }
 
 TEST_F(WebMediaSessionTest, ActivationInFlight) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
 
-  scoped_ptr<WebMediaSessionAndroid> session(
+  std::unique_ptr<WebMediaSessionAndroid> session(
       new WebMediaSessionAndroid(session_manager.get()));
 
   session->activate(new TestActivateCallback(this));  // request 1
@@ -202,10 +203,10 @@
 }
 
 TEST_F(WebMediaSessionTest, ActivationFailure) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
 
-  scoped_ptr<WebMediaSessionAndroid> session(
+  std::unique_ptr<WebMediaSessionAndroid> session(
       new WebMediaSessionAndroid(session_manager.get()));
 
   session->activate(new TestActivateCallback(this));  // request 1
@@ -227,10 +228,10 @@
 }
 
 TEST_F(WebMediaSessionTest, Deactivation) {
-  scoped_ptr<RendererMediaSessionManager> session_manager(
+  std::unique_ptr<RendererMediaSessionManager> session_manager(
       new RendererMediaSessionManager(nullptr));
 
-  scoped_ptr<WebMediaSessionAndroid> session(
+  std::unique_ptr<WebMediaSessionAndroid> session(
       new WebMediaSessionAndroid(session_manager.get()));
 
   // Request deactivate three times
diff --git a/content/renderer/media/audio_decoder.cc b/content/renderer/media/audio_decoder.cc
index d6978fe5..ca1b2d24 100644
--- a/content/renderer/media/audio_decoder.cc
+++ b/content/renderer/media/audio_decoder.cc
@@ -65,8 +65,8 @@
     audio_data.push_back(destination_bus->channelData(i));
   }
 
-  scoped_ptr<AudioBus> audio_bus = AudioBus::WrapVector(
-      number_of_frames, audio_data);
+  std::unique_ptr<AudioBus> audio_bus =
+      AudioBus::WrapVector(number_of_frames, audio_data);
 
   // Decode the audio file data.
   // TODO(crogers): If our estimate was low, then we still may fail to read
diff --git a/content/renderer/media/audio_input_message_filter.cc b/content/renderer/media/audio_input_message_filter.cc
index 09a4174..672e1fe 100644
--- a/content/renderer/media/audio_input_message_filter.cc
+++ b/content/renderer/media/audio_input_message_filter.cc
@@ -178,10 +178,10 @@
 
 AudioInputMessageFilter::AudioInputIPCImpl::~AudioInputIPCImpl() {}
 
-scoped_ptr<media::AudioInputIPC> AudioInputMessageFilter::CreateAudioInputIPC(
-    int render_frame_id) {
+std::unique_ptr<media::AudioInputIPC>
+AudioInputMessageFilter::CreateAudioInputIPC(int render_frame_id) {
   DCHECK_GT(render_frame_id, 0);
-  return scoped_ptr<media::AudioInputIPC>(
+  return std::unique_ptr<media::AudioInputIPC>(
       new AudioInputIPCImpl(this, render_frame_id));
 }
 
diff --git a/content/renderer/media/audio_input_message_filter.h b/content/renderer/media/audio_input_message_filter.h
index 30a8d239..548234b7 100644
--- a/content/renderer/media/audio_input_message_filter.h
+++ b/content/renderer/media/audio_input_message_filter.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "build/build_config.h"
@@ -40,7 +41,8 @@
   //
   // The returned object is not thread-safe, and must be used on
   // |io_task_runner|.
-  scoped_ptr<media::AudioInputIPC> CreateAudioInputIPC(int render_frame_id);
+  std::unique_ptr<media::AudioInputIPC> CreateAudioInputIPC(
+      int render_frame_id);
 
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() const {
     return io_task_runner_;
diff --git a/content/renderer/media/audio_message_filter.cc b/content/renderer/media/audio_message_filter.cc
index 7ecf9b16..c3db8e2 100644
--- a/content/renderer/media/audio_message_filter.cc
+++ b/content/renderer/media/audio_message_filter.cc
@@ -75,10 +75,10 @@
 
 AudioMessageFilter::AudioOutputIPCImpl::~AudioOutputIPCImpl() {}
 
-scoped_ptr<media::AudioOutputIPC> AudioMessageFilter::CreateAudioOutputIPC(
+std::unique_ptr<media::AudioOutputIPC> AudioMessageFilter::CreateAudioOutputIPC(
     int render_frame_id) {
   DCHECK_GT(render_frame_id, 0);
-  return scoped_ptr<media::AudioOutputIPC>(
+  return std::unique_ptr<media::AudioOutputIPC>(
       new AudioOutputIPCImpl(this, render_frame_id));
 }
 
diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h
index dcdc7cd..15db8df3 100644
--- a/content/renderer/media/audio_message_filter.h
+++ b/content/renderer/media/audio_message_filter.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/gtest_prod_util.h"
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "base/synchronization/lock.h"
@@ -42,7 +43,8 @@
   //
   // The returned object is not thread-safe, and must be used on
   // |io_task_runner|.
-  scoped_ptr<media::AudioOutputIPC> CreateAudioOutputIPC(int render_frame_id);
+  std::unique_ptr<media::AudioOutputIPC> CreateAudioOutputIPC(
+      int render_frame_id);
 
   // IO task runner associated with this message filter.
   base::SingleThreadTaskRunner* io_task_runner() const {
diff --git a/content/renderer/media/audio_message_filter_unittest.cc b/content/renderer/media/audio_message_filter_unittest.cc
index 46302a4..2ae2c30 100644
--- a/content/renderer/media/audio_message_filter_unittest.cc
+++ b/content/renderer/media/audio_message_filter_unittest.cc
@@ -107,7 +107,7 @@
       new AudioMessageFilter(message_loop.task_runner()));
 
   MockAudioDelegate delegate;
-  const scoped_ptr<media::AudioOutputIPC> ipc =
+  const std::unique_ptr<media::AudioOutputIPC> ipc =
       filter->CreateAudioOutputIPC(kRenderFrameId);
   static const int kSessionId = 0;
   static const std::string kDeviceId;
@@ -159,9 +159,9 @@
 
   MockAudioDelegate delegate1;
   MockAudioDelegate delegate2;
-  const scoped_ptr<media::AudioOutputIPC> ipc1 =
+  const std::unique_ptr<media::AudioOutputIPC> ipc1 =
       filter->CreateAudioOutputIPC(kRenderFrameId);
-  const scoped_ptr<media::AudioOutputIPC> ipc2 =
+  const std::unique_ptr<media::AudioOutputIPC> ipc2 =
       filter->CreateAudioOutputIPC(kRenderFrameId);
   ipc1->CreateStream(&delegate1, media::AudioParameters());
   ipc2->CreateStream(&delegate2, media::AudioParameters());
diff --git a/content/renderer/media/audio_renderer_mixer_manager_unittest.cc b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
index ac2a815..66c2d43c 100644
--- a/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
+++ b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
@@ -2,12 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/audio_renderer_mixer_manager.h"
+
+#include <memory>
+
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/media/audio_device_factory.h"
-#include "content/renderer/media/audio_renderer_mixer_manager.h"
 #include "media/audio/audio_manager_base.h"
 #include "media/audio/audio_parameters.h"
 #include "media/base/audio_capturer_source.h"
@@ -108,7 +110,7 @@
     return nullptr;
   }
 
-  scoped_ptr<AudioRendererMixerManager> manager_;
+  std::unique_ptr<AudioRendererMixerManager> manager_;
   scoped_refptr<media::MockAudioRendererSink> mock_sink_;
   scoped_refptr<media::MockAudioRendererSink> mock_sink_no_device_;
 
diff --git a/content/renderer/media/audio_repetition_detector_unittest.cc b/content/renderer/media/audio_repetition_detector_unittest.cc
index f296750..eca9b36 100644
--- a/content/renderer/media/audio_repetition_detector_unittest.cc
+++ b/content/renderer/media/audio_repetition_detector_unittest.cc
@@ -2,15 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/audio_repetition_detector.h"
+
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/rand_util.h"
-#include "content/renderer/media/audio_repetition_detector.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace content {
@@ -92,7 +93,7 @@
     static const size_t kNumChannels = 2;
 
     // Get memory to store interleaved stereo.
-    scoped_ptr<float[]> tester_stereo(
+    std::unique_ptr<float[]> tester_stereo(
         new float[num_frames * kNumChannels]);
 
     for (size_t idx = 0; idx < num_frames; ++idx, ++tester) {
@@ -117,7 +118,7 @@
   }
 
  private:
-  scoped_ptr<AudioRepetitionDetectorForTest> detector_;
+  std::unique_ptr<AudioRepetitionDetectorForTest> detector_;
 };
 
 TEST_F(AudioRepetitionDetectorTest, Basic) {
diff --git a/content/renderer/media/audio_track_recorder.cc b/content/renderer/media/audio_track_recorder.cc
index 8be6a04..f13c6b3d 100644
--- a/content/renderer/media/audio_track_recorder.cc
+++ b/content/renderer/media/audio_track_recorder.cc
@@ -106,7 +106,7 @@
 
   void OnSetFormat(const media::AudioParameters& params);
 
-  void EncodeAudio(scoped_ptr<media::AudioBus> audio_bus,
+  void EncodeAudio(std::unique_ptr<media::AudioBus> audio_bus,
                    const base::TimeTicks& capture_time);
 
   void set_paused(bool paused) { paused_ = paused; }
@@ -137,11 +137,11 @@
   media::AudioParameters output_params_;
 
   // Sampling rate adapter between an OpusEncoder supported and the provided.
-  scoped_ptr<media::AudioConverter> converter_;
-  scoped_ptr<media::AudioFifo> fifo_;
+  std::unique_ptr<media::AudioConverter> converter_;
+  std::unique_ptr<media::AudioFifo> fifo_;
 
   // Buffer for passing AudioBus data to OpusEncoder.
-  scoped_ptr<float[]> buffer_;
+  std::unique_ptr<float[]> buffer_;
 
   // While |paused_|, AudioBuses are not encoded.
   bool paused_;
@@ -238,7 +238,7 @@
 }
 
 void AudioTrackRecorder::AudioEncoder::EncodeAudio(
-    scoped_ptr<media::AudioBus> input_bus,
+    std::unique_ptr<media::AudioBus> input_bus,
     const base::TimeTicks& capture_time) {
   DVLOG(3) << __FUNCTION__ << ", #frames " << input_bus->frames();
   DCHECK(encoder_thread_checker_.CalledOnValidThread());
@@ -248,19 +248,20 @@
 
   if (!is_initialized() || paused_)
     return;
-  // TODO(mcasas): Consider using a std::deque<scoped_ptr<AudioBus>> instead of
+  // TODO(mcasas): Consider using a std::deque<std::unique_ptr<AudioBus>>
+  // instead of
   // an AudioFifo, to avoid copying data needlessly since we know the sizes of
   // both input and output and they are multiples.
   fifo_->Push(input_bus.get());
 
   // Wait to have enough |input_bus|s to guarantee a satisfactory conversion.
   while (fifo_->frames() >= input_params_.frames_per_buffer()) {
-    scoped_ptr<media::AudioBus> audio_bus = media::AudioBus::Create(
+    std::unique_ptr<media::AudioBus> audio_bus = media::AudioBus::Create(
         output_params_.channels(), kOpusPreferredFramesPerBuffer);
     converter_->Convert(audio_bus.get());
     ToInterleaved(audio_bus.get(), buffer_.get());
 
-    scoped_ptr<std::string> encoded_data(new std::string());
+    std::unique_ptr<std::string> encoded_data(new std::string());
     if (DoEncode(opus_encoder_, buffer_.get(), kOpusPreferredFramesPerBuffer,
                  encoded_data.get())) {
       const base::TimeTicks capture_time_of_first_sample =
@@ -332,7 +333,7 @@
   DCHECK(capture_thread_checker_.CalledOnValidThread());
   DCHECK(!capture_time.is_null());
 
-  scoped_ptr<media::AudioBus> audio_data =
+  std::unique_ptr<media::AudioBus> audio_data =
       media::AudioBus::Create(audio_bus.channels(), audio_bus.frames());
   audio_bus.CopyTo(audio_data.get());
 
diff --git a/content/renderer/media/audio_track_recorder.h b/content/renderer/media/audio_track_recorder.h
index 608cfcaf..15eb3cb 100644
--- a/content/renderer/media/audio_track_recorder.h
+++ b/content/renderer/media/audio_track_recorder.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_
 #define CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
@@ -34,7 +35,7 @@
  public:
   using OnEncodedAudioCB =
       base::Callback<void(const media::AudioParameters& params,
-                          scoped_ptr<std::string> encoded_data,
+                          std::unique_ptr<std::string> encoded_data,
                           base::TimeTicks capture_time)>;
 
   AudioTrackRecorder(const blink::WebMediaStreamTrack& track,
diff --git a/content/renderer/media/audio_track_recorder_unittest.cc b/content/renderer/media/audio_track_recorder_unittest.cc
index c30ba99..ad05ccd 100644
--- a/content/renderer/media/audio_track_recorder_unittest.cc
+++ b/content/renderer/media/audio_track_recorder_unittest.cc
@@ -149,16 +149,16 @@
     buffer_.reset(new float[kFramesPerBuffer * params.channels()]);
   }
 
-  scoped_ptr<media::AudioBus> GetFirstSourceAudioBus() {
-    scoped_ptr<media::AudioBus> bus(media::AudioBus::Create(
+  std::unique_ptr<media::AudioBus> GetFirstSourceAudioBus() {
+    std::unique_ptr<media::AudioBus> bus(media::AudioBus::Create(
         first_params_.channels(), first_params_.sample_rate() *
                                       kMediaStreamAudioTrackBufferDurationMs /
                                       base::Time::kMillisecondsPerSecond));
     first_source_.OnMoreData(bus.get(), 0, 0);
     return bus;
   }
-  scoped_ptr<media::AudioBus> GetSecondSourceAudioBus() {
-    scoped_ptr<media::AudioBus> bus(media::AudioBus::Create(
+  std::unique_ptr<media::AudioBus> GetSecondSourceAudioBus() {
+    std::unique_ptr<media::AudioBus> bus(media::AudioBus::Create(
         second_params_.channels(), second_params_.sample_rate() *
                                        kMediaStreamAudioTrackBufferDurationMs /
                                        base::Time::kMillisecondsPerSecond));
@@ -172,7 +172,7 @@
                     TimeTicks timestamp));
 
   void OnEncodedAudio(const media::AudioParameters& params,
-                      scoped_ptr<std::string> encoded_data,
+                      std::unique_ptr<std::string> encoded_data,
                       TimeTicks timestamp) {
     EXPECT_TRUE(!encoded_data->empty());
     // Decode |encoded_data| and check we get the expected number of frames
@@ -189,7 +189,7 @@
   const base::MessageLoop message_loop_;
 
   // ATR and WebMediaStreamTrack for fooling it.
-  scoped_ptr<AudioTrackRecorder> audio_track_recorder_;
+  std::unique_ptr<AudioTrackRecorder> audio_track_recorder_;
   blink::WebMediaStreamTrack blink_track_;
 
   // Two different sets of AudioParameters for testing re-init of ATR.
@@ -202,7 +202,7 @@
 
   // Decoder for verifying data was properly encoded.
   OpusDecoder* opus_decoder_;
-  scoped_ptr<float[]> buffer_;
+  std::unique_ptr<float[]> buffer_;
 
  private:
   // Prepares a blink track of a given MediaStreamType and attaches the native
@@ -211,7 +211,7 @@
   void PrepareBlinkTrack() {
     scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
         WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-    scoped_ptr<WebRtcLocalAudioTrack> native_track(
+    std::unique_ptr<WebRtcLocalAudioTrack> native_track(
         new WebRtcLocalAudioTrack(adapter.get()));
     blink::WebMediaStreamSource audio_source;
     audio_source.initialize(base::UTF8ToUTF16("dummy_source_id"),
diff --git a/content/renderer/media/canvas_capture_handler.cc b/content/renderer/media/canvas_capture_handler.cc
index 0220238c..79907390 100644
--- a/content/renderer/media/canvas_capture_handler.cc
+++ b/content/renderer/media/canvas_capture_handler.cc
@@ -146,7 +146,7 @@
       size_(size),
       io_task_runner_(io_task_runner),
       weak_ptr_factory_(this) {
-  scoped_ptr<media::VideoCapturerSource> video_source(
+  std::unique_ptr<media::VideoCapturerSource> video_source(
       new VideoCapturerSource(weak_ptr_factory_.GetWeakPtr(), frame_rate));
   AddVideoCapturerSourceToVideoTrack(std::move(video_source), track);
 }
@@ -270,13 +270,13 @@
 }
 
 void CanvasCaptureHandler::AddVideoCapturerSourceToVideoTrack(
-    scoped_ptr<media::VideoCapturerSource> source,
+    std::unique_ptr<media::VideoCapturerSource> source,
     blink::WebMediaStreamTrack* web_track) {
   std::string str_track_id;
   base::Base64Encode(base::RandBytesAsString(64), &str_track_id);
   const blink::WebString track_id = base::UTF8ToUTF16(str_track_id);
   blink::WebMediaStreamSource webkit_source;
-  scoped_ptr<MediaStreamVideoSource> media_stream_source(
+  std::unique_ptr<MediaStreamVideoSource> media_stream_source(
       new MediaStreamVideoCapturerSource(
           MediaStreamSource::SourceStoppedCallback(), std::move(source)));
   webkit_source.initialize(track_id, blink::WebMediaStreamSource::TypeVideo,
diff --git a/content/renderer/media/canvas_capture_handler.h b/content/renderer/media/canvas_capture_handler.h
index 5424994..4df1692 100644
--- a/content/renderer/media/canvas_capture_handler.h
+++ b/content/renderer/media/canvas_capture_handler.h
@@ -8,9 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
 #include "media/base/video_capturer_source.h"
@@ -70,7 +71,7 @@
 
   void CreateNewFrame(const SkImage* image);
   void AddVideoCapturerSourceToVideoTrack(
-      scoped_ptr<media::VideoCapturerSource> source,
+      std::unique_ptr<media::VideoCapturerSource> source,
       blink::WebMediaStreamTrack* web_track);
 
   // Object that does all the work of running |new_frame_callback_|.
@@ -90,7 +91,7 @@
   scoped_refptr<media::VideoFrame> last_frame_;
 
   const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
-  scoped_ptr<CanvasCaptureHandlerDelegate> delegate_;
+  std::unique_ptr<CanvasCaptureHandlerDelegate> delegate_;
 
   // Bound to Main Render thread.
   base::ThreadChecker main_render_thread_checker_;
diff --git a/content/renderer/media/canvas_capture_handler_unittest.cc b/content/renderer/media/canvas_capture_handler_unittest.cc
index 700e992..d51531232 100644
--- a/content/renderer/media/canvas_capture_handler_unittest.cc
+++ b/content/renderer/media/canvas_capture_handler_unittest.cc
@@ -118,7 +118,7 @@
 
   blink::WebMediaStreamTrack track_;
   // The Class under test. Needs to be scoped_ptr to force its destruction.
-  scoped_ptr<CanvasCaptureHandler> canvas_capture_handler_;
+  std::unique_ptr<CanvasCaptureHandler> canvas_capture_handler_;
 
  protected:
   media::VideoCapturerSource* GetVideoCapturerSource(
diff --git a/content/renderer/media/cdm/pepper_cdm_wrapper.h b/content/renderer/media/cdm/pepper_cdm_wrapper.h
index 6ee1294..f241df9 100644
--- a/content/renderer/media/cdm/pepper_cdm_wrapper.h
+++ b/content/renderer/media/cdm/pepper_cdm_wrapper.h
@@ -9,11 +9,11 @@
 #error This file should only be included when ENABLE_PEPPER_CDMS is defined
 #endif
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 
 class GURL;
 
@@ -37,9 +37,10 @@
 
 // Callback used to create a PepperCdmWrapper. This may return null if the
 // Pepper CDM can not be created.
-typedef base::Callback<scoped_ptr<PepperCdmWrapper>(
+typedef base::Callback<std::unique_ptr<PepperCdmWrapper>(
     const std::string& pluginType,
-    const GURL& security_origin)> CreatePepperCdmCB;
+    const GURL& security_origin)>
+    CreatePepperCdmCB;
 
 }  // namespace content
 
diff --git a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
index 6a53a2f..4351353 100644
--- a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
+++ b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
@@ -26,7 +26,7 @@
   plugin->destroy();
 }
 
-scoped_ptr<PepperCdmWrapper> PepperCdmWrapperImpl::Create(
+std::unique_ptr<PepperCdmWrapper> PepperCdmWrapperImpl::Create(
     blink::WebLocalFrame* frame,
     const std::string& pluginType,
     const GURL& security_origin) {
@@ -41,13 +41,13 @@
       blink::WebStringToGURL(frame->getSecurityOrigin().toString()));
   if (frame_security_origin != security_origin) {
     LOG(ERROR) << "Frame has a different origin than the EME call.";
-    return scoped_ptr<PepperCdmWrapper>();
+    return std::unique_ptr<PepperCdmWrapper>();
   }
 
   ScopedHelperPlugin helper_plugin(blink::WebHelperPlugin::create(
       blink::WebString::fromUTF8(pluginType), frame));
   if (!helper_plugin)
-    return scoped_ptr<PepperCdmWrapper>();
+    return std::unique_ptr<PepperCdmWrapper>();
 
   blink::WebPlugin* plugin = helper_plugin->getPlugin();
   DCHECK(!plugin->isPlaceholder());  // Prevented by Blink.
@@ -57,7 +57,7 @@
   scoped_refptr<PepperPluginInstanceImpl> plugin_instance =
       ppapi_plugin->instance();
   if (!plugin_instance.get())
-    return scoped_ptr<PepperCdmWrapper>();
+    return std::unique_ptr<PepperCdmWrapper>();
 
   GURL plugin_url(plugin_instance->container()->element().document().url());
   GURL plugin_security_origin = plugin_url.GetOrigin();
@@ -65,9 +65,9 @@
       << "Pepper instance has a different origin than the EME call.";
 
   if (!plugin_instance->GetContentDecryptorDelegate())
-    return scoped_ptr<PepperCdmWrapper>();
+    return std::unique_ptr<PepperCdmWrapper>();
 
-  return scoped_ptr<PepperCdmWrapper>(
+  return std::unique_ptr<PepperCdmWrapper>(
       new PepperCdmWrapperImpl(std::move(helper_plugin), plugin_instance));
 }
 
diff --git a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.h b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.h
index 20b4f4c..68d855e 100644
--- a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.h
+++ b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.h
@@ -9,10 +9,11 @@
 #error This file should only be included when ENABLE_PEPPER_CDMS is defined
 #endif
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/media/cdm/pepper_cdm_wrapper.h"
 
 namespace blink {
@@ -41,9 +42,9 @@
 // blink:: objects.
 class PepperCdmWrapperImpl : public PepperCdmWrapper {
  public:
-  static scoped_ptr<PepperCdmWrapper> Create(blink::WebLocalFrame* frame,
-                                             const std::string& pluginType,
-                                             const GURL& security_origin);
+  static std::unique_ptr<PepperCdmWrapper> Create(blink::WebLocalFrame* frame,
+                                                  const std::string& pluginType,
+                                                  const GURL& security_origin);
 
   ~PepperCdmWrapperImpl() override;
 
@@ -51,7 +52,7 @@
   ContentDecryptorDelegate* GetCdmDelegate() override;
 
  private:
-  typedef scoped_ptr<blink::WebHelperPlugin, WebHelperPluginDeleter>
+  typedef std::unique_ptr<blink::WebHelperPlugin, WebHelperPluginDeleter>
       ScopedHelperPlugin;
 
   // Takes ownership of |helper_plugin| and |plugin_instance|.
diff --git a/content/renderer/media/cdm/ppapi_decryptor.cc b/content/renderer/media/cdm/ppapi_decryptor.cc
index b505f3c..07853c4 100644
--- a/content/renderer/media/cdm/ppapi_decryptor.cc
+++ b/content/renderer/media/cdm/ppapi_decryptor.cc
@@ -41,7 +41,7 @@
   std::string plugin_type = media::GetPepperType(key_system);
   DCHECK(!plugin_type.empty());
 
-  scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper;
+  std::unique_ptr<PepperCdmWrapper> pepper_cdm_wrapper;
   {
     TRACE_EVENT0("media", "PpapiDecryptor::CreatePepperCDM");
     pepper_cdm_wrapper = create_pepper_cdm_cb.Run(plugin_type, security_origin);
@@ -62,7 +62,7 @@
                          session_keys_change_cb, session_expiration_update_cb));
 
   // |ppapi_decryptor| ownership is passed to the promise.
-  scoped_ptr<media::CdmInitializedPromise> promise(
+  std::unique_ptr<media::CdmInitializedPromise> promise(
       new media::CdmInitializedPromise(cdm_created_cb, ppapi_decryptor));
 
   ppapi_decryptor->InitializeCdm(key_system, allow_distinctive_identifier,
@@ -70,7 +70,7 @@
 }
 
 PpapiDecryptor::PpapiDecryptor(
-    scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
+    std::unique_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
     const media::SessionMessageCB& session_message_cb,
     const media::SessionClosedCB& session_closed_cb,
     const media::LegacySessionErrorCB& legacy_session_error_cb,
@@ -100,7 +100,7 @@
     const std::string& key_system,
     bool allow_distinctive_identifier,
     bool allow_persistent_state,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   base::WeakPtr<PpapiDecryptor> weak_this = weak_ptr_factory_.GetWeakPtr();
   CdmDelegate()->Initialize(
       key_system, allow_distinctive_identifier, allow_persistent_state,
@@ -115,7 +115,7 @@
 
 void PpapiDecryptor::SetServerCertificate(
     const std::vector<uint8_t>& certificate,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   DVLOG(2) << __FUNCTION__;
   DCHECK(render_task_runner_->BelongsToCurrentThread());
 
@@ -131,7 +131,7 @@
     SessionType session_type,
     media::EmeInitDataType init_data_type,
     const std::vector<uint8_t>& init_data,
-    scoped_ptr<media::NewSessionCdmPromise> promise) {
+    std::unique_ptr<media::NewSessionCdmPromise> promise) {
   DVLOG(2) << __FUNCTION__;
   DCHECK(render_task_runner_->BelongsToCurrentThread());
 
@@ -147,7 +147,7 @@
 void PpapiDecryptor::LoadSession(
     SessionType session_type,
     const std::string& session_id,
-    scoped_ptr<media::NewSessionCdmPromise> promise) {
+    std::unique_ptr<media::NewSessionCdmPromise> promise) {
   DVLOG(2) << __FUNCTION__;
   DCHECK(render_task_runner_->BelongsToCurrentThread());
 
@@ -161,7 +161,7 @@
 void PpapiDecryptor::UpdateSession(
     const std::string& session_id,
     const std::vector<uint8_t>& response,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   DVLOG(2) << __FUNCTION__;
   DCHECK(render_task_runner_->BelongsToCurrentThread());
 
@@ -172,8 +172,9 @@
   CdmDelegate()->UpdateSession(session_id, response, std::move(promise));
 }
 
-void PpapiDecryptor::CloseSession(const std::string& session_id,
-                                  scoped_ptr<media::SimpleCdmPromise> promise) {
+void PpapiDecryptor::CloseSession(
+    const std::string& session_id,
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   DVLOG(2) << __FUNCTION__;
   DCHECK(render_task_runner_->BelongsToCurrentThread());
 
@@ -187,7 +188,7 @@
 
 void PpapiDecryptor::RemoveSession(
     const std::string& session_id,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   DVLOG(2) << __FUNCTION__;
   DCHECK(render_task_runner_->BelongsToCurrentThread());
 
diff --git a/content/renderer/media/cdm/ppapi_decryptor.h b/content/renderer/media/cdm/ppapi_decryptor.h
index 7aff248..39079ff 100644
--- a/content/renderer/media/cdm/ppapi_decryptor.h
+++ b/content/renderer/media/cdm/ppapi_decryptor.h
@@ -53,22 +53,23 @@
   // media::MediaKeys implementation.
   void SetServerCertificate(
       const std::vector<uint8_t>& certificate,
-      scoped_ptr<media::SimpleCdmPromise> promise) override;
+      std::unique_ptr<media::SimpleCdmPromise> promise) override;
   void CreateSessionAndGenerateRequest(
       SessionType session_type,
       media::EmeInitDataType init_data_type,
       const std::vector<uint8_t>& init_data,
-      scoped_ptr<media::NewSessionCdmPromise> promise) override;
-  void LoadSession(SessionType session_type,
-                   const std::string& session_id,
-                   scoped_ptr<media::NewSessionCdmPromise> promise) override;
+      std::unique_ptr<media::NewSessionCdmPromise> promise) override;
+  void LoadSession(
+      SessionType session_type,
+      const std::string& session_id,
+      std::unique_ptr<media::NewSessionCdmPromise> promise) override;
   void UpdateSession(const std::string& session_id,
                      const std::vector<uint8_t>& response,
-                     scoped_ptr<media::SimpleCdmPromise> promise) override;
+                     std::unique_ptr<media::SimpleCdmPromise> promise) override;
   void CloseSession(const std::string& session_id,
-                    scoped_ptr<media::SimpleCdmPromise> promise) override;
+                    std::unique_ptr<media::SimpleCdmPromise> promise) override;
   void RemoveSession(const std::string& session_id,
-                     scoped_ptr<media::SimpleCdmPromise> promise) override;
+                     std::unique_ptr<media::SimpleCdmPromise> promise) override;
   CdmContext* GetCdmContext() override;
 
   // media::CdmContext implementation.
@@ -97,7 +98,7 @@
 
  private:
   PpapiDecryptor(
-      scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
+      std::unique_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
       const media::SessionMessageCB& session_message_cb,
       const media::SessionClosedCB& session_closed_cb,
       const media::LegacySessionErrorCB& legacy_session_error_cb,
@@ -109,7 +110,7 @@
   void InitializeCdm(const std::string& key_system,
                      bool allow_distinctive_identifier,
                      bool allow_persistent_state,
-                     scoped_ptr<media::SimpleCdmPromise> promise);
+                     std::unique_ptr<media::SimpleCdmPromise> promise);
 
   void OnDecoderInitialized(StreamType stream_type, bool success);
 
@@ -140,7 +141,7 @@
 
   // Hold a reference of the Pepper CDM wrapper to make sure the plugin lives
   // as long as needed.
-  scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper_;
+  std::unique_ptr<PepperCdmWrapper> pepper_cdm_wrapper_;
 
   // Callbacks for firing session events.
   media::SessionMessageCB session_message_cb_;
diff --git a/content/renderer/media/cdm/proxy_media_keys.cc b/content/renderer/media/cdm/proxy_media_keys.cc
index 6e7245d..a1299ea 100644
--- a/content/renderer/media/cdm/proxy_media_keys.cc
+++ b/content/renderer/media/cdm/proxy_media_keys.cc
@@ -33,7 +33,7 @@
       session_keys_change_cb, session_expiration_update_cb));
 
   // ProxyMediaKeys ownership passed to the promise.
-  scoped_ptr<media::CdmInitializedPromise> promise(
+  std::unique_ptr<media::CdmInitializedPromise> promise(
       new media::CdmInitializedPromise(cdm_created_cb, proxy_media_keys));
 
   proxy_media_keys->InitializeCdm(key_system, security_origin,
@@ -42,7 +42,7 @@
 
 void ProxyMediaKeys::SetServerCertificate(
     const std::vector<uint8_t>& certificate,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   manager_->SetServerCertificate(cdm_id_, promise_id, certificate);
 }
@@ -51,7 +51,7 @@
     SessionType session_type,
     media::EmeInitDataType init_data_type,
     const std::vector<uint8_t>& init_data,
-    scoped_ptr<media::NewSessionCdmPromise> promise) {
+    std::unique_ptr<media::NewSessionCdmPromise> promise) {
   CdmHostMsg_CreateSession_InitDataType create_session_init_data_type =
       INIT_DATA_TYPE_WEBM;
   switch (init_data_type) {
@@ -78,7 +78,7 @@
 void ProxyMediaKeys::LoadSession(
     SessionType session_type,
     const std::string& session_id,
-    scoped_ptr<media::NewSessionCdmPromise> promise) {
+    std::unique_ptr<media::NewSessionCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   manager_->LoadSession(cdm_id_, promise_id, session_type, session_id);
 }
@@ -86,20 +86,21 @@
 void ProxyMediaKeys::UpdateSession(
     const std::string& session_id,
     const std::vector<uint8_t>& response,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   manager_->UpdateSession(cdm_id_, promise_id, session_id, response);
 }
 
-void ProxyMediaKeys::CloseSession(const std::string& session_id,
-                                  scoped_ptr<media::SimpleCdmPromise> promise) {
+void ProxyMediaKeys::CloseSession(
+    const std::string& session_id,
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   manager_->CloseSession(cdm_id_, promise_id, session_id);
 }
 
 void ProxyMediaKeys::RemoveSession(
     const std::string& session_id,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   manager_->RemoveSession(cdm_id_, promise_id, session_id);
 }
@@ -194,7 +195,7 @@
     const std::string& key_system,
     const GURL& security_origin,
     bool use_hw_secure_codecs,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   manager_->InitializeCdm(cdm_id_, promise_id, this, key_system,
                           security_origin, use_hw_secure_codecs);
diff --git a/content/renderer/media/cdm/proxy_media_keys.h b/content/renderer/media/cdm/proxy_media_keys.h
index e809244..e78ea36 100644
--- a/content/renderer/media/cdm/proxy_media_keys.h
+++ b/content/renderer/media/cdm/proxy_media_keys.h
@@ -44,22 +44,23 @@
   // MediaKeys implementation.
   void SetServerCertificate(
       const std::vector<uint8_t>& certificate,
-      scoped_ptr<media::SimpleCdmPromise> promise) override;
+      std::unique_ptr<media::SimpleCdmPromise> promise) override;
   void CreateSessionAndGenerateRequest(
       SessionType session_type,
       media::EmeInitDataType init_data_type,
       const std::vector<uint8_t>& init_data,
-      scoped_ptr<media::NewSessionCdmPromise> promise) override;
-  void LoadSession(SessionType session_type,
-                   const std::string& session_id,
-                   scoped_ptr<media::NewSessionCdmPromise> promise) override;
+      std::unique_ptr<media::NewSessionCdmPromise> promise) override;
+  void LoadSession(
+      SessionType session_type,
+      const std::string& session_id,
+      std::unique_ptr<media::NewSessionCdmPromise> promise) override;
   void UpdateSession(const std::string& session_id,
                      const std::vector<uint8_t>& response,
-                     scoped_ptr<media::SimpleCdmPromise> promise) override;
+                     std::unique_ptr<media::SimpleCdmPromise> promise) override;
   void CloseSession(const std::string& session_id,
-                    scoped_ptr<media::SimpleCdmPromise> promise) override;
+                    std::unique_ptr<media::SimpleCdmPromise> promise) override;
   void RemoveSession(const std::string& session_id,
-                     scoped_ptr<media::SimpleCdmPromise> promise) override;
+                     std::unique_ptr<media::SimpleCdmPromise> promise) override;
   media::CdmContext* GetCdmContext() override;
 
   // media::CdmContext implementation.
@@ -104,7 +105,7 @@
   void InitializeCdm(const std::string& key_system,
                      const GURL& security_origin,
                      bool use_hw_secure_codecs,
-                     scoped_ptr<media::SimpleCdmPromise> promise);
+                     std::unique_ptr<media::SimpleCdmPromise> promise);
 
   RendererCdmManager* manager_;
   int cdm_id_;
diff --git a/content/renderer/media/cdm/render_cdm_factory.cc b/content/renderer/media/cdm/render_cdm_factory.cc
index 46436ae..8363084 100644
--- a/content/renderer/media/cdm/render_cdm_factory.cc
+++ b/content/renderer/media/cdm/render_cdm_factory.cc
@@ -4,10 +4,11 @@
 
 #include "content/renderer/media/cdm/render_cdm_factory.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "media/base/cdm_config.h"
diff --git a/content/renderer/media/cdm/render_cdm_factory.h b/content/renderer/media/cdm/render_cdm_factory.h
index da7ec96c..9824bf99 100644
--- a/content/renderer/media/cdm/render_cdm_factory.h
+++ b/content/renderer/media/cdm/render_cdm_factory.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_
 #define CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "media/base/cdm_factory.h"
 #include "media/base/media_keys.h"
diff --git a/content/renderer/media/html_video_element_capturer_source.cc b/content/renderer/media/html_video_element_capturer_source.cc
index 7c45e78..04dd824f 100644
--- a/content/renderer/media/html_video_element_capturer_source.cc
+++ b/content/renderer/media/html_video_element_capturer_source.cc
@@ -4,6 +4,7 @@
 
 #include "content/renderer/media/html_video_element_capturer_source.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
 #include "content/public/renderer/render_thread.h"
@@ -25,7 +26,7 @@
 namespace content {
 
 //static
-scoped_ptr<HtmlVideoElementCapturerSource>
+std::unique_ptr<HtmlVideoElementCapturerSource>
 HtmlVideoElementCapturerSource::CreateFromWebMediaPlayerImpl(
     blink::WebMediaPlayer* player,
     const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
@@ -33,7 +34,7 @@
   // The histogram counts the number of calls to the JS API.
   UpdateWebRTCMethodCount(WEBKIT_VIDEO_CAPTURE_STREAM);
 
-  return make_scoped_ptr(new HtmlVideoElementCapturerSource(
+  return base::WrapUnique(new HtmlVideoElementCapturerSource(
       static_cast<media::WebMediaPlayerImpl*>(player)->AsWeakPtr(),
       io_task_runner));
 }
diff --git a/content/renderer/media/html_video_element_capturer_source.h b/content/renderer/media/html_video_element_capturer_source.h
index c5e7cb36..e248358 100644
--- a/content/renderer/media/html_video_element_capturer_source.h
+++ b/content/renderer/media/html_video_element_capturer_source.h
@@ -29,10 +29,10 @@
 class CONTENT_EXPORT HtmlVideoElementCapturerSource final
     : public media::VideoCapturerSource {
  public:
-  static scoped_ptr<HtmlVideoElementCapturerSource>
-      CreateFromWebMediaPlayerImpl(
-          blink::WebMediaPlayer* player,
-          const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
+  static std::unique_ptr<HtmlVideoElementCapturerSource>
+  CreateFromWebMediaPlayerImpl(
+      blink::WebMediaPlayer* player,
+      const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
 
   HtmlVideoElementCapturerSource(
       const base::WeakPtr<blink::WebMediaPlayer>& player,
diff --git a/content/renderer/media/html_video_element_capturer_source_unittest.cc b/content/renderer/media/html_video_element_capturer_source_unittest.cc
index 1bc5316..b3bbc3b 100644
--- a/content/renderer/media/html_video_element_capturer_source_unittest.cc
+++ b/content/renderer/media/html_video_element_capturer_source_unittest.cc
@@ -113,8 +113,8 @@
   // schedule capture events.
   const base::MessageLoopForUI message_loop_;
 
-  scoped_ptr<MockWebMediaPlayer> web_media_player_;
-  scoped_ptr<HtmlVideoElementCapturerSource> html_video_capturer_;
+  std::unique_ptr<MockWebMediaPlayer> web_media_player_;
+  std::unique_ptr<HtmlVideoElementCapturerSource> html_video_capturer_;
 };
 
 // Constructs and destructs all objects, in particular |html_video_capturer_|
diff --git a/content/renderer/media/media_recorder_handler.cc b/content/renderer/media/media_recorder_handler.cc
index d97cedd..aa41672 100644
--- a/content/renderer/media/media_recorder_handler.cc
+++ b/content/renderer/media/media_recorder_handler.cc
@@ -225,7 +225,7 @@
 
 void MediaRecorderHandler::OnEncodedVideo(
     const scoped_refptr<media::VideoFrame>& video_frame,
-    scoped_ptr<std::string> encoded_data,
+    std::unique_ptr<std::string> encoded_data,
     TimeTicks timestamp,
     bool is_key_frame) {
   DCHECK(main_render_thread_checker_.CalledOnValidThread());
@@ -235,9 +235,10 @@
                               is_key_frame);
 }
 
-void MediaRecorderHandler::OnEncodedAudio(const media::AudioParameters& params,
-                                          scoped_ptr<std::string> encoded_data,
-                                          base::TimeTicks timestamp) {
+void MediaRecorderHandler::OnEncodedAudio(
+    const media::AudioParameters& params,
+    std::unique_ptr<std::string> encoded_data,
+    base::TimeTicks timestamp) {
   DCHECK(main_render_thread_checker_.CalledOnValidThread());
   if (webm_muxer_)
     webm_muxer_->OnEncodedAudio(params, std::move(encoded_data), timestamp);
diff --git a/content/renderer/media/media_recorder_handler.h b/content/renderer/media/media_recorder_handler.h
index fb25deaf..df4645a 100644
--- a/content/renderer/media/media_recorder_handler.h
+++ b/content/renderer/media/media_recorder_handler.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_
 #define CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_piece.h"
@@ -67,11 +68,11 @@
   friend class MediaRecorderHandlerTest;
 
   void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame,
-                      scoped_ptr<std::string> encoded_data,
+                      std::unique_ptr<std::string> encoded_data,
                       base::TimeTicks timestamp,
                       bool is_key_frame);
   void OnEncodedAudio(const media::AudioParameters& params,
-                      scoped_ptr<std::string> encoded_data,
+                      std::unique_ptr<std::string> encoded_data,
                       base::TimeTicks timestamp);
   void WriteData(base::StringPiece data);
 
@@ -107,7 +108,7 @@
   ScopedVector<AudioTrackRecorder> audio_recorders_;
 
   // Worker class doing the actual Webm Muxing work.
-  scoped_ptr<media::WebmMuxer> webm_muxer_;
+  std::unique_ptr<media::WebmMuxer> webm_muxer_;
 
   base::WeakPtrFactory<MediaRecorderHandler> weak_factory_;
 
diff --git a/content/renderer/media/media_recorder_handler_unittest.cc b/content/renderer/media/media_recorder_handler_unittest.cc
index 2a99ccb..5bc99ae 100644
--- a/content/renderer/media/media_recorder_handler_unittest.cc
+++ b/content/renderer/media/media_recorder_handler_unittest.cc
@@ -110,8 +110,8 @@
       registry_.AddAudioTrack(kTestAudioTrackId);
   }
 
-  scoped_ptr<media::AudioBus> NextAudioBus() {
-    scoped_ptr<media::AudioBus> bus(media::AudioBus::Create(
+  std::unique_ptr<media::AudioBus> NextAudioBus() {
+    std::unique_ptr<media::AudioBus> bus(media::AudioBus::Create(
         kTestAudioChannels,
         kTestAudioSampleRate * kTestAudioBufferDurationMs / 1000));
     audio_source_.OnMoreData(bus.get(), 0, 0);
@@ -125,7 +125,7 @@
   MockMediaStreamRegistry registry_;
 
   // The Class under test. Needs to be scoped_ptr to force its destruction.
-  scoped_ptr<MediaRecorderHandler> media_recorder_handler_;
+  std::unique_ptr<MediaRecorderHandler> media_recorder_handler_;
 
   // For generating test AudioBuses
   media::SineWaveAudioSource audio_source_;
@@ -278,8 +278,8 @@
   EXPECT_TRUE(media_recorder_handler_->start());
 
   InSequence s;
-  const scoped_ptr<media::AudioBus> audio_bus1 = NextAudioBus();
-  const scoped_ptr<media::AudioBus> audio_bus2 = NextAudioBus();
+  const std::unique_ptr<media::AudioBus> audio_bus1 = NextAudioBus();
+  const std::unique_ptr<media::AudioBus> audio_bus2 = NextAudioBus();
 
   media::AudioParameters params(
       media::AudioParameters::AUDIO_PCM_LINEAR, media::CHANNEL_LAYOUT_STEREO,
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index 15fc836..869e416 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -144,8 +144,8 @@
 
  private:
   base::ThreadChecker thread_checker_;
-  scoped_ptr<media::AudioBus> bus_;
-  scoped_ptr<float*[]> channel_ptrs_;
+  std::unique_ptr<media::AudioBus> bus_;
+  std::unique_ptr<float* []> channel_ptrs_;
 };
 
 // Wraps AudioFifo to provide a cleaner interface to MediaStreamAudioProcessor.
@@ -249,9 +249,9 @@
   const int source_channels_;  // For a DCHECK.
   const int source_frames_;  // For a DCHECK.
   const int sample_rate_;
-  scoped_ptr<media::AudioBus> audio_source_intermediate_;
-  scoped_ptr<MediaStreamAudioBus> destination_;
-  scoped_ptr<media::AudioFifo> fifo_;
+  std::unique_ptr<media::AudioBus> audio_source_intermediate_;
+  std::unique_ptr<MediaStreamAudioBus> destination_;
+  std::unique_ptr<media::AudioFifo> fifo_;
 
   // When using |fifo_|, this is the audio delay of the first sample to be
   // consumed next from the FIFO.  When not using |fifo_|, this is the audio
diff --git a/content/renderer/media/media_stream_audio_processor.h b/content/renderer/media/media_stream_audio_processor.h
index 478b594..6629015 100644
--- a/content/renderer/media/media_stream_audio_processor.h
+++ b/content/renderer/media/media_stream_audio_processor.h
@@ -157,18 +157,18 @@
   base::subtle::Atomic32 render_delay_ms_;
 
   // Module to detect and report (to UMA) bit exact audio repetition.
-  scoped_ptr<AudioRepetitionDetector> audio_repetition_detector_;
+  std::unique_ptr<AudioRepetitionDetector> audio_repetition_detector_;
 
   // Module to handle processing and format conversion.
-  scoped_ptr<webrtc::AudioProcessing> audio_processing_;
+  std::unique_ptr<webrtc::AudioProcessing> audio_processing_;
 
   // FIFO to provide 10 ms capture chunks.
-  scoped_ptr<MediaStreamAudioFifo> capture_fifo_;
+  std::unique_ptr<MediaStreamAudioFifo> capture_fifo_;
   // Receives processing output.
-  scoped_ptr<MediaStreamAudioBus> output_bus_;
+  std::unique_ptr<MediaStreamAudioBus> output_bus_;
 
   // FIFO to provide 10 ms render chunks when the AEC is enabled.
-  scoped_ptr<MediaStreamAudioFifo> render_fifo_;
+  std::unique_ptr<MediaStreamAudioFifo> render_fifo_;
 
   // These are mutated on the main render thread in OnCaptureFormatChanged().
   // The caller guarantees this does not run concurrently with accesses on the
@@ -192,7 +192,7 @@
   // Flag to enable stereo channel mirroring.
   bool audio_mirroring_;
 
-  scoped_ptr<webrtc::TypingDetection> typing_detector_;
+  std::unique_ptr<webrtc::TypingDetection> typing_detector_;
   // This flag is used to show the result of typing detection.
   // It can be accessed by the capture audio thread and by the libjingle thread
   // which calls GetStats().
@@ -206,7 +206,7 @@
 
   // Object for logging echo information when the AEC is enabled. Accessible by
   // the libjingle thread through GetStats().
-  scoped_ptr<EchoInformation> echo_information_;
+  std::unique_ptr<EchoInformation> echo_information_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor);
 };
diff --git a/content/renderer/media/media_stream_audio_processor_unittest.cc b/content/renderer/media/media_stream_audio_processor_unittest.cc
index 5702046..1724787 100644
--- a/content/renderer/media/media_stream_audio_processor_unittest.cc
+++ b/content/renderer/media/media_stream_audio_processor_unittest.cc
@@ -91,17 +91,17 @@
     const int packet_size =
         params.frames_per_buffer() * 2 * params.channels();
     const size_t length = packet_size * kNumberOfPacketsForTest;
-    scoped_ptr<char[]> capture_data(new char[length]);
+    std::unique_ptr<char[]> capture_data(new char[length]);
     ReadDataFromSpeechFile(capture_data.get(), length);
     const int16_t* data_ptr =
         reinterpret_cast<const int16_t*>(capture_data.get());
-    scoped_ptr<media::AudioBus> data_bus = media::AudioBus::Create(
-        params.channels(), params.frames_per_buffer());
+    std::unique_ptr<media::AudioBus> data_bus =
+        media::AudioBus::Create(params.channels(), params.frames_per_buffer());
 
     // |data_bus_playout| is used if the number of capture channels is larger
     // that max allowed playout channels. |data_bus_playout_to_use| points to
     // the AudioBus to use, either |data_bus| or |data_bus_playout|.
-    scoped_ptr<media::AudioBus> data_bus_playout;
+    std::unique_ptr<media::AudioBus> data_bus_playout;
     media::AudioBus* data_bus_playout_to_use = data_bus.get();
     if (params.channels() > kMaxNumberOfPlayoutDataChannels) {
       data_bus_playout =
@@ -487,12 +487,12 @@
   // Construct left and right channels, and assign different values to the
   // first data of the left channel and right channel.
   const int size = media::AudioBus::CalculateMemorySize(source_params);
-  scoped_ptr<float, base::AlignedFreeDeleter> left_channel(
+  std::unique_ptr<float, base::AlignedFreeDeleter> left_channel(
       static_cast<float*>(base::AlignedAlloc(size, 32)));
-  scoped_ptr<float, base::AlignedFreeDeleter> right_channel(
+  std::unique_ptr<float, base::AlignedFreeDeleter> right_channel(
       static_cast<float*>(base::AlignedAlloc(size, 32)));
-  scoped_ptr<media::AudioBus> wrapper = media::AudioBus::CreateWrapper(
-      source_params.channels());
+  std::unique_ptr<media::AudioBus> wrapper =
+      media::AudioBus::CreateWrapper(source_params.channels());
   wrapper->set_frames(source_params.frames_per_buffer());
   wrapper->SetChannelData(0, left_channel.get());
   wrapper->SetChannelData(1, right_channel.get());
diff --git a/content/renderer/media/media_stream_audio_source.h b/content/renderer/media/media_stream_audio_source.h
index 6d7da5c..3d55f22 100644
--- a/content/renderer/media/media_stream_audio_source.h
+++ b/content/renderer/media/media_stream_audio_source.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "content/renderer/media/media_stream_source.h"
@@ -52,7 +53,7 @@
 
   WebRtcAudioCapturer* audio_capturer() const { return audio_capturer_.get(); }
 
-  void SetAudioCapturer(scoped_ptr<WebRtcAudioCapturer> capturer) {
+  void SetAudioCapturer(std::unique_ptr<WebRtcAudioCapturer> capturer) {
     DCHECK(!audio_capturer_.get());
     audio_capturer_ = std::move(capturer);
   }
@@ -69,7 +70,7 @@
     return webaudio_capturer_.get();
   }
 
-  void SetWebAudioCapturer(scoped_ptr<WebAudioCapturerSource> capturer) {
+  void SetWebAudioCapturer(std::unique_ptr<WebAudioCapturerSource> capturer) {
     DCHECK(!webaudio_capturer_.get());
     webaudio_capturer_ = std::move(capturer);
   }
@@ -87,8 +88,8 @@
   // TODO(miu): In a series of soon-upcoming changes, WebRtcAudioCapturer and
   // WebAudioCapturerSource will become subclasses of MediaStreamAudioSource
   // instead.
-  scoped_ptr<WebRtcAudioCapturer> audio_capturer_;
-  scoped_ptr<WebAudioCapturerSource> webaudio_capturer_;
+  std::unique_ptr<WebRtcAudioCapturer> audio_capturer_;
+  std::unique_ptr<WebAudioCapturerSource> webaudio_capturer_;
 
   // This member holds an instance of webrtc::LocalAudioSource. This is used
   // as a container for audio options.
diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h
index 153746081..6c0220e2 100644
--- a/content/renderer/media/media_stream_dispatcher.h
+++ b/content/renderer/media/media_stream_dispatcher.h
@@ -7,11 +7,11 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
diff --git a/content/renderer/media/media_stream_dispatcher_unittest.cc b/content/renderer/media/media_stream_dispatcher_unittest.cc
index bc82587..fa9e80b 100644
--- a/content/renderer/media/media_stream_dispatcher_unittest.cc
+++ b/content/renderer/media/media_stream_dispatcher_unittest.cc
@@ -2,17 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/media_stream_dispatcher.h"
+
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_number_conversions.h"
 #include "content/common/media/media_stream_messages.h"
 #include "content/public/common/media_stream_request.h"
-#include "content/renderer/media/media_stream_dispatcher.h"
 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
 #include "media/audio/audio_parameters.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -174,8 +175,8 @@
 
  protected:
   base::MessageLoop message_loop_;
-  scoped_ptr<MediaStreamDispatcherUnderTest> dispatcher_;
-  scoped_ptr<MockMediaStreamDispatcherEventHandler> handler_;
+  std::unique_ptr<MediaStreamDispatcherUnderTest> dispatcher_;
+  std::unique_ptr<MockMediaStreamDispatcherEventHandler> handler_;
   GURL security_origin_;
   int request_id_;
 };
@@ -215,11 +216,12 @@
 }
 
 TEST_F(MediaStreamDispatcherTest, BasicVideoDevice) {
-  scoped_ptr<MediaStreamDispatcher> dispatcher(new MediaStreamDispatcher(NULL));
-  scoped_ptr<MockMediaStreamDispatcherEventHandler>
-      handler1(new MockMediaStreamDispatcherEventHandler);
-  scoped_ptr<MockMediaStreamDispatcherEventHandler>
-      handler2(new MockMediaStreamDispatcherEventHandler);
+  std::unique_ptr<MediaStreamDispatcher> dispatcher(
+      new MediaStreamDispatcher(NULL));
+  std::unique_ptr<MockMediaStreamDispatcherEventHandler> handler1(
+      new MockMediaStreamDispatcherEventHandler);
+  std::unique_ptr<MockMediaStreamDispatcherEventHandler> handler2(
+      new MockMediaStreamDispatcherEventHandler);
   GURL security_origin;
 
   int ipc_request_id1 = dispatcher->next_ipc_id_;
@@ -304,9 +306,10 @@
 }
 
 TEST_F(MediaStreamDispatcherTest, TestFailure) {
-  scoped_ptr<MediaStreamDispatcher> dispatcher(new MediaStreamDispatcher(NULL));
-  scoped_ptr<MockMediaStreamDispatcherEventHandler>
-      handler(new MockMediaStreamDispatcherEventHandler);
+  std::unique_ptr<MediaStreamDispatcher> dispatcher(
+      new MediaStreamDispatcher(NULL));
+  std::unique_ptr<MockMediaStreamDispatcherEventHandler> handler(
+      new MockMediaStreamDispatcherEventHandler);
   StreamControls components(true, true);
   GURL security_origin;
 
@@ -351,9 +354,10 @@
 }
 
 TEST_F(MediaStreamDispatcherTest, CancelGenerateStream) {
-  scoped_ptr<MediaStreamDispatcher> dispatcher(new MediaStreamDispatcher(NULL));
-  scoped_ptr<MockMediaStreamDispatcherEventHandler>
-      handler(new MockMediaStreamDispatcherEventHandler);
+  std::unique_ptr<MediaStreamDispatcher> dispatcher(
+      new MediaStreamDispatcher(NULL));
+  std::unique_ptr<MockMediaStreamDispatcherEventHandler> handler(
+      new MockMediaStreamDispatcherEventHandler);
   StreamControls components(true, true);
   int ipc_request_id1 = dispatcher->next_ipc_id_;
 
diff --git a/content/renderer/media/media_stream_video_capturer_source.cc b/content/renderer/media/media_stream_video_capturer_source.cc
index b4805c73..b080ec8 100644
--- a/content/renderer/media/media_stream_video_capturer_source.cc
+++ b/content/renderer/media/media_stream_video_capturer_source.cc
@@ -392,7 +392,7 @@
 
 MediaStreamVideoCapturerSource::MediaStreamVideoCapturerSource(
     const SourceStoppedCallback& stop_callback,
-    scoped_ptr<media::VideoCapturerSource> source)
+    std::unique_ptr<media::VideoCapturerSource> source)
     : source_(std::move(source)) {
   SetStopCallback(stop_callback);
 }
diff --git a/content/renderer/media/media_stream_video_capturer_source.h b/content/renderer/media/media_stream_video_capturer_source.h
index bc7b015..2d79f944 100644
--- a/content/renderer/media/media_stream_video_capturer_source.h
+++ b/content/renderer/media/media_stream_video_capturer_source.h
@@ -25,8 +25,9 @@
 class CONTENT_EXPORT MediaStreamVideoCapturerSource
     : public MediaStreamVideoSource {
  public:
-  MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback,
-                                 scoped_ptr<media::VideoCapturerSource> source);
+  MediaStreamVideoCapturerSource(
+      const SourceStoppedCallback& stop_callback,
+      std::unique_ptr<media::VideoCapturerSource> source);
   MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback,
                                  const StreamDeviceInfo& device_info);
   ~MediaStreamVideoCapturerSource() override;
@@ -56,7 +57,7 @@
   const char* GetPowerLineFrequencyForTesting() const;
 
   // The source that provides video frames.
-  const scoped_ptr<media::VideoCapturerSource> source_;
+  const std::unique_ptr<media::VideoCapturerSource> source_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource);
 };
diff --git a/content/renderer/media/media_stream_video_capturer_source_unittest.cc b/content/renderer/media/media_stream_video_capturer_source_unittest.cc
index d631ced6..2161443 100644
--- a/content/renderer/media/media_stream_video_capturer_source_unittest.cc
+++ b/content/renderer/media/media_stream_video_capturer_source_unittest.cc
@@ -74,7 +74,8 @@
   }
 
   void InitWithDeviceInfo(const StreamDeviceInfo& device_info) {
-    scoped_ptr<MockVideoCapturerSource> delegate(new MockVideoCapturerSource());
+    std::unique_ptr<MockVideoCapturerSource> delegate(
+        new MockVideoCapturerSource());
     delegate_ = delegate.get();
     source_ = new MediaStreamVideoCapturerSource(
         base::Bind(&MediaStreamVideoCapturerSourceTest::OnSourceStopped,
@@ -123,7 +124,7 @@
   // A ChildProcess and a MessageLoopForUI are both needed to fool the Tracks
   // and Sources below into believing they are on the right threads.
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
+  std::unique_ptr<ChildProcess> child_process_;
 
   blink::WebMediaStreamSource webkit_source_;
   MediaStreamVideoCapturerSource* source_;  // owned by |webkit_source_|.
@@ -291,7 +292,8 @@
 }
 
 TEST_F(MediaStreamVideoCapturerSourceTest, Ended) {
-  scoped_ptr<MockVideoCapturerSource> delegate(new MockVideoCapturerSource());
+  std::unique_ptr<MockVideoCapturerSource> delegate(
+      new MockVideoCapturerSource());
   delegate_ = delegate.get();
   source_ = new MediaStreamVideoCapturerSource(
       base::Bind(&MediaStreamVideoCapturerSourceTest::OnSourceStopped,
diff --git a/content/renderer/media/media_stream_video_renderer_sink.h b/content/renderer/media/media_stream_video_renderer_sink.h
index ac332969..d858062a 100644
--- a/content/renderer/media/media_stream_video_renderer_sink.h
+++ b/content/renderer/media/media_stream_video_renderer_sink.h
@@ -89,7 +89,7 @@
   const blink::WebMediaStreamTrack video_track_;
 
   // Pool of GpuMemoryBuffers and resources used to create hardware frames.
-  scoped_ptr<media::GpuMemoryBufferVideoFramePool> gpu_memory_buffer_pool_;
+  std::unique_ptr<media::GpuMemoryBufferVideoFramePool> gpu_memory_buffer_pool_;
   const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
 
   base::WeakPtrFactory<MediaStreamVideoRendererSink> weak_factory_;
diff --git a/content/renderer/media/media_stream_video_source_unittest.cc b/content/renderer/media/media_stream_video_source_unittest.cc
index d767f81..6b13a3e 100644
--- a/content/renderer/media/media_stream_video_source_unittest.cc
+++ b/content/renderer/media/media_stream_video_source_unittest.cc
@@ -230,7 +230,7 @@
     }
   }
   const base::MessageLoopForUI message_loop_;
-  const scoped_ptr<ChildProcess> child_process_;
+  const std::unique_ptr<ChildProcess> child_process_;
   blink::WebMediaStreamTrack track_to_release_;
   int number_of_successful_constraints_applied_;
   int number_of_failed_constraints_applied_;
diff --git a/content/renderer/media/media_stream_video_track.cc b/content/renderer/media/media_stream_video_track.cc
index b85a5b8..4a0bca0 100644
--- a/content/renderer/media/media_stream_video_track.cc
+++ b/content/renderer/media/media_stream_video_track.cc
@@ -15,7 +15,7 @@
 namespace content {
 
 namespace {
-void ResetCallback(scoped_ptr<VideoCaptureDeliverFrameCB> callback) {
+void ResetCallback(std::unique_ptr<VideoCaptureDeliverFrameCB> callback) {
   // |callback| will be deleted when this exits.
 }
 
@@ -129,7 +129,7 @@
   for (; it != callbacks_.end(); ++it) {
     if (it->first == id) {
       // Callback is copied to heap and then deleted on the target thread.
-      scoped_ptr<VideoCaptureDeliverFrameCB> callback;
+      std::unique_ptr<VideoCaptureDeliverFrameCB> callback;
       callback.reset(new VideoCaptureDeliverFrameCB(it->second));
       callbacks_.erase(it);
       task_runner->PostTask(
diff --git a/content/renderer/media/media_stream_video_track_unittest.cc b/content/renderer/media/media_stream_video_track_unittest.cc
index 3d24352e..392d2f6 100644
--- a/content/renderer/media/media_stream_video_track_unittest.cc
+++ b/content/renderer/media/media_stream_video_track_unittest.cc
@@ -99,7 +99,7 @@
 
  private:
   const base::MessageLoopForUI message_loop_;
-  const scoped_ptr<ChildProcess> child_process_;
+  const std::unique_ptr<ChildProcess> child_process_;
   blink::WebMediaStreamSource blink_source_;
   // |mock_source_| is owned by |webkit_source_|.
   MockMediaStreamVideoSource* mock_source_;
diff --git a/content/renderer/media/midi_message_filter.h b/content/renderer/media/midi_message_filter.h
index e60bcefe..ae0279a 100644
--- a/content/renderer/media/midi_message_filter.h
+++ b/content/renderer/media/midi_message_filter.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "ipc/message_filter.h"
 #include "media/midi/midi_port_info.h"
diff --git a/content/renderer/media/mock_media_stream_registry.cc b/content/renderer/media/mock_media_stream_registry.cc
index 128024e..9bef2c5 100644
--- a/content/renderer/media/mock_media_stream_registry.cc
+++ b/content/renderer/media/mock_media_stream_registry.cc
@@ -65,7 +65,7 @@
   const scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
       WebRtcLocalAudioTrackAdapter::Create(track_id,
                                            nullptr /* track source */));
-  scoped_ptr<WebRtcLocalAudioTrack> native_track(
+  std::unique_ptr<WebRtcLocalAudioTrack> native_track(
       new WebRtcLocalAudioTrack(adapter.get()));
   blink_track.setExtraData(native_track.release());
   test_stream_.addTrack(blink_track);
diff --git a/content/renderer/media/mock_peer_connection_impl.h b/content/renderer/media/mock_peer_connection_impl.h
index 4b81d5e..da60d59 100644
--- a/content/renderer/media/mock_peer_connection_impl.h
+++ b/content/renderer/media/mock_peer_connection_impl.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "third_party/webrtc/api/peerconnectioninterface.h"
 
@@ -117,9 +117,10 @@
   std::string stream_label_;
   rtc::scoped_refptr<MockStreamCollection> local_streams_;
   rtc::scoped_refptr<MockStreamCollection> remote_streams_;
-  scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_;
-  scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_;
-  scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_;
+  std::unique_ptr<webrtc::SessionDescriptionInterface> local_desc_;
+  std::unique_ptr<webrtc::SessionDescriptionInterface> remote_desc_;
+  std::unique_ptr<webrtc::SessionDescriptionInterface>
+      created_sessiondescription_;
   bool hint_audio_;
   bool hint_video_;
   bool getstats_result_;
diff --git a/content/renderer/media/peer_connection_identity_store.cc b/content/renderer/media/peer_connection_identity_store.cc
index c6f432d..d76a217 100644
--- a/content/renderer/media/peer_connection_identity_store.cc
+++ b/content/renderer/media/peer_connection_identity_store.cc
@@ -4,9 +4,10 @@
 
 #include "content/renderer/media/peer_connection_identity_store.h"
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/renderer/media/webrtc_identity_service.h"
 #include "content/renderer/render_thread_impl.h"
@@ -91,7 +92,7 @@
 // Used to invoke |observer|->OnSuccess in a PostTask.
 void ObserverOnSuccess(
     const rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver>& observer,
-    scoped_ptr<rtc::SSLIdentity> identity) {
+    std::unique_ptr<rtc::SSLIdentity> identity) {
   observer->OnSuccess(rtc::scoped_ptr<rtc::SSLIdentity>(identity.release()));
 }
 
@@ -140,8 +141,8 @@
   } else {
     // Fall back on WebRTC identity generation code for everything else, e.g.
     // RSA with any other parameters or ECDSA. These will not be cached.
-    scoped_ptr<rtc::SSLIdentity> identity(rtc::SSLIdentity::Generate(
-        kIdentityName, key_params));
+    std::unique_ptr<rtc::SSLIdentity> identity(
+        rtc::SSLIdentity::Generate(kIdentityName, key_params));
 
     // Invoke |observer| callbacks asynchronously. The callbacks of
     // DtlsIdentityStoreInterface implementations have to be async.
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index 1032364..60f3d26 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -272,7 +272,7 @@
 // Builds a DictionaryValue from the StatsReport.
 // The caller takes the ownership of the returned value.
 static base::DictionaryValue* GetDictValue(const StatsReport& report) {
-  scoped_ptr<base::DictionaryValue> stats, result;
+  std::unique_ptr<base::DictionaryValue> stats, result;
 
   stats.reset(GetDictValueStats(report));
   if (!stats)
@@ -295,7 +295,7 @@
       : lid_(lid), main_thread_(base::ThreadTaskRunnerHandle::Get()) {}
 
   void OnComplete(const StatsReports& reports) override {
-    scoped_ptr<base::ListValue> list(new base::ListValue());
+    std::unique_ptr<base::ListValue> list(new base::ListValue());
 
     for (const auto* r : reports) {
       base::DictionaryValue* report = GetDictValue(*r);
@@ -321,7 +321,7 @@
  private:
   // Static since |this| will most likely have been deleted by the time we
   // get here.
-  static void OnCompleteImpl(scoped_ptr<base::ListValue> list, int lid) {
+  static void OnCompleteImpl(std::unique_ptr<base::ListValue> list, int lid) {
     DCHECK(!list->empty());
     RenderThreadImpl::current()->Send(
         new PeerConnectionTrackerHost_AddStats(lid, *list.get()));
diff --git a/content/renderer/media/pepper_to_video_track_adapter_unittest.cc b/content/renderer/media/pepper_to_video_track_adapter_unittest.cc
index 219667e..42aec361 100644
--- a/content/renderer/media/pepper_to_video_track_adapter_unittest.cc
+++ b/content/renderer/media/pepper_to_video_track_adapter_unittest.cc
@@ -49,7 +49,7 @@
   // Sources inside |registry_| into believing they are on the right threads.
   const ChildProcess child_process_;
   const MockRenderThread render_thread_;
-  scoped_ptr<MockMediaStreamRegistry> registry_;
+  std::unique_ptr<MockMediaStreamRegistry> registry_;
 };
 
 TEST_F(PepperToVideoTrackAdapterTest, Open) {
diff --git a/content/renderer/media/remote_media_stream_impl.cc b/content/renderer/media/remote_media_stream_impl.cc
index 2a898b3..35a3cb4 100644
--- a/content/renderer/media/remote_media_stream_impl.cc
+++ b/content/renderer/media/remote_media_stream_impl.cc
@@ -133,7 +133,7 @@
       const scoped_refptr<base::SingleThreadTaskRunner>& main_thread,
       webrtc::VideoTrackInterface* webrtc_track)
       : RemoteMediaStreamTrackAdapter(main_thread, webrtc_track) {
-    scoped_ptr<TrackObserver> observer(
+    std::unique_ptr<TrackObserver> observer(
         new TrackObserver(main_thread, observed_track().get()));
     // Here, we use base::Unretained() to avoid a circular reference.
     webkit_initialize_ = base::Bind(
@@ -153,10 +153,10 @@
   }
 
  private:
-  void InitializeWebkitVideoTrack(scoped_ptr<TrackObserver> observer,
+  void InitializeWebkitVideoTrack(std::unique_ptr<TrackObserver> observer,
                                   bool enabled) {
     DCHECK(main_thread_->BelongsToCurrentThread());
-    scoped_ptr<MediaStreamRemoteVideoSource> video_source(
+    std::unique_ptr<MediaStreamRemoteVideoSource> video_source(
         new MediaStreamRemoteVideoSource(std::move(observer)));
     InitializeWebkitTrack(blink::WebMediaStreamSource::TypeVideo);
     webkit_track()->source().setExtraData(video_source.get());
@@ -306,8 +306,10 @@
 }
 
 void RemoteMediaStreamImpl::Observer::OnChanged() {
-  scoped_ptr<RemoteAudioTrackAdapters> audio(new RemoteAudioTrackAdapters());
-  scoped_ptr<RemoteVideoTrackAdapters> video(new RemoteVideoTrackAdapters());
+  std::unique_ptr<RemoteAudioTrackAdapters> audio(
+      new RemoteAudioTrackAdapters());
+  std::unique_ptr<RemoteVideoTrackAdapters> video(
+      new RemoteVideoTrackAdapters());
 
   CreateAdaptersForTracks(
       webrtc_stream_->GetAudioTracks(), audio.get(), main_thread_);
@@ -320,8 +322,8 @@
 }
 
 void RemoteMediaStreamImpl::Observer::OnChangedOnMainThread(
-    scoped_ptr<RemoteAudioTrackAdapters> audio_tracks,
-    scoped_ptr<RemoteVideoTrackAdapters> video_tracks) {
+    std::unique_ptr<RemoteAudioTrackAdapters> audio_tracks,
+    std::unique_ptr<RemoteVideoTrackAdapters> video_tracks) {
   DCHECK(main_thread_->BelongsToCurrentThread());
   if (media_stream_)
     media_stream_->OnChanged(std::move(audio_tracks), std::move(video_tracks));
@@ -374,8 +376,8 @@
 }
 
 void RemoteMediaStreamImpl::OnChanged(
-    scoped_ptr<RemoteAudioTrackAdapters> audio_tracks,
-    scoped_ptr<RemoteVideoTrackAdapters> video_tracks) {
+    std::unique_ptr<RemoteAudioTrackAdapters> audio_tracks,
+    std::unique_ptr<RemoteVideoTrackAdapters> video_tracks) {
   // Find removed tracks.
   auto audio_it = audio_track_observers_.begin();
   while (audio_it != audio_track_observers_.end()) {
diff --git a/content/renderer/media/remote_media_stream_impl.h b/content/renderer/media/remote_media_stream_impl.h
index 75bfbc84..2106ad1 100644
--- a/content/renderer/media/remote_media_stream_impl.h
+++ b/content/renderer/media/remote_media_stream_impl.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_RENDERER_MEDIA_REMOTE_MEDIA_STREAM_IMPL_H_
 #define CONTENT_RENDERER_MEDIA_REMOTE_MEDIA_STREAM_IMPL_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_checker.h"
@@ -77,16 +78,16 @@
     void OnChanged() override;
 
     void OnChangedOnMainThread(
-        scoped_ptr<RemoteAudioTrackAdapters> audio_tracks,
-        scoped_ptr<RemoteVideoTrackAdapters> video_tracks);
+        std::unique_ptr<RemoteAudioTrackAdapters> audio_tracks,
+        std::unique_ptr<RemoteVideoTrackAdapters> video_tracks);
 
     base::WeakPtr<RemoteMediaStreamImpl> media_stream_;
     const scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
     scoped_refptr<webrtc::MediaStreamInterface> webrtc_stream_;
   };
 
-  void OnChanged(scoped_ptr<RemoteAudioTrackAdapters> audio_tracks,
-                 scoped_ptr<RemoteVideoTrackAdapters> video_tracks);
+  void OnChanged(std::unique_ptr<RemoteAudioTrackAdapters> audio_tracks,
+                 std::unique_ptr<RemoteVideoTrackAdapters> video_tracks);
 
   const scoped_refptr<base::SingleThreadTaskRunner> signaling_thread_;
   scoped_refptr<Observer> observer_;
diff --git a/content/renderer/media/render_media_client.cc b/content/renderer/media/render_media_client.cc
index dc2ac47..d84f30d 100644
--- a/content/renderer/media/render_media_client.cc
+++ b/content/renderer/media/render_media_client.cc
@@ -92,7 +92,7 @@
 }
 
 void RenderMediaClient::SetTickClockForTesting(
-    scoped_ptr<base::TickClock> tick_clock) {
+    std::unique_ptr<base::TickClock> tick_clock) {
   tick_clock_.swap(tick_clock);
 }
 
diff --git a/content/renderer/media/render_media_client.h b/content/renderer/media/render_media_client.h
index 01d5189b..a0ad2ef 100644
--- a/content/renderer/media/render_media_client.h
+++ b/content/renderer/media/render_media_client.h
@@ -5,16 +5,16 @@
 #ifndef CONTENT_RENDERER_MEDIA_RENDER_MEDIA_CLIENT_H_
 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_CLIENT_H_
 
+#include <memory>
+
 #include "base/lazy_instance.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/tick_clock.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "media/base/media_client.h"
-
-#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
+#include "widevine_cdm_version.h"  // In SHARED_INTERMEDIATE_DIR.
 
 namespace content {
 
@@ -32,7 +32,7 @@
       std::vector<media::KeySystemInfo>* key_systems_info) final;
   void RecordRapporURL(const std::string& metric, const GURL& url) final;
 
-  void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock);
+  void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
 
  private:
   friend struct base::DefaultLazyInstanceTraits<RenderMediaClient>;
@@ -52,7 +52,7 @@
   bool is_update_needed_;
 
   base::TimeTicks last_update_time_ticks_;
-  scoped_ptr<base::TickClock> tick_clock_;
+  std::unique_ptr<base::TickClock> tick_clock_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderMediaClient);
 };
diff --git a/content/renderer/media/render_media_client_unittest.cc b/content/renderer/media/render_media_client_unittest.cc
index 5147c49..4bac0b78 100644
--- a/content/renderer/media/render_media_client_unittest.cc
+++ b/content/renderer/media/render_media_client_unittest.cc
@@ -126,7 +126,7 @@
 TEST_F(RenderMediaClientTest, IsKeySystemsUpdateNeeded) {
   base::SimpleTestTickClock* tick_clock = new base::SimpleTestTickClock();
   render_media_client_->SetTickClockForTesting(
-      scoped_ptr<base::TickClock>(tick_clock));
+      std::unique_ptr<base::TickClock>(tick_clock));
 
   // IsKeySystemsUpdateNeeded() always returns true after construction.
   EXPECT_TRUE(render_media_client_->IsKeySystemsUpdateNeeded());
diff --git a/content/renderer/media/render_media_log.cc b/content/renderer/media/render_media_log.cc
index 57a524f9..0d1e88f 100644
--- a/content/renderer/media/render_media_log.cc
+++ b/content/renderer/media/render_media_log.cc
@@ -43,7 +43,7 @@
       << "RenderMediaLog must be constructed on the render thread";
 }
 
-void RenderMediaLog::AddEvent(scoped_ptr<media::MediaLogEvent> event) {
+void RenderMediaLog::AddEvent(std::unique_ptr<media::MediaLogEvent> event) {
   Log(event.get());
 
   // For enforcing delay until it's been a second since the last ipc message was
@@ -144,7 +144,7 @@
 }
 
 void RenderMediaLog::SetTickClockForTesting(
-    scoped_ptr<base::TickClock> tick_clock) {
+    std::unique_ptr<base::TickClock> tick_clock) {
   base::AutoLock auto_lock(lock_);
   tick_clock_.swap(tick_clock);
   last_ipc_send_time_ = tick_clock_->NowTicks();
diff --git a/content/renderer/media/render_media_log.h b/content/renderer/media/render_media_log.h
index 3e31cb9a..3606b98e 100644
--- a/content/renderer/media/render_media_log.h
+++ b/content/renderer/media/render_media_log.h
@@ -35,11 +35,11 @@
   RenderMediaLog();
 
   // MediaLog implementation.
-  void AddEvent(scoped_ptr<media::MediaLogEvent> event) override;
+  void AddEvent(std::unique_ptr<media::MediaLogEvent> event) override;
   std::string GetLastErrorMessage() override;
 
   // Will reset |last_ipc_send_time_| with the value of NowTicks().
-  void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock);
+  void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
   void SetTaskRunnerForTesting(
       const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
 
@@ -57,7 +57,7 @@
   // sequence for throttled send on |task_runner_| and coherent retrieval by
   // GetLastErrorMessage().
   mutable base::Lock lock_;
-  scoped_ptr<base::TickClock> tick_clock_;
+  std::unique_ptr<base::TickClock> tick_clock_;
   base::TimeTicks last_ipc_send_time_;
   std::vector<media::MediaLogEvent> queued_media_events_;
 
@@ -65,13 +65,13 @@
   bool ipc_send_pending_;
 
   // Limits the number buffered extents changed events we send over IPC to one.
-  scoped_ptr<media::MediaLogEvent> last_buffered_extents_changed_event_;
+  std::unique_ptr<media::MediaLogEvent> last_buffered_extents_changed_event_;
 
   // Holds a copy of the most recent MEDIA_ERROR_LOG_ENTRY, if any.
-  scoped_ptr<media::MediaLogEvent> last_media_error_log_entry_;
+  std::unique_ptr<media::MediaLogEvent> last_media_error_log_entry_;
 
   // Holds a copy of the most recent PIPELINE_ERROR, if any.
-  scoped_ptr<media::MediaLogEvent> last_pipeline_error_;
+  std::unique_ptr<media::MediaLogEvent> last_pipeline_error_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderMediaLog);
 };
diff --git a/content/renderer/media/render_media_log_unittest.cc b/content/renderer/media/render_media_log_unittest.cc
index a6a58a4c..131da078 100644
--- a/content/renderer/media/render_media_log_unittest.cc
+++ b/content/renderer/media/render_media_log_unittest.cc
@@ -18,7 +18,7 @@
       : log_(new RenderMediaLog()),
         tick_clock_(new base::SimpleTestTickClock()),
         task_runner_(new base::TestMockTimeTaskRunner()) {
-    log_->SetTickClockForTesting(scoped_ptr<base::TickClock>(tick_clock_));
+    log_->SetTickClockForTesting(std::unique_ptr<base::TickClock>(tick_clock_));
     log_->SetTaskRunnerForTesting(task_runner_);
   }
 
diff --git a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc
index 117b45250..ee7911bd 100644
--- a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc
+++ b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc
@@ -8,6 +8,7 @@
 #include <GLES2/gl2ext.h>
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "cc/output/context_provider.h"
 #include "content/child/child_gpu_memory_buffer_manager.h"
@@ -43,7 +44,7 @@
 }  // namespace
 
 // static
-scoped_ptr<RendererGpuVideoAcceleratorFactories>
+std::unique_ptr<RendererGpuVideoAcceleratorFactories>
 RendererGpuVideoAcceleratorFactories::Create(
     gpu::GpuChannelHost* gpu_channel_host,
     const scoped_refptr<base::SingleThreadTaskRunner>& main_thread_task_runner,
@@ -54,7 +55,7 @@
     bool enable_video_accelerator) {
   RecordContextProviderPhaseUmaEnum(
       ContextProviderPhase::CONTEXT_PROVIDER_ACQUIRED);
-  return make_scoped_ptr(new RendererGpuVideoAcceleratorFactories(
+  return base::WrapUnique(new RendererGpuVideoAcceleratorFactories(
       gpu_channel_host, main_thread_task_runner, task_runner, context_provider,
       enable_gpu_memory_buffer_video_frames, image_texture_targets,
       enable_video_accelerator));
@@ -107,7 +108,7 @@
   return video_accelerator_enabled_;
 }
 
-scoped_ptr<media::VideoDecodeAccelerator>
+std::unique_ptr<media::VideoDecodeAccelerator>
 RendererGpuVideoAcceleratorFactories::CreateVideoDecodeAccelerator() {
   DCHECK(video_accelerator_enabled_);
   DCHECK(task_runner_->BelongsToCurrentThread());
@@ -118,12 +119,12 @@
       context_provider_->GetCommandBufferProxy()->channel();
   DCHECK(channel);
 
-  return scoped_ptr<media::VideoDecodeAccelerator>(
+  return std::unique_ptr<media::VideoDecodeAccelerator>(
       new media::GpuVideoDecodeAcceleratorHost(
           channel, context_provider_->GetCommandBufferProxy()));
 }
 
-scoped_ptr<media::VideoEncodeAccelerator>
+std::unique_ptr<media::VideoEncodeAccelerator>
 RendererGpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator() {
   DCHECK(video_accelerator_enabled_);
   DCHECK(task_runner_->BelongsToCurrentThread());
@@ -134,7 +135,7 @@
       context_provider_->GetCommandBufferProxy()->channel();
   DCHECK(channel);
 
-  return scoped_ptr<media::VideoEncodeAccelerator>(
+  return std::unique_ptr<media::VideoEncodeAccelerator>(
       new media::GpuVideoEncodeAcceleratorHost(
           channel, context_provider_->GetCommandBufferProxy()));
 }
@@ -214,12 +215,12 @@
   gles2->ShallowFlushCHROMIUM();
 }
 
-scoped_ptr<gfx::GpuMemoryBuffer>
+std::unique_ptr<gfx::GpuMemoryBuffer>
 RendererGpuVideoAcceleratorFactories::AllocateGpuMemoryBuffer(
     const gfx::Size& size,
     gfx::BufferFormat format,
     gfx::BufferUsage usage) {
-  scoped_ptr<gfx::GpuMemoryBuffer> buffer =
+  std::unique_ptr<gfx::GpuMemoryBuffer> buffer =
       gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer(size, format, usage,
                                                           0 /* surface_id */);
   return buffer;
@@ -263,16 +264,16 @@
 };
 }  // namespace
 
-scoped_ptr<media::GpuVideoAcceleratorFactories::ScopedGLContextLock>
+std::unique_ptr<media::GpuVideoAcceleratorFactories::ScopedGLContextLock>
 RendererGpuVideoAcceleratorFactories::GetGLContextLock() {
   if (CheckContextLost())
     return nullptr;
-  return make_scoped_ptr(new ScopedGLContextLockImpl(context_provider_));
+  return base::WrapUnique(new ScopedGLContextLockImpl(context_provider_));
 }
 
-scoped_ptr<base::SharedMemory>
+std::unique_ptr<base::SharedMemory>
 RendererGpuVideoAcceleratorFactories::CreateSharedMemory(size_t size) {
-  scoped_ptr<base::SharedMemory> mem(
+  std::unique_ptr<base::SharedMemory> mem(
       ChildThreadImpl::AllocateSharedMemory(size, thread_safe_sender_.get()));
   if (mem && !mem->Map(size))
     return nullptr;
diff --git a/content/renderer/media/renderer_gpu_video_accelerator_factories.h b/content/renderer/media/renderer_gpu_video_accelerator_factories.h
index 1bae73bb..a1f1e39 100644
--- a/content/renderer/media/renderer_gpu_video_accelerator_factories.h
+++ b/content/renderer/media/renderer_gpu_video_accelerator_factories.h
@@ -45,7 +45,7 @@
  public:
   // Takes a ref on |gpu_channel_host| and tests |context| for loss before each
   // use.  Safe to call from any thread.
-  static scoped_ptr<RendererGpuVideoAcceleratorFactories> Create(
+  static std::unique_ptr<RendererGpuVideoAcceleratorFactories> Create(
       gpu::GpuChannelHost* gpu_channel_host,
       const scoped_refptr<base::SingleThreadTaskRunner>&
           main_thread_task_runner,
@@ -57,9 +57,9 @@
 
   // media::GpuVideoAcceleratorFactories implementation.
   bool IsGpuVideoAcceleratorEnabled() override;
-  scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecodeAccelerator()
+  std::unique_ptr<media::VideoDecodeAccelerator> CreateVideoDecodeAccelerator()
       override;
-  scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncodeAccelerator()
+  std::unique_ptr<media::VideoEncodeAccelerator> CreateVideoEncodeAccelerator()
       override;
   // Creates textures and produces them into mailboxes. Returns true on success
   // or false on failure.
@@ -71,7 +71,7 @@
   void DeleteTexture(uint32_t texture_id) override;
   void WaitSyncToken(const gpu::SyncToken& sync_token) override;
 
-  scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
+  std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
       const gfx::Size& size,
       gfx::BufferFormat format,
       gfx::BufferUsage usage) override;
@@ -79,10 +79,10 @@
   bool ShouldUseGpuMemoryBuffersForVideoFrames() const override;
   unsigned ImageTextureTarget(gfx::BufferFormat format) override;
   media::VideoPixelFormat VideoFrameOutputFormat() override;
-  scoped_ptr<media::GpuVideoAcceleratorFactories::ScopedGLContextLock>
+  std::unique_ptr<media::GpuVideoAcceleratorFactories::ScopedGLContextLock>
   GetGLContextLock() override;
   bool CheckContextLost();
-  scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override;
+  std::unique_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override;
   scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() override;
 
   media::VideoDecodeAccelerator::Capabilities
diff --git a/content/renderer/media/renderer_webaudiodevice_impl.h b/content/renderer/media/renderer_webaudiodevice_impl.h
index a14945e..3d97a9e7 100644
--- a/content/renderer/media/renderer_webaudiodevice_impl.h
+++ b/content/renderer/media/renderer_webaudiodevice_impl.h
@@ -81,7 +81,7 @@
   // First audio buffer after silence finishes. We store this buffer so that
   // it can be sent to the |output_device_| later after switching from
   // |null_audio_sink_|.
-  scoped_ptr<media::AudioBus> first_buffer_after_silence_;
+  std::unique_ptr<media::AudioBus> first_buffer_after_silence_;
 
   bool is_first_buffer_after_silence_;
 
diff --git a/content/renderer/media/renderer_webmediaplayer_delegate.h b/content/renderer/media/renderer_webmediaplayer_delegate.h
index 711147b3..b12a58f 100644
--- a/content/renderer/media/renderer_webmediaplayer_delegate.h
+++ b/content/renderer/media/renderer_webmediaplayer_delegate.h
@@ -6,10 +6,10 @@
 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_
 
 #include <map>
+#include <memory>
 
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/default_tick_clock.h"
 #include "base/timer/timer.h"
@@ -97,7 +97,7 @@
 
   // Clock used for calculating when delegates have expired. May be overridden
   // for testing.
-  scoped_ptr<base::DefaultTickClock> default_tick_clock_;
+  std::unique_ptr<base::DefaultTickClock> default_tick_clock_;
   base::TickClock* tick_clock_;
 
   DISALLOW_COPY_AND_ASSIGN(RendererWebMediaPlayerDelegate);
diff --git a/content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc b/content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc
index 2205a8b..4872ec8 100644
--- a/content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc
+++ b/content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc
@@ -57,7 +57,7 @@
  protected:
   IPC::TestSink& test_sink() { return render_thread_->sink(); }
 
-  scoped_ptr<RendererWebMediaPlayerDelegate> delegate_manager_;
+  std::unique_ptr<RendererWebMediaPlayerDelegate> delegate_manager_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(RendererWebMediaPlayerDelegateTest);
diff --git a/content/renderer/media/rtc_certificate_generator.cc b/content/renderer/media/rtc_certificate_generator.cc
index 263ba5f..05661d3 100644
--- a/content/renderer/media/rtc_certificate_generator.cc
+++ b/content/renderer/media/rtc_certificate_generator.cc
@@ -75,8 +75,8 @@
       GURL first_party_for_cookies) {
     DCHECK(signaling_thread_->BelongsToCurrentThread());
     rtc::scoped_ptr<PeerConnectionIdentityStore> store(
-        new PeerConnectionIdentityStore(
-            main_thread_, signaling_thread_, url, first_party_for_cookies));
+        new PeerConnectionIdentityStore(main_thread_, signaling_thread_, url,
+                                        first_party_for_cookies));
     // Request identity with |this| as the observer. OnSuccess/OnFailure will be
     // called asynchronously.
     store->RequestIdentity(WebRTCKeyParamsToKeyParams(key_params_), this);
@@ -132,7 +132,7 @@
   // PeerConnectionIdentityStore::RequestIdentity on, as is required.
   const scoped_refptr<base::SingleThreadTaskRunner> signaling_thread_;
   blink::WebRTCKeyParams key_params_;
-  scoped_ptr<blink::WebRTCCertificateCallback> observer_;
+  std::unique_ptr<blink::WebRTCCertificateCallback> observer_;
 
   DISALLOW_COPY_AND_ASSIGN(RTCCertificateIdentityObserver);
 };
diff --git a/content/renderer/media/rtc_data_channel_handler.cc b/content/renderer/media/rtc_data_channel_handler.cc
index 57ffa1e..804423c 100644
--- a/content/renderer/media/rtc_data_channel_handler.cc
+++ b/content/renderer/media/rtc_data_channel_handler.cc
@@ -99,7 +99,8 @@
     const webrtc::DataBuffer& buffer) {
   // TODO(tommi): Figure out a way to transfer ownership of the buffer without
   // having to create a copy.  See webrtc bug 3967.
-  scoped_ptr<webrtc::DataBuffer> new_buffer(new webrtc::DataBuffer(buffer));
+  std::unique_ptr<webrtc::DataBuffer> new_buffer(
+      new webrtc::DataBuffer(buffer));
   main_thread_->PostTask(FROM_HERE,
       base::Bind(&RtcDataChannelHandler::Observer::OnMessageImpl, this,
       base::Passed(&new_buffer)));
@@ -120,7 +121,7 @@
 }
 
 void RtcDataChannelHandler::Observer::OnMessageImpl(
-    scoped_ptr<webrtc::DataBuffer> buffer) {
+    std::unique_ptr<webrtc::DataBuffer> buffer) {
   DCHECK(main_thread_->BelongsToCurrentThread());
   if (handler_)
     handler_->OnMessage(std::move(buffer));
@@ -315,7 +316,8 @@
   webkit_client_->didDecreaseBufferedAmount(previous_amount);
 }
 
-void RtcDataChannelHandler::OnMessage(scoped_ptr<webrtc::DataBuffer> buffer) {
+void RtcDataChannelHandler::OnMessage(
+    std::unique_ptr<webrtc::DataBuffer> buffer) {
   DCHECK(thread_checker_.CalledOnValidThread());
   if (!webkit_client_) {
     // If this happens, the web application will not get notified of changes.
diff --git a/content/renderer/media/rtc_data_channel_handler.h b/content/renderer/media/rtc_data_channel_handler.h
index ff08ee2..3b4d873 100644
--- a/content/renderer/media/rtc_data_channel_handler.h
+++ b/content/renderer/media/rtc_data_channel_handler.h
@@ -8,8 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
@@ -64,7 +65,7 @@
  private:
   void OnStateChange(webrtc::DataChannelInterface::DataState state);
   void OnBufferedAmountDecrease(unsigned previous_amount);
-  void OnMessage(scoped_ptr<webrtc::DataBuffer> buffer);
+  void OnMessage(std::unique_ptr<webrtc::DataBuffer> buffer);
   void RecordMessageSent(size_t num_bytes);
 
   class CONTENT_EXPORT Observer
@@ -95,7 +96,7 @@
 
     void OnStateChangeImpl(webrtc::DataChannelInterface::DataState state);
     void OnBufferedAmountDecreaseImpl(unsigned previous_amount);
-    void OnMessageImpl(scoped_ptr<webrtc::DataBuffer> buffer);
+    void OnMessageImpl(std::unique_ptr<webrtc::DataBuffer> buffer);
 
     RtcDataChannelHandler* handler_;
     const scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
diff --git a/content/renderer/media/rtc_data_channel_handler_unittest.cc b/content/renderer/media/rtc_data_channel_handler_unittest.cc
index 3a40317..072d5c88 100644
--- a/content/renderer/media/rtc_data_channel_handler_unittest.cc
+++ b/content/renderer/media/rtc_data_channel_handler_unittest.cc
@@ -2,12 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/rtc_data_channel_handler.h"
+
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/test/test_simple_task_runner.h"
 #include "content/renderer/media/mock_data_channel_impl.h"
-#include "content/renderer/media/rtc_data_channel_handler.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h"
 
@@ -49,7 +51,7 @@
   webrtc::DataChannelInit config;
   scoped_refptr<base::TestSimpleTaskRunner> signaling_thread_;
   scoped_refptr<MockDataChannel> channel_;
-  scoped_ptr<RtcDataChannelHandler> handler_;
+  std::unique_ptr<RtcDataChannelHandler> handler_;
 };
 
 // Add a client, change to the open state, and verify that the client has
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 171a3886..17a929a7 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -20,6 +20,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
+#include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "content/renderer/media/media_stream_audio_track.h"
 #include "content/renderer/media/media_stream_constraints_util.h"
@@ -824,7 +825,7 @@
 
   void OnAddStream(MediaStreamInterface* stream) override {
     DCHECK(stream);
-    scoped_ptr<RemoteMediaStreamImpl> remote_stream(
+    std::unique_ptr<RemoteMediaStreamImpl> remote_stream(
         new RemoteMediaStreamImpl(main_thread_, stream));
 
     // The webkit object owned by RemoteMediaStreamImpl, will be initialized
@@ -842,7 +843,7 @@
   }
 
   void OnDataChannel(DataChannelInterface* data_channel) override {
-    scoped_ptr<RtcDataChannelHandler> handler(
+    std::unique_ptr<RtcDataChannelHandler> handler(
         new RtcDataChannelHandler(main_thread_, data_channel));
     main_thread_->PostTask(FROM_HERE,
         base::Bind(&RTCPeerConnectionHandler::Observer::OnDataChannelImpl,
@@ -896,7 +897,7 @@
             candidate->candidate().address().family()));
   }
 
-  void OnAddStreamImpl(scoped_ptr<RemoteMediaStreamImpl> stream) {
+  void OnAddStreamImpl(std::unique_ptr<RemoteMediaStreamImpl> stream) {
     DCHECK(stream->webkit_stream().getExtraData()) << "Initialization not done";
     if (handler_)
       handler_->OnAddStream(std::move(stream));
@@ -907,7 +908,7 @@
       handler_->OnRemoveStream(stream);
   }
 
-  void OnDataChannelImpl(scoped_ptr<RtcDataChannelHandler> handler) {
+  void OnDataChannelImpl(std::unique_ptr<RtcDataChannelHandler> handler) {
     if (handler_)
       handler_->OnDataChannel(std::move(handler));
   }
@@ -978,6 +979,15 @@
 
   webrtc::PeerConnectionInterface::RTCConfiguration config;
   GetNativeRtcConfiguration(server_configuration, &config);
+
+  if (base::FeatureList::IsEnabled(features::kWebRtcEcdsaDefault)) {
+    if (config.certificates.empty()) {
+      rtc::scoped_refptr<rtc::RTCCertificate> certificate =
+          PeerConnectionDependencyFactory::GenerateDefaultCertificate();
+      config.certificates.push_back(certificate);
+    }
+  }
+
   config.disable_prerenderer_smoothing =
       !base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kDisableRTCSmoothnessAlgorithm);
@@ -1012,6 +1022,14 @@
   webrtc::PeerConnectionInterface::RTCConfiguration config;
   GetNativeRtcConfiguration(server_configuration, &config);
 
+  if (base::FeatureList::IsEnabled(features::kWebRtcEcdsaDefault)) {
+    if (config.certificates.empty()) {
+      rtc::scoped_refptr<rtc::RTCCertificate> certificate =
+          PeerConnectionDependencyFactory::GenerateDefaultCertificate();
+      config.certificates.push_back(certificate);
+    }
+  }
+
   peer_connection_observer_ = new Observer(weak_factory_.GetWeakPtr());
   CopyConstraintsIntoRtcConfiguration(options, &config);
 
@@ -1298,7 +1316,7 @@
     const blink::WebRTCICECandidate& candidate) {
   DCHECK(thread_checker_.CalledOnValidThread());
   TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::addICECandidate");
-  scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
+  std::unique_ptr<webrtc::IceCandidateInterface> native_candidate(
       dependency_factory_->CreateIceCandidate(
           base::UTF16ToUTF8(base::StringPiece16(candidate.sdpMid())),
           candidate.sdpMLineIndex(),
@@ -1623,7 +1641,7 @@
 }
 
 void RTCPeerConnectionHandler::OnAddStream(
-    scoped_ptr<RemoteMediaStreamImpl> stream) {
+    std::unique_ptr<RemoteMediaStreamImpl> stream) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(remote_streams_.find(stream->webrtc_stream().get()) ==
          remote_streams_.end());
@@ -1663,7 +1681,7 @@
                               stream.get());
   PerSessionWebRTCAPIMetrics::GetInstance()->DecrementStreamCounter();
 
-  scoped_ptr<RemoteMediaStreamImpl> remote_stream(it->second);
+  std::unique_ptr<RemoteMediaStreamImpl> remote_stream(it->second);
   const blink::WebMediaStream& webkit_stream = remote_stream->webkit_stream();
   DCHECK(!webkit_stream.isNull());
   remote_streams_.erase(it);
@@ -1678,7 +1696,7 @@
 }
 
 void RTCPeerConnectionHandler::OnDataChannel(
-    scoped_ptr<RtcDataChannelHandler> handler) {
+    std::unique_ptr<RtcDataChannelHandler> handler) {
   DCHECK(thread_checker_.CalledOnValidThread());
   TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::OnDataChannelImpl");
 
diff --git a/content/renderer/media/rtc_peer_connection_handler.h b/content/renderer/media/rtc_peer_connection_handler.h
index d4bfcdf..7fe3bf2 100644
--- a/content/renderer/media/rtc_peer_connection_handler.h
+++ b/content/renderer/media/rtc_peer_connection_handler.h
@@ -8,12 +8,12 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread.h"
@@ -181,10 +181,10 @@
   void OnIceGatheringChange(
       webrtc::PeerConnectionInterface::IceGatheringState new_state);
   void OnRenegotiationNeeded();
-  void OnAddStream(scoped_ptr<RemoteMediaStreamImpl> stream);
+  void OnAddStream(std::unique_ptr<RemoteMediaStreamImpl> stream);
   void OnRemoveStream(
       const scoped_refptr<webrtc::MediaStreamInterface>& stream);
-  void OnDataChannel(scoped_ptr<RtcDataChannelHandler> handler);
+  void OnDataChannel(std::unique_ptr<RtcDataChannelHandler> handler);
   void OnIceCandidate(const std::string& sdp, const std::string& sdp_mid,
       int sdp_mline_index, int component, int address_family);
 
@@ -265,8 +265,8 @@
   // remote side to record UMA stats once both are set.  We only check
   // for the first offer or answer.  "pranswer"s and "unknown"s (from
   // unit tests) are ignored.
-  scoped_ptr<FirstSessionDescription> first_local_description_;
-  scoped_ptr<FirstSessionDescription> first_remote_description_;
+  std::unique_ptr<FirstSessionDescription> first_local_description_;
+  std::unique_ptr<FirstSessionDescription> first_remote_description_;
 
   typedef std::map<webrtc::MediaStreamInterface*,
       content::RemoteMediaStreamImpl*> RemoteStreamMap;
diff --git a/content/renderer/media/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
index 7663faee..c99c27f 100644
--- a/content/renderer/media/rtc_peer_connection_handler_unittest.cc
+++ b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
@@ -2,13 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/rtc_peer_connection_handler.h"
+
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/location.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/utf_string_conversions.h"
@@ -24,7 +26,6 @@
 #include "content/renderer/media/mock_peer_connection_impl.h"
 #include "content/renderer/media/mock_web_rtc_peer_connection_handler_client.h"
 #include "content/renderer/media/peer_connection_tracker.h"
-#include "content/renderer/media/rtc_peer_connection_handler.h"
 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h"
 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
 #include "content/renderer/media/webrtc_local_audio_track.h"
@@ -267,7 +268,7 @@
     audio_tracks[0].initialize(audio_source.id(), audio_source);
     scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
         WebRtcLocalAudioTrackAdapter::Create(audio_track_label, nullptr));
-    scoped_ptr<WebRtcLocalAudioTrack> native_track(
+    std::unique_ptr<WebRtcLocalAudioTrack> native_track(
         new WebRtcLocalAudioTrack(adapter.get()));
     audio_tracks[0].setExtraData(native_track.release());
     blink::WebVector<blink::WebMediaStreamTrack> video_tracks(
@@ -304,11 +305,11 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
-  scoped_ptr<MockWebRTCPeerConnectionHandlerClient> mock_client_;
-  scoped_ptr<MockPeerConnectionDependencyFactory> mock_dependency_factory_;
-  scoped_ptr<NiceMock<MockPeerConnectionTracker> > mock_tracker_;
-  scoped_ptr<RTCPeerConnectionHandlerUnderTest> pc_handler_;
+  std::unique_ptr<ChildProcess> child_process_;
+  std::unique_ptr<MockWebRTCPeerConnectionHandlerClient> mock_client_;
+  std::unique_ptr<MockPeerConnectionDependencyFactory> mock_dependency_factory_;
+  std::unique_ptr<NiceMock<MockPeerConnectionTracker>> mock_tracker_;
+  std::unique_ptr<RTCPeerConnectionHandlerUnderTest> pc_handler_;
 
   // Weak reference to the mocked native peer connection implementation.
   MockPeerConnectionImpl* mock_peer_connection_;
@@ -327,9 +328,9 @@
   pc_handler_->observer()->OnRenegotiationNeeded();
 
   EXPECT_CALL(*mock_client_.get(), didGenerateICECandidate(_)).Times(0);
-    scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
-          mock_dependency_factory_->CreateIceCandidate("sdpMid", 1, kDummySdp));
-    pc_handler_->observer()->OnIceCandidate(native_candidate.get());
+  std::unique_ptr<webrtc::IceCandidateInterface> native_candidate(
+      mock_dependency_factory_->CreateIceCandidate("sdpMid", 1, kDummySdp));
+  pc_handler_->observer()->OnIceCandidate(native_candidate.get());
 
   EXPECT_CALL(*mock_client_.get(), didChangeSignalingState(_)).Times(0);
   pc_handler_->observer()->OnSignalingChange(
@@ -972,7 +973,7 @@
                                    PeerConnectionTracker::SOURCE_LOCAL, true));
   EXPECT_CALL(*mock_client_.get(), didGenerateICECandidate(_));
 
-  scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
+  std::unique_ptr<webrtc::IceCandidateInterface> native_candidate(
       mock_dependency_factory_->CreateIceCandidate("sdpMid", 1, kDummySdp));
   pc_handler_->observer()->OnIceCandidate(native_candidate.get());
   base::RunLoop().RunUntilIdle();
@@ -995,7 +996,7 @@
               TrackCreateDataChannel(pc_handler_.get(),
                                      testing::NotNull(),
                                      PeerConnectionTracker::SOURCE_LOCAL));
-  scoped_ptr<blink::WebRTCDataChannelHandler> channel(
+  std::unique_ptr<blink::WebRTCDataChannelHandler> channel(
       pc_handler_->createDataChannel("d1", blink::WebRTCDataChannelInit()));
   EXPECT_TRUE(channel.get() != NULL);
   EXPECT_EQ(label, channel->label());
@@ -1021,7 +1022,7 @@
               TrackCreateDTMFSender(pc_handler_.get(),
                                     testing::Ref(tracks[0])));
 
-  scoped_ptr<blink::WebRTCDTMFSenderHandler> sender(
+  std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender(
       pc_handler_->createDTMFSender(tracks[0]));
   EXPECT_TRUE(sender.get());
 }
diff --git a/content/renderer/media/rtc_video_decoder.cc b/content/renderer/media/rtc_video_decoder.cc
index ed9eb25..302d5d5 100644
--- a/content/renderer/media/rtc_video_decoder.cc
+++ b/content/renderer/media/rtc_video_decoder.cc
@@ -85,10 +85,10 @@
 }
 
 // static
-scoped_ptr<RTCVideoDecoder> RTCVideoDecoder::Create(
+std::unique_ptr<RTCVideoDecoder> RTCVideoDecoder::Create(
     webrtc::VideoCodecType type,
     media::GpuVideoAcceleratorFactories* factories) {
-  scoped_ptr<RTCVideoDecoder> decoder;
+  std::unique_ptr<RTCVideoDecoder> decoder;
   // Convert WebRTC codec type to media codec profile.
   media::VideoCodecProfile profile;
   switch (type) {
@@ -229,7 +229,7 @@
   // If a shared memory segment is available, there are no pending buffers, and
   // this isn't a mid-stream resolution change, then send the buffer for decode
   // immediately. Otherwise, save the buffer in the queue for later decode.
-  scoped_ptr<base::SharedMemory> shm_buffer;
+  std::unique_ptr<base::SharedMemory> shm_buffer;
   if (!need_to_reset_for_midstream_resize && pending_buffers_.empty())
     shm_buffer = GetSHM_Locked(inputImage._length);
   if (!shm_buffer) {
@@ -454,7 +454,7 @@
 
   {
     base::AutoLock auto_lock(lock_);
-    PutSHM_Locked(scoped_ptr<base::SharedMemory>(it->second));
+    PutSHM_Locked(std::unique_ptr<base::SharedMemory>(it->second));
   }
   bitstream_buffers_in_decoder_.erase(it);
 
@@ -506,7 +506,7 @@
 
   while (CanMoreDecodeWorkBeDone()) {
     // Get a buffer and data from the queue.
-    scoped_ptr<base::SharedMemory> shm_buffer;
+    std::unique_ptr<base::SharedMemory> shm_buffer;
     BufferData buffer_data;
     {
       base::AutoLock auto_lock(lock_);
@@ -560,7 +560,7 @@
 
 void RTCVideoDecoder::SaveToDecodeBuffers_Locked(
     const webrtc::EncodedImage& input_image,
-    scoped_ptr<base::SharedMemory> shm_buffer,
+    std::unique_ptr<base::SharedMemory> shm_buffer,
     const BufferData& buffer_data) {
   memcpy(shm_buffer->memory(), input_image._buffer, input_image._length);
   std::pair<base::SharedMemory*, BufferData> buffer_pair =
@@ -613,7 +613,7 @@
       continue;
     }
     // Get shared memory and save it to decode buffers.
-    scoped_ptr<base::SharedMemory> shm_buffer =
+    std::unique_ptr<base::SharedMemory> shm_buffer =
         GetSHM_Locked(input_image._length);
     if (!shm_buffer)
       return;
@@ -737,17 +737,18 @@
 
   // Put the buffers back in case we restart the decoder.
   for (const auto& buffer : bitstream_buffers_in_decoder_)
-    PutSHM_Locked(scoped_ptr<base::SharedMemory>(buffer.second));
+    PutSHM_Locked(std::unique_ptr<base::SharedMemory>(buffer.second));
   bitstream_buffers_in_decoder_.clear();
 
   state_ = UNINITIALIZED;
 }
 
-scoped_ptr<base::SharedMemory> RTCVideoDecoder::GetSHM_Locked(size_t min_size) {
+std::unique_ptr<base::SharedMemory> RTCVideoDecoder::GetSHM_Locked(
+    size_t min_size) {
   // Reuse a SHM if possible.
   if (!available_shm_segments_.empty() &&
       available_shm_segments_.back()->mapped_size() >= min_size) {
-    scoped_ptr<base::SharedMemory> buffer(available_shm_segments_.back());
+    std::unique_ptr<base::SharedMemory> buffer(available_shm_segments_.back());
     available_shm_segments_.pop_back();
     return buffer;
   }
@@ -776,7 +777,8 @@
   return NULL;
 }
 
-void RTCVideoDecoder::PutSHM_Locked(scoped_ptr<base::SharedMemory> shm_buffer) {
+void RTCVideoDecoder::PutSHM_Locked(
+    std::unique_ptr<base::SharedMemory> shm_buffer) {
   lock_.AssertAcquired();
   available_shm_segments_.push_back(shm_buffer.release());
 }
@@ -786,7 +788,8 @@
   DVLOG(2) << "CreateSHM. count=" << count << ", size=" << size;
 
   for (size_t i = 0; i < count; i++) {
-    scoped_ptr<base::SharedMemory> shm = factories_->CreateSharedMemory(size);
+    std::unique_ptr<base::SharedMemory> shm =
+        factories_->CreateSharedMemory(size);
     if (!shm) {
       LOG(ERROR) << "Failed allocating shared memory of size=" << size;
       NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
diff --git a/content/renderer/media/rtc_video_decoder.h b/content/renderer/media/rtc_video_decoder.h
index 6b86d25..20c6a33 100644
--- a/content/renderer/media/rtc_video_decoder.h
+++ b/content/renderer/media/rtc_video_decoder.h
@@ -56,7 +56,7 @@
 
   // Creates a RTCVideoDecoder on the message loop of |factories|. Returns NULL
   // if failed. The video decoder will run on the message loop of |factories|.
-  static scoped_ptr<RTCVideoDecoder> Create(
+  static std::unique_ptr<RTCVideoDecoder> Create(
       webrtc::VideoCodecType type,
       media::GpuVideoAcceleratorFactories* factories);
   // Destroys |decoder| on the loop of |factories|
@@ -130,9 +130,10 @@
   int GetVDAErrorCounterForTesting() { return vda_error_counter_; }
 
   // Saves a WebRTC buffer in |decode_buffers_| for decode.
-  void SaveToDecodeBuffers_Locked(const webrtc::EncodedImage& input_image,
-                                  scoped_ptr<base::SharedMemory> shm_buffer,
-                                  const BufferData& buffer_data);
+  void SaveToDecodeBuffers_Locked(
+      const webrtc::EncodedImage& input_image,
+      std::unique_ptr<base::SharedMemory> shm_buffer,
+      const BufferData& buffer_data);
 
   // Saves a WebRTC buffer in |pending_buffers_| waiting for SHM available.
   // Returns true on success.
@@ -169,10 +170,10 @@
   // Gets a shared-memory segment of at least |min_size| bytes from
   // |available_shm_segments_|. Returns NULL if there is no buffer or the
   // buffer is not big enough.
-  scoped_ptr<base::SharedMemory> GetSHM_Locked(size_t min_size);
+  std::unique_ptr<base::SharedMemory> GetSHM_Locked(size_t min_size);
 
   // Returns a shared-memory segment to the available pool.
-  void PutSHM_Locked(scoped_ptr<base::SharedMemory> shm_buffer);
+  void PutSHM_Locked(std::unique_ptr<base::SharedMemory> shm_buffer);
 
   // Allocates |count| shared memory buffers of |size| bytes.
   void CreateSHM(size_t count, size_t size);
@@ -213,7 +214,7 @@
   static const int32_t ID_INVALID;  // indicates Reset or Release never occurred
 
   // The hardware video decoder.
-  scoped_ptr<media::VideoDecodeAccelerator> vda_;
+  std::unique_ptr<media::VideoDecodeAccelerator> vda_;
 
   media::VideoCodecProfile vda_codec_profile_;
 
diff --git a/content/renderer/media/rtc_video_decoder_factory.cc b/content/renderer/media/rtc_video_decoder_factory.cc
index e65ac0337..0802698 100644
--- a/content/renderer/media/rtc_video_decoder_factory.cc
+++ b/content/renderer/media/rtc_video_decoder_factory.cc
@@ -4,7 +4,8 @@
 
 #include "content/renderer/media/rtc_video_decoder_factory.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "content/renderer/media/rtc_video_decoder.h"
 #include "media/renderers/gpu_video_accelerator_factories.h"
 
diff --git a/content/renderer/media/rtc_video_decoder_unittest.cc b/content/renderer/media/rtc_video_decoder_unittest.cc
index 0c2523747..4b765efd 100644
--- a/content/renderer/media/rtc_video_decoder_unittest.cc
+++ b/content/renderer/media/rtc_video_decoder_unittest.cc
@@ -141,10 +141,10 @@
   }
 
  protected:
-  scoped_ptr<media::MockGpuVideoAcceleratorFactories> mock_gpu_factories_;
+  std::unique_ptr<media::MockGpuVideoAcceleratorFactories> mock_gpu_factories_;
   media::MockVideoDecodeAccelerator* mock_vda_;
   media::MockVideoDecodeAccelerator* mock_vda_after_reset_;
-  scoped_ptr<RTCVideoDecoder> rtc_decoder_;
+  std::unique_ptr<RTCVideoDecoder> rtc_decoder_;
   webrtc::VideoCodec codec_;
   base::Thread vda_thread_;
   media::VideoDecodeAccelerator::Capabilities capabilities_;
@@ -158,7 +158,7 @@
 
 TEST_F(RTCVideoDecoderTest, CreateReturnsNullOnUnsupportedCodec) {
   CreateDecoder(webrtc::kVideoCodecVP8);
-  scoped_ptr<RTCVideoDecoder> null_rtc_decoder(RTCVideoDecoder::Create(
+  std::unique_ptr<RTCVideoDecoder> null_rtc_decoder(RTCVideoDecoder::Create(
       webrtc::kVideoCodecI420, mock_gpu_factories_.get()));
   EXPECT_EQ(NULL, null_rtc_decoder.get());
 }
diff --git a/content/renderer/media/rtc_video_encoder.cc b/content/renderer/media/rtc_video_encoder.cc
index c9406f1..3b8bf254 100644
--- a/content/renderer/media/rtc_video_encoder.cc
+++ b/content/renderer/media/rtc_video_encoder.cc
@@ -200,7 +200,7 @@
   int32_t* async_retval_;
 
   // The underlying VEA to perform encoding on.
-  scoped_ptr<media::VideoEncodeAccelerator> video_encoder_;
+  std::unique_ptr<media::VideoEncodeAccelerator> video_encoder_;
 
   // Next input frame.  Since there is at most one next frame, a single-element
   // queue is sufficient.
@@ -365,7 +365,7 @@
   input_frame_coded_size_ = input_coded_size;
 
   for (unsigned int i = 0; i < input_count + kInputBufferExtraCount; ++i) {
-    scoped_ptr<base::SharedMemory> shm =
+    std::unique_ptr<base::SharedMemory> shm =
         gpu_factories_->CreateSharedMemory(media::VideoFrame::AllocationSize(
             media::PIXEL_FORMAT_I420, input_coded_size));
     if (!shm) {
@@ -378,7 +378,7 @@
   }
 
   for (int i = 0; i < kOutputBufferCount; ++i) {
-    scoped_ptr<base::SharedMemory> shm =
+    std::unique_ptr<base::SharedMemory> shm =
         gpu_factories_->CreateSharedMemory(output_buffer_size);
     if (!shm) {
       LogAndNotifyError(FROM_HERE, "failed to create output buffer",
@@ -429,9 +429,8 @@
   const uint32_t rtp_timestamp =
       static_cast<uint32_t>(capture_time_us * 90 / 1000);
 
-  scoped_ptr<webrtc::EncodedImage> image(new webrtc::EncodedImage(
-      reinterpret_cast<uint8_t*>(output_buffer->memory()),
-      payload_size,
+  std::unique_ptr<webrtc::EncodedImage> image(new webrtc::EncodedImage(
+      reinterpret_cast<uint8_t*>(output_buffer->memory()), payload_size,
       output_buffer->mapped_size()));
   image->_encodedWidth = input_visible_size_.width();
   image->_encodedHeight = input_visible_size_.height();
@@ -732,9 +731,10 @@
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
-void RTCVideoEncoder::ReturnEncodedImage(scoped_ptr<webrtc::EncodedImage> image,
-                                         int32_t bitstream_buffer_id,
-                                         uint16_t picture_id) {
+void RTCVideoEncoder::ReturnEncodedImage(
+    std::unique_ptr<webrtc::EncodedImage> image,
+    int32_t bitstream_buffer_id,
+    uint16_t picture_id) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DVLOG(3) << "ReturnEncodedImage(): "
            << "bitstream_buffer_id=" << bitstream_buffer_id
diff --git a/content/renderer/media/rtc_video_encoder.h b/content/renderer/media/rtc_video_encoder.h
index 4997ad29..d0cd43a 100644
--- a/content/renderer/media/rtc_video_encoder.h
+++ b/content/renderer/media/rtc_video_encoder.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
@@ -65,7 +65,7 @@
   friend class RTCVideoEncoder::Impl;
 
   // Return an encoded output buffer to WebRTC.
-  void ReturnEncodedImage(scoped_ptr<webrtc::EncodedImage> image,
+  void ReturnEncodedImage(std::unique_ptr<webrtc::EncodedImage> image,
                           int32_t bitstream_buffer_id,
                           uint16_t picture_id);
 
diff --git a/content/renderer/media/speech_recognition_audio_sink.cc b/content/renderer/media/speech_recognition_audio_sink.cc
index 3beb5a8d..ecac9d55 100644
--- a/content/renderer/media/speech_recognition_audio_sink.cc
+++ b/content/renderer/media/speech_recognition_audio_sink.cc
@@ -20,7 +20,7 @@
     const blink::WebMediaStreamTrack& track,
     const media::AudioParameters& params,
     const base::SharedMemoryHandle memory,
-    scoped_ptr<base::SyncSocket> socket,
+    std::unique_ptr<base::SyncSocket> socket,
     const OnStoppedCB& on_stopped_cb)
     : track_(track),
       shared_memory_(memory, false),
diff --git a/content/renderer/media/speech_recognition_audio_sink.h b/content/renderer/media/speech_recognition_audio_sink.h
index c70420f..2a281310 100644
--- a/content/renderer/media/speech_recognition_audio_sink.h
+++ b/content/renderer/media/speech_recognition_audio_sink.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "base/threading/thread_checker.h"
@@ -42,7 +43,7 @@
   SpeechRecognitionAudioSink(const blink::WebMediaStreamTrack& track,
                              const media::AudioParameters& params,
                              const base::SharedMemoryHandle memory,
-                             scoped_ptr<base::SyncSocket> socket,
+                             std::unique_ptr<base::SyncSocket> socket,
                              const OnStoppedCB& on_stopped_cb);
 
   ~SpeechRecognitionAudioSink() override;
@@ -85,16 +86,16 @@
 
   // Socket for synchronization of audio bus reads/writes.
   // Created on the renderer client and passed here. Accessed on capture thread.
-  scoped_ptr<base::SyncSocket> socket_;
+  std::unique_ptr<base::SyncSocket> socket_;
 
   // Used as a resampler to deliver appropriate format to speech recognition.
-  scoped_ptr<media::AudioConverter> audio_converter_;
+  std::unique_ptr<media::AudioConverter> audio_converter_;
 
   // FIFO is used for queuing audio frames before we resample.
-  scoped_ptr<media::AudioFifo> fifo_;
+  std::unique_ptr<media::AudioFifo> fifo_;
 
   // Audio bus shared with the browser process via |shared_memory_|.
-  scoped_ptr<media::AudioBus> output_bus_;
+  std::unique_ptr<media::AudioBus> output_bus_;
 
   // Params of the source audio. Can change when |OnSetFormat()| occurs.
   media::AudioParameters input_params_;
diff --git a/content/renderer/media/speech_recognition_audio_sink_unittest.cc b/content/renderer/media/speech_recognition_audio_sink_unittest.cc
index 67454d4..49890b5 100644
--- a/content/renderer/media/speech_recognition_audio_sink_unittest.cc
+++ b/content/renderer/media/speech_recognition_audio_sink_unittest.cc
@@ -187,15 +187,15 @@
   bool is_responsive_;
 
   // Shared memory for the audio and synchronization.
-  scoped_ptr<base::SharedMemory> shared_memory_;
+  std::unique_ptr<base::SharedMemory> shared_memory_;
 
   // Fake sockets and their shared buffer.
-  scoped_ptr<MockSyncSocket::SharedBuffer> shared_buffer_;
-  scoped_ptr<MockSyncSocket> receiving_socket_;
+  std::unique_ptr<MockSyncSocket::SharedBuffer> shared_buffer_;
+  std::unique_ptr<MockSyncSocket> receiving_socket_;
   MockSyncSocket* sending_socket_;
 
   // Audio bus wrapping the shared memory from the renderer.
-  scoped_ptr<media::AudioBus> audio_track_bus_;
+  std::unique_ptr<media::AudioBus> audio_track_bus_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeSpeechRecognizer);
 };
@@ -252,7 +252,8 @@
     recognizer_->Initialize(blink_track, sink_params_, &foreign_memory_handle);
 
     // Create the producer.
-    scoped_ptr<base::SyncSocket> sending_socket(recognizer_->sending_socket());
+    std::unique_ptr<base::SyncSocket> sending_socket(
+        recognizer_->sending_socket());
     speech_audio_sink_.reset(new SpeechRecognitionAudioSink(
         blink_track, sink_params_, foreign_memory_handle,
         std::move(sending_socket),
@@ -276,7 +277,7 @@
       blink::WebMediaStreamTrack* blink_track) {
     scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
         WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-    scoped_ptr<WebRtcLocalAudioTrack> native_track(
+    std::unique_ptr<WebRtcLocalAudioTrack> native_track(
         new WebRtcLocalAudioTrack(adapter.get()));
     blink::WebMediaStreamSource blink_audio_source;
     blink_audio_source.initialize(base::UTF8ToUTF16("dummy_source_id"),
@@ -356,13 +357,13 @@
 
  private:
   // Producer.
-  scoped_ptr<SpeechRecognitionAudioSink> speech_audio_sink_;
+  std::unique_ptr<SpeechRecognitionAudioSink> speech_audio_sink_;
 
   // Consumer.
-  scoped_ptr<FakeSpeechRecognizer> recognizer_;
+  std::unique_ptr<FakeSpeechRecognizer> recognizer_;
 
   // Audio related members.
-  scoped_ptr<media::AudioBus> source_bus_;
+  std::unique_ptr<media::AudioBus> source_bus_;
   media::AudioParameters source_params_;
   media::AudioParameters sink_params_;
   WebRtcLocalAudioTrack* native_track_;
diff --git a/content/renderer/media/track_audio_renderer.cc b/content/renderer/media/track_audio_renderer.cc
index c4ae69e..d81d8c2 100644
--- a/content/renderer/media/track_audio_renderer.cc
+++ b/content/renderer/media/track_audio_renderer.cc
@@ -78,7 +78,7 @@
   if (!audio_shifter_)
     return;
 
-  scoped_ptr<media::AudioBus> audio_data(
+  std::unique_ptr<media::AudioBus> audio_data(
       media::AudioBus::Create(audio_bus.channels(), audio_bus.frames()));
   audio_bus.CopyTo(audio_data.get());
   // Note: For remote audio sources, |reference_time| is the local playout time,
diff --git a/content/renderer/media/track_audio_renderer.h b/content/renderer/media/track_audio_renderer.h
index 609f357..43c0d7fa 100644
--- a/content/renderer/media/track_audio_renderer.h
+++ b/content/renderer/media/track_audio_renderer.h
@@ -139,7 +139,7 @@
   scoped_refptr<media::AudioRendererSink> sink_;
 
   // This does all the synchronization/resampling/smoothing.
-  scoped_ptr<media::AudioShifter> audio_shifter_;
+  std::unique_ptr<media::AudioShifter> audio_shifter_;
 
   // These track the time duration of all the audio rendered so far by this
   // instance.  |prior_elapsed_render_time_| tracks the time duration of all
diff --git a/content/renderer/media/user_media_client_impl.cc b/content/renderer/media/user_media_client_impl.cc
index d841f19f..62dca219 100644
--- a/content/renderer/media/user_media_client_impl.cc
+++ b/content/renderer/media/user_media_client_impl.cc
@@ -154,7 +154,7 @@
 UserMediaClientImpl::UserMediaClientImpl(
     RenderFrame* render_frame,
     PeerConnectionDependencyFactory* dependency_factory,
-    scoped_ptr<MediaStreamDispatcher> media_stream_dispatcher)
+    std::unique_ptr<MediaStreamDispatcher> media_stream_dispatcher)
     : RenderFrameObserver(render_frame),
       dependency_factory_(dependency_factory),
       media_stream_dispatcher_(std::move(media_stream_dispatcher)),
diff --git a/content/renderer/media/user_media_client_impl.h b/content/renderer/media/user_media_client_impl.h
index b34db8b..03cff89b 100644
--- a/content/renderer/media/user_media_client_impl.h
+++ b/content/renderer/media/user_media_client_impl.h
@@ -5,13 +5,13 @@
 #ifndef CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_
 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
@@ -49,7 +49,7 @@
   UserMediaClientImpl(
       RenderFrame* render_frame,
       PeerConnectionDependencyFactory* dependency_factory,
-      scoped_ptr<MediaStreamDispatcher> media_stream_dispatcher);
+      std::unique_ptr<MediaStreamDispatcher> media_stream_dispatcher);
   ~UserMediaClientImpl() override;
 
   MediaStreamDispatcher* media_stream_dispatcher() const {
@@ -246,7 +246,7 @@
 
   // UserMediaClientImpl owns MediaStreamDispatcher instead of RenderFrameImpl
   // (or RenderFrameObserver) to ensure tear-down occurs in the right order.
-  const scoped_ptr<MediaStreamDispatcher> media_stream_dispatcher_;
+  const std::unique_ptr<MediaStreamDispatcher> media_stream_dispatcher_;
 
   LocalStreamSources local_sources_;
 
diff --git a/content/renderer/media/user_media_client_impl_unittest.cc b/content/renderer/media/user_media_client_impl_unittest.cc
index 22ae54e3..ebaeedb6 100644
--- a/content/renderer/media/user_media_client_impl_unittest.cc
+++ b/content/renderer/media/user_media_client_impl_unittest.cc
@@ -5,9 +5,10 @@
 #include "content/renderer/media/user_media_client_impl.h"
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/child/child_process.h"
@@ -53,7 +54,7 @@
 
   UserMediaClientImplUnderTest(
       PeerConnectionDependencyFactory* dependency_factory,
-      scoped_ptr<MediaStreamDispatcher> media_stream_dispatcher)
+      std::unique_ptr<MediaStreamDispatcher> media_stream_dispatcher)
       : UserMediaClientImpl(NULL,
                             dependency_factory,
                             std::move(media_stream_dispatcher)),
@@ -181,7 +182,7 @@
     ms_dispatcher_ = new MockMediaStreamDispatcher();
     used_media_impl_.reset(new UserMediaClientImplUnderTest(
         dependency_factory_.get(),
-        scoped_ptr<MediaStreamDispatcher>(ms_dispatcher_)));
+        std::unique_ptr<MediaStreamDispatcher>(ms_dispatcher_)));
   }
 
   void TearDown() override {
@@ -281,10 +282,10 @@
 
  protected:
   base::MessageLoop message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
+  std::unique_ptr<ChildProcess> child_process_;
   MockMediaStreamDispatcher* ms_dispatcher_;  // Owned by |used_media_impl_|.
-  scoped_ptr<UserMediaClientImplUnderTest> used_media_impl_;
-  scoped_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
+  std::unique_ptr<UserMediaClientImplUnderTest> used_media_impl_;
+  std::unique_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
 };
 
 TEST_F(UserMediaClientImplTest, GenerateMediaStream) {
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index 5f1cc11..d6ef0e2 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -31,7 +31,7 @@
 class VideoCaptureImpl::ClientBuffer
     : public base::RefCountedThreadSafe<ClientBuffer> {
  public:
-  ClientBuffer(scoped_ptr<base::SharedMemory> buffer, size_t buffer_size)
+  ClientBuffer(std::unique_ptr<base::SharedMemory> buffer, size_t buffer_size)
       : buffer_(std::move(buffer)), buffer_size_(buffer_size) {}
 
   base::SharedMemory* buffer() const { return buffer_.get(); }
@@ -42,7 +42,7 @@
 
   virtual ~ClientBuffer() {}
 
-  const scoped_ptr<base::SharedMemory> buffer_;
+  const std::unique_ptr<base::SharedMemory> buffer_;
   const size_t buffer_size_;
 
   DISALLOW_COPY_AND_ASSIGN(ClientBuffer);
@@ -252,7 +252,8 @@
     return;
   }
 
-  scoped_ptr<base::SharedMemory> shm(new base::SharedMemory(handle, false));
+  std::unique_ptr<base::SharedMemory> shm(
+      new base::SharedMemory(handle, false));
   if (!shm->Map(length)) {
     DLOG(ERROR) << "OnBufferCreated: Map failed.";
     return;
@@ -334,7 +335,7 @@
 
   scoped_refptr<media::VideoFrame> frame;
   BufferFinishedCallback buffer_finished_callback;
-  scoped_ptr<gpu::SyncToken> release_sync_token(new gpu::SyncToken);
+  std::unique_ptr<gpu::SyncToken> release_sync_token(new gpu::SyncToken);
   switch (storage_type) {
     case media::VideoFrame::STORAGE_GPU_MEMORY_BUFFERS: {
       const auto& iter = client_buffer2s_.find(buffer_id);
@@ -550,7 +551,7 @@
 // static
 void VideoCaptureImpl::DidFinishConsumingFrame(
     const media::VideoFrameMetadata* metadata,
-    scoped_ptr<gpu::SyncToken> release_sync_token,
+    std::unique_ptr<gpu::SyncToken> release_sync_token,
     const BufferFinishedCallback& callback_to_io_thread) {
   // Note: This function may be called on any thread by the VideoFrame
   // destructor.  |metadata| is still valid for read-access at this point.
diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h
index 0699051..b0782348 100644
--- a/content/renderer/media/video_capture_impl.h
+++ b/content/renderer/media/video_capture_impl.h
@@ -161,7 +161,7 @@
   // callback, to trampoline back to the IO thread with the values.
   static void DidFinishConsumingFrame(
       const media::VideoFrameMetadata* metadata,
-      scoped_ptr<gpu::SyncToken> release_sync_token,
+      std::unique_ptr<gpu::SyncToken> release_sync_token,
       const BufferFinishedCallback& callback_to_io_thread);
 
   const scoped_refptr<VideoCaptureMessageFilter> message_filter_;
diff --git a/content/renderer/media/video_capture_impl_manager.h b/content/renderer/media/video_capture_impl_manager.h
index c6f9b90b..1b7c28b 100644
--- a/content/renderer/media/video_capture_impl_manager.h
+++ b/content/renderer/media/video_capture_impl_manager.h
@@ -6,11 +6,11 @@
 #define CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_MANAGER_H_
 
 #include <map>
+#include <memory>
 
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
diff --git a/content/renderer/media/video_capture_impl_manager_unittest.cc b/content/renderer/media/video_capture_impl_manager_unittest.cc
index 3bb923e..349a32e 100644
--- a/content/renderer/media/video_capture_impl_manager_unittest.cc
+++ b/content/renderer/media/video_capture_impl_manager_unittest.cc
@@ -118,10 +118,10 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
+  std::unique_ptr<ChildProcess> child_process_;
   media::VideoCaptureParams params_;
   base::RunLoop cleanup_run_loop_;
-  scoped_ptr<MockVideoCaptureImplManager> manager_;
+  std::unique_ptr<MockVideoCaptureImplManager> manager_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(VideoCaptureImplManagerTest);
diff --git a/content/renderer/media/video_capture_impl_unittest.cc b/content/renderer/media/video_capture_impl_unittest.cc
index 1f0ad49a..1fc43c0 100644
--- a/content/renderer/media/video_capture_impl_unittest.cc
+++ b/content/renderer/media/video_capture_impl_unittest.cc
@@ -199,10 +199,10 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
+  std::unique_ptr<ChildProcess> child_process_;
   scoped_refptr<MockVideoCaptureMessageFilter> message_filter_;
   media::VideoCaptureSessionId session_id_;
-  scoped_ptr<MockVideoCaptureImpl> video_capture_impl_;
+  std::unique_ptr<MockVideoCaptureImpl> video_capture_impl_;
   media::VideoCaptureParams params_small_;
   media::VideoCaptureParams params_large_;
 
diff --git a/content/renderer/media/video_track_adapter.cc b/content/renderer/media/video_track_adapter.cc
index bf737bd8..1b727845 100644
--- a/content/renderer/media/video_track_adapter.cc
+++ b/content/renderer/media/video_track_adapter.cc
@@ -43,7 +43,7 @@
 }
 
 void ResetCallbackOnMainRenderThread(
-    scoped_ptr<VideoCaptureDeliverFrameCB> callback) {
+    std::unique_ptr<VideoCaptureDeliverFrameCB> callback) {
   // |callback| will be deleted when this exits.
 }
 
@@ -184,7 +184,7 @@
       // Make sure the VideoCaptureDeliverFrameCB is released on the main
       // render thread since it was added on the main render thread in
       // VideoTrackAdapter::AddTrack.
-      scoped_ptr<VideoCaptureDeliverFrameCB> callback(
+      std::unique_ptr<VideoCaptureDeliverFrameCB> callback(
           new VideoCaptureDeliverFrameCB(it->second));
       callbacks_.erase(it);
       renderer_task_runner_->PostTask(
diff --git a/content/renderer/media/video_track_recorder.cc b/content/renderer/media/video_track_recorder.cc
index 59ee58c..2dc0b667 100644
--- a/content/renderer/media/video_track_recorder.cc
+++ b/content/renderer/media/video_track_recorder.cc
@@ -46,12 +46,12 @@
   }
 };
 
-typedef scoped_ptr<vpx_codec_ctx_t, VpxCodecDeleter> ScopedVpxCodecCtxPtr;
+typedef std::unique_ptr<vpx_codec_ctx_t, VpxCodecDeleter> ScopedVpxCodecCtxPtr;
 
 void OnFrameEncodeCompleted(
     const VideoTrackRecorder::OnEncodedVideoCB& on_encoded_video_cb,
     const scoped_refptr<VideoFrame>& frame,
-    scoped_ptr<std::string> data,
+    std::unique_ptr<std::string> data,
     base::TimeTicks capture_timestamp,
     bool keyframe) {
   DVLOG(1) << (keyframe ? "" : "non ") << "keyframe "<< data->length() << "B, "
@@ -76,7 +76,7 @@
 class VideoTrackRecorder::VpxEncoder final
     : public base::RefCountedThreadSafe<VpxEncoder> {
  public:
-  static void ShutdownEncoder(scoped_ptr<base::Thread> encoding_thread,
+  static void ShutdownEncoder(std::unique_ptr<base::Thread> encoding_thread,
                               ScopedVpxCodecCtxPtr encoder);
 
   VpxEncoder(bool use_vp9,
@@ -124,7 +124,7 @@
 
   // Thread for encoding. Active for the lifetime of VpxEncoder. All variables
   // below this are used in this thread.
-  scoped_ptr<base::Thread> encoding_thread_;
+  std::unique_ptr<base::Thread> encoding_thread_;
   // VP8 internal objects: configuration and encoder.
   vpx_codec_enc_cfg_t codec_config_;
   // |encoder_| is a special scoped pointer to guarantee proper destruction.
@@ -140,7 +140,7 @@
 
 // static
 void VideoTrackRecorder::VpxEncoder::ShutdownEncoder(
-    scoped_ptr<base::Thread> encoding_thread,
+    std::unique_ptr<base::Thread> encoding_thread,
     ScopedVpxCodecCtxPtr encoder) {
   DCHECK(encoding_thread->IsRunning());
   encoding_thread->Stop();
@@ -239,7 +239,7 @@
                                << vpx_codec_error(encoder_.get()) << " -"
                                << vpx_codec_error_detail(encoder_.get());
 
-  scoped_ptr<std::string> data(new std::string);
+  std::unique_ptr<std::string> data(new std::string);
   bool keyframe = false;
   vpx_codec_iter_t iter = NULL;
   const vpx_codec_cx_pkt_t* pkt = NULL;
diff --git a/content/renderer/media/video_track_recorder.h b/content/renderer/media/video_track_recorder.h
index 9b47758..971257b 100644
--- a/content/renderer/media/video_track_recorder.h
+++ b/content/renderer/media/video_track_recorder.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/public/renderer/media_stream_video_sink.h"
 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
@@ -29,7 +30,7 @@
  public:
   using OnEncodedVideoCB =
       base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
-                          scoped_ptr<std::string> encoded_data,
+                          std::unique_ptr<std::string> encoded_data,
                           base::TimeTicks capture_timestamp,
                           bool is_key_frame)>;
 
diff --git a/content/renderer/media/video_track_recorder_unittest.cc b/content/renderer/media/video_track_recorder_unittest.cc
index 85d49d4..12ed36c 100644
--- a/content/renderer/media/video_track_recorder_unittest.cc
+++ b/content/renderer/media/video_track_recorder_unittest.cc
@@ -2,19 +2,21 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/video_track_recorder.h"
+
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/child/child_process.h"
 #include "content/renderer/media/media_stream_video_track.h"
 #include "content/renderer/media/mock_media_stream_video_source.h"
-#include "content/renderer/media/video_track_recorder.h"
 #include "media/base/video_frame.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -82,7 +84,7 @@
                     base::TimeTicks timestamp,
                     bool keyframe));
   void OnEncodedVideo(const scoped_refptr<VideoFrame>& video_frame,
-                      scoped_ptr<std::string> encoded_data,
+                      std::unique_ptr<std::string> encoded_data,
                       base::TimeTicks timestamp,
                       bool is_key_frame) {
     DoOnEncodedVideo(video_frame, *encoded_data, timestamp, is_key_frame);
@@ -106,7 +108,7 @@
   MediaStreamVideoTrack* track_;
   blink::WebMediaStreamTrack blink_track_;
 
-  scoped_ptr<VideoTrackRecorder> video_track_recorder_;
+  std::unique_ptr<VideoTrackRecorder> video_track_recorder_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorderTest);
diff --git a/content/renderer/media/video_track_to_pepper_adapter.h b/content/renderer/media/video_track_to_pepper_adapter.h
index fc78de97..0d8eb0f 100644
--- a/content/renderer/media/video_track_to_pepper_adapter.h
+++ b/content/renderer/media/video_track_to_pepper_adapter.h
@@ -6,11 +6,11 @@
 #define CONTENT_RENDERER_MEDIA_VIDEO_SOURCE_HANDLER_H_
 
 #include <map>
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
 #include "media/base/video_frame.h"
@@ -56,7 +56,7 @@
                FrameReaderInterface* reader);
     ~SourceInfo();
 
-    scoped_ptr<PpFrameReceiver> receiver_;
+    std::unique_ptr<PpFrameReceiver> receiver_;
   };
 
   typedef std::map<FrameReaderInterface*, SourceInfo*> SourceInfoMap;
diff --git a/content/renderer/media/video_track_to_pepper_adapter_unittest.cc b/content/renderer/media/video_track_to_pepper_adapter_unittest.cc
index 9439f602..e1b859a 100644
--- a/content/renderer/media/video_track_to_pepper_adapter_unittest.cc
+++ b/content/renderer/media/video_track_to_pepper_adapter_unittest.cc
@@ -42,12 +42,12 @@
   }
 
  protected:
-  scoped_ptr<VideoTrackToPepperAdapter> handler_;
+  std::unique_ptr<VideoTrackToPepperAdapter> handler_;
   // A ChildProcess and a MessageLoop are both needed to fool the Tracks and
   // Sources inside |registry_| into believing they are on the right threads.
   const ChildProcess child_process_;
   const base::MessageLoop message_loop_;
-  scoped_ptr<MockMediaStreamRegistry> registry_;
+  std::unique_ptr<MockMediaStreamRegistry> registry_;
 };
 
 // Open |handler_| and send a VideoFrame to be received at the other side.
diff --git a/content/renderer/media/webaudio_capturer_source.h b/content/renderer/media/webaudio_capturer_source.h
index f127de3..3063aeec 100644
--- a/content/renderer/media/webaudio_capturer_source.h
+++ b/content/renderer/media/webaudio_capturer_source.h
@@ -74,7 +74,7 @@
   bool audio_format_changed_;
 
   // A wrapper used for providing audio to |fifo_|.
-  scoped_ptr<media::AudioBus> wrapper_bus_;
+  std::unique_ptr<media::AudioBus> wrapper_bus_;
 
   // Takes in the audio data passed to consumeAudio() and re-buffers it into 10
   // ms chunks for the track.  This ensures each chunk of audio delivered to the
diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc
index dc0c98c..f9b5a48 100644
--- a/content/renderer/media/webmediaplayer_ms.cc
+++ b/content/renderer/media/webmediaplayer_ms.cc
@@ -37,7 +37,7 @@
     blink::WebMediaPlayerClient* client,
     base::WeakPtr<media::WebMediaPlayerDelegate> delegate,
     media::MediaLog* media_log,
-    scoped_ptr<MediaStreamRendererFactory> factory,
+    std::unique_ptr<MediaStreamRendererFactory> factory,
     const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
     const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
     const scoped_refptr<base::TaskRunner>& worker_task_runner,
diff --git a/content/renderer/media/webmediaplayer_ms.h b/content/renderer/media/webmediaplayer_ms.h
index 7c2e56c..4678edd 100644
--- a/content/renderer/media/webmediaplayer_ms.h
+++ b/content/renderer/media/webmediaplayer_ms.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
@@ -74,7 +74,7 @@
       blink::WebMediaPlayerClient* client,
       base::WeakPtr<media::WebMediaPlayerDelegate> delegate,
       media::MediaLog* media_log,
-      scoped_ptr<MediaStreamRendererFactory> factory,
+      std::unique_ptr<MediaStreamRendererFactory> factory,
       const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
       const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
       const scoped_refptr<base::TaskRunner>& worker_task_runner,
@@ -193,7 +193,7 @@
   // Specify content:: to disambiguate from cc::.
   scoped_refptr<content::VideoFrameProvider> video_frame_provider_;  // Weak
 
-  scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_;
+  std::unique_ptr<cc_blink::WebLayerImpl> video_weblayer_;
 
   scoped_refptr<MediaStreamAudioRenderer> audio_renderer_;  // Weak
   media::SkCanvasVideoRenderer video_renderer_;
@@ -204,7 +204,7 @@
 
   scoped_refptr<media::MediaLog> media_log_;
 
-  scoped_ptr<MediaStreamRendererFactory> renderer_factory_;
+  std::unique_ptr<MediaStreamRendererFactory> renderer_factory_;
 
   const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
   const scoped_refptr<base::TaskRunner> worker_task_runner_;
@@ -215,7 +215,7 @@
 
   // WebMediaPlayerMS owns |compositor_| and destroys it on
   // |compositor_task_runner_|.
-  scoped_ptr<WebMediaPlayerMSCompositor> compositor_;
+  std::unique_ptr<WebMediaPlayerMSCompositor> compositor_;
 
   const scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
 
diff --git a/content/renderer/media/webmediaplayer_ms_compositor.h b/content/renderer/media/webmediaplayer_ms_compositor.h
index baed21e..5c2c4d1 100644
--- a/content/renderer/media/webmediaplayer_ms_compositor.h
+++ b/content/renderer/media/webmediaplayer_ms_compositor.h
@@ -8,9 +8,9 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/synchronization/lock.h"
@@ -125,7 +125,7 @@
 
   // |rendering_frame_buffer_| stores the incoming frames, and provides a frame
   // selection method which returns the best frame for the render interval.
-  scoped_ptr<media::VideoRendererAlgorithm> rendering_frame_buffer_;
+  std::unique_ptr<media::VideoRendererAlgorithm> rendering_frame_buffer_;
 
   // |current_frame_used_by_compositor_| is updated on compositor thread only.
   // It's used to track whether |current_frame_| was painted for detecting
diff --git a/content/renderer/media/webmediaplayer_ms_unittest.cc b/content/renderer/media/webmediaplayer_ms_unittest.cc
index 5c890cec..d930ddc7 100644
--- a/content/renderer/media/webmediaplayer_ms_unittest.cc
+++ b/content/renderer/media/webmediaplayer_ms_unittest.cc
@@ -102,7 +102,7 @@
   }
 
  private:
-  scoped_ptr<media::WaitableMessageLoopEvent> event_;
+  std::unique_ptr<media::WaitableMessageLoopEvent> event_;
 };
 
 // The class is used mainly to inject VideoFrames into WebMediaPlayerMS.
@@ -343,7 +343,7 @@
                 this,
                 delegate_.AsWeakPtr(),
                 new media::MediaLog(),
-                scoped_ptr<MediaStreamRendererFactory>(render_factory_),
+                std::unique_ptr<MediaStreamRendererFactory>(render_factory_),
                 message_loop_.task_runner(),
                 message_loop_.task_runner(),
                 message_loop_.task_runner(),
diff --git a/content/renderer/media/webrtc/media_stream_remote_audio_track.cc b/content/renderer/media/webrtc/media_stream_remote_audio_track.cc
index d03c806..e3940ab 100644
--- a/content/renderer/media/webrtc/media_stream_remote_audio_track.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_audio_track.cc
@@ -109,7 +109,8 @@
   std::list<SinkInfo> sinks_;
   base::ThreadChecker thread_checker_;
   media::AudioParameters params_;  // Only used on the callback thread.
-  scoped_ptr<media::AudioBus> audio_bus_;  // Only used on the callback thread.
+  std::unique_ptr<media::AudioBus>
+      audio_bus_;  // Only used on the callback thread.
 };
 
 MediaStreamRemoteAudioTrack::MediaStreamRemoteAudioTrack(
diff --git a/content/renderer/media/webrtc/media_stream_remote_audio_track.h b/content/renderer/media/webrtc/media_stream_remote_audio_track.h
index 4bc85d4..9e48dfb4 100644
--- a/content/renderer/media/webrtc/media_stream_remote_audio_track.h
+++ b/content/renderer/media/webrtc/media_stream_remote_audio_track.h
@@ -79,7 +79,7 @@
 
  private:
   class AudioSink;
-  scoped_ptr<AudioSink> sink_;
+  std::unique_ptr<AudioSink> sink_;
   const scoped_refptr<webrtc::AudioTrackInterface> track_;
   base::ThreadChecker thread_checker_;
 };
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index 26428e08..03b6125 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -140,7 +140,7 @@
 }
 
 MediaStreamRemoteVideoSource::MediaStreamRemoteVideoSource(
-    scoped_ptr<TrackObserver> observer)
+    std::unique_ptr<TrackObserver> observer)
     : observer_(std::move(observer)) {
   // The callback will be automatically cleared when 'observer_' goes out of
   // scope and no further callbacks will occur.
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.h b/content/renderer/media/webrtc/media_stream_remote_video_source.h
index 6731a2c..5f1d4fb6 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.h
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.h
@@ -24,7 +24,7 @@
 class CONTENT_EXPORT MediaStreamRemoteVideoSource
      : public MediaStreamVideoSource {
  public:
-  MediaStreamRemoteVideoSource(scoped_ptr<TrackObserver> observer);
+  MediaStreamRemoteVideoSource(std::unique_ptr<TrackObserver> observer);
   ~MediaStreamRemoteVideoSource() override;
 
   // Should be called when the remote video track this source originates from is
@@ -58,7 +58,7 @@
   // libjingle thread and forward it to the IO-thread.
   class RemoteVideoSourceDelegate;
   scoped_refptr<RemoteVideoSourceDelegate> delegate_;
-  scoped_ptr<TrackObserver> observer_;
+  std::unique_ptr<TrackObserver> observer_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource);
 };
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc b/content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc
index 6b35f7cb..52a580b 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc
@@ -30,7 +30,7 @@
     : public MediaStreamRemoteVideoSource {
  public:
   explicit MediaStreamRemoteVideoSourceUnderTest(
-      scoped_ptr<TrackObserver> observer)
+      std::unique_ptr<TrackObserver> observer)
       : MediaStreamRemoteVideoSource(std::move(observer)) {}
   using MediaStreamRemoteVideoSource::SinkInterfaceForTest;
 };
@@ -44,8 +44,8 @@
         webrtc_video_track_(mock_factory_->CreateLocalVideoTrack(
             "test",
             static_cast<cricket::VideoCapturer*>(NULL))),
-        remote_source_(
-            new MediaStreamRemoteVideoSourceUnderTest(scoped_ptr<TrackObserver>(
+        remote_source_(new MediaStreamRemoteVideoSourceUnderTest(
+            std::unique_ptr<TrackObserver>(
                 new TrackObserver(base::ThreadTaskRunnerHandle::Get(),
                                   webrtc_video_track_.get())))),
         number_of_successful_constraints_applied_(0),
@@ -108,8 +108,8 @@
   }
 
   base::MessageLoopForUI message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
-  scoped_ptr<MockPeerConnectionDependencyFactory> mock_factory_;
+  std::unique_ptr<ChildProcess> child_process_;
+  std::unique_ptr<MockPeerConnectionDependencyFactory> mock_factory_;
   scoped_refptr<webrtc::VideoTrackInterface> webrtc_video_track_;
   // |remote_source_| is owned by |webkit_source_|.
   MediaStreamRemoteVideoSourceUnderTest* remote_source_;
@@ -119,7 +119,7 @@
 };
 
 TEST_F(MediaStreamRemoteVideoSourceTest, StartTrack) {
-  scoped_ptr<MediaStreamVideoTrack> track(CreateTrack());
+  std::unique_ptr<MediaStreamVideoTrack> track(CreateTrack());
   EXPECT_EQ(1, NumberOfSuccessConstraintsCallbacks());
 
   MockMediaStreamVideoSink sink;
@@ -138,7 +138,7 @@
 }
 
 TEST_F(MediaStreamRemoteVideoSourceTest, RemoteTrackStop) {
-  scoped_ptr<MediaStreamVideoTrack> track(CreateTrack());
+  std::unique_ptr<MediaStreamVideoTrack> track(CreateTrack());
 
   MockMediaStreamVideoSink sink;
   track->AddSink(&sink, sink.GetDeliverFrameCB());
diff --git a/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc b/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
index 5fc0b620..29d0e1e 100644
--- a/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
+++ b/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
@@ -143,7 +143,7 @@
     return new rtc::RefCountedObject<MockVideoTrackInterface>(id);
   }
 
-  scoped_ptr<MockMediaStreamTrackMetrics> metrics_;
+  std::unique_ptr<MockMediaStreamTrackMetrics> metrics_;
   scoped_refptr<MediaStreamInterface> stream_;
 
   base::MessageLoopForUI message_loop_;
diff --git a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
index 7930c45c..982291b 100644
--- a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
@@ -458,7 +458,7 @@
   return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
 }
 
-scoped_ptr<WebRtcAudioCapturer>
+std::unique_ptr<WebRtcAudioCapturer>
 MockPeerConnectionDependencyFactory::CreateAudioCapturer(
     int render_frame_id,
     const StreamDeviceInfo& device_info,
diff --git a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h
index fd2c056..39881c63 100644
--- a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h
+++ b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h
@@ -168,7 +168,7 @@
       int sdp_mline_index,
       const std::string& sdp) override;
 
-  scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
+  std::unique_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
       int render_frame_id,
       const StreamDeviceInfo& device_info,
       const blink::WebMediaConstraints& constraints,
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index 8930b91..0885aef 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -15,6 +15,7 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/field_trial.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -68,6 +69,7 @@
 #include "third_party/WebKit/public/platform/WebURL.h"
 #include "third_party/WebKit/public/web/WebDocument.h"
 #include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/webrtc/api/dtlsidentitystore.h"
 #include "third_party/webrtc/api/mediaconstraintsinterface.h"
 #include "third_party/webrtc/base/ssladapter.h"
 #include "third_party/webrtc/media/base/mediachannel.h"
@@ -183,7 +185,7 @@
     options.echo_cancellation = rtc::Optional<bool>(false);
   }
 
-  scoped_ptr<WebRtcAudioCapturer> capturer = CreateAudioCapturer(
+  std::unique_ptr<WebRtcAudioCapturer> capturer = CreateAudioCapturer(
       render_frame_id, device_info, audio_constraints, source_data);
   if (!capturer.get()) {
     const std::string log_string =
@@ -329,8 +331,8 @@
   socket_factory_.reset(
       new IpcPacketSocketFactory(p2p_socket_dispatcher_.get()));
 
-  scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory;
-  scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory;
+  std::unique_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory;
+  std::unique_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory;
 
   const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
   if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
@@ -384,8 +386,7 @@
 
   rtc::scoped_ptr<PeerConnectionIdentityStore> identity_store(
       new PeerConnectionIdentityStore(
-          base::ThreadTaskRunnerHandle::Get(),
-          GetWebRtcSignalingThread(),
+          base::ThreadTaskRunnerHandle::Get(), GetWebRtcSignalingThread(),
           GURL(web_frame->document().url()),
           GURL(web_frame->document().firstPartyForCookies())));
 
@@ -475,7 +476,7 @@
   const GURL& requesting_origin =
       GURL(web_frame->document().url()).GetOrigin();
 
-  scoped_ptr<rtc::NetworkManager> network_manager;
+  std::unique_ptr<rtc::NetworkManager> network_manager;
   if (port_config.enable_multiple_routes) {
     FilteringNetworkManager* filtering_network_manager =
         new FilteringNetworkManager(network_manager_, requesting_origin,
@@ -502,6 +503,26 @@
       .get();
 }
 
+// static
+void PeerConnectionDependencyFactory::SetDefaultCertificate(
+    webrtc::PeerConnectionInterface::RTCConfiguration* config) {
+  if (config->certificates.empty()) {
+    rtc::scoped_ptr<rtc::SSLIdentity> identity(rtc::SSLIdentity::Generate(
+        webrtc::kIdentityName, rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)));
+    rtc::scoped_refptr<rtc::RTCCertificate> certificate =
+        rtc::RTCCertificate::Create(std::move(identity));
+    config->certificates.push_back(certificate);
+  }
+}
+
+// static
+rtc::scoped_refptr<rtc::RTCCertificate>
+PeerConnectionDependencyFactory::GenerateDefaultCertificate() {
+  rtc::scoped_ptr<rtc::SSLIdentity> identity(rtc::SSLIdentity::Generate(
+      webrtc::kIdentityName, rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)));
+  return rtc::RTCCertificate::Create(std::move(identity));
+}
+
 scoped_refptr<webrtc::MediaStreamInterface>
 PeerConnectionDependencyFactory::CreateLocalMediaStream(
     const std::string& label) {
@@ -545,7 +566,7 @@
   // TODO(xians): Merge |source| to the capturer(). We can't do this today
   // because only one capturer() is supported while one |source| is created
   // for each audio track.
-  scoped_ptr<WebRtcLocalAudioTrack> audio_track(
+  std::unique_ptr<WebRtcLocalAudioTrack> audio_track(
       new WebRtcLocalAudioTrack(adapter.get()));
 
   // Start the source and connect the audio data flow to the track.
@@ -585,7 +606,7 @@
 
   MediaStreamAudioSource* source_data = new MediaStreamAudioSource();
   source_data->SetWebAudioCapturer(
-      make_scoped_ptr(new WebAudioCapturerSource(source)));
+      base::WrapUnique(new WebAudioCapturerSource(source)));
 
   // Create a LocalAudioSource object which holds audio options.
   // SetLocalAudioSource() affects core audio parts in third_party/Libjingle.
@@ -732,7 +753,7 @@
   }
 }
 
-scoped_ptr<WebRtcAudioCapturer>
+std::unique_ptr<WebRtcAudioCapturer>
 PeerConnectionDependencyFactory::CreateAudioCapturer(
     int render_frame_id,
     const StreamDeviceInfo& device_info,
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.h b/content/renderer/media/webrtc/peer_connection_dependency_factory.h
index 73d705d..e581743 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.h
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.h
@@ -71,6 +71,12 @@
   blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler(
       blink::WebRTCPeerConnectionHandlerClient* client);
 
+  // Add an ECDSA certificate to |config| in case it contains no certificate.
+  static void SetDefaultCertificate(
+      webrtc::PeerConnectionInterface::RTCConfiguration* config);
+
+  static rtc::scoped_refptr<rtc::RTCCertificate> GenerateDefaultCertificate();
+
   // Asks the PeerConnection factory to create a Local MediaStream object.
   virtual scoped_refptr<webrtc::MediaStreamInterface>
       CreateLocalMediaStream(const std::string& label);
@@ -164,7 +170,7 @@
   // Returns a new capturer or existing capturer based on the |render_frame_id|
   // and |device_info|; if both are valid, it reuses existing capture if any --
   // otherwise it creates a new capturer.
-  virtual scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
+  virtual std::unique_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
       int render_frame_id,
       const StreamDeviceInfo& device_info,
       const blink::WebMediaConstraints& constraints,
@@ -202,14 +208,14 @@
   // We own network_manager_, must be deleted on the worker thread.
   // The network manager uses |p2p_socket_dispatcher_|.
   IpcNetworkManager* network_manager_;
-  scoped_ptr<IpcPacketSocketFactory> socket_factory_;
+  std::unique_ptr<IpcPacketSocketFactory> socket_factory_;
 
   scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_;
 
   scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
   scoped_refptr<WebRtcAudioDeviceImpl> audio_device_;
 
-  scoped_ptr<StunProberTrial> stun_trial_;
+  std::unique_ptr<StunProberTrial> stun_trial_;
 
   // PeerConnection threads. signaling_thread_ is created from the
   // "current" chrome thread.
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc
index 4009d97..1747aec 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc
@@ -18,12 +18,12 @@
 
  protected:
   base::MessageLoop message_loop_;
-  scoped_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
+  std::unique_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
 };
 
 TEST_F(PeerConnectionDependencyFactoryTest, CreateRTCPeerConnectionHandler) {
   MockWebRTCPeerConnectionHandlerClient client_jsep;
-  scoped_ptr<blink::WebRTCPeerConnectionHandler> pc_handler(
+  std::unique_ptr<blink::WebRTCPeerConnectionHandler> pc_handler(
       dependency_factory_->CreateRTCPeerConnectionHandler(&client_jsep));
   EXPECT_TRUE(pc_handler.get() != NULL);
 }
diff --git a/content/renderer/media/webrtc/stun_field_trial.cc b/content/renderer/media/webrtc/stun_field_trial.cc
index 68e8fa1..5f203f2 100644
--- a/content/renderer/media/webrtc/stun_field_trial.cc
+++ b/content/renderer/media/webrtc/stun_field_trial.cc
@@ -261,7 +261,7 @@
   total_probers_ = params.total_batches * batch_size_;
 
   for (int i = 0; i < total_probers_; i++) {
-    scoped_ptr<StunProber> prober(
+    std::unique_ptr<StunProber> prober(
         new StunProber(factory_, rtc::Thread::Current(), networks));
     if (!prober->Prepare(params.servers, (params.shared_socket_mode != 0),
                          params.interval_ms, params.requests_per_ip, 1000,
diff --git a/content/renderer/media/webrtc/stun_field_trial.h b/content/renderer/media/webrtc/stun_field_trial.h
index dc1629e..79c9ec40 100644
--- a/content/renderer/media/webrtc/stun_field_trial.h
+++ b/content/renderer/media/webrtc/stun_field_trial.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_STUN_FIELD_TRIAL_H_
 #define CONTENT_RENDERER_MEDIA_WEBRTC_STUN_FIELD_TRIAL_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
diff --git a/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h b/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
index 4e70d19..72644115 100644
--- a/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
+++ b/content/renderer/media/webrtc/webrtc_audio_sink_adapter.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/media_stream_audio_sink.h"
 #include "media/audio/audio_parameters.h"
 
@@ -40,7 +41,7 @@
   webrtc::AudioTrackSinkInterface* const sink_;
 
   media::AudioParameters params_;
-  scoped_ptr<int16_t[]> interleaved_data_;
+  std::unique_ptr<int16_t[]> interleaved_data_;
 
   DISALLOW_COPY_AND_ASSIGN(WebRtcAudioSinkAdapter);
 };
diff --git a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
index f169880c..c86881b0 100644
--- a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
+++ b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
@@ -106,7 +106,7 @@
   }
 #endif
 
-  scoped_ptr<WebRtcAudioSinkAdapter> adapter(
+  std::unique_ptr<WebRtcAudioSinkAdapter> adapter(
       new WebRtcAudioSinkAdapter(sink));
   owner_->AddSink(adapter.get());
   sink_adapters_.push_back(adapter.release());
diff --git a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc
index a34937b..0a30d4e 100644
--- a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc
+++ b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc
@@ -49,20 +49,20 @@
 
   media::AudioParameters params_;
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_;
-  scoped_ptr<WebRtcLocalAudioTrack> track_;
+  std::unique_ptr<WebRtcLocalAudioTrack> track_;
 };
 
 // Adds and Removes a WebRtcAudioSink to a local audio track.
 TEST_F(WebRtcLocalAudioTrackAdapterTest, AddAndRemoveSink) {
   // Add a sink to the webrtc track.
-  scoped_ptr<MockWebRtcAudioSink> sink(new MockWebRtcAudioSink());
+  std::unique_ptr<MockWebRtcAudioSink> sink(new MockWebRtcAudioSink());
   webrtc::AudioTrackInterface* webrtc_track =
       static_cast<webrtc::AudioTrackInterface*>(adapter_.get());
   webrtc_track->AddSink(sink.get());
 
   // Send a packet via |track_| and the data should reach the sink of the
   // |adapter_|.
-  const scoped_ptr<media::AudioBus> audio_bus =
+  const std::unique_ptr<media::AudioBus> audio_bus =
       media::AudioBus::Create(params_);
   // While this test is not checking the signal data being passed around, the
   // implementation in WebRtcLocalAudioTrack reads the data for its signal level
diff --git a/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc b/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
index 26546f4f..f52ccda 100644
--- a/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
+++ b/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/media/webrtc/webrtc_media_stream_adapter.h"
+
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/message_loop/message_loop.h"
 #include "content/child/child_process.h"
 #include "content/renderer/media/media_stream.h"
@@ -14,7 +17,6 @@
 #include "content/renderer/media/mock_media_stream_video_source.h"
 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h"
 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
-#include "content/renderer/media/webrtc/webrtc_media_stream_adapter.h"
 #include "content/renderer/media/webrtc_local_audio_track.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/public/platform/WebMediaStream.h"
@@ -52,7 +54,7 @@
       scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
           WebRtcLocalAudioTrackAdapter::Create(
               audio_track_vector[0].id().utf8(), nullptr));
-      scoped_ptr<WebRtcLocalAudioTrack> native_track(
+      std::unique_ptr<WebRtcLocalAudioTrack> native_track(
           new WebRtcLocalAudioTrack(adapter.get()));
       audio_track_vector[0].setExtraData(native_track.release());
     }
@@ -104,9 +106,9 @@
 
  protected:
   base::MessageLoop message_loop_;
-  scoped_ptr<ChildProcess> child_process_;
-  scoped_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
-  scoped_ptr<WebRtcMediaStreamAdapter> adapter_;
+  std::unique_ptr<ChildProcess> child_process_;
+  std::unique_ptr<MockPeerConnectionDependencyFactory> dependency_factory_;
+  std::unique_ptr<WebRtcMediaStreamAdapter> adapter_;
 };
 
 TEST_F(WebRtcMediaStreamAdapterTest, CreateWebRtcMediaStream) {
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc
index 0533ce7..de076b6e 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -91,13 +91,13 @@
 };
 
 // static
-scoped_ptr<WebRtcAudioCapturer> WebRtcAudioCapturer::CreateCapturer(
+std::unique_ptr<WebRtcAudioCapturer> WebRtcAudioCapturer::CreateCapturer(
     int render_frame_id,
     const StreamDeviceInfo& device_info,
     const blink::WebMediaConstraints& constraints,
     WebRtcAudioDeviceImpl* audio_device,
     MediaStreamAudioSource* audio_source) {
-  scoped_ptr<WebRtcAudioCapturer> capturer(new WebRtcAudioCapturer(
+  std::unique_ptr<WebRtcAudioCapturer> capturer(new WebRtcAudioCapturer(
       render_frame_id, device_info, constraints, audio_device, audio_source));
   if (capturer->Initialize())
     return capturer;
diff --git a/content/renderer/media/webrtc_audio_capturer.h b/content/renderer/media/webrtc_audio_capturer.h
index 546c315..df992e1b 100644
--- a/content/renderer/media/webrtc_audio_capturer.h
+++ b/content/renderer/media/webrtc_audio_capturer.h
@@ -6,13 +6,13 @@
 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_H_
 
 #include <list>
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/files/file.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
@@ -51,7 +51,7 @@
   // created for. |constraints| contains the settings for audio processing.
   // TODO(xians): Implement the interface for the audio source and move the
   // |constraints| to ApplyConstraints(). Called on the main render thread.
-  static scoped_ptr<WebRtcAudioCapturer> CreateCapturer(
+  static std::unique_ptr<WebRtcAudioCapturer> CreateCapturer(
       int render_frame_id,
       const StreamDeviceInfo& device_info,
       const blink::WebMediaConstraints& constraints,
diff --git a/content/renderer/media/webrtc_audio_capturer_unittest.cc b/content/renderer/media/webrtc_audio_capturer_unittest.cc
index 3abd3cd..1554149 100644
--- a/content/renderer/media/webrtc_audio_capturer_unittest.cc
+++ b/content/renderer/media/webrtc_audio_capturer_unittest.cc
@@ -76,7 +76,7 @@
 
   void VerifyAudioParams(const blink::WebMediaConstraints& constraints,
                          bool need_audio_processing) {
-    const scoped_ptr<WebRtcAudioCapturer> capturer =
+    const std::unique_ptr<WebRtcAudioCapturer> capturer =
         WebRtcAudioCapturer::CreateCapturer(
             -1, StreamDeviceInfo(
                     MEDIA_DEVICE_AUDIO_CAPTURE, "", "", params_.sample_rate(),
@@ -91,19 +91,21 @@
 
     scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
         WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-    const scoped_ptr<WebRtcLocalAudioTrack> track(
+    const std::unique_ptr<WebRtcLocalAudioTrack> track(
         new WebRtcLocalAudioTrack(adapter.get()));
     capturer->AddTrack(track.get());
 
     // Connect a mock sink to the track.
-    scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
+    std::unique_ptr<MockMediaStreamAudioSink> sink(
+        new MockMediaStreamAudioSink());
     track->AddSink(sink.get());
 
     int delay_ms = 65;
     bool key_pressed = true;
     double volume = 0.9;
 
-    scoped_ptr<media::AudioBus> audio_bus = media::AudioBus::Create(params_);
+    std::unique_ptr<media::AudioBus> audio_bus =
+        media::AudioBus::Create(params_);
     audio_bus->Zero();
 
     media::AudioCapturerSource::CaptureCallback* callback =
@@ -137,11 +139,12 @@
   // Set a non-audio constraint.
   constraint_factory.basic().width.setExact(240);
 
-  scoped_ptr<WebRtcAudioCapturer> capturer(WebRtcAudioCapturer::CreateCapturer(
-      0, StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "", "",
-                          params_.sample_rate(), params_.channel_layout(),
-                          params_.frames_per_buffer()),
-      constraint_factory.CreateWebMediaConstraints(), NULL, NULL));
+  std::unique_ptr<WebRtcAudioCapturer> capturer(
+      WebRtcAudioCapturer::CreateCapturer(
+          0, StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "", "",
+                              params_.sample_rate(), params_.channel_layout(),
+                              params_.frames_per_buffer()),
+          constraint_factory.CreateWebMediaConstraints(), NULL, NULL));
   EXPECT_TRUE(capturer.get() == NULL);
 }
 
diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
index de92afe4d..490eaf4a 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include <list>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -16,7 +17,6 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
 #include "content/renderer/media/webrtc_audio_capturer.h"
diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc
index 6f3308b..5713c82 100644
--- a/content/renderer/media/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc_audio_renderer.cc
@@ -456,7 +456,7 @@
                      base::Unretained(this))));
     }
 
-    scoped_ptr<media::AudioBus> drop_bus =
+    std::unique_ptr<media::AudioBus> drop_bus =
         media::AudioBus::Create(audio_bus->channels(), frames_skipped);
     if (audio_fifo_)
       audio_fifo_->Consume(drop_bus.get(), drop_bus->frames());
diff --git a/content/renderer/media/webrtc_audio_renderer.h b/content/renderer/media/webrtc_audio_renderer.h
index 970cdf2..9383f91 100644
--- a/content/renderer/media/webrtc_audio_renderer.h
+++ b/content/renderer/media/webrtc_audio_renderer.h
@@ -225,7 +225,7 @@
 
   // Used to buffer data between the client and the output device in cases where
   // the client buffer size is not the same as the output device buffer size.
-  scoped_ptr<media::AudioPullFifo> audio_fifo_;
+  std::unique_ptr<media::AudioPullFifo> audio_fifo_;
 
   // Contains the accumulated delay estimate which is provided to the WebRTC
   // AEC.
diff --git a/content/renderer/media/webrtc_audio_renderer_unittest.cc b/content/renderer/media/webrtc_audio_renderer_unittest.cc
index f1a5ed26..1b1e749 100644
--- a/content/renderer/media/webrtc_audio_renderer_unittest.cc
+++ b/content/renderer/media/webrtc_audio_renderer_unittest.cc
@@ -129,9 +129,9 @@
     blink::WebHeap::collectAllGarbageForTesting();
   }
 
-  scoped_ptr<base::MessageLoopForIO> message_loop_;
+  std::unique_ptr<base::MessageLoopForIO> message_loop_;
   scoped_refptr<media::MockAudioRendererSink> mock_sink_;
-  scoped_ptr<MockAudioRendererSource> source_;
+  std::unique_ptr<MockAudioRendererSource> source_;
   blink::WebMediaStream stream_;
   scoped_refptr<WebRtcAudioRenderer> renderer_;
   scoped_refptr<MediaStreamAudioRenderer> renderer_proxy_;
diff --git a/content/renderer/media/webrtc_identity_service_unittest.cc b/content/renderer/media/webrtc_identity_service_unittest.cc
index cddbd0c..80b71cd 100644
--- a/content/renderer/media/webrtc_identity_service_unittest.cc
+++ b/content/renderer/media/webrtc_identity_service_unittest.cc
@@ -69,7 +69,7 @@
                    base::Unretained(this)));
   }
 
-  scoped_ptr<WebRtcIdentityServiceForTest> service_;
+  std::unique_ptr<WebRtcIdentityServiceForTest> service_;
   std::string last_certificate_;
   std::string last_private_key_;
   int last_error_;
diff --git a/content/renderer/media/webrtc_local_audio_source_provider.h b/content/renderer/media/webrtc_local_audio_source_provider.h
index 9a9cc8e..d943280 100644
--- a/content/renderer/media/webrtc_local_audio_source_provider.h
+++ b/content/renderer/media/webrtc_local_audio_source_provider.h
@@ -7,10 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
@@ -86,9 +86,9 @@
   // Used to DCHECK that some methods are called on the capture audio thread.
   base::ThreadChecker capture_thread_checker_;
 
-  scoped_ptr<media::AudioConverter> audio_converter_;
-  scoped_ptr<media::AudioFifo> fifo_;
-  scoped_ptr<media::AudioBus> output_wrapper_;
+  std::unique_ptr<media::AudioConverter> audio_converter_;
+  std::unique_ptr<media::AudioFifo> fifo_;
+  std::unique_ptr<media::AudioBus> output_wrapper_;
   bool is_enabled_;
   media::AudioParameters source_params_;
   media::AudioParameters sink_params_;
diff --git a/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc b/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc
index df0c6e8..b6e9d5a 100644
--- a/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc
@@ -29,7 +29,7 @@
     sink_bus_ = media::AudioBus::Create(sink_params_);
     scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
         WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-    scoped_ptr<WebRtcLocalAudioTrack> native_track(
+    std::unique_ptr<WebRtcLocalAudioTrack> native_track(
         new WebRtcLocalAudioTrack(adapter.get()));
     blink::WebMediaStreamSource audio_source;
     audio_source.initialize(blink::WebString::fromUTF8("dummy_source_id"),
@@ -52,9 +52,9 @@
 
   media::AudioParameters source_params_;
   media::AudioParameters sink_params_;
-  scoped_ptr<media::AudioBus> sink_bus_;
+  std::unique_ptr<media::AudioBus> sink_bus_;
   blink::WebMediaStreamTrack blink_track_;
-  scoped_ptr<WebRtcLocalAudioSourceProvider> source_provider_;
+  std::unique_ptr<WebRtcLocalAudioSourceProvider> source_provider_;
 };
 
 TEST_F(WebRtcLocalAudioSourceProviderTest, VerifyDataFlow) {
@@ -71,7 +71,7 @@
   EXPECT_EQ(0, sink_bus_->channel(0)[0]);
 
   // Create a source AudioBus with channel data filled with non-zero values.
-  const scoped_ptr<media::AudioBus> source_bus =
+  const std::unique_ptr<media::AudioBus> source_bus =
       media::AudioBus::Create(source_params_);
   std::fill(source_bus->channel(0),
             source_bus->channel(0) + source_bus->frames(),
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index 1e9868c..16a6b8db 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -79,7 +79,7 @@
   }
 
  private:
-  scoped_ptr<media::AudioBus> audio_bus_;
+  std::unique_ptr<media::AudioBus> audio_bus_;
   WebRtcAudioCapturer* capturer_;
   base::PlatformThreadHandle thread_;
   base::WaitableEvent closure_;
@@ -120,7 +120,7 @@
   ~MockCapturerSource() override {}
 
  private:
-  scoped_ptr<FakeAudioThread> audio_thread_;
+  std::unique_ptr<FakeAudioThread> audio_thread_;
   WebRtcAudioCapturer* capturer_;
   media::AudioParameters params_;
 };
@@ -166,7 +166,7 @@
     StreamDeviceInfo device(MEDIA_DEVICE_AUDIO_CAPTURE,
                             std::string(), std::string());
     {
-      scoped_ptr<WebRtcAudioCapturer> capturer =
+      std::unique_ptr<WebRtcAudioCapturer> capturer =
           WebRtcAudioCapturer::CreateCapturer(
               -1, device, constraint_factory.CreateWebMediaConstraints(),
               nullptr, audio_source);
@@ -199,7 +199,7 @@
 TEST_F(WebRtcLocalAudioTrackTest, ConnectAndDisconnectOneSink) {
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track(
+  std::unique_ptr<WebRtcLocalAudioTrack> track(
       new WebRtcLocalAudioTrack(adapter.get()));
   track->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -208,7 +208,8 @@
   capturer_->AddTrack(track.get());
   EXPECT_TRUE(track->GetAudioAdapter()->enabled());
 
-  scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink(
+      new MockMediaStreamAudioSink());
   base::WaitableEvent event(false, false);
   EXPECT_CALL(*sink, FormatIsSet());
   EXPECT_CALL(*sink,
@@ -233,7 +234,7 @@
   EXPECT_CALL(*capturer_source_.get(), OnStart());
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track(
+  std::unique_ptr<WebRtcLocalAudioTrack> track(
       new WebRtcLocalAudioTrack(adapter.get()));
   track->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -242,7 +243,8 @@
   capturer_->AddTrack(track.get());
   EXPECT_TRUE(track->GetAudioAdapter()->enabled());
   EXPECT_TRUE(track->GetAudioAdapter()->set_enabled(false));
-  scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink(
+      new MockMediaStreamAudioSink());
   const media::AudioParameters params = capturer_->GetInputFormat();
   base::WaitableEvent event(false, false);
   EXPECT_CALL(*sink, FormatIsSet()).Times(1);
@@ -270,7 +272,7 @@
 TEST_F(WebRtcLocalAudioTrackTest, DISABLED_MultipleAudioTracks) {
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_1(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track_1(
+  std::unique_ptr<WebRtcLocalAudioTrack> track_1(
       new WebRtcLocalAudioTrack(adapter_1.get()));
   track_1->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -278,7 +280,8 @@
                  track_1.get()));
   capturer_->AddTrack(track_1.get());
   EXPECT_TRUE(track_1->GetAudioAdapter()->enabled());
-  scoped_ptr<MockMediaStreamAudioSink> sink_1(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink_1(
+      new MockMediaStreamAudioSink());
   const media::AudioParameters params = capturer_->GetInputFormat();
   base::WaitableEvent event_1(false, false);
   EXPECT_CALL(*sink_1, FormatIsSet()).WillOnce(Return());
@@ -291,7 +294,7 @@
 
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_2(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track_2(
+  std::unique_ptr<WebRtcLocalAudioTrack> track_2(
       new WebRtcLocalAudioTrack(adapter_2.get()));
   track_2->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -304,7 +307,8 @@
   event_1.Reset();
   base::WaitableEvent event_2(false, false);
 
-  scoped_ptr<MockMediaStreamAudioSink> sink_2(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink_2(
+      new MockMediaStreamAudioSink());
   EXPECT_CALL(*sink_2, FormatIsSet()).WillOnce(Return());
   EXPECT_CALL(*sink_1, CaptureData()).Times(AtLeast(1))
       .WillRepeatedly(SignalEvent(&event_1));
@@ -334,7 +338,7 @@
 TEST_F(WebRtcLocalAudioTrackTest, StartOneAudioTrack) {
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track(
+  std::unique_ptr<WebRtcLocalAudioTrack> track(
       new WebRtcLocalAudioTrack(adapter.get()));
   track->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -354,7 +358,7 @@
 TEST_F(WebRtcLocalAudioTrackTest, StartTwoAudioTracks) {
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter1(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track1(
+  std::unique_ptr<WebRtcLocalAudioTrack> track1(
       new WebRtcLocalAudioTrack(adapter1.get()));
   track1->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -364,7 +368,7 @@
 
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter2(
         WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track2(
+  std::unique_ptr<WebRtcLocalAudioTrack> track2(
       new WebRtcLocalAudioTrack(adapter2.get()));
   track2->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -385,7 +389,7 @@
   base::WaitableEvent event(false, false);
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_1(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track_1(
+  std::unique_ptr<WebRtcLocalAudioTrack> track_1(
       new WebRtcLocalAudioTrack(adapter_1.get()));
   track_1->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -394,7 +398,8 @@
   capturer_->AddTrack(track_1.get());
 
   // Verify the data flow by connecting the sink to |track_1|.
-  scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink(
+      new MockMediaStreamAudioSink());
   event.Reset();
   EXPECT_CALL(*sink, FormatIsSet()).WillOnce(SignalEvent(&event));
   EXPECT_CALL(*sink, CaptureData())
@@ -407,7 +412,7 @@
   EXPECT_CALL(*capturer_source_.get(), OnStart()).Times(0);
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_2(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track_2(
+  std::unique_ptr<WebRtcLocalAudioTrack> track_2(
       new WebRtcLocalAudioTrack(adapter_2.get()));
   track_2->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -443,7 +448,7 @@
   // Setup the first audio track and start it.
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_1(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track_1(
+  std::unique_ptr<WebRtcLocalAudioTrack> track_1(
       new WebRtcLocalAudioTrack(adapter_1.get()));
   track_1->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -452,7 +457,8 @@
   capturer_->AddTrack(track_1.get());
 
   // Verify the data flow by connecting the |sink_1| to |track_1|.
-  scoped_ptr<MockMediaStreamAudioSink> sink_1(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink_1(
+      new MockMediaStreamAudioSink());
   EXPECT_CALL(*sink_1.get(), CaptureData())
       .Times(AnyNumber()).WillRepeatedly(Return());
   EXPECT_CALL(*sink_1.get(), FormatIsSet()).Times(AnyNumber());
@@ -462,7 +468,7 @@
   MockConstraintFactory constraint_factory;
   StreamDeviceInfo device(MEDIA_DEVICE_AUDIO_CAPTURE,
                           std::string(), std::string());
-  scoped_ptr<WebRtcAudioCapturer> new_capturer(
+  std::unique_ptr<WebRtcAudioCapturer> new_capturer(
       WebRtcAudioCapturer::CreateCapturer(
           -1, device, constraint_factory.CreateWebMediaConstraints(), NULL,
           NULL));
@@ -480,7 +486,7 @@
   // Setup the second audio track, connect it to the new capturer and start it.
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_2(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track_2(
+  std::unique_ptr<WebRtcLocalAudioTrack> track_2(
       new WebRtcLocalAudioTrack(adapter_2.get()));
   track_2->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -489,7 +495,8 @@
   new_capturer->AddTrack(track_2.get());
 
   // Verify the data flow by connecting the |sink_2| to |track_2|.
-  scoped_ptr<MockMediaStreamAudioSink> sink_2(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink_2(
+      new MockMediaStreamAudioSink());
   base::WaitableEvent event(false, false);
   EXPECT_CALL(*sink_2, CaptureData())
       .Times(AnyNumber()).WillRepeatedly(Return());
@@ -519,11 +526,12 @@
   // Create a capturer with new source which works with the format above.
   MockConstraintFactory factory;
   factory.DisableDefaultAudioConstraints();
-  scoped_ptr<WebRtcAudioCapturer> capturer(WebRtcAudioCapturer::CreateCapturer(
-      -1,
-      StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "", "", params.sample_rate(),
-                       params.channel_layout(), params.frames_per_buffer()),
-      factory.CreateWebMediaConstraints(), NULL, NULL));
+  std::unique_ptr<WebRtcAudioCapturer> capturer(
+      WebRtcAudioCapturer::CreateCapturer(
+          -1, StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "", "",
+                               params.sample_rate(), params.channel_layout(),
+                               params.frames_per_buffer()),
+          factory.CreateWebMediaConstraints(), NULL, NULL));
   scoped_refptr<MockCapturerSource> source(
       new MockCapturerSource(capturer.get()));
   EXPECT_CALL(*source.get(), OnInitialize(_, capturer.get(), -1));
@@ -534,7 +542,7 @@
   // Setup a audio track, connect it to the capturer and start it.
   scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
       WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
-  scoped_ptr<WebRtcLocalAudioTrack> track(
+  std::unique_ptr<WebRtcLocalAudioTrack> track(
       new WebRtcLocalAudioTrack(adapter.get()));
   track->Start(
       base::Bind(&MediaStreamAudioSource::StopAudioDeliveryTo,
@@ -543,7 +551,8 @@
   capturer->AddTrack(track.get());
 
   // Verify the data flow by connecting the |sink| to |track|.
-  scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
+  std::unique_ptr<MockMediaStreamAudioSink> sink(
+      new MockMediaStreamAudioSink());
   base::WaitableEvent event(false, false);
   EXPECT_CALL(*sink, FormatIsSet()).Times(1);
   // Verify the sinks are getting the packets with an expecting buffer size.
diff --git a/content/renderer/mojo/service_registry_js_wrapper.cc b/content/renderer/mojo/service_registry_js_wrapper.cc
index 1ab8b86f..8b57938 100644
--- a/content/renderer/mojo/service_registry_js_wrapper.cc
+++ b/content/renderer/mojo/service_registry_js_wrapper.cc
@@ -4,9 +4,9 @@
 
 #include "content/renderer/mojo/service_registry_js_wrapper.h"
 
+#include <memory>
 #include <utility>
 
-#include "base/memory/scoped_ptr.h"
 #include "content/common/mojo/service_registry_impl.h"
 #include "content/public/common/service_registry.h"
 #include "mojo/edk/js/handle.h"
diff --git a/content/renderer/mojo_bindings_controller.cc b/content/renderer/mojo_bindings_controller.cc
index 84a61b2..135c5ad 100644
--- a/content/renderer/mojo_bindings_controller.cc
+++ b/content/renderer/mojo_bindings_controller.cc
@@ -21,7 +21,7 @@
 const char kMojoContextStateKey[] = "MojoContextState";
 
 struct MojoContextStateData : public base::SupportsUserData::Data {
-  scoped_ptr<MojoContextState> state;
+  std::unique_ptr<MojoContextState> state;
 };
 
 }  // namespace
diff --git a/content/renderer/mojo_context_state.cc b/content/renderer/mojo_context_state.cc
index 4274fee..17939f7b 100644
--- a/content/renderer/mojo_context_state.cc
+++ b/content/renderer/mojo_context_state.cc
@@ -52,7 +52,7 @@
 using ModuleSourceMap =
     std::map<std::string, scoped_refptr<base::RefCountedMemory>>;
 
-base::LazyInstance<scoped_ptr<ModuleSourceMap>>::Leaky g_module_sources;
+base::LazyInstance<std::unique_ptr<ModuleSourceMap>>::Leaky g_module_sources;
 
 scoped_refptr<base::RefCountedMemory> GetBuiltinModuleData(
     const std::string& path) {
@@ -70,7 +70,7 @@
     { mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS },
   };
 
-  scoped_ptr<ModuleSourceMap>& module_sources = g_module_sources.Get();
+  std::unique_ptr<ModuleSourceMap>& module_sources = g_module_sources.Get();
   if (!module_sources) {
     // Initialize the module source map on first access.
     module_sources.reset(new ModuleSourceMap);
@@ -186,7 +186,7 @@
   DCHECK_EQ(module_prefix_ + id, response.url().string().utf8());
   // We can't delete fetch right now as the arguments to this function come from
   // it and are used below. Instead use a scope_ptr to cleanup.
-  scoped_ptr<ResourceFetcher> deleter(fetcher);
+  std::unique_ptr<ResourceFetcher> deleter(fetcher);
   module_fetchers_.weak_erase(
       std::find(module_fetchers_.begin(), module_fetchers_.end(), fetcher));
   if (data.empty()) {
diff --git a/content/renderer/mojo_context_state.h b/content/renderer/mojo_context_state.h
index eaca530..2a60c61 100644
--- a/content/renderer/mojo_context_state.h
+++ b/content/renderer/mojo_context_state.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_
 #define CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_
 
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "gin/modules/module_registry_observer.h"
 #include "v8/include/v8.h"
@@ -71,7 +71,7 @@
   bool module_added_;
 
   // Executes the script from gin.
-  scoped_ptr<MojoMainRunner> runner_;
+  std::unique_ptr<MojoMainRunner> runner_;
 
   // Set of fetchers we're waiting on to download script.
   ScopedVector<ResourceFetcher> module_fetchers_;
diff --git a/content/renderer/mus/compositor_mus_connection.cc b/content/renderer/mus/compositor_mus_connection.cc
index d303789..57cdb76d 100644
--- a/content/renderer/mus/compositor_mus_connection.cc
+++ b/content/renderer/mus/compositor_mus_connection.cc
@@ -39,7 +39,7 @@
 }
 
 void CompositorMusConnection::AttachSurfaceOnMainThread(
-    scoped_ptr<mus::WindowSurfaceBinding> surface_binding) {
+    std::unique_ptr<mus::WindowSurfaceBinding> surface_binding) {
   DCHECK(main_task_runner_->BelongsToCurrentThread());
   compositor_task_runner_->PostTask(
       FROM_HERE,
@@ -50,7 +50,7 @@
 CompositorMusConnection::~CompositorMusConnection() {}
 
 void CompositorMusConnection::AttachSurfaceOnCompositorThread(
-    scoped_ptr<mus::WindowSurfaceBinding> surface_binding) {
+    std::unique_ptr<mus::WindowSurfaceBinding> surface_binding) {
   DCHECK(compositor_task_runner_->BelongsToCurrentThread());
   window_surface_binding_ = std::move(surface_binding);
   if (root_) {
@@ -77,7 +77,7 @@
 }
 
 void CompositorMusConnection::OnWindowInputEventOnMainThread(
-    scoped_ptr<blink::WebInputEvent> web_event,
+    std::unique_ptr<blink::WebInputEvent> web_event,
     const base::Callback<void(bool)>& ack) {
   DCHECK(main_task_runner_->BelongsToCurrentThread());
   RenderWidgetMusConnection* connection =
@@ -117,11 +117,12 @@
 void CompositorMusConnection::OnWindowInputEvent(
     mus::Window* window,
     const ui::Event& event,
-    scoped_ptr<base::Callback<void(bool)>>* ack_callback) {
+    std::unique_ptr<base::Callback<void(bool)>>* ack_callback) {
   DCHECK(compositor_task_runner_->BelongsToCurrentThread());
   // TODO(moshayedi): Convert ui::Event directly to blink::WebInputEvent.
-  scoped_ptr<blink::WebInputEvent> web_event(
-      mus::mojom::Event::From(event).To<scoped_ptr<blink::WebInputEvent>>());
+  std::unique_ptr<blink::WebInputEvent> web_event(
+      mus::mojom::Event::From(event)
+          .To<std::unique_ptr<blink::WebInputEvent>>());
   // TODO(sad): We probably need to plumb LatencyInfo through Mus.
   ui::LatencyInfo info;
   InputEventAckState ack_state = input_handler_manager_->HandleInputEvent(
diff --git a/content/renderer/mus/compositor_mus_connection.h b/content/renderer/mus/compositor_mus_connection.h
index 8003e47..636100e 100644
--- a/content/renderer/mus/compositor_mus_connection.h
+++ b/content/renderer/mus/compositor_mus_connection.h
@@ -41,7 +41,7 @@
   // Attaches the provided |surface_binding| with the mus::Window for the
   // renderer once it becomes available.
   void AttachSurfaceOnMainThread(
-      scoped_ptr<mus::WindowSurfaceBinding> surface_binding);
+      std::unique_ptr<mus::WindowSurfaceBinding> surface_binding);
 
  private:
   friend class CompositorMusConnectionTest;
@@ -50,7 +50,7 @@
   ~CompositorMusConnection() override;
 
   void AttachSurfaceOnCompositorThread(
-      scoped_ptr<mus::WindowSurfaceBinding> surface_binding);
+      std::unique_ptr<mus::WindowSurfaceBinding> surface_binding);
 
   void CreateWindowTreeConnectionOnCompositorThread(
       mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request);
@@ -58,7 +58,7 @@
   void OnConnectionLostOnMainThread();
 
   void OnWindowInputEventOnMainThread(
-      scoped_ptr<blink::WebInputEvent> web_event,
+      std::unique_ptr<blink::WebInputEvent> web_event,
       const base::Callback<void(bool)>& ack);
 
   void OnWindowInputEventAckOnMainThread(const base::Callback<void(bool)>& ack,
@@ -72,14 +72,14 @@
   void OnWindowInputEvent(
       mus::Window* window,
       const ui::Event& event,
-      scoped_ptr<base::Callback<void(bool)>>* ack_callback) override;
+      std::unique_ptr<base::Callback<void(bool)>>* ack_callback) override;
 
   const int routing_id_;
   mus::Window* root_;
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
   InputHandlerManager* const input_handler_manager_;
-  scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
+  std::unique_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
 
   DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection);
 };
diff --git a/content/renderer/mus/compositor_mus_connection_unittest.cc b/content/renderer/mus/compositor_mus_connection_unittest.cc
index aab11f5..85c827b3 100644
--- a/content/renderer/mus/compositor_mus_connection_unittest.cc
+++ b/content/renderer/mus/compositor_mus_connection_unittest.cc
@@ -4,9 +4,10 @@
 
 #include "content/renderer/mus/compositor_mus_connection.h"
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/time/time.h"
 #include "components/mus/public/cpp/tests/test_window.h"
@@ -190,7 +191,7 @@
     const ui::LatencyInfo& latency_info,
     content::InputEventDispatchType dispatch_type) {
   if (delegate_) {
-    scoped_ptr<content::InputEventAck> ack(
+    std::unique_ptr<content::InputEventAck> ack(
         new content::InputEventAck(input_event.type, state_));
     delegate_->OnInputEventAck(std::move(ack));
   }
@@ -210,12 +211,13 @@
 
   // Returns a valid key event, so that it can be converted to a web event by
   // CompositorMusConnection.
-  scoped_ptr<ui::Event> GenerateKeyEvent();
+  std::unique_ptr<ui::Event> GenerateKeyEvent();
 
   // Calls CompositorMusConnection::OnWindowInputEvent.
-  void OnWindowInputEvent(mus::Window* window,
-                          const ui::Event& event,
-                          scoped_ptr<base::Callback<void(bool)>>* ack_callback);
+  void OnWindowInputEvent(
+      mus::Window* window,
+      const ui::Event& event,
+      std::unique_ptr<base::Callback<void(bool)>>* ack_callback);
 
   // Confirms the state of pending tasks enqueued on each task runner, and runs
   // until idle.
@@ -258,21 +260,21 @@
   scoped_refptr<CompositorMusConnection> compositor_connection_;
 
   // Test implementations, to control input given to |compositor_connection_|.
-  scoped_ptr<TestInputHandlerManager> input_handler_manager_;
-  scoped_ptr<TestRenderWidgetInputHandler> render_widget_input_handler_;
+  std::unique_ptr<TestInputHandlerManager> input_handler_manager_;
+  std::unique_ptr<TestRenderWidgetInputHandler> render_widget_input_handler_;
 
   DISALLOW_COPY_AND_ASSIGN(CompositorMusConnectionTest);
 };
 
-scoped_ptr<ui::Event> CompositorMusConnectionTest::GenerateKeyEvent() {
-  return scoped_ptr<ui::Event>(new ui::KeyEvent(
+std::unique_ptr<ui::Event> CompositorMusConnectionTest::GenerateKeyEvent() {
+  return std::unique_ptr<ui::Event>(new ui::KeyEvent(
       ui::ET_KEY_PRESSED, ui::KeyboardCode::VKEY_A, ui::EF_NONE));
 }
 
 void CompositorMusConnectionTest::OnWindowInputEvent(
     mus::Window* window,
     const ui::Event& event,
-    scoped_ptr<base::Callback<void(bool)>>* ack_callback) {
+    std::unique_ptr<base::Callback<void(bool)>>* ack_callback) {
   compositor_connection_->OnWindowInputEvent(window, event, ack_callback);
 }
 
@@ -330,9 +332,9 @@
       InputEventAckState::INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
 
   mus::TestWindow test_window;
-  scoped_ptr<ui::Event> event(GenerateKeyEvent());
+  std::unique_ptr<ui::Event> event(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback(
+  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
       new base::Callback<void(bool)>(
           base::Bind(&::TestCallback::BoolCallback, test_callback)));
 
@@ -357,9 +359,9 @@
   input_handler->set_state(InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED);
 
   mus::TestWindow test_window;
-  scoped_ptr<ui::Event> event(GenerateKeyEvent());
+  std::unique_ptr<ui::Event> event(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback(
+  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
       new base::Callback<void(bool)>(
           base::Bind(&::TestCallback::BoolCallback, test_callback)));
 
@@ -379,9 +381,9 @@
 // arrives, that only the most recent ack is fired.
 TEST_F(CompositorMusConnectionTest, LostAck) {
   mus::TestWindow test_window;
-  scoped_ptr<ui::Event> event1(GenerateKeyEvent());
+  std::unique_ptr<ui::Event> event1(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback1(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback1(
+  std::unique_ptr<base::Callback<void(bool)>> ack_callback1(
       new base::Callback<void(bool)>(
           base::Bind(&::TestCallback::BoolCallback, test_callback1)));
 
@@ -396,9 +398,9 @@
   input_handler->set_delegate(connection());
   input_handler->set_state(InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED);
 
-  scoped_ptr<ui::Event> event2(GenerateKeyEvent());
+  std::unique_ptr<ui::Event> event2(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback2(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback2(
+  std::unique_ptr<base::Callback<void(bool)>> ack_callback2(
       new base::Callback<void(bool)>(
           base::Bind(&::TestCallback::BoolCallback, test_callback2)));
   OnWindowInputEvent(&test_window, *event2.get(), &ack_callback2);
@@ -418,9 +420,9 @@
   input_handler_manager()->SetHandleInputEventResult(
       InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED);
   mus::TestWindow test_window;
-  scoped_ptr<ui::Event> event(GenerateKeyEvent());
+  std::unique_ptr<ui::Event> event(GenerateKeyEvent());
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback(
+  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
       new base::Callback<void(bool)>(
           base::Bind(&::TestCallback::BoolCallback, test_callback)));
 
@@ -440,7 +442,7 @@
                          gfx::Point(), ui::EF_NONE, 0, ui::EventTimeForNow());
 
   scoped_refptr<TestCallback> test_callback(new TestCallback);
-  scoped_ptr<base::Callback<void(bool)>> ack_callback(
+  std::unique_ptr<base::Callback<void(bool)>> ack_callback(
       new base::Callback<void(bool)>(
           base::Bind(&::TestCallback::BoolCallback, test_callback)));
 
diff --git a/content/renderer/mus/render_widget_mus_connection.cc b/content/renderer/mus/render_widget_mus_connection.cc
index e0f1c749..0663cd7 100644
--- a/content/renderer/mus/render_widget_mus_connection.cc
+++ b/content/renderer/mus/render_widget_mus_connection.cc
@@ -45,7 +45,8 @@
   }
 }
 
-scoped_ptr<cc::OutputSurface> RenderWidgetMusConnection::CreateOutputSurface() {
+std::unique_ptr<cc::OutputSurface>
+RenderWidgetMusConnection::CreateOutputSurface() {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(!window_surface_binding_);
   mus::mojom::GpuPtr gpu_service;
@@ -55,7 +56,7 @@
   gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb));
   scoped_refptr<cc::ContextProvider> context_provider(
       new mus::ContextProvider(cb.PassInterface().PassHandle()));
-  scoped_ptr<cc::OutputSurface> surface(new mus::OutputSurface(
+  std::unique_ptr<cc::OutputSurface> surface(new mus::OutputSurface(
       context_provider, mus::WindowSurface::Create(&window_surface_binding_)));
   if (compositor_mus_connection_) {
     compositor_mus_connection_->AttachSurfaceOnMainThread(
@@ -123,7 +124,7 @@
 }
 
 void RenderWidgetMusConnection::OnInputEventAck(
-    scoped_ptr<InputEventAck> input_event_ack) {
+    std::unique_ptr<InputEventAck> input_event_ack) {
   DCHECK(!pending_ack_.is_null());
   pending_ack_.Run(input_event_ack->state ==
                    InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED);
@@ -167,7 +168,7 @@
 }
 
 void RenderWidgetMusConnection::OnWindowInputEvent(
-    scoped_ptr<blink::WebInputEvent> input_event,
+    std::unique_ptr<blink::WebInputEvent> input_event,
     const base::Callback<void(bool)>& ack) {
   DCHECK(thread_checker_.CalledOnValidThread());
   // If we don't yet have a RenderWidgetInputHandler then we don't yet have
diff --git a/content/renderer/mus/render_widget_mus_connection.h b/content/renderer/mus/render_widget_mus_connection.h
index 0792095..4a626cc 100644
--- a/content/renderer/mus/render_widget_mus_connection.h
+++ b/content/renderer/mus/render_widget_mus_connection.h
@@ -25,7 +25,7 @@
   void Bind(mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request);
 
   // Create a cc output surface.
-  scoped_ptr<cc::OutputSurface> CreateOutputSurface();
+  std::unique_ptr<cc::OutputSurface> CreateOutputSurface();
 
   static RenderWidgetMusConnection* Get(int routing_id);
 
@@ -51,7 +51,7 @@
                                     bool event_processed) override;
   void OnDidHandleKeyEvent() override;
   void OnDidOverscroll(const DidOverscrollParams& params) override;
-  void OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) override;
+  void OnInputEventAck(std::unique_ptr<InputEventAck> input_event_ack) override;
   void NotifyInputEventHandled(
       blink::WebInputEvent::Type handled_type) override;
   void SetInputHandler(RenderWidgetInputHandler* input_handler) override;
@@ -61,12 +61,12 @@
   bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override;
 
   void OnConnectionLost();
-  void OnWindowInputEvent(scoped_ptr<blink::WebInputEvent> input_event,
+  void OnWindowInputEvent(std::unique_ptr<blink::WebInputEvent> input_event,
                           const base::Callback<void(bool)>& ack);
 
   const int routing_id_;
   RenderWidgetInputHandler* input_handler_;
-  scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
+  std::unique_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
   scoped_refptr<CompositorMusConnection> compositor_mus_connection_;
 
   base::Callback<void(bool)> pending_ack_;
diff --git a/content/renderer/notification_permission_dispatcher.cc b/content/renderer/notification_permission_dispatcher.cc
index f4ce9d4..110afc0 100644
--- a/content/renderer/notification_permission_dispatcher.cc
+++ b/content/renderer/notification_permission_dispatcher.cc
@@ -31,7 +31,7 @@
         mojo::GetProxy(&permission_service_));
   }
 
-  scoped_ptr<WebNotificationPermissionCallback> owned_callback(callback);
+  std::unique_ptr<WebNotificationPermissionCallback> owned_callback(callback);
 
   // base::Unretained is safe here because the Mojo channel, with associated
   // callbacks, will be deleted before the "this" instance is deleted.
@@ -43,7 +43,7 @@
 }
 
 void NotificationPermissionDispatcher::OnPermissionRequestComplete(
-    scoped_ptr<WebNotificationPermissionCallback> callback,
+    std::unique_ptr<WebNotificationPermissionCallback> callback,
     blink::mojom::PermissionStatus status) {
   DCHECK(callback);
 
diff --git a/content/renderer/notification_permission_dispatcher.h b/content/renderer/notification_permission_dispatcher.h
index 68002d73..77fbb63 100644
--- a/content/renderer/notification_permission_dispatcher.h
+++ b/content/renderer/notification_permission_dispatcher.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
 #define CONTENT_RENDERER_NOTIFICATION_PERMISSION_DISPATCHER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/render_frame_observer.h"
 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojom.h"
 
@@ -33,7 +34,7 @@
 
  private:
   void OnPermissionRequestComplete(
-      scoped_ptr<blink::WebNotificationPermissionCallback> callback,
+      std::unique_ptr<blink::WebNotificationPermissionCallback> callback,
       blink::mojom::PermissionStatus status);
 
   blink::mojom::PermissionServicePtr permission_service_;
diff --git a/content/renderer/p2p/filtering_network_manager_unittest.cc b/content/renderer/p2p/filtering_network_manager_unittest.cc
index d708428c..84185baf6 100644
--- a/content/renderer/p2p/filtering_network_manager_unittest.cc
+++ b/content/renderer/p2p/filtering_network_manager_unittest.cc
@@ -5,12 +5,13 @@
 #include "content/renderer/p2p/filtering_network_manager.h"
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "content/renderer/p2p/empty_network_manager.h"
@@ -71,7 +72,7 @@
 
  private:
   bool sent_first_update_ = false;
-  scoped_ptr<rtc::Network> network_;
+  std::unique_ptr<rtc::Network> network_;
 };
 
 class MockMediaPermission : public media::MediaPermission {
@@ -201,10 +202,10 @@
   void clear_callback_called() { callback_called_ = false; }
 
   bool callback_called_ = false;
-  scoped_ptr<rtc::NetworkManager> network_manager_;
-  scoped_ptr<MockNetworkManager> mock_network_manager_;
+  std::unique_ptr<rtc::NetworkManager> network_manager_;
+  std::unique_ptr<MockNetworkManager> mock_network_manager_;
 
-  scoped_ptr<MockMediaPermission> media_permission_;
+  std::unique_ptr<MockMediaPermission> media_permission_;
 
   NetworkList network_list_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
diff --git a/content/renderer/p2p/ipc_network_manager.cc b/content/renderer/p2p/ipc_network_manager.cc
index 326d6462..220ca73 100644
--- a/content/renderer/p2p/ipc_network_manager.cc
+++ b/content/renderer/p2p/ipc_network_manager.cc
@@ -94,7 +94,7 @@
     DCHECK(!ip_address.IsNil());
 
     rtc::IPAddress prefix = rtc::TruncateIP(ip_address, it->prefix_length);
-    scoped_ptr<rtc::Network> network(
+    std::unique_ptr<rtc::Network> network(
         new rtc::Network(it->name, it->name, prefix, it->prefix_length,
                          ConvertConnectionTypeToAdapterType(it->type)));
     network->set_default_local_address_provider(this);
diff --git a/content/renderer/p2p/ipc_network_manager_unittest.cc b/content/renderer/p2p/ipc_network_manager_unittest.cc
index fb87c9e560..c3804e2 100644
--- a/content/renderer/p2p/ipc_network_manager_unittest.cc
+++ b/content/renderer/p2p/ipc_network_manager_unittest.cc
@@ -2,8 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/p2p/ipc_network_manager.h"
+
+#include <memory>
+
 #include "content/renderer/p2p/network_list_manager.h"
 #include "net/base/ip_address.h"
 #include "net/base/network_change_notifier.h"
@@ -41,8 +43,8 @@
         network_manager_(new IpcNetworkManager(network_list_manager_.get())) {}
 
  protected:
-  scoped_ptr<MockP2PSocketDispatcher> network_list_manager_;
-  scoped_ptr<IpcNetworkManager> network_manager_;
+  std::unique_ptr<MockP2PSocketDispatcher> network_list_manager_;
+  std::unique_ptr<IpcNetworkManager> network_manager_;
 };
 
 // Test overall logic of IpcNetworkManager on OnNetworkListChanged
diff --git a/content/renderer/p2p/ipc_socket_factory.cc b/content/renderer/p2p/ipc_socket_factory.cc
index 20fa056..e0d93d34 100644
--- a/content/renderer/p2p/ipc_socket_factory.cc
+++ b/content/renderer/p2p/ipc_socket_factory.cc
@@ -583,7 +583,7 @@
     P2PSocketClient* client) {
   DCHECK_EQ(base::MessageLoop::current(), message_loop_);
 
-  scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
+  std::unique_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
 
   rtc::SocketAddress remote_address;
   if (!jingle_glue::IPEndPointToSocketAddress(address, &remote_address)) {
@@ -746,7 +746,7 @@
   rtc::SocketAddress crome_address;
   P2PSocketClientImpl* socket_client =
       new P2PSocketClientImpl(socket_dispatcher_);
-  scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
+  std::unique_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
   // TODO(sergeyu): Respect local_address and port limits here (need
   // to pass them over IPC channel to the browser).
   if (!socket->Init(P2P_SOCKET_UDP, socket_client,
@@ -769,7 +769,7 @@
       P2P_SOCKET_STUN_TCP_SERVER : P2P_SOCKET_TCP_SERVER;
   P2PSocketClientImpl* socket_client =
       new P2PSocketClientImpl(socket_dispatcher_);
-  scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
+  std::unique_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
   if (!socket->Init(type, socket_client, local_address,
                     rtc::SocketAddress())) {
     return NULL;
@@ -795,7 +795,7 @@
   }
   P2PSocketClientImpl* socket_client =
       new P2PSocketClientImpl(socket_dispatcher_);
-  scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
+  std::unique_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
   if (!socket->Init(type, socket_client, local_address, remote_address))
     return NULL;
   return socket.release();
@@ -803,8 +803,8 @@
 
 rtc::AsyncResolverInterface*
 IpcPacketSocketFactory::CreateAsyncResolver() {
-  scoped_ptr<AsyncAddressResolverImpl> resolver(
-    new AsyncAddressResolverImpl(socket_dispatcher_));
+  std::unique_ptr<AsyncAddressResolverImpl> resolver(
+      new AsyncAddressResolverImpl(socket_dispatcher_));
   return resolver.release();
 }
 
diff --git a/content/renderer/pepper/audio_helper.h b/content/renderer/pepper/audio_helper.h
index b0c33e5..1d4a543 100644
--- a/content/renderer/pepper/audio_helper.h
+++ b/content/renderer/pepper/audio_helper.h
@@ -8,8 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "ppapi/c/pp_completion_callback.h"
@@ -50,9 +51,9 @@
   // querying from the callback. The proxy uses this to get the handles to the
   // other process instead of mapping them in the renderer. These will be
   // invalid all other times.
-  scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_;
+  std::unique_ptr<base::SharedMemory> shared_memory_for_create_callback_;
   size_t shared_memory_size_for_create_callback_;
-  scoped_ptr<base::SyncSocket> socket_for_create_callback_;
+  std::unique_ptr<base::SyncSocket> socket_for_create_callback_;
 
   DISALLOW_COPY_AND_ASSIGN(AudioHelper);
 };
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc
index dca5b02..621aaf1 100644
--- a/content/renderer/pepper/content_decryptor_delegate.cc
+++ b/content/renderer/pepper/content_decryptor_delegate.cc
@@ -389,7 +389,7 @@
     const media::SessionKeysChangeCB& session_keys_change_cb,
     const media::SessionExpirationUpdateCB& session_expiration_update_cb,
     const base::Closure& fatal_plugin_error_cb,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   DCHECK(!key_system.empty());
   DCHECK(key_system_.empty());
   key_system_ = key_system;
@@ -415,7 +415,7 @@
 
 void ContentDecryptorDelegate::SetServerCertificate(
     const std::vector<uint8_t>& certificate,
-    scoped_ptr<media::SimpleCdmPromise> promise) {
+    std::unique_ptr<media::SimpleCdmPromise> promise) {
   if (certificate.size() < media::limits::kMinCertificateLength ||
       certificate.size() > media::limits::kMaxCertificateLength) {
     promise->reject(
@@ -435,7 +435,7 @@
     MediaKeys::SessionType session_type,
     media::EmeInitDataType init_data_type,
     const std::vector<uint8_t>& init_data,
-    scoped_ptr<NewSessionCdmPromise> promise) {
+    std::unique_ptr<NewSessionCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   PP_Var init_data_array =
       PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
@@ -448,7 +448,7 @@
 void ContentDecryptorDelegate::LoadSession(
     media::MediaKeys::SessionType session_type,
     const std::string& session_id,
-    scoped_ptr<NewSessionCdmPromise> promise) {
+    std::unique_ptr<NewSessionCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   plugin_decryption_interface_->LoadSession(
       pp_instance_, promise_id, MediaSessionTypeToPpSessionType(session_type),
@@ -458,7 +458,7 @@
 void ContentDecryptorDelegate::UpdateSession(
     const std::string& session_id,
     const std::vector<uint8_t>& response,
-    scoped_ptr<SimpleCdmPromise> promise) {
+    std::unique_ptr<SimpleCdmPromise> promise) {
   uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise));
   PP_Var response_array =
       PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
@@ -470,7 +470,7 @@
 
 void ContentDecryptorDelegate::CloseSession(
     const std::string& session_id,
-    scoped_ptr<SimpleCdmPromise> promise) {
+    std::unique_ptr<SimpleCdmPromise> promise) {
   if (session_id.length() > media::limits::kMaxSessionIdLength) {
     promise->reject(
         media::MediaKeys::INVALID_ACCESS_ERROR, 0, "Incorrect session.");
@@ -484,7 +484,7 @@
 
 void ContentDecryptorDelegate::RemoveSession(
     const std::string& session_id,
-    scoped_ptr<SimpleCdmPromise> promise) {
+    std::unique_ptr<SimpleCdmPromise> promise) {
   if (session_id.length() > media::limits::kMaxSessionIdLength) {
     promise->reject(
         media::MediaKeys::INVALID_ACCESS_ERROR, 0, "Incorrect session.");
diff --git a/content/renderer/pepper/content_decryptor_delegate.h b/content/renderer/pepper/content_decryptor_delegate.h
index 7c1a7a66..452df18a 100644
--- a/content/renderer/pepper/content_decryptor_delegate.h
+++ b/content/renderer/pepper/content_decryptor_delegate.h
@@ -60,28 +60,28 @@
       const media::SessionKeysChangeCB& session_keys_change_cb,
       const media::SessionExpirationUpdateCB& session_expiration_update_cb,
       const base::Closure& fatal_plugin_error_cb,
-      scoped_ptr<media::SimpleCdmPromise> promise);
+      std::unique_ptr<media::SimpleCdmPromise> promise);
 
   void InstanceCrashed();
 
   // Provides access to PPP_ContentDecryptor_Private.
   void SetServerCertificate(const std::vector<uint8_t>& certificate,
-                            scoped_ptr<media::SimpleCdmPromise> promise);
+                            std::unique_ptr<media::SimpleCdmPromise> promise);
   void CreateSessionAndGenerateRequest(
       media::MediaKeys::SessionType session_type,
       media::EmeInitDataType init_data_type,
       const std::vector<uint8_t>& init_data,
-      scoped_ptr<media::NewSessionCdmPromise> promise);
+      std::unique_ptr<media::NewSessionCdmPromise> promise);
   void LoadSession(media::MediaKeys::SessionType session_type,
                    const std::string& session_id,
-                   scoped_ptr<media::NewSessionCdmPromise> promise);
+                   std::unique_ptr<media::NewSessionCdmPromise> promise);
   void UpdateSession(const std::string& session_id,
                      const std::vector<uint8_t>& response,
-                     scoped_ptr<media::SimpleCdmPromise> promise);
+                     std::unique_ptr<media::SimpleCdmPromise> promise);
   void CloseSession(const std::string& session_id,
-                    scoped_ptr<media::SimpleCdmPromise> promise);
+                    std::unique_ptr<media::SimpleCdmPromise> promise);
   void RemoveSession(const std::string& session_id,
-                     scoped_ptr<media::SimpleCdmPromise> promise);
+                     std::unique_ptr<media::SimpleCdmPromise> promise);
   bool Decrypt(media::Decryptor::StreamType stream_type,
                const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
                const media::Decryptor::DecryptCB& decrypt_cb);
diff --git a/content/renderer/pepper/event_conversion.cc b/content/renderer/pepper/event_conversion.cc
index 88655b2e..8d9a3c3a7 100644
--- a/content/renderer/pepper/event_conversion.cc
+++ b/content/renderer/pepper/event_conversion.cc
@@ -8,9 +8,10 @@
 #include <stdint.h>
 #include <string.h>
 
+#include <memory>
+
 #include "base/i18n/char_iterator.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -583,7 +584,7 @@
 }
 
 WebInputEvent* CreateWebInputEvent(const InputEventData& event) {
-  scoped_ptr<WebInputEvent> web_input_event;
+  std::unique_ptr<WebInputEvent> web_input_event;
   switch (event.event_type) {
     case PP_INPUTEVENT_TYPE_UNDEFINED:
       return NULL;
@@ -627,12 +628,12 @@
 
 // Generate a coherent sequence of input events to simulate a user event.
 // From src/components/test_runner/event_sender.cc.
-std::vector<scoped_ptr<WebInputEvent>> CreateSimulatedWebInputEvents(
+std::vector<std::unique_ptr<WebInputEvent>> CreateSimulatedWebInputEvents(
     const ppapi::InputEventData& event,
     int plugin_x,
     int plugin_y) {
-  std::vector<scoped_ptr<WebInputEvent>> events;
-  scoped_ptr<WebInputEvent> original_event(CreateWebInputEvent(event));
+  std::vector<std::unique_ptr<WebInputEvent>> events;
+  std::unique_ptr<WebInputEvent> original_event(CreateWebInputEvent(event));
 
   switch (event.event_type) {
     case PP_INPUTEVENT_TYPE_MOUSEDOWN:
@@ -683,8 +684,8 @@
                  &generate_char);
 
       // Synthesize key down and key up events in all cases.
-      scoped_ptr<WebKeyboardEvent> key_down_event(new WebKeyboardEvent());
-      scoped_ptr<WebKeyboardEvent> key_up_event(new WebKeyboardEvent());
+      std::unique_ptr<WebKeyboardEvent> key_down_event(new WebKeyboardEvent());
+      std::unique_ptr<WebKeyboardEvent> key_up_event(new WebKeyboardEvent());
 
       key_down_event->type = WebInputEvent::RawKeyDown;
       key_down_event->windowsKeyCode = code;
diff --git a/content/renderer/pepper/event_conversion.h b/content/renderer/pepper/event_conversion.h
index fef77158..9803311 100644
--- a/content/renderer/pepper/event_conversion.h
+++ b/content/renderer/pepper/event_conversion.h
@@ -5,9 +5,9 @@
 #ifndef CONTENT_RENDERER_PEPPER_EVENT_CONVERSION_H_
 #define CONTENT_RENDERER_PEPPER_EVENT_CONVERSION_H_
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "ppapi/c/ppb_input_event.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -40,10 +40,10 @@
 // Creates an array of WebInputEvents to make the given event look like a user
 // input event on all platforms. |plugin_x| and |plugin_y| should be the
 // coordinates of a point within the plugin's area on the page.
-std::vector<scoped_ptr<blink::WebInputEvent>> CreateSimulatedWebInputEvents(
-    const ppapi::InputEventData& event,
-    int plugin_x,
-    int plugin_y);
+std::vector<std::unique_ptr<blink::WebInputEvent>>
+CreateSimulatedWebInputEvents(const ppapi::InputEventData& event,
+                              int plugin_x,
+                              int plugin_y);
 
 // Returns the PPAPI event class for the given WebKit event type. The given
 // type should not be "Undefined" since there's no corresponding PPAPI class.
diff --git a/content/renderer/pepper/event_conversion_unittest.cc b/content/renderer/pepper/event_conversion_unittest.cc
index 93fe113..fcefd1b7 100644
--- a/content/renderer/pepper/event_conversion_unittest.cc
+++ b/content/renderer/pepper/event_conversion_unittest.cc
@@ -2,12 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/pepper/event_conversion.h"
+
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/input/synthetic_web_input_event_builders.h"
-#include "content/renderer/pepper/event_conversion.h"
 #include "ppapi/shared_impl/ppb_input_event_shared.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -53,7 +55,8 @@
   ASSERT_EQ(1U, pp_event.changed_touches.size());
   ASSERT_EQ(1U, pp_event.target_touches.size());
 
-  scoped_ptr<blink::WebInputEvent> event_out(CreateWebInputEvent(pp_event));
+  std::unique_ptr<blink::WebInputEvent> event_out(
+      CreateWebInputEvent(pp_event));
   const blink::WebTouchEvent* touch_out =
       static_cast<const blink::WebTouchEvent*>(event_out.get());
   ASSERT_TRUE(touch_out);
@@ -80,7 +83,8 @@
   ASSERT_EQ(1U, pp_event.changed_touches.size());
   ASSERT_EQ(2U, pp_event.target_touches.size());
 
-  scoped_ptr<blink::WebInputEvent> event_out(CreateWebInputEvent(pp_event));
+  std::unique_ptr<blink::WebInputEvent> event_out(
+      CreateWebInputEvent(pp_event));
   const blink::WebTouchEvent* touch_out =
       static_cast<const blink::WebTouchEvent*>(event_out.get());
   ASSERT_TRUE(touch_out);
@@ -107,7 +111,8 @@
   ASSERT_EQ(1U, pp_event.changed_touches.size());
   ASSERT_EQ(2U, pp_event.target_touches.size());
 
-  scoped_ptr<blink::WebInputEvent> event_out(CreateWebInputEvent(pp_event));
+  std::unique_ptr<blink::WebInputEvent> event_out(
+      CreateWebInputEvent(pp_event));
   const blink::WebTouchEvent* touch_out =
       static_cast<const blink::WebTouchEvent*>(event_out.get());
   ASSERT_TRUE(touch_out);
@@ -135,7 +140,8 @@
   ASSERT_EQ(2U, pp_event.changed_touches.size());
   ASSERT_EQ(2U, pp_event.target_touches.size());
 
-  scoped_ptr<blink::WebInputEvent> event_out(CreateWebInputEvent(pp_event));
+  std::unique_ptr<blink::WebInputEvent> event_out(
+      CreateWebInputEvent(pp_event));
   const blink::WebTouchEvent* touch_out =
       static_cast<const blink::WebTouchEvent*>(event_out.get());
   ASSERT_TRUE(touch_out);
diff --git a/content/renderer/pepper/host_array_buffer_var.cc b/content/renderer/pepper/host_array_buffer_var.cc
index eaff2e7e..4d8a9212 100644
--- a/content/renderer/pepper/host_array_buffer_var.cc
+++ b/content/renderer/pepper/host_array_buffer_var.cc
@@ -7,8 +7,9 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/process/process_handle.h"
 #include "content/common/pepper_file_util.h"
@@ -62,7 +63,7 @@
     PP_Instance instance,
     int* host_shm_handle_id,
     base::SharedMemoryHandle* plugin_shm_handle) {
-  scoped_ptr<base::SharedMemory> shm(
+  std::unique_ptr<base::SharedMemory> shm(
       RenderThread::Get()
           ->HostAllocateSharedMemoryBuffer(ByteLength())
           .release());
diff --git a/content/renderer/pepper/host_dispatcher_wrapper.h b/content/renderer/pepper/host_dispatcher_wrapper.h
index fc5655d..f308ffbd 100644
--- a/content/renderer/pepper/host_dispatcher_wrapper.h
+++ b/content/renderer/pepper/host_dispatcher_wrapper.h
@@ -69,8 +69,8 @@
   ppapi::PpapiPermissions permissions_;
   bool is_external_;
 
-  scoped_ptr<ppapi::proxy::HostDispatcher> dispatcher_;
-  scoped_ptr<ppapi::proxy::ProxyChannel::Delegate> dispatcher_delegate_;
+  std::unique_ptr<ppapi::proxy::HostDispatcher> dispatcher_;
+  std::unique_ptr<ppapi::proxy::ProxyChannel::Delegate> dispatcher_delegate_;
   // We hold the hung_plugin_filter_ to guarantee it outlives |dispatcher_|,
   // since it is an observer of |dispatcher_| for sync calls.
   scoped_refptr<PepperHungPluginFilter> hung_plugin_filter_;
diff --git a/content/renderer/pepper/host_resource_var.h b/content/renderer/pepper/host_resource_var.h
index 607525e..b527696 100644
--- a/content/renderer/pepper/host_resource_var.h
+++ b/content/renderer/pepper/host_resource_var.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_PEPPER_HOST_RESOURCE_VAR_H_
 #define CONTENT_RENDERER_PEPPER_HOST_RESOURCE_VAR_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "ipc/ipc_message.h"
 #include "ppapi/c/pp_resource.h"
 #include "ppapi/shared_impl/resource_var.h"
@@ -57,7 +58,7 @@
 
   // If the plugin-side resource has not yet been created, carries a message to
   // create a resource of the specific type on the plugin side. Otherwise, NULL.
-  scoped_ptr<IPC::Message> creation_message_;
+  std::unique_ptr<IPC::Message> creation_message_;
 
   DISALLOW_COPY_AND_ASSIGN(HostResourceVar);
 };
diff --git a/content/renderer/pepper/host_var_tracker_unittest.cc b/content/renderer/pepper/host_var_tracker_unittest.cc
index ee498b5b..75d0f26 100644
--- a/content/renderer/pepper/host_var_tracker_unittest.cc
+++ b/content/renderer/pepper/host_var_tracker_unittest.cc
@@ -2,10 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/renderer/pepper/host_globals.h"
 #include "content/renderer/pepper/host_var_tracker.h"
+
+#include <memory>
+
+#include "base/macros.h"
+#include "content/renderer/pepper/host_globals.h"
 #include "content/renderer/pepper/mock_resource.h"
 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
 #include "content/renderer/pepper/pepper_try_catch.h"
diff --git a/content/renderer/pepper/mock_renderer_ppapi_host.h b/content/renderer/pepper/mock_renderer_ppapi_host.h
index aa0b59eac..84e6ff4 100644
--- a/content/renderer/pepper/mock_renderer_ppapi_host.h
+++ b/content/renderer/pepper/mock_renderer_ppapi_host.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_
 #define CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/renderer_ppapi_host.h"
 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
 #include "ppapi/host/ppapi_host.h"
@@ -68,7 +69,7 @@
 
   bool has_user_gesture_;
 
-  scoped_ptr<FakePepperPluginInstance> plugin_instance_;
+  std::unique_ptr<FakePepperPluginInstance> plugin_instance_;
 
   DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost);
 };
diff --git a/content/renderer/pepper/pepper_audio_encoder_host.cc b/content/renderer/pepper/pepper_audio_encoder_host.cc
index e7d3ca5..5b42a7d 100644
--- a/content/renderer/pepper/pepper_audio_encoder_host.cc
+++ b/content/renderer/pepper/pepper_audio_encoder_host.cc
@@ -72,7 +72,7 @@
   void RequestBitrateChange(uint32_t bitrate);
 
  private:
-  scoped_ptr<uint8_t[]> encoder_memory_;
+  std::unique_ptr<uint8_t[]> encoder_memory_;
   OpusEncoder* opus_encoder_;
 
   // Initialization parameters, only valid if |encoder_memory_| is not
@@ -116,7 +116,7 @@
   if (encoder_size < 1)
     return false;
 
-  scoped_ptr<uint8_t[]> encoder_memory(new uint8_t[encoder_size]);
+  std::unique_ptr<uint8_t[]> encoder_memory(new uint8_t[encoder_size]);
   opus_encoder_ = reinterpret_cast<OpusEncoder*>(encoder_memory.get());
 
   if (opus_encoder_init(opus_encoder_, parameters.input_sample_rate,
@@ -222,7 +222,7 @@
   if (!IsInitializationValid(parameters))
     return PP_ERROR_NOTSUPPORTED;
 
-  scoped_ptr<AudioEncoderImpl> encoder(new AudioEncoderImpl);
+  std::unique_ptr<AudioEncoderImpl> encoder(new AudioEncoderImpl);
   if (!encoder->Initialize(parameters))
     return PP_ERROR_FAILED;
   if (!AllocateBuffers(parameters, encoder->GetNumberOfSamplesPerFrame()))
@@ -364,12 +364,12 @@
       !total_bitstream_memory_size.IsValid())
     return false;
 
-  scoped_ptr<base::SharedMemory> audio_memory(
+  std::unique_ptr<base::SharedMemory> audio_memory(
       RenderThreadImpl::current()->HostAllocateSharedMemoryBuffer(
           total_audio_memory_size.ValueOrDie()));
   if (!audio_memory)
     return false;
-  scoped_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager(
+  std::unique_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager(
       new ppapi::MediaStreamBufferManager(this));
   if (!audio_buffer_manager->SetBuffers(kDefaultNumberOfAudioBuffers,
                                         total_audio_buffer_size.ValueOrDie(),
@@ -388,12 +388,12 @@
     buffer->data_size = audio_buffer_size.ValueOrDie();
   }
 
-  scoped_ptr<base::SharedMemory> bitstream_memory(
+  std::unique_ptr<base::SharedMemory> bitstream_memory(
       RenderThreadImpl::current()->HostAllocateSharedMemoryBuffer(
           total_bitstream_memory_size.ValueOrDie()));
   if (!bitstream_memory)
     return false;
-  scoped_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager(
+  std::unique_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager(
       new ppapi::MediaStreamBufferManager(this));
   if (!bitstream_buffer_manager->SetBuffers(kDefaultNumberOfAudioBuffers,
                                             bitstream_buffer_size.ValueOrDie(),
@@ -494,8 +494,9 @@
 
 // static
 void PepperAudioEncoderHost::StopAudioEncoder(
-    scoped_ptr<AudioEncoderImpl> encoder,
-    scoped_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager,
-    scoped_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager) {}
+    std::unique_ptr<AudioEncoderImpl> encoder,
+    std::unique_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager,
+    std::unique_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager) {
+}
 
 }  // namespace content
diff --git a/content/renderer/pepper/pepper_audio_encoder_host.h b/content/renderer/pepper/pepper_audio_encoder_host.h
index 8edd67a..32579c1b 100644
--- a/content/renderer/pepper/pepper_audio_encoder_host.h
+++ b/content/renderer/pepper/pepper_audio_encoder_host.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/numerics/safe_math.h"
 #include "content/common/content_export.h"
@@ -71,9 +72,10 @@
   void Close();
 
   static void StopAudioEncoder(
-      scoped_ptr<AudioEncoderImpl> encoder,
-      scoped_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager,
-      scoped_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager);
+      std::unique_ptr<AudioEncoderImpl> encoder,
+      std::unique_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager,
+      std::unique_ptr<ppapi::MediaStreamBufferManager>
+          bitstream_buffer_manager);
 
   // Non-owning pointer.
   RendererPpapiHost* renderer_ppapi_host_;
@@ -91,16 +93,16 @@
   int32_t encoder_last_error_;
 
   // Manages buffers containing audio samples from the plugin.
-  scoped_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager_;
+  std::unique_ptr<ppapi::MediaStreamBufferManager> audio_buffer_manager_;
 
   // Manages buffers containing encoded audio from the browser.
-  scoped_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager_;
+  std::unique_ptr<ppapi::MediaStreamBufferManager> bitstream_buffer_manager_;
 
   // Media task runner used to run the encoder.
   scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
 
   // The encoder actually doing the work.
-  scoped_ptr<AudioEncoderImpl> encoder_;
+  std::unique_ptr<AudioEncoderImpl> encoder_;
 
   base::WeakPtrFactory<PepperAudioEncoderHost> weak_ptr_factory_;
 
diff --git a/content/renderer/pepper/pepper_audio_input_host.h b/content/renderer/pepper/pepper_audio_input_host.h
index 40edffd8..084ce33e 100644
--- a/content/renderer/pepper/pepper_audio_input_host.h
+++ b/content/renderer/pepper/pepper_audio_input_host.h
@@ -8,11 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h"
diff --git a/content/renderer/pepper/pepper_broker.cc b/content/renderer/pepper/pepper_broker.cc
index 0869e80..765e7b3 100644
--- a/content/renderer/pepper/pepper_broker.cc
+++ b/content/renderer/pepper/pepper_broker.cc
@@ -148,7 +148,7 @@
 void PepperBroker::OnBrokerChannelConnected(
     base::ProcessId broker_pid,
     const IPC::ChannelHandle& channel_handle) {
-  scoped_ptr<PepperBrokerDispatcherWrapper> dispatcher(
+  std::unique_ptr<PepperBrokerDispatcherWrapper> dispatcher(
       new PepperBrokerDispatcherWrapper);
   if (!dispatcher->Init(broker_pid, channel_handle)) {
     ReportFailureToClients(PP_ERROR_FAILED);
@@ -234,8 +234,8 @@
 
   // The socket objects will be deleted when this function exits, closing the
   // handles. Any uses of the socket must duplicate them.
-  scoped_ptr<base::SyncSocket> broker_socket(new base::SyncSocket());
-  scoped_ptr<base::SyncSocket> plugin_socket(new base::SyncSocket());
+  std::unique_ptr<base::SyncSocket> broker_socket(new base::SyncSocket());
+  std::unique_ptr<base::SyncSocket> plugin_socket(new base::SyncSocket());
   if (base::SyncSocket::CreatePair(broker_socket.get(), plugin_socket.get())) {
     result = dispatcher_->SendHandleToBroker(client->pp_instance(),
                                              broker_socket->handle());
diff --git a/content/renderer/pepper/pepper_broker.h b/content/renderer/pepper/pepper_broker.h
index fda0045..0a4ef95 100644
--- a/content/renderer/pepper/pepper_broker.h
+++ b/content/renderer/pepper/pepper_broker.h
@@ -42,8 +42,8 @@
                              base::SyncSocket::Handle handle);
 
  private:
-  scoped_ptr<ppapi::proxy::BrokerDispatcher> dispatcher_;
-  scoped_ptr<ppapi::proxy::ProxyChannel::Delegate> dispatcher_delegate_;
+  std::unique_ptr<ppapi::proxy::BrokerDispatcher> dispatcher_;
+  std::unique_ptr<ppapi::proxy::ProxyChannel::Delegate> dispatcher_delegate_;
 };
 
 class PepperBroker : public base::RefCountedThreadSafe<PepperBroker> {
@@ -87,7 +87,7 @@
   // Connects the plugin to the broker via a pipe.
   void ConnectPluginToBroker(PPB_Broker_Impl* client);
 
-  scoped_ptr<PepperBrokerDispatcherWrapper> dispatcher_;
+  std::unique_ptr<PepperBrokerDispatcherWrapper> dispatcher_;
 
   // A map of pointers to objects that have requested a connection to the weak
   // pointer we can use to reference them. The mapping is needed so we can clean
diff --git a/content/renderer/pepper/pepper_camera_device_host.h b/content/renderer/pepper/pepper_camera_device_host.h
index 4cce0a16..0a7e1868 100644
--- a/content/renderer/pepper/pepper_camera_device_host.h
+++ b/content/renderer/pepper/pepper_camera_device_host.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/renderer_ppapi_host.h"
 #include "content/renderer/pepper/ppb_buffer_impl.h"
 #include "ppapi/c/pp_size.h"
@@ -54,7 +55,7 @@
   // Utility methods.
   void DetachPlatformCameraDevice();
 
-  scoped_ptr<PepperPlatformCameraDevice> platform_camera_device_;
+  std::unique_ptr<PepperPlatformCameraDevice> platform_camera_device_;
 
   RendererPpapiHostImpl* renderer_ppapi_host_;
 
diff --git a/content/renderer/pepper/pepper_compositor_host.cc b/content/renderer/pepper/pepper_compositor_host.cc
index 59b6dc81..ddbdbfc 100644
--- a/content/renderer/pepper/pepper_compositor_host.cc
+++ b/content/renderer/pepper/pepper_compositor_host.cc
@@ -48,10 +48,9 @@
             rect.point.y + rect.size.height <= height + kEpsilon);
 }
 
-int32_t VerifyCommittedLayer(
-    const ppapi::CompositorLayerData* old_layer,
-    const ppapi::CompositorLayerData* new_layer,
-    scoped_ptr<base::SharedMemory>* image_shm) {
+int32_t VerifyCommittedLayer(const ppapi::CompositorLayerData* old_layer,
+                             const ppapi::CompositorLayerData* new_layer,
+                             std::unique_ptr<base::SharedMemory>* image_shm) {
   if (!new_layer->is_valid())
     return PP_ERROR_BADARGUMENT;
 
@@ -191,8 +190,8 @@
 
 void PepperCompositorHost::ImageReleased(
     int32_t id,
-    scoped_ptr<base::SharedMemory> shared_memory,
-    scoped_ptr<cc::SharedBitmap> bitmap,
+    std::unique_ptr<base::SharedMemory> shared_memory,
+    std::unique_ptr<cc::SharedBitmap> bitmap,
     const gpu::SyncToken& sync_token,
     bool is_lost) {
   bitmap.reset();
@@ -220,7 +219,7 @@
     const scoped_refptr<cc::Layer>& layer,
     const ppapi::CompositorLayerData* old_layer,
     const ppapi::CompositorLayerData* new_layer,
-    scoped_ptr<base::SharedMemory> image_shm) {
+    std::unique_ptr<base::SharedMemory> image_shm) {
   // Always update properties on cc::Layer, because cc::Layer
   // will ignore any setting with unchanged value.
   layer->SetIsDrawable(true);
@@ -307,7 +306,7 @@
       DCHECK_EQ(rv, PP_TRUE);
       DCHECK_EQ(desc.stride, desc.size.width * 4);
       DCHECK_EQ(desc.format, PP_IMAGEDATAFORMAT_RGBA_PREMUL);
-      scoped_ptr<cc::SharedBitmap> bitmap =
+      std::unique_ptr<cc::SharedBitmap> bitmap =
           ChildThreadImpl::current()
               ->shared_bitmap_manager()
               ->GetBitmapForSharedMemory(image_shm.get());
@@ -353,9 +352,9 @@
   if (commit_layers_reply_context_.is_valid())
     return PP_ERROR_INPROGRESS;
 
-  scoped_ptr<scoped_ptr<base::SharedMemory>[]> image_shms;
+  std::unique_ptr<std::unique_ptr<base::SharedMemory>[]> image_shms;
   if (layers.size() > 0) {
-    image_shms.reset(new scoped_ptr<base::SharedMemory>[layers.size()]);
+    image_shms.reset(new std::unique_ptr<base::SharedMemory>[layers.size()]);
     if (!image_shms)
       return PP_ERROR_NOMEMORY;
     // Verfiy the layers first, if an error happens, we will return the error to
diff --git a/content/renderer/pepper/pepper_compositor_host.h b/content/renderer/pepper/pepper_compositor_host.h
index a8a413bd..9168e7d1 100644
--- a/content/renderer/pepper/pepper_compositor_host.h
+++ b/content/renderer/pepper/pepper_compositor_host.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/host/host_message_context.h"
 #include "ppapi/host/resource_host.h"
@@ -52,8 +53,8 @@
 
  private:
   void ImageReleased(int32_t id,
-                     scoped_ptr<base::SharedMemory> shared_memory,
-                     scoped_ptr<cc::SharedBitmap> bitmap,
+                     std::unique_ptr<base::SharedMemory> shared_memory,
+                     std::unique_ptr<cc::SharedBitmap> bitmap,
                      const gpu::SyncToken& sync_token,
                      bool is_lost);
   void ResourceReleased(int32_t id,
@@ -63,7 +64,7 @@
   void UpdateLayer(const scoped_refptr<cc::Layer>& layer,
                    const ppapi::CompositorLayerData* old_layer,
                    const ppapi::CompositorLayerData* new_layer,
-                   scoped_ptr<base::SharedMemory> image_shm);
+                   std::unique_ptr<base::SharedMemory> image_shm);
 
   // ResourceMessageHandler overrides:
   int32_t OnResourceMessageReceived(
diff --git a/content/renderer/pepper/pepper_device_enumeration_host_helper.h b/content/renderer/pepper/pepper_device_enumeration_host_helper.h
index b93acf7..84ad18b 100644
--- a/content/renderer/pepper/pepper_device_enumeration_host_helper.h
+++ b/content/renderer/pepper/pepper_device_enumeration_host_helper.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "ppapi/c/dev/ppb_device_ref_dev.h"
@@ -101,8 +101,8 @@
   PP_DeviceType_Dev device_type_;
   GURL document_url_;
 
-  scoped_ptr<ScopedRequest> enumerate_;
-  scoped_ptr<ScopedRequest> monitor_;
+  std::unique_ptr<ScopedRequest> enumerate_;
+  std::unique_ptr<ScopedRequest> monitor_;
 
   ppapi::host::ReplyMessageContext enumerate_devices_context_;
 
diff --git a/content/renderer/pepper/pepper_file_chooser_host.cc b/content/renderer/pepper/pepper_file_chooser_host.cc
index 572b0cd16..b70ab83 100644
--- a/content/renderer/pepper/pepper_file_chooser_host.cc
+++ b/content/renderer/pepper/pepper_file_chooser_host.cc
@@ -179,7 +179,7 @@
         renderer_ppapi_host_, pp_instance(), 0, file_paths[i]);
     int renderer_id =
         renderer_ppapi_host_->GetPpapiHost()->AddPendingResourceHost(
-            scoped_ptr<ppapi::host::ResourceHost>(renderer_host));
+            std::unique_ptr<ppapi::host::ResourceHost>(renderer_host));
     ppapi::FileRefCreateInfo info = ppapi::MakeExternalFileRefCreateInfo(
         file_paths[i], display_names[i], browser_ids[i], renderer_id);
     chosen_files.push_back(info);
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc
index 1398942..5212bce 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host.cc
+++ b/content/renderer/pepper/pepper_graphics_2d_host.cc
@@ -532,10 +532,11 @@
   return ReadImageData(image, &top_left) ? PP_OK : PP_ERROR_FAILED;
 }
 
-void PepperGraphics2DHost::ReleaseCallback(scoped_ptr<cc::SharedBitmap> bitmap,
-                                           const gfx::Size& bitmap_size,
-                                           const gpu::SyncToken& sync_token,
-                                           bool lost_resource) {
+void PepperGraphics2DHost::ReleaseCallback(
+    std::unique_ptr<cc::SharedBitmap> bitmap,
+    const gfx::Size& bitmap_size,
+    const gpu::SyncToken& sync_token,
+    bool lost_resource) {
   cached_bitmap_.reset();
   // Only keep around a cached bitmap if the plugin is currently drawing (has
   // need_flush_ack_ set).
@@ -546,12 +547,12 @@
 
 bool PepperGraphics2DHost::PrepareTextureMailbox(
     cc::TextureMailbox* mailbox,
-    scoped_ptr<cc::SingleReleaseCallback>* release_callback) {
+    std::unique_ptr<cc::SingleReleaseCallback>* release_callback) {
   if (!texture_mailbox_modified_)
     return false;
   // TODO(jbauman): Send image_data_ through mailbox to avoid copy.
   gfx::Size pixel_image_size(image_data_->width(), image_data_->height());
-  scoped_ptr<cc::SharedBitmap> shared_bitmap;
+  std::unique_ptr<cc::SharedBitmap> shared_bitmap;
   if (cached_bitmap_) {
     if (cached_bitmap_size_ == pixel_image_size)
       shared_bitmap = std::move(cached_bitmap_);
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h
index 29e55e94..03b97e7e 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host.h
+++ b/content/renderer/pepper/pepper_graphics_2d_host.h
@@ -77,7 +77,7 @@
 
   bool PrepareTextureMailbox(
       cc::TextureMailbox* mailbox,
-      scoped_ptr<cc::SingleReleaseCallback>* release_callback);
+      std::unique_ptr<cc::SingleReleaseCallback>* release_callback);
   void AttachedToNewLayer();
 
   // Notifications about the view's progress painting.  See PluginInstance.
@@ -163,7 +163,7 @@
                                      gfx::Rect* op_rect,
                                      gfx::Point* delta);
 
-  void ReleaseCallback(scoped_ptr<cc::SharedBitmap> bitmap,
+  void ReleaseCallback(std::unique_ptr<cc::SharedBitmap> bitmap,
                        const gfx::Size& bitmap_size,
                        const gpu::SyncToken& sync_token,
                        bool lost_resource);
@@ -206,7 +206,7 @@
 
   // This is a bitmap that was recently released by the compositor and may be
   // used to transfer bytes to the compositor again.
-  scoped_ptr<cc::SharedBitmap> cached_bitmap_;
+  std::unique_ptr<cc::SharedBitmap> cached_bitmap_;
   gfx::Size cached_bitmap_size_;
 
   friend class PepperGraphics2DHostTest;
diff --git a/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc b/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc
index 75cefbeb..a97c268 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc
+++ b/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc
@@ -72,7 +72,7 @@
   }
 
   void PaintToWebCanvas(SkBitmap* bitmap) {
-    scoped_ptr<WebCanvas> canvas(new WebCanvas(*bitmap));
+    std::unique_ptr<WebCanvas> canvas(new WebCanvas(*bitmap));
     gfx::Rect plugin_rect(PP_ToGfxRect(renderer_view_data_.rect));
     host_->Paint(canvas.get(),
                  plugin_rect,
@@ -92,7 +92,7 @@
 
  private:
   ppapi::ViewData renderer_view_data_;
-  scoped_ptr<PepperGraphics2DHost> host_;
+  std::unique_ptr<PepperGraphics2DHost> host_;
   base::MessageLoop message_loop_;
   MockRendererPpapiHost renderer_ppapi_host_;
   ppapi::TestGlobals test_globals_;
diff --git a/content/renderer/pepper/pepper_in_process_resource_creation.h b/content/renderer/pepper/pepper_in_process_resource_creation.h
index 520345c3..d094658 100644
--- a/content/renderer/pepper/pepper_in_process_resource_creation.h
+++ b/content/renderer/pepper/pepper_in_process_resource_creation.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_IN_PROCESS_RESOURCE_CREATION_H_
 #define CONTENT_RENDERER_PEPPER_PEPPER_IN_PROCESS_RESOURCE_CREATION_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/pepper/resource_creation_impl.h"
 #include "ppapi/proxy/connection.h"
 
diff --git a/content/renderer/pepper/pepper_in_process_router.cc b/content/renderer/pepper/pepper_in_process_router.cc
index 174602f..0ac1248 100644
--- a/content/renderer/pepper/pepper_in_process_router.cc
+++ b/content/renderer/pepper/pepper_in_process_router.cc
@@ -101,7 +101,7 @@
 }
 
 bool PepperInProcessRouter::SendToHost(IPC::Message* msg) {
-  scoped_ptr<IPC::Message> message(msg);
+  std::unique_ptr<IPC::Message> message(msg);
 
   if (!message->is_sync()) {
     // If this is a resource destroyed message, post a task to dispatch it.
@@ -137,7 +137,7 @@
 }
 
 bool PepperInProcessRouter::SendToPlugin(IPC::Message* msg) {
-  scoped_ptr<IPC::Message> message(msg);
+  std::unique_ptr<IPC::Message> message(msg);
   CHECK(!msg->is_sync());
   if (IPC::SyncMessage::IsMessageReplyTo(*message, pending_message_id_)) {
     if (!msg->is_reply_error())
diff --git a/content/renderer/pepper/pepper_in_process_router.h b/content/renderer/pepper/pepper_in_process_router.h
index 20e5b9a1..2a17b6f 100644
--- a/content/renderer/pepper/pepper_in_process_router.h
+++ b/content/renderer/pepper/pepper_in_process_router.h
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/proxy/connection.h"
@@ -78,19 +79,19 @@
   RendererPpapiHostImpl* host_impl_;
 
   class Channel;
-  scoped_ptr<Channel> browser_channel_;
+  std::unique_ptr<Channel> browser_channel_;
 
   // Renderer -> plugin channel.
-  scoped_ptr<Channel> host_to_plugin_router_;
+  std::unique_ptr<Channel> host_to_plugin_router_;
 
   // Plugin -> renderer channel.
-  scoped_ptr<Channel> plugin_to_host_router_;
+  std::unique_ptr<Channel> plugin_to_host_router_;
 
   // Pending sync message id.
   int pending_message_id_;
 
   // Reply deserializer of the pending sync message.
-  scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
+  std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
 
   // Reply result of the pending sync message.
   bool reply_result_;
diff --git a/content/renderer/pepper/pepper_media_stream_audio_track_host.h b/content/renderer/pepper/pepper_media_stream_audio_track_host.h
index c14cd3b..1528d7e4 100644
--- a/content/renderer/pepper/pepper_media_stream_audio_track_host.h
+++ b/content/renderer/pepper/pepper_media_stream_audio_track_host.h
@@ -8,10 +8,10 @@
 #include <stdint.h>
 
 #include <deque>
+#include <memory>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
diff --git a/content/renderer/pepper/pepper_media_stream_track_host_base.cc b/content/renderer/pepper/pepper_media_stream_track_host_base.cc
index 6bc9cd7..c2b8655f 100644
--- a/content/renderer/pepper/pepper_media_stream_track_host_base.cc
+++ b/content/renderer/pepper/pepper_media_stream_track_host_base.cc
@@ -52,7 +52,7 @@
     return false;
 
   content::RenderThread* render_thread = content::RenderThread::Get();
-  scoped_ptr<base::SharedMemory> shm(
+  std::unique_ptr<base::SharedMemory> shm(
       render_thread->HostAllocateSharedMemoryBuffer(size.ValueOrDie()));
   if (!shm)
     return false;
diff --git a/content/renderer/pepper/pepper_platform_audio_input.h b/content/renderer/pepper/pepper_platform_audio_input.h
index 33eb7fc9..829738c 100644
--- a/content/renderer/pepper/pepper_platform_audio_input.h
+++ b/content/renderer/pepper/pepper_platform_audio_input.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_
 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_
 
+#include <memory>
 #include <string>
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "media/audio/audio_input_ipc.h"
 #include "media/audio/audio_parameters.h"
@@ -101,7 +101,7 @@
 
   // Used to send/receive IPC. THIS MUST ONLY BE ACCESSED ON THE
   // I/O THREAD.
-  scoped_ptr<media::AudioInputIPC> ipc_;
+  std::unique_ptr<media::AudioInputIPC> ipc_;
 
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
diff --git a/content/renderer/pepper/pepper_platform_audio_output.h b/content/renderer/pepper/pepper_platform_audio_output.h
index a5bd3d9..03f4236c 100644
--- a/content/renderer/pepper/pepper_platform_audio_output.h
+++ b/content/renderer/pepper/pepper_platform_audio_output.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_H_
 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_H_
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "media/audio/audio_output_ipc.h"
 
 namespace media {
@@ -80,7 +81,7 @@
 
   // Used to send/receive IPC. THIS MUST ONLY BE ACCESSED ON THE
   // I/O thread except to send messages and get the message loop.
-  scoped_ptr<media::AudioOutputIPC> ipc_;
+  std::unique_ptr<media::AudioOutputIPC> ipc_;
 
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
diff --git a/content/renderer/pepper/pepper_platform_camera_device.h b/content/renderer/pepper/pepper_platform_camera_device.h
index 649fa2f7..472a1f2 100644
--- a/content/renderer/pepper/pepper_platform_camera_device.h
+++ b/content/renderer/pepper/pepper_platform_camera_device.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_
 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/media/video_capture.h"
diff --git a/content/renderer/pepper/pepper_platform_video_capture.h b/content/renderer/pepper/pepper_platform_video_capture.h
index b2e58ea..589cc77 100644
--- a/content/renderer/pepper/pepper_platform_video_capture.h
+++ b/content/renderer/pepper/pepper_platform_video_capture.h
@@ -5,12 +5,12 @@
 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_
 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 372b503..6894654d 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -303,9 +303,9 @@
 // Convert the given vector to an array of C-strings. The strings in the
 // returned vector are only guaranteed valid so long as the vector of strings
 // is not modified.
-scoped_ptr<const char* []> StringVectorToArgArray(
+std::unique_ptr<const char* []> StringVectorToArgArray(
     const std::vector<std::string>& vector) {
-  scoped_ptr<const char * []> array(new const char* [vector.size()]);
+  std::unique_ptr<const char* []> array(new const char*[vector.size()]);
   for (size_t i = 0; i < vector.size(); ++i)
     array[i] = vector[i].c_str();
   return array;
@@ -821,7 +821,7 @@
     const std::vector<std::string>& arg_names,
     const std::vector<std::string>& arg_values,
     bool full_frame,
-    scoped_ptr<PluginInstanceThrottlerImpl> throttler) {
+    std::unique_ptr<PluginInstanceThrottlerImpl> throttler) {
   DCHECK(!throttler_);
 
   if (!render_frame_)
@@ -846,8 +846,8 @@
 
   argn_ = arg_names;
   argv_ = arg_values;
-  scoped_ptr<const char * []> argn_array(StringVectorToArgArray(argn_));
-  scoped_ptr<const char * []> argv_array(StringVectorToArgArray(argv_));
+  std::unique_ptr<const char* []> argn_array(StringVectorToArgArray(argn_));
+  std::unique_ptr<const char* []> argv_array(StringVectorToArgArray(argv_));
   auto weak_this = weak_factory_.GetWeakPtr();
   bool success = PP_ToBool(instance_interface_->DidCreate(
       pp_instance(), argn_.size(), argn_array.get(), argv_array.get()));
@@ -908,7 +908,7 @@
   // PpapiHost now owns the pointer to loader_host, so we don't have to worry
   // about managing it.
   int pending_host_id = host_impl->GetPpapiHost()->AddPendingResourceHost(
-      scoped_ptr<ppapi::host::ResourceHost>(loader_host));
+      std::unique_ptr<ppapi::host::ResourceHost>(loader_host));
   DCHECK(pending_host_id);
 
   DataFromWebURLResponse(
@@ -1137,7 +1137,7 @@
         (input_event_mask_ & event_class)) {
       // Actually send the event.
       std::vector<ppapi::InputEventData> events;
-      scoped_ptr<const WebInputEvent> event_in_dip(
+      std::unique_ptr<const WebInputEvent> event_in_dip(
           ui::ScaleWebInputEvent(event, viewport_to_dip_scale_));
       if (event_in_dip)
         CreateInputEventData(*event_in_dip.get(), &events);
@@ -2074,7 +2074,7 @@
 
 bool PepperPluginInstanceImpl::PrepareTextureMailbox(
     cc::TextureMailbox* mailbox,
-    scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+    std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
     bool use_shared_memory) {
   if (!bound_graphics_2d_platform_)
     return false;
@@ -2151,10 +2151,12 @@
   if (handled)
     return;
 
-  std::vector<scoped_ptr<WebInputEvent>> events = CreateSimulatedWebInputEvents(
-      input_event, view_data_.rect.point.x + view_data_.rect.size.width / 2,
-      view_data_.rect.point.y + view_data_.rect.size.height / 2);
-  for (std::vector<scoped_ptr<WebInputEvent>>::iterator it = events.begin();
+  std::vector<std::unique_ptr<WebInputEvent>> events =
+      CreateSimulatedWebInputEvents(
+          input_event, view_data_.rect.point.x + view_data_.rect.size.width / 2,
+          view_data_.rect.point.y + view_data_.rect.size.height / 2);
+  for (std::vector<std::unique_ptr<WebInputEvent>>::iterator it =
+           events.begin();
        it != events.end(); ++it) {
     web_view->handleInputEvent(*it->get());
   }
@@ -2704,7 +2706,7 @@
   if (!auto_mapper.is_valid())
     return PP_FALSE;
 
-  scoped_ptr<WebCursorInfo> custom_cursor(
+  std::unique_ptr<WebCursorInfo> custom_cursor(
       new WebCursorInfo(WebCursorInfo::TypeCustom));
   custom_cursor->hotSpot.x = hot_spot->x;
   custom_cursor->hotSpot.y = hot_spot->y;
@@ -2920,8 +2922,8 @@
   plugin_textinput_interface_ = NULL;
 
   // Re-send the DidCreate event via the proxy.
-  scoped_ptr<const char * []> argn_array(StringVectorToArgArray(argn_));
-  scoped_ptr<const char * []> argv_array(StringVectorToArgArray(argv_));
+  std::unique_ptr<const char* []> argn_array(StringVectorToArgArray(argn_));
+  std::unique_ptr<const char* []> argv_array(StringVectorToArgArray(argv_));
   if (!instance_interface_->DidCreate(
           pp_instance(), argn_.size(), argn_array.get(), argv_array.get()))
     return PP_EXTERNAL_PLUGIN_ERROR_INSTANCE;
@@ -3160,7 +3162,7 @@
   PepperFileRefRendererHost* file_ref_host(
       new PepperFileRefRendererHost(host_impl, pp_instance(), 0, path));
   return host_impl->GetPpapiHost()->AddPendingResourceHost(
-      scoped_ptr<ppapi::host::ResourceHost>(file_ref_host));
+      std::unique_ptr<ppapi::host::ResourceHost>(file_ref_host));
 }
 
 void PepperPluginInstanceImpl::SetEmbedProperty(PP_Var key, PP_Var value) {
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index db95d8e..edc5dd2 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -9,6 +9,7 @@
 #include <stdint.h>
 
 #include <list>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -17,7 +18,6 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 #include "build/build_config.h"
@@ -212,7 +212,7 @@
   bool Initialize(const std::vector<std::string>& arg_names,
                   const std::vector<std::string>& arg_values,
                   bool full_frame,
-                  scoped_ptr<PluginInstanceThrottlerImpl> throttler);
+                  std::unique_ptr<PluginInstanceThrottlerImpl> throttler);
   bool HandleDocumentLoad(const blink::WebURLResponse& response);
   bool HandleInputEvent(const blink::WebInputEvent& event,
                         blink::WebCursorInfo* cursor_info);
@@ -535,7 +535,7 @@
   // cc::TextureLayerClient implementation.
   bool PrepareTextureMailbox(
       cc::TextureMailbox* mailbox,
-      scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+      std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
       bool use_shared_memory) override;
 
   // RenderFrameObserver
@@ -576,7 +576,7 @@
    private:
     std::list<std::string> data_;
     bool finished_loading_;
-    scoped_ptr<blink::WebURLError> error_;
+    std::unique_ptr<blink::WebURLError> error_;
   };
 
   // Implements PPB_Gamepad_API. This is just to avoid having an excessive
@@ -702,12 +702,12 @@
   RenderFrameImpl* render_frame_;
   base::Closure instance_deleted_callback_;
   scoped_refptr<PluginModule> module_;
-  scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_;
+  std::unique_ptr<ppapi::PPP_Instance_Combined> instance_interface_;
   // If this is the NaCl plugin, we create a new module when we switch to the
   // IPC-based PPAPI proxy. Store the original module and instance interface
   // so we can shut down properly.
   scoped_refptr<PluginModule> original_module_;
-  scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_;
+  std::unique_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_;
 
   PP_Instance pp_instance_;
 
@@ -715,7 +715,7 @@
   blink::WebPluginContainer* container_;
   scoped_refptr<cc::Layer> compositor_layer_;
   scoped_refptr<cc::TextureLayer> texture_layer_;
-  scoped_ptr<blink::WebLayer> web_layer_;
+  std::unique_ptr<blink::WebLayer> web_layer_;
   bool layer_bound_to_fullscreen_;
   bool layer_is_hardware_;
 
@@ -734,7 +734,7 @@
   bool javascript_used_;
 
   // Responsible for turning on throttling if Power Saver is on.
-  scoped_ptr<PluginInstanceThrottlerImpl> throttler_;
+  std::unique_ptr<PluginInstanceThrottlerImpl> throttler_;
 
   // Indicates whether this is a full frame instance, which means it represents
   // an entire document rather than an embed tag.
@@ -771,7 +771,7 @@
   int find_identifier_;
 
   // Helper object that creates resources.
-  scoped_ptr<ppapi::thunk::ResourceCreationAPI> resource_creation_;
+  std::unique_ptr<ppapi::thunk::ResourceCreationAPI> resource_creation_;
 
   // The plugin-provided interfaces.
   // When adding PPP interfaces, make sure to reset them in ResetAsProxied.
@@ -820,7 +820,7 @@
   const PPP_Graphics3D* plugin_graphics_3d_interface_;
 
   // Contains the cursor if it's set by the plugin.
-  scoped_ptr<blink::WebCursorInfo> cursor_;
+  std::unique_ptr<blink::WebCursorInfo> cursor_;
 
   // Set to true if this plugin thinks it will always be on top. This allows us
   // to use a more optimized painting path in some cases.
@@ -905,12 +905,12 @@
   blink::WebURLLoaderClient* document_loader_;
   // State for deferring document loads. Used only by external instances.
   blink::WebURLResponse external_document_response_;
-  scoped_ptr<ExternalDocumentLoader> external_document_loader_;
+  std::unique_ptr<ExternalDocumentLoader> external_document_loader_;
   bool external_document_load_;
 
   // The ContentDecryptorDelegate forwards PPP_ContentDecryptor_Private
   // calls and handles PPB_ContentDecryptor_Private calls.
-  scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_;
+  std::unique_ptr<ContentDecryptorDelegate> content_decryptor_delegate_;
 
   // The link currently under the cursor.
   base::string16 link_under_cursor_;
@@ -919,7 +919,7 @@
   // Isolate in which this Instance was created when interacting with v8.
   v8::Isolate* isolate_;
 
-  scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_;
+  std::unique_ptr<MouseLockDispatcher::LockTarget> lock_target_;
 
   bool is_deleted_;
 
diff --git a/content/renderer/pepper/pepper_url_loader_host.cc b/content/renderer/pepper/pepper_url_loader_host.cc
index 53bc313..e3629b31 100644
--- a/content/renderer/pepper/pepper_url_loader_host.cc
+++ b/content/renderer/pepper/pepper_url_loader_host.cc
@@ -100,7 +100,7 @@
   // re-entering the scoped_ptr destructor with the same scoped_ptr object
   // via loader_.reset(). Be sure that loader_ is first NULL then destroy
   // the scoped_ptr. See http://crbug.com/159429.
-  scoped_ptr<blink::WebURLLoader> for_destruction_only(loader_.release());
+  std::unique_ptr<blink::WebURLLoader> for_destruction_only(loader_.release());
 }
 
 int32_t PepperURLLoaderHost::OnResourceMessageReceived(
diff --git a/content/renderer/pepper/pepper_url_loader_host.h b/content/renderer/pepper/pepper_url_loader_host.h
index 8f820e10..96a61d6 100644
--- a/content/renderer/pepper/pepper_url_loader_host.h
+++ b/content/renderer/pepper/pepper_url_loader_host.h
@@ -132,7 +132,7 @@
   // always NULL check this value before using it. In the case of a main
   // document load, you would call the functions on the document to cancel the
   // load, etc. since there is no loader.
-  scoped_ptr<blink::WebURLLoader> loader_;
+  std::unique_ptr<blink::WebURLLoader> loader_;
 
   int64_t bytes_sent_;
   int64_t total_bytes_to_be_sent_;
diff --git a/content/renderer/pepper/pepper_video_capture_host.h b/content/renderer/pepper/pepper_video_capture_host.h
index 5a2dead..2bb981f 100644
--- a/content/renderer/pepper/pepper_video_capture_host.h
+++ b/content/renderer/pepper/pepper_video_capture_host.h
@@ -8,10 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/media/video_capture.h"
 #include "content/public/renderer/renderer_ppapi_host.h"
 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h"
@@ -90,7 +91,7 @@
 
   bool SetStatus(PP_VideoCaptureStatus_Dev status, bool forced);
 
-  scoped_ptr<PepperPlatformVideoCapture> platform_video_capture_;
+  std::unique_ptr<PepperPlatformVideoCapture> platform_video_capture_;
 
   // Buffers of video frame.
   struct BufferInfo {
diff --git a/content/renderer/pepper/pepper_video_decoder_host.cc b/content/renderer/pepper/pepper_video_decoder_host.cc
index 8016b9e..d9b15e6 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.cc
+++ b/content/renderer/pepper/pepper_video_decoder_host.cc
@@ -196,7 +196,7 @@
     return PP_ERROR_FAILED;
 
   content::RenderThread* render_thread = content::RenderThread::Get();
-  scoped_ptr<base::SharedMemory> shm(
+  std::unique_ptr<base::SharedMemory> shm(
       render_thread->HostAllocateSharedMemoryBuffer(shm_size));
   if (!shm || !shm->Map(shm_size))
     return PP_ERROR_FAILED;
@@ -481,7 +481,7 @@
   uint32_t shim_texture_pool_size = media::limits::kMaxVideoFrames + 1;
   shim_texture_pool_size = std::max(shim_texture_pool_size,
                                     min_picture_count_);
-  scoped_ptr<VideoDecoderShim> new_decoder(
+  std::unique_ptr<VideoDecoderShim> new_decoder(
       new VideoDecoderShim(this, shim_texture_pool_size));
   if (!new_decoder->Initialize(profile_, this))
     return false;
diff --git a/content/renderer/pepper/pepper_video_decoder_host.h b/content/renderer/pepper/pepper_video_decoder_host.h
index f8b4534a..308ba447 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.h
+++ b/content/renderer/pepper/pepper_video_decoder_host.h
@@ -9,12 +9,12 @@
 
 #include <list>
 #include <map>
+#include <memory>
 #include <set>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "content/common/content_export.h"
 #include "media/video/video_decode_accelerator.h"
@@ -121,7 +121,7 @@
 
   media::VideoCodecProfile profile_;
 
-  scoped_ptr<media::VideoDecodeAccelerator> decoder_;
+  std::unique_ptr<media::VideoDecodeAccelerator> decoder_;
 
   bool software_fallback_allowed_ = false;
   bool software_fallback_used_ = false;
diff --git a/content/renderer/pepper/pepper_video_destination_host.h b/content/renderer/pepper/pepper_video_destination_host.h
index 75208a7f..9f9f8a0 100644
--- a/content/renderer/pepper/pepper_video_destination_host.h
+++ b/content/renderer/pepper/pepper_video_destination_host.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "content/renderer/media/pepper_to_video_track_adapter.h"
@@ -41,7 +42,7 @@
                             PP_TimeTicks timestamp);
   int32_t OnHostMsgClose(ppapi::host::HostMessageContext* context);
 
-  scoped_ptr<FrameWriterInterface> frame_writer_;
+  std::unique_ptr<FrameWriterInterface> frame_writer_;
   // Used for checking that timestamps are strictly increasing.
 #if DCHECK_IS_ON()
   bool has_received_frame_;
diff --git a/content/renderer/pepper/pepper_video_encoder_host.cc b/content/renderer/pepper/pepper_video_encoder_host.cc
index afdc33d..6444aeb0 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.cc
+++ b/content/renderer/pepper/pepper_video_encoder_host.cc
@@ -176,8 +176,9 @@
 
 }  // namespace
 
-PepperVideoEncoderHost::ShmBuffer::ShmBuffer(uint32_t id,
-                                             scoped_ptr<base::SharedMemory> shm)
+PepperVideoEncoderHost::ShmBuffer::ShmBuffer(
+    uint32_t id,
+    std::unique_ptr<base::SharedMemory> shm)
     : id(id), shm(std::move(shm)), in_use(true) {
   DCHECK(this->shm);
 }
@@ -377,7 +378,7 @@
   frame_count_ = frame_count;
 
   for (uint32_t i = 0; i < kDefaultNumberOfBitstreamBuffers; ++i) {
-    scoped_ptr<base::SharedMemory> shm(
+    std::unique_ptr<base::SharedMemory> shm(
         RenderThread::Get()->HostAllocateSharedMemoryBuffer(
             output_buffer_size));
 
@@ -575,7 +576,7 @@
   size *= frame_count_;
   uint32_t total_size = size.ValueOrDie();
 
-  scoped_ptr<base::SharedMemory> shm(
+  std::unique_ptr<base::SharedMemory> shm(
       RenderThreadImpl::current()->HostAllocateSharedMemoryBuffer(total_size));
   if (!shm ||
       !buffer_manager_.SetBuffers(frame_count_, buffer_size_aligned,
diff --git a/content/renderer/pepper/pepper_video_encoder_host.h b/content/renderer/pepper/pepper_video_encoder_host.h
index d6a47d8..56437680 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.h
+++ b/content/renderer/pepper/pepper_video_encoder_host.h
@@ -8,9 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "content/common/content_export.h"
 #include "media/video/video_encode_accelerator.h"
@@ -50,7 +51,7 @@
 
   // Shared memory buffers.
   struct ShmBuffer {
-    ShmBuffer(uint32_t id, scoped_ptr<base::SharedMemory> shm);
+    ShmBuffer(uint32_t id, std::unique_ptr<base::SharedMemory> shm);
     ~ShmBuffer();
 
     media::BitstreamBuffer ToBitstreamBuffer();
@@ -58,7 +59,7 @@
     // Index of the buffer in the ScopedVector. Buffers have the same id in
     // the plugin and the host.
     uint32_t id;
-    scoped_ptr<base::SharedMemory> shm;
+    std::unique_ptr<base::SharedMemory> shm;
     bool in_use;
   };
 
@@ -130,9 +131,9 @@
   ppapi::MediaStreamBufferManager buffer_manager_;
 
   scoped_refptr<gpu::GpuChannelHost> channel_;
-  scoped_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
+  std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
 
-  scoped_ptr<media::VideoEncodeAccelerator> encoder_;
+  std::unique_ptr<media::VideoEncodeAccelerator> encoder_;
 
   // Whether the encoder has been successfully initialized.
   bool initialized_;
diff --git a/content/renderer/pepper/pepper_video_source_host.h b/content/renderer/pepper/pepper_video_source_host.h
index 0b5b0a1..811a4616 100644
--- a/content/renderer/pepper/pepper_video_source_host.h
+++ b/content/renderer/pepper/pepper_video_source_host.h
@@ -7,10 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
@@ -63,7 +64,7 @@
 
   ppapi::host::ReplyMessageContext reply_context_;
 
-  scoped_ptr<VideoTrackToPepperAdapter> frame_source_;
+  std::unique_ptr<VideoTrackToPepperAdapter> frame_source_;
   scoped_refptr<FrameReceiver> frame_receiver_;
   std::string stream_url_;
   scoped_refptr<media::VideoFrame> last_frame_;
diff --git a/content/renderer/pepper/pepper_webplugin_impl.cc b/content/renderer/pepper/pepper_webplugin_impl.cc
index 45bf64fc..8138203 100644
--- a/content/renderer/pepper/pepper_webplugin_impl.cc
+++ b/content/renderer/pepper/pepper_webplugin_impl.cc
@@ -60,7 +60,7 @@
     PluginModule* plugin_module,
     const WebPluginParams& params,
     RenderFrameImpl* render_frame,
-    scoped_ptr<PluginInstanceThrottlerImpl> throttler)
+    std::unique_ptr<PluginInstanceThrottlerImpl> throttler)
     : init_data_(new InitData()),
       full_frame_(params.loadManually),
       throttler_(std::move(throttler)),
diff --git a/content/renderer/pepper/pepper_webplugin_impl.h b/content/renderer/pepper/pepper_webplugin_impl.h
index 3ec6ea2..49a0832 100644
--- a/content/renderer/pepper/pepper_webplugin_impl.h
+++ b/content/renderer/pepper/pepper_webplugin_impl.h
@@ -5,11 +5,11 @@
 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_
 #define CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "ppapi/c/pp_var.h"
@@ -36,7 +36,7 @@
   PepperWebPluginImpl(PluginModule* module,
                       const blink::WebPluginParams& params,
                       RenderFrameImpl* render_frame,
-                      scoped_ptr<PluginInstanceThrottlerImpl> throttler);
+                      std::unique_ptr<PluginInstanceThrottlerImpl> throttler);
 
   PepperPluginInstanceImpl* instance() { return instance_.get(); }
 
@@ -89,11 +89,12 @@
   virtual ~PepperWebPluginImpl();
   struct InitData;
 
-  scoped_ptr<InitData> init_data_;  // Cleared upon successful initialization.
+  std::unique_ptr<InitData>
+      init_data_;  // Cleared upon successful initialization.
   // True if the instance represents the entire document in a frame instead of
   // being an embedded resource.
   bool full_frame_;
-  scoped_ptr<PluginInstanceThrottlerImpl> throttler_;
+  std::unique_ptr<PluginInstanceThrottlerImpl> throttler_;
   scoped_refptr<PepperPluginInstanceImpl> instance_;
   gfx::Rect plugin_rect_;
   PP_Var instance_object_;
diff --git a/content/renderer/pepper/pepper_webplugin_impl_browsertest.cc b/content/renderer/pepper/pepper_webplugin_impl_browsertest.cc
index 42839b56..7a08ef92 100644
--- a/content/renderer/pepper/pepper_webplugin_impl_browsertest.cc
+++ b/content/renderer/pepper/pepper_webplugin_impl_browsertest.cc
@@ -2,16 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/pepper/pepper_webplugin_impl.h"
+
 #include <stdint.h>
 
 #include "base/command_line.h"
+#include "base/memory/ptr_util.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_constants.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/pepper_plugin_info.h"
 #include "content/public/renderer/content_renderer_client.h"
 #include "content/public/test/render_view_test.h"
-#include "content/renderer/pepper/pepper_webplugin_impl.h"
 #include "content/renderer/pepper/plugin_instance_throttler_impl.h"
 #include "content/renderer/pepper/plugin_module.h"
 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
@@ -169,9 +171,9 @@
                               blink::WebPlugin** plugin) override {
       current_test_->throttler_ = new PluginInstanceThrottlerImpl;
       current_test_->throttler_->AddObserver(current_test_);
-      *plugin = render_frame->CreatePlugin(frame,
-          GetPluginInfo().ToWebPluginInfo(), params,
-          make_scoped_ptr(current_test_->throttler_));
+      *plugin = render_frame->CreatePlugin(
+          frame, GetPluginInfo().ToWebPluginInfo(), params,
+          base::WrapUnique(current_test_->throttler_));
       return *plugin;
     }
   };
diff --git a/content/renderer/pepper/pepper_websocket_host.h b/content/renderer/pepper/pepper_websocket_host.h
index baac2427..7c07c2a 100644
--- a/content/renderer/pepper/pepper_websocket_host.h
+++ b/content/renderer/pepper/pepper_websocket_host.h
@@ -7,11 +7,11 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <queue>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "ppapi/host/host_message_context.h"
 #include "ppapi/host/resource_host.h"
@@ -93,7 +93,7 @@
 
   // Keeps the WebKit side WebSocket object. This is used for calling WebKit
   // side functions via WebKit API.
-  scoped_ptr<blink::WebPepperSocket> websocket_;
+  std::unique_ptr<blink::WebPepperSocket> websocket_;
 
   DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost);
 };
diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.cc b/content/renderer/pepper/plugin_instance_throttler_impl.cc
index 009e7d5..10c7f50 100644
--- a/content/renderer/pepper/plugin_instance_throttler_impl.cc
+++ b/content/renderer/pepper/plugin_instance_throttler_impl.cc
@@ -4,6 +4,7 @@
 
 #include "content/renderer/pepper/plugin_instance_throttler_impl.h"
 
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/time/time.h"
 #include "content/public/common/content_constants.h"
@@ -40,8 +41,8 @@
 const int PluginInstanceThrottlerImpl::kMaximumFramesToExamine = 150;
 
 // static
-scoped_ptr<PluginInstanceThrottler> PluginInstanceThrottler::Create() {
-  return make_scoped_ptr(new PluginInstanceThrottlerImpl);
+std::unique_ptr<PluginInstanceThrottler> PluginInstanceThrottler::Create() {
+  return base::WrapUnique(new PluginInstanceThrottlerImpl);
 }
 
 // static
diff --git a/content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc b/content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc
index 57c45635..48a9bb61 100644
--- a/content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc
+++ b/content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc
@@ -2,14 +2,16 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "content/renderer/pepper/plugin_instance_throttler_impl.h"
+
+#include <memory>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/renderer/render_frame.h"
-#include "content/renderer/pepper/plugin_instance_throttler_impl.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -72,7 +74,7 @@
   // PluginInstanceThrottlerImpl::Observer
   void OnThrottleStateChange() override { ++change_callback_calls_; }
 
-  scoped_ptr<PluginInstanceThrottlerImpl> throttler_;
+  std::unique_ptr<PluginInstanceThrottlerImpl> throttler_;
 
   int change_callback_calls_;
 
diff --git a/content/renderer/pepper/plugin_module.cc b/content/renderer/pepper/plugin_module.cc
index a1bb699..428371e0 100644
--- a/content/renderer/pepper/plugin_module.cc
+++ b/content/renderer/pepper/plugin_module.cc
@@ -7,13 +7,14 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
+
+#include <memory>
 #include <set>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -552,7 +553,7 @@
 }
 
 void PluginModule::SetRendererPpapiHost(
-    scoped_ptr<RendererPpapiHostImpl> host) {
+    std::unique_ptr<RendererPpapiHostImpl> host) {
   renderer_ppapi_host_ = std::move(host);
 }
 
@@ -721,7 +722,7 @@
     bool is_external) {
   scoped_refptr<PepperHungPluginFilter> hung_filter(new PepperHungPluginFilter(
       path, render_frame->GetRoutingID(), plugin_child_id));
-  scoped_ptr<HostDispatcherWrapper> dispatcher(new HostDispatcherWrapper(
+  std::unique_ptr<HostDispatcherWrapper> dispatcher(new HostDispatcherWrapper(
       this, peer_pid, plugin_child_id, permissions, is_external));
   if (!dispatcher->Init(channel_handle,
                         &GetInterface,
diff --git a/content/renderer/pepper/plugin_module.h b/content/renderer/pepper/plugin_module.h
index 807a93a..53640f2 100644
--- a/content/renderer/pepper/plugin_module.h
+++ b/content/renderer/pepper/plugin_module.h
@@ -6,13 +6,13 @@
 #define CONTENT_RENDERER_PEPPER_PLUGIN_MODULE_H_
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/native_library.h"
 #include "base/process/process.h"
@@ -77,7 +77,7 @@
   // Sets the given class as being associated with this module. It will be
   // deleted when the module is destroyed. You can only set it once, subsequent
   // sets will assert.
-  void SetRendererPpapiHost(scoped_ptr<RendererPpapiHostImpl> host);
+  void SetRendererPpapiHost(std::unique_ptr<RendererPpapiHostImpl> host);
 
   // Initializes this module as an internal plugin with the given entrypoints.
   // This is used for "plugins" compiled into Chrome. Returns true on success.
@@ -223,7 +223,7 @@
   // entrypoints in that case).
   bool InitializeModule(const PepperPluginInfo::EntryPoints& entry_points);
 
-  scoped_ptr<RendererPpapiHostImpl> renderer_ppapi_host_;
+  std::unique_ptr<RendererPpapiHostImpl> renderer_ppapi_host_;
 
   // Tracker for completion callbacks, used mainly to ensure that all callbacks
   // are properly aborted on module shutdown.
@@ -241,7 +241,7 @@
   // Manages the out of process proxy interface. The presence of this
   // pointer indicates that the plugin is running out of process and that the
   // entry_points_ aren't valid.
-  scoped_ptr<HostDispatcherWrapper> host_dispatcher_wrapper_;
+  std::unique_ptr<HostDispatcherWrapper> host_dispatcher_wrapper_;
 
   // Non-owning pointer to the broker for this plugin module, if one exists.
   // It is populated and cleared in the main thread.
diff --git a/content/renderer/pepper/plugin_object.cc b/content/renderer/pepper/plugin_object.cc
index cb5ff6a..1cc915a 100644
--- a/content/renderer/pepper/plugin_object.cc
+++ b/content/renderer/pepper/plugin_object.cc
@@ -6,10 +6,11 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
diff --git a/content/renderer/pepper/ppb_buffer_impl.cc b/content/renderer/pepper/ppb_buffer_impl.cc
index 12bbbea..5bec0da 100644
--- a/content/renderer/pepper/ppb_buffer_impl.cc
+++ b/content/renderer/pepper/ppb_buffer_impl.cc
@@ -5,9 +5,9 @@
 #include "content/renderer/pepper/ppb_buffer_impl.h"
 
 #include <algorithm>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/pepper_file_util.h"
 #include "content/renderer/render_thread_impl.h"
 #include "ppapi/c/dev/ppb_buffer_dev.h"
diff --git a/content/renderer/pepper/ppb_buffer_impl.h b/content/renderer/pepper/ppb_buffer_impl.h
index a98deb7f..b0e7f16 100644
--- a/content/renderer/pepper/ppb_buffer_impl.h
+++ b/content/renderer/pepper/ppb_buffer_impl.h
@@ -7,9 +7,10 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "ppapi/shared_impl/resource.h"
 #include "ppapi/thunk/ppb_buffer_api.h"
@@ -46,7 +47,7 @@
   explicit PPB_Buffer_Impl(PP_Instance instance);
   bool Init(uint32_t size);
 
-  scoped_ptr<base::SharedMemory> shared_memory_;
+  std::unique_ptr<base::SharedMemory> shared_memory_;
   uint32_t size_;
   int map_count_;
 
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h
index 6dd3462..86cf09c 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.h
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.h
@@ -97,7 +97,7 @@
   gpu::SyncToken sync_token_;
   bool has_alpha_;
   scoped_refptr<gpu::GpuChannelHost> channel_;
-  scoped_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
+  std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
 
   base::WeakPtrFactory<PPB_Graphics3D_Impl> weak_ptr_factory_;
 
diff --git a/content/renderer/pepper/ppb_image_data_impl.cc b/content/renderer/pepper/ppb_image_data_impl.cc
index 4756cfd..dd3ed85 100644
--- a/content/renderer/pepper/ppb_image_data_impl.cc
+++ b/content/renderer/pepper/ppb_image_data_impl.cc
@@ -6,9 +6,9 @@
 
 #include <algorithm>
 #include <limits>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/pepper_file_util.h"
 #include "content/common/view_messages.h"
 #include "content/renderer/render_thread_impl.h"
@@ -144,7 +144,7 @@
   width_ = width;
   height_ = height;
   uint32_t buffer_size = width_ * height_ * 4;
-  scoped_ptr<base::SharedMemory> shared_memory =
+  std::unique_ptr<base::SharedMemory> shared_memory =
       RenderThread::Get()->HostAllocateSharedMemoryBuffer(buffer_size);
   if (!shared_memory)
     return false;
diff --git a/content/renderer/pepper/ppb_image_data_impl.h b/content/renderer/pepper/ppb_image_data_impl.h
index 13a1e0c..632582053 100644
--- a/content/renderer/pepper/ppb_image_data_impl.h
+++ b/content/renderer/pepper/ppb_image_data_impl.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "content/common/content_export.h"
 #include "ppapi/c/ppb_image_data.h"
@@ -108,7 +109,7 @@
   PP_ImageDataFormat format_;
   int width_;
   int height_;
-  scoped_ptr<Backend> backend_;
+  std::unique_ptr<Backend> backend_;
 
   DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Impl);
 };
@@ -141,7 +142,7 @@
   // swapped with another.
   int width_;
   int height_;
-  scoped_ptr<TransportDIB> dib_;
+  std::unique_ptr<TransportDIB> dib_;
 
   // When the device is mapped, this is the image. Null when umapped.
   sk_sp<SkCanvas> mapped_canvas_;
@@ -171,7 +172,7 @@
   const SkBitmap* GetMappedBitmap() const override;
 
  private:
-  scoped_ptr<base::SharedMemory> shared_memory_;
+  std::unique_ptr<base::SharedMemory> shared_memory_;
   // skia_bitmap_ is backed by shared_memory_.
   SkBitmap skia_bitmap_;
   sk_sp<SkCanvas> skia_canvas_;
diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc
index 7426ca4..fcf9a92 100644
--- a/content/renderer/pepper/ppb_var_deprecated_impl.cc
+++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc
@@ -75,7 +75,7 @@
  private:
   V8ObjectVar* object_var_;
   PepperPluginInstanceImpl* instance_;
-  scoped_ptr<V8VarConverter> converter_;
+  std::unique_ptr<V8VarConverter> converter_;
 };
 
 bool IsValidIdentifer(PP_Var identifier, PP_Var* exception) {
@@ -253,7 +253,7 @@
     return PP_MakeUndefined();
   }
 
-  scoped_ptr<v8::Local<v8::Value>[] > converted_args(
+  std::unique_ptr<v8::Local<v8::Value>[]> converted_args(
       new v8::Local<v8::Value>[argc]);
   for (uint32_t i = 0; i < argc; ++i) {
     converted_args[i] = try_catch.ToV8(argv[i]);
diff --git a/content/renderer/pepper/ppb_video_decoder_impl.h b/content/renderer/pepper/ppb_video_decoder_impl.h
index ad64e3704..c0597a2 100644
--- a/content/renderer/pepper/ppb_video_decoder_impl.h
+++ b/content/renderer/pepper/ppb_video_decoder_impl.h
@@ -70,7 +70,7 @@
 
   // This is NULL before initialization, and after destruction.
   // Holds a GpuVideoDecodeAcceleratorHost.
-  scoped_ptr<media::VideoDecodeAccelerator> decoder_;
+  std::unique_ptr<media::VideoDecodeAccelerator> decoder_;
 
   // The interface to use when making calls on the plugin. For the most part,
   // methods should not use this directly but should call GetPPP() instead.
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc
index ff8e819..e694406 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc
@@ -48,7 +48,7 @@
       is_external_plugin_host_(false) {
   // Hook the PpapiHost up to the dispatcher for out-of-process communication.
   ppapi_host_.reset(new ppapi::host::PpapiHost(dispatcher, permissions));
-  ppapi_host_->AddHostFactoryFilter(scoped_ptr<ppapi::host::HostFactory>(
+  ppapi_host_->AddHostFactoryFilter(std::unique_ptr<ppapi::host::HostFactory>(
       new ContentRendererPepperHostFactory(this)));
   dispatcher->AddFilter(ppapi_host_.get());
   is_running_in_process_ = false;
@@ -63,7 +63,7 @@
   in_process_router_.reset(new PepperInProcessRouter(this));
   ppapi_host_.reset(new ppapi::host::PpapiHost(
       in_process_router_->GetRendererToPluginSender(), permissions));
-  ppapi_host_->AddHostFactoryFilter(scoped_ptr<ppapi::host::HostFactory>(
+  ppapi_host_->AddHostFactoryFilter(std::unique_ptr<ppapi::host::HostFactory>(
       new ContentRendererPepperHostFactory(this)));
   is_running_in_process_ = true;
 }
@@ -85,7 +85,7 @@
       new RendererPpapiHostImpl(module, dispatcher, permissions);
 
   // Takes ownership of pointer.
-  module->SetRendererPpapiHost(scoped_ptr<RendererPpapiHostImpl>(result));
+  module->SetRendererPpapiHost(std::unique_ptr<RendererPpapiHostImpl>(result));
 
   return result;
 }
@@ -99,7 +99,7 @@
       new RendererPpapiHostImpl(module, permissions);
 
   // Takes ownership of pointer.
-  module->SetRendererPpapiHost(scoped_ptr<RendererPpapiHostImpl>(result));
+  module->SetRendererPpapiHost(std::unique_ptr<RendererPpapiHostImpl>(result));
 
   return result;
 }
@@ -117,10 +117,10 @@
   return instance->module()->renderer_ppapi_host();
 }
 
-scoped_ptr<ppapi::thunk::ResourceCreationAPI>
+std::unique_ptr<ppapi::thunk::ResourceCreationAPI>
 RendererPpapiHostImpl::CreateInProcessResourceCreationAPI(
     PepperPluginInstanceImpl* instance) {
-  return scoped_ptr<ppapi::thunk::ResourceCreationAPI>(
+  return std::unique_ptr<ppapi::thunk::ResourceCreationAPI>(
       new PepperInProcessResourceCreation(this, instance));
 }
 
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.h b/content/renderer/pepper/renderer_ppapi_host_impl.h
index f73100b..8cb6a5d8 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.h
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.h
@@ -5,8 +5,9 @@
 #ifndef CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_
 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/renderer_ppapi_host.h"
 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
 #include "ppapi/host/ppapi_host.h"
@@ -68,8 +69,8 @@
   // host impl should outlive the returned pointer. Since the resource
   // creation object is associated with the instance, this will generally
   // happen automatically.
-  scoped_ptr<ppapi::thunk::ResourceCreationAPI>
-      CreateInProcessResourceCreationAPI(PepperPluginInstanceImpl* instance);
+  std::unique_ptr<ppapi::thunk::ResourceCreationAPI>
+  CreateInProcessResourceCreationAPI(PepperPluginInstanceImpl* instance);
 
   PepperPluginInstanceImpl* GetPluginInstanceImpl(PP_Instance instance) const;
 
@@ -124,10 +125,10 @@
   // Will be null when running in-process. Non-owning pointer.
   ppapi::proxy::HostDispatcher* dispatcher_;
 
-  scoped_ptr<ppapi::host::PpapiHost> ppapi_host_;
+  std::unique_ptr<ppapi::host::PpapiHost> ppapi_host_;
 
   // Null when running out-of-process.
-  scoped_ptr<PepperInProcessRouter> in_process_router_;
+  std::unique_ptr<PepperInProcessRouter> in_process_router_;
 
   // Whether the plugin is running in process.
   bool is_running_in_process_;
diff --git a/content/renderer/pepper/resource_converter.cc b/content/renderer/pepper/resource_converter.cc
index 741e6c62..45687c3 100644
--- a/content/renderer/pepper/resource_converter.cc
+++ b/content/renderer/pepper/resource_converter.cc
@@ -91,8 +91,8 @@
     RendererPpapiHost* host,
     const blink::WebDOMFileSystem& dom_file_system,
     int* pending_renderer_id,
-    scoped_ptr<IPC::Message>* create_message,
-    scoped_ptr<IPC::Message>* browser_host_create_message) {
+    std::unique_ptr<IPC::Message>* create_message,
+    std::unique_ptr<IPC::Message>* browser_host_create_message) {
   DCHECK(!dom_file_system.isNull());
 
   PP_FileSystemType file_system_type =
@@ -108,7 +108,7 @@
   }
 
   *pending_renderer_id = host->GetPpapiHost()->AddPendingResourceHost(
-      scoped_ptr<ppapi::host::ResourceHost>(new PepperFileSystemHost(
+      std::unique_ptr<ppapi::host::ResourceHost>(new PepperFileSystemHost(
           host, instance, 0, root_url, file_system_type)));
   if (*pending_renderer_id == 0)
     return false;
@@ -163,7 +163,7 @@
     RendererPpapiHost* host,
     const blink::WebDOMMediaStreamTrack& dom_media_stream_track,
     int* pending_renderer_id,
-    scoped_ptr<IPC::Message>* create_message) {
+    std::unique_ptr<IPC::Message>* create_message) {
   DCHECK(!dom_media_stream_track.isNull());
   *pending_renderer_id = 0;
 #if defined(ENABLE_WEBRTC)
@@ -172,7 +172,7 @@
 
   if (track.source().getType() == blink::WebMediaStreamSource::TypeVideo) {
     *pending_renderer_id = host->GetPpapiHost()->AddPendingResourceHost(
-        scoped_ptr<ppapi::host::ResourceHost>(
+        std::unique_ptr<ppapi::host::ResourceHost>(
             new PepperMediaStreamVideoTrackHost(host, instance, 0, track)));
     if (*pending_renderer_id == 0)
       return false;
@@ -183,7 +183,7 @@
   } else if (track.source().getType() ==
              blink::WebMediaStreamSource::TypeAudio) {
     *pending_renderer_id = host->GetPpapiHost()->AddPendingResourceHost(
-        scoped_ptr<ppapi::host::ResourceHost>(
+        std::unique_ptr<ppapi::host::ResourceHost>(
             new PepperMediaStreamAudioTrackHost(host, instance, 0, track)));
     if (*pending_renderer_id == 0)
       return false;
@@ -223,8 +223,8 @@
       blink::WebDOMFileSystem::fromV8Value(val);
   if (!dom_file_system.isNull()) {
     int pending_renderer_id;
-    scoped_ptr<IPC::Message> create_message;
-    scoped_ptr<IPC::Message> browser_host_create_message;
+    std::unique_ptr<IPC::Message> create_message;
+    std::unique_ptr<IPC::Message> browser_host_create_message;
     if (!DOMFileSystemToResource(instance_,
                                  host,
                                  dom_file_system,
@@ -247,7 +247,7 @@
       blink::WebDOMMediaStreamTrack::fromV8Value(val);
   if (!dom_media_stream_track.isNull()) {
     int pending_renderer_id;
-    scoped_ptr<IPC::Message> create_message;
+    std::unique_ptr<IPC::Message> create_message;
     if (!DOMMediaStreamTrackToResource(instance_,
                                        host,
                                        dom_media_stream_track,
diff --git a/content/renderer/pepper/url_response_info_util.cc b/content/renderer/pepper/url_response_info_util.cc
index 12d05e5..490e46c7b 100644
--- a/content/renderer/pepper/url_response_info_util.cc
+++ b/content/renderer/pepper/url_response_info_util.cc
@@ -98,7 +98,7 @@
         new PepperFileRefRendererHost(host_impl, pp_instance, 0, external_path);
     int renderer_pending_host_id =
         host_impl->GetPpapiHost()->AddPendingResourceHost(
-            scoped_ptr<ppapi::host::ResourceHost>(renderer_host));
+            std::unique_ptr<ppapi::host::ResourceHost>(renderer_host));
 
     std::vector<IPC::Message> create_msgs;
     create_msgs.push_back(PpapiHostMsg_FileRef_CreateForRawFS(external_path));
diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc
index eff2cabe..e7f4b28d 100644
--- a/content/renderer/pepper/v8_var_converter.cc
+++ b/content/renderer/pepper/v8_var_converter.cc
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <stack>
 #include <string>
 
@@ -15,7 +16,6 @@
 #include "base/containers/hash_tables.h"
 #include "base/location.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/public/renderer/renderer_ppapi_host.h"
 #include "content/renderer/pepper/host_array_buffer_var.h"
 #include "content/renderer/pepper/host_globals.h"
@@ -240,7 +240,7 @@
     // 3) If the object is an array, return an ArrayVar.
     // 4) If the object can be converted to a resource, return the ResourceVar.
     // 5) Otherwise return a DictionaryVar.
-    scoped_ptr<blink::WebArrayBuffer> web_array_buffer(
+    std::unique_ptr<blink::WebArrayBuffer> web_array_buffer(
         blink::WebArrayBufferConverter::createFromV8Value(val, isolate));
     if (web_array_buffer.get()) {
       scoped_refptr<HostArrayBufferVar> buffer_var(
@@ -290,8 +290,9 @@
   resource_converter_.reset(new ResourceConverterImpl(instance));
 }
 
-V8VarConverter::V8VarConverter(PP_Instance instance,
-                               scoped_ptr<ResourceConverter> resource_converter)
+V8VarConverter::V8VarConverter(
+    PP_Instance instance,
+    std::unique_ptr<ResourceConverter> resource_converter)
     : instance_(instance),
       object_vars_allowed_(kDisallowObjectVars),
       resource_converter_(resource_converter.release()) {}
diff --git a/content/renderer/pepper/v8_var_converter.h b/content/renderer/pepper/v8_var_converter.h
index 998939b0..835a8e48 100644
--- a/content/renderer/pepper/v8_var_converter.h
+++ b/content/renderer/pepper/v8_var_converter.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H_
 #define CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_var.h"
@@ -31,7 +32,7 @@
 
   // Constructor for testing.
   V8VarConverter(PP_Instance instance,
-                 scoped_ptr<ResourceConverter> resource_converter);
+                 std::unique_ptr<ResourceConverter> resource_converter);
   ~V8VarConverter();
 
   // Converts the given PP_Var to a v8::Value. True is returned upon success.
@@ -84,7 +85,7 @@
   AllowObjectVars object_vars_allowed_;
 
   // The converter to use for converting V8 vars to resources.
-  scoped_ptr<ResourceConverter> resource_converter_;
+  std::unique_ptr<ResourceConverter> resource_converter_;
 
   DISALLOW_COPY_AND_ASSIGN(V8VarConverter);
 };
diff --git a/content/renderer/pepper/v8_var_converter_unittest.cc b/content/renderer/pepper/v8_var_converter_unittest.cc
index 283aad6..857a1d69 100644
--- a/content/renderer/pepper/v8_var_converter_unittest.cc
+++ b/content/renderer/pepper/v8_var_converter_unittest.cc
@@ -8,10 +8,10 @@
 #include <stdint.h>
 
 #include <cmath>
+#include <memory>
 
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/synchronization/waitable_event.h"
@@ -171,7 +171,7 @@
       : isolate_(v8::Isolate::GetCurrent()) {
     PP_Instance dummy = 1234;
     converter_.reset(new V8VarConverter(
-        dummy, scoped_ptr<ResourceConverter>(new MockResourceConverter)));
+        dummy, std::unique_ptr<ResourceConverter>(new MockResourceConverter)));
   }
   ~V8VarConverterTest() override {}
 
@@ -233,7 +233,7 @@
   // Context for the JavaScript in the test.
   v8::Persistent<v8::Context> context_;
 
-  scoped_ptr<V8VarConverter> converter_;
+  std::unique_ptr<V8VarConverter> converter_;
 
  private:
   base::MessageLoop message_loop_;  // Required to receive callbacks.
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index 25a6fc1..2024207 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -656,7 +656,7 @@
 
   // WeakPtr is bound to main_message_loop_. Use only in shim callbacks.
   base::WeakPtr<VideoDecoderShim> shim_;
-  scoped_ptr<media::VideoDecoder> decoder_;
+  std::unique_ptr<media::VideoDecoder> decoder_;
   bool initialized_ = false;
   scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
   // Queue of decodes waiting for the decoder.
@@ -695,7 +695,7 @@
 
 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(DISABLE_FFMPEG_VIDEO_DECODERS)
   {
-    scoped_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder(
+    std::unique_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder(
         new media::FFmpegVideoDecoder());
     ffmpeg_video_decoder->set_decode_nalus(true);
     decoder_ = std::move(ffmpeg_video_decoder);
@@ -730,7 +730,8 @@
   // Abort all pending decodes.
   while (!pending_decodes_.empty()) {
     const PendingDecode& decode = pending_decodes_.front();
-    scoped_ptr<PendingFrame> pending_frame(new PendingFrame(decode.decode_id));
+    std::unique_ptr<PendingFrame> pending_frame(
+        new PendingFrame(decode.decode_id));
     main_task_runner_->PostTask(
         FROM_HERE, base::Bind(&VideoDecoderShim::OnDecodeComplete, shim_, PP_OK,
                               decode.decode_id));
@@ -809,7 +810,7 @@
   // call is pending.
   DCHECK(awaiting_decoder_);
 
-  scoped_ptr<PendingFrame> pending_frame;
+  std::unique_ptr<PendingFrame> pending_frame;
   if (!frame->metadata()->IsTrue(media::VideoFrameMetadata::END_OF_STREAM))
     pending_frame.reset(new PendingFrame(decode_id_, frame));
   else
@@ -1011,7 +1012,7 @@
     NotifyCompletedDecodes();
 }
 
-void VideoDecoderShim::OnOutputComplete(scoped_ptr<PendingFrame> frame) {
+void VideoDecoderShim::OnOutputComplete(std::unique_ptr<PendingFrame> frame) {
   DCHECK(RenderThreadImpl::current());
   DCHECK(host_);
 
@@ -1052,7 +1053,7 @@
   DCHECK(RenderThreadImpl::current());
   DCHECK(host_);
   while (!pending_frames_.empty() && !available_textures_.empty()) {
-    const scoped_ptr<PendingFrame>& frame = pending_frames_.front();
+    const std::unique_ptr<PendingFrame>& frame = pending_frames_.front();
 
     TextureIdSet::iterator it = available_textures_.begin();
     uint32_t texture_id = *it;
diff --git a/content/renderer/pepper/video_decoder_shim.h b/content/renderer/pepper/video_decoder_shim.h
index 0eac81e..db4a830c 100644
--- a/content/renderer/pepper/video_decoder_shim.h
+++ b/content/renderer/pepper/video_decoder_shim.h
@@ -7,17 +7,16 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <queue>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "gpu/command_buffer/common/mailbox.h"
 #include "media/base/video_decoder_config.h"
 #include "media/video/video_decode_accelerator.h"
-
 #include "ppapi/c/pp_codecs.h"
 
 namespace base {
@@ -76,7 +75,7 @@
 
   void OnInitializeFailed();
   void OnDecodeComplete(int32_t result, uint32_t decode_id);
-  void OnOutputComplete(scoped_ptr<PendingFrame> frame);
+  void OnOutputComplete(std::unique_ptr<PendingFrame> frame);
   void SendPictures();
   void OnResetComplete();
   void NotifyCompletedDecodes();
@@ -86,7 +85,7 @@
   // creating picture textures.
   void FlushCommandBuffer();
 
-  scoped_ptr<DecoderImpl> decoder_impl_;
+  std::unique_ptr<DecoderImpl> decoder_impl_;
   State state_;
 
   PepperVideoDecoderHost* host_;
@@ -111,7 +110,7 @@
   CompletedDecodeQueue completed_decodes_;
 
   // Queue of decoded frames that await rgb->yuv conversion.
-  typedef std::queue<scoped_ptr<PendingFrame>> PendingFrameQueue;
+  typedef std::queue<std::unique_ptr<PendingFrame>> PendingFrameQueue;
   PendingFrameQueue pending_frames_;
 
   // The optimal number of textures to allocate for decoder_impl_.
@@ -119,7 +118,7 @@
 
   uint32_t num_pending_decodes_;
 
-  scoped_ptr<YUVConverter> yuv_converter_;
+  std::unique_ptr<YUVConverter> yuv_converter_;
 
   base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_;
 
diff --git a/content/renderer/pepper/video_encoder_shim.h b/content/renderer/pepper/video_encoder_shim.h
index 59b648a..e48700b1 100644
--- a/content/renderer/pepper/video_encoder_shim.h
+++ b/content/renderer/pepper/video_encoder_shim.h
@@ -8,10 +8,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "media/video/video_encode_accelerator.h"
 
@@ -63,7 +63,7 @@
                               bool key_frame);
   void OnNotifyError(media::VideoEncodeAccelerator::Error error);
 
-  scoped_ptr<EncoderImpl> encoder_impl_;
+  std::unique_ptr<EncoderImpl> encoder_impl_;
 
   PepperVideoEncoderHost* host_;
 
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
index 6536f86..a96d6ce 100644
--- a/content/renderer/presentation/presentation_dispatcher.cc
+++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -145,7 +145,7 @@
     return;
   }
 
-  message_request_queue_.push(make_scoped_ptr(
+  message_request_queue_.push(base::WrapUnique(
       CreateSendTextMessageRequest(presentationUrl, presentationId, message)));
   // Start processing request if only one in the queue.
   if (message_request_queue_.size() == 1)
@@ -164,7 +164,7 @@
     return;
   }
 
-  message_request_queue_.push(make_scoped_ptr(CreateSendBinaryMessageRequest(
+  message_request_queue_.push(base::WrapUnique(CreateSendBinaryMessageRequest(
       presentationUrl, presentationId,
       mojom::PresentationMessageType::ARRAY_BUFFER, data, length)));
   // Start processing request if only one in the queue.
@@ -184,7 +184,7 @@
     return;
   }
 
-  message_request_queue_.push(make_scoped_ptr(CreateSendBinaryMessageRequest(
+  message_request_queue_.push(base::WrapUnique(CreateSendBinaryMessageRequest(
       presentationUrl, presentationId, mojom::PresentationMessageType::BLOB,
       data, length)));
   // Start processing request if only one in the queue.
@@ -248,7 +248,7 @@
   auto status_it = availability_status_.find(availability_url);
   if (status_it == availability_status_.end()) {
     status = new AvailabilityStatus(availability_url);
-    availability_status_[availability_url] = make_scoped_ptr(status);
+    availability_status_[availability_url] = base::WrapUnique(status);
   } else {
     status = status_it->second.get();
   }
@@ -423,7 +423,7 @@
   for (size_t i = 0; i < messages.size(); ++i) {
     // Note: Passing batches of messages to the Blink layer would be more
     // efficient.
-    scoped_ptr<PresentationConnectionClient> session_client(
+    std::unique_ptr<PresentationConnectionClient> session_client(
         new PresentationConnectionClient(session_info->url, session_info->id));
     switch (messages[i]->type) {
       case mojom::PresentationMessageType::TEXT: {
diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h
index 3688fa4e..149da97d 100644
--- a/content/renderer/presentation/presentation_dispatcher.h
+++ b/content/renderer/presentation/presentation_dispatcher.h
@@ -9,12 +9,12 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <queue>
 
 #include "base/compiler_specific.h"
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/presentation/presentation_service.mojom.h"
 #include "content/public/renderer/render_frame_observer.h"
@@ -133,7 +133,7 @@
 
   // Message requests are queued here and only one message at a time is sent
   // over mojo channel.
-  using MessageRequestQueue = std::queue<scoped_ptr<SendMessageRequest>>;
+  using MessageRequestQueue = std::queue<std::unique_ptr<SendMessageRequest>>;
   MessageRequestQueue message_request_queue_;
 
   enum class ListeningState {
@@ -159,7 +159,8 @@
     AvailabilityObserversSet availability_observers;
   };
 
-  std::map<std::string, scoped_ptr<AvailabilityStatus>> availability_status_;
+  std::map<std::string, std::unique_ptr<AvailabilityStatus>>
+      availability_status_;
 
   // Updates the listening state of availability for |status| and notifies the
   // client.
diff --git a/content/renderer/raster_worker_pool.cc b/content/renderer/raster_worker_pool.cc
index 65c00140..7abe23c2 100644
--- a/content/renderer/raster_worker_pool.cc
+++ b/content/renderer/raster_worker_pool.cc
@@ -134,7 +134,7 @@
   foreground_categories.push_back(cc::TASK_CATEGORY_FOREGROUND);
 
   for (int i = 0; i < num_threads; i++) {
-    scoped_ptr<base::SimpleThread> thread(new RasterWorkerPoolThread(
+    std::unique_ptr<base::SimpleThread> thread(new RasterWorkerPoolThread(
         base::StringPrintf("CompositorTileWorker%u",
                            static_cast<unsigned>(threads_.size() + 1))
             .c_str(),
@@ -154,7 +154,7 @@
   thread_options.set_priority(base::ThreadPriority::BACKGROUND);
 #endif
 
-  scoped_ptr<base::SimpleThread> thread(new RasterWorkerPoolThread(
+  std::unique_ptr<base::SimpleThread> thread(new RasterWorkerPoolThread(
       "CompositorTileWorkerBackground", thread_options, this,
       background_categories, &has_ready_to_run_background_tasks_cv_));
   thread->Start();
diff --git a/content/renderer/raster_worker_pool.h b/content/renderer/raster_worker_pool.h
index b4ddf9a..7092f82b 100644
--- a/content/renderer/raster_worker_pool.h
+++ b/content/renderer/raster_worker_pool.h
@@ -8,7 +8,7 @@
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/sequenced_task_runner.h"
 #include "base/synchronization/condition_variable.h"
 #include "base/task_runner.h"
@@ -116,7 +116,7 @@
   bool ShouldRunTaskForCategoryWithLockAcquired(cc::TaskCategory category);
 
   // The actual threads where work is done.
-  std::vector<scoped_ptr<base::SimpleThread>> threads_;
+  std::vector<std::unique_ptr<base::SimpleThread>> threads_;
 
   // Lock to exclusively access all the following members that are used to
   // implement the TaskRunner and TaskGraphRunner interfaces.
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f40c4222..2628d87 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -19,6 +19,7 @@
 #include "base/i18n/char_iterator.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/field_trial.h"
@@ -63,6 +64,7 @@
 #include "content/public/common/bindings_policy.h"
 #include "content/public/common/browser_side_navigation_policy.h"
 #include "content/public/common/content_constants.h"
+#include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/context_menu_params.h"
 #include "content/public/common/isolated_world_ids.h"
@@ -505,7 +507,7 @@
 
 WebURLRequest CreateURLRequestForNavigation(
     const CommonNavigationParams& common_params,
-    scoped_ptr<StreamOverrideParameters> stream_override,
+    std::unique_ptr<StreamOverrideParameters> stream_override,
     bool is_view_source_mode_enabled) {
   WebURLRequest request(common_params.url);
   if (is_view_source_mode_enabled)
@@ -1025,6 +1027,7 @@
       media_player_delegate_(NULL),
       is_using_lofi_(false),
       is_pasting_(false),
+      suppress_further_dialogs_(false),
       blame_context_(nullptr),
       weak_factory_(this) {
   std::pair<RoutingIDFrameMap::iterator, bool> result =
@@ -1440,6 +1443,8 @@
     IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
     IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
     IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
+    IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs,
+                        OnSuppressFurtherDialogs)
 #if defined(OS_ANDROID)
     IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult,
                         OnActivateNearestFindResult)
@@ -1479,7 +1484,7 @@
   TRACE_EVENT2("navigation", "RenderFrameImpl::OnNavigate", "id", routing_id_,
                "url", common_params.url.possibly_invalid_spec());
   NavigateInternal(common_params, start_params, request_params,
-                   scoped_ptr<StreamOverrideParameters>());
+                   std::unique_ptr<StreamOverrideParameters>());
 }
 
 void RenderFrameImpl::BindServiceRegistry(
@@ -1494,7 +1499,7 @@
 }
 
 void RenderFrameImpl::SetPendingNavigationParams(
-    scoped_ptr<NavigationParams> navigation_params) {
+    std::unique_ptr<NavigationParams> navigation_params) {
   pending_navigation_params_ = std::move(navigation_params);
 }
 
@@ -1571,11 +1576,6 @@
         blink::WebPageVisibilityStateHidden, false);
   }
 
-  // It is now safe to show modal dialogs again.
-  // TODO(creis): Deal with modal dialogs from subframes.
-  if (is_main_frame_)
-    render_view_->suppress_dialogs_until_swap_out_ = false;
-
   Send(new FrameHostMsg_SwapOut_ACK(routing_id_));
 
   RenderViewImpl* render_view = render_view_.get();
@@ -1819,7 +1819,7 @@
 
   // A bunch of tests expect to run code in the context of a user gesture, which
   // can grant additional privileges (e.g. the ability to create popups).
-  scoped_ptr<blink::WebScopedUserGesture> gesture(
+  std::unique_ptr<blink::WebScopedUserGesture> gesture(
       has_user_gesture ? new blink::WebScopedUserGesture : nullptr);
   v8::HandleScope handle_scope(blink::mainThreadIsolate());
   v8::Local<v8::Value> result =
@@ -1888,7 +1888,7 @@
       converter.SetDateAllowed(true);
       converter.SetRegExpAllowed(true);
       for (const auto& value : result) {
-        scoped_ptr<base::Value> result_value(
+        std::unique_ptr<base::Value> result_value(
             converter.FromV8Value(value, context));
         list.Append(result_value ? std::move(result_value)
                                  : base::Value::CreateNullValue());
@@ -1916,7 +1916,7 @@
       V8ValueConverterImpl converter;
       converter.SetDateAllowed(true);
       converter.SetRegExpAllowed(true);
-      scoped_ptr<base::Value> result_value(
+      std::unique_ptr<base::Value> result_value(
           converter.FromV8Value(result, context));
       list.Set(0, result_value ? std::move(result_value)
                                : base::Value::CreateNullValue());
@@ -2075,7 +2075,7 @@
     V8ValueConverterImpl converter;
     converter.SetDateAllowed(true);
     converter.SetRegExpAllowed(true);
-    scoped_ptr<base::Value> value(new base::StringValue(params.data));
+    std::unique_ptr<base::Value> value(new base::StringValue(params.data));
     v8::Local<v8::Value> result_value = converter.ToV8Value(value.get(),
                                                              context);
     serialized_script_value = WebSerializedScriptValue::serialize(result_value);
@@ -2147,8 +2147,8 @@
                                            const GURL& frame_url,
                                            base::string16* result) {
   // Don't allow further dialogs if we are waiting to swap out, since the
-  // PageGroupLoadDeferrer in our stack prevents it.
-  if (render_view()->suppress_dialogs_until_swap_out_)
+  // ScopedPageLoadDeferrer in our stack prevents it.
+  if (suppress_further_dialogs_)
     return false;
 
   bool success = false;
@@ -2241,7 +2241,7 @@
     blink::WebFrame* frame,
     const WebPluginInfo& info,
     const blink::WebPluginParams& params,
-    scoped_ptr<content::PluginInstanceThrottler> throttler) {
+    std::unique_ptr<content::PluginInstanceThrottler> throttler) {
   DCHECK_EQ(frame_, frame);
 #if defined(ENABLE_PLUGINS)
   if (info.type == WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) {
@@ -2260,7 +2260,7 @@
     if (pepper_module.get()) {
       return new PepperWebPluginImpl(
           pepper_module.get(), params, this,
-          make_scoped_ptr(
+          base::WrapUnique(
               static_cast<PluginInstanceThrottlerImpl*>(throttler.release())));
     }
   }
@@ -2464,10 +2464,10 @@
 #endif  // defined(OS_ANDROID)
 
 #if defined(ENABLE_MOJO_RENDERER)
-  scoped_ptr<media::RendererFactory> media_renderer_factory(
+  std::unique_ptr<media::RendererFactory> media_renderer_factory(
       new media::MojoRendererFactory(GetMediaInterfaceProvider()));
 #else
-  scoped_ptr<media::RendererFactory> media_renderer_factory =
+  std::unique_ptr<media::RendererFactory> media_renderer_factory =
       GetContentClient()->renderer()->CreateMediaRendererFactory(
           this, render_thread->GetGpuFactories(), media_log);
 
@@ -3611,8 +3611,8 @@
 
 bool RenderFrameImpl::runModalBeforeUnloadDialog(bool is_reload) {
   // Don't allow further dialogs if we are waiting to swap out, since the
-  // PageGroupLoadDeferrer in our stack prevents it.
-  if (render_view()->suppress_dialogs_until_swap_out_)
+  // ScopedPageLoadDeferrer in our stack prevents it.
+  if (suppress_further_dialogs_)
     return false;
 
   bool success = false;
@@ -3732,7 +3732,7 @@
   // PlzNavigate: there may also be a stream url associated with the request.
   WebString custom_user_agent;
   WebString requested_with;
-  scoped_ptr<StreamOverrideParameters> stream_override;
+  std::unique_ptr<StreamOverrideParameters> stream_override;
   if (request.getExtraData()) {
     RequestExtraData* old_extra_data =
         static_cast<RequestExtraData*>(request.getExtraData());
@@ -4175,12 +4175,6 @@
   return !blocked;
 }
 
-void RenderFrameImpl::didLoseWebGLContext(int arb_robustness_status_code) {
-  Send(new FrameHostMsg_DidLose3DContext(
-      blink::WebStringToGURL(frame_->top()->getSecurityOrigin().toString()),
-      THREE_D_API_TYPE_WEBGL, arb_robustness_status_code));
-}
-
 blink::WebScreenOrientationClient*
     RenderFrameImpl::webScreenOrientationClient() {
   if (!screen_orientation_dispatcher_)
@@ -4287,6 +4281,9 @@
 }
 
 blink::WebUSBClient* RenderFrameImpl::usbClient() {
+  if (!base::FeatureList::IsEnabled(features::kWebUsb))
+    return nullptr;
+
   if (!usb_client_)
     usb_client_.reset(new WebUSBClientImpl(GetServiceRegistry()));
 
@@ -4618,7 +4615,7 @@
   CHECK(IsBrowserSideNavigationEnabled());
   // This will override the url requested by the WebURLLoader, as well as
   // provide it with the response to the request.
-  scoped_ptr<StreamOverrideParameters> stream_override(
+  std::unique_ptr<StreamOverrideParameters> stream_override(
       new StreamOverrideParameters());
   stream_override->stream_url = stream_url;
   stream_override->response = response;
@@ -4659,7 +4656,7 @@
   blink::WebURLError error =
       CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code);
   WebURLRequest failed_request = CreateURLRequestForNavigation(
-      common_params, scoped_ptr<StreamOverrideParameters>(),
+      common_params, std::unique_ptr<StreamOverrideParameters>(),
       frame_->isViewSourceModeEnabled());
   SendFailedProvisionalLoad(failed_request, error, frame_);
 
@@ -5114,6 +5111,10 @@
   frame_->enableViewSourceMode(true);
 }
 
+void RenderFrameImpl::OnSuppressFurtherDialogs() {
+  suppress_further_dialogs_ = true;
+}
+
 #if defined(OS_ANDROID)
 void RenderFrameImpl::OnActivateNearestFindResult(int request_id,
                                                   float x,
@@ -5216,7 +5217,7 @@
     const CommonNavigationParams& common_params,
     const StartNavigationParams& start_params,
     const RequestNavigationParams& request_params,
-    scoped_ptr<StreamOverrideParameters> stream_params) {
+    std::unique_ptr<StreamOverrideParameters> stream_params) {
   bool browser_side_navigation = IsBrowserSideNavigationEnabled();
 
   // Lower bound for browser initiated navigation start time.
@@ -5316,7 +5317,7 @@
     // which should be the case because history navigations are routed via the
     // browser.
     DCHECK_NE(0, request_params.nav_entry_id);
-    scoped_ptr<HistoryEntry> entry =
+    std::unique_ptr<HistoryEntry> entry =
         PageStateToHistoryEntry(request_params.page_state);
     if (entry) {
       if (!SiteIsolationPolicy::UseSubframeNavigationEntries()) {
@@ -5325,7 +5326,7 @@
         // process.
         DCHECK(!frame_->parent());
         DCHECK(!browser_side_navigation);
-        scoped_ptr<NavigationParams> navigation_params(
+        std::unique_ptr<NavigationParams> navigation_params(
             new NavigationParams(*pending_navigation_params_.get()));
         has_history_navigation_in_frame =
             render_view_->history_controller()->GoToEntry(
@@ -5516,7 +5517,7 @@
   DCHECK(!web_user_media_client_);
   web_user_media_client_ = new UserMediaClientImpl(
       this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(),
-      make_scoped_ptr(new MediaStreamDispatcher(this)));
+      base::WrapUnique(new MediaStreamDispatcher(this)));
 #endif
 }
 
@@ -5548,17 +5549,17 @@
 #endif  // defined(ENABLE_WEBRTC)
 }
 
-scoped_ptr<MediaStreamRendererFactory>
+std::unique_ptr<MediaStreamRendererFactory>
 RenderFrameImpl::CreateRendererFactory() {
-  scoped_ptr<MediaStreamRendererFactory> factory =
+  std::unique_ptr<MediaStreamRendererFactory> factory =
       GetContentClient()->renderer()->CreateMediaStreamRendererFactory();
   if (factory.get())
     return factory;
 #if defined(ENABLE_WEBRTC)
-  return scoped_ptr<MediaStreamRendererFactory>(
+  return std::unique_ptr<MediaStreamRendererFactory>(
       new MediaStreamRendererFactoryImpl());
 #else
-  return scoped_ptr<MediaStreamRendererFactory>(
+  return std::unique_ptr<MediaStreamRendererFactory>(
       static_cast<MediaStreamRendererFactory*>(NULL));
 #endif
 }
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 597be016..fbf359699 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -16,7 +17,6 @@
 #include "base/id_map.h"
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/process/process_handle.h"
@@ -387,7 +387,7 @@
       blink::WebFrame* frame,
       const WebPluginInfo& info,
       const blink::WebPluginParams& params,
-      scoped_ptr<PluginInstanceThrottler> throttler) override;
+      std::unique_ptr<PluginInstanceThrottler> throttler) override;
   void LoadURLExternally(const blink::WebURLRequest& request,
                          blink::WebNavigationPolicy policy) override;
   void ExecuteJavaScript(const base::string16& javascript) override;
@@ -592,7 +592,6 @@
   blink::WebString userAgentOverride() override;
   blink::WebString doNotTrackValue() override;
   bool allowWebGL(bool default_value) override;
-  void didLoseWebGLContext(int arb_robustness_status_code) override;
   blink::WebScreenOrientationClient* webScreenOrientationClient() override;
   bool isControlledByServiceWorker(blink::WebDataSource& data_source) override;
   int64_t serviceWorkerID(blink::WebDataSource& data_source) override;
@@ -643,7 +642,7 @@
   // TODO(creis): Remove when the only caller, the HistoryController, is no
   // more.
   void SetPendingNavigationParams(
-      scoped_ptr<NavigationParams> navigation_params);
+      std::unique_ptr<NavigationParams> navigation_params);
 
   media::MediaPermission* GetMediaPermission();
 
@@ -802,6 +801,7 @@
               const blink::WebFindOptions& options);
   void OnStopFinding(StopFindAction action);
   void OnEnableViewSourceMode();
+  void OnSuppressFurtherDialogs();
 #if defined(OS_ANDROID)
   void OnActivateNearestFindResult(int request_id, float x, float y);
   void OnFindMatchRects(int current_version);
@@ -830,10 +830,11 @@
   // |request_params| received by the browser. |stream_params| should be non
   // null and created from the information provided by the browser.
   // |start_params| is not used.
-  void NavigateInternal(const CommonNavigationParams& common_params,
-                        const StartNavigationParams& start_params,
-                        const RequestNavigationParams& request_params,
-                        scoped_ptr<StreamOverrideParameters> stream_params);
+  void NavigateInternal(
+      const CommonNavigationParams& common_params,
+      const StartNavigationParams& start_params,
+      const RequestNavigationParams& request_params,
+      std::unique_ptr<StreamOverrideParameters> stream_params);
 
   // Update current main frame's encoding and send it to browser window.
   // Since we want to let users see the right encoding info from menu
@@ -887,7 +888,7 @@
       const blink::WebSecurityOrigin& security_origin);
 
   // Creates a factory object used for creating audio and video renderers.
-  scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory();
+  std::unique_ptr<MediaStreamRendererFactory> CreateRendererFactory();
 
   // Does preparation for the navigation to |url|.
   void PrepareRenderViewForNavigation(
@@ -1042,7 +1043,7 @@
   // Temporarily holds state pertaining to a navigation that has been initiated
   // until the NavigationState corresponding to the new navigation is created in
   // didCreateDataSource().
-  scoped_ptr<NavigationParams> pending_navigation_params_;
+  std::unique_ptr<NavigationParams> pending_navigation_params_;
 
   // Stores the current history item for this frame, so that updates to it can
   // be reported to the browser process via SendUpdateState.
@@ -1107,14 +1108,15 @@
   UserMediaClientImpl* web_user_media_client_;
 
   // EncryptedMediaClient attached to this frame; lazily initialized.
-  scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_;
+  std::unique_ptr<media::WebEncryptedMediaClientImpl>
+      web_encrypted_media_client_;
 
   // The media permission dispatcher attached to this frame.
-  scoped_ptr<MediaPermissionDispatcher> media_permission_dispatcher_;
+  std::unique_ptr<MediaPermissionDispatcher> media_permission_dispatcher_;
 
 #if defined(ENABLE_MOJO_MEDIA)
   // The media interface provider attached to this frame, lazily initialized.
-  scoped_ptr<MediaInterfaceProvider> media_interface_provider_;
+  std::unique_ptr<MediaInterfaceProvider> media_interface_provider_;
 #endif
 
   // MidiClient attached to this frame; lazily initialized.
@@ -1139,8 +1141,8 @@
 #endif
 
   // The CDM and decoder factory attached to this frame, lazily initialized.
-  scoped_ptr<media::CdmFactory> cdm_factory_;
-  scoped_ptr<media::DecoderFactory> decoder_factory_;
+  std::unique_ptr<media::CdmFactory> cdm_factory_;
+  std::unique_ptr<media::DecoderFactory> decoder_factory_;
 
   // Media resource cache, lazily initialized.
   linked_ptr<media::UrlIndex> url_index_;
@@ -1188,13 +1190,13 @@
   // AccessibilityModeOff.
   RendererAccessibility* renderer_accessibility_;
 
-  scoped_ptr<PermissionDispatcher> permission_client_;
+  std::unique_ptr<PermissionDispatcher> permission_client_;
 
-  scoped_ptr<blink::WebAppBannerClient> app_banner_client_;
+  std::unique_ptr<blink::WebAppBannerClient> app_banner_client_;
 
-  scoped_ptr<blink::WebBluetooth> bluetooth_;
+  std::unique_ptr<blink::WebBluetooth> bluetooth_;
 
-  scoped_ptr<blink::WebUSBClient> usb_client_;
+  std::unique_ptr<blink::WebUSBClient> usb_client_;
 
   // Manages play, pause notifications for WebMediaPlayer implementations; its
   // lifetime is tied to the RenderFrame via the RenderFrameObserver interface.
@@ -1206,14 +1208,19 @@
   // Whether or not this RenderFrame is currently pasting.
   bool is_pasting_;
 
+  // Whether we must stop creating nested message loops for modal dialogs. This
+  // is necessary because modal dialogs have a ScopedPageLoadDeferrer on the
+  // stack that interferes with swapping out.
+  bool suppress_further_dialogs_;
+
 #if defined(ENABLE_WEBVR)
   // The VR dispatcher attached to the frame, lazily initialized.
-  scoped_ptr<VRDispatcher> vr_dispatcher_;
+  std::unique_ptr<VRDispatcher> vr_dispatcher_;
 #endif
 
 #if defined(OS_MACOSX) || defined(OS_ANDROID)
   // The external popup for the currently showing select popup.
-  scoped_ptr<ExternalPopupMenu> external_popup_menu_;
+  std::unique_ptr<ExternalPopupMenu> external_popup_menu_;
 #endif
 
   FrameBlameContext* blame_context_;  // Not owned.
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 37b7059..d9019937 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -52,7 +52,7 @@
     blink::WebTreeScopeType scope) {
   CHECK_NE(routing_id, MSG_ROUTING_NONE);
 
-  scoped_ptr<RenderFrameProxy> proxy(
+  std::unique_ptr<RenderFrameProxy> proxy(
       new RenderFrameProxy(routing_id, frame_to_replace->GetRoutingID()));
 
   // When a RenderFrame is replaced by a RenderProxy, the WebRemoteFrame should
@@ -94,7 +94,7 @@
   blink::WebFrame* opener =
       RenderFrameImpl::ResolveOpener(opener_routing_id, nullptr);
 
-  scoped_ptr<RenderFrameProxy> proxy(
+  std::unique_ptr<RenderFrameProxy> proxy(
       new RenderFrameProxy(routing_id, MSG_ROUTING_NONE));
   RenderViewImpl* render_view = nullptr;
   RenderWidget* render_widget = nullptr;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 30047189..14a53601 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -18,6 +18,7 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/discardable_memory_allocator.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
@@ -251,8 +252,8 @@
 
  private:
   // WebThreadImplForWorkerScheduler:
-  scoped_ptr<scheduler::WorkerScheduler> CreateWorkerScheduler() override {
-    return make_scoped_ptr(new scheduler::CompositorWorkerScheduler(thread()));
+  std::unique_ptr<scheduler::WorkerScheduler> CreateWorkerScheduler() override {
+    return base::WrapUnique(new scheduler::CompositorWorkerScheduler(thread()));
   }
 
   DISALLOW_COPY_AND_ASSIGN(WebThreadForCompositor);
@@ -326,7 +327,7 @@
   histogram->Add(sample);
 }
 
-scoped_ptr<cc::SharedBitmap> AllocateSharedBitmapFunction(
+std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmapFunction(
     const gfx::Size& size) {
   return ChildThreadImpl::current()->shared_bitmap_manager()->
       AllocateSharedBitmap(size);
@@ -570,7 +571,7 @@
 // static
 RenderThreadImpl* RenderThreadImpl::Create(
     const InProcessChildThreadParams& params) {
-  scoped_ptr<scheduler::RendererScheduler> renderer_scheduler =
+  std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler =
       scheduler::RendererScheduler::Create();
   scoped_refptr<base::SingleThreadTaskRunner> test_task_counter;
   return new RenderThreadImpl(
@@ -579,8 +580,8 @@
 
 // static
 RenderThreadImpl* RenderThreadImpl::Create(
-    scoped_ptr<base::MessageLoop> main_message_loop,
-    scoped_ptr<scheduler::RendererScheduler> renderer_scheduler) {
+    std::unique_ptr<base::MessageLoop> main_message_loop,
+    std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler) {
   return new RenderThreadImpl(std::move(main_message_loop),
                               std::move(renderer_scheduler));
 }
@@ -591,7 +592,7 @@
 
 RenderThreadImpl::RenderThreadImpl(
     const InProcessChildThreadParams& params,
-    scoped_ptr<scheduler::RendererScheduler> scheduler,
+    std::unique_ptr<scheduler::RendererScheduler> scheduler,
     scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue)
     : ChildThreadImpl(Options::Builder()
                           .InBrowserProcess(params)
@@ -605,11 +606,10 @@
 // When we run plugins in process, we actually run them on the render thread,
 // which means that we need to make the render thread pump UI events.
 RenderThreadImpl::RenderThreadImpl(
-    scoped_ptr<base::MessageLoop> main_message_loop,
-    scoped_ptr<scheduler::RendererScheduler> scheduler)
-    : ChildThreadImpl(Options::Builder()
-                          .UseMojoChannel(ShouldUseMojoChannel())
-                          .Build()),
+    std::unique_ptr<base::MessageLoop> main_message_loop,
+    std::unique_ptr<scheduler::RendererScheduler> scheduler)
+    : ChildThreadImpl(
+          Options::Builder().UseMojoChannel(ShouldUseMojoChannel()).Build()),
       renderer_scheduler_(std::move(scheduler)),
       main_message_loop_(std::move(main_message_loop)),
       raster_worker_pool_(new RasterWorkerPool()) {
@@ -1339,8 +1339,8 @@
   Send(new ViewHostMsg_UserMetricsRecordAction(action));
 }
 
-scoped_ptr<base::SharedMemory>
-    RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) {
+std::unique_ptr<base::SharedMemory>
+RenderThreadImpl::HostAllocateSharedMemoryBuffer(size_t size) {
   return ChildThreadImpl::AllocateSharedMemory(size, thread_safe_sender());
 }
 
@@ -1489,7 +1489,7 @@
   return nullptr;
 }
 
-scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
+std::unique_ptr<WebGraphicsContext3DCommandBufferImpl>
 RenderThreadImpl::CreateOffscreenContext3d() {
   // This is used to create a few different offscreen contexts:
   // - The shared main thread context (offscreen) used by blink for canvas
@@ -1508,7 +1508,7 @@
   bool automatic_flushes = false;
   scoped_refptr<gpu::GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync(
       CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
-  return make_scoped_ptr(
+  return base::WrapUnique(
       WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
           gpu_channel_host.get(), attributes, gfx::PreferIntegratedGpu,
           share_resources, automatic_flushes,
@@ -1676,7 +1676,7 @@
   return SharedMainThreadContextProvider().get();
 }
 
-scoped_ptr<cc::BeginFrameSource>
+std::unique_ptr<cc::BeginFrameSource>
 RenderThreadImpl::CreateExternalBeginFrameSource(int routing_id) {
 #if defined(OS_ANDROID)
   if (SynchronousCompositorFactory* factory =
@@ -1684,11 +1684,11 @@
     DCHECK(!sync_compositor_message_filter_);
     return factory->CreateExternalBeginFrameSource(routing_id);
   } else if (sync_compositor_message_filter_) {
-    return make_scoped_ptr(new SynchronousCompositorExternalBeginFrameSource(
+    return base::WrapUnique(new SynchronousCompositorExternalBeginFrameSource(
         routing_id, sync_compositor_message_filter_.get()));
   }
 #endif
-  return make_scoped_ptr(new CompositorExternalBeginFrameSource(
+  return base::WrapUnique(new CompositorExternalBeginFrameSource(
       compositor_message_filter_.get(), sync_message_filter(), routing_id));
 }
 
@@ -1718,7 +1718,7 @@
   return io_thread_task_runner_;
 }
 
-scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
+std::unique_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
     size_t size) {
   return HostAllocateSharedMemoryBuffer(size);
 }
@@ -1870,7 +1870,7 @@
     media_stream_center_ = GetContentClient()->renderer()
         ->OverrideCreateWebMediaStreamCenter(client);
     if (!media_stream_center_) {
-      scoped_ptr<MediaStreamCenter> media_stream_center(
+      std::unique_ptr<MediaStreamCenter> media_stream_center(
           new MediaStreamCenter(client, GetPeerConnectionDependencyFactory()));
       media_stream_center_ = media_stream_center.release();
     }
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 3d1b5bf..28379f06 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -154,8 +154,8 @@
  public:
   static RenderThreadImpl* Create(const InProcessChildThreadParams& params);
   static RenderThreadImpl* Create(
-      scoped_ptr<base::MessageLoop> main_message_loop,
-      scoped_ptr<scheduler::RendererScheduler> renderer_scheduler);
+      std::unique_ptr<base::MessageLoop> main_message_loop,
+      std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler);
   static RenderThreadImpl* current();
 
   ~RenderThreadImpl() override;
@@ -184,7 +184,7 @@
   void RemoveObserver(RenderProcessObserver* observer) override;
   void SetResourceDispatcherDelegate(
       ResourceDispatcherDelegate* delegate) override;
-  scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
+  std::unique_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer(
       size_t buffer_size) override;
   cc::SharedBitmapManager* GetSharedBitmapManager() override;
   void RegisterExtension(v8::Extension* extension) override;
@@ -217,7 +217,7 @@
   gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
   scheduler::RendererScheduler* GetRendererScheduler() override;
   cc::ContextProvider* GetSharedMainThreadContextProvider() override;
-  scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
+  std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
       int routing_id) override;
   cc::ImageSerializationProcessor* GetImageSerializationProcessor() override;
   cc::TaskGraphRunner* GetTaskGraphRunner() override;
@@ -462,10 +462,10 @@
  protected:
   RenderThreadImpl(
       const InProcessChildThreadParams& params,
-      scoped_ptr<scheduler::RendererScheduler> scheduler,
+      std::unique_ptr<scheduler::RendererScheduler> scheduler,
       scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
-  RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop,
-                   scoped_ptr<scheduler::RendererScheduler> scheduler);
+  RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop,
+                   std::unique_ptr<scheduler::RendererScheduler> scheduler);
 
  private:
   // ChildThread
@@ -477,7 +477,8 @@
   // GpuChannelHostFactory implementation:
   bool IsMainThread() override;
   scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
-  scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override;
+  std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
+      size_t size) override;
 
   void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
 
@@ -525,17 +526,18 @@
 
   void ReleaseFreeMemory();
 
-  scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext3d();
+  std::unique_ptr<WebGraphicsContext3DCommandBufferImpl>
+  CreateOffscreenContext3d();
 
   // These objects live solely on the render thread.
-  scoped_ptr<AppCacheDispatcher> appcache_dispatcher_;
-  scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_;
-  scoped_ptr<IndexedDBDispatcher> main_thread_indexed_db_dispatcher_;
-  scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_;
-  scoped_ptr<RendererBlinkPlatformImpl> blink_platform_impl_;
-  scoped_ptr<ResourceDispatchThrottler> resource_dispatch_throttler_;
-  scoped_ptr<CacheStorageDispatcher> main_thread_cache_storage_dispatcher_;
-  scoped_ptr<EmbeddedWorkerDispatcher> embedded_worker_dispatcher_;
+  std::unique_ptr<AppCacheDispatcher> appcache_dispatcher_;
+  std::unique_ptr<DomStorageDispatcher> dom_storage_dispatcher_;
+  std::unique_ptr<IndexedDBDispatcher> main_thread_indexed_db_dispatcher_;
+  std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler_;
+  std::unique_ptr<RendererBlinkPlatformImpl> blink_platform_impl_;
+  std::unique_ptr<ResourceDispatchThrottler> resource_dispatch_throttler_;
+  std::unique_ptr<CacheStorageDispatcher> main_thread_cache_storage_dispatcher_;
+  std::unique_ptr<EmbeddedWorkerDispatcher> embedded_worker_dispatcher_;
 
   // Used on the render thread and deleted by WebKit at shutdown.
   blink::WebMediaStreamCenter* media_stream_center_;
@@ -550,23 +552,23 @@
   scoped_refptr<RendererDemuxerAndroid> renderer_demuxer_;
 #endif
   scoped_refptr<DevToolsAgentFilter> devtools_agent_message_filter_;
-  scoped_ptr<V8SamplingProfiler> v8_sampling_profiler_;
+  std::unique_ptr<V8SamplingProfiler> v8_sampling_profiler_;
 
-  scoped_ptr<BrowserPluginManager> browser_plugin_manager_;
+  std::unique_ptr<BrowserPluginManager> browser_plugin_manager_;
 
 #if defined(ENABLE_WEBRTC)
-  scoped_ptr<PeerConnectionDependencyFactory> peer_connection_factory_;
+  std::unique_ptr<PeerConnectionDependencyFactory> peer_connection_factory_;
 
   // This is used to communicate to the browser process the status
   // of all the peer connections created in the renderer.
-  scoped_ptr<PeerConnectionTracker> peer_connection_tracker_;
+  std::unique_ptr<PeerConnectionTracker> peer_connection_tracker_;
 
   // Dispatches all P2P sockets.
   scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
 #endif
 
   // Used on the render thread.
-  scoped_ptr<VideoCaptureImplManager> vc_manager_;
+  std::unique_ptr<VideoCaptureImplManager> vc_manager_;
 
   // Used for communicating registering AEC dump consumers with the browser and
   // receving AEC dump file handles when AEC dump is enabled. An AEC dump is
@@ -605,13 +607,13 @@
   // The message loop of the renderer main thread.
   // This message loop should be destructed before the RenderThreadImpl
   // shuts down Blink.
-  scoped_ptr<base::MessageLoop> main_message_loop_;
+  std::unique_ptr<base::MessageLoop> main_message_loop_;
 
   // A lazily initiated thread on which file operations are run.
-  scoped_ptr<base::Thread> file_thread_;
+  std::unique_ptr<base::Thread> file_thread_;
 
   // May be null if overridden by ContentRendererClient.
-  scoped_ptr<scheduler::WebThreadBase> compositor_thread_;
+  std::unique_ptr<scheduler::WebThreadBase> compositor_thread_;
 
   // Utility class to provide GPU functionalities to media.
   // TODO(dcastagna): This should be just one scoped_ptr once
@@ -620,7 +622,7 @@
   ScopedVector<content::RendererGpuVideoAcceleratorFactories> gpu_factories_;
 
   // Thread for running multimedia operations (e.g., video decoding).
-  scoped_ptr<base::Thread> media_thread_;
+  std::unique_ptr<base::Thread> media_thread_;
 
   // Will point to appropriate task runner after initialization,
   // regardless of whether |compositor_thread_| is overriden.
@@ -631,7 +633,7 @@
 
   base::CancelableCallback<void(const IPC::Message&)> main_input_callback_;
   scoped_refptr<IPC::MessageFilter> input_event_filter_;
-  scoped_ptr<InputHandlerManager> input_handler_manager_;
+  std::unique_ptr<InputHandlerManager> input_handler_manager_;
   scoped_refptr<CompositorForwardingMessageFilter> compositor_message_filter_;
 
 #if defined(OS_ANDROID)
@@ -647,18 +649,18 @@
 
   scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;
 
-  scoped_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_;
-  scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_;
+  std::unique_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_;
+  std::unique_ptr<media::AudioHardwareConfig> audio_hardware_config_;
 
   HistogramCustomizer histogram_customizer_;
 
-  scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_;
+  std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
 
 #if defined(ENABLE_WEBRTC)
-  scoped_ptr<WebRTCIdentityService> webrtc_identity_service_;
+  std::unique_ptr<WebRTCIdentityService> webrtc_identity_service_;
 #endif
 
-  scoped_ptr<MemoryObserver> memory_observer_;
+  std::unique_ptr<MemoryObserver> memory_observer_;
 
   scoped_refptr<base::SingleThreadTaskRunner>
       main_thread_compositor_task_runner_;
diff --git a/content/renderer/render_thread_impl_browsertest.cc b/content/renderer/render_thread_impl_browsertest.cc
index f1b21a4f..534a324 100644
--- a/content/renderer/render_thread_impl_browsertest.cc
+++ b/content/renderer/render_thread_impl_browsertest.cc
@@ -103,10 +103,9 @@
  public:
   RenderThreadImplForTest(
       const InProcessChildThreadParams& params,
-      scoped_ptr<scheduler::RendererScheduler> scheduler,
+      std::unique_ptr<scheduler::RendererScheduler> scheduler,
       scoped_refptr<base::SingleThreadTaskRunner>& test_task_counter)
-      : RenderThreadImpl(params, std::move(scheduler), test_task_counter) {
-  }
+      : RenderThreadImpl(params, std::move(scheduler), test_task_counter) {}
 
   ~RenderThreadImplForTest() override {}
 
@@ -176,7 +175,7 @@
     }
     cmd->AppendSwitchASCII(switches::kContentImageTextureTarget, image_targets);
 
-    scoped_ptr<scheduler::RendererScheduler> renderer_scheduler =
+    std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler =
         scheduler::RendererScheduler::Create();
     InitializeMojo();
     scoped_refptr<base::SingleThreadTaskRunner> test_task_counter(
@@ -194,11 +193,11 @@
   }
 
   scoped_refptr<TestTaskCounter> test_task_counter_;
-  scoped_ptr<ContentClient> content_client_;
-  scoped_ptr<ContentBrowserClient> content_browser_client_;
-  scoped_ptr<ContentRendererClient> content_renderer_client_;
-  scoped_ptr<RenderThreadImplBrowserIPCTestHelper> test_helper_;
-  scoped_ptr<MockRenderProcess> mock_process_;
+  std::unique_ptr<ContentClient> content_client_;
+  std::unique_ptr<ContentBrowserClient> content_browser_client_;
+  std::unique_ptr<ContentRendererClient> content_renderer_client_;
+  std::unique_ptr<RenderThreadImplBrowserIPCTestHelper> test_helper_;
+  std::unique_ptr<MockRenderProcess> mock_process_;
   scoped_refptr<QuitOnTestMsgFilter> test_msg_filter_;
   RenderThreadImplForTest* thread_;  // Owned by mock_process_.
   std::string channel_id_;
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index de24579..4e033d2 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -373,7 +373,7 @@
   }
 
  private:
-  scoped_ptr<MockKeyboard> mock_keyboard_;
+  std::unique_ptr<MockKeyboard> mock_keyboard_;
 };
 
 class DevToolsAgentTest : public RenderViewImplTest {
@@ -406,8 +406,9 @@
 
   void OnDevToolsMessage(
       int, int, const std::string& message, const std::string&) {
-    scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>(
-        base::JSONReader::Read(message).release()));
+    std::unique_ptr<base::DictionaryValue> root(
+        static_cast<base::DictionaryValue*>(
+            base::JSONReader::Read(message).release()));
     int id;
     if (!root->GetInteger("id", &id)) {
       std::string notification;
@@ -416,12 +417,13 @@
     }
   }
 
-  bool HasNotifications(const std::string& notification, int count) {
+  int CountNotifications(const std::string& notification) {
+    int result = 0;
     for (const std::string& s : notifications_) {
       if (s == notification)
-        --count;
+        ++result;
     }
-    return count <= 0;
+    return result;
   }
 
  private:
@@ -620,7 +622,7 @@
 
   // Check post data sent to browser matches
   EXPECT_TRUE(base::get<0>(host_nav_params).page_state.IsValid());
-  scoped_ptr<HistoryEntry> entry =
+  std::unique_ptr<HistoryEntry> entry =
       PageStateToHistoryEntry(base::get<0>(host_nav_params).page_state);
   blink::WebHTTPBody body = entry->root().httpBody();
   blink::WebHTTPBody::Element element;
@@ -2383,19 +2385,19 @@
   Detach();
 }
 
-TEST_F(DevToolsAgentTest, RuntimeEnableForcesMainContext) {
-  LoadHTML("");
+TEST_F(DevToolsAgentTest, RuntimeEnableForcesContexts) {
+  LoadHTML("<body>page<iframe></iframe></body>");
   Attach();
   DispatchDevToolsMessage("{\"id\":1,\"method\":\"Runtime.enable\"}");
-  EXPECT_TRUE(HasNotifications("Runtime.executionContextCreated", 1));
+  EXPECT_EQ(2, CountNotifications("Runtime.executionContextCreated"));
 }
 
 TEST_F(DevToolsAgentTest, RuntimeEnableForcesContextsAfterNavigation) {
   Attach();
   DispatchDevToolsMessage("{\"id\":1,\"method\":\"Runtime.enable\"}");
-  EXPECT_FALSE(HasNotifications("Runtime.executionContextCreated", 1));
+  EXPECT_EQ(0, CountNotifications("Runtime.executionContextCreated"));
   LoadHTML("<body>page<iframe></iframe></body>");
-  EXPECT_TRUE(HasNotifications("Runtime.executionContextCreated", 2));
+  EXPECT_EQ(2, CountNotifications("Runtime.executionContextCreated"));
 }
 
 }  // namespace content
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 76b0fb6..0331a98f 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -6,6 +6,7 @@
 
 #include <algorithm>
 #include <cmath>
+#include <memory>
 
 #include "base/auto_reset.h"
 #include "base/bind.h"
@@ -18,7 +19,7 @@
 #include "base/i18n/rtl.h"
 #include "base/json/json_writer.h"
 #include "base/lazy_instance.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
 #include "base/process/kill.h"
@@ -616,7 +617,6 @@
       send_preferred_size_changes_(false),
       navigation_gesture_(NavigationGestureUnknown),
       opened_by_user_gesture_(true),
-      suppress_dialogs_until_swap_out_(false),
       page_id_(-1),
       next_page_id_(params.next_page_id),
       history_list_offset_(-1),
@@ -723,14 +723,14 @@
     main_render_frame_->Initialize();
 
 #if defined(OS_ANDROID)
-  content_detectors_.push_back(make_scoped_ptr(new AddressDetector()));
+  content_detectors_.push_back(base::WrapUnique(new AddressDetector()));
   const std::string& contry_iso =
       params.renderer_preferences.network_contry_iso;
   if (!contry_iso.empty()) {
     content_detectors_.push_back(
-        make_scoped_ptr(new PhoneNumberDetector(contry_iso)));
+        base::WrapUnique(new PhoneNumberDetector(contry_iso)));
   }
-  content_detectors_.push_back(make_scoped_ptr(new EmailDetector()));
+  content_detectors_.push_back(base::WrapUnique(new EmailDetector()));
 #endif
 
   RenderThread::Get()->AddRoute(GetRoutingID(), this);
@@ -1320,8 +1320,6 @@
     IPC_MESSAGE_HANDLER(ViewMsg_EnumerateDirectoryResponse,
                         OnEnumerateDirectoryResponse)
     IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse)
-    IPC_MESSAGE_HANDLER(ViewMsg_SuppressDialogsUntilSwapOut,
-                        OnSuppressDialogsUntilSwapOut)
     IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
     IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged)
     IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
@@ -1495,7 +1493,7 @@
                                   0,
                                   id);
   }
-  scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
+  std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
   if (RenderWidgetCompositor* rwc = compositor()) {
     latency_info_swap_promise_monitor =
         rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info);
@@ -2539,11 +2537,6 @@
     webview()->performPluginAction(action, location);
 }
 
-void RenderViewImpl::OnSuppressDialogsUntilSwapOut() {
-  // Don't show any more dialogs until we finish OnSwapOut.
-  suppress_dialogs_until_swap_out_ = true;
-}
-
 void RenderViewImpl::OnClosePage() {
   FOR_EACH_OBSERVER(RenderViewObserver, observers_, ClosePage());
   // TODO(creis): We'd rather use webview()->Close() here, but that currently
@@ -2954,7 +2947,7 @@
   }
 
   file_chooser_completions_.push_back(
-      make_scoped_ptr(new PendingFileChooser(params, completion)));
+      base::WrapUnique(new PendingFileChooser(params, completion)));
   if (file_chooser_completions_.size() == 1) {
     // Actually show the browse dialog when this is the first request.
     Send(new ViewHostMsg_RunFileChooser(GetRoutingID(), params));
@@ -3156,7 +3149,7 @@
           gfx::ScaleToCeiledSize(zoom_rect.size(), new_total_scale);
       cc::SharedBitmapManager* manager =
           RenderThreadImpl::current()->shared_bitmap_manager();
-      scoped_ptr<cc::SharedBitmap> shared_bitmap =
+      std::unique_ptr<cc::SharedBitmap> shared_bitmap =
           manager->AllocateSharedBitmap(canvas_size);
       CHECK(!!shared_bitmap);
       {
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 3096071b..b2890431 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -10,6 +10,7 @@
 
 #include <deque>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -17,7 +18,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/process/process.h"
@@ -654,7 +654,6 @@
   void OnSetWebUIProperty(const std::string& name, const std::string& value);
   void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
   void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level);
-  void OnSuppressDialogsUntilSwapOut();
   void OnThemeChanged();
   void OnUpdateTargetURLAck();
   void OnUpdateWebPreferences(const WebPreferences& prefs);
@@ -784,11 +783,6 @@
   // Used for popups.
   bool opened_by_user_gesture_;
 
-  // Whether we must stop creating nested message loops for modal dialogs until
-  // OnSwapOut is called.  This is necessary because modal dialogs have a
-  // PageGroupLoadDeferrer on the stack that interferes with swapping out.
-  bool suppress_dialogs_until_swap_out_;
-
   // Timer used to delay the updating of nav state (see
   // StartNavStateSyncTimerIfNecessary).
   base::OneShotTimer nav_state_sync_timer_;
@@ -897,7 +891,7 @@
   // Mouse Lock dispatcher attached to this view.
   MouseLockDispatcher* mouse_lock_dispatcher_;
 
-  scoped_ptr<HistoryController> history_controller_;
+  std::unique_ptr<HistoryController> history_controller_;
 
 #if defined(OS_ANDROID)
   // Android Specific ---------------------------------------------------------
@@ -907,10 +901,10 @@
   size_t expected_content_intent_id_;
 
   // List of click-based content detectors.
-  std::vector<scoped_ptr<ContentDetector>> content_detectors_;
+  std::vector<std::unique_ptr<ContentDetector>> content_detectors_;
 
   // A date/time picker object for date and time related input elements.
-  scoped_ptr<RendererDateTimePicker> date_time_picker_client_;
+  std::unique_ptr<RendererDateTimePicker> date_time_picker_client_;
 #endif
 
   // Plugins -------------------------------------------------------------------
@@ -940,7 +934,7 @@
   // callback, and the remaining elements are the other file chooser completion
   // still waiting to be run (in order).
   struct PendingFileChooser;
-  std::deque<scoped_ptr<PendingFileChooser>> file_chooser_completions_;
+  std::deque<std::unique_ptr<PendingFileChooser>> file_chooser_completions_;
 
   // The current directory enumeration callback
   std::map<int, blink::WebFileChooserCompletion*> enumeration_completions_;
@@ -960,7 +954,7 @@
   base::ObserverList<RenderViewObserver> observers_;
 
   // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface.
-  scoped_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
+  std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
 
   // This field stores drag/drop related info for the event that is currently
   // being handled. If the current event results in starting a drag/drop
@@ -969,7 +963,7 @@
 
   // NOTE: stats_collection_observer_ should be the last members because their
   // constructors call the AddObservers method of RenderViewImpl.
-  scoped_ptr<StatsCollectionObserver> stats_collection_observer_;
+  std::unique_ptr<StatsCollectionObserver> stats_collection_observer_;
 
   typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap;
   BitmapMap disambiguation_bitmaps_;
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 18461075..93bff833 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -4,6 +4,7 @@
 
 #include "content/renderer/render_widget.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/auto_reset.h"
@@ -12,7 +13,7 @@
 #include "base/feature_list.h"
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/singleton.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram.h"
@@ -645,7 +646,7 @@
   // Generate a full repaint.
   if (compositor_) {
     ui::LatencyInfo swap_latency_info(latency_info);
-    scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor(
+    std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor(
         compositor_->CreateLatencyInfoSwapPromiseMonitor(&swap_latency_info));
     compositor_->SetNeedsForcedRedraw();
   }
@@ -702,7 +703,8 @@
   webwidget_->beginFrame(frame_time_sec);
 }
 
-scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
+std::unique_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(
+    bool fallback) {
   DCHECK(webwidget_);
   // For widgets that are never visible, we don't start the compositor, so we
   // never get a request for a cc::OutputSurface.
@@ -749,10 +751,11 @@
     vulkan_context_provider = cc::VulkanInProcessContextProvider::Create();
     if (vulkan_context_provider) {
       uint32_t output_surface_id = next_output_surface_id_++;
-      return scoped_ptr<cc::OutputSurface>(new DelegatedCompositorOutputSurface(
-          routing_id(), output_surface_id, context_provider,
-          worker_context_provider, vulkan_context_provider,
-          frame_swap_message_queue_));
+      return std::unique_ptr<cc::OutputSurface>(
+          new DelegatedCompositorOutputSurface(
+              routing_id(), output_surface_id, context_provider,
+              worker_context_provider, vulkan_context_provider,
+              frame_swap_message_queue_));
     }
 #endif
 
@@ -776,7 +779,7 @@
           context_provider, worker_context_provider);
     } else if (RenderThreadImpl::current()->sync_compositor_message_filter()) {
       uint32_t output_surface_id = next_output_surface_id_++;
-      return make_scoped_ptr(new SynchronousCompositorOutputSurface(
+      return base::WrapUnique(new SynchronousCompositorOutputSurface(
           context_provider, worker_context_provider, routing_id(),
           output_surface_id, content::RenderThreadImpl::current()
                                  ->sync_compositor_message_filter(),
@@ -792,7 +795,7 @@
   if (!RenderThreadImpl::current() ||
       !RenderThreadImpl::current()->layout_test_mode()) {
     DCHECK(compositor_deps_->GetCompositorImplThreadTaskRunner());
-    return make_scoped_ptr(new DelegatedCompositorOutputSurface(
+    return base::WrapUnique(new DelegatedCompositorOutputSurface(
         routing_id(), output_surface_id, context_provider,
         worker_context_provider,
 #if defined(ENABLE_VULKAN)
@@ -802,10 +805,10 @@
   }
 
   if (!context_provider.get()) {
-    scoped_ptr<cc::SoftwareOutputDevice> software_device(
+    std::unique_ptr<cc::SoftwareOutputDevice> software_device(
         new cc::SoftwareOutputDevice());
 
-    return make_scoped_ptr(new CompositorOutputSurface(
+    return base::WrapUnique(new CompositorOutputSurface(
         routing_id(), output_surface_id, nullptr, nullptr,
 #if defined(ENABLE_VULKAN)
         nullptr,
@@ -813,12 +816,12 @@
         std::move(software_device), frame_swap_message_queue_, true));
   }
 
-  return make_scoped_ptr(new MailboxOutputSurface(
+  return base::WrapUnique(new MailboxOutputSurface(
       routing_id(), output_surface_id, context_provider,
       worker_context_provider, frame_swap_message_queue_, cc::RGBA_8888));
 }
 
-scoped_ptr<cc::BeginFrameSource>
+std::unique_ptr<cc::BeginFrameSource>
 RenderWidget::CreateExternalBeginFrameSource() {
   return compositor_deps_->CreateExternalBeginFrameSource(routing_id_);
 }
@@ -896,8 +899,10 @@
 }
 
 void RenderWidget::RecordFrameTimingEvents(
-    scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events,
-    scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
+    std::unique_ptr<cc::FrameTimingTracker::CompositeTimingSet>
+        composite_events,
+    std::unique_ptr<cc::FrameTimingTracker::MainFrameTimingSet>
+        main_frame_events) {
   for (const auto& composite_event : *composite_events) {
     int64_t frameId = composite_event.first;
     const std::vector<cc::FrameTimingTracker::CompositeTimingEvent>& events =
@@ -1014,7 +1019,8 @@
   Send(new InputHostMsg_DidOverscroll(routing_id_, params));
 }
 
-void RenderWidget::OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) {
+void RenderWidget::OnInputEventAck(
+    std::unique_ptr<InputEventAck> input_event_ack) {
   Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, *input_event_ack));
 }
 
@@ -1316,19 +1322,18 @@
 }
 
 // static
-scoped_ptr<cc::SwapPromise> RenderWidget::QueueMessageImpl(
+std::unique_ptr<cc::SwapPromise> RenderWidget::QueueMessageImpl(
     IPC::Message* msg,
     MessageDeliveryPolicy policy,
     FrameSwapMessageQueue* frame_swap_message_queue,
     scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
     int source_frame_number) {
   bool first_message_for_frame = false;
-  frame_swap_message_queue->QueueMessageForFrame(policy,
-                                                 source_frame_number,
-                                                 make_scoped_ptr(msg),
+  frame_swap_message_queue->QueueMessageForFrame(policy, source_frame_number,
+                                                 base::WrapUnique(msg),
                                                  &first_message_for_frame);
   if (first_message_for_frame) {
-    scoped_ptr<cc::SwapPromise> promise(new QueueMessageSwapPromise(
+    std::unique_ptr<cc::SwapPromise> promise(new QueueMessageSwapPromise(
         sync_message_filter, frame_swap_message_queue, source_frame_number));
     return promise;
   }
@@ -1343,10 +1348,8 @@
     return;
   }
 
-  scoped_ptr<cc::SwapPromise> swap_promise =
-      QueueMessageImpl(msg,
-                       policy,
-                       frame_swap_message_queue_.get(),
+  std::unique_ptr<cc::SwapPromise> swap_promise =
+      QueueMessageImpl(msg, policy, frame_swap_message_queue_.get(),
                        RenderThreadImpl::current()->sync_message_filter(),
                        compositor_->GetSourceFrameNumber());
 
@@ -1431,7 +1434,7 @@
 }
 
 void RenderWidget::QueueSyntheticGesture(
-    scoped_ptr<SyntheticGestureParams> gesture_params,
+    std::unique_ptr<SyntheticGestureParams> gesture_params,
     const SyntheticGestureCompletionCallback& callback) {
   DCHECK(!callback.is_null());
 
@@ -2093,7 +2096,7 @@
 #endif
 }
 
-scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
+std::unique_ptr<WebGraphicsContext3DCommandBufferImpl>
 RenderWidget::CreateGraphicsContext3D(gpu::GpuChannelHost* gpu_channel_host) {
   // This is for an offscreen context for raster in the compositor. So the
   // default framebuffer doesn't need alpha, depth, stencil, antialiasing.
@@ -2143,7 +2146,7 @@
   bool share_resources = true;
   bool automatic_flushes = false;
 
-  return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl(
+  return base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl(
       gpu::kNullSurfaceHandle, GetURLForGraphicsContext3D(), gpu_channel_host,
       attributes, gfx::PreferIntegratedGpu, share_resources, automatic_flushes,
       limits, nullptr));
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index d885190..612f2c1a 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -10,12 +10,12 @@
 
 #include <deque>
 #include <map>
+#include <memory>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -185,8 +185,10 @@
                            float page_scale,
                            float top_controls_delta) override;
   void BeginMainFrame(double frame_time_sec) override;
-  scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) override;
-  scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource() override;
+  std::unique_ptr<cc::OutputSurface> CreateOutputSurface(
+      bool fallback) override;
+  std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource()
+      override;
   void DidCommitAndDrawCompositorFrame() override;
   void DidCommitCompositorFrame() override;
   void DidCompletePageScaleAnimation() override;
@@ -198,9 +200,10 @@
   void OnSwapBuffersComplete() override;
   void OnSwapBuffersPosted() override;
   void RecordFrameTimingEvents(
-      scoped_ptr<cc::FrameTimingTracker::CompositeTimingSet> composite_events,
-      scoped_ptr<cc::FrameTimingTracker::MainFrameTimingSet> main_frame_events)
-      override;
+      std::unique_ptr<cc::FrameTimingTracker::CompositeTimingSet>
+          composite_events,
+      std::unique_ptr<cc::FrameTimingTracker::MainFrameTimingSet>
+          main_frame_events) override;
   void RequestScheduleAnimation() override;
   void UpdateVisualState() override;
   void WillBeginCompositorFrame() override;
@@ -217,7 +220,7 @@
 
   void OnDidHandleKeyEvent() override;
   void OnDidOverscroll(const DidOverscrollParams& params) override;
-  void OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) override;
+  void OnInputEventAck(std::unique_ptr<InputEventAck> input_event_ack) override;
   void NotifyInputEventHandled(
       blink::WebInputEvent::Type handled_type) override;
   void SetInputHandler(RenderWidgetInputHandler* input_handler) override;
@@ -307,7 +310,7 @@
   // Send a synthetic gesture to the browser to be queued to the synthetic
   // gesture controller.
   void QueueSyntheticGesture(
-      scoped_ptr<SyntheticGestureParams> gesture_params,
+      std::unique_ptr<SyntheticGestureParams> gesture_params,
       const SyntheticGestureCompletionCallback& callback);
 
   // Deliveres |message| together with compositor state change updates. The
@@ -512,7 +515,7 @@
 
   // QueueMessage implementation extracted into a static method for easy
   // testing.
-  static scoped_ptr<cc::SwapPromise> QueueMessageImpl(
+  static std::unique_ptr<cc::SwapPromise> QueueMessageImpl(
       IPC::Message* msg,
       MessageDeliveryPolicy policy,
       FrameSwapMessageQueue* frame_swap_message_queue,
@@ -559,8 +562,8 @@
   void didUpdateTextOfFocusedElementByNonUserInput() override;
 
   // Creates a 3D context associated with this view.
-  scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D(
-      gpu::GpuChannelHost* gpu_channel_host);
+  std::unique_ptr<WebGraphicsContext3DCommandBufferImpl>
+  CreateGraphicsContext3D(gpu::GpuChannelHost* gpu_channel_host);
 
   // Sends an ACK to the browser process during the next compositor frame.
   void OnWaitNextFrameForTests(int routing_id);
@@ -581,7 +584,7 @@
   RenderWidgetOwnerDelegate* owner_delegate_;
 
   // This is lazily constructed and must not outlive webwidget_.
-  scoped_ptr<RenderWidgetCompositor> compositor_;
+  std::unique_ptr<RenderWidgetCompositor> compositor_;
 
   // Set to the ID of the view that initiated creating this view, if any. When
   // the view was initiated by the browser (the common case), this will be
@@ -703,7 +706,7 @@
   gfx::Rect view_screen_rect_;
   gfx::Rect window_screen_rect_;
 
-  scoped_ptr<RenderWidgetInputHandler> input_handler_;
+  std::unique_ptr<RenderWidgetInputHandler> input_handler_;
 
   // The time spent in input handlers this frame. Used to throttle input acks.
   base::TimeDelta total_input_handling_time_this_frame_;
@@ -738,7 +741,7 @@
   std::deque<blink::WebTextInputInfo> text_input_info_history_;
 #endif
 
-  scoped_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_;
+  std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_;
 
   // Popups may be displaced when screen metrics emulation is enabled.
   // These values are used to properly adjust popup position.
@@ -747,7 +750,7 @@
   float popup_origin_scale_for_emulation_;
 
   scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
-  scoped_ptr<ResizingModeSelector> resizing_mode_selector_;
+  std::unique_ptr<ResizingModeSelector> resizing_mode_selector_;
 
   // Lists of RenderFrameProxy objects that need to be notified of
   // compositing-related events (e.g. DidCommitCompositorFrame).
@@ -764,7 +767,7 @@
   bool has_host_context_menu_location_;
   gfx::Point host_context_menu_location_;
 
-  scoped_ptr<scheduler::RenderWidgetSchedulingState>
+  std::unique_ptr<scheduler::RenderWidgetSchedulingState>
       render_widget_scheduling_state_;
 
  private:
diff --git a/content/renderer/render_widget_browsertest.cc b/content/renderer/render_widget_browsertest.cc
index 489536d..69dd2e4 100644
--- a/content/renderer/render_widget_browsertest.cc
+++ b/content/renderer/render_widget_browsertest.cc
@@ -82,8 +82,8 @@
       : RenderWidgetTest(), initial_size_(200, 100) {}
 
  protected:
-  scoped_ptr<ResizeParams> InitialSizeParams() override {
-    scoped_ptr<ResizeParams> initial_size_params(new ResizeParams());
+  std::unique_ptr<ResizeParams> InitialSizeParams() override {
+    std::unique_ptr<ResizeParams> initial_size_params(new ResizeParams());
     initial_size_params->new_size = initial_size_;
     initial_size_params->physical_backing_size = initial_size_;
     initial_size_params->needs_resize_ack = true;
diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h
index 7f4bd448..b1ef6b4 100644
--- a/content/renderer/render_widget_fullscreen_pepper.h
+++ b/content/renderer/render_widget_fullscreen_pepper.h
@@ -7,8 +7,9 @@
 
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/renderer/mouse_lock_dispatcher.h"
 #include "content/renderer/pepper/fullscreen_container.h"
 #include "content/renderer/render_widget_fullscreen.h"
@@ -82,7 +83,7 @@
 
   blink::WebLayer* layer_;
 
-  scoped_ptr<MouseLockDispatcher> mouse_lock_dispatcher_;
+  std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper);
 };
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 45da15f57..fa17206 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -11,6 +11,7 @@
 #include "base/lazy_instance.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/shared_memory.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_conversions.h"
@@ -300,7 +301,7 @@
   // data URLs to bypass the ResourceDispatcher.
   return new content::WebURLLoaderImpl(
       child_thread ? child_thread->resource_dispatcher() : NULL,
-      make_scoped_ptr(currentThread()->getWebTaskRunner()->clone()));
+      base::WrapUnique(currentThread()->getWebTaskRunner()->clone()));
 }
 
 blink::WebThread* RendererBlinkPlatformImpl::currentThread() {
@@ -1053,7 +1054,7 @@
   gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
   WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
 
-  scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
+  std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context(
       WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
           gpu_channel_host.get(), attributes, gpu_preference, share_resources,
           automatic_flushes, GURL(top_document_web_url), limits,
@@ -1190,7 +1191,7 @@
 
 void RendererBlinkPlatformImpl::SetPlatformEventObserverForTesting(
     blink::WebPlatformEventType type,
-    scoped_ptr<PlatformEventObserverBase> observer) {
+    std::unique_ptr<PlatformEventObserverBase> observer) {
   if (platform_event_observers_.Lookup(type))
     platform_event_observers_.Remove(type);
   platform_event_observers_.AddWithID(observer.release(), type);
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index eb197f8..be95c061c 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -8,10 +8,11 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/id_map.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "cc/blink/web_compositor_support_impl.h"
 #include "content/child/blink_platform_impl.h"
@@ -203,7 +204,7 @@
   // Note that |observer| will be owned by this object after the call.
   void SetPlatformEventObserverForTesting(
       blink::WebPlatformEventType type,
-      scoped_ptr<PlatformEventObserverBase> observer);
+      std::unique_ptr<PlatformEventObserverBase> observer);
 
   // Disables the WebSandboxSupport implementation for testing.
   // Tests that do not set up a full sandbox environment should call
@@ -243,20 +244,20 @@
   void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type);
   device::VibrationManagerPtr& GetConnectedVibrationManagerService();
 
-  scoped_ptr<blink::WebThread> main_thread_;
+  std::unique_ptr<blink::WebThread> main_thread_;
 
-  scoped_ptr<RendererClipboardDelegate> clipboard_delegate_;
-  scoped_ptr<WebClipboardImpl> clipboard_;
+  std::unique_ptr<RendererClipboardDelegate> clipboard_delegate_;
+  std::unique_ptr<WebClipboardImpl> clipboard_;
 
   class FileUtilities;
-  scoped_ptr<FileUtilities> file_utilities_;
+  std::unique_ptr<FileUtilities> file_utilities_;
 
   class MimeRegistry;
-  scoped_ptr<MimeRegistry> mime_registry_;
+  std::unique_ptr<MimeRegistry> mime_registry_;
 
 #if !defined(OS_ANDROID) && !defined(OS_WIN)
   class SandboxSupport;
-  scoped_ptr<SandboxSupport> sandbox_support_;
+  std::unique_ptr<SandboxSupport> sandbox_support_;
 #endif
 
   // This counter keeps track of the number of times sudden termination is
@@ -268,15 +269,15 @@
   // If true, then a GetPlugins call is allowed to rescan the disk.
   bool plugin_refresh_allowed_;
 
-  scoped_ptr<blink::WebIDBFactory> web_idb_factory_;
+  std::unique_ptr<blink::WebIDBFactory> web_idb_factory_;
 
-  scoped_ptr<blink::WebBlobRegistry> blob_registry_;
+  std::unique_ptr<blink::WebBlobRegistry> blob_registry_;
 
   WebPublicSuffixListImpl public_suffix_list_;
 
-  scoped_ptr<DeviceLightEventPump> device_light_event_pump_;
-  scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_;
-  scoped_ptr<DeviceOrientationEventPump> device_orientation_event_pump_;
+  std::unique_ptr<DeviceLightEventPump> device_light_event_pump_;
+  std::unique_ptr<DeviceMotionEventPump> device_motion_event_pump_;
+  std::unique_ptr<DeviceOrientationEventPump> device_orientation_event_pump_;
 
   scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_;
@@ -284,11 +285,11 @@
   scoped_refptr<ThreadSafeSender> thread_safe_sender_;
   scoped_refptr<QuotaMessageFilter> quota_message_filter_;
 
-  scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
+  std::unique_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
 
   cc_blink::WebCompositorSupportImpl compositor_support_;
 
-  scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
+  std::unique_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
 
   // Handle to the Vibration mojo service.
   device::VibrationManagerPtr vibration_manager_;
@@ -300,9 +301,9 @@
 
   WebTrialTokenValidatorImpl trial_token_validator_;
 
-  scoped_ptr<LocalStorageCachedAreas> local_storage_cached_areas_;
+  std::unique_ptr<LocalStorageCachedAreas> local_storage_cached_areas_;
 
-  scoped_ptr<BlinkServiceRegistryImpl> blink_service_registry_;
+  std::unique_ptr<BlinkServiceRegistryImpl> blink_service_registry_;
 
   DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl);
 };
diff --git a/content/renderer/renderer_clipboard_delegate.cc b/content/renderer/renderer_clipboard_delegate.cc
index 6ce0203..cd72839 100644
--- a/content/renderer/renderer_clipboard_delegate.cc
+++ b/content/renderer/renderer_clipboard_delegate.cc
@@ -127,7 +127,7 @@
   DCHECK_EQ(bitmap.colorType(), kN32_SkColorType);
 
   const gfx::Size size(bitmap.width(), bitmap.height());
-  scoped_ptr<base::SharedMemory> shared_buf;
+  std::unique_ptr<base::SharedMemory> shared_buf;
   {
     SkAutoLockPixels locked(bitmap);
     void* pixels = bitmap.getPixels();
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 661319b2..e989b27 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -75,8 +75,8 @@
 }
 
 #if defined(USE_OZONE)
-base::LazyInstance<scoped_ptr<ui::ClientNativePixmapFactory>> g_pixmap_factory =
-    LAZY_INSTANCE_INITIALIZER;
+base::LazyInstance<std::unique_ptr<ui::ClientNativePixmapFactory>>
+    g_pixmap_factory = LAZY_INSTANCE_INITIALIZER;
 #endif
 
 }  // namespace
@@ -135,12 +135,12 @@
   // As long as scrollbars on Mac are painted with Cocoa, the message pump
   // needs to be backed by a Foundation-level loop to process NSTimers. See
   // http://crbug.com/306348#c24 for details.
-  scoped_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop());
-  scoped_ptr<base::MessageLoop> main_message_loop(
+  std::unique_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop());
+  std::unique_ptr<base::MessageLoop> main_message_loop(
       new base::MessageLoop(std::move(pump)));
 #else
   // The main message loop of the renderer services doesn't have IO or UI tasks.
-  scoped_ptr<base::MessageLoop> main_message_loop(new base::MessageLoop());
+  std::unique_ptr<base::MessageLoop> main_message_loop(new base::MessageLoop());
 #endif
 
   base::PlatformThread::SetName("CrRendererMain");
@@ -167,13 +167,13 @@
     DCHECK(result);
   }
 
-  scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+  std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
   feature_list->InitializeFromCommandLine(
       parsed_command_line.GetSwitchValueASCII(switches::kEnableFeatures),
       parsed_command_line.GetSwitchValueASCII(switches::kDisableFeatures));
   base::FeatureList::SetInstance(std::move(feature_list));
 
-  scoped_ptr<scheduler::RendererScheduler> renderer_scheduler(
+  std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler(
       scheduler::RendererScheduler::Create());
 
   // PlatformInitialize uses FieldTrials, so this must happen later.
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index 25381a5..0277d3e 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -6,9 +6,10 @@
 
 #include <dwrite.h>
 
+#include <memory>
+
 #include "base/command_line.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "base/win/scoped_comptr.h"
 #include "base/win/win_util.h"
@@ -65,7 +66,7 @@
     // After TimeZone::createDefault is called once here, the timezone ID is
     // cached and there's no more need to access the registry. If the sandbox
     // is disabled, we don't have to make this dummy call.
-    scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
+    std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
 
     if (use_direct_write) {
       InitializeDWriteFontProxy();
diff --git a/content/renderer/resource_fetcher_browsertest.cc b/content/renderer/resource_fetcher_browsertest.cc
index f525de4..66e3291 100644
--- a/content/renderer/resource_fetcher_browsertest.cc
+++ b/content/renderer/resource_fetcher_browsertest.cc
@@ -124,7 +124,7 @@
   }
 
  private:
-  scoped_ptr<ResourceFetcher> fetcher_;
+  std::unique_ptr<ResourceFetcher> fetcher_;
 };
 
 class ResourceFetcherTests : public ContentBrowserTest {
@@ -151,8 +151,8 @@
   void ResourceFetcherDownloadOnRenderer(const GURL& url) {
     WebFrame* frame = GetRenderView()->GetWebView()->mainFrame();
 
-    scoped_ptr<FetcherDelegate> delegate(new FetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<FetcherDelegate> delegate(new FetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->Start(frame,
                    WebURLRequest::RequestContextInternal,
                    WebURLRequest::FrameTypeNone,
@@ -170,8 +170,8 @@
   void ResourceFetcher404OnRenderer(const GURL& url) {
     WebFrame* frame = GetRenderView()->GetWebView()->mainFrame();
 
-    scoped_ptr<FetcherDelegate> delegate(new FetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<FetcherDelegate> delegate(new FetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->Start(frame,
                    WebURLRequest::RequestContextInternal,
                    WebURLRequest::FrameTypeNone,
@@ -189,8 +189,8 @@
 
     // Try to fetch a page on a site that doesn't exist.
     GURL url("http://localhost:1339/doesnotexist");
-    scoped_ptr<FetcherDelegate> delegate(new FetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<FetcherDelegate> delegate(new FetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->Start(frame,
                    WebURLRequest::RequestContextInternal,
                    WebURLRequest::FrameTypeNone,
@@ -210,8 +210,8 @@
   void ResourceFetcherTimeoutOnRenderer(const GURL& url) {
     WebFrame* frame = GetRenderView()->GetWebView()->mainFrame();
 
-    scoped_ptr<FetcherDelegate> delegate(new FetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<FetcherDelegate> delegate(new FetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->Start(frame,
                    WebURLRequest::RequestContextInternal,
                    WebURLRequest::FrameTypeNone,
@@ -232,8 +232,8 @@
   void ResourceFetcherDeletedInCallbackOnRenderer(const GURL& url) {
     WebFrame* frame = GetRenderView()->GetWebView()->mainFrame();
 
-    scoped_ptr<EvilFetcherDelegate> delegate(new EvilFetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<EvilFetcherDelegate> delegate(new EvilFetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->Start(frame,
                    WebURLRequest::RequestContextInternal,
                    WebURLRequest::FrameTypeNone,
@@ -251,8 +251,8 @@
 
     WebFrame* frame = GetRenderView()->GetWebView()->mainFrame();
 
-    scoped_ptr<FetcherDelegate> delegate(new FetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<FetcherDelegate> delegate(new FetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->SetMethod("POST");
     fetcher->SetBody(kBody);
     fetcher->Start(frame,
@@ -272,8 +272,8 @@
 
     WebFrame* frame = GetRenderView()->GetWebView()->mainFrame();
 
-    scoped_ptr<FetcherDelegate> delegate(new FetcherDelegate);
-    scoped_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
+    std::unique_ptr<FetcherDelegate> delegate(new FetcherDelegate);
+    std::unique_ptr<ResourceFetcher> fetcher(ResourceFetcher::Create(url));
     fetcher->SetHeader("header", kHeader);
     fetcher->Start(frame,
                    WebURLRequest::RequestContextInternal,
diff --git a/content/renderer/sad_plugin.cc b/content/renderer/sad_plugin.cc
index 163ae99..f2b0886 100644
--- a/content/renderer/sad_plugin.cc
+++ b/content/renderer/sad_plugin.cc
@@ -5,8 +5,8 @@
 #include "content/renderer/sad_plugin.h"
 
 #include <algorithm>
+#include <memory>
 
-#include "base/memory/scoped_ptr.h"
 #include "skia/ext/platform_canvas.h"
 #include "ui/gfx/geometry/rect.h"
 
diff --git a/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc b/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
index 15a2334..35d87a2 100644
--- a/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
+++ b/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
@@ -188,7 +188,7 @@
   ScopedMessages sent_messages_;
 
  private:
-  scoped_ptr<ResourceDispatchThrottlerForTest> throttler_;
+  std::unique_ptr<ResourceDispatchThrottlerForTest> throttler_;
   RendererSchedulerForTest scheduler_;
   int last_request_id_;
   bool flush_scheduled_;
diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc b/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
index c57f5d0c..4d9cf0226d 100644
--- a/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
+++ b/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
@@ -5,9 +5,9 @@
 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
 
 #include <list>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "content/common/screen_orientation_messages.h"
 #include "content/public/test/test_utils.h"
 #include "ipc/ipc_test_sink.h"
@@ -100,7 +100,7 @@
   }
 
   IPC::TestSink sink_;
-  scoped_ptr<ScreenOrientationDispatcher> dispatcher_;
+  std::unique_ptr<ScreenOrientationDispatcher> dispatcher_;
 };
 
 // Test that calling lockOrientation() followed by unlockOrientation() cancel
diff --git a/content/renderer/service_worker/embedded_worker_dispatcher.cc b/content/renderer/service_worker/embedded_worker_dispatcher.cc
index f4334ed..c3cfb32 100644
--- a/content/renderer/service_worker/embedded_worker_dispatcher.cc
+++ b/content/renderer/service_worker/embedded_worker_dispatcher.cc
@@ -4,7 +4,8 @@
 
 #include "content/renderer/service_worker/embedded_worker_dispatcher.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
@@ -39,8 +40,8 @@
 
  private:
   ScopedChildProcessReference process_ref_;
-  scoped_ptr<blink::WebEmbeddedWorker> worker_;
-  scoped_ptr<EmbeddedWorkerDevToolsAgent> dev_tools_agent_;
+  std::unique_ptr<blink::WebEmbeddedWorker> worker_;
+  std::unique_ptr<EmbeddedWorkerDevToolsAgent> dev_tools_agent_;
 };
 
 EmbeddedWorkerDispatcher::EmbeddedWorkerDispatcher() : weak_factory_(this) {}
@@ -78,16 +79,14 @@
     const EmbeddedWorkerMsg_StartWorker_Params& params) {
   DCHECK(!workers_.Lookup(params.embedded_worker_id));
   TRACE_EVENT0("ServiceWorker", "EmbeddedWorkerDispatcher::OnStartWorker");
-  scoped_ptr<WorkerWrapper> wrapper(
-      new WorkerWrapper(blink::WebEmbeddedWorker::create(
-                            new ServiceWorkerContextClient(
-                                params.embedded_worker_id,
-                                params.service_worker_version_id,
-                                params.scope,
-                                params.script_url,
-                                params.worker_devtools_agent_route_id),
-                            NULL),
-                        params.worker_devtools_agent_route_id));
+  std::unique_ptr<WorkerWrapper> wrapper(new WorkerWrapper(
+      blink::WebEmbeddedWorker::create(
+          new ServiceWorkerContextClient(params.embedded_worker_id,
+                                         params.service_worker_version_id,
+                                         params.scope, params.script_url,
+                                         params.worker_devtools_agent_route_id),
+          NULL),
+      params.worker_devtools_agent_route_id));
 
   blink::WebEmbeddedWorkerStartData start_data;
   start_data.scriptURL = params.script_url;
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index 8d566ab7..64c72d8 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -97,7 +97,7 @@
     ServiceWorkerNetworkProvider* provider =
         ServiceWorkerNetworkProvider::FromDocumentState(
             static_cast<DataSourceExtraData*>(data_source->getExtraData()));
-    scoped_ptr<RequestExtraData> extra_data(new RequestExtraData);
+    std::unique_ptr<RequestExtraData> extra_data(new RequestExtraData);
     extra_data->set_service_worker_provider_id(provider->provider_id());
     extra_data->set_originated_from_service_worker(true);
     request.setExtraData(extra_data.release());
@@ -109,7 +109,7 @@
     int routing_id,
     const std::string& uuid,
     const base::string16& message,
-    scoped_ptr<blink::WebMessagePortChannelArray> channels) {
+    std::unique_ptr<blink::WebMessagePortChannelArray> channels) {
   sender->Send(new ServiceWorkerHostMsg_PostMessageToClient(
       routing_id, uuid, message,
       WebMessagePortChannelImpl::ExtractMessagePortIDs(std::move(channels))));
@@ -567,9 +567,9 @@
 
   // Create a content::ServiceWorkerNetworkProvider for this data source so
   // we can observe its requests.
-  scoped_ptr<ServiceWorkerNetworkProvider> provider(
-      new ServiceWorkerNetworkProvider(
-          MSG_ROUTING_NONE, SERVICE_WORKER_PROVIDER_FOR_CONTROLLER));
+  std::unique_ptr<ServiceWorkerNetworkProvider> provider(
+      new ServiceWorkerNetworkProvider(MSG_ROUTING_NONE,
+                                       SERVICE_WORKER_PROVIDER_FOR_CONTROLLER));
   provider_context_ = provider->context();
 
   // Tell the network provider about which version to load.
@@ -604,7 +604,7 @@
   // messages for MessagePort (e.g. QueueMessages) are sent from main thread
   // (with thread hopping), so we need to do the same thread hopping here not
   // to overtake those messages.
-  scoped_ptr<blink::WebMessagePortChannelArray> channel_array(channels);
+  std::unique_ptr<blink::WebMessagePortChannelArray> channel_array(channels);
   main_thread_task_runner_->PostTask(
       FROM_HERE, base::Bind(&SendPostMessageToClientOnMainThread,
                             base::RetainedRef(sender_), GetRoutingID(),
@@ -731,7 +731,7 @@
   }
 
   DCHECK(params.source.service_worker_info.IsValid());
-  scoped_ptr<ServiceWorkerHandleReference> handle =
+  std::unique_ptr<ServiceWorkerHandleReference> handle =
       ServiceWorkerHandleReference::Adopt(params.source.service_worker_info,
                                           sender_.get());
   ServiceWorkerDispatcher* dispatcher =
@@ -867,7 +867,7 @@
     NOTREACHED() << "Got stray response: " << request_id;
     return;
   }
-  scoped_ptr<blink::WebServiceWorkerClientInfo> web_client;
+  std::unique_ptr<blink::WebServiceWorkerClientInfo> web_client;
   if (!client.IsEmpty()) {
     DCHECK(client.IsValid());
     web_client.reset(new blink::WebServiceWorkerClientInfo(
@@ -908,7 +908,7 @@
     NOTREACHED() << "Got stray response: " << request_id;
     return;
   }
-  scoped_ptr<blink::WebServiceWorkerClientInfo> web_client;
+  std::unique_ptr<blink::WebServiceWorkerClientInfo> web_client;
   if (!client.IsEmpty()) {
     DCHECK(client.IsValid());
     web_client.reset(new blink::WebServiceWorkerClientInfo(
@@ -947,7 +947,7 @@
   }
   if (!client.IsEmpty()) {
     DCHECK(client.IsValid());
-    scoped_ptr<blink::WebServiceWorkerClientInfo> web_client (
+    std::unique_ptr<blink::WebServiceWorkerClientInfo> web_client(
         new blink::WebServiceWorkerClientInfo(
             ToWebServiceWorkerClientInfo(client)));
     callback->onSuccess(std::move(web_client));
@@ -971,7 +971,7 @@
     NOTREACHED() << "Got stray response: " << request_id;
     return;
   }
-  scoped_ptr<blink::WebServiceWorkerClientInfo> web_client;
+  std::unique_ptr<blink::WebServiceWorkerClientInfo> web_client;
   if (!client.IsEmpty()) {
     DCHECK(client.IsValid());
     web_client.reset(new blink::WebServiceWorkerClientInfo(
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 5cc4121d..e67189c 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -9,13 +9,13 @@
 #include <stdint.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/id_map.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
 #include "content/child/webmessageportchannel_impl.h"
@@ -257,7 +257,7 @@
 
   // Initialized on the worker thread in workerContextStarted and
   // destructed on the worker thread in willDestroyWorkerContext.
-  scoped_ptr<WorkerContextData> context_;
+  std::unique_ptr<WorkerContextData> context_;
 
   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
 };
diff --git a/content/renderer/service_worker/service_worker_type_util.cc b/content/renderer/service_worker/service_worker_type_util.cc
index 07c0e6b..9eb9f9c6 100644
--- a/content/renderer/service_worker/service_worker_type_util.cc
+++ b/content/renderer/service_worker/service_worker_type_util.cc
@@ -4,9 +4,9 @@
 
 #include "content/renderer/service_worker/service_worker_type_util.h"
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
@@ -38,8 +38,9 @@
   ServiceWorkerHeaderMap* headers_;
 };
 
-scoped_ptr<HeaderVisitor> MakeHeaderVisitor(ServiceWorkerHeaderMap* headers) {
-  return scoped_ptr<HeaderVisitor>(new HeaderVisitor(headers));
+std::unique_ptr<HeaderVisitor> MakeHeaderVisitor(
+    ServiceWorkerHeaderMap* headers) {
+  return std::unique_ptr<HeaderVisitor>(new HeaderVisitor(headers));
 }
 
 }  // namespace
diff --git a/content/renderer/shared_memory_seqlock_reader.h b/content/renderer/shared_memory_seqlock_reader.h
index 7d5bc936..a7a7a222 100644
--- a/content/renderer/shared_memory_seqlock_reader.h
+++ b/content/renderer/shared_memory_seqlock_reader.h
@@ -7,9 +7,10 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "content/common/shared_memory_seqlock_buffer.h"
 
@@ -30,7 +31,7 @@
 
   static const int kMaximumContentionCount = 10;
   base::SharedMemoryHandle renderer_shared_memory_handle_;
-  scoped_ptr<base::SharedMemory> renderer_shared_memory_;
+  std::unique_ptr<base::SharedMemory> renderer_shared_memory_;
 };
 
 }  // namespace internal
@@ -63,7 +64,7 @@
 
  private:
   SharedMemorySeqLockBuffer<Data>* buffer_;
-  scoped_ptr<Data> temp_buffer_;
+  std::unique_ptr<Data> temp_buffer_;
 
   DISALLOW_COPY_AND_ASSIGN(SharedMemorySeqLockReader);
 };
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc
index 45189302..1f4a93e 100644
--- a/content/renderer/skia_benchmarking_extension.cc
+++ b/content/renderer/skia_benchmarking_extension.cc
@@ -49,7 +49,7 @@
   if (gfx::PNGCodec::Decode(data, size, bm))
     return true;
   // Try JPEG.
-  scoped_ptr<SkBitmap> decoded_jpeg(gfx::JPEGCodec::Decode(data, size));
+  std::unique_ptr<SkBitmap> decoded_jpeg(gfx::JPEGCodec::Decode(data, size));
   if (decoded_jpeg) {
     *bm = *decoded_jpeg;
     return true;
@@ -57,15 +57,16 @@
   return false;
 }
 
-scoped_ptr<base::Value> ParsePictureArg(v8::Isolate* isolate,
-                                        v8::Local<v8::Value> arg) {
-  scoped_ptr<content::V8ValueConverter> converter(
+std::unique_ptr<base::Value> ParsePictureArg(v8::Isolate* isolate,
+                                             v8::Local<v8::Value> arg) {
+  std::unique_ptr<content::V8ValueConverter> converter(
       content::V8ValueConverter::create());
-  return scoped_ptr<base::Value>(
+  return std::unique_ptr<base::Value>(
       converter->FromV8Value(arg, isolate->GetCurrentContext()));
 }
 
-scoped_ptr<Picture> CreatePictureFromEncodedString(const std::string& encoded) {
+std::unique_ptr<Picture> CreatePictureFromEncodedString(
+    const std::string& encoded) {
   std::string decoded;
   base::Base64Decode(encoded, &decoded);
   SkMemoryStream stream(decoded.data(), decoded.size());
@@ -75,15 +76,15 @@
   if (!skpicture)
     return nullptr;
 
-  scoped_ptr<Picture> picture(new Picture);
+  std::unique_ptr<Picture> picture(new Picture);
   picture->layer_rect = gfx::SkIRectToRect(skpicture->cullRect().roundOut());
   picture->picture = std::move(skpicture);
   return picture;
 }
 
-scoped_ptr<Picture> ParsePictureStr(v8::Isolate* isolate,
-                                    v8::Local<v8::Value> arg) {
-  scoped_ptr<base::Value> picture_value = ParsePictureArg(isolate, arg);
+std::unique_ptr<Picture> ParsePictureStr(v8::Isolate* isolate,
+                                         v8::Local<v8::Value> arg) {
+  std::unique_ptr<base::Value> picture_value = ParsePictureArg(isolate, arg);
   if (!picture_value)
     return nullptr;
   // Decode the picture from base64.
@@ -93,9 +94,9 @@
   return CreatePictureFromEncodedString(encoded);
 }
 
-scoped_ptr<Picture> ParsePictureHash(v8::Isolate* isolate,
-                                     v8::Local<v8::Value> arg) {
-  scoped_ptr<base::Value> picture_value = ParsePictureArg(isolate, arg);
+std::unique_ptr<Picture> ParsePictureHash(v8::Isolate* isolate,
+                                          v8::Local<v8::Value> arg) {
+  std::unique_ptr<base::Value> picture_value = ParsePictureArg(isolate, arg);
   if (!picture_value)
     return nullptr;
   const base::DictionaryValue* value = nullptr;
@@ -179,7 +180,7 @@
     return;
   v8::Local<v8::Value> picture_handle;
   args->GetNext(&picture_handle);
-  scoped_ptr<Picture> picture = ParsePictureHash(isolate, picture_handle);
+  std::unique_ptr<Picture> picture = ParsePictureHash(isolate, picture_handle);
   if (!picture.get())
     return;
 
@@ -192,9 +193,9 @@
   if (!args->PeekNext().IsEmpty()) {
     v8::Local<v8::Value> params;
     args->GetNext(&params);
-    scoped_ptr<content::V8ValueConverter> converter(
+    std::unique_ptr<content::V8ValueConverter> converter(
         content::V8ValueConverter::create());
-    scoped_ptr<base::Value> params_value(
+    std::unique_ptr<base::Value> params_value(
         converter->FromV8Value(params, context));
 
     const base::DictionaryValue* params_dict = NULL;
@@ -263,7 +264,7 @@
     return;
   v8::Local<v8::Value> picture_handle;
   args->GetNext(&picture_handle);
-  scoped_ptr<Picture> picture = ParsePictureHash(isolate, picture_handle);
+  std::unique_ptr<Picture> picture = ParsePictureHash(isolate, picture_handle);
   if (!picture.get())
     return;
 
@@ -272,7 +273,7 @@
   picture->picture->playback(&benchmarking_canvas);
 
   v8::Local<v8::Context> context = isolate->GetCurrentContext();
-  scoped_ptr<content::V8ValueConverter> converter(
+  std::unique_ptr<content::V8ValueConverter> converter(
       content::V8ValueConverter::create());
 
   args->Return(converter->ToV8Value(&benchmarking_canvas.Commands(), context));
@@ -284,7 +285,7 @@
     return;
   v8::Local<v8::Value> picture_handle;
   args->GetNext(&picture_handle);
-  scoped_ptr<Picture> picture = ParsePictureHash(isolate, picture_handle);
+  std::unique_ptr<Picture> picture = ParsePictureHash(isolate, picture_handle);
   if (!picture.get())
     return;
 
@@ -325,7 +326,7 @@
     return;
   v8::Local<v8::Value> picture_handle;
   args->GetNext(&picture_handle);
-  scoped_ptr<Picture> picture = ParsePictureStr(isolate, picture_handle);
+  std::unique_ptr<Picture> picture = ParsePictureStr(isolate, picture_handle);
   if (!picture.get())
     return;
 
diff --git a/content/renderer/speech_recognition_dispatcher.cc b/content/renderer/speech_recognition_dispatcher.cc
index 9c207527..585b61c 100644
--- a/content/renderer/speech_recognition_dispatcher.cc
+++ b/content/renderer/speech_recognition_dispatcher.cc
@@ -272,7 +272,7 @@
 
   // The instantiation and type of SyncSocket is up to the client since it
   // is dependency injected to the SpeechRecognitionAudioSink.
-  scoped_ptr<base::SyncSocket> socket(new base::CancelableSyncSocket(
+  std::unique_ptr<base::SyncSocket> socket(new base::CancelableSyncSocket(
       base::SyncSocket::UnwrapHandle(descriptor)));
 
   speech_audio_sink_.reset(new SpeechRecognitionAudioSink(
diff --git a/content/renderer/speech_recognition_dispatcher.h b/content/renderer/speech_recognition_dispatcher.h
index 21eb831..bde0bdf0 100644
--- a/content/renderer/speech_recognition_dispatcher.h
+++ b/content/renderer/speech_recognition_dispatcher.h
@@ -6,9 +6,9 @@
 #define CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_
 
 #include <map>
+#include <memory>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "content/public/common/speech_recognition_result.h"
@@ -84,7 +84,7 @@
   blink::WebMediaStreamTrack audio_track_;
 
   // Audio sink used to provide audio from the track.
-  scoped_ptr<SpeechRecognitionAudioSink> speech_audio_sink_;
+  std::unique_ptr<SpeechRecognitionAudioSink> speech_audio_sink_;
 #endif
 
   typedef std::map<int, blink::WebSpeechRecognitionHandle> HandleMap;
diff --git a/content/renderer/text_input_client_observer.cc b/content/renderer/text_input_client_observer.cc
index b97be4a3..dec0181 100644
--- a/content/renderer/text_input_client_observer.cc
+++ b/content/renderer/text_input_client_observer.cc
@@ -6,7 +6,8 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "build/build_config.h"
 #include "content/common/text_input_client_messages.h"
 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
@@ -54,7 +55,7 @@
   NSAttributedString* string = blink::WebSubstringUtil::attributedWordAtPoint(
       webview(), point, baselinePoint);
 
-  scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
+  std::unique_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
       mac::AttributedStringCoder::Encode(string));
   Send(new TextInputClientReplyMsg_GotStringAtPoint(
       routing_id(), *encoded.get(), baselinePoint));
@@ -99,7 +100,7 @@
     string = blink::WebSubstringUtil::attributedSubstringInRange(
         frame, range.start(), range.length(), &baselinePoint);
   }
-  scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
+  std::unique_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
       mac::AttributedStringCoder::Encode(string));
   Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(),
       *encoded.get(), baselinePoint));
diff --git a/content/renderer/usb/web_usb_client_impl.cc b/content/renderer/usb/web_usb_client_impl.cc
index fc79424d..6f4c3af 100644
--- a/content/renderer/usb/web_usb_client_impl.cc
+++ b/content/renderer/usb/web_usb_client_impl.cc
@@ -12,7 +12,6 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/memory/ptr_util.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/move.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/child/mojo/type_converters.h"
@@ -39,7 +38,7 @@
 // for any type |T|.
 template <typename CallbacksType>
 void RejectCallbacksWithError(const blink::WebUSBError& error,
-                              scoped_ptr<CallbacksType> callbacks) {
+                              std::unique_ptr<CallbacksType> callbacks) {
   callbacks->onError(error);
 }
 
diff --git a/content/renderer/usb/web_usb_device_impl.cc b/content/renderer/usb/web_usb_device_impl.cc
index bb2ca99..b66fc2e 100644
--- a/content/renderer/usb/web_usb_device_impl.cc
+++ b/content/renderer/usb/web_usb_device_impl.cc
@@ -38,12 +38,12 @@
 // for any type |T|.
 template <typename CallbacksType>
 void RejectWithError(const blink::WebUSBError& error,
-                     scoped_ptr<CallbacksType> callbacks) {
+                     std::unique_ptr<CallbacksType> callbacks) {
   callbacks->onError(error);
 }
 
 template <typename CallbacksType>
-void RejectWithTransferError(scoped_ptr<CallbacksType> callbacks) {
+void RejectWithTransferError(std::unique_ptr<CallbacksType> callbacks) {
   RejectWithError(blink::WebUSBError(blink::WebUSBError::Error::Network,
                                      base::ASCIIToUTF16(kTransferFailed)),
                   std::move(callbacks));
@@ -124,7 +124,8 @@
       RejectWithTransferError(std::move(scoped_callbacks));
       return;
   }
-  scoped_ptr<blink::WebUSBTransferInfo> info(new blink::WebUSBTransferInfo());
+  std::unique_ptr<blink::WebUSBTransferInfo> info(
+      new blink::WebUSBTransferInfo());
   info->status.assign(
       std::vector<blink::WebUSBTransferInfo::Status>(1, web_status));
   info->data.assign(data);
@@ -150,7 +151,8 @@
   }
   // TODO(rockot): Device::ControlTransferOut should expose the number of bytes
   // actually transferred so we can send it from here.
-  scoped_ptr<blink::WebUSBTransferInfo> info(new blink::WebUSBTransferInfo());
+  std::unique_ptr<blink::WebUSBTransferInfo> info(
+      new blink::WebUSBTransferInfo());
   info->status.assign(
       std::vector<blink::WebUSBTransferInfo::Status>(1, web_status));
   info->bytesTransferred.assign(std::vector<uint32_t>(1, bytes_written));
@@ -162,7 +164,8 @@
     mojo::Array<uint8_t> data,
     mojo::Array<device::usb::IsochronousPacketPtr> packets) {
   auto scoped_callbacks = callbacks.PassCallbacks();
-  scoped_ptr<blink::WebUSBTransferInfo> info(new blink::WebUSBTransferInfo());
+  std::unique_ptr<blink::WebUSBTransferInfo> info(
+      new blink::WebUSBTransferInfo());
   info->data.assign(data);
   info->status =
       blink::WebVector<blink::WebUSBTransferInfo::Status>(packets.size());
@@ -193,7 +196,8 @@
     ScopedWebCallbacks<blink::WebUSBDeviceTransferCallbacks> callbacks,
     mojo::Array<device::usb::IsochronousPacketPtr> packets) {
   auto scoped_callbacks = callbacks.PassCallbacks();
-  scoped_ptr<blink::WebUSBTransferInfo> info(new blink::WebUSBTransferInfo());
+  std::unique_ptr<blink::WebUSBTransferInfo> info(
+      new blink::WebUSBTransferInfo());
   info->status =
       blink::WebVector<blink::WebUSBTransferInfo::Status>(packets.size());
   info->bytesTransferred = blink::WebVector<uint32_t>(packets.size());
diff --git a/content/renderer/usb/web_usb_device_impl.h b/content/renderer/usb/web_usb_device_impl.h
index dea2e8f..c72eaae 100644
--- a/content/renderer/usb/web_usb_device_impl.h
+++ b/content/renderer/usb/web_usb_device_impl.h
@@ -8,8 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "device/usb/public/interfaces/device.mojom.h"
 #include "device/usb/public/interfaces/device_manager.mojom.h"
diff --git a/content/renderer/web_ui_extension.cc b/content/renderer/web_ui_extension.cc
index 1429fd5..0751e6ee 100644
--- a/content/renderer/web_ui_extension.cc
+++ b/content/renderer/web_ui_extension.cc
@@ -4,7 +4,8 @@
 
 #include "content/renderer/web_ui_extension.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/values.h"
 #include "content/common/view_messages.h"
 #include "content/public/child/v8_value_converter.h"
@@ -96,7 +97,7 @@
 
   // If they've provided an optional message parameter, convert that into a
   // Value to send to the browser process.
-  scoped_ptr<base::ListValue> content;
+  std::unique_ptr<base::ListValue> content;
   if (args->PeekNext().IsEmpty() || args->PeekNext()->IsUndefined()) {
     content.reset(new base::ListValue());
   } else {
@@ -106,7 +107,7 @@
       return;
     }
 
-    scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
+    std::unique_ptr<V8ValueConverter> converter(V8ValueConverter::create());
 
     base::Value* value =
         converter->FromV8Value(obj, frame->mainWorldScriptContext());
diff --git a/content/test/test_blink_web_unit_test_support.h b/content/test/test_blink_web_unit_test_support.h
index 5139de8..1d3db91 100644
--- a/content/test/test_blink_web_unit_test_support.h
+++ b/content/test/test_blink_web_unit_test_support.h
@@ -8,6 +8,7 @@
 #include "base/compiler_specific.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "cc/blink/web_compositor_support_impl.h"
 #include "content/child/blink_platform_impl.h"
diff --git a/content/utility/utility_blink_platform_impl.h b/content/utility/utility_blink_platform_impl.h
index 3af3051..d66299e 100644
--- a/content/utility/utility_blink_platform_impl.h
+++ b/content/utility/utility_blink_platform_impl.h
@@ -6,6 +6,7 @@
 #define CONTENT_UTILITY_UTILITY_BLINK_PLATFORM_IMPL_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "content/child/blink_platform_impl.h"
 
 namespace content {
diff --git a/crypto/ec_private_key_nss.cc b/crypto/ec_private_key_nss.cc
index 989b7ad..8ca8f25ec 100644
--- a/crypto/ec_private_key_nss.cc
+++ b/crypto/ec_private_key_nss.cc
@@ -17,8 +17,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/nss_util.h"
 #include "crypto/nss_util_internal.h"
 #include "crypto/scoped_nss_types.h"
@@ -61,7 +62,7 @@
   if (!slot)
     return nullptr;
 
-  scoped_ptr<ECPrivateKey> result(new ECPrivateKey);
+  std::unique_ptr<ECPrivateKey> result(new ECPrivateKey);
 
   SECOidData* oid_data = SECOID_FindOIDByTag(SEC_OID_SECG_EC_SECP256R1);
   if (!oid_data) {
@@ -111,7 +112,7 @@
   if (!slot)
     return nullptr;
 
-  scoped_ptr<ECPrivateKey> result(new ECPrivateKey);
+  std::unique_ptr<ECPrivateKey> result(new ECPrivateKey);
 
   SECItem encoded_spki = {
     siBuffer,
@@ -224,7 +225,7 @@
 }
 
 ECPrivateKey* ECPrivateKey::Copy() const {
-  scoped_ptr<ECPrivateKey> copy(new ECPrivateKey);
+  std::unique_ptr<ECPrivateKey> copy(new ECPrivateKey);
   if (key_) {
     copy->key_ = SECKEY_CopyPrivateKey(key_);
     if (!copy->key_)
diff --git a/crypto/ec_private_key_openssl.cc b/crypto/ec_private_key_openssl.cc
index 1b6588b..5e8d054 100644
--- a/crypto/ec_private_key_openssl.cc
+++ b/crypto/ec_private_key_openssl.cc
@@ -13,8 +13,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/auto_cbb.h"
 #include "crypto/openssl_util.h"
 #include "crypto/scoped_openssl_types.h"
@@ -65,7 +66,7 @@
 }
 
 ECPrivateKey* ECPrivateKey::Copy() const {
-  scoped_ptr<ECPrivateKey> copy(new ECPrivateKey);
+  std::unique_ptr<ECPrivateKey> copy(new ECPrivateKey);
   if (key_)
     copy->key_ = EVP_PKEY_up_ref(key_);
   return copy.release();
@@ -79,7 +80,7 @@
   if (!ec_key.get() || !EC_KEY_generate_key(ec_key.get()))
     return NULL;
 
-  scoped_ptr<ECPrivateKey> result(new ECPrivateKey());
+  std::unique_ptr<ECPrivateKey> result(new ECPrivateKey());
   result->key_ = EVP_PKEY_new();
   if (!result->key_ || !EVP_PKEY_set1_EC_KEY(result->key_, ec_key.get()))
     return NULL;
@@ -128,7 +129,7 @@
     return NULL;
 
   // Create a new EVP_PKEY for it.
-  scoped_ptr<ECPrivateKey> result(new ECPrivateKey);
+  std::unique_ptr<ECPrivateKey> result(new ECPrivateKey);
   result->key_ = EVP_PKCS82PKEY(p8_decrypted.get());
   if (!result->key_ || EVP_PKEY_type(result->key_->type) != EVP_PKEY_EC)
     return NULL;
diff --git a/crypto/ec_private_key_unittest.cc b/crypto/ec_private_key_unittest.cc
index 27d5ecb..0fa8c8c 100644
--- a/crypto/ec_private_key_unittest.cc
+++ b/crypto/ec_private_key_unittest.cc
@@ -6,10 +6,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 // Generate random private keys. Export, then re-import. We should get
@@ -19,8 +19,10 @@
   const std::string password1;
   const std::string password2 = "test";
 
-  scoped_ptr<crypto::ECPrivateKey> keypair1(crypto::ECPrivateKey::Create());
-  scoped_ptr<crypto::ECPrivateKey> keypair2(crypto::ECPrivateKey::Create());
+  std::unique_ptr<crypto::ECPrivateKey> keypair1(
+      crypto::ECPrivateKey::Create());
+  std::unique_ptr<crypto::ECPrivateKey> keypair2(
+      crypto::ECPrivateKey::Create());
   ASSERT_TRUE(keypair1.get());
   ASSERT_TRUE(keypair2.get());
 
@@ -42,10 +44,10 @@
   EXPECT_TRUE(keypair1->ExportRawPublicKey(&raw_pubkey1));
   EXPECT_TRUE(keypair2->ExportRawPublicKey(&raw_pubkey2));
 
-  scoped_ptr<crypto::ECPrivateKey> keypair3(
+  std::unique_ptr<crypto::ECPrivateKey> keypair3(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           password1, privkey1, pubkey1));
-  scoped_ptr<crypto::ECPrivateKey> keypair4(
+  std::unique_ptr<crypto::ECPrivateKey> keypair4(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           password2, privkey2, pubkey2));
   ASSERT_TRUE(keypair3.get());
@@ -75,8 +77,9 @@
 }
 
 TEST(ECPrivateKeyUnitTest, Copy) {
-  scoped_ptr<crypto::ECPrivateKey> keypair1(crypto::ECPrivateKey::Create());
-  scoped_ptr<crypto::ECPrivateKey> keypair2(keypair1->Copy());
+  std::unique_ptr<crypto::ECPrivateKey> keypair1(
+      crypto::ECPrivateKey::Create());
+  std::unique_ptr<crypto::ECPrivateKey> keypair2(keypair1->Copy());
   ASSERT_TRUE(keypair1.get());
   ASSERT_TRUE(keypair2.get());
 
@@ -103,7 +106,7 @@
   const std::string password1;
   const std::string password2 = "test";
 
-  scoped_ptr<crypto::ECPrivateKey> keypair1(
+  std::unique_ptr<crypto::ECPrivateKey> keypair1(
       crypto::ECPrivateKey::Create());
   ASSERT_TRUE(keypair1.get());
 
@@ -113,7 +116,7 @@
       password1, 1, &privkey1));
   ASSERT_TRUE(keypair1->ExportPublicKey(&pubkey1));
 
-  scoped_ptr<crypto::ECPrivateKey> keypair2(
+  std::unique_ptr<crypto::ECPrivateKey> keypair2(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           password2, privkey1, pubkey1));
   ASSERT_FALSE(keypair2.get());
@@ -149,7 +152,7 @@
       0x2c, 0x3b, 0xe8, 0xdb, 0x19, 0xfc, 0x5e,
   };
 
-  scoped_ptr<crypto::ECPrivateKey> keypair_nss(
+  std::unique_ptr<crypto::ECPrivateKey> keypair_nss(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           "", std::vector<uint8_t>(std::begin(kNSSKey), std::end(kNSSKey)),
           std::vector<uint8_t>(std::begin(kNSSPublicKey),
@@ -195,7 +198,7 @@
       0xaa, 0x44, 0xff, 0xab, 0x4d, 0xb5, 0x7e, 0x25, 0x3d,
   };
 
-  scoped_ptr<crypto::ECPrivateKey> keypair_openssl(
+  std::unique_ptr<crypto::ECPrivateKey> keypair_openssl(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           "",
           std::vector<uint8_t>(std::begin(kOpenSSLKey), std::end(kOpenSSLKey)),
@@ -291,7 +294,7 @@
       0x41, 0x3b, 0x0d, 0x10, 0xa7, 0x4a, 0x93, 0xdb, 0x5a, 0xe7, 0xec,
   };
 
-  scoped_ptr<crypto::ECPrivateKey> keypair_openssl(
+  std::unique_ptr<crypto::ECPrivateKey> keypair_openssl(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           "",
           std::vector<uint8_t>(std::begin(kOpenSSLKey), std::end(kOpenSSLKey)),
diff --git a/crypto/ec_signature_creator_unittest.cc b/crypto/ec_signature_creator_unittest.cc
index 5aa27f21..018ba54a 100644
--- a/crypto/ec_signature_creator_unittest.cc
+++ b/crypto/ec_signature_creator_unittest.cc
@@ -6,10 +6,10 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "crypto/ec_private_key.h"
 #include "crypto/signature_verifier.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -19,7 +19,7 @@
 
 TEST(ECSignatureCreatorTest, BasicTest) {
   // Do a verify round trip.
-  scoped_ptr<crypto::ECPrivateKey> key_original(
+  std::unique_ptr<crypto::ECPrivateKey> key_original(
       crypto::ECPrivateKey::Create());
   ASSERT_TRUE(key_original.get());
 
@@ -29,13 +29,13 @@
   std::vector<uint8_t> pubkey_info;
   ASSERT_TRUE(key_original->ExportPublicKey(&pubkey_info));
 
-  scoped_ptr<crypto::ECPrivateKey> key(
+  std::unique_ptr<crypto::ECPrivateKey> key(
       crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
           std::string(), key_info, pubkey_info));
   ASSERT_TRUE(key.get());
   ASSERT_TRUE(key->key() != NULL);
 
-  scoped_ptr<crypto::ECSignatureCreator> signer(
+  std::unique_ptr<crypto::ECSignatureCreator> signer(
       crypto::ECSignatureCreator::Create(key.get()));
   ASSERT_TRUE(signer.get());
 
diff --git a/crypto/encryptor.h b/crypto/encryptor.h
index e07eb32..f1a478a 100644
--- a/crypto/encryptor.h
+++ b/crypto/encryptor.h
@@ -8,9 +8,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "build/build_config.h"
 #include "crypto/crypto_export.h"
@@ -113,7 +113,7 @@
 
   SymmetricKey* key_;
   Mode mode_;
-  scoped_ptr<Counter> counter_;
+  std::unique_ptr<Counter> counter_;
 
 #if defined(USE_OPENSSL)
   bool Crypt(bool do_encrypt,  // Pass true to encrypt, false to decrypt.
diff --git a/crypto/encryptor_unittest.cc b/crypto/encryptor_unittest.cc
index 93355f8..547b746 100644
--- a/crypto/encryptor_unittest.cc
+++ b/crypto/encryptor_unittest.cc
@@ -6,16 +6,16 @@
 
 #include <stddef.h>
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "crypto/symmetric_key.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(EncryptorTest, EncryptDecrypt) {
-  scoped_ptr<crypto::SymmetricKey> key(
+  std::unique_ptr<crypto::SymmetricKey> key(
       crypto::SymmetricKey::DeriveKeyFromPassword(
           crypto::SymmetricKey::AES, "password", "saltiest", 1000, 256));
   EXPECT_TRUE(key.get());
@@ -39,29 +39,29 @@
 }
 
 TEST(EncryptorTest, DecryptWrongKey) {
-  scoped_ptr<crypto::SymmetricKey> key(
+  std::unique_ptr<crypto::SymmetricKey> key(
       crypto::SymmetricKey::DeriveKeyFromPassword(
           crypto::SymmetricKey::AES, "password", "saltiest", 1000, 256));
   EXPECT_TRUE(key.get());
 
   // A wrong key that can be detected by implementations that validate every
   // byte in the padding.
-  scoped_ptr<crypto::SymmetricKey> wrong_key(
-        crypto::SymmetricKey::DeriveKeyFromPassword(
-            crypto::SymmetricKey::AES, "wrongword", "sweetest", 1000, 256));
+  std::unique_ptr<crypto::SymmetricKey> wrong_key(
+      crypto::SymmetricKey::DeriveKeyFromPassword(
+          crypto::SymmetricKey::AES, "wrongword", "sweetest", 1000, 256));
   EXPECT_TRUE(wrong_key.get());
 
   // A wrong key that can't be detected by any implementation.  The password
   // "wrongword;" would also work.
-  scoped_ptr<crypto::SymmetricKey> wrong_key2(
-        crypto::SymmetricKey::DeriveKeyFromPassword(
-            crypto::SymmetricKey::AES, "wrongword+", "sweetest", 1000, 256));
+  std::unique_ptr<crypto::SymmetricKey> wrong_key2(
+      crypto::SymmetricKey::DeriveKeyFromPassword(
+          crypto::SymmetricKey::AES, "wrongword+", "sweetest", 1000, 256));
   EXPECT_TRUE(wrong_key2.get());
 
   // A wrong key that can be detected by all implementations.
-  scoped_ptr<crypto::SymmetricKey> wrong_key3(
-        crypto::SymmetricKey::DeriveKeyFromPassword(
-            crypto::SymmetricKey::AES, "wrongwordx", "sweetest", 1000, 256));
+  std::unique_ptr<crypto::SymmetricKey> wrong_key3(
+      crypto::SymmetricKey::DeriveKeyFromPassword(
+          crypto::SymmetricKey::AES, "wrongwordx", "sweetest", 1000, 256));
   EXPECT_TRUE(wrong_key3.get());
 
   crypto::Encryptor encryptor;
@@ -189,8 +189,8 @@
     const unsigned char* plaintext, size_t plaintext_size,
     const unsigned char* ciphertext, size_t ciphertext_size) {
   std::string key_str(reinterpret_cast<const char*>(key), key_size);
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key_str));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key_str));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -221,8 +221,8 @@
     const unsigned char* plaintext, size_t plaintext_size,
     const unsigned char* ciphertext, size_t ciphertext_size) {
   std::string key_str(reinterpret_cast<const char*>(key), key_size);
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key_str));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key_str));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -284,7 +284,7 @@
 }
 
 TEST(EncryptorTest, EncryptDecryptCTR) {
-  scoped_ptr<crypto::SymmetricKey> key(
+  std::unique_ptr<crypto::SymmetricKey> key(
       crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 128));
 
   EXPECT_TRUE(key.get());
@@ -407,8 +407,8 @@
   };
 
   std::string key(reinterpret_cast<const char*>(kRawKey), sizeof(kRawKey));
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -440,8 +440,8 @@
       "D4A67A0BA33C30F207344D81D1E944BBE65587C3D7D9939A"
       "C070C62B9C15A3EA312EA4AD1BC7929F4D3C16B03AD5ADA8";
 
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -464,8 +464,8 @@
 TEST(EncryptorTest, UnsupportedKeySize) {
   std::string key = "7 = bad";
   std::string iv = "Sweet Sixteen IV";
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key));
   if (!sym_key.get())
     return;
 
@@ -478,8 +478,8 @@
 TEST(EncryptorTest, UnsupportedIV) {
   std::string key = "128=SixteenBytes";
   std::string iv = "OnlyForteen :(";
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -492,8 +492,8 @@
   std::string plaintext;
   std::string expected_ciphertext_hex = "8518B8878D34E7185E300D0FCC426396";
 
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -511,8 +511,8 @@
   std::string key = "128=SixteenBytes";
   std::string iv = "Sweet Sixteen IV";
 
-  scoped_ptr<crypto::SymmetricKey> sym_key(crypto::SymmetricKey::Import(
-      crypto::SymmetricKey::AES, key));
+  std::unique_ptr<crypto::SymmetricKey> sym_key(
+      crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, key));
   ASSERT_TRUE(sym_key.get());
 
   crypto::Encryptor encryptor;
@@ -526,7 +526,7 @@
   // Otherwise when using std::string as the other tests do, accesses several
   // bytes off the end of the buffer may fall inside the reservation of
   // the string and not be detected.
-  scoped_ptr<char[]> ciphertext(new char[1]);
+  std::unique_ptr<char[]> ciphertext(new char[1]);
 
   std::string plaintext;
   EXPECT_FALSE(
diff --git a/crypto/hkdf.cc b/crypto/hkdf.cc
index 67c3921..2483e60 100644
--- a/crypto/hkdf.cc
+++ b/crypto/hkdf.cc
@@ -7,8 +7,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/hmac.h"
 
 namespace crypto {
@@ -55,7 +56,7 @@
   output_.resize(n * kSHA256HashLength);
   base::StringPiece previous;
 
-  scoped_ptr<char[]> buf(new char[kSHA256HashLength + info.size() + 1]);
+  std::unique_ptr<char[]> buf(new char[kSHA256HashLength + info.size() + 1]);
   uint8_t digest[kSHA256HashLength];
 
   HMAC hmac(HMAC::SHA256);
diff --git a/crypto/hmac.cc b/crypto/hmac.cc
index e9869b4f..333e357 100644
--- a/crypto/hmac.cc
+++ b/crypto/hmac.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 
 #include <algorithm>
+#include <memory>
 
 #include "base/logging.h"
 #include "crypto/secure_util.h"
@@ -47,7 +48,7 @@
   if (digest.empty())
     return false;
   size_t digest_length = DigestLength();
-  scoped_ptr<unsigned char[]> computed_digest(
+  std::unique_ptr<unsigned char[]> computed_digest(
       new unsigned char[digest_length]);
   if (!Sign(data, computed_digest.get(), digest_length))
     return false;
diff --git a/crypto/hmac.h b/crypto/hmac.h
index ccdab309..ec32ed7c 100644
--- a/crypto/hmac.h
+++ b/crypto/hmac.h
@@ -10,9 +10,10 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "crypto/crypto_export.h"
 
@@ -85,7 +86,7 @@
 
  private:
   HashAlgorithm hash_alg_;
-  scoped_ptr<HMACPlatformData> plat_;
+  std::unique_ptr<HMACPlatformData> plat_;
 
   DISALLOW_COPY_AND_ASSIGN(HMAC);
 };
diff --git a/crypto/hmac_nss.cc b/crypto/hmac_nss.cc
index 9d759b5d0..2547860 100644
--- a/crypto/hmac_nss.cc
+++ b/crypto/hmac_nss.cc
@@ -8,8 +8,9 @@
 #include <pk11pub.h>
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/nss_util.h"
 #include "crypto/scoped_nss_types.h"
 
diff --git a/crypto/hmac_openssl.cc b/crypto/hmac_openssl.cc
index 8c8c11a..d88c091 100644
--- a/crypto/hmac_openssl.cc
+++ b/crypto/hmac_openssl.cc
@@ -8,10 +8,10 @@
 #include <stddef.h>
 
 #include <algorithm>
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "crypto/openssl_util.h"
 
diff --git a/crypto/nss_key_util.cc b/crypto/nss_key_util.cc
index 3e03489..1f72667 100644
--- a/crypto/nss_key_util.cc
+++ b/crypto/nss_key_util.cc
@@ -9,6 +9,8 @@
 #include <pk11pub.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
 #include "crypto/nss_util.h"
 
@@ -29,7 +31,7 @@
   }
 };
 
-typedef scoped_ptr<CERTSubjectPublicKeyInfo, PublicKeyInfoDeleter>
+typedef std::unique_ptr<CERTSubjectPublicKeyInfo, PublicKeyInfoDeleter>
     ScopedPublicKeyInfo;
 
 // Decodes |input| as a SubjectPublicKeyInfo and returns a SECItem containing
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index 5bd64364..359f78f 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -11,6 +11,8 @@
 #include <prinit.h>
 #include <prtime.h>
 #include <secmod.h>
+
+#include <memory>
 #include <utility>
 
 #include "crypto/nss_util_internal.h"
@@ -37,7 +39,6 @@
 #include "base/files/file_util.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/native_library.h"
 #include "base/path_service.h"
@@ -75,7 +76,7 @@
 std::string GetNSSErrorMessage() {
   std::string result;
   if (PR_GetErrorTextLength()) {
-    scoped_ptr<char[]> error_text(new char[PR_GetErrorTextLength() + 1]);
+    std::unique_ptr<char[]> error_text(new char[PR_GetErrorTextLength() + 1]);
     PRInt32 copied = PR_GetErrorText(error_text.get());
     result = std::string(error_text.get(), copied);
   } else {
@@ -167,7 +168,7 @@
 #endif
 
   if (db_on_nfs) {
-    scoped_ptr<base::Environment> env(base::Environment::Create());
+    std::unique_ptr<base::Environment> env(base::Environment::Create());
     static const char kUseCacheEnvVar[] = "NSS_SDB_USE_CACHE";
     if (!env->HasVar(kUseCacheEnvVar))
       env->SetVar(kUseCacheEnvVar, "yes");
@@ -372,7 +373,8 @@
 
     // Note that a reference is not taken to chaps_module_. This is safe since
     // NSSInitSingleton is Leaky, so the reference it holds is never released.
-    scoped_ptr<TPMModuleAndSlot> tpm_args(new TPMModuleAndSlot(chaps_module_));
+    std::unique_ptr<TPMModuleAndSlot> tpm_args(
+        new TPMModuleAndSlot(chaps_module_));
     TPMModuleAndSlot* tpm_args_ptr = tpm_args.get();
     if (base::WorkerPool::PostTaskAndReply(
             FROM_HERE,
@@ -418,7 +420,7 @@
 
   void OnInitializedTPMTokenAndSystemSlot(
       const base::Callback<void(bool)>& callback,
-      scoped_ptr<TPMModuleAndSlot> tpm_args) {
+      std::unique_ptr<TPMModuleAndSlot> tpm_args) {
     DCHECK(thread_checker_.CalledOnValidThread());
     DVLOG(2) << "Loaded chaps: " << !!tpm_args->chaps_module
              << ", got tpm slot: " << !!tpm_args->tpm_slot;
@@ -534,7 +536,8 @@
 
     // Note that a reference is not taken to chaps_module_. This is safe since
     // NSSInitSingleton is Leaky, so the reference it holds is never released.
-    scoped_ptr<TPMModuleAndSlot> tpm_args(new TPMModuleAndSlot(chaps_module_));
+    std::unique_ptr<TPMModuleAndSlot> tpm_args(
+        new TPMModuleAndSlot(chaps_module_));
     TPMModuleAndSlot* tpm_args_ptr = tpm_args.get();
     base::WorkerPool::PostTaskAndReply(
         FROM_HERE,
@@ -549,8 +552,9 @@
         );
   }
 
-  void OnInitializedTPMForChromeOSUser(const std::string& username_hash,
-                                       scoped_ptr<TPMModuleAndSlot> tpm_args) {
+  void OnInitializedTPMForChromeOSUser(
+      const std::string& username_hash,
+      std::unique_ptr<TPMModuleAndSlot> tpm_args) {
     DCHECK(thread_checker_.CalledOnValidThread());
     DVLOG(2) << "Got tpm slot for " << username_hash << " "
              << !!tpm_args->tpm_slot;
diff --git a/crypto/rsa_private_key_nss.cc b/crypto/rsa_private_key_nss.cc
index 7ec5ae4b..2538a723 100644
--- a/crypto/rsa_private_key_nss.cc
+++ b/crypto/rsa_private_key_nss.cc
@@ -10,10 +10,10 @@
 #include <stdint.h>
 
 #include <list>
+#include <memory>
 
 #include "base/debug/leak_annotations.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_util.h"
 #include "crypto/nss_key_util.h"
 #include "crypto/nss_util.h"
diff --git a/crypto/rsa_private_key_openssl.cc b/crypto/rsa_private_key_openssl.cc
index 3e87a0a..bca4b24 100644
--- a/crypto/rsa_private_key_openssl.cc
+++ b/crypto/rsa_private_key_openssl.cc
@@ -4,15 +4,16 @@
 
 #include "crypto/rsa_private_key.h"
 
-#include <openssl/bytestring.h>
 #include <openssl/bn.h>
+#include <openssl/bytestring.h>
 #include <openssl/evp.h>
 #include <openssl/mem.h>
 #include <openssl/rsa.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/auto_cbb.h"
 #include "crypto/openssl_util.h"
 #include "crypto/scoped_openssl_types.h"
@@ -31,7 +32,7 @@
   if (!RSA_generate_key_ex(rsa_key.get(), num_bits, bn.get(), NULL))
     return NULL;
 
-  scoped_ptr<RSAPrivateKey> result(new RSAPrivateKey);
+  std::unique_ptr<RSAPrivateKey> result(new RSAPrivateKey);
   result->key_ = EVP_PKEY_new();
   if (!result->key_ || !EVP_PKEY_set1_RSA(result->key_, rsa_key.get()))
     return NULL;
@@ -50,7 +51,7 @@
   if (!pkey || CBS_len(&cbs) != 0 || EVP_PKEY_id(pkey.get()) != EVP_PKEY_RSA)
     return nullptr;
 
-  scoped_ptr<RSAPrivateKey> result(new RSAPrivateKey);
+  std::unique_ptr<RSAPrivateKey> result(new RSAPrivateKey);
   result->key_ = pkey.release();
   return result.release();
 }
@@ -75,7 +76,7 @@
 }
 
 RSAPrivateKey* RSAPrivateKey::Copy() const {
-  scoped_ptr<RSAPrivateKey> copy(new RSAPrivateKey());
+  std::unique_ptr<RSAPrivateKey> copy(new RSAPrivateKey());
   ScopedRSA rsa(EVP_PKEY_get1_RSA(key_));
   if (!rsa)
     return NULL;
diff --git a/crypto/rsa_private_key_unittest.cc b/crypto/rsa_private_key_unittest.cc
index 1401e3d..393a24c5 100644
--- a/crypto/rsa_private_key_unittest.cc
+++ b/crypto/rsa_private_key_unittest.cc
@@ -6,7 +6,8 @@
 
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
@@ -71,9 +72,9 @@
 // Generate random private keys with two different sizes. Reimport, then
 // export them again. We should get back the same exact bytes.
 TEST(RSAPrivateKeyUnitTest, InitRandomTest) {
-  scoped_ptr<crypto::RSAPrivateKey> keypair1(
+  std::unique_ptr<crypto::RSAPrivateKey> keypair1(
       crypto::RSAPrivateKey::Create(1024));
-  scoped_ptr<crypto::RSAPrivateKey> keypair2(
+  std::unique_ptr<crypto::RSAPrivateKey> keypair2(
       crypto::RSAPrivateKey::Create(2048));
   ASSERT_TRUE(keypair1.get());
   ASSERT_TRUE(keypair2.get());
@@ -88,9 +89,9 @@
   ASSERT_TRUE(keypair1->ExportPublicKey(&pubkey1));
   ASSERT_TRUE(keypair2->ExportPublicKey(&pubkey2));
 
-  scoped_ptr<crypto::RSAPrivateKey> keypair3(
+  std::unique_ptr<crypto::RSAPrivateKey> keypair3(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(privkey1));
-  scoped_ptr<crypto::RSAPrivateKey> keypair4(
+  std::unique_ptr<crypto::RSAPrivateKey> keypair4(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(privkey2));
   ASSERT_TRUE(keypair3.get());
   ASSERT_TRUE(keypair4.get());
@@ -113,10 +114,10 @@
   std::vector<uint8_t> input(kTestPrivateKeyInfo,
                              kTestPrivateKeyInfo + sizeof(kTestPrivateKeyInfo));
 
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input));
 
-  scoped_ptr<crypto::RSAPrivateKey> key_copy(key->Copy());
+  std::unique_ptr<crypto::RSAPrivateKey> key_copy(key->Copy());
   ASSERT_TRUE(key_copy.get());
 
   std::vector<uint8_t> privkey_copy;
@@ -131,7 +132,7 @@
                              kTestPrivateKeyInfo + sizeof(kTestPrivateKeyInfo));
   input.push_back(0);
 
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input));
 
   // Import should fail.
@@ -158,7 +159,7 @@
       kTestEcPrivateKeyInfo,
       kTestEcPrivateKeyInfo + sizeof(kTestEcPrivateKeyInfo));
 
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input));
 
   // Import should fail as the given PKCS8 bytes were for an EC key not RSA key.
@@ -187,7 +188,7 @@
   std::vector<uint8_t> input(kTestPrivateKeyInfo,
                              kTestPrivateKeyInfo + sizeof(kTestPrivateKeyInfo));
 
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input));
   ASSERT_TRUE(key.get());
 
@@ -334,9 +335,9 @@
   memcpy(&input2.front(), short_integer_without_high_bit,
          sizeof(short_integer_without_high_bit));
 
-  scoped_ptr<crypto::RSAPrivateKey> keypair1(
+  std::unique_ptr<crypto::RSAPrivateKey> keypair1(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input1));
-  scoped_ptr<crypto::RSAPrivateKey> keypair2(
+  std::unique_ptr<crypto::RSAPrivateKey> keypair2(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(input2));
   ASSERT_TRUE(keypair1.get());
   ASSERT_TRUE(keypair2.get());
@@ -355,11 +356,11 @@
 }
 
 TEST(RSAPrivateKeyUnitTest, CreateFromKeyTest) {
-  scoped_ptr<crypto::RSAPrivateKey> key_pair(
+  std::unique_ptr<crypto::RSAPrivateKey> key_pair(
       crypto::RSAPrivateKey::Create(512));
   ASSERT_TRUE(key_pair.get());
 
-  scoped_ptr<crypto::RSAPrivateKey> key_copy(
+  std::unique_ptr<crypto::RSAPrivateKey> key_copy(
       crypto::RSAPrivateKey::CreateFromKey(key_pair->key()));
   ASSERT_TRUE(key_copy.get());
 
diff --git a/crypto/scoped_nss_types.h b/crypto/scoped_nss_types.h
index 8e96e8d4..a739565 100644
--- a/crypto/scoped_nss_types.h
+++ b/crypto/scoped_nss_types.h
@@ -10,7 +10,7 @@
 #include <pk11pub.h>
 #include <plarena.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
 
 namespace crypto {
 
@@ -29,29 +29,33 @@
 };
 
 // Define some convenient scopers around NSS pointers.
-typedef scoped_ptr<PK11Context,
-                   NSSDestroyer1<PK11Context, PK11_DestroyContext, PR_TRUE> >
+typedef std::unique_ptr<
+    PK11Context,
+    NSSDestroyer1<PK11Context, PK11_DestroyContext, PR_TRUE>>
     ScopedPK11Context;
-typedef scoped_ptr<PK11SlotInfo, NSSDestroyer<PK11SlotInfo, PK11_FreeSlot> >
+typedef std::unique_ptr<PK11SlotInfo, NSSDestroyer<PK11SlotInfo, PK11_FreeSlot>>
     ScopedPK11Slot;
-typedef scoped_ptr<PK11SlotList, NSSDestroyer<PK11SlotList, PK11_FreeSlotList> >
+typedef std::unique_ptr<PK11SlotList,
+                        NSSDestroyer<PK11SlotList, PK11_FreeSlotList>>
     ScopedPK11SlotList;
-typedef scoped_ptr<PK11SymKey, NSSDestroyer<PK11SymKey, PK11_FreeSymKey> >
+typedef std::unique_ptr<PK11SymKey, NSSDestroyer<PK11SymKey, PK11_FreeSymKey>>
     ScopedPK11SymKey;
-typedef scoped_ptr<SECKEYPublicKey,
-                   NSSDestroyer<SECKEYPublicKey, SECKEY_DestroyPublicKey> >
+typedef std::unique_ptr<SECKEYPublicKey,
+                        NSSDestroyer<SECKEYPublicKey, SECKEY_DestroyPublicKey>>
     ScopedSECKEYPublicKey;
-typedef scoped_ptr<SECKEYPrivateKey,
-                   NSSDestroyer<SECKEYPrivateKey, SECKEY_DestroyPrivateKey> >
+typedef std::unique_ptr<
+    SECKEYPrivateKey,
+    NSSDestroyer<SECKEYPrivateKey, SECKEY_DestroyPrivateKey>>
     ScopedSECKEYPrivateKey;
-typedef scoped_ptr<SECAlgorithmID,
-                   NSSDestroyer1<SECAlgorithmID, SECOID_DestroyAlgorithmID,
-                                 PR_TRUE> >
+typedef std::unique_ptr<
+    SECAlgorithmID,
+    NSSDestroyer1<SECAlgorithmID, SECOID_DestroyAlgorithmID, PR_TRUE>>
     ScopedSECAlgorithmID;
-typedef scoped_ptr<SECItem, NSSDestroyer1<SECItem, SECITEM_FreeItem, PR_TRUE> >
+typedef std::unique_ptr<SECItem,
+                        NSSDestroyer1<SECItem, SECITEM_FreeItem, PR_TRUE>>
     ScopedSECItem;
-typedef scoped_ptr<PLArenaPool,
-                   NSSDestroyer1<PLArenaPool, PORT_FreeArena, PR_FALSE> >
+typedef std::unique_ptr<PLArenaPool,
+                        NSSDestroyer1<PLArenaPool, PORT_FreeArena, PR_FALSE>>
     ScopedPLArenaPool;
 
 }  // namespace crypto
diff --git a/crypto/scoped_openssl_types.h b/crypto/scoped_openssl_types.h
index 9bc5d743..76dd0f4 100644
--- a/crypto/scoped_openssl_types.h
+++ b/crypto/scoped_openssl_types.h
@@ -15,7 +15,7 @@
 #include <openssl/rsa.h>
 #include <stdint.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
 
 namespace crypto {
 
@@ -29,7 +29,7 @@
 
 template <typename PointerType, void (*Destroyer)(PointerType*)>
 using ScopedOpenSSL =
-    scoped_ptr<PointerType, OpenSSLDestroyer<PointerType, Destroyer>>;
+    std::unique_ptr<PointerType, OpenSSLDestroyer<PointerType, Destroyer>>;
 
 struct OpenSSLFree {
   void operator()(uint8_t* ptr) const { OPENSSL_free(ptr); }
@@ -53,7 +53,7 @@
 using ScopedRSA = ScopedOpenSSL<RSA, RSA_free>;
 
 // The bytes must have been allocated with OPENSSL_malloc.
-using ScopedOpenSSLBytes = scoped_ptr<uint8_t, OpenSSLFree>;
+using ScopedOpenSSLBytes = std::unique_ptr<uint8_t, OpenSSLFree>;
 
 }  // namespace crypto
 
diff --git a/crypto/scoped_test_system_nss_key_slot.h b/crypto/scoped_test_system_nss_key_slot.h
index 99a269c..eb8fbc9 100644
--- a/crypto/scoped_test_system_nss_key_slot.h
+++ b/crypto/scoped_test_system_nss_key_slot.h
@@ -5,8 +5,9 @@
 #ifndef CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_
 #define CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/crypto_export.h"
 
 // Forward declaration, from <pk11pub.h>
@@ -33,7 +34,7 @@
   PK11SlotInfo* slot() const;
 
  private:
-  scoped_ptr<ScopedTestNSSDB> test_db_;
+  std::unique_ptr<ScopedTestNSSDB> test_db_;
 
   DISALLOW_COPY_AND_ASSIGN(ScopedTestSystemNSSKeySlot);
 };
diff --git a/crypto/secure_hash_unittest.cc b/crypto/secure_hash_unittest.cc
index 019e86f6..cb9f5852 100644
--- a/crypto/secure_hash_unittest.cc
+++ b/crypto/secure_hash_unittest.cc
@@ -7,9 +7,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "crypto/sha2.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -23,8 +23,8 @@
 
   uint8_t output3[crypto::kSHA256Length];
 
-  scoped_ptr<crypto::SecureHash> ctx(crypto::SecureHash::Create(
-      crypto::SecureHash::SHA256));
+  std::unique_ptr<crypto::SecureHash> ctx(
+      crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   ctx->Update(input3.data(), input3.size());
   ctx->Update(input3.data(), input3.size());
 
@@ -50,12 +50,12 @@
   uint8_t output2[crypto::kSHA256Length];
   uint8_t output3[crypto::kSHA256Length];
 
-  scoped_ptr<crypto::SecureHash> ctx1(crypto::SecureHash::Create(
-      crypto::SecureHash::SHA256));
+  std::unique_ptr<crypto::SecureHash> ctx1(
+      crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   ctx1->Update(input1.data(), input1.size());
 
-  scoped_ptr<crypto::SecureHash> ctx2(ctx1->Clone());
-  scoped_ptr<crypto::SecureHash> ctx3(ctx2->Clone());
+  std::unique_ptr<crypto::SecureHash> ctx2(ctx1->Clone());
+  std::unique_ptr<crypto::SecureHash> ctx3(ctx2->Clone());
   // At this point, ctx1, ctx2, and ctx3 are all equivalent and represent the
   // state after hashing input1.
 
@@ -76,7 +76,7 @@
 }
 
 TEST(SecureHashTest, TestLength) {
-  scoped_ptr<crypto::SecureHash> ctx(
+  std::unique_ptr<crypto::SecureHash> ctx(
       crypto::SecureHash::Create(crypto::SecureHash::SHA256));
   EXPECT_EQ(crypto::kSHA256Length, ctx->GetHashLength());
 }
diff --git a/crypto/sha2.cc b/crypto/sha2.cc
index 2646d1b..e97b8f40 100644
--- a/crypto/sha2.cc
+++ b/crypto/sha2.cc
@@ -6,14 +6,15 @@
 
 #include <stddef.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/stl_util.h"
 #include "crypto/secure_hash.h"
 
 namespace crypto {
 
 void SHA256HashString(const base::StringPiece& str, void* output, size_t len) {
-  scoped_ptr<SecureHash> ctx(SecureHash::Create(SecureHash::SHA256));
+  std::unique_ptr<SecureHash> ctx(SecureHash::Create(SecureHash::SHA256));
   ctx->Update(str.data(), str.length());
   ctx->Finish(output, len);
 }
diff --git a/crypto/signature_creator_nss.cc b/crypto/signature_creator_nss.cc
index bf20413..538be93 100644
--- a/crypto/signature_creator_nss.cc
+++ b/crypto/signature_creator_nss.cc
@@ -9,8 +9,9 @@
 #include <stdint.h>
 #include <stdlib.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/nss_util.h"
 #include "crypto/rsa_private_key.h"
 
@@ -50,7 +51,7 @@
 // static
 SignatureCreator* SignatureCreator::Create(RSAPrivateKey* key,
                                            HashAlgorithm hash_alg) {
-  scoped_ptr<SignatureCreator> result(new SignatureCreator);
+  std::unique_ptr<SignatureCreator> result(new SignatureCreator);
   result->sign_context_ = SGN_NewContext(ToNSSSigOid(hash_alg), key->key());
   if (!result->sign_context_) {
     NOTREACHED();
diff --git a/crypto/signature_creator_openssl.cc b/crypto/signature_creator_openssl.cc
index d5fc4d4d..6543e63 100644
--- a/crypto/signature_creator_openssl.cc
+++ b/crypto/signature_creator_openssl.cc
@@ -9,8 +9,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/openssl_util.h"
 #include "crypto/rsa_private_key.h"
 #include "crypto/scoped_openssl_types.h"
@@ -45,7 +46,7 @@
 SignatureCreator* SignatureCreator::Create(RSAPrivateKey* key,
                                            HashAlgorithm hash_alg) {
   OpenSSLErrStackTracer err_tracer(FROM_HERE);
-  scoped_ptr<SignatureCreator> result(new SignatureCreator);
+  std::unique_ptr<SignatureCreator> result(new SignatureCreator);
   const EVP_MD* const digest = ToOpenSSLDigest(hash_alg);
   DCHECK(digest);
   if (!digest) {
diff --git a/crypto/signature_creator_unittest.cc b/crypto/signature_creator_unittest.cc
index fff065e5..819e663d 100644
--- a/crypto/signature_creator_unittest.cc
+++ b/crypto/signature_creator_unittest.cc
@@ -2,31 +2,32 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "crypto/signature_creator.h"
+
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/sha1.h"
 #include "crypto/rsa_private_key.h"
 #include "crypto/sha2.h"
-#include "crypto/signature_creator.h"
 #include "crypto/signature_verifier.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(SignatureCreatorTest, BasicTest) {
   // Do a verify round trip.
-  scoped_ptr<crypto::RSAPrivateKey> key_original(
+  std::unique_ptr<crypto::RSAPrivateKey> key_original(
       crypto::RSAPrivateKey::Create(1024));
   ASSERT_TRUE(key_original.get());
 
   std::vector<uint8_t> key_info;
   key_original->ExportPrivateKey(&key_info);
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_info));
   ASSERT_TRUE(key.get());
 
-  scoped_ptr<crypto::SignatureCreator> signer(
+  std::unique_ptr<crypto::SignatureCreator> signer(
       crypto::SignatureCreator::Create(key.get(),
                                        crypto::SignatureCreator::SHA1));
   ASSERT_TRUE(signer.get());
@@ -53,13 +54,13 @@
 
 TEST(SignatureCreatorTest, SignDigestTest) {
   // Do a verify round trip.
-  scoped_ptr<crypto::RSAPrivateKey> key_original(
+  std::unique_ptr<crypto::RSAPrivateKey> key_original(
       crypto::RSAPrivateKey::Create(1024));
   ASSERT_TRUE(key_original.get());
 
   std::vector<uint8_t> key_info;
   key_original->ExportPrivateKey(&key_info);
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_info));
   ASSERT_TRUE(key.get());
 
@@ -87,13 +88,13 @@
 
 TEST(SignatureCreatorTest, SignSHA256DigestTest) {
   // Do a verify round trip.
-  scoped_ptr<crypto::RSAPrivateKey> key_original(
+  std::unique_ptr<crypto::RSAPrivateKey> key_original(
       crypto::RSAPrivateKey::Create(1024));
   ASSERT_TRUE(key_original.get());
 
   std::vector<uint8_t> key_info;
   key_original->ExportPrivateKey(&key_info);
-  scoped_ptr<crypto::RSAPrivateKey> key(
+  std::unique_ptr<crypto::RSAPrivateKey> key(
       crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_info));
   ASSERT_TRUE(key.get());
 
diff --git a/crypto/signature_verifier_openssl.cc b/crypto/signature_verifier_openssl.cc
index 495abd2..f4a3d4f0 100644
--- a/crypto/signature_verifier_openssl.cc
+++ b/crypto/signature_verifier_openssl.cc
@@ -9,10 +9,10 @@
 #include <openssl/evp.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "crypto/openssl_util.h"
 #include "crypto/scoped_openssl_types.h"
 
diff --git a/crypto/symmetric_key_openssl.cc b/crypto/symmetric_key_openssl.cc
index 2c5358f..5aef1d4 100644
--- a/crypto/symmetric_key_openssl.cc
+++ b/crypto/symmetric_key_openssl.cc
@@ -10,9 +10,9 @@
 #include <stdint.h>
 
 #include <algorithm>
+#include <memory>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_util.h"
 #include "crypto/openssl_util.h"
 
@@ -40,7 +40,7 @@
     return NULL;
 
   OpenSSLErrStackTracer err_tracer(FROM_HERE);
-  scoped_ptr<SymmetricKey> key(new SymmetricKey);
+  std::unique_ptr<SymmetricKey> key(new SymmetricKey);
   uint8_t* key_data = reinterpret_cast<uint8_t*>(
       base::WriteInto(&key->key_, key_size_in_bytes + 1));
 
@@ -71,7 +71,7 @@
     return NULL;
 
   OpenSSLErrStackTracer err_tracer(FROM_HERE);
-  scoped_ptr<SymmetricKey> key(new SymmetricKey);
+  std::unique_ptr<SymmetricKey> key(new SymmetricKey);
   uint8_t* key_data = reinterpret_cast<uint8_t*>(
       base::WriteInto(&key->key_, key_size_in_bytes + 1));
   int rv = PKCS5_PBKDF2_HMAC_SHA1(
@@ -92,7 +92,7 @@
       return NULL;
   }
 
-  scoped_ptr<SymmetricKey> key(new SymmetricKey);
+  std::unique_ptr<SymmetricKey> key(new SymmetricKey);
   key->key_ = raw_key;
   return key.release();
 }
diff --git a/crypto/symmetric_key_unittest.cc b/crypto/symmetric_key_unittest.cc
index ef8e7e1..7cd47cd 100644
--- a/crypto/symmetric_key_unittest.cc
+++ b/crypto/symmetric_key_unittest.cc
@@ -4,15 +4,15 @@
 
 #include "crypto/symmetric_key.h"
 
+#include <memory>
 #include <string>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(SymmetricKeyTest, GenerateRandomKey) {
-  scoped_ptr<crypto::SymmetricKey> key(
+  std::unique_ptr<crypto::SymmetricKey> key(
       crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 256));
   ASSERT_TRUE(NULL != key.get());
   std::string raw_key;
@@ -21,7 +21,7 @@
 
   // Do it again and check that the keys are different.
   // (Note: this has a one-in-10^77 chance of failure!)
-  scoped_ptr<crypto::SymmetricKey> key2(
+  std::unique_ptr<crypto::SymmetricKey> key2(
       crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 256));
   ASSERT_TRUE(NULL != key2.get());
   std::string raw_key2;
@@ -31,13 +31,13 @@
 }
 
 TEST(SymmetricKeyTest, ImportGeneratedKey) {
-  scoped_ptr<crypto::SymmetricKey> key1(
+  std::unique_ptr<crypto::SymmetricKey> key1(
       crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES, 256));
   ASSERT_TRUE(NULL != key1.get());
   std::string raw_key1;
   EXPECT_TRUE(key1->GetRawKey(&raw_key1));
 
-  scoped_ptr<crypto::SymmetricKey> key2(
+  std::unique_ptr<crypto::SymmetricKey> key2(
       crypto::SymmetricKey::Import(crypto::SymmetricKey::AES, raw_key1));
   ASSERT_TRUE(NULL != key2.get());
 
@@ -48,14 +48,14 @@
 }
 
 TEST(SymmetricKeyTest, ImportDerivedKey) {
-  scoped_ptr<crypto::SymmetricKey> key1(
+  std::unique_ptr<crypto::SymmetricKey> key1(
       crypto::SymmetricKey::DeriveKeyFromPassword(
           crypto::SymmetricKey::HMAC_SHA1, "password", "somesalt", 1024, 160));
   ASSERT_TRUE(NULL != key1.get());
   std::string raw_key1;
   EXPECT_TRUE(key1->GetRawKey(&raw_key1));
 
-  scoped_ptr<crypto::SymmetricKey> key2(
+  std::unique_ptr<crypto::SymmetricKey> key2(
       crypto::SymmetricKey::Import(crypto::SymmetricKey::HMAC_SHA1, raw_key1));
   ASSERT_TRUE(NULL != key2.get());
 
@@ -89,10 +89,9 @@
   }
 #endif  // OS_MACOSX
 
-  scoped_ptr<crypto::SymmetricKey> key(
+  std::unique_ptr<crypto::SymmetricKey> key(
       crypto::SymmetricKey::DeriveKeyFromPassword(
-          test_data.algorithm,
-          test_data.password, test_data.salt,
+          test_data.algorithm, test_data.password, test_data.salt,
           test_data.rounds, test_data.key_size_in_bits));
   ASSERT_TRUE(NULL != key.get());
 
diff --git a/crypto/symmetric_key_win.cc b/crypto/symmetric_key_win.cc
index ac8e614e..1acfcd0 100644
--- a/crypto/symmetric_key_win.cc
+++ b/crypto/symmetric_key_win.cc
@@ -7,10 +7,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
 #include <vector>
 
 // TODO(wtc): replace scoped_array by std::vector.
-#include "base/memory/scoped_ptr.h"
 #include "base/sys_byteorder.h"
 
 namespace crypto {
@@ -171,7 +171,7 @@
                      ALG_ID alg,
                      ScopedHCRYPTPROV* provider,
                      ScopedHCRYPTKEY* key,
-                     scoped_ptr<BYTE[]>* raw_key) {
+                     std::unique_ptr<BYTE[]>* raw_key) {
   DCHECK(provider);
   DCHECK(key);
   DCHECK(raw_key);
@@ -188,7 +188,7 @@
     return false;
 
   DWORD key_size_in_bytes = static_cast<DWORD>(key_size_in_bits / 8);
-  scoped_ptr<BYTE[]> random(new BYTE[key_size_in_bytes]);
+  std::unique_ptr<BYTE[]> random(new BYTE[key_size_in_bytes]);
   ok = CryptGenRandom(safe_provider, key_size_in_bytes, random.get());
   if (!ok)
     return false;
@@ -323,7 +323,7 @@
   ScopedHCRYPTKEY key;
 
   bool ok = false;
-  scoped_ptr<BYTE[]> raw_key;
+  std::unique_ptr<BYTE[]> raw_key;
 
   switch (algorithm) {
     case AES:
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 554ccb82..1827928b 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -891,7 +891,8 @@
     return "";
   }
 
-  scoped_ptr<Response> response(Response::FromRawMessage(response_message));
+  std::unique_ptr<Response> response(
+      Response::FromRawMessage(response_message));
   MessageReader reader(response.get());
 
   std::string service_owner;
@@ -1114,7 +1115,7 @@
   // |message| will be unrefed on exit of the function. Increment the
   // reference so we can use it in Signal::FromRawMessage() below.
   dbus_message_ref(message);
-  scoped_ptr<Signal> signal(Signal::FromRawMessage(message));
+  std::unique_ptr<Signal> signal(Signal::FromRawMessage(message));
 
   // Confirm the validity of the NameOwnerChanged signal.
   if (signal->GetMember() != kNameOwnerChangedSignal ||
diff --git a/dbus/bus.h b/dbus/bus.h
index e5e0b1c6..7d391590 100644
--- a/dbus/bus.h
+++ b/dbus/bus.h
@@ -88,7 +88,7 @@
 //       bus.GetObjectProxy(service_name, object_path);
 //
 //   dbus::MethodCall method_call(interface_name, method_name);
-//   scoped_ptr<dbus::Response> response(
+//   std::unique_ptr<dbus::Response> response(
 //       object_proxy.CallMethodAndBlock(&method_call, timeout_ms));
 //   if (response.get() != NULL) {  // Success.
 //     ...
diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc
index 250717e..84bbb78 100644
--- a/dbus/bus_unittest.cc
+++ b/dbus/bus_unittest.cc
@@ -48,7 +48,7 @@
   }
 
  private:
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
   int expected_quit_calls_;
   int actual_quit_calls_;
 
diff --git a/dbus/dbus_statistics.cc b/dbus/dbus_statistics.cc
index e6eb5a2..e1e0973 100644
--- a/dbus/dbus_statistics.cc
+++ b/dbus/dbus_statistics.cc
@@ -4,11 +4,11 @@
 
 #include "dbus/dbus_statistics.h"
 
+#include <memory>
 #include <set>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/threading/platform_thread.h"
@@ -108,7 +108,7 @@
                 const std::string& method,
                 bool add_stat) {
     DCHECK_EQ(origin_thread_id_, base::PlatformThread::CurrentId());
-    scoped_ptr<Stat> stat(new Stat(service, interface, method));
+    std::unique_ptr<Stat> stat(new Stat(service, interface, method));
     StatSet::iterator found = stats_.find(stat.get());
     if (found != stats_.end())
       return *found;
diff --git a/dbus/end_to_end_async_unittest.cc b/dbus/end_to_end_async_unittest.cc
index 8f628649d..b02b043 100644
--- a/dbus/end_to_end_async_unittest.cc
+++ b/dbus/end_to_end_async_unittest.cc
@@ -5,12 +5,12 @@
 #include <stddef.h>
 
 #include <algorithm>
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
@@ -255,14 +255,14 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
   std::vector<std::string> response_strings_;
   std::vector<std::string> error_names_;
-  scoped_ptr<base::Thread> dbus_thread_;
+  std::unique_ptr<base::Thread> dbus_thread_;
   scoped_refptr<Bus> bus_;
   ObjectProxy* object_proxy_;
   ObjectProxy* root_object_proxy_;
-  scoped_ptr<TestService> test_service_;
+  std::unique_ptr<TestService> test_service_;
   // Text message from "Test" signal.
   std::string test_signal_string_;
   // Text message from "Test" signal delivered to root.
diff --git a/dbus/end_to_end_sync_unittest.cc b/dbus/end_to_end_sync_unittest.cc
index 47dc9b1..4eb9cd1 100644
--- a/dbus/end_to_end_sync_unittest.cc
+++ b/dbus/end_to_end_sync_unittest.cc
@@ -2,8 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_path.h"
@@ -47,7 +48,7 @@
   }
 
  protected:
-  scoped_ptr<TestService> test_service_;
+  std::unique_ptr<TestService> test_service_;
   scoped_refptr<Bus> client_bus_;
   ObjectProxy* object_proxy_;
 };
@@ -62,7 +63,7 @@
 
   // Call the method.
   const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT;
-  scoped_ptr<Response> response(
+  std::unique_ptr<Response> response(
       object_proxy_->CallMethodAndBlock(&method_call, timeout_ms));
   ASSERT_TRUE(response.get());
 
@@ -83,7 +84,7 @@
 
   // Call the method with timeout of 0ms.
   const int timeout_ms = 0;
-  scoped_ptr<Response> response(
+  std::unique_ptr<Response> response(
       object_proxy_->CallMethodAndBlock(&method_call, timeout_ms));
   // Should fail because of timeout.
   ASSERT_FALSE(response.get());
@@ -93,7 +94,7 @@
   MethodCall method_call("org.chromium.TestInterface", "Nonexistent");
 
   const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT;
-  scoped_ptr<Response> response(
+  std::unique_ptr<Response> response(
       object_proxy_->CallMethodAndBlock(&method_call, timeout_ms));
   ASSERT_FALSE(response.get());
 }
@@ -102,7 +103,7 @@
   MethodCall method_call("org.chromium.TestInterface", "BrokenMethod");
 
   const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT;
-  scoped_ptr<Response> response(
+  std::unique_ptr<Response> response(
       object_proxy_->CallMethodAndBlock(&method_call, timeout_ms));
   ASSERT_FALSE(response.get());
 }
@@ -118,7 +119,7 @@
   MethodCall method_call("org.chromium.TestInterface", "Echo");
 
   const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT;
-  scoped_ptr<Response> response(
+  std::unique_ptr<Response> response(
       object_proxy_->CallMethodAndBlock(&method_call, timeout_ms));
   ASSERT_FALSE(response.get());
 }
@@ -134,7 +135,7 @@
   MethodCall method_call("org.chromium.TestInterface", "Echo");
 
   const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT;
-  scoped_ptr<Response> response(
+  std::unique_ptr<Response> response(
       object_proxy_->CallMethodAndBlock(&method_call, timeout_ms));
   ASSERT_FALSE(response.get());
 }
diff --git a/dbus/exported_object.cc b/dbus/exported_object.cc
index e4cd1a4..19d1715 100644
--- a/dbus/exported_object.cc
+++ b/dbus/exported_object.cc
@@ -195,7 +195,7 @@
   // raw_message will be unrefed on exit of the function. Increment the
   // reference so we can use it in MethodCall.
   dbus_message_ref(raw_message);
-  scoped_ptr<MethodCall> method_call(
+  std::unique_ptr<MethodCall> method_call(
       MethodCall::FromRawMessage(raw_message));
   const std::string interface = method_call->GetInterface();
   const std::string member = method_call->GetMember();
@@ -241,7 +241,7 @@
 }
 
 void ExportedObject::RunMethod(MethodCallCallback method_call_callback,
-                               scoped_ptr<MethodCall> method_call,
+                               std::unique_ptr<MethodCall> method_call,
                                base::TimeTicks start_time) {
   bus_->AssertOnOriginThread();
   MethodCall* method = method_call.get();
@@ -253,8 +253,8 @@
 }
 
 void ExportedObject::SendResponse(base::TimeTicks start_time,
-                                  scoped_ptr<MethodCall> method_call,
-                                  scoped_ptr<Response> response) {
+                                  std::unique_ptr<MethodCall> method_call,
+                                  std::unique_ptr<Response> response) {
   DCHECK(method_call);
   if (bus_->HasDBusThread()) {
     bus_->GetDBusTaskRunner()->PostTask(
@@ -269,8 +269,8 @@
   }
 }
 
-void ExportedObject::OnMethodCompleted(scoped_ptr<MethodCall> method_call,
-                                       scoped_ptr<Response> response,
+void ExportedObject::OnMethodCompleted(std::unique_ptr<MethodCall> method_call,
+                                       std::unique_ptr<Response> response,
                                        base::TimeTicks start_time) {
   bus_->AssertOnDBusThread();
 
@@ -286,11 +286,9 @@
 
   if (!response) {
     // Something bad happened in the method call.
-    scoped_ptr<ErrorResponse> error_response(
-        ErrorResponse::FromMethodCall(
-            method_call.get(),
-            DBUS_ERROR_FAILED,
-            "error occurred in " + method_call->GetMember()));
+    std::unique_ptr<ErrorResponse> error_response(ErrorResponse::FromMethodCall(
+        method_call.get(), DBUS_ERROR_FAILED,
+        "error occurred in " + method_call->GetMember()));
     bus_->Send(error_response->raw_message(), NULL);
     return;
   }
diff --git a/dbus/exported_object.h b/dbus/exported_object.h
index 8a98b4ab..69a63a5 100644
--- a/dbus/exported_object.h
+++ b/dbus/exported_object.h
@@ -8,12 +8,12 @@
 #include <dbus/dbus.h>
 
 #include <map>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/threading/platform_thread.h"
 #include "base/time/time.h"
@@ -42,7 +42,8 @@
   // Called to send a response from an exported method. |response| is the
   // response message. Callers should pass NULL in the event of an error that
   // prevents the sending of a response.
-  typedef base::Callback<void (scoped_ptr<Response> response)> ResponseSender;
+  typedef base::Callback<void(std::unique_ptr<Response> response)>
+      ResponseSender;
 
   // Called when an exported method is called. |method_call| is the request
   // message. |sender| is the callback that's used to send a response.
@@ -139,20 +140,20 @@
 
   // Runs the method. Helper function for HandleMessage().
   void RunMethod(MethodCallCallback method_call_callback,
-                 scoped_ptr<MethodCall> method_call,
+                 std::unique_ptr<MethodCall> method_call,
                  base::TimeTicks start_time);
 
   // Callback invoked by service provider to send a response to a method call.
   // Can be called immediately from a MethodCallCallback to implement a
   // synchronous service or called later to implement an asynchronous service.
   void SendResponse(base::TimeTicks start_time,
-                    scoped_ptr<MethodCall> method_call,
-                    scoped_ptr<Response> response);
+                    std::unique_ptr<MethodCall> method_call,
+                    std::unique_ptr<Response> response);
 
   // Called on completion of the method run from SendResponse().
   // Takes ownership of |method_call| and |response|.
-  void OnMethodCompleted(scoped_ptr<MethodCall> method_call,
-                         scoped_ptr<Response> response,
+  void OnMethodCompleted(std::unique_ptr<MethodCall> method_call,
+                         std::unique_ptr<Response> response,
                          base::TimeTicks start_time);
 
   // Called when the object is unregistered.
diff --git a/dbus/file_descriptor.h b/dbus/file_descriptor.h
index b4f95cb5..8fcab2f 100644
--- a/dbus/file_descriptor.h
+++ b/dbus/file_descriptor.h
@@ -5,7 +5,8 @@
 #ifndef DBUS_FILE_DESCRIPTOR_H_
 #define DBUS_FILE_DESCRIPTOR_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/move.h"
 #include "dbus/dbus_export.h"
 
@@ -84,7 +85,7 @@
 };
 
 using ScopedFileDescriptor =
-    scoped_ptr<FileDescriptor, FileDescriptor::Deleter>;
+    std::unique_ptr<FileDescriptor, FileDescriptor::Deleter>;
 
 }  // namespace dbus
 
diff --git a/dbus/message.cc b/dbus/message.cc
index fe497ba9..4a84756c 100644
--- a/dbus/message.cc
+++ b/dbus/message.cc
@@ -398,23 +398,23 @@
 Response::Response() : Message() {
 }
 
-scoped_ptr<Response> Response::FromRawMessage(DBusMessage* raw_message) {
+std::unique_ptr<Response> Response::FromRawMessage(DBusMessage* raw_message) {
   DCHECK_EQ(DBUS_MESSAGE_TYPE_METHOD_RETURN,
             dbus_message_get_type(raw_message));
 
-  scoped_ptr<Response> response(new Response);
+  std::unique_ptr<Response> response(new Response);
   response->Init(raw_message);
   return response;
 }
 
-scoped_ptr<Response> Response::FromMethodCall(MethodCall* method_call) {
-  scoped_ptr<Response> response(new Response);
+std::unique_ptr<Response> Response::FromMethodCall(MethodCall* method_call) {
+  std::unique_ptr<Response> response(new Response);
   response->Init(dbus_message_new_method_return(method_call->raw_message()));
   return response;
 }
 
-scoped_ptr<Response> Response::CreateEmpty() {
-  scoped_ptr<Response> response(new Response);
+std::unique_ptr<Response> Response::CreateEmpty() {
+  std::unique_ptr<Response> response(new Response);
   response->Init(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN));
   return response;
 }
@@ -426,20 +426,20 @@
 ErrorResponse::ErrorResponse() : Response() {
 }
 
-scoped_ptr<ErrorResponse> ErrorResponse::FromRawMessage(
+std::unique_ptr<ErrorResponse> ErrorResponse::FromRawMessage(
     DBusMessage* raw_message) {
   DCHECK_EQ(DBUS_MESSAGE_TYPE_ERROR, dbus_message_get_type(raw_message));
 
-  scoped_ptr<ErrorResponse> response(new ErrorResponse);
+  std::unique_ptr<ErrorResponse> response(new ErrorResponse);
   response->Init(raw_message);
   return response;
 }
 
-scoped_ptr<ErrorResponse> ErrorResponse::FromMethodCall(
+std::unique_ptr<ErrorResponse> ErrorResponse::FromMethodCall(
     MethodCall* method_call,
     const std::string& error_name,
     const std::string& error_message) {
-  scoped_ptr<ErrorResponse> response(new ErrorResponse);
+  std::unique_ptr<ErrorResponse> response(new ErrorResponse);
   response->Init(dbus_message_new_error(method_call->raw_message(),
                                         error_name.c_str(),
                                         error_message.c_str()));
diff --git a/dbus/message.h b/dbus/message.h
index b382032..0aa010cc 100644
--- a/dbus/message.h
+++ b/dbus/message.h
@@ -8,11 +8,12 @@
 #include <dbus/dbus.h>
 #include <stddef.h>
 #include <stdint.h>
+
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "dbus/dbus_export.h"
 #include "dbus/file_descriptor.h"
 #include "dbus/object_path.h"
@@ -204,16 +205,16 @@
  public:
   // Returns a newly created Response from the given raw message of the
   // type DBUS_MESSAGE_TYPE_METHOD_RETURN. Takes the ownership of |raw_message|.
-  static scoped_ptr<Response> FromRawMessage(DBusMessage* raw_message);
+  static std::unique_ptr<Response> FromRawMessage(DBusMessage* raw_message);
 
   // Returns a newly created Response from the given method call.
   // Used for implementing exported methods. Does NOT take the ownership of
   // |method_call|.
-  static scoped_ptr<Response> FromMethodCall(MethodCall* method_call);
+  static std::unique_ptr<Response> FromMethodCall(MethodCall* method_call);
 
   // Returns a newly created Response with an empty payload.
   // Useful for testing.
-  static scoped_ptr<Response> CreateEmpty();
+  static std::unique_ptr<Response> CreateEmpty();
 
  protected:
   // Creates a Response message. The internal raw message is NULL.
@@ -229,13 +230,14 @@
  public:
   // Returns a newly created Response from the given raw message of the
   // type DBUS_MESSAGE_TYPE_METHOD_RETURN. Takes the ownership of |raw_message|.
-  static scoped_ptr<ErrorResponse> FromRawMessage(DBusMessage* raw_message);
+  static std::unique_ptr<ErrorResponse> FromRawMessage(
+      DBusMessage* raw_message);
 
   // Returns a newly created ErrorResponse from the given method call, the
   // error name, and the error message.  The error name looks like
   // "org.freedesktop.DBus.Error.Failed". Used for returning an error to a
   // failed method call. Does NOT take the ownership of |method_call|.
-  static scoped_ptr<ErrorResponse> FromMethodCall(
+  static std::unique_ptr<ErrorResponse> FromMethodCall(
       MethodCall* method_call,
       const std::string& error_name,
       const std::string& error_message);
diff --git a/dbus/message_unittest.cc b/dbus/message_unittest.cc
index 65d49f7..a58b36b 100644
--- a/dbus/message_unittest.cc
+++ b/dbus/message_unittest.cc
@@ -7,8 +7,9 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/posix/eintr_wrapper.h"
 #include "dbus/object_path.h"
 #include "dbus/test_proto.pb.h"
@@ -19,7 +20,7 @@
 // Test that a byte can be properly written and read. We only have this
 // test for byte, as repeating this for other basic types is too redundant.
 TEST(MessageTest, AppendAndPopByte) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   writer.AppendByte(123);  // The input is 123.
 
@@ -43,7 +44,7 @@
 
 // Check all basic types can be properly written and read.
 TEST(MessageTest, AppendAndPopBasicDataTypes) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
 
   // Append 0, 1, 2, 3, 4, 5, 6, 7, 8, "string", "/object/path".
@@ -119,7 +120,7 @@
     return;
   }
 
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
 
   // Append stdout.
@@ -158,7 +159,7 @@
 
 // Check all variant types can be properly written and read.
 TEST(MessageTest, AppendAndPopVariantDataTypes) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
 
   // Append 0, 1, 2, 3, 4, 5, 6, 7, 8, "string", "/object/path".
@@ -228,7 +229,7 @@
 }
 
 TEST(MessageTest, ArrayOfBytes) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   std::vector<uint8_t> bytes;
   bytes.push_back(1);
@@ -249,7 +250,7 @@
 }
 
 TEST(MessageTest, ArrayOfDoubles) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   std::vector<double> doubles;
   doubles.push_back(0.2);
@@ -270,7 +271,7 @@
 }
 
 TEST(MessageTest, ArrayOfBytes_Empty) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   std::vector<uint8_t> bytes;
   writer.AppendArrayOfBytes(bytes.data(), bytes.size());
@@ -286,7 +287,7 @@
 }
 
 TEST(MessageTest, ArrayOfStrings) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   std::vector<std::string> strings;
   strings.push_back("fee");
@@ -308,7 +309,7 @@
 }
 
 TEST(MessageTest, ArrayOfObjectPaths) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   std::vector<ObjectPath> object_paths;
   object_paths.push_back(ObjectPath("/object/path/1"));
@@ -328,7 +329,7 @@
 }
 
 TEST(MessageTest, ProtoBuf) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   TestProto send_message;
   send_message.set_text("testing");
@@ -348,7 +349,7 @@
 // test for array, as repeating this for other container types is too
 // redundant.
 TEST(MessageTest, OpenArrayAndPopArray) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   MessageWriter array_writer(NULL);
   writer.OpenArray("s", &array_writer);  // Open an array of strings.
@@ -378,7 +379,7 @@
 // Create a complex message using array, struct, variant, dict entry, and
 // make sure it can be read properly.
 TEST(MessageTest, CreateComplexMessageAndReadIt) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   {
     MessageWriter array_writer(NULL);
@@ -536,7 +537,8 @@
   dbus_message_set_interface(raw_message, "com.example.Interface");
   dbus_message_set_member(raw_message, "SomeMethod");
 
-  scoped_ptr<MethodCall> method_call(MethodCall::FromRawMessage(raw_message));
+  std::unique_ptr<MethodCall> method_call(
+      MethodCall::FromRawMessage(raw_message));
   EXPECT_EQ("com.example.Interface", method_call->GetInterface());
   EXPECT_EQ("SomeMethod", method_call->GetMember());
 }
@@ -566,13 +568,13 @@
   dbus_message_set_interface(raw_message, "com.example.Interface");
   dbus_message_set_member(raw_message, "SomeSignal");
 
-  scoped_ptr<Signal> signal(Signal::FromRawMessage(raw_message));
+  std::unique_ptr<Signal> signal(Signal::FromRawMessage(raw_message));
   EXPECT_EQ("com.example.Interface", signal->GetInterface());
   EXPECT_EQ("SomeSignal", signal->GetMember());
 }
 
 TEST(MessageTest, Response) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   EXPECT_TRUE(response->raw_message());
   EXPECT_EQ(Message::MESSAGE_METHOD_RETURN, response->GetMessageType());
   EXPECT_EQ("MESSAGE_METHOD_RETURN", response->GetMessageTypeAsString());
@@ -583,8 +585,7 @@
   MethodCall method_call("com.example.Interface", "SomeMethod");
   method_call.SetSerial(kSerial);
 
-  scoped_ptr<Response> response(
-      Response::FromMethodCall(&method_call));
+  std::unique_ptr<Response> response(Response::FromMethodCall(&method_call));
   EXPECT_EQ(Message::MESSAGE_METHOD_RETURN, response->GetMessageType());
   EXPECT_EQ("MESSAGE_METHOD_RETURN", response->GetMessageTypeAsString());
   // The serial should be copied to the reply serial.
@@ -598,10 +599,8 @@
   MethodCall method_call("com.example.Interface", "SomeMethod");
   method_call.SetSerial(kSerial);
 
-  scoped_ptr<ErrorResponse> error_response(
-      ErrorResponse::FromMethodCall(&method_call,
-                                    DBUS_ERROR_FAILED,
-                                    kErrorMessage));
+  std::unique_ptr<ErrorResponse> error_response(ErrorResponse::FromMethodCall(
+      &method_call, DBUS_ERROR_FAILED, kErrorMessage));
   EXPECT_EQ(Message::MESSAGE_ERROR, error_response->GetMessageType());
   EXPECT_EQ("MESSAGE_ERROR", error_response->GetMessageTypeAsString());
   // The serial should be copied to the reply serial.
@@ -615,7 +614,7 @@
 }
 
 TEST(MessageTest, GetAndSetHeaders) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
 
   EXPECT_EQ("", message->GetDestination());
   EXPECT_EQ(ObjectPath(std::string()), message->GetPath());
@@ -646,7 +645,7 @@
 }
 
 TEST(MessageTest, SetInvalidHeaders) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   EXPECT_EQ("", message->GetDestination());
   EXPECT_EQ(ObjectPath(std::string()), message->GetPath());
   EXPECT_EQ("", message->GetInterface());
@@ -678,7 +677,7 @@
 TEST(MessageTest, ToString_LongString) {
   const std::string kLongString(1000, 'o');
 
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   writer.AppendString(kLongString);
 
diff --git a/dbus/mock_object_proxy.h b/dbus/mock_object_proxy.h
index 66f485a..f27f6f6 100644
--- a/dbus/mock_object_proxy.h
+++ b/dbus/mock_object_proxy.h
@@ -21,27 +21,28 @@
                   const std::string& service_name,
                   const ObjectPath& object_path);
 
-  // GMock doesn't support the return type of scoped_ptr<> because scoped_ptr is
-  // uncopyable. This is a workaround which defines |MockCallMethodAndBlock| as
-  // a mock method and makes |CallMethodAndBlock| call the mocked method.
-  // Use |MockCallMethodAndBlock| for setting/testing expectations.
+  // GMock doesn't support the return type of std::unique_ptr<> because
+  // std::unique_ptr is uncopyable. This is a workaround which defines
+  // |MockCallMethodAndBlock| as a mock method and makes
+  // |CallMethodAndBlock| call the mocked method.  Use |MockCallMethodAndBlock|
+  // for setting/testing expectations.
   MOCK_METHOD3(MockCallMethodAndBlockWithErrorDetails,
                Response*(MethodCall* method_call,
                          int timeout_ms,
                          ScopedDBusError* error));
-  scoped_ptr<Response> CallMethodAndBlockWithErrorDetails(
+  std::unique_ptr<Response> CallMethodAndBlockWithErrorDetails(
       MethodCall* method_call,
       int timeout_ms,
       ScopedDBusError* error) override {
-    return scoped_ptr<Response>(
+    return std::unique_ptr<Response>(
         MockCallMethodAndBlockWithErrorDetails(method_call, timeout_ms, error));
   }
   MOCK_METHOD2(MockCallMethodAndBlock, Response*(MethodCall* method_call,
                                                  int timeout_ms));
-  scoped_ptr<Response> CallMethodAndBlock(MethodCall* method_call,
-                                          int timeout_ms) override {
-    return scoped_ptr<Response>(MockCallMethodAndBlock(method_call,
-                                                       timeout_ms));
+  std::unique_ptr<Response> CallMethodAndBlock(MethodCall* method_call,
+                                               int timeout_ms) override {
+    return std::unique_ptr<Response>(
+        MockCallMethodAndBlock(method_call, timeout_ms));
   }
   MOCK_METHOD3(CallMethod, void(MethodCall* method_call,
                                 int timeout_ms,
diff --git a/dbus/mock_unittest.cc b/dbus/mock_unittest.cc
index 6b2a521..ed78e2c 100644
--- a/dbus/mock_unittest.cc
+++ b/dbus/mock_unittest.cc
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "dbus/message.h"
@@ -82,7 +83,7 @@
  protected:
   std::string response_string_;
   base::MessageLoop message_loop_;
-  scoped_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::RunLoop> run_loop_;
   scoped_refptr<MockBus> mock_bus_;
   scoped_refptr<MockObjectProxy> mock_proxy_;
 
@@ -96,7 +97,7 @@
       MessageReader reader(method_call);
       std::string text_message;
       if (reader.PopString(&text_message)) {
-        scoped_ptr<Response> response = Response::CreateEmpty();
+        std::unique_ptr<Response> response = Response::CreateEmpty();
         MessageWriter writer(response.get());
         writer.AppendString(text_message);
         return response.release();
@@ -151,9 +152,8 @@
   writer.AppendString(kHello);
 
   // Call the method.
-  scoped_ptr<Response> response(
-      proxy->CallMethodAndBlock(&method_call,
-                                ObjectProxy::TIMEOUT_USE_DEFAULT));
+  std::unique_ptr<Response> response(proxy->CallMethodAndBlock(
+      &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT));
 
   // Check the response.
   ASSERT_TRUE(response.get());
@@ -175,9 +175,8 @@
 
   ScopedDBusError error;
   // Call the method.
-  scoped_ptr<Response> response(
-      proxy->CallMethodAndBlockWithErrorDetails(
-          &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT, &error));
+  std::unique_ptr<Response> response(proxy->CallMethodAndBlockWithErrorDetails(
+      &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT, &error));
 
   // Check the response.
   ASSERT_FALSE(response.get());
diff --git a/dbus/object_manager.cc b/dbus/object_manager.cc
index 9215d84..56143c75 100644
--- a/dbus/object_manager.cc
+++ b/dbus/object_manager.cc
@@ -263,8 +263,7 @@
   // raw_message will be unrefed on exit of the function. Increment the
   // reference so we can use it in Signal.
   dbus_message_ref(raw_message);
-  scoped_ptr<Signal> signal(
-      Signal::FromRawMessage(raw_message));
+  std::unique_ptr<Signal> signal(Signal::FromRawMessage(raw_message));
 
   const std::string interface = signal->GetInterface();
   const std::string member = signal->GetMember();
diff --git a/dbus/object_manager_unittest.cc b/dbus/object_manager_unittest.cc
index 443210c..ae03776 100644
--- a/dbus/object_manager_unittest.cc
+++ b/dbus/object_manager_unittest.cc
@@ -205,11 +205,11 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<base::RunLoop> run_loop_;
-  scoped_ptr<base::Thread> dbus_thread_;
+  std::unique_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::Thread> dbus_thread_;
   scoped_refptr<Bus> bus_;
   ObjectManager* object_manager_;
-  scoped_ptr<TestService> test_service_;
+  std::unique_ptr<TestService> test_service_;
 
   std::string last_name_value_;
   bool timeout_expired_;
diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc
index 6c758b9..5d9d8e84 100644
--- a/dbus/object_proxy.cc
+++ b/dbus/object_proxy.cc
@@ -69,14 +69,16 @@
 // Originally we tried to make |method_call| a const reference, but we
 // gave up as dbus_connection_send_with_reply_and_block() takes a
 // non-const pointer of DBusMessage as the second parameter.
-scoped_ptr<Response> ObjectProxy::CallMethodAndBlockWithErrorDetails(
-    MethodCall* method_call, int timeout_ms, ScopedDBusError* error) {
+std::unique_ptr<Response> ObjectProxy::CallMethodAndBlockWithErrorDetails(
+    MethodCall* method_call,
+    int timeout_ms,
+    ScopedDBusError* error) {
   bus_->AssertOnDBusThread();
 
   if (!bus_->Connect() ||
       !method_call->SetDestination(service_name_) ||
       !method_call->SetPath(object_path_))
-    return scoped_ptr<Response>();
+    return std::unique_ptr<Response>();
 
   DBusMessage* request_message = method_call->raw_message();
 
@@ -97,7 +99,7 @@
                          method_call->GetMember(),
                          error->is_set() ? error->name() : "unknown error type",
                          error->is_set() ? error->message() : "");
-    return scoped_ptr<Response>();
+    return std::unique_ptr<Response>();
   }
   // Record time spent for the method call. Don't include failures.
   UMA_HISTOGRAM_TIMES("DBus.SyncMethodCallTime",
@@ -106,8 +108,9 @@
   return Response::FromRawMessage(response_message);
 }
 
-scoped_ptr<Response> ObjectProxy::CallMethodAndBlock(MethodCall* method_call,
-                                                     int timeout_ms) {
+std::unique_ptr<Response> ObjectProxy::CallMethodAndBlock(
+    MethodCall* method_call,
+    int timeout_ms) {
   ScopedDBusError error;
   return CallMethodAndBlockWithErrorDetails(method_call, timeout_ms, &error);
 }
@@ -325,7 +328,7 @@
   } else if (dbus_message_get_type(response_message) ==
              DBUS_MESSAGE_TYPE_ERROR) {
     // This will take |response_message| and release (unref) it.
-    scoped_ptr<ErrorResponse> error_response(
+    std::unique_ptr<ErrorResponse> error_response(
         ErrorResponse::FromRawMessage(response_message));
     error_callback.Run(error_response.get());
     // Delete the message  on the D-Bus thread. See below for why.
@@ -335,7 +338,8 @@
                    error_response.release()));
   } else {
     // This will take |response_message| and release (unref) it.
-    scoped_ptr<Response> response(Response::FromRawMessage(response_message));
+    std::unique_ptr<Response> response(
+        Response::FromRawMessage(response_message));
     // The response is successfully received.
     response_callback.Run(response.get());
     // The message should be deleted on the D-Bus thread for a complicated
@@ -466,8 +470,7 @@
   // raw_message will be unrefed on exit of the function. Increment the
   // reference so we can use it in Signal.
   dbus_message_ref(raw_message);
-  scoped_ptr<Signal> signal(
-      Signal::FromRawMessage(raw_message));
+  std::unique_ptr<Signal> signal(Signal::FromRawMessage(raw_message));
 
   // Verify the signal comes from the object we're proxying for, this is
   // our last chance to return DBUS_HANDLER_RESULT_NOT_YET_HANDLED and
@@ -659,7 +662,7 @@
 }
 
 DBusHandlerResult ObjectProxy::HandleNameOwnerChanged(
-    scoped_ptr<Signal> signal) {
+    std::unique_ptr<Signal> signal) {
   DCHECK(signal);
   bus_->AssertOnDBusThread();
 
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h
index 839d5f72..033e886 100644
--- a/dbus/object_proxy.h
+++ b/dbus/object_proxy.h
@@ -8,6 +8,7 @@
 #include <dbus/dbus.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -15,7 +16,6 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "base/time/time.h"
 #include "dbus/dbus_export.h"
@@ -98,7 +98,7 @@
   // in the |error| object.
   //
   // BLOCKING CALL.
-  virtual scoped_ptr<Response> CallMethodAndBlockWithErrorDetails(
+  virtual std::unique_ptr<Response> CallMethodAndBlockWithErrorDetails(
       MethodCall* method_call,
       int timeout_ms,
       ScopedDBusError* error);
@@ -107,8 +107,8 @@
   // is returned. Returns NULL on error.
   //
   // BLOCKING CALL.
-  virtual scoped_ptr<Response> CallMethodAndBlock(MethodCall* method_call,
-                                                  int timeout_ms);
+  virtual std::unique_ptr<Response> CallMethodAndBlock(MethodCall* method_call,
+                                                       int timeout_ms);
 
   // Requests to call the method of the remote object.
   //
@@ -290,7 +290,8 @@
   void UpdateNameOwnerAndBlock();
 
   // Handles NameOwnerChanged signal from D-Bus's special message bus.
-  DBusHandlerResult HandleNameOwnerChanged(scoped_ptr<dbus::Signal> signal);
+  DBusHandlerResult HandleNameOwnerChanged(
+      std::unique_ptr<dbus::Signal> signal);
 
   // Runs |name_owner_changed_callback_|.
   void RunNameOwnerChangedCallback(const std::string& old_owner,
diff --git a/dbus/object_proxy_unittest.cc b/dbus/object_proxy_unittest.cc
index 05c1294..cc79f84 100644
--- a/dbus/object_proxy_unittest.cc
+++ b/dbus/object_proxy_unittest.cc
@@ -29,7 +29,7 @@
 };
 
 // Used as a WaitForServiceToBeAvailableCallback.
-void OnServiceIsAvailable(scoped_ptr<base::RunLoop>* run_loop,
+void OnServiceIsAvailable(std::unique_ptr<base::RunLoop>* run_loop,
                           bool service_is_available) {
   EXPECT_TRUE(service_is_available);
   ASSERT_TRUE(*run_loop);
@@ -37,7 +37,7 @@
 }
 
 TEST_F(ObjectProxyTest, WaitForServiceToBeAvailable) {
-  scoped_ptr<base::RunLoop> run_loop;
+  std::unique_ptr<base::RunLoop> run_loop;
 
   TestService::Options options;
   TestService test_service(options);
diff --git a/dbus/property.cc b/dbus/property.cc
index 66af8667..faca4a0a 100644
--- a/dbus/property.cc
+++ b/dbus/property.cc
@@ -141,9 +141,8 @@
   writer.AppendString(property->name());
 
   DCHECK(object_proxy_);
-  scoped_ptr<dbus::Response> response(
-      object_proxy_->CallMethodAndBlock(&method_call,
-                                        ObjectProxy::TIMEOUT_USE_DEFAULT));
+  std::unique_ptr<dbus::Response> response(object_proxy_->CallMethodAndBlock(
+      &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT));
 
   if (!response.get()) {
     LOG(WARNING) << property->name() << ": GetAndBlock: failed.";
@@ -212,9 +211,8 @@
   property->AppendSetValueToWriter(&writer);
 
   DCHECK(object_proxy_);
-  scoped_ptr<dbus::Response> response(
-      object_proxy_->CallMethodAndBlock(&method_call,
-                                        ObjectProxy::TIMEOUT_USE_DEFAULT));
+  std::unique_ptr<dbus::Response> response(object_proxy_->CallMethodAndBlock(
+      &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT));
   if (response.get())
     return true;
   return false;
diff --git a/dbus/property_unittest.cc b/dbus/property_unittest.cc
index f1592849..5922554f 100644
--- a/dbus/property_unittest.cc
+++ b/dbus/property_unittest.cc
@@ -158,12 +158,12 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<base::RunLoop> run_loop_;
-  scoped_ptr<base::Thread> dbus_thread_;
+  std::unique_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::Thread> dbus_thread_;
   scoped_refptr<Bus> bus_;
   ObjectProxy* object_proxy_;
-  scoped_ptr<Properties> properties_;
-  scoped_ptr<TestService> test_service_;
+  std::unique_ptr<Properties> properties_;
+  std::unique_ptr<TestService> test_service_;
   // Properties updated.
   std::vector<std::string> updated_properties_;
   // Last callback received.
@@ -328,7 +328,7 @@
 }
 
 TEST(PropertyTestStatic, ReadWriteStringMap) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   MessageWriter variant_writer(NULL);
   MessageWriter variant_array_writer(NULL);
@@ -362,7 +362,7 @@
   test_map["Map"] = "Test";
   test_map["Random"] = "Text";
 
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
 
   Property<std::map<std::string, std::string>> string_map;
@@ -375,7 +375,7 @@
 }
 
 TEST(PropertyTestStatic, ReadWriteNetAddressArray) {
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
   MessageWriter variant_writer(NULL);
   MessageWriter variant_array_writer(NULL);
@@ -419,7 +419,7 @@
     test_list.push_back(make_pair(bytes, 16));
   }
 
-  scoped_ptr<Response> message(Response::CreateEmpty());
+  std::unique_ptr<Response> message(Response::CreateEmpty());
   MessageWriter writer(message.get());
 
   Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>> ip_list;
diff --git a/dbus/signal_sender_verification_unittest.cc b/dbus/signal_sender_verification_unittest.cc
index 785948a..3b2cf6f5 100644
--- a/dbus/signal_sender_verification_unittest.cc
+++ b/dbus/signal_sender_verification_unittest.cc
@@ -2,8 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
+
 #include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram.h"
 #include "base/metrics/histogram_samples.h"
@@ -168,12 +169,12 @@
   }
 
   base::MessageLoop message_loop_;
-  scoped_ptr<base::RunLoop> run_loop_;
-  scoped_ptr<base::Thread> dbus_thread_;
+  std::unique_ptr<base::RunLoop> run_loop_;
+  std::unique_ptr<base::Thread> dbus_thread_;
   scoped_refptr<Bus> bus_;
   ObjectProxy* object_proxy_;
-  scoped_ptr<TestService> test_service_;
-  scoped_ptr<TestService> test_service2_;
+  std::unique_ptr<TestService> test_service_;
+  std::unique_ptr<TestService> test_service2_;
   // Text message from "Test" signal.
   std::string test_signal_string_;
 
@@ -201,7 +202,7 @@
   UMA_HISTOGRAM_COUNTS("DBus.RejectedSignalCount", 0);
   base::HistogramBase* reject_signal_histogram =
         base::StatisticsRecorder::FindHistogram("DBus.RejectedSignalCount");
-  scoped_ptr<base::HistogramSamples> samples1(
+  std::unique_ptr<base::HistogramSamples> samples1(
       reject_signal_histogram->SnapshotSamples());
 
   const char kNewMessage[] = "hello, new world";
@@ -211,7 +212,7 @@
   // Sleep to have message delivered to the client via the D-Bus service.
   base::PlatformThread::Sleep(TestTimeouts::action_timeout());
 
-  scoped_ptr<base::HistogramSamples> samples2(
+  std::unique_ptr<base::HistogramSamples> samples2(
       reject_signal_histogram->SnapshotSamples());
 
   ASSERT_EQ("", test_signal_string_);
diff --git a/dbus/test_service.cc b/dbus/test_service.cc
index 7b36082..217e8ee75 100644
--- a/dbus/test_service.cc
+++ b/dbus/test_service.cc
@@ -309,11 +309,11 @@
   MessageReader reader(method_call);
   std::string text_message;
   if (!reader.PopString(&text_message)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
-  scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+  std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
   MessageWriter writer(response.get());
   writer.AppendString(text_message);
   response_sender.Run(std::move(response));
@@ -338,7 +338,7 @@
 
 void TestService::BrokenMethod(MethodCall* method_call,
                                ExportedObject::ResponseSender response_sender) {
-  response_sender.Run(scoped_ptr<Response>());
+  response_sender.Run(std::unique_ptr<Response>());
 }
 
 
@@ -348,11 +348,11 @@
   MessageReader reader(method_call);
   std::string interface;
   if (!reader.PopString(&interface)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
-  scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+  std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
   MessageWriter writer(response.get());
 
   AddPropertiesToWriter(&writer);
@@ -365,20 +365,20 @@
   MessageReader reader(method_call);
   std::string interface;
   if (!reader.PopString(&interface)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
   std::string name;
   if (!reader.PopString(&name)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
   if (name == "Name") {
     // Return the previous value for the "Name" property:
     // Variant<"TestService">
-    scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+    std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
     MessageWriter writer(response.get());
 
     writer.AppendVariantOfString("TestService");
@@ -387,7 +387,7 @@
   } else if (name == "Version") {
     // Return a new value for the "Version" property:
     // Variant<20>
-    scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+    std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
     MessageWriter writer(response.get());
 
     writer.AppendVariantOfInt16(20);
@@ -396,7 +396,7 @@
   } else if (name == "Methods") {
     // Return the previous value for the "Methods" property:
     // Variant<["Echo", "SlowEcho", "AsyncEcho", "BrokenMethod"]>
-    scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+    std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
     MessageWriter writer(response.get());
     MessageWriter variant_writer(NULL);
     MessageWriter variant_array_writer(NULL);
@@ -414,7 +414,7 @@
   } else if (name == "Objects") {
     // Return the previous value for the "Objects" property:
     // Variant<[objectpath:"/TestObjectPath"]>
-    scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+    std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
     MessageWriter writer(response.get());
     MessageWriter variant_writer(NULL);
     MessageWriter variant_array_writer(NULL);
@@ -429,7 +429,7 @@
   } else if (name == "Bytes") {
     // Return the previous value for the "Bytes" property:
     // Variant<[0x54, 0x65, 0x73, 0x74]>
-    scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+    std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
     MessageWriter writer(response.get());
     MessageWriter variant_writer(NULL);
     MessageWriter variant_array_writer(NULL);
@@ -442,7 +442,7 @@
     response_sender.Run(std::move(response));
   } else {
     // Return error.
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 }
@@ -452,24 +452,24 @@
   MessageReader reader(method_call);
   std::string interface;
   if (!reader.PopString(&interface)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
   std::string name;
   if (!reader.PopString(&name)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
   if (name != "Name") {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
   std::string value;
   if (!reader.PopVariantOfString(&value)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
@@ -485,7 +485,7 @@
   std::string action;
   ObjectPath object_path;
   if (!reader.PopString(&action) || !reader.PopObjectPath(&object_path)) {
-    response_sender.Run(scoped_ptr<Response>());
+    response_sender.Run(std::unique_ptr<Response>());
     return;
   }
 
@@ -509,14 +509,14 @@
     SendPropertyInvalidatedSignal();
   }
 
-  scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+  std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
   response_sender.Run(std::move(response));
 }
 
 void TestService::PerformActionResponse(
     MethodCall* method_call,
     ExportedObject::ResponseSender response_sender) {
-  scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+  std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
   response_sender.Run(std::move(response));
 }
 
@@ -540,7 +540,7 @@
 void TestService::GetManagedObjects(
     MethodCall* method_call,
     ExportedObject::ResponseSender response_sender) {
-  scoped_ptr<Response> response = Response::FromMethodCall(method_call);
+  std::unique_ptr<Response> response = Response::FromMethodCall(method_call);
   MessageWriter writer(response.get());
 
   // The managed objects response is a dictionary of object paths identifying
diff --git a/dbus/values_util.cc b/dbus/values_util.cc
index e932312..ed435a19 100644
--- a/dbus/values_util.cc
+++ b/dbus/values_util.cc
@@ -4,9 +4,10 @@
 
 #include "dbus/values_util.h"
 
+#include <memory>
+
 #include "base/json/json_writer.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "dbus/message.h"
 
@@ -47,7 +48,7 @@
         return false;
     } else {
       // If the type of keys is not STRING, convert it to string.
-      scoped_ptr<base::Value> key(PopDataAsValue(&entry_reader));
+      std::unique_ptr<base::Value> key(PopDataAsValue(&entry_reader));
       if (!key)
         return false;
       // Use JSONWriter to convert an arbitrary value to a string.
@@ -176,12 +177,12 @@
         // If the type of the array's element is DICT_ENTRY, create a
         // DictionaryValue, otherwise create a ListValue.
         if (sub_reader.GetDataType() == Message::DICT_ENTRY) {
-          scoped_ptr<base::DictionaryValue> dictionary_value(
+          std::unique_ptr<base::DictionaryValue> dictionary_value(
               new base::DictionaryValue);
           if (PopDictionaryEntries(&sub_reader, dictionary_value.get()))
             result = dictionary_value.release();
         } else {
-          scoped_ptr<base::ListValue> list_value(new base::ListValue);
+          std::unique_ptr<base::ListValue> list_value(new base::ListValue);
           if (PopListElements(&sub_reader, list_value.get()))
             result = list_value.release();
         }
@@ -191,7 +192,7 @@
     case Message::STRUCT: {
       MessageReader sub_reader(NULL);
       if (reader->PopStruct(&sub_reader)) {
-        scoped_ptr<base::ListValue> list_value(new base::ListValue);
+        std::unique_ptr<base::ListValue> list_value(new base::ListValue);
         if (PopListElements(&sub_reader, list_value.get()))
           result = list_value.release();
       }
diff --git a/dbus/values_util_unittest.cc b/dbus/values_util_unittest.cc
index b2f1404da..6903d51 100644
--- a/dbus/values_util_unittest.cc
+++ b/dbus/values_util_unittest.cc
@@ -8,11 +8,11 @@
 #include <stdint.h>
 
 #include <cmath>
+#include <memory>
 #include <vector>
 
 #include "base/json/json_writer.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "dbus/message.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -20,7 +20,7 @@
 namespace dbus {
 
 TEST(ValuesUtilTest, PopBasicTypes) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append basic type values.
   MessageWriter writer(response.get());
   const uint8_t kByteValue = 42;
@@ -49,8 +49,8 @@
   writer.AppendObjectPath(kObjectPathValue);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
-  scoped_ptr<base::Value> expected_value;
+  std::unique_ptr<base::Value> value;
+  std::unique_ptr<base::Value> expected_value;
   // Pop a byte.
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
@@ -117,7 +117,7 @@
 }
 
 TEST(ValuesUtilTest, PopVariant) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append variant values.
   MessageWriter writer(response.get());
   const bool kBoolValue = true;
@@ -130,8 +130,8 @@
   writer.AppendVariantOfString(kStringValue);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
-  scoped_ptr<base::Value> expected_value;
+  std::unique_ptr<base::Value> value;
+  std::unique_ptr<base::Value> expected_value;
   // Pop a bool.
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
@@ -157,7 +157,7 @@
 // Pop extremely large integers which cannot be precisely represented in
 // double.
 TEST(ValuesUtilTest, PopExtremelyLargeIntegers) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append large integers.
   MessageWriter writer(response.get());
   const int64_t kInt64Value = -123456789012345689LL;
@@ -166,8 +166,8 @@
   writer.AppendUint64(kUint64Value);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
-  scoped_ptr<base::Value> expected_value;
+  std::unique_ptr<base::Value> value;
+  std::unique_ptr<base::Value> expected_value;
   double double_value = 0;
   // Pop an int64_t.
   value.reset(PopDataAsValue(&reader));
@@ -188,7 +188,7 @@
 }
 
 TEST(ValuesUtilTest, PopIntArray) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append an int32_t array.
   MessageWriter writer(response.get());
   MessageWriter sub_writer(NULL);
@@ -202,19 +202,19 @@
   writer.CloseContainer(&sub_writer);
 
   // Create the expected value.
-  scoped_ptr<base::ListValue> list_value(new base::ListValue);
+  std::unique_ptr<base::ListValue> list_value(new base::ListValue);
   for (size_t i = 0; i != data.size(); ++i)
     list_value->Append(new base::FundamentalValue(data[i]));
 
   // Pop an int32_t array.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value(PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(list_value.get()));
 }
 
 TEST(ValuesUtilTest, PopStringArray) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append a string array.
   MessageWriter writer(response.get());
   MessageWriter sub_writer(NULL);
@@ -225,19 +225,19 @@
   writer.AppendArrayOfStrings(data);
 
   // Create the expected value.
-  scoped_ptr<base::ListValue> list_value(new base::ListValue);
+  std::unique_ptr<base::ListValue> list_value(new base::ListValue);
   for (size_t i = 0; i != data.size(); ++i)
     list_value->Append(new base::StringValue(data[i]));
 
   // Pop a string array.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value(PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(list_value.get()));
 }
 
 TEST(ValuesUtilTest, PopStruct) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append a struct.
   MessageWriter writer(response.get());
   MessageWriter sub_writer(NULL);
@@ -261,13 +261,13 @@
 
   // Pop a struct.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value(PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&list_value));
 }
 
 TEST(ValuesUtilTest, PopStringToVariantDictionary) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append a dictionary.
   MessageWriter writer(response.get());
   MessageWriter sub_writer(NULL);
@@ -308,13 +308,13 @@
 
   // Pop a dictinoary.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value(PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&dictionary_value));
 }
 
 TEST(ValuesUtilTest, PopDictionaryWithDottedStringKey) {
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   // Append a dictionary.
   MessageWriter writer(response.get());
   MessageWriter sub_writer(NULL);
@@ -351,7 +351,7 @@
 
   // Pop a dictinoary.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value(PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&dictionary_value));
 }
@@ -365,7 +365,7 @@
     keys[i] = std::sqrt(values[i]);
 
   // Append a dictionary.
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   MessageWriter sub_writer(NULL);
   writer.OpenArray("{di}", &sub_writer);
@@ -388,7 +388,7 @@
 
   // Pop a dictionary.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value(PopDataAsValue(&reader));
+  std::unique_ptr<base::Value> value(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&dictionary_value));
 }
@@ -399,7 +399,7 @@
   const base::FundamentalValue kDoubleValue(4.2);
   const base::StringValue kStringValue("string");
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendBasicTypeValueData(&writer, kBoolValue);
   AppendBasicTypeValueData(&writer, kIntegerValue);
@@ -407,7 +407,7 @@
   AppendBasicTypeValueData(&writer, kStringValue);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&kBoolValue));
@@ -428,7 +428,7 @@
   const base::FundamentalValue kDoubleValue(4.2);
   const base::StringValue kStringValue("string");
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendBasicTypeValueDataAsVariant(&writer, kBoolValue);
   AppendBasicTypeValueDataAsVariant(&writer, kIntegerValue);
@@ -436,7 +436,7 @@
   AppendBasicTypeValueDataAsVariant(&writer, kStringValue);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&kBoolValue));
@@ -457,7 +457,7 @@
   const base::FundamentalValue kDoubleValue(4.2);
   const base::StringValue kStringValue("string");
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendValueData(&writer, kBoolValue);
   AppendValueData(&writer, kIntegerValue);
@@ -465,7 +465,7 @@
   AppendValueData(&writer, kStringValue);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&kBoolValue));
@@ -486,7 +486,7 @@
   const base::FundamentalValue kDoubleValue(4.2);
   const base::StringValue kStringValue("string");
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendValueDataAsVariant(&writer, kBoolValue);
   AppendValueDataAsVariant(&writer, kIntegerValue);
@@ -494,7 +494,7 @@
   AppendValueDataAsVariant(&writer, kStringValue);
 
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&kBoolValue));
@@ -539,7 +539,7 @@
   test_dictionary.Set(kKey5, list_value);  // takes ownership
   test_dictionary.Set(kKey6, dictionary_value);  // takes ownership
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendValueData(&writer, test_dictionary);
   base::FundamentalValue int_value(kInt32Value);
@@ -547,7 +547,7 @@
 
   // Read the data.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&test_dictionary));
@@ -586,7 +586,7 @@
   test_dictionary.Set(kKey5, list_value);  // takes ownership
   test_dictionary.Set(kKey6, dictionary_value);  // takes ownership
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendValueDataAsVariant(&writer, test_dictionary);
   base::FundamentalValue int_value(kInt32Value);
@@ -594,7 +594,7 @@
 
   // Read the data.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&test_dictionary));
@@ -629,7 +629,7 @@
   test_list.Append(list_value);  // takes ownership
   test_list.Append(dictionary_value);  // takes ownership
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendValueData(&writer, test_list);
   base::FundamentalValue int_value(kInt32Value);
@@ -637,7 +637,7 @@
 
   // Read the data.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&test_list));
@@ -672,7 +672,7 @@
   test_list.Append(list_value);  // takes ownership
   test_list.Append(dictionary_value);  // takes ownership
 
-  scoped_ptr<Response> response(Response::CreateEmpty());
+  std::unique_ptr<Response> response(Response::CreateEmpty());
   MessageWriter writer(response.get());
   AppendValueDataAsVariant(&writer, test_list);
   base::FundamentalValue int_value(kInt32Value);
@@ -680,7 +680,7 @@
 
   // Read the data.
   MessageReader reader(response.get());
-  scoped_ptr<base::Value> value;
+  std::unique_ptr<base::Value> value;
   value.reset(PopDataAsValue(&reader));
   ASSERT_TRUE(value.get() != NULL);
   EXPECT_TRUE(value->Equals(&test_list));
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
index bb5e07e..de82167 100644
--- a/device/bluetooth/BUILD.gn
+++ b/device/bluetooth/BUILD.gn
@@ -71,6 +71,8 @@
     "bluetooth_gatt_notify_session.h",
     "bluetooth_gatt_notify_session_android.cc",
     "bluetooth_gatt_notify_session_android.h",
+    "bluetooth_gatt_notify_session_win.cc",
+    "bluetooth_gatt_notify_session_win.h",
     "bluetooth_gatt_service.cc",
     "bluetooth_gatt_service.h",
     "bluetooth_init_win.cc",
diff --git a/device/bluetooth/bluetooth.gyp b/device/bluetooth/bluetooth.gyp
index e819902..5d17c93d 100644
--- a/device/bluetooth/bluetooth.gyp
+++ b/device/bluetooth/bluetooth.gyp
@@ -73,6 +73,8 @@
         'bluetooth_gatt_notify_session.h',
         'bluetooth_gatt_notify_session_android.cc',
         'bluetooth_gatt_notify_session_android.h',
+        'bluetooth_gatt_notify_session_win.cc',
+        'bluetooth_gatt_notify_session_win.h',
         'bluetooth_gatt_service.cc',
         'bluetooth_gatt_service.h',
         'bluetooth_init_win.cc',
diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc
index 561b5a7c..363da1d 100644
--- a/device/bluetooth/bluetooth_device_win.cc
+++ b/device/bluetooth/bluetooth_device_win.cc
@@ -43,6 +43,15 @@
 }
 
 BluetoothDeviceWin::~BluetoothDeviceWin() {
+  // Explicitly take and erase GATT services one by one to ensure that calling
+  // GetGattService on removed service in GattServiceRemoved returns null.
+  std::vector<std::string> service_keys;
+  for (const auto& gatt_service : gatt_services_) {
+    service_keys.push_back(gatt_service.first);
+  }
+  for (const auto& key : service_keys) {
+    gatt_services_.take_and_erase(key);
+  }
 }
 
 uint32_t BluetoothDeviceWin::GetBluetoothClass() const {
diff --git a/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc b/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc
index b27b073f..a9451b40 100644
--- a/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc
@@ -109,9 +109,9 @@
         GetNotifyCallback(Call::EXPECTED),
         GetGattErrorCallback(Call::NOT_EXPECTED));
 
-    EXPECT_EQ(1, gatt_notify_characteristic_attempts_);
     EXPECT_EQ(0, callback_count_);
     SimulateGattNotifySessionStarted(characteristic1_);
+    EXPECT_EQ(1, gatt_notify_characteristic_attempts_);
     EXPECT_EQ(1, callback_count_);
     EXPECT_EQ(0, error_callback_count_);
     ASSERT_EQ(1u, notify_sessions_.size());
@@ -284,13 +284,13 @@
   characteristic1_->ReadRemoteCharacteristic(
       GetReadValueCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
   std::vector<uint8_t> empty_vector;
   SimulateGattCharacteristicRead(characteristic1_, empty_vector);
 
   // Duplicate read reported from OS shouldn't cause a problem:
   SimulateGattCharacteristicRead(characteristic1_, empty_vector);
 
+  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
   EXPECT_EQ(empty_vector, last_read_value_);
   EXPECT_EQ(empty_vector, characteristic1_->GetValue());
 }
@@ -306,8 +306,8 @@
   characteristic1_->WriteRemoteCharacteristic(
       empty_vector, GetCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
   SimulateGattCharacteristicWrite(characteristic1_);
+  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
 
   // Duplicate write reported from OS shouldn't cause a problem:
   SimulateGattCharacteristicWrite(characteristic1_);
@@ -365,7 +365,6 @@
   characteristic1_->ReadRemoteCharacteristic(
       GetReadValueCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
 
   uint8_t values[] = {0, 1, 2, 3, 4, 0xf, 0xf0, 0xff};
   std::vector<uint8_t> test_vector(values, values + arraysize(values));
@@ -375,6 +374,7 @@
   std::vector<uint8_t> empty_vector;
   SimulateGattCharacteristicRead(characteristic1_, empty_vector);
 
+  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
   EXPECT_EQ(test_vector, last_read_value_);
   EXPECT_EQ(test_vector, characteristic1_->GetValue());
 }
@@ -391,10 +391,10 @@
   characteristic1_->WriteRemoteCharacteristic(
       test_vector, GetCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
 
   SimulateGattCharacteristicWrite(characteristic1_);
 
+  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
   EXPECT_EQ(test_vector, last_write_value_);
 }
 #endif  // defined(OS_ANDROID) || defined(OS_WIN)
@@ -408,11 +408,11 @@
   characteristic1_->ReadRemoteCharacteristic(
       GetReadValueCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
 
   uint8_t values[] = {0, 1, 2, 3, 4, 0xf, 0xf0, 0xff};
   std::vector<uint8_t> test_vector(values, values + arraysize(values));
   SimulateGattCharacteristicRead(characteristic1_, test_vector);
+  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
   EXPECT_EQ(1, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
   EXPECT_EQ(test_vector, last_read_value_);
@@ -423,9 +423,9 @@
   characteristic1_->ReadRemoteCharacteristic(
       GetReadValueCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
   std::vector<uint8_t> empty_vector;
   SimulateGattCharacteristicRead(characteristic1_, empty_vector);
+  EXPECT_EQ(1, gatt_read_characteristic_attempts_);
   EXPECT_EQ(1, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
   EXPECT_EQ(empty_vector, last_read_value_);
@@ -444,9 +444,9 @@
   characteristic1_->WriteRemoteCharacteristic(
       test_vector, GetCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
 
   SimulateGattCharacteristicWrite(characteristic1_);
+  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
   EXPECT_EQ(1, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
   EXPECT_EQ(test_vector, last_write_value_);
@@ -457,8 +457,9 @@
   characteristic1_->WriteRemoteCharacteristic(
       empty_vector, GetCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
+
   SimulateGattCharacteristicWrite(characteristic1_);
+  EXPECT_EQ(1, gatt_write_characteristic_attempts_);
   EXPECT_EQ(1, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
   EXPECT_EQ(empty_vector, last_write_value_);
@@ -478,7 +479,6 @@
   characteristic2_->ReadRemoteCharacteristic(
       GetReadValueCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(2, gatt_read_characteristic_attempts_);
   EXPECT_EQ(0, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
 
@@ -492,6 +492,7 @@
   SimulateGattCharacteristicRead(characteristic2_, test_vector2);
   EXPECT_EQ(test_vector2, last_read_value_);
 
+  EXPECT_EQ(2, gatt_read_characteristic_attempts_);
   EXPECT_EQ(2, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
   EXPECT_EQ(test_vector1, characteristic1_->GetValue());
@@ -524,7 +525,6 @@
   EXPECT_EQ(test_vector2, last_write_value_);
 #endif
 
-  EXPECT_EQ(2, gatt_write_characteristic_attempts_);
   EXPECT_EQ(0, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
 
@@ -538,6 +538,7 @@
   EXPECT_EQ(test_vector2, last_write_value_);
 #endif
 
+  EXPECT_EQ(2, gatt_write_characteristic_attempts_);
   EXPECT_EQ(2, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
 
@@ -757,7 +758,7 @@
 }
 #endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // StartNotifySession fails if characteristic doesn't have Notify or Indicate
 // property.
 TEST_F(BluetoothGattCharacteristicTest, StartNotifySession_NoNotifyOrIndicate) {
@@ -772,10 +773,12 @@
   EXPECT_EQ(0, error_callback_count_);
   base::RunLoop().RunUntilIdle();
   EXPECT_EQ(1, error_callback_count_);
+  EXPECT_EQ(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED,
+            last_gatt_error_code_);
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // StartNotifySession fails if the characteristic is missing the Client
 // Characteristic Configuration descriptor.
 TEST_F(BluetoothGattCharacteristicTest, StartNotifySession_NoConfigDescriptor) {
@@ -793,9 +796,9 @@
   EXPECT_EQ(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED,
             last_gatt_error_code_);
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // StartNotifySession fails if the characteristic has multiple Client
 // Characteristic Configuration descriptors.
 TEST_F(BluetoothGattCharacteristicTest,
@@ -813,12 +816,14 @@
   EXPECT_EQ(1, error_callback_count_);
   EXPECT_EQ(BluetoothGattService::GATT_ERROR_FAILED, last_gatt_error_code_);
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
 #if defined(OS_ANDROID)
 // StartNotifySession fails synchronously when failing to set a characteristic
 // to enable notifications.
 // Android: This is mBluetoothGatt.setCharacteristicNotification failing.
+// Windows: Synchronous Test Not Applicable: OS calls are all made
+// asynchronously from BluetoothTaskManagerWin.
 TEST_F(BluetoothGattCharacteristicTest,
        StartNotifySession_FailToSetCharacteristicNotification) {
   ASSERT_NO_FATAL_FAILURE(StartNotifyBoilerplate(
@@ -838,6 +843,8 @@
 
 #if defined(OS_ANDROID)
 // Tests StartNotifySession descriptor write synchronous failure.
+// Windows: Synchronous Test Not Applicable: OS calls are all made
+// asynchronously from BluetoothTaskManagerWin.
 TEST_F(BluetoothGattCharacteristicTest,
        StartNotifySession_WriteDescriptorSynchronousError) {
   ASSERT_NO_FATAL_FAILURE(StartNotifyBoilerplate(
@@ -855,25 +862,25 @@
 }
 #endif  // defined(OS_ANDROID)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // Tests StartNotifySession success on a characteristic enabling Notify.
 TEST_F(BluetoothGattCharacteristicTest, StartNotifySession) {
   ASSERT_NO_FATAL_FAILURE(StartNotifyBoilerplate(
       /* properties: NOTIFY */ 0x10,
       /* expected_config_descriptor_value: NOTIFY */ 1));
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // Tests StartNotifySession success on a characteristic enabling Indicate.
 TEST_F(BluetoothGattCharacteristicTest, StartNotifySession_OnIndicate) {
   ASSERT_NO_FATAL_FAILURE(StartNotifyBoilerplate(
       /* properties: INDICATE */ 0x20,
       /* expected_config_descriptor_value: INDICATE */ 2));
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // Tests StartNotifySession success on a characteristic enabling Notify &
 // Indicate.
 TEST_F(BluetoothGattCharacteristicTest,
@@ -882,9 +889,9 @@
       /* properties: NOTIFY and INDICATE bits set */ 0x30,
       /* expected_config_descriptor_value: NOTIFY */ 1));
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // Tests multiple StartNotifySession success.
 TEST_F(BluetoothGattCharacteristicTest, StartNotifySession_Multiple) {
   ASSERT_NO_FATAL_FAILURE(
@@ -901,9 +908,9 @@
   characteristic1_->StartNotifySession(
       GetNotifyCallback(Call::EXPECTED),
       GetGattErrorCallback(Call::NOT_EXPECTED));
-  EXPECT_EQ(1, gatt_notify_characteristic_attempts_);
   EXPECT_EQ(0, callback_count_);
   SimulateGattNotifySessionStarted(characteristic1_);
+  EXPECT_EQ(1, gatt_notify_characteristic_attempts_);
   EXPECT_EQ(2, callback_count_);
   EXPECT_EQ(0, error_callback_count_);
   ASSERT_EQ(2u, notify_sessions_.size());
@@ -916,7 +923,7 @@
   EXPECT_TRUE(notify_sessions_[0]->IsActive());
   EXPECT_TRUE(notify_sessions_[1]->IsActive());
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
 #if defined(OS_ANDROID)
 // Tests multiple StartNotifySessions pending and then an error.
@@ -972,7 +979,7 @@
 }
 #endif  // defined(OS_ANDROID)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // Tests Characteristic Value changes during a Notify Session.
 TEST_F(BluetoothGattCharacteristicTest, GattCharacteristicValueChanged) {
   ASSERT_NO_FATAL_FAILURE(StartNotifyBoilerplate(
@@ -993,9 +1000,9 @@
   EXPECT_EQ(2, observer.gatt_characteristic_value_changed_count());
   EXPECT_EQ(test_vector2, characteristic1_->GetValue());
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
 // Tests Characteristic Value changing after a Notify Session and objects being
 // destroyed.
 TEST_F(BluetoothGattCharacteristicTest,
@@ -1014,7 +1021,7 @@
   EXPECT_TRUE("Did not crash!");
   EXPECT_EQ(0, observer.gatt_characteristic_value_changed_count());
 }
-#endif  // defined(OS_ANDROID)
+#endif  // defined(OS_ANDROID) || defined(OS_WIN)
 
 #if defined(OS_ANDROID) || defined(OS_WIN)
 TEST_F(BluetoothGattCharacteristicTest, GetDescriptors_FindNone) {
diff --git a/device/bluetooth/bluetooth_gatt_notify_session_win.cc b/device/bluetooth/bluetooth_gatt_notify_session_win.cc
new file mode 100644
index 0000000..519c8d6
--- /dev/null
+++ b/device/bluetooth/bluetooth_gatt_notify_session_win.cc
@@ -0,0 +1,28 @@
+// 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 "device/bluetooth/bluetooth_gatt_notify_session_win.h"
+
+namespace device {
+BluetoothGattNotifySessionWin::BluetoothGattNotifySessionWin(
+    base::WeakPtr<BluetoothRemoteGattCharacteristicWin> characteristic)
+    : characteristic_(characteristic) {}
+
+BluetoothGattNotifySessionWin::~BluetoothGattNotifySessionWin() {}
+
+std::string BluetoothGattNotifySessionWin::GetCharacteristicIdentifier() const {
+  if (characteristic_.get())
+    return characteristic_->GetIdentifier();
+  return std::string();
+}
+
+bool BluetoothGattNotifySessionWin::IsActive() {
+  return characteristic_.get() != nullptr;
+}
+
+void BluetoothGattNotifySessionWin::Stop(const base::Closure& callback) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace device
diff --git a/device/bluetooth/bluetooth_gatt_notify_session_win.h b/device/bluetooth/bluetooth_gatt_notify_session_win.h
new file mode 100644
index 0000000..94215891
--- /dev/null
+++ b/device/bluetooth/bluetooth_gatt_notify_session_win.h
@@ -0,0 +1,35 @@
+// 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.
+
+#ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_WIN_H_
+#define DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_WIN_H_
+
+#include "device/bluetooth/bluetooth_gatt_notify_session.h"
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "device/bluetooth/bluetooth_remote_gatt_characteristic_win.h"
+
+namespace device {
+class DEVICE_BLUETOOTH_EXPORT BluetoothGattNotifySessionWin
+    : public BluetoothGattNotifySession {
+ public:
+  BluetoothGattNotifySessionWin(
+      base::WeakPtr<BluetoothRemoteGattCharacteristicWin> characteristic);
+  ~BluetoothGattNotifySessionWin() override;
+
+  // Override BluetoothGattNotifySession interfaces.
+  std::string GetCharacteristicIdentifier() const override;
+  bool IsActive() override;
+  void Stop(const base::Closure& callback) override;
+
+ private:
+  base::WeakPtr<BluetoothRemoteGattCharacteristicWin> characteristic_;
+
+  DISALLOW_COPY_AND_ASSIGN(BluetoothGattNotifySessionWin);
+};
+
+}  // namespace device
+
+#endif  // DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_WIN_H_
diff --git a/device/bluetooth/bluetooth_low_energy_win.cc b/device/bluetooth/bluetooth_low_energy_win.cc
index 8c652ce..4cb2e39 100644
--- a/device/bluetooth/bluetooth_low_energy_win.cc
+++ b/device/bluetooth/bluetooth_low_energy_win.cc
@@ -837,5 +837,37 @@
                                              BLUETOOTH_GATT_FLAG_NONE);
 }
 
+HRESULT BluetoothLowEnergyWrapper::RegisterGattEvents(
+    base::FilePath& service_path,
+    BTH_LE_GATT_EVENT_TYPE event_type,
+    PVOID event_parameter,
+    PFNBLUETOOTH_GATT_EVENT_CALLBACK callback,
+    PVOID context,
+    BLUETOOTH_GATT_EVENT_HANDLE* out_handle) {
+  base::File file(service_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
+  if (!file.IsValid())
+    return HRESULT_FROM_WIN32(ERROR_OPEN_FAILED);
+  return BluetoothGATTRegisterEvent(file.GetPlatformFile(), event_type,
+                                    event_parameter, callback, context,
+                                    out_handle, BLUETOOTH_GATT_FLAG_NONE);
+}
+
+HRESULT BluetoothLowEnergyWrapper::UnregisterGattEvent(
+    BLUETOOTH_GATT_EVENT_HANDLE event_handle) {
+  return BluetoothGATTUnregisterEvent(event_handle, BLUETOOTH_GATT_FLAG_NONE);
+}
+
+HRESULT BluetoothLowEnergyWrapper::WriteDescriptorValue(
+    base::FilePath& service_path,
+    const PBTH_LE_GATT_DESCRIPTOR descriptor,
+    PBTH_LE_GATT_DESCRIPTOR_VALUE new_value) {
+  base::File file(service_path, base::File::FLAG_OPEN | base::File::FLAG_READ |
+                                    base::File::FLAG_WRITE);
+  if (!file.IsValid())
+    return HRESULT_FROM_WIN32(ERROR_OPEN_FAILED);
+  return BluetoothGATTSetDescriptorValue(file.GetPlatformFile(), descriptor,
+                                         new_value, BLUETOOTH_GATT_FLAG_NONE);
+}
+
 }  // namespace win
 }  // namespace device
diff --git a/device/bluetooth/bluetooth_low_energy_win.h b/device/bluetooth/bluetooth_low_energy_win.h
index cd7150d..6fb330a8 100644
--- a/device/bluetooth/bluetooth_low_energy_win.h
+++ b/device/bluetooth/bluetooth_low_energy_win.h
@@ -176,6 +176,25 @@
       const PBTH_LE_GATT_CHARACTERISTIC characteristic,
       PBTH_LE_GATT_CHARACTERISTIC_VALUE new_value);
 
+  // Register GATT events of |event_type| in the service with service device
+  // path |service_path|. |event_parameter| is the event's parameter. |callback|
+  // is the function to be invoked if the event happened. |context| is the input
+  // parameter to be given back through |callback|. |*out_handle| stores the
+  // unique handle in OS for this registration.
+  virtual HRESULT RegisterGattEvents(base::FilePath& service_path,
+                                     BTH_LE_GATT_EVENT_TYPE event_type,
+                                     PVOID event_parameter,
+                                     PFNBLUETOOTH_GATT_EVENT_CALLBACK callback,
+                                     PVOID context,
+                                     BLUETOOTH_GATT_EVENT_HANDLE* out_handle);
+  virtual HRESULT UnregisterGattEvent(BLUETOOTH_GATT_EVENT_HANDLE event_handle);
+
+  // Writes |descriptor| value in service with service device path
+  // |service_path| to |*new_value|.
+  virtual HRESULT WriteDescriptorValue(base::FilePath& service_path,
+                                       const PBTH_LE_GATT_DESCRIPTOR descriptor,
+                                       PBTH_LE_GATT_DESCRIPTOR_VALUE new_value);
+
  protected:
   BluetoothLowEnergyWrapper();
   virtual ~BluetoothLowEnergyWrapper();
diff --git a/device/bluetooth/bluetooth_low_energy_win_fake.cc b/device/bluetooth/bluetooth_low_energy_win_fake.cc
index 548286d..f6e028c 100644
--- a/device/bluetooth/bluetooth_low_energy_win_fake.cc
+++ b/device/bluetooth/bluetooth_low_energy_win_fake.cc
@@ -27,6 +27,9 @@
 GattDescriptor::GattDescriptor() {}
 GattDescriptor::~GattDescriptor() {}
 
+GattCharacteristicObserver::GattCharacteristicObserver() {}
+GattCharacteristicObserver::~GattCharacteristicObserver() {}
+
 BluetoothLowEnergyWrapperFake::BluetoothLowEnergyWrapperFake()
     : observer_(nullptr) {}
 BluetoothLowEnergyWrapperFake::~BluetoothLowEnergyWrapperFake() {}
@@ -44,6 +47,8 @@
   }
 
   for (auto& device : simulated_devices_) {
+    if (device.second->marked_as_deleted)
+      continue;
     BluetoothLowEnergyDeviceInfo* device_info =
         new BluetoothLowEnergyDeviceInfo();
     *device_info = *(device.second->device_info);
@@ -204,6 +209,8 @@
   for (ULONG i = 0; i < ret_value->DataSize; i++)
     ret_value->Data[i] = target_characteristic->value->Data[i];
   out_value->reset(ret_value);
+  if (observer_)
+    observer_->OnReadGattCharacteristicValue();
   return S_OK;
 }
 
@@ -214,7 +221,7 @@
   GattCharacteristic* target_characteristic =
       GetSimulatedGattCharacteristic(service_path, characteristic);
   if (target_characteristic == nullptr)
-    return ERROR_NOT_FOUND;
+    return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
 
   // Return error simulated by SimulateGattCharacteristicWriteError.
   if (target_characteristic->write_errors.size()) {
@@ -232,7 +239,66 @@
   win_value->DataSize = new_value->DataSize;
   target_characteristic->value.reset(win_value);
   if (observer_)
-    observer_->onWriteGattCharacteristicValue(win_value);
+    observer_->OnWriteGattCharacteristicValue(win_value);
+  return S_OK;
+}
+
+HRESULT BluetoothLowEnergyWrapperFake::RegisterGattEvents(
+    base::FilePath& service_path,
+    BTH_LE_GATT_EVENT_TYPE type,
+    PVOID event_parameter,
+    PFNBLUETOOTH_GATT_EVENT_CALLBACK callback,
+    PVOID context,
+    BLUETOOTH_GATT_EVENT_HANDLE* out_handle) {
+  // Right now, only CharacteristicValueChangedEvent is supported.
+  CHECK(CharacteristicValueChangedEvent == type);
+
+  scoped_ptr<GattCharacteristicObserver> observer(
+      new GattCharacteristicObserver());
+  observer->callback = callback;
+  observer->context = context;
+  *out_handle = (BLUETOOTH_GATT_EVENT_HANDLE)observer.get();
+  gatt_characteristic_observers_[*out_handle] = std::move(observer);
+
+  PBLUETOOTH_GATT_VALUE_CHANGED_EVENT_REGISTRATION parameter =
+      (PBLUETOOTH_GATT_VALUE_CHANGED_EVENT_REGISTRATION)event_parameter;
+  for (USHORT i = 0; i < parameter->NumCharacteristics; i++) {
+    GattCharacteristic* target_characteristic = GetSimulatedGattCharacteristic(
+        service_path, &parameter->Characteristics[i]);
+    CHECK(target_characteristic);
+    target_characteristic->observers.push_back(*out_handle);
+  }
+
+  if (observer_)
+    observer_->OnStartCharacteristicNotification();
+
+  return S_OK;
+}
+
+HRESULT BluetoothLowEnergyWrapperFake::UnregisterGattEvent(
+    BLUETOOTH_GATT_EVENT_HANDLE event_handle) {
+  gatt_characteristic_observers_.erase(event_handle);
+  return S_OK;
+}
+
+HRESULT BluetoothLowEnergyWrapperFake::WriteDescriptorValue(
+    base::FilePath& service_path,
+    const PBTH_LE_GATT_DESCRIPTOR descriptor,
+    PBTH_LE_GATT_DESCRIPTOR_VALUE new_value) {
+  if (new_value->DescriptorType == ClientCharacteristicConfiguration) {
+    // Simulate the value the OS will write.
+    std::vector<UCHAR> write_value;
+    if (new_value->ClientCharacteristicConfiguration
+            .IsSubscribeToNotification) {
+      write_value.push_back(1);
+    } else if (new_value->ClientCharacteristicConfiguration
+                   .IsSubscribeToIndication) {
+      write_value.push_back(2);
+    }
+    write_value.push_back(0);
+    if (observer_)
+      observer_->OnWriteGattDescriptorValue(write_value);
+  }
   return S_OK;
 }
 
@@ -249,6 +315,7 @@
   device_info->friendly_name = device_name;
   device_info->address = device_address;
   device->device_info.reset(device_info);
+  device->marked_as_deleted = false;
   simulated_devices_[string_device_address] = make_scoped_ptr(device);
   return device;
 }
@@ -263,7 +330,7 @@
 
 void BluetoothLowEnergyWrapperFake::RemoveSimulatedBLEDevice(
     std::string device_address) {
-  simulated_devices_.erase(device_address);
+  simulated_devices_[device_address]->marked_as_deleted = true;
 }
 
 GattService* BluetoothLowEnergyWrapperFake::SimulateGattService(
@@ -342,6 +409,12 @@
   parent_service->included_characteristics[std::to_string(
       win_characteristic->characteristic_info->AttributeHandle)] =
       make_scoped_ptr(win_characteristic);
+  // Set default empty value.
+  PBTH_LE_GATT_CHARACTERISTIC_VALUE win_value =
+      (PBTH_LE_GATT_CHARACTERISTIC_VALUE)(
+          new UCHAR[sizeof(BTH_LE_GATT_CHARACTERISTIC_VALUE)]);
+  win_value->DataSize = 0;
+  win_characteristic->value.reset(win_value);
   return win_characteristic;
 }
 
@@ -367,14 +440,42 @@
 void BluetoothLowEnergyWrapperFake::SimulateGattCharacteristicValue(
     GattCharacteristic* characteristic,
     const std::vector<uint8_t>& value) {
-  CHECK(characteristic);
+  GattCharacteristic* target_characteristic = characteristic;
+  if (target_characteristic == nullptr)
+    target_characteristic = remembered_characteristic_;
+  CHECK(target_characteristic);
+
   PBTH_LE_GATT_CHARACTERISTIC_VALUE win_value =
       (PBTH_LE_GATT_CHARACTERISTIC_VALUE)(
           new UCHAR[value.size() + sizeof(ULONG)]);
   win_value->DataSize = (ULONG)value.size();
   for (std::size_t i = 0; i < value.size(); i++)
     win_value->Data[i] = value[i];
-  characteristic->value.reset(win_value);
+  target_characteristic->value.reset(win_value);
+}
+
+void BluetoothLowEnergyWrapperFake::
+    SimulateCharacteristicValueChangeNotification(
+        GattCharacteristic* characteristic) {
+  GattCharacteristic* target_characteristic = characteristic;
+  if (target_characteristic == nullptr)
+    target_characteristic = remembered_characteristic_;
+  CHECK(target_characteristic);
+  for (const auto& observer : target_characteristic->observers) {
+    GattCharacteristicObserverTable::const_iterator it =
+        gatt_characteristic_observers_.find(observer);
+    // Check if |observer| has been unregistered by UnregisterGattEvent.
+    if (it != gatt_characteristic_observers_.end()) {
+      BLUETOOTH_GATT_VALUE_CHANGED_EVENT event;
+      event.ChangedAttributeHandle =
+          target_characteristic->characteristic_info->AttributeHandle;
+      event.CharacteristicValueDataSize =
+          target_characteristic->value->DataSize + sizeof(ULONG);
+      event.CharacteristicValue = target_characteristic->value.get();
+      it->second->callback(CharacteristicValueChangedEvent, &event,
+                           it->second->context);
+    }
+  }
 }
 
 void BluetoothLowEnergyWrapperFake::SimulateGattCharacteristicReadError(
@@ -391,6 +492,15 @@
   characteristic->write_errors.push_back(error);
 }
 
+void BluetoothLowEnergyWrapperFake::RememberCharacteristicForSubsequentAction(
+    GattService* parent_service,
+    std::string attribute_handle) {
+  CHECK(parent_service);
+  remembered_characteristic_ =
+      parent_service->included_characteristics[attribute_handle].get();
+  CHECK(remembered_characteristic_);
+}
+
 void BluetoothLowEnergyWrapperFake::SimulateGattDescriptor(
     std::string device_address,
     GattCharacteristic* characteristic,
diff --git a/device/bluetooth/bluetooth_low_energy_win_fake.h b/device/bluetooth/bluetooth_low_energy_win_fake.h
index 46b56318..7721d031e 100644
--- a/device/bluetooth/bluetooth_low_energy_win_fake.h
+++ b/device/bluetooth/bluetooth_low_energy_win_fake.h
@@ -16,6 +16,7 @@
 struct BLEDevice;
 struct GattService;
 struct GattCharacteristic;
+struct GattCharacteristicObserver;
 struct GattDescriptor;
 
 // The key of BLEDevicesMap is the string of the BLE device address.
@@ -31,12 +32,19 @@
 // The key of BLEAttributeHandleTable is the string of the BLE device address.
 typedef std::unordered_map<std::string, scoped_ptr<std::set<USHORT>>>
     BLEAttributeHandleTable;
+// The key of GattCharacteristicObserverTable is GattCharacteristicObserver
+// pointer.
+// Note: The underlying data type of BLUETOOTH_GATT_EVENT_HANDLE is PVOID.
+typedef std::unordered_map<BLUETOOTH_GATT_EVENT_HANDLE,
+                           scoped_ptr<GattCharacteristicObserver>>
+    GattCharacteristicObserverTable;
 
 struct BLEDevice {
   BLEDevice();
   ~BLEDevice();
   scoped_ptr<BluetoothLowEnergyDeviceInfo> device_info;
   GattServicesMap primary_services;
+  bool marked_as_deleted;
 };
 
 struct GattService {
@@ -55,6 +63,7 @@
   GattDescriptorsMap included_descriptors;
   std::vector<HRESULT> read_errors;
   std::vector<HRESULT> write_errors;
+  std::vector<BLUETOOTH_GATT_EVENT_HANDLE> observers;
 };
 
 struct GattDescriptor {
@@ -64,6 +73,13 @@
   scoped_ptr<BTH_LE_GATT_DESCRIPTOR_VALUE> value;
 };
 
+struct GattCharacteristicObserver {
+  GattCharacteristicObserver();
+  ~GattCharacteristicObserver();
+  PFNBLUETOOTH_GATT_EVENT_CALLBACK callback;
+  PVOID context;
+};
+
 // Fake implementation of BluetoothLowEnergyWrapper. Used for BluetoothTestWin.
 class BluetoothLowEnergyWrapperFake : public BluetoothLowEnergyWrapper {
  public:
@@ -72,8 +88,12 @@
     Observer() {}
     ~Observer() {}
 
-    virtual void onWriteGattCharacteristicValue(
+    virtual void OnReadGattCharacteristicValue() = 0;
+    virtual void OnWriteGattCharacteristicValue(
         const PBTH_LE_GATT_CHARACTERISTIC_VALUE value) = 0;
+    virtual void OnStartCharacteristicNotification() = 0;
+    virtual void OnWriteGattDescriptorValue(
+        const std::vector<uint8_t>& value) = 0;
   };
 
   BluetoothLowEnergyWrapperFake();
@@ -108,6 +128,18 @@
       base::FilePath& service_path,
       const PBTH_LE_GATT_CHARACTERISTIC characteristic,
       PBTH_LE_GATT_CHARACTERISTIC_VALUE new_value) override;
+  HRESULT RegisterGattEvents(base::FilePath& service_path,
+                             BTH_LE_GATT_EVENT_TYPE type,
+                             PVOID event_parameter,
+                             PFNBLUETOOTH_GATT_EVENT_CALLBACK callback,
+                             PVOID context,
+                             BLUETOOTH_GATT_EVENT_HANDLE* out_handle) override;
+  HRESULT UnregisterGattEvent(
+      BLUETOOTH_GATT_EVENT_HANDLE event_handle) override;
+  HRESULT WriteDescriptorValue(
+      base::FilePath& service_path,
+      const PBTH_LE_GATT_DESCRIPTOR descriptor,
+      PBTH_LE_GATT_DESCRIPTOR_VALUE new_value) override;
 
   BLEDevice* SimulateBLEDevice(std::string device_name,
                                BLUETOOTH_ADDRESS device_address);
@@ -141,10 +173,14 @@
       std::string attribute_handle);
   void SimulateGattCharacteristicValue(GattCharacteristic* characteristic,
                                        const std::vector<uint8_t>& value);
+  void SimulateCharacteristicValueChangeNotification(
+      GattCharacteristic* characteristic);
   void SimulateGattCharacteristicReadError(GattCharacteristic* characteristic,
                                            HRESULT error);
   void SimulateGattCharacteristicWriteError(GattCharacteristic* characteristic,
                                             HRESULT error);
+  void RememberCharacteristicForSubsequentAction(GattService* parent_service,
+                                                 std::string attribute_handle);
   void SimulateGattDescriptor(std::string device_address,
                               GattCharacteristic* characteristic,
                               const BTH_LE_UUID& uuid);
@@ -186,6 +222,8 @@
   BLEAttributeHandleTable attribute_handle_table_;
   BLEDevicesMap simulated_devices_;
   Observer* observer_;
+  GattCharacteristicObserverTable gatt_characteristic_observers_;
+  GattCharacteristic* remembered_characteristic_;
 };
 
 }  // namespace win
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc
index d98c0ea..281dfa9 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "device/bluetooth/bluetooth_adapter_win.h"
+#include "device/bluetooth/bluetooth_gatt_notify_session_win.h"
 #include "device/bluetooth/bluetooth_remote_gatt_descriptor_win.h"
 #include "device/bluetooth/bluetooth_remote_gatt_service_win.h"
 #include "device/bluetooth/bluetooth_task_manager_win.h"
@@ -21,6 +22,8 @@
       ui_task_runner_(ui_task_runner),
       characteristic_added_notified_(false),
       characteristic_value_read_or_write_in_progress_(false),
+      gatt_event_registeration_in_progress_(false),
+      gatt_event_handle_(nullptr),
       weak_ptr_factory_(this) {
   DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
   DCHECK(parent_service_);
@@ -41,7 +44,18 @@
 BluetoothRemoteGattCharacteristicWin::~BluetoothRemoteGattCharacteristicWin() {
   DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
 
+  ClearIncludedDescriptors();
+
+  if (gatt_event_handle_ != nullptr) {
+    task_manager_->PostUnregisterGattCharacteristicValueChangedEvent(
+        gatt_event_handle_);
+    gatt_event_handle_ = nullptr;
+  }
   parent_service_->GetWinAdapter()->NotifyGattCharacteristicRemoved(this);
+
+  // Clear pending StartNotifySession callbacks.
+  for (const auto& callback : start_notify_session_callbacks_)
+    callback.second.Run(BluetoothGattService::GATT_ERROR_FAILED);
 }
 
 std::string BluetoothRemoteGattCharacteristicWin::GetIdentifier() const {
@@ -105,8 +119,7 @@
 }
 
 bool BluetoothRemoteGattCharacteristicWin::IsNotifying() const {
-  NOTIMPLEMENTED();
-  return false;
+  return gatt_event_handle_ != nullptr;
 }
 
 std::vector<BluetoothGattDescriptor*>
@@ -140,8 +153,56 @@
 void BluetoothRemoteGattCharacteristicWin::StartNotifySession(
     const NotifySessionCallback& callback,
     const ErrorCallback& error_callback) {
-  NOTIMPLEMENTED();
-  error_callback.Run(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED);
+  DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+
+  if (IsNotifying()) {
+    scoped_ptr<BluetoothGattNotifySessionWin> notify_session(
+        new BluetoothGattNotifySessionWin(weak_ptr_factory_.GetWeakPtr()));
+    ui_task_runner_->PostTask(
+        FROM_HERE,
+        base::Bind(callback, base::Passed(std::move(notify_session))));
+    return;
+  }
+
+  if (!characteristic_info_->IsNotifiable &&
+      !characteristic_info_->IsIndicatable) {
+    ui_task_runner_->PostTask(
+        FROM_HERE, base::Bind(error_callback,
+                              BluetoothGattService::GATT_ERROR_NOT_SUPPORTED));
+    return;
+  }
+
+  std::vector<BluetoothGattDescriptor*> ccc_descriptors = GetDescriptorsByUUID(
+      BluetoothGattDescriptor::ClientCharacteristicConfigurationUuid());
+  if (ccc_descriptors.size() < 1) {
+    ui_task_runner_->PostTask(
+        FROM_HERE, base::Bind(error_callback,
+                              BluetoothGattService::GATT_ERROR_NOT_SUPPORTED));
+    return;
+  }
+  if (ccc_descriptors.size() > 1) {
+    ui_task_runner_->PostTask(
+        FROM_HERE,
+        base::Bind(error_callback, BluetoothGattService::GATT_ERROR_FAILED));
+    return;
+  }
+
+  start_notify_session_callbacks_.push_back(
+      std::make_pair(callback, error_callback));
+  if (gatt_event_registeration_in_progress_)
+    return;
+
+  task_manager_->PostRegisterGattCharacteristicValueChangedEvent(
+      parent_service_->GetServicePath(), characteristic_info_.get(),
+      static_cast<BluetoothRemoteGattDescriptorWin*>(ccc_descriptors[0])
+          ->GetWinDescriptorInfo(),
+      base::Bind(
+          &BluetoothRemoteGattCharacteristicWin::GattEventRegistrationCallback,
+          weak_ptr_factory_.GetWeakPtr()),
+      base::Bind(&BluetoothRemoteGattCharacteristicWin::
+                     OnGattCharacteristicValueChanged,
+                 weak_ptr_factory_.GetWeakPtr()));
+  gatt_event_registeration_in_progress_ = true;
 }
 
 void BluetoothRemoteGattCharacteristicWin::ReadRemoteCharacteristic(
@@ -236,8 +297,10 @@
     if (!DoesDescriptorExist(descriptors, num, d.second.get()))
       to_be_removed.push_back(d.second->GetIdentifier());
   }
-  for (auto id : to_be_removed)
+  for (auto id : to_be_removed) {
+    included_descriptors_[id].reset();
     included_descriptors_.erase(id);
+  }
 
   // Return if no new descriptors have been added.
   if (included_descriptors_.size() == num)
@@ -324,18 +387,59 @@
 
 BluetoothGattService::GattErrorCode
 BluetoothRemoteGattCharacteristicWin::HRESULTToGattErrorCode(HRESULT hr) {
+  if (HRESULT_FROM_WIN32(ERROR_INVALID_USER_BUFFER) == hr)
+    return BluetoothGattService::GATT_ERROR_INVALID_LENGTH;
+
   switch (hr) {
     case E_BLUETOOTH_ATT_READ_NOT_PERMITTED:
     case E_BLUETOOTH_ATT_WRITE_NOT_PERMITTED:
       return BluetoothGattService::GATT_ERROR_NOT_PERMITTED;
     case E_BLUETOOTH_ATT_UNKNOWN_ERROR:
       return BluetoothGattService::GATT_ERROR_UNKNOWN;
-    case ERROR_INVALID_USER_BUFFER:
     case E_BLUETOOTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH:
       return BluetoothGattService::GATT_ERROR_INVALID_LENGTH;
+    case E_BLUETOOTH_ATT_REQUEST_NOT_SUPPORTED:
+      return BluetoothGattService::GATT_ERROR_NOT_SUPPORTED;
     default:
       return BluetoothGattService::GATT_ERROR_FAILED;
   }
 }
 
+void BluetoothRemoteGattCharacteristicWin::OnGattCharacteristicValueChanged(
+    scoped_ptr<std::vector<uint8_t>> new_value) {
+  DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+
+  characteristic_value_.assign(new_value->begin(), new_value->end());
+  parent_service_->GetWinAdapter()->NotifyGattCharacteristicValueChanged(
+      this, characteristic_value_);
+}
+
+void BluetoothRemoteGattCharacteristicWin::GattEventRegistrationCallback(
+    BLUETOOTH_GATT_EVENT_HANDLE event_handle,
+    HRESULT hr) {
+  DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+
+  gatt_event_registeration_in_progress_ = false;
+  std::vector<std::pair<NotifySessionCallback, ErrorCallback>> callbacks;
+  callbacks.swap(start_notify_session_callbacks_);
+  if (SUCCEEDED(hr)) {
+    gatt_event_handle_ = event_handle;
+    for (const auto& callback : callbacks) {
+      callback.first.Run(make_scoped_ptr(
+          new BluetoothGattNotifySessionWin(weak_ptr_factory_.GetWeakPtr())));
+    }
+  } else {
+    for (const auto& callback : callbacks)
+      callback.second.Run(HRESULTToGattErrorCode(hr));
+  }
+}
+
+void BluetoothRemoteGattCharacteristicWin::ClearIncludedDescriptors() {
+  // Explicitly reset to null to ensure that calling GetDescriptor() on the
+  // removed descriptor in GattDescriptorRemoved() returns null.
+  for (auto& entry : included_descriptors_)
+    entry.second.reset();
+  included_descriptors_.clear();
+}
+
 }  // namespace device.
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
index bf37ccc..7803fd7 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
@@ -80,6 +80,10 @@
       HRESULT hr);
   void OnWriteRemoteCharacteristicValueCallback(HRESULT hr);
   BluetoothGattService::GattErrorCode HRESULTToGattErrorCode(HRESULT hr);
+  void OnGattCharacteristicValueChanged(
+      scoped_ptr<std::vector<uint8_t>> new_value);
+  void GattEventRegistrationCallback(PVOID event_handle, HRESULT hr);
+  void ClearIncludedDescriptors();
 
   BluetoothRemoteGattServiceWin* parent_service_;
   scoped_refptr<BluetoothTaskManagerWin> task_manager_;
@@ -110,6 +114,16 @@
 
   bool characteristic_value_read_or_write_in_progress_;
 
+  // Vector stores StartNotifySession request callbacks.
+  std::vector<std::pair<NotifySessionCallback, ErrorCallback>>
+      start_notify_session_callbacks_;
+
+  // Flag indicates if GATT event registration is in progress.
+  bool gatt_event_registeration_in_progress_;
+
+  // GATT event handle returned by GattEventRegistrationCallback.
+  PVOID gatt_event_handle_;
+
   base::WeakPtrFactory<BluetoothRemoteGattCharacteristicWin> weak_ptr_factory_;
   DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicWin);
 };
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h
index cb6642b..5c65667 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_win.h
@@ -39,6 +39,9 @@
                              const ErrorCallback& error_callback) override;
 
   uint16_t GetAttributeHandle() const;
+  PBTH_LE_GATT_DESCRIPTOR GetWinDescriptorInfo() const {
+    return descriptor_info_.get();
+  }
 
  private:
   BluetoothRemoteGattCharacteristicWin* parent_characteristic_;
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_win.cc b/device/bluetooth/bluetooth_remote_gatt_service_win.cc
index 84127ed..7236f82 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_win.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_service_win.cc
@@ -50,6 +50,8 @@
 BluetoothRemoteGattServiceWin::~BluetoothRemoteGattServiceWin() {
   DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
 
+  ClearIncludedCharacteristics();
+
   adapter_->NotifyGattServiceRemoved(this);
 }
 
@@ -245,6 +247,7 @@
 void BluetoothRemoteGattServiceWin::RemoveIncludedCharacteristic(
     std::string identifier) {
   discovery_completed_included_charateristics_.erase(identifier);
+  included_characteristics_[identifier].reset();
   included_characteristics_.erase(identifier);
 }
 
diff --git a/device/bluetooth/bluetooth_task_manager_win.cc b/device/bluetooth/bluetooth_task_manager_win.cc
index bcb3823e..92f1295 100644
--- a/device/bluetooth/bluetooth_task_manager_win.cc
+++ b/device/bluetooth/bluetooth_task_manager_win.cc
@@ -122,6 +122,63 @@
   state->authenticated = !!device_info.fAuthenticated;
 }
 
+struct CharacteristicValueChangedRegistration {
+  CharacteristicValueChangedRegistration();
+  ~CharacteristicValueChangedRegistration();
+
+  BLUETOOTH_GATT_EVENT_HANDLE win_event_handle;
+  device::BluetoothTaskManagerWin::GattCharacteristicValueChangedCallback
+      callback;
+  // The task runner the callback should run on.
+  scoped_refptr<base::SequencedTaskRunner> callback_task_runner;
+};
+
+CharacteristicValueChangedRegistration::
+    CharacteristicValueChangedRegistration() {}
+CharacteristicValueChangedRegistration::
+    ~CharacteristicValueChangedRegistration() {}
+
+// The key of CharacteristicValueChangedRegistrationMap is a
+// GattCharacteristicValueChangedCallback pointer (cast to PVOID) to make it
+// unique for different callbacks. It is also the context value passed into OS
+// when registering event.
+typedef std::unordered_map<PVOID,
+                           scoped_ptr<CharacteristicValueChangedRegistration>>
+    CharacteristicValueChangedRegistrationMap;
+
+CharacteristicValueChangedRegistrationMap
+    g_characteristic_value_changed_registrations;
+base::Lock g_characteristic_value_changed_registrations_lock;
+
+// Function to be registered to OS to monitor Bluetooth LE GATT event. It is
+// invoked in BluetoothApis.dll thread.
+void OnGetGattEventWin(BTH_LE_GATT_EVENT_TYPE type,
+                       PVOID event_parameter,
+                       PVOID context) {
+  if (type != CharacteristicValueChangedEvent) {
+    // Right now, only characteristic value changed event is supported.
+    NOTREACHED();
+    return;
+  }
+
+  BLUETOOTH_GATT_VALUE_CHANGED_EVENT* event =
+      (BLUETOOTH_GATT_VALUE_CHANGED_EVENT*)event_parameter;
+  PBTH_LE_GATT_CHARACTERISTIC_VALUE new_value_win = event->CharacteristicValue;
+  scoped_ptr<std::vector<uint8_t>> new_value(
+      new std::vector<uint8_t>(new_value_win->DataSize));
+  for (ULONG i = 0; i < new_value_win->DataSize; i++)
+    (*new_value)[i] = new_value_win->Data[i];
+
+  base::AutoLock auto_lock(g_characteristic_value_changed_registrations_lock);
+  CharacteristicValueChangedRegistrationMap::const_iterator it =
+      g_characteristic_value_changed_registrations.find(context);
+  if (it == g_characteristic_value_changed_registrations.end())
+    return;
+
+  it->second->callback_task_runner->PostTask(
+      FROM_HERE, base::Bind(it->second->callback, base::Passed(&new_value)));
+}
+
 }  // namespace
 
 namespace device {
@@ -844,6 +901,72 @@
   ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, hr));
 }
 
+void BluetoothTaskManagerWin::RegisterGattCharacteristicValueChangedEvent(
+    base::FilePath service_path,
+    BTH_LE_GATT_CHARACTERISTIC characteristic,
+    BTH_LE_GATT_DESCRIPTOR ccc_descriptor,
+    const GattEventRegistrationCallback& callback,
+    const GattCharacteristicValueChangedCallback& registered_callback) {
+  DCHECK(bluetooth_task_runner_->RunsTasksOnCurrentThread());
+  BLUETOOTH_GATT_EVENT_HANDLE win_event_handle = NULL;
+
+  BLUETOOTH_GATT_VALUE_CHANGED_EVENT_REGISTRATION win_event_parameter;
+  memcpy(&(win_event_parameter.Characteristics[0]), &characteristic,
+         sizeof(BTH_LE_GATT_CHARACTERISTIC));
+  win_event_parameter.NumCharacteristics = 1;
+  PVOID user_event_handle = (PVOID)&registered_callback;
+  HRESULT hr =
+      win::BluetoothLowEnergyWrapper::GetInstance()->RegisterGattEvents(
+          service_path, CharacteristicValueChangedEvent, &win_event_parameter,
+          &OnGetGattEventWin, user_event_handle, &win_event_handle);
+
+  // Sets the Client Characteristic Configuration descriptor.
+  if (SUCCEEDED(hr)) {
+    BTH_LE_GATT_DESCRIPTOR_VALUE new_cccd_value;
+    RtlZeroMemory(&new_cccd_value, sizeof(new_cccd_value));
+    new_cccd_value.DescriptorType = ClientCharacteristicConfiguration;
+    if (characteristic.IsNotifiable) {
+      new_cccd_value.ClientCharacteristicConfiguration
+          .IsSubscribeToNotification = TRUE;
+    } else {
+      new_cccd_value.ClientCharacteristicConfiguration.IsSubscribeToIndication =
+          TRUE;
+    }
+
+    hr = win::BluetoothLowEnergyWrapper::GetInstance()->WriteDescriptorValue(
+        service_path, (PBTH_LE_GATT_DESCRIPTOR)(&ccc_descriptor),
+        &new_cccd_value);
+  }
+
+  if (SUCCEEDED(hr)) {
+    scoped_ptr<CharacteristicValueChangedRegistration> registration(
+        new CharacteristicValueChangedRegistration());
+    registration->win_event_handle = win_event_handle;
+    registration->callback = registered_callback;
+    registration->callback_task_runner = ui_task_runner_;
+    base::AutoLock auto_lock(g_characteristic_value_changed_registrations_lock);
+    g_characteristic_value_changed_registrations[user_event_handle] =
+        std::move(registration);
+  }
+
+  ui_task_runner_->PostTask(FROM_HERE,
+                            base::Bind(callback, user_event_handle, hr));
+}
+
+void BluetoothTaskManagerWin::UnregisterGattCharacteristicValueChangedEvent(
+    PVOID event_handle) {
+  DCHECK(bluetooth_task_runner_->RunsTasksOnCurrentThread());
+
+  base::AutoLock auto_lock(g_characteristic_value_changed_registrations_lock);
+  CharacteristicValueChangedRegistrationMap::const_iterator it =
+      g_characteristic_value_changed_registrations.find(event_handle);
+  if (it != g_characteristic_value_changed_registrations.end()) {
+    win::BluetoothLowEnergyWrapper::GetInstance()->UnregisterGattEvent(
+        it->second->win_event_handle);
+    g_characteristic_value_changed_registrations.erase(event_handle);
+  }
+}
+
 void BluetoothTaskManagerWin::PostGetGattIncludedCharacteristics(
     const base::FilePath& service_path,
     const BluetoothUUID& uuid,
@@ -876,8 +999,6 @@
       FROM_HERE,
       base::Bind(&BluetoothTaskManagerWin::ReadGattCharacteristicValue, this,
                  service_path, *characteristic, callback));
-  FOR_EACH_OBSERVER(BluetoothTaskManagerWin::Observer, observers_,
-                    OnAttemptReadGattCharacteristic());
 }
 
 void BluetoothTaskManagerWin::PostWriteGattCharacteristicValue(
@@ -890,8 +1011,30 @@
       FROM_HERE,
       base::Bind(&BluetoothTaskManagerWin::WriteGattCharacteristicValue, this,
                  service_path, *characteristic, new_value, callback));
-  FOR_EACH_OBSERVER(BluetoothTaskManagerWin::Observer, observers_,
-                    OnAttemptWriteGattCharacteristic());
+}
+
+void BluetoothTaskManagerWin::PostRegisterGattCharacteristicValueChangedEvent(
+    const base::FilePath& service_path,
+    const PBTH_LE_GATT_CHARACTERISTIC characteristic,
+    const PBTH_LE_GATT_DESCRIPTOR ccc_descriptor,
+    const GattEventRegistrationCallback& callback,
+    const GattCharacteristicValueChangedCallback& registered_callback) {
+  DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+  bluetooth_task_runner_->PostTask(
+      FROM_HERE,
+      base::Bind(
+          &BluetoothTaskManagerWin::RegisterGattCharacteristicValueChangedEvent,
+          this, service_path, *characteristic, *ccc_descriptor, callback,
+          registered_callback));
+}
+
+void BluetoothTaskManagerWin::PostUnregisterGattCharacteristicValueChangedEvent(
+    PVOID event_handle) {
+  DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+  bluetooth_task_runner_->PostTask(
+      FROM_HERE, base::Bind(&BluetoothTaskManagerWin::
+                                UnregisterGattCharacteristicValueChangedEvent,
+                            this, event_handle));
 }
 
 }  // namespace device
diff --git a/device/bluetooth/bluetooth_task_manager_win.h b/device/bluetooth/bluetooth_task_manager_win.h
index c8356a8..0c640a7 100644
--- a/device/bluetooth/bluetooth_task_manager_win.h
+++ b/device/bluetooth/bluetooth_task_manager_win.h
@@ -99,8 +99,6 @@
      // discovery session, the "friendly" name may initially be "unknown" before
      // the actual name is retrieved in subsequent poll events.
      virtual void DevicesPolled(const ScopedVector<DeviceState>& devices) {}
-     virtual void OnAttemptReadGattCharacteristic() {}
-     virtual void OnAttemptWriteGattCharacteristic() {}
   };
 
   explicit BluetoothTaskManagerWin(
@@ -135,6 +133,9 @@
   typedef base::Callback<void(scoped_ptr<BTH_LE_GATT_CHARACTERISTIC_VALUE>,
                               HRESULT)>
       ReadGattCharacteristicValueCallback;
+  typedef base::Callback<void(scoped_ptr<std::vector<uint8_t>>)>
+      GattCharacteristicValueChangedCallback;
+  typedef base::Callback<void(PVOID, HRESULT)> GattEventRegistrationCallback;
 
   // Get all included characteristics of a given service. The service is
   // uniquely identified by its |uuid| and |attribute_handle| with service
@@ -170,6 +171,22 @@
       const std::vector<uint8_t>& new_value,
       const HResultCallback& callback);
 
+  // Post a task to register to receive value changed notifications from
+  // |characteristic| in service with |service_path|. |ccc_descriptor| is the
+  // Client Characteristic Configuration descriptor. |registered_callback| is
+  // the function to be invoked if the event occured. The operation result is
+  // returned asynchronously through |callback|.
+  void PostRegisterGattCharacteristicValueChangedEvent(
+      const base::FilePath& service_path,
+      const PBTH_LE_GATT_CHARACTERISTIC characteristic,
+      const PBTH_LE_GATT_DESCRIPTOR ccc_descriptor,
+      const GattEventRegistrationCallback& callback,
+      const GattCharacteristicValueChangedCallback& registered_callback);
+
+  // Post a task to unregister from value change notifications. |event_handle|
+  // was returned by PostRegisterGattCharacteristicValueChangedEvent.
+  void PostUnregisterGattCharacteristicValueChangedEvent(PVOID event_handle);
+
  private:
   friend class base::RefCountedThreadSafe<BluetoothTaskManagerWin>;
   friend class BluetoothTaskManagerWinTest;
@@ -278,6 +295,13 @@
                                     BTH_LE_GATT_CHARACTERISTIC characteristic,
                                     std::vector<uint8_t> new_value,
                                     const HResultCallback& callback);
+  void RegisterGattCharacteristicValueChangedEvent(
+      base::FilePath service_path,
+      BTH_LE_GATT_CHARACTERISTIC characteristic,
+      BTH_LE_GATT_DESCRIPTOR ccc_descriptor,
+      const GattEventRegistrationCallback& callback,
+      const GattCharacteristicValueChangedCallback& registered_callback);
+  void UnregisterGattCharacteristicValueChangedEvent(PVOID event_handle);
 
   // UI task runner reference.
   scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.h b/device/bluetooth/dbus/bluetooth_adapter_client.h
index 2893954e..7c3ead7 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.h
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.h
@@ -12,6 +12,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/values.h"
 #include "dbus/object_path.h"
diff --git a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h
index 7bd4318..42a480e 100644
--- a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h
@@ -12,6 +12,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_path.h"
diff --git a/device/bluetooth/dbus/fake_bluetooth_adapter_client.cc b/device/bluetooth/dbus/fake_bluetooth_adapter_client.cc
index 9083b6b..2f6b814f 100644
--- a/device/bluetooth/dbus/fake_bluetooth_adapter_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_adapter_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
index 49727cb3..e1f61db93 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
@@ -11,6 +11,7 @@
 #include <string>
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "dbus/object_path.h"
diff --git a/device/bluetooth/test/bluetooth_test_win.cc b/device/bluetooth/test/bluetooth_test_win.cc
index cd852aa..7d3f0336 100644
--- a/device/bluetooth/test/bluetooth_test_win.cc
+++ b/device/bluetooth/test/bluetooth_test_win.cc
@@ -13,6 +13,7 @@
 #include "device/bluetooth/bluetooth_adapter_win.h"
 #include "device/bluetooth/bluetooth_low_energy_win.h"
 #include "device/bluetooth/bluetooth_remote_gatt_characteristic_win.h"
+#include "device/bluetooth/bluetooth_remote_gatt_descriptor_win.h"
 #include "device/bluetooth/bluetooth_remote_gatt_service_win.h"
 
 namespace {
@@ -113,7 +114,6 @@
       &BluetoothTestWin::AdapterInitCallback, base::Unretained(this)));
   adapter_win_ = static_cast<BluetoothAdapterWin*>(adapter_.get());
   adapter_win_->InitForTest(nullptr, bluetooth_task_runner_);
-  adapter_win_->GetWinBluetoothTaskManager()->AddObserver(this);
   FinishPendingTasks();
 }
 
@@ -289,22 +289,30 @@
 
 void BluetoothTestWin::RememberCharacteristicForSubsequentAction(
     BluetoothGattCharacteristic* characteristic) {
-  remembered_characteristic_ =
+  CHECK(characteristic);
+  BluetoothRemoteGattCharacteristicWin* win_characteristic =
       static_cast<BluetoothRemoteGattCharacteristicWin*>(characteristic);
+
+  std::string device_address =
+      win_characteristic->GetService()->GetDevice()->GetAddress();
+  win::BLEDevice* target_device =
+      fake_bt_le_wrapper_->GetSimulatedBLEDevice(device_address);
+  CHECK(target_device);
+  win::GattService* target_service =
+      GetSimulatedService(target_device, win_characteristic->GetService());
+  CHECK(target_service);
+  fake_bt_le_wrapper_->RememberCharacteristicForSubsequentAction(
+      target_service, std::to_string(win_characteristic->GetAttributeHandle()));
 }
 
 void BluetoothTestWin::SimulateGattCharacteristicRead(
     BluetoothGattCharacteristic* characteristic,
     const std::vector<uint8_t>& value) {
-  BluetoothGattCharacteristic* target_characteristic = characteristic;
-  if (target_characteristic == nullptr)
-    target_characteristic = remembered_characteristic_;
-  CHECK(target_characteristic);
-
-  win::GattCharacteristic* target_simulated_characteristic =
-      GetSimulatedCharacteristic(target_characteristic);
-  if (target_simulated_characteristic == nullptr)
-    return;
+  win::GattCharacteristic* target_simulated_characteristic = nullptr;
+  if (characteristic) {
+    target_simulated_characteristic =
+        GetSimulatedCharacteristic(characteristic);
+  }
 
   fake_bt_le_wrapper_->SimulateGattCharacteristicValue(
       target_simulated_characteristic, value);
@@ -318,7 +326,7 @@
   win::GattCharacteristic* target_characteristic =
       GetSimulatedCharacteristic(characteristic);
   CHECK(target_characteristic);
-  HRESULT hr = ERROR_SEM_TIMEOUT;
+  HRESULT hr = HRESULT_FROM_WIN32(ERROR_SEM_TIMEOUT);
   if (error_code == BluetoothGattService::GATT_ERROR_INVALID_LENGTH)
     hr = E_BLUETOOTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH;
   fake_bt_le_wrapper_->SimulateGattCharacteristicReadError(
@@ -338,7 +346,7 @@
   win::GattCharacteristic* target_characteristic =
       GetSimulatedCharacteristic(characteristic);
   CHECK(target_characteristic);
-  HRESULT hr = ERROR_SEM_TIMEOUT;
+  HRESULT hr = HRESULT_FROM_WIN32(ERROR_SEM_TIMEOUT);
   if (error_code == BluetoothGattService::GATT_ERROR_INVALID_LENGTH)
     hr = E_BLUETOOTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH;
   fake_bt_le_wrapper_->SimulateGattCharacteristicWriteError(
@@ -350,6 +358,7 @@
 void BluetoothTestWin::DeleteDevice(BluetoothDevice* device) {
   CHECK(device);
   fake_bt_le_wrapper_->RemoveSimulatedBLEDevice(device->GetAddress());
+  FinishPendingTasks();
 }
 
 void BluetoothTestWin::SimulateGattDescriptor(
@@ -364,21 +373,50 @@
   ForceRefreshDevice();
 }
 
-void BluetoothTestWin::OnAttemptReadGattCharacteristic() {
+void BluetoothTestWin::SimulateGattNotifySessionStarted(
+    BluetoothGattCharacteristic* characteristic) {
+  FinishPendingTasks();
+}
+
+void BluetoothTestWin::SimulateGattCharacteristicChanged(
+    BluetoothGattCharacteristic* characteristic,
+    const std::vector<uint8_t>& value) {
+  win::GattCharacteristic* target_simulated_characteristic = nullptr;
+  if (characteristic) {
+    target_simulated_characteristic =
+        GetSimulatedCharacteristic(characteristic);
+  }
+
+  fake_bt_le_wrapper_->SimulateGattCharacteristicValue(
+      target_simulated_characteristic, value);
+  fake_bt_le_wrapper_->SimulateCharacteristicValueChangeNotification(
+      target_simulated_characteristic);
+
+  FinishPendingTasks();
+}
+
+void BluetoothTestWin::OnReadGattCharacteristicValue() {
   gatt_read_characteristic_attempts_++;
 }
 
-void BluetoothTestWin::OnAttemptWriteGattCharacteristic() {
-  gatt_write_characteristic_attempts_++;
-}
-
-void BluetoothTestWin::onWriteGattCharacteristicValue(
+void BluetoothTestWin::OnWriteGattCharacteristicValue(
     const PBTH_LE_GATT_CHARACTERISTIC_VALUE value) {
+  gatt_write_characteristic_attempts_++;
   last_write_value_.clear();
   for (ULONG i = 0; i < value->DataSize; i++)
     last_write_value_.push_back(value->Data[i]);
 }
 
+void BluetoothTestWin::OnStartCharacteristicNotification() {
+  gatt_notify_characteristic_attempts_++;
+}
+
+void BluetoothTestWin::OnWriteGattDescriptorValue(
+    const std::vector<uint8_t>& value) {
+  gatt_write_descriptor_attempts_++;
+  last_write_value_.assign(value.begin(), value.end());
+}
+
 win::GattService* BluetoothTestWin::GetSimulatedService(
     win::BLEDevice* device,
     BluetoothGattService* service) {
diff --git a/device/bluetooth/test/bluetooth_test_win.h b/device/bluetooth/test/bluetooth_test_win.h
index 459b992..d5574ed 100644
--- a/device/bluetooth/test/bluetooth_test_win.h
+++ b/device/bluetooth/test/bluetooth_test_win.h
@@ -20,7 +20,6 @@
 
 // Windows implementation of BluetoothTestBase.
 class BluetoothTestWin : public BluetoothTestBase,
-                         public BluetoothTaskManagerWin::Observer,
                          public win::BluetoothLowEnergyWrapperFake::Observer {
  public:
   BluetoothTestWin();
@@ -61,14 +60,18 @@
   void DeleteDevice(BluetoothDevice* device) override;
   void SimulateGattDescriptor(BluetoothGattCharacteristic* characteristic,
                               const std::string& uuid) override;
-
-  // BluetoothTaskManagerWin::Observer overrides.
-  void OnAttemptReadGattCharacteristic() override;
-  void OnAttemptWriteGattCharacteristic() override;
+  void SimulateGattNotifySessionStarted(
+      BluetoothGattCharacteristic* characteristic) override;
+  void SimulateGattCharacteristicChanged(
+      BluetoothGattCharacteristic* characteristic,
+      const std::vector<uint8_t>& value) override;
 
   // win::BluetoothLowEnergyWrapperFake::Observer overrides.
-  void onWriteGattCharacteristicValue(
+  void OnReadGattCharacteristicValue() override;
+  void OnWriteGattCharacteristicValue(
       const PBTH_LE_GATT_CHARACTERISTIC_VALUE value) override;
+  void OnStartCharacteristicNotification() override;
+  void OnWriteGattDescriptorValue(const std::vector<uint8_t>& value) override;
 
  private:
   scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_;
@@ -78,8 +81,6 @@
   win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_;
   win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_;
 
-  BluetoothRemoteGattCharacteristicWin* remembered_characteristic_;
-
   void AdapterInitCallback();
   win::GattService* GetSimulatedService(win::BLEDevice* device,
                                         BluetoothGattService* service);
diff --git a/device/usb/mojo/device_impl.cc b/device/usb/mojo/device_impl.cc
index 2dee033..43fe8d82 100644
--- a/device/usb/mojo/device_impl.cc
+++ b/device/usb/mojo/device_impl.cc
@@ -146,8 +146,11 @@
 }
 
 void DeviceImpl::CloseHandle() {
-  if (device_handle_)
+  if (device_handle_) {
     device_handle_->Close();
+    if (permission_provider_)
+      permission_provider_->DecrementConnectionCount();
+  }
   device_handle_ = nullptr;
 }
 
@@ -194,6 +197,8 @@
 void DeviceImpl::OnOpen(const OpenCallback& callback,
                         scoped_refptr<UsbDeviceHandle> handle) {
   device_handle_ = handle;
+  if (device_handle_ && permission_provider_)
+    permission_provider_->IncrementConnectionCount();
   callback.Run(handle ? OpenDeviceError::OK : OpenDeviceError::ACCESS_DENIED);
 }
 
diff --git a/device/usb/mojo/mock_permission_provider.h b/device/usb/mojo/mock_permission_provider.h
index 3e819df..453632e 100644
--- a/device/usb/mojo/mock_permission_provider.h
+++ b/device/usb/mojo/mock_permission_provider.h
@@ -29,6 +29,9 @@
                           uint8_t configuration_value,
                           const DeviceInfo& device_info));
 
+  MOCK_METHOD0(IncrementConnectionCount, void());
+  MOCK_METHOD0(DecrementConnectionCount, void());
+
  private:
   base::WeakPtrFactory<PermissionProvider> weak_factory_;
 };
diff --git a/device/usb/mojo/permission_provider.h b/device/usb/mojo/permission_provider.h
index a58984c..68cb6e3 100644
--- a/device/usb/mojo/permission_provider.h
+++ b/device/usb/mojo/permission_provider.h
@@ -26,6 +26,8 @@
   virtual bool HasFunctionPermission(uint8_t requested_function,
                                      uint8_t configuration_value,
                                      const DeviceInfo& device_info) const = 0;
+  virtual void IncrementConnectionCount() = 0;
+  virtual void DecrementConnectionCount() = 0;
 };
 
 }  // namespace usb
diff --git a/extensions/browser/api/system_cpu/cpu_info_provider_win.cc b/extensions/browser/api/system_cpu/cpu_info_provider_win.cc
index c3a4002..eba4891 100644
--- a/extensions/browser/api/system_cpu/cpu_info_provider_win.cc
+++ b/extensions/browser/api/system_cpu/cpu_info_provider_win.cc
@@ -7,6 +7,7 @@
 #include <windows.h>
 #include <winternl.h>
 
+#include "base/memory/scoped_ptr.h"
 #include "base/sys_info.h"
 
 namespace extensions {
diff --git a/extensions/renderer/api/display_source/display_source_session.h b/extensions/renderer/api/display_source/display_source_session.h
index 548958e..922126d9 100644
--- a/extensions/renderer/api/display_source/display_source_session.h
+++ b/extensions/renderer/api/display_source/display_source_session.h
@@ -7,6 +7,7 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "extensions/common/api/display_source.h"
 #include "third_party/WebKit/public/web/WebDOMMediaStreamTrack.h"
 
diff --git a/extensions/renderer/display_source_custom_bindings.h b/extensions/renderer/display_source_custom_bindings.h
index 72ff6a4..b7e5e96 100644
--- a/extensions/renderer/display_source_custom_bindings.h
+++ b/extensions/renderer/display_source_custom_bindings.h
@@ -6,6 +6,7 @@
 #define EXTENSIONS_RENDERER_DISPLAY_SOURCE_CUSTOM_BINDINGS_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "extensions/common/api/display_source.h"
 #include "extensions/renderer/api/display_source/display_source_session.h"
 #include "extensions/renderer/object_backed_native_handler.h"
diff --git a/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc b/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
index f859a5c..15b1e5f 100644
--- a/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
+++ b/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
@@ -7,6 +7,7 @@
 #include <stdint.h>
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "chromeos/audio/audio_device.h"
 #include "chromeos/audio/audio_devices_pref_handler.h"
 #include "chromeos/audio/cras_audio_handler.h"
diff --git a/gpu/ipc/service/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc
index 1edf8497..8a1f8a4d 100644
--- a/gpu/ipc/service/gpu_channel_manager.cc
+++ b/gpu/ipc/service/gpu_channel_manager.cc
@@ -62,6 +62,7 @@
       sync_point_client_waiter_(
           sync_point_manager->CreateSyncPointClientWaiter()),
       gpu_memory_buffer_factory_(gpu_memory_buffer_factory),
+      exiting_for_lost_context_(false),
       weak_factory_(this) {
   DCHECK(task_runner);
   DCHECK(io_task_runner);
@@ -247,6 +248,17 @@
                                     weak_factory_.GetWeakPtr()));
 }
 
+void GpuChannelManager::MaybeExitOnContextLost() {
+  if (!gpu_preferences().single_process && !gpu_preferences().in_process_gpu) {
+    LOG(ERROR) << "Exiting GPU process because some drivers cannot recover"
+               << " from problems.";
+    // Signal the message loop to quit to shut down other threads
+    // gracefully.
+    base::MessageLoop::current()->QuitNow();
+    exiting_for_lost_context_ = true;
+  }
+}
+
 void GpuChannelManager::DestroyAllChannels() {
   gpu_channels_.clear();
 }
diff --git a/gpu/ipc/service/gpu_channel_manager.h b/gpu/ipc/service/gpu_channel_manager.h
index 288e3b98..9b39cda 100644
--- a/gpu/ipc/service/gpu_channel_manager.h
+++ b/gpu/ipc/service/gpu_channel_manager.h
@@ -107,6 +107,7 @@
   void RemoveChannel(int client_id);
 
   void LoseAllContexts();
+  void MaybeExitOnContextLost();
 
 #if defined(OS_MACOSX)
   void AddBufferPresentedCallback(int32_t routing_id,
@@ -146,6 +147,10 @@
   void DidAccessGpu();
 #endif
 
+  bool is_exiting_for_lost_context() {
+    return exiting_for_lost_context_;
+  }
+
  protected:
   virtual scoped_ptr<GpuChannel> CreateGpuChannel(
       int client_id,
@@ -215,6 +220,9 @@
   base::TimeTicks begin_wake_up_time_;
 #endif
 
+  // Set during intentional GPU process shutdown.
+  bool exiting_for_lost_context_;
+
   // Member variables should appear before the WeakPtrFactory, to ensure
   // that any WeakPtrs to Controller are invalidated before its members
   // variable's destructors are executed, rendering them invalid.
diff --git a/gpu/ipc/service/gpu_command_buffer_stub.cc b/gpu/ipc/service/gpu_command_buffer_stub.cc
index 164853a..f6f52ff 100644
--- a/gpu/ipc/service/gpu_command_buffer_stub.cc
+++ b/gpu/ipc/service/gpu_command_buffer_stub.cc
@@ -460,8 +460,14 @@
 
   if (initialized_) {
     GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
-    if ((surface_handle_ == kNullSurfaceHandle) && !active_url_.is_empty())
+    // If we are currently shutting down the GPU process to help with recovery
+    // (exit_on_context_lost workaround), then don't tell the browser about
+    // offscreen context destruction here since it's not client-invoked, and
+    // might bypass the 3D API blocking logic.
+    if ((surface_handle_ == gpu::kNullSurfaceHandle) && !active_url_.is_empty()
+        && !gpu_channel_manager->is_exiting_for_lost_context()) {
       gpu_channel_manager->delegate()->DidDestroyOffscreenContext(active_url_);
+    }
   }
 
   if (decoder_)
@@ -1092,14 +1098,8 @@
 
     // Work around issues with recovery by allowing a new GPU process to launch.
     if ((was_lost_by_robustness ||
-         context_group_->feature_info()->workarounds().exit_on_context_lost) &&
-        !channel_->gpu_channel_manager()->gpu_preferences().single_process &&
-        !channel_->gpu_channel_manager()->gpu_preferences().in_process_gpu) {
-      LOG(ERROR) << "Exiting GPU process because some drivers cannot recover"
-                 << " from problems.";
-      // Signal the message loop to quit to shut down other threads
-      // gracefully.
-      base::MessageLoop::current()->QuitNow();
+         context_group_->feature_info()->workarounds().exit_on_context_lost)) {
+      channel_->gpu_channel_manager()->MaybeExitOnContextLost();
     }
 
     // Lose all other contexts if the reset was triggered by the robustness
diff --git a/headless/public/headless_browser.cc b/headless/public/headless_browser.cc
index abadc18b..b66efa4 100644
--- a/headless/public/headless_browser.cc
+++ b/headless/public/headless_browser.cc
@@ -22,6 +22,8 @@
       user_agent(content::BuildUserAgentFromProduct(kProductName)),
       message_pump(nullptr) {}
 
+Options::Options(const Options& other) = default;
+
 Options::~Options() {}
 
 Builder::Builder(int argc, const char** argv) : options_(argc, argv) {}
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index 367a838..0110174 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -59,6 +59,7 @@
 
 // Embedding API overrides for the headless browser.
 struct HeadlessBrowser::Options {
+  Options(const Options& other);
   ~Options();
 
   class Builder;
diff --git a/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h b/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h
index e20be6c..64b83b1e 100644
--- a/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h
+++ b/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h
@@ -171,7 +171,7 @@
   // TODO(mkwst): The current implementation relies on unique (empty) origins to
   // signal removal of all origins. Reconsider this behavior if/when we build
   // a "forget this site" feature.
-  void RemoveImpl(int remove_mask, const GURL& remove_url);
+  void RemoveImpl(int remove_mask);
 
   // Notifies observers and deletes this object.
   void NotifyAndDelete();
@@ -199,8 +199,7 @@
 
   // Invoked on the IO thread to delete cookies.
   void ClearCookiesOnIOThread(
-      const scoped_refptr<net::URLRequestContextGetter>& rq_context,
-      const GURL& storage_url);
+      const scoped_refptr<net::URLRequestContextGetter>& rq_context);
 
   // Invoked on the IO thread to delete channel IDs.
   void ClearChannelIDsOnIOThread(
diff --git a/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.mm b/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.mm
index 7e8472b..d7e5a0e 100644
--- a/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.mm
+++ b/ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.mm
@@ -126,11 +126,10 @@
 }
 
 void IOSChromeBrowsingDataRemover::Remove(int remove_mask) {
-  RemoveImpl(remove_mask, GURL());
+  RemoveImpl(remove_mask);
 }
 
-void IOSChromeBrowsingDataRemover::RemoveImpl(int remove_mask,
-                                              const GURL& remove_url) {
+void IOSChromeBrowsingDataRemover::RemoveImpl(int remove_mask) {
   DCHECK_CURRENTLY_ON(WebThread::UI);
   set_removing(true);
   remove_mask_ = remove_mask;
@@ -148,8 +147,6 @@
             browser_state_, ServiceAccessType::EXPLICIT_ACCESS);
     if (history_service) {
       std::set<GURL> restrict_urls;
-      if (!remove_url.is_empty())
-        restrict_urls.insert(remove_url);
       web::RecordAction(UserMetricsAction("ClearBrowsingData_History"));
       waiting_for_clear_history_ = true;
 
@@ -191,21 +188,19 @@
         waiting_for_clear_keyword_data_ = true;
       } else if (keywords_model) {
         keywords_model->RemoveAutoGeneratedForOriginBetween(
-            remove_url, delete_begin_, delete_end_);
+            GURL(), delete_begin_, delete_end_);
       }
     }
 
     // If the caller is removing history for all hosts, then clear ancillary
     // historical information.
-    if (remove_url.is_empty()) {
-      // We also delete the list of recently closed tabs. Since these expire,
-      // they can't be more than a day old, so we can simply clear them all.
-      sessions::TabRestoreService* tab_service =
-          IOSChromeTabRestoreServiceFactory::GetForBrowserState(browser_state_);
-      if (tab_service) {
-        tab_service->ClearEntries();
-        tab_service->DeleteLastSession();
-      }
+    // We also delete the list of recently closed tabs. Since these expire,
+    // they can't be more than a day old, so we can simply clear them all.
+    sessions::TabRestoreService* tab_service =
+        IOSChromeTabRestoreServiceFactory::GetForBrowserState(browser_state_);
+    if (tab_service) {
+      tab_service->ClearEntries();
+      tab_service->DeleteLastSession();
     }
 
     // The saved Autofill profiles and credit cards can include the origin from
@@ -240,7 +235,7 @@
     WebThread::PostTask(
         WebThread::IO, FROM_HERE,
         base::Bind(&IOSChromeBrowsingDataRemover::ClearCookiesOnIOThread,
-                   base::Unretained(this), main_context_getter_, remove_url));
+                   base::Unretained(this), main_context_getter_));
 
     // TODO(mkwst): If we're not removing passwords, then clear the 'zero-click'
     // flag for all credentials in the password store.
@@ -454,22 +449,14 @@
 }
 
 void IOSChromeBrowsingDataRemover::ClearCookiesOnIOThread(
-    const scoped_refptr<net::URLRequestContextGetter>& rq_context,
-    const GURL& storage_url) {
+    const scoped_refptr<net::URLRequestContextGetter>& rq_context) {
   DCHECK_CURRENTLY_ON(WebThread::IO);
   net::CookieStore* cookie_store =
       rq_context->GetURLRequestContext()->cookie_store();
-  if (storage_url.is_empty()) {
-    cookie_store->DeleteAllCreatedBetweenAsync(
-        delete_begin_, delete_end_,
-        base::Bind(&IOSChromeBrowsingDataRemover::OnClearedCookies,
-                   base::Unretained(this)));
-  } else {
-    cookie_store->DeleteAllCreatedBetweenForHostAsync(
-        delete_begin_, delete_end_, storage_url,
-        base::Bind(&IOSChromeBrowsingDataRemover::OnClearedCookies,
-                   base::Unretained(this)));
-  }
+  cookie_store->DeleteAllCreatedBetweenAsync(
+      delete_begin_, delete_end_,
+      base::Bind(&IOSChromeBrowsingDataRemover::OnClearedCookies,
+                 base::Unretained(this)));
 }
 
 void IOSChromeBrowsingDataRemover::ClearChannelIDsOnIOThread(
diff --git a/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc b/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
index c92046e..f1e4f618 100644
--- a/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
+++ b/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
@@ -48,6 +48,7 @@
   bool UseCupSigning() const override;
   scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
       const override;
+  PrefService* GetPrefService() const override;
 
  private:
   friend class base::RefCountedThreadSafe<IOSConfigurator>;
@@ -152,6 +153,10 @@
           base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
 }
 
+PrefService* IOSConfigurator::GetPrefService() const {
+  return nullptr;
+}
+
 }  // namespace
 
 scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator(
diff --git a/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc b/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
index 73a1d26..c5ff726 100644
--- a/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
+++ b/ios/chrome/browser/ui/webui/history/browsing_history_handler.cc
@@ -156,6 +156,9 @@
 BrowsingHistoryHandler::HistoryEntry::HistoryEntry()
     : entry_type(EMPTY_ENTRY), is_search_result(false), blocked_visit(false) {}
 
+BrowsingHistoryHandler::HistoryEntry::HistoryEntry(const HistoryEntry& other) =
+    default;
+
 BrowsingHistoryHandler::HistoryEntry::~HistoryEntry() {}
 
 void BrowsingHistoryHandler::HistoryEntry::SetUrlAndTitle(
diff --git a/ios/chrome/browser/ui/webui/history/browsing_history_handler.h b/ios/chrome/browser/ui/webui/history/browsing_history_handler.h
index 233ffad0..adba740a 100644
--- a/ios/chrome/browser/ui/webui/history/browsing_history_handler.h
+++ b/ios/chrome/browser/ui/webui/history/browsing_history_handler.h
@@ -61,6 +61,7 @@
                  bool is_search_result,
                  const base::string16& snippet,
                  bool blocked_visit);
+    HistoryEntry(const HistoryEntry& other);
     HistoryEntry();
     virtual ~HistoryEntry();
 
diff --git a/ios/chrome/browser/ui/webui/history/favicon_source.cc b/ios/chrome/browser/ui/webui/history/favicon_source.cc
index ac103d95..f2b915c3 100644
--- a/ios/chrome/browser/ui/webui/history/favicon_source.cc
+++ b/ios/chrome/browser/ui/webui/history/favicon_source.cc
@@ -34,6 +34,8 @@
       size_in_dip(size),
       device_scale_factor(scale) {}
 
+FaviconSource::IconRequest::IconRequest(const IconRequest& other) = default;
+
 FaviconSource::IconRequest::~IconRequest() {}
 
 FaviconSource::FaviconSource(favicon::FaviconService* favicon_service,
diff --git a/ios/chrome/browser/ui/webui/history/favicon_source.h b/ios/chrome/browser/ui/webui/history/favicon_source.h
index e67f4ee9..58d7d36 100644
--- a/ios/chrome/browser/ui/webui/history/favicon_source.h
+++ b/ios/chrome/browser/ui/webui/history/favicon_source.h
@@ -89,6 +89,7 @@
                 const GURL& path,
                 int size,
                 float scale);
+    IconRequest(const IconRequest& other);
     ~IconRequest();
 
     web::URLDataSourceIOS::GotDataCallback callback;
diff --git a/ios/net/cookies/cookie_store_ios.h b/ios/net/cookies/cookie_store_ios.h
index ee2f678..ed635f4 100644
--- a/ios/net/cookies/cookie_store_ios.h
+++ b/ios/net/cookies/cookie_store_ios.h
@@ -149,10 +149,10 @@
   void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
                                     const base::Time& delete_end,
                                     const DeleteCallback& callback) override;
-  void DeleteAllCreatedBetweenForHostAsync(
-      const base::Time delete_begin,
-      const base::Time delete_end,
-      const GURL& url,
+  void DeleteAllCreatedBetweenWithPredicateAsync(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const CookiePredicate& predicate,
       const DeleteCallback& callback) override;
   void DeleteSessionCookiesAsync(const DeleteCallback& callback) override;
   void FlushStore(const base::Closure& callback) override;
diff --git a/ios/net/cookies/cookie_store_ios.mm b/ios/net/cookies/cookie_store_ios.mm
index 84e687dc..8dfea49d 100644
--- a/ios/net/cookies/cookie_store_ios.mm
+++ b/ios/net/cookies/cookie_store_ios.mm
@@ -250,15 +250,18 @@
 // Tests whether the |creation_time| of |cookie| is in the time range defined
 // by |time_begin| and |time_end| and the cookie host match |host|. A null
 // |time_end| means end-of-time.
-bool IsCookieCreatedBetweenForHost(base::Time time_begin,
-                                   base::Time time_end,
-                                   NSString* host,
-                                   NSHTTPCookie* cookie,
-                                   base::Time creation_time) {
-  NSString* domain = [cookie domain];
-  return [domain characterAtIndex:0] != '.' &&
-         [domain caseInsensitiveCompare:host] == NSOrderedSame &&
-         IsCookieCreatedBetween(time_begin, time_end, cookie, creation_time);
+bool IsCookieCreatedBetweenWithPredicate(
+    base::Time time_begin,
+    base::Time time_end,
+    const net::CookieStore::CookiePredicate& predicate,
+    NSHTTPCookie* cookie,
+    base::Time creation_time) {
+  if (predicate.is_null())
+    return false;
+  CanonicalCookie canonical_cookie =
+      CanonicalCookieFromSystemCookie(cookie, creation_time);
+  return IsCookieCreatedBetween(time_begin, time_end, cookie, creation_time) &&
+         predicate.Run(canonical_cookie);
 }
 
 // Adds cookies in |cookies| with name |name| to |filtered|.
@@ -687,10 +690,10 @@
   }
 }
 
-void CookieStoreIOS::DeleteAllCreatedBetweenForHostAsync(
-    const base::Time delete_begin,
-    const base::Time delete_end,
-    const GURL& url,
+void CookieStoreIOS::DeleteAllCreatedBetweenWithPredicateAsync(
+    const base::Time& delete_begin,
+    const base::Time& delete_end,
+    const CookiePredicate& predicate,
     const DeleteCallback& callback) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
@@ -699,19 +702,19 @@
 
   switch (synchronization_state_) {
     case NOT_SYNCHRONIZED:
-      cookie_monster_->DeleteAllCreatedBetweenForHostAsync(
-          delete_begin, delete_end, url, WrapDeleteCallback(callback));
+      cookie_monster_->DeleteAllCreatedBetweenWithPredicateAsync(
+          delete_begin, delete_end, predicate, WrapDeleteCallback(callback));
       break;
     case SYNCHRONIZING:
       tasks_pending_synchronization_.push_back(
-          base::Bind(&CookieStoreIOS::DeleteAllCreatedBetweenForHostAsync,
-                     weak_factory_.GetWeakPtr(), delete_begin, delete_end, url,
-                     WrapDeleteCallback(callback)));
+          base::Bind(&CookieStoreIOS::DeleteAllCreatedBetweenWithPredicateAsync,
+                     weak_factory_.GetWeakPtr(), delete_begin, delete_end,
+                     predicate, WrapDeleteCallback(callback)));
       break;
     case SYNCHRONIZED:
-      NSString* host = base::SysUTF8ToNSString(url.host());
-      CookieFilterFunction filter = base::Bind(IsCookieCreatedBetweenForHost,
-                                               delete_begin, delete_end, host);
+      CookieFilterFunction filter =
+          base::Bind(IsCookieCreatedBetweenWithPredicate, delete_begin,
+                     delete_end, predicate);
       DeleteCookiesWithFilter(filter, callback);
       break;
   }
diff --git a/ios/net/cookies/cookie_store_ios_unittest.mm b/ios/net/cookies/cookie_store_ios_unittest.mm
index f5cd3c1..7101a9a 100644
--- a/ios/net/cookies/cookie_store_ios_unittest.mm
+++ b/ios/net/cookies/cookie_store_ios_unittest.mm
@@ -154,14 +154,14 @@
     store_->DeleteAllCreatedBetweenAsync(delete_begin, delete_end, callback);
   }
 
-  void DeleteAllCreatedBetweenForHostAsync(
-      const base::Time delete_begin,
-      const base::Time delete_end,
-      const GURL& url,
+  void DeleteAllCreatedBetweenWithPredicateAsync(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const CookiePredicate& predicate,
       const DeleteCallback& callback) override {
     RoundTrip();
-    store_->DeleteAllCreatedBetweenForHostAsync(delete_begin, delete_end, url,
-                                                callback);
+    store_->DeleteAllCreatedBetweenWithPredicateAsync(delete_begin, delete_end,
+                                                      predicate, callback);
   }
 
   void DeleteSessionCookiesAsync(const DeleteCallback& callback) override {
diff --git a/ios/web/net/cert_host_pair.cc b/ios/web/net/cert_host_pair.cc
index cefc6eb..569a77b7 100644
--- a/ios/web/net/cert_host_pair.cc
+++ b/ios/web/net/cert_host_pair.cc
@@ -12,6 +12,8 @@
                            const std::string& host)
     : cert(cert), host(host) {}
 
+CertHostPair::CertHostPair(const CertHostPair& other) = default;
+
 CertHostPair::~CertHostPair() {}
 
 bool CertHostPair::operator<(const CertHostPair& other) const {
diff --git a/ios/web/net/cert_host_pair.h b/ios/web/net/cert_host_pair.h
index b32322a6..f251c1b5 100644
--- a/ios/web/net/cert_host_pair.h
+++ b/ios/web/net/cert_host_pair.h
@@ -20,6 +20,7 @@
 struct CertHostPair {
   CertHostPair(const scoped_refptr<net::X509Certificate>& cert,
                const std::string& host);
+  CertHostPair(const CertHostPair& other);
   ~CertHostPair();
 
   bool operator<(const CertHostPair& other) const;
diff --git a/ios/web/net/cert_verifier_block_adapter.cc b/ios/web/net/cert_verifier_block_adapter.cc
index 781e483..4efa4c3 100644
--- a/ios/web/net/cert_verifier_block_adapter.cc
+++ b/ios/web/net/cert_verifier_block_adapter.cc
@@ -66,6 +66,8 @@
     const std::string& hostname)
     : cert(cert), hostname(hostname), flags(0) {}
 
+CertVerifierBlockAdapter::Params::Params(const Params& other) = default;
+
 CertVerifierBlockAdapter::Params::~Params() {
 }
 
diff --git a/ios/web/net/cert_verifier_block_adapter.h b/ios/web/net/cert_verifier_block_adapter.h
index 851bdc1..4569cae 100644
--- a/ios/web/net/cert_verifier_block_adapter.h
+++ b/ios/web/net/cert_verifier_block_adapter.h
@@ -42,6 +42,7 @@
     // verification.
     Params(const scoped_refptr<net::X509Certificate>& cert,
            const std::string& hostname);
+    Params(const Params& other);
     ~Params();
 
     // Certificate to verify, can not be null.
diff --git a/ios/web/public/favicon_url.cc b/ios/web/public/favicon_url.cc
index 53f15733..9906b35 100644
--- a/ios/web/public/favicon_url.cc
+++ b/ios/web/public/favicon_url.cc
@@ -15,6 +15,8 @@
                        const std::vector<gfx::Size>& sizes)
     : icon_url(url), icon_type(type), icon_sizes(sizes) {}
 
+FaviconURL::FaviconURL(const FaviconURL& other) = default;
+
 FaviconURL::~FaviconURL() {
 }
 
diff --git a/ios/web/public/favicon_url.h b/ios/web/public/favicon_url.h
index 762ce85..765c292e 100644
--- a/ios/web/public/favicon_url.h
+++ b/ios/web/public/favicon_url.h
@@ -27,6 +27,7 @@
   FaviconURL(const GURL& url,
              IconType type,
              const std::vector<gfx::Size>& sizes);
+  FaviconURL(const FaviconURL& other);
   ~FaviconURL();
 
   // The url of the icon.
diff --git a/ios/web/public/test/response_providers/response_provider.h b/ios/web/public/test/response_providers/response_provider.h
index d2c7546..f3d56f50 100644
--- a/ios/web/public/test/response_providers/response_provider.h
+++ b/ios/web/public/test/response_providers/response_provider.h
@@ -29,6 +29,7 @@
             const std::string& method,
             const std::string& body,
             const net::HttpRequestHeaders& headers);
+    Request(const Request& other);
     virtual ~Request();
 
     // The URL for the request.
diff --git a/ios/web/public/test/response_providers/response_provider.mm b/ios/web/public/test/response_providers/response_provider.mm
index eda7d09..e795e95 100644
--- a/ios/web/public/test/response_providers/response_provider.mm
+++ b/ios/web/public/test/response_providers/response_provider.mm
@@ -15,6 +15,8 @@
                                    const net::HttpRequestHeaders& headers)
     : url(url), method(method), body(body), headers(headers) {}
 
+ResponseProvider::Request::Request(const Request& other) = default;
+
 ResponseProvider::Request::~Request() {}
 
 ResponseProvider::ResponseProvider() {}
diff --git a/ios/web/public/web_state/credential.h b/ios/web/public/web_state/credential.h
index 8fc850e..cb7d5b6 100644
--- a/ios/web/public/web_state/credential.h
+++ b/ios/web/public/web_state/credential.h
@@ -22,6 +22,7 @@
 // Represents an instance of the JavaScript Credential type.
 struct Credential {
   Credential();
+  Credential(const Credential& other);
   ~Credential();
 
   // The specific type of this credential.
diff --git a/ios/web/test/web_test.h b/ios/web/test/web_test.h
index df2ac4f..f934d4b9 100644
--- a/ios/web/test/web_test.h
+++ b/ios/web/test/web_test.h
@@ -35,7 +35,7 @@
   TestWebClient* GetWebClient();
 
   // Returns the BrowserState that is used for testing.
-  BrowserState* GetBrowserState() { return &browser_state_; }
+  virtual BrowserState* GetBrowserState();
 
  private:
   // The WebClient used in tests.
diff --git a/ios/web/test/web_test.mm b/ios/web/test/web_test.mm
index 0ef56ead..635ee7e8 100644
--- a/ios/web/test/web_test.mm
+++ b/ios/web/test/web_test.mm
@@ -54,6 +54,10 @@
   return static_cast<TestWebClient*>(web_client_.Get());
 }
 
+BrowserState* WebTest::GetBrowserState() {
+  return &browser_state_;
+}
+
 #pragma mark -
 
 WebTestWithWebController::WebTestWithWebController() {}
diff --git a/ios/web/web_state/credential.cc b/ios/web/web_state/credential.cc
index 87d04ea..ac710a8 100644
--- a/ios/web/web_state/credential.cc
+++ b/ios/web/web_state/credential.cc
@@ -9,6 +9,8 @@
 Credential::Credential() : type(CREDENTIAL_TYPE_EMPTY) {
 }
 
+Credential::Credential(const Credential& other) = default;
+
 Credential::~Credential() = default;
 
 bool CredentialsEqual(const web::Credential& credential1,
diff --git a/ios/web/web_state/ui/crw_context_menu_provider.h b/ios/web/web_state/ui/crw_context_menu_provider.h
index 793cf32..cf3b80f 100644
--- a/ios/web/web_state/ui/crw_context_menu_provider.h
+++ b/ios/web/web_state/ui/crw_context_menu_provider.h
@@ -10,7 +10,7 @@
 
 // A protocol implemented by a provider of labels and actions for a context
 // menu.
-@protocol CRWContextMenuProvider
+@protocol CRWContextMenuProvider<NSObject>
 
 // Returns a CRUContextMenuHolder with the titles and actions associated with
 // each menu item. The "Cancel" item is automatically added when constructing
diff --git a/ios/web/web_state/web_state_impl_unittest.mm b/ios/web/web_state/web_state_impl_unittest.mm
index e946cea..2502cb91 100644
--- a/ios/web/web_state/web_state_impl_unittest.mm
+++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -16,13 +16,13 @@
 #include "ios/web/public/web_state/global_web_state_observer.h"
 #include "ios/web/public/web_state/web_state_observer.h"
 #include "ios/web/public/web_state/web_state_policy_decider.h"
+#import "ios/web/test/web_test.h"
 #include "ios/web/web_state/global_web_state_event_tracker.h"
 #include "net/http/http_response_headers.h"
 #include "net/http/http_util.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/gtest_mac.h"
-#include "testing/platform_test.h"
 #include "url/gurl.h"
 
 using testing::_;
@@ -224,11 +224,10 @@
   return should_handle;
 }
 
-class WebStateTest : public PlatformTest {
+class WebStateTest : public web::WebTest {
  protected:
   void SetUp() override {
     web_state_.reset(new WebStateImpl(&browser_state_));
-    web_state_->SetWebController(nil);
   }
 
   web::TestBrowserState browser_state_;
diff --git a/ios/web/webui/crw_web_ui_manager_unittest.mm b/ios/web/webui/crw_web_ui_manager_unittest.mm
index 48528011..41a3cff0 100644
--- a/ios/web/webui/crw_web_ui_manager_unittest.mm
+++ b/ios/web/webui/crw_web_ui_manager_unittest.mm
@@ -19,13 +19,13 @@
 #include "ios/web/public/test/scoped_testing_web_client.h"
 #include "ios/web/public/test/test_browser_state.h"
 #import "ios/web/public/test/test_web_client.h"
+#import "ios/web/test/web_test.h"
 #include "ios/web/web_state/web_state_impl.h"
 #import "ios/web/webui/crw_web_ui_page_builder.h"
 #include "ios/web/webui/url_fetcher_block_adapter.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/gtest_mac.h"
-#include "testing/platform_test.h"
 
 namespace web {
 
@@ -112,7 +112,7 @@
 namespace web {
 
 // Test fixture for testing CRWWebUIManager
-class CRWWebUIManagerTest : public PlatformTest {
+class CRWWebUIManagerTest : public web::WebTest {
  public:
   CRWWebUIManagerTest()
       : web_client_(base::WrapUnique(new web::AppSpecificTestWebClient)) {}
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 21ebafb6..e3a7192 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -39,16 +39,18 @@
 class Worker : public Listener, public Sender {
  public:
   // Will create a channel without a name.
-  Worker(Channel::Mode mode, const std::string& thread_name)
+  Worker(Channel::Mode mode,
+         const std::string& thread_name,
+         const std::string& channel_name)
       : done_(new WaitableEvent(false, false)),
         channel_created_(new WaitableEvent(false, false)),
+        channel_name_(channel_name),
         mode_(mode),
         ipc_thread_((thread_name + "_ipc").c_str()),
         listener_thread_((thread_name + "_listener").c_str()),
         overrided_thread_(NULL),
         shutdown_event_(true, false),
-        is_shutdown_(false) {
-  }
+        is_shutdown_(false) {}
 
   // Will create a named channel and use this name for the threads' name.
   Worker(const std::string& channel_name, Channel::Mode mode)
@@ -276,9 +278,9 @@
 
 class SimpleServer : public Worker {
  public:
-  explicit SimpleServer(bool pump_during_send)
-      : Worker(Channel::MODE_SERVER, "simpler_server"),
-        pump_during_send_(pump_during_send) { }
+  SimpleServer(bool pump_during_send, const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "simpler_server", channel_name),
+        pump_during_send_(pump_during_send) {}
   void Run() override {
     SendAnswerToLife(pump_during_send_, true);
     Done();
@@ -289,7 +291,8 @@
 
 class SimpleClient : public Worker {
  public:
-  SimpleClient() : Worker(Channel::MODE_CLIENT, "simple_client") { }
+  explicit SimpleClient(const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "simple_client", channel_name) {}
 
   void OnAnswer(int* answer) override {
     *answer = 42;
@@ -299,8 +302,8 @@
 
 void Simple(bool pump_during_send) {
   std::vector<Worker*> workers;
-  workers.push_back(new SimpleServer(pump_during_send));
-  workers.push_back(new SimpleClient());
+  workers.push_back(new SimpleServer(pump_during_send, "Simple"));
+  workers.push_back(new SimpleClient("Simple"));
   RunTest(workers);
 }
 
@@ -322,9 +325,9 @@
 // ChannelProxy::Init separately) process.
 class TwoStepServer : public Worker {
  public:
-  explicit TwoStepServer(bool create_pipe_now)
-      : Worker(Channel::MODE_SERVER, "simpler_server"),
-        create_pipe_now_(create_pipe_now) { }
+  TwoStepServer(bool create_pipe_now, const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "simpler_server", channel_name),
+        create_pipe_now_(create_pipe_now) {}
 
   void Run() override {
     SendAnswerToLife(false, true);
@@ -345,9 +348,9 @@
 
 class TwoStepClient : public Worker {
  public:
-  TwoStepClient(bool create_pipe_now)
-      : Worker(Channel::MODE_CLIENT, "simple_client"),
-        create_pipe_now_(create_pipe_now) { }
+  TwoStepClient(bool create_pipe_now, const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "simple_client", channel_name),
+        create_pipe_now_(create_pipe_now) {}
 
   void OnAnswer(int* answer) override {
     *answer = 42;
@@ -368,8 +371,8 @@
 
 void TwoStep(bool create_server_pipe_now, bool create_client_pipe_now) {
   std::vector<Worker*> workers;
-  workers.push_back(new TwoStepServer(create_server_pipe_now));
-  workers.push_back(new TwoStepClient(create_client_pipe_now));
+  workers.push_back(new TwoStepServer(create_server_pipe_now, "TwoStep"));
+  workers.push_back(new TwoStepClient(create_client_pipe_now, "TwoStep"));
   RunTest(workers);
 }
 
@@ -386,7 +389,8 @@
 
 class DelayClient : public Worker {
  public:
-  DelayClient() : Worker(Channel::MODE_CLIENT, "delay_client") { }
+  explicit DelayClient(const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "delay_client", channel_name) {}
 
   void OnAnswerDelay(Message* reply_msg) override {
     SyncChannelTestMsg_AnswerToLife::WriteReplyParams(reply_msg, 42);
@@ -397,8 +401,8 @@
 
 void DelayReply(bool pump_during_send) {
   std::vector<Worker*> workers;
-  workers.push_back(new SimpleServer(pump_during_send));
-  workers.push_back(new DelayClient());
+  workers.push_back(new SimpleServer(pump_during_send, "DelayReply"));
+  workers.push_back(new DelayClient("DelayReply"));
   RunTest(workers);
 }
 
@@ -412,10 +416,12 @@
 
 class NoHangServer : public Worker {
  public:
-  NoHangServer(WaitableEvent* got_first_reply, bool pump_during_send)
-      : Worker(Channel::MODE_SERVER, "no_hang_server"),
+  NoHangServer(WaitableEvent* got_first_reply,
+               bool pump_during_send,
+               const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "no_hang_server", channel_name),
         got_first_reply_(got_first_reply),
-        pump_during_send_(pump_during_send) { }
+        pump_during_send_(pump_during_send) {}
   void Run() override {
     SendAnswerToLife(pump_during_send_, true);
     got_first_reply_->Signal();
@@ -430,9 +436,9 @@
 
 class NoHangClient : public Worker {
  public:
-  explicit NoHangClient(WaitableEvent* got_first_reply)
-    : Worker(Channel::MODE_CLIENT, "no_hang_client"),
-      got_first_reply_(got_first_reply) { }
+  NoHangClient(WaitableEvent* got_first_reply, const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "no_hang_client", channel_name),
+        got_first_reply_(got_first_reply) {}
 
   void OnAnswerDelay(Message* reply_msg) override {
     // Use the DELAY_REPLY macro so that we can force the reply to be sent
@@ -450,8 +456,9 @@
 void NoHang(bool pump_during_send) {
   WaitableEvent got_first_reply(false, false);
   std::vector<Worker*> workers;
-  workers.push_back(new NoHangServer(&got_first_reply, pump_during_send));
-  workers.push_back(new NoHangClient(&got_first_reply));
+  workers.push_back(
+      new NoHangServer(&got_first_reply, pump_during_send, "NoHang"));
+  workers.push_back(new NoHangClient(&got_first_reply, "NoHang"));
   RunTest(workers);
 }
 
@@ -465,10 +472,12 @@
 
 class UnblockServer : public Worker {
  public:
-  UnblockServer(bool pump_during_send, bool delete_during_send)
-    : Worker(Channel::MODE_SERVER, "unblock_server"),
-      pump_during_send_(pump_during_send),
-      delete_during_send_(delete_during_send) { }
+  UnblockServer(bool pump_during_send,
+                bool delete_during_send,
+                const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "unblock_server", channel_name),
+        pump_during_send_(pump_during_send),
+        delete_during_send_(delete_during_send) {}
   void Run() override {
     if (delete_during_send_) {
       // Use custom code since race conditions mean the answer may or may not be
@@ -497,9 +506,9 @@
 
 class UnblockClient : public Worker {
  public:
-  explicit UnblockClient(bool pump_during_send)
-    : Worker(Channel::MODE_CLIENT, "unblock_client"),
-      pump_during_send_(pump_during_send) { }
+  UnblockClient(bool pump_during_send, const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "unblock_client", channel_name),
+        pump_during_send_(pump_during_send) {}
 
   void OnAnswer(int* answer) override {
     SendDouble(pump_during_send_, true);
@@ -512,8 +521,9 @@
 
 void Unblock(bool server_pump, bool client_pump, bool delete_during_send) {
   std::vector<Worker*> workers;
-  workers.push_back(new UnblockServer(server_pump, delete_during_send));
-  workers.push_back(new UnblockClient(client_pump));
+  workers.push_back(
+      new UnblockServer(server_pump, delete_during_send, "Unblock"));
+  workers.push_back(new UnblockClient(client_pump, "Unblock"));
   RunTest(workers);
 }
 
@@ -544,10 +554,14 @@
 
 class RecursiveServer : public Worker {
  public:
-  RecursiveServer(bool expected_send_result, bool pump_first, bool pump_second)
-      : Worker(Channel::MODE_SERVER, "recursive_server"),
+  RecursiveServer(bool expected_send_result,
+                  bool pump_first,
+                  bool pump_second,
+                  const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "recursive_server", channel_name),
         expected_send_result_(expected_send_result),
-        pump_first_(pump_first), pump_second_(pump_second) {}
+        pump_first_(pump_first),
+        pump_second_(pump_second) {}
   void Run() override {
     SendDouble(pump_first_, expected_send_result_);
     Done();
@@ -563,9 +577,12 @@
 
 class RecursiveClient : public Worker {
  public:
-  RecursiveClient(bool pump_during_send, bool close_channel)
-      : Worker(Channel::MODE_CLIENT, "recursive_client"),
-        pump_during_send_(pump_during_send), close_channel_(close_channel) {}
+  RecursiveClient(bool pump_during_send,
+                  bool close_channel,
+                  const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "recursive_client", channel_name),
+        pump_during_send_(pump_during_send),
+        close_channel_(close_channel) {}
 
   void OnDoubleDelay(int in, Message* reply_msg) override {
     SendDouble(pump_during_send_, !close_channel_);
@@ -594,9 +611,9 @@
 void Recursive(
     bool server_pump_first, bool server_pump_second, bool client_pump) {
   std::vector<Worker*> workers;
-  workers.push_back(
-      new RecursiveServer(true, server_pump_first, server_pump_second));
-  workers.push_back(new RecursiveClient(client_pump, false));
+  workers.push_back(new RecursiveServer(true, server_pump_first,
+                                        server_pump_second, "Recursive"));
+  workers.push_back(new RecursiveClient(client_pump, false, "Recursive"));
   RunTest(workers);
 }
 
@@ -617,9 +634,9 @@
 void RecursiveNoHang(
     bool server_pump_first, bool server_pump_second, bool client_pump) {
   std::vector<Worker*> workers;
-  workers.push_back(
-      new RecursiveServer(false, server_pump_first, server_pump_second));
-  workers.push_back(new RecursiveClient(client_pump, true));
+  workers.push_back(new RecursiveServer(false, server_pump_first,
+                                        server_pump_second, "RecursiveNoHang"));
+  workers.push_back(new RecursiveClient(client_pump, true, "RecursiveNoHang"));
   RunTest(workers);
 }
 
@@ -860,8 +877,8 @@
 
 class ChattyClient : public Worker {
  public:
-  ChattyClient() :
-      Worker(Channel::MODE_CLIENT, "chatty_client") { }
+  explicit ChattyClient(const std::string& channel_name)
+      : Worker(Channel::MODE_CLIENT, "chatty_client", channel_name) {}
 
   void OnAnswer(int* answer) override {
     // The PostMessage limit is 10k.  Send 20% more than that.
@@ -878,8 +895,8 @@
 
 void ChattyServer(bool pump_during_send) {
   std::vector<Worker*> workers;
-  workers.push_back(new UnblockServer(pump_during_send, false));
-  workers.push_back(new ChattyClient());
+  workers.push_back(new UnblockServer(pump_during_send, false, "ChattyServer"));
+  workers.push_back(new ChattyClient("ChattyServer"));
   RunTest(workers);
 }
 
@@ -913,8 +930,8 @@
 
 class DoneEventRaceServer : public Worker {
  public:
-  DoneEventRaceServer()
-      : Worker(Channel::MODE_SERVER, "done_event_race_server") { }
+  explicit DoneEventRaceServer(const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "done_event_race_server", channel_name) {}
 
   void Run() override {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -942,8 +959,8 @@
 // reply comes back OnObjectSignaled will be called for the first message.
 TEST_F(IPCSyncChannelTest, MAYBE_DoneEventRace) {
   std::vector<Worker*> workers;
-  workers.push_back(new DoneEventRaceServer());
-  workers.push_back(new SimpleClient());
+  workers.push_back(new DoneEventRaceServer("DoneEventRace"));
+  workers.push_back(new SimpleClient("DoneEventRace"));
   RunTest(workers);
 }
 
@@ -984,8 +1001,10 @@
 
 class SyncMessageFilterServer : public Worker {
  public:
-  SyncMessageFilterServer()
-      : Worker(Channel::MODE_SERVER, "sync_message_filter_server"),
+  explicit SyncMessageFilterServer(const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER,
+               "sync_message_filter_server",
+               channel_name),
         thread_("helper_thread") {
     base::Thread::Options options;
     options.message_loop_type = base::MessageLoop::TYPE_DEFAULT;
@@ -1006,10 +1025,9 @@
 // channel does not crash after the channel has been closed.
 class ServerSendAfterClose : public Worker {
  public:
-  ServerSendAfterClose()
-     : Worker(Channel::MODE_SERVER, "simpler_server"),
-       send_result_(true) {
-  }
+  explicit ServerSendAfterClose(const std::string& channel_name)
+      : Worker(Channel::MODE_SERVER, "simpler_server", channel_name),
+        send_result_(true) {}
 
   bool SendDummy() {
     ListenerThread()->task_runner()->PostTask(
@@ -1040,14 +1058,14 @@
 // Tests basic synchronous call
 TEST_F(IPCSyncChannelTest, SyncMessageFilter) {
   std::vector<Worker*> workers;
-  workers.push_back(new SyncMessageFilterServer());
-  workers.push_back(new SimpleClient());
+  workers.push_back(new SyncMessageFilterServer("SyncMessageFilter"));
+  workers.push_back(new SimpleClient("SyncMessageFilter"));
   RunTest(workers);
 }
 
 // Test the case when the channel is closed and a Send is attempted after that.
 TEST_F(IPCSyncChannelTest, SendAfterClose) {
-  ServerSendAfterClose server;
+  ServerSendAfterClose server("SendAfterClose");
   server.Start();
 
   server.done_event()->Wait();
diff --git a/mash/session/session.cc b/mash/session/session.cc
index 843fab3..ce40c7e6 100644
--- a/mash/session/session.cc
+++ b/mash/session/session.cc
@@ -61,7 +61,7 @@
 void Session::AddScreenlockStateListener(
     mojom::ScreenlockStateListenerPtr listener) {
   listener->ScreenlockStateChanged(screen_locked_);
-  screenlock_listeners_.AddInterfacePtr(std::move(listener));
+  screenlock_listeners_.AddPtr(std::move(listener));
 }
 
 void Session::LockScreen() {
diff --git a/media/audio/audio_input_writer.h b/media/audio/audio_input_writer.h
index 700570b0..938baf1 100644
--- a/media/audio/audio_input_writer.h
+++ b/media/audio/audio_input_writer.h
@@ -5,6 +5,8 @@
 #ifndef MEDIA_AUDIO_AUDIO_INPUT_WRITER_H_
 #define MEDIA_AUDIO_AUDIO_INPUT_WRITER_H_
 
+#include "base/memory/scoped_ptr.h"
+
 namespace media {
 
 class AudioBus;
diff --git a/media/blink/cdm_session_adapter.cc b/media/blink/cdm_session_adapter.cc
index 69377918..3e1cd609 100644
--- a/media/blink/cdm_session_adapter.cc
+++ b/media/blink/cdm_session_adapter.cc
@@ -10,6 +10,7 @@
 #include "base/logging.h"
 #include "base/metrics/histogram.h"
 #include "base/stl_util.h"
+#include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
 #include "media/base/cdm_factory.h"
 #include "media/base/cdm_key_information.h"
@@ -21,14 +22,30 @@
 
 namespace media {
 
+namespace {
 const char kMediaEME[] = "Media.EME.";
 const char kDot[] = ".";
 const char kTimeToCreateCdmUMAName[] = "CreateCdmTime";
 
+void ReleaseCdm(scoped_refptr<MediaKeys> cdm) {
+  // |cdm| will be freed now.
+}
+
+}  // namespace
+
 CdmSessionAdapter::CdmSessionAdapter()
     : trace_id_(0), weak_ptr_factory_(this) {}
 
-CdmSessionAdapter::~CdmSessionAdapter() {}
+CdmSessionAdapter::~CdmSessionAdapter() {
+  // Freeing |cdm_| may take a while, so post a task to do it asynchronously.
+  // Note that freeing the CDM will cause any unfullfilled promises to be
+  // rejected, and that needs to be done outside of blink gc (which most
+  // likely triggered our destruction).
+  if (cdm_) {
+    base::ThreadTaskRunnerHandle::Get()->PostTask(
+        FROM_HERE, base::Bind(&ReleaseCdm, cdm_));
+  }
+}
 
 void CdmSessionAdapter::CreateCdm(
     CdmFactory* cdm_factory,
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index 87e5aa7..a6828da 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -85,7 +85,9 @@
 const int kVideoTrackNum = 1;
 const int kAudioTrackNum = 2;
 const int kTextTrackNum = 3;
-const int kAlternateTextTrackNum = 4;
+const int kAlternateVideoTrackNum = 4;
+const int kAlternateAudioTrackNum = 5;
+const int kAlternateTextTrackNum = 6;
 
 const int kAudioBlockDuration = 23;
 const int kVideoBlockDuration = 33;
@@ -265,7 +267,7 @@
       : media_log_(new StrictMock<MockMediaLog>()),
         append_window_end_for_next_append_(kInfiniteDuration()) {
     init_segment_received_cb_ = base::Bind(
-        &ChunkDemuxerTest::InitSegmentReceivedWrapper, base::Unretained(this));
+        &ChunkDemuxerTest::InitSegmentReceived, base::Unretained(this));
     CreateNewDemuxer();
   }
 
@@ -283,31 +285,9 @@
   }
 
   void CreateInitSegment(int stream_flags,
-                         bool is_audio_encrypted,
-                         bool is_video_encrypted,
-                         scoped_ptr<uint8_t[]>* buffer,
-                         int* size) {
-    CreateInitSegmentInternal(
-        stream_flags, is_audio_encrypted, is_video_encrypted, buffer, false,
-        size);
-  }
-
-  void CreateInitSegmentWithAlternateTextTrackNum(int stream_flags,
-                                                  bool is_audio_encrypted,
-                                                  bool is_video_encrypted,
-                                                  scoped_ptr<uint8_t[]>* buffer,
-                                                  int* size) {
-    DCHECK(stream_flags & HAS_TEXT);
-    CreateInitSegmentInternal(
-        stream_flags, is_audio_encrypted, is_video_encrypted, buffer, true,
-        size);
-  }
-
-  void CreateInitSegmentInternal(int stream_flags,
                                  bool is_audio_encrypted,
                                  bool is_video_encrypted,
                                  scoped_ptr<uint8_t[]>* buffer,
-                                 bool use_alternate_text_track_id,
                                  int* size) {
     bool has_audio = (stream_flags & HAS_AUDIO) != 0;
     bool has_video = (stream_flags & HAS_VIDEO) != 0;
@@ -329,6 +309,15 @@
     if (has_audio) {
       audio_track_entry = ReadTestDataFile("webm_vorbis_track_entry");
       tracks_element_size += audio_track_entry->data_size();
+      // Verify that we have TrackNum (0xD7) EBML element at expected offset.
+      DCHECK_EQ(audio_track_entry->data()[9], kWebMIdTrackNumber);
+      // Verify that the size of TrackNum element is 1. The actual value is 0x81
+      // due to how element sizes are encoded in EBML.
+      DCHECK_EQ(audio_track_entry->data()[10], 0x81);
+      // Ensure the track id in TrackNum EBML element matches kAudioTrackNum.
+      DCHECK_EQ(audio_track_entry->data()[11], kAudioTrackNum);
+      if (stream_flags & USE_ALTERNATE_AUDIO_TRACK_ID)
+        audio_track_entry->writable_data()[11] = kAlternateAudioTrackNum;
       if (is_audio_encrypted) {
         audio_content_encodings = ReadTestDataFile("webm_content_encodings");
         tracks_element_size += audio_content_encodings->data_size();
@@ -338,6 +327,15 @@
     if (has_video) {
       video_track_entry = ReadTestDataFile("webm_vp8_track_entry");
       tracks_element_size += video_track_entry->data_size();
+      // Verify that we have TrackNum (0xD7) EBML element at expected offset.
+      DCHECK_EQ(video_track_entry->data()[9], kWebMIdTrackNumber);
+      // Verify that the size of TrackNum element is 1. The actual value is 0x81
+      // due to how element sizes are encoded in EBML.
+      DCHECK_EQ(video_track_entry->data()[10], 0x81);
+      // Ensure the track id in TrackNum EBML element matches kVideoTrackNum.
+      DCHECK_EQ(video_track_entry->data()[11], kVideoTrackNum);
+      if (stream_flags & USE_ALTERNATE_VIDEO_TRACK_ID)
+        video_track_entry->writable_data()[11] = kAlternateVideoTrackNum;
       if (is_video_encrypted) {
         video_content_encodings = ReadTestDataFile("webm_content_encodings");
         tracks_element_size += video_content_encodings->data_size();
@@ -351,7 +349,7 @@
       //
       // This is the track entry for a text track,
       // TrackEntry [AE], size=30
-      //   TrackNum [D7], size=1, val=3 (or 4 if use_alternate_text_track_id)
+      //   TrackNum [D7], size=1, val=3 (or 4 if USE_ALTERNATE_TEXT_TRACK_ID)
       //   TrackUID [73] [C5], size=1, value=3 (must remain constant for same
       //     track, even if TrackNum changes)
       //   TrackType [83], size=1, val=0x11
@@ -360,7 +358,7 @@
                    "\x83\x81\x11\x86\x92"
                    "D_WEBVTT/SUBTITLES";
       DCHECK_EQ(str[4], kTextTrackNum);
-      if (use_alternate_text_track_id)
+      if (stream_flags & USE_ALTERNATE_TEXT_TRACK_ID)
         str[4] = kAlternateTextTrackNum;
 
       const int len = strlen(str);
@@ -454,7 +452,7 @@
     ChunkDemuxer::Status status = demuxer_->AddId(source_id, type, codecs);
     if (status == ChunkDemuxer::kOk)
       demuxer_->SetTracksWatcher(
-          source_id, base::Bind(&ChunkDemuxerTest::InitSegmentReceivedWrapper,
+          source_id, base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
                                 base::Unretained(this)));
     return status;
   }
@@ -468,7 +466,7 @@
     ChunkDemuxer::Status status = demuxer_->AddId(source_id, type, codecs);
     if (status == ChunkDemuxer::kOk)
       demuxer_->SetTracksWatcher(
-          source_id, base::Bind(&ChunkDemuxerTest::InitSegmentReceivedWrapper,
+          source_id, base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
                                 base::Unretained(this)));
     return status;
   }
@@ -496,9 +494,11 @@
     int block_duration = 0;
     switch (track_number) {
       case kVideoTrackNum:
+      case kAlternateVideoTrackNum:
         block_duration = kVideoBlockDuration;
         break;
       case kAudioTrackNum:
+      case kAlternateAudioTrackNum:
         block_duration = kAudioBlockDuration;
         break;
       case kTextTrackNum:  // Fall-through.
@@ -590,7 +590,8 @@
             << " All text blocks must be key frames";
       }
 
-      if (track_number == kAudioTrackNum)
+      if (track_number == kAudioTrackNum ||
+          track_number == kAlternateAudioTrackNum)
         ASSERT_TRUE(block_info.flags & kWebMFlagKeyframe);
 
       blocks->push_back(block_info);
@@ -608,7 +609,8 @@
         cb.SetClusterTimecode(blocks[i].timestamp_in_ms);
 
       if (blocks[i].duration) {
-        if (blocks[i].track_number == kVideoTrackNum) {
+        if (blocks[i].track_number == kVideoTrackNum ||
+            blocks[i].track_number == kAlternateVideoTrackNum) {
           AddVideoBlockGroup(&cb,
                              blocks[i].track_number, blocks[i].timestamp_in_ms,
                              blocks[i].duration, blocks[i].flags);
@@ -798,7 +800,10 @@
   enum StreamFlags {
     HAS_AUDIO = 1 << 0,
     HAS_VIDEO = 1 << 1,
-    HAS_TEXT = 1 << 2
+    HAS_TEXT = 1 << 2,
+    USE_ALTERNATE_AUDIO_TRACK_ID = 1 << 3,
+    USE_ALTERNATE_VIDEO_TRACK_ID = 1 << 4,
+    USE_ALTERNATE_TEXT_TRACK_ID = 1 << 5,
   };
 
   bool InitDemuxer(int stream_flags) {
@@ -849,7 +854,7 @@
     // it.
     if (stream_flags != 0) {
       ExpectInitMediaLogs(stream_flags);
-      EXPECT_CALL(*this, InitSegmentReceived(_));
+      EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     } else {
       // OnNewConfigs() requires at least one audio, video, or text track.
       EXPECT_MEDIA_LOG(StreamParsingFailed());
@@ -891,11 +896,11 @@
     // incompatible with InSequence tests. Refactoring of the duration
     // set expectation to not be added during CreateInitDoneCB() could fix this.
     ExpectInitMediaLogs(audio_flags);
-    EXPECT_CALL(*this, InitSegmentReceived(_));
+    EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     AppendInitSegmentWithSourceId(audio_id, audio_flags);
 
     ExpectInitMediaLogs(video_flags);
-    EXPECT_CALL(*this, InitSegmentReceived(_));
+    EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     AppendInitSegmentWithSourceId(video_id, video_flags);
     return true;
   }
@@ -931,7 +936,7 @@
     // Adding expectation prior to CreateInitDoneCB() here because InSequence
     // tests require init segment received before duration set.
     ExpectInitMediaLogs(HAS_AUDIO | HAS_VIDEO);
-    EXPECT_CALL(*this, InitSegmentReceived(_));
+    EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     demuxer_->Initialize(
         &host_, CreateInitDoneCB(base::TimeDelta::FromMilliseconds(2744),
                                  PIPELINE_OK), true);
@@ -957,7 +962,7 @@
     // media/test/data/bear-320x240-manifest.js which were
     // generated from media/test/data/bear-640x360.webm and
     // media/test/data/bear-320x240.webm respectively.
-    EXPECT_CALL(*this, InitSegmentReceived(_));
+    EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     AppendData(bear2->data(), 4340);
 
     // Append a media segment that goes from [0.527000, 1.014000).
@@ -968,7 +973,7 @@
 
     // Append initialization segment for bear1 & fill gap with [779-1197)
     // segment.
-    EXPECT_CALL(*this, InitSegmentReceived(_));
+    EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     AppendData(bear1->data(), 4370);
     EXPECT_MEDIA_LOG(WebMSimpleBlockDurationEstimated(23));
     EXPECT_MEDIA_LOG(GeneratedSplice(26000, 779000));
@@ -1316,7 +1321,7 @@
 
     // Read a WebM file into memory and send the data to the demuxer.
     scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename);
-    EXPECT_CALL(*this, InitSegmentReceived(_));
+    EXPECT_CALL(*this, InitSegmentReceivedMock(_));
     AppendDataInPieces(buffer->data(), buffer->data_size(), 512);
 
     // Verify that the timestamps on the first few packets match what we
@@ -1353,7 +1358,7 @@
                void(EmeInitDataType init_data_type,
                     const std::vector<uint8_t>& init_data));
 
-  MOCK_METHOD1(InitSegmentReceived, void(scoped_ptr<MediaTracks>&));
+  MOCK_METHOD1(InitSegmentReceivedMock, void(scoped_ptr<MediaTracks>&));
 
   void Seek(base::TimeDelta seek_time) {
     demuxer_->StartWaitingForSeek(seek_time);
@@ -1391,9 +1396,11 @@
   std::map<std::string, base::TimeDelta> timestamp_offset_map_;
 
  public:
-  // A workaround for gtest mocks not allowing moving scoped_ptrs.
-  void InitSegmentReceivedWrapper(scoped_ptr<MediaTracks> tracks) {
-    InitSegmentReceived(tracks);
+  void InitSegmentReceived(scoped_ptr<MediaTracks> tracks) {
+    DCHECK(tracks.get());
+    DCHECK_GT(tracks->tracks().size(), 0u);
+
+    InitSegmentReceivedMock(tracks);
   }
 
  private:
@@ -1558,10 +1565,10 @@
 
   scoped_ptr<uint8_t[]> info_tracks;
   int info_tracks_size = 0;
-  CreateInitSegmentWithAlternateTextTrackNum(HAS_TEXT | HAS_AUDIO | HAS_VIDEO,
-                                             false, false,
-                                             &info_tracks, &info_tracks_size);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  CreateInitSegment(
+      HAS_TEXT | HAS_AUDIO | HAS_VIDEO | USE_ALTERNATE_TEXT_TRACK_ID, false,
+      false, &info_tracks, &info_tracks_size);
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   demuxer_->AppendData(kSourceId, info_tracks.get(), info_tracks_size,
                        append_window_start_for_next_append_,
                        append_window_end_for_next_append_,
@@ -1581,6 +1588,34 @@
   ShutdownDemuxer();
 }
 
+TEST_F(ChunkDemuxerTest, AudioVideoTrackIdsChange) {
+  // Test with 1 audio and 1 video stream. Send a second init segment in which
+  // the audio and video track IDs change. Verify that appended buffers before
+  // and after the second init segment map to the same underlying track buffers.
+  CreateNewDemuxer();
+  ASSERT_TRUE(
+      InitDemuxerWithEncryptionInfo(HAS_AUDIO | HAS_VIDEO, false, false));
+  DemuxerStream* audio_stream = demuxer_->GetStream(DemuxerStream::AUDIO);
+  DemuxerStream* video_stream = demuxer_->GetStream(DemuxerStream::VIDEO);
+  ASSERT_TRUE(audio_stream);
+  ASSERT_TRUE(video_stream);
+
+  AppendMuxedCluster(MuxedStreamInfo(kAudioTrackNum, "0K 23K", 23),
+                     MuxedStreamInfo(kVideoTrackNum, "0K 30", 30));
+  CheckExpectedRanges("{ [0,46) }");
+
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
+  AppendInitSegment(HAS_AUDIO | HAS_VIDEO | USE_ALTERNATE_AUDIO_TRACK_ID |
+                    USE_ALTERNATE_VIDEO_TRACK_ID);
+  AppendMuxedCluster(MuxedStreamInfo(kAlternateAudioTrackNum, "46K 69K", 63),
+                     MuxedStreamInfo(kAlternateVideoTrackNum, "60K", 23));
+  CheckExpectedRanges("{ [0,92) }");
+  CheckExpectedBuffers(audio_stream, "0K 23K 46K 69K");
+  CheckExpectedBuffers(video_stream, "0K 30 60K");
+
+  ShutdownDemuxer();
+}
+
 TEST_F(ChunkDemuxerTest, InitSegmentSetsNeedRandomAccessPointFlag) {
   // Tests that non-key-frames following an init segment are allowed
   // and dropped, as expected if the initialization segment received
@@ -1605,7 +1640,7 @@
       MuxedStreamInfo(kTextTrackNum, "25K 40K"));
   CheckExpectedRanges("{ [23,46) }");
 
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegment(HAS_TEXT | HAS_AUDIO | HAS_VIDEO);
   AppendMuxedCluster(MuxedStreamInfo(kAudioTrackNum, "46K 69K", 23),
                      MuxedStreamInfo(kVideoTrackNum, "60 90K", 30),
@@ -1629,7 +1664,7 @@
   EXPECT_EQ(AddId("video", HAS_VIDEO), ChunkDemuxer::kOk);
 
   ExpectInitMediaLogs(HAS_AUDIO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegmentWithSourceId("audio", HAS_AUDIO);
 
   ShutdownDemuxer();
@@ -1648,7 +1683,7 @@
       .Times(Exactly(1));
 
   ExpectInitMediaLogs(HAS_VIDEO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegmentWithSourceId("video_and_text", HAS_VIDEO | HAS_TEXT);
 
   ShutdownDemuxer();
@@ -2168,7 +2203,7 @@
   dst += cluster_b->size();
 
   ExpectInitMediaLogs(HAS_AUDIO | HAS_VIDEO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendDataInPieces(buffer.get(), buffer_size);
 
   GenerateExpectedReads(0, 9);
@@ -2359,9 +2394,9 @@
   codecs[0] = "vorbis";
   ASSERT_EQ(demuxer_->AddId(kSourceId, "audio/webm", codecs),
             ChunkDemuxer::kOk);
-  demuxer_->SetTracksWatcher(
-      kSourceId, base::Bind(&ChunkDemuxerTest::InitSegmentReceivedWrapper,
-                            base::Unretained(this)));
+  demuxer_->SetTracksWatcher(kSourceId,
+                             base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
+                                        base::Unretained(this)));
 
   // Video track is unexpected per mimetype.
   EXPECT_MEDIA_LOG(InitSegmentMismatchesMimeType("a video", true));
@@ -2380,9 +2415,9 @@
   codecs[0] = "vp8";
   ASSERT_EQ(demuxer_->AddId(kSourceId, "video/webm", codecs),
             ChunkDemuxer::kOk);
-  demuxer_->SetTracksWatcher(
-      kSourceId, base::Bind(&ChunkDemuxerTest::InitSegmentReceivedWrapper,
-                            base::Unretained(this)));
+  demuxer_->SetTracksWatcher(kSourceId,
+                             base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
+                                        base::Unretained(this)));
 
   // Audio track is unexpected per mimetype.
   EXPECT_MEDIA_LOG(InitSegmentMismatchesMimeType("an audio", true));
@@ -2402,9 +2437,9 @@
   codecs[1] = "vp8";
   ASSERT_EQ(demuxer_->AddId(kSourceId, "video/webm", codecs),
             ChunkDemuxer::kOk);
-  demuxer_->SetTracksWatcher(
-      kSourceId, base::Bind(&ChunkDemuxerTest::InitSegmentReceivedWrapper,
-                            base::Unretained(this)));
+  demuxer_->SetTracksWatcher(kSourceId,
+                             base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
+                                        base::Unretained(this)));
 
   // Video track is also expected per mimetype.
   EXPECT_MEDIA_LOG(InitSegmentMismatchesMimeType("a video", false));
@@ -2424,9 +2459,9 @@
   codecs[1] = "vp8";
   ASSERT_EQ(demuxer_->AddId(kSourceId, "video/webm", codecs),
             ChunkDemuxer::kOk);
-  demuxer_->SetTracksWatcher(
-      kSourceId, base::Bind(&ChunkDemuxerTest::InitSegmentReceivedWrapper,
-                            base::Unretained(this)));
+  demuxer_->SetTracksWatcher(kSourceId,
+                             base::Bind(&ChunkDemuxerTest::InitSegmentReceived,
+                                        base::Unretained(this)));
 
   // Audio track is also expected per mimetype.
   EXPECT_MEDIA_LOG(InitSegmentMismatchesMimeType("an audio", false));
@@ -2440,7 +2475,7 @@
   AppendCluster(kDefaultFirstCluster());
 
   // Append another identical initialization segment.
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegment(HAS_AUDIO | HAS_VIDEO);
 
   AppendCluster(kDefaultSecondCluster());
@@ -2496,7 +2531,7 @@
   ASSERT_EQ(AddId(), ChunkDemuxer::kReachedIdLimit);
 
   ExpectInitMediaLogs(HAS_AUDIO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegmentWithSourceId(audio_id, HAS_AUDIO);
 
   // Adding an id after append should fail.
@@ -2740,7 +2775,7 @@
 
   ASSERT_EQ(AddId(kSourceId, HAS_AUDIO), ChunkDemuxer::kOk);
   ExpectInitMediaLogs(HAS_AUDIO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegment(HAS_AUDIO);
 
   // Test a simple cluster.
@@ -2764,7 +2799,7 @@
 
   ASSERT_EQ(AddId(kSourceId, HAS_VIDEO), ChunkDemuxer::kOk);
   ExpectInitMediaLogs(HAS_VIDEO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendInitSegment(HAS_VIDEO);
 
   // Test a simple cluster.
@@ -3439,7 +3474,7 @@
   //        PTS: 353788 (0x000565fc)  [= 90 kHz-Timestamp: 0:00:03.9309]
 
   scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("bear-1280x720.ts");
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendData(kSourceId, buffer->data(), buffer->data_size());
 
   // Confirm we're in the middle of parsing a media segment.
@@ -3487,7 +3522,7 @@
   //        PTS: 353788 (0x000565fc)  [= 90 kHz-Timestamp: 0:00:03.9309]
 
   scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("bear-1280x720.ts");
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   AppendData(kSourceId, buffer->data(), buffer->data_size());
 
   // Confirm we're in the middle of parsing a media segment.
@@ -4098,7 +4133,7 @@
   scoped_refptr<DecoderBuffer> buffer =
       ReadTestDataFile("bear-320x240-audio-only.webm");
   ExpectInitMediaLogs(HAS_AUDIO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   EXPECT_MEDIA_LOG(WebMSimpleBlockDurationEstimated(2));
   AppendDataInPieces(buffer->data(), buffer->data_size(), 128);
 
@@ -4125,7 +4160,7 @@
   scoped_refptr<DecoderBuffer> buffer =
       ReadTestDataFile("bear-320x240-audio-only.webm");
   ExpectInitMediaLogs(HAS_AUDIO);
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   EXPECT_MEDIA_LOG(WebMSimpleBlockDurationEstimated(2));
   AppendDataInPieces(buffer->data(), buffer->data_size(), 512);
   CheckExpectedRanges("{ }");
@@ -4136,7 +4171,7 @@
   // Read a second WebM with a different config in and append the data.
   scoped_refptr<DecoderBuffer> buffer2 =
       ReadTestDataFile("bear-320x240-audio-only-48khz.webm");
-  EXPECT_CALL(*this, InitSegmentReceived(_));
+  EXPECT_CALL(*this, InitSegmentReceivedMock(_));
   EXPECT_MEDIA_LOG(WebMSimpleBlockDurationEstimated(21));
   EXPECT_CALL(host_, SetDuration(_)).Times(AnyNumber());
   ASSERT_TRUE(SetTimestampOffset(kSourceId, duration_1));
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index e9b602fa..c7e00ce5 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1136,8 +1136,11 @@
                                   HashCodecName(GetCodecName(codec_context)));
       detected_audio_track_count++;
 
-      if (audio_stream)
+      if (audio_stream) {
+        MEDIA_LOG(INFO, media_log_) << GetDisplayName()
+                                    << ": skipping extra audio track";
         continue;
+      }
     } else if (codec_type == AVMEDIA_TYPE_VIDEO) {
       // Log the codec detected, whether it is supported or not, and whether or
       // not we have already detected a supported codec in another stream.
@@ -1145,8 +1148,11 @@
                                   HashCodecName(GetCodecName(codec_context)));
       detected_video_track_count++;
 
-      if (video_stream)
+      if (video_stream) {
+        MEDIA_LOG(INFO, media_log_) << GetDisplayName()
+                                    << ": skipping extra video track";
         continue;
+      }
 
 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
       if (stream->codec->codec_id == AV_CODEC_ID_HEVC) {
@@ -1186,6 +1192,16 @@
     if (demuxer_stream.get()) {
       streams_[i] = demuxer_stream.release();
     } else {
+      if (codec_type == AVMEDIA_TYPE_AUDIO) {
+        MEDIA_LOG(INFO, media_log_)
+            << GetDisplayName()
+            << ": skipping invalid or unsupported audio track";
+      } else if (codec_type == AVMEDIA_TYPE_VIDEO) {
+        MEDIA_LOG(INFO, media_log_)
+            << GetDisplayName()
+            << ": skipping invalid or unsupported video track";
+      }
+
       // This AVStream does not successfully convert.
       continue;
     }
diff --git a/mojo/public/cpp/bindings/interface_ptr_set.h b/mojo/public/cpp/bindings/interface_ptr_set.h
index c5d402d..69fc824 100644
--- a/mojo/public/cpp/bindings/interface_ptr_set.h
+++ b/mojo/public/cpp/bindings/interface_ptr_set.h
@@ -10,20 +10,22 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
 #include "mojo/public/cpp/bindings/interface_ptr.h"
 
 namespace mojo {
+namespace internal {
 
-template <typename Interface>
-class InterfacePtrSet {
+template <typename Interface, template <typename> class Ptr>
+class PtrSet {
  public:
-  InterfacePtrSet() {}
-  ~InterfacePtrSet() { CloseAll(); }
+  PtrSet() {}
+  ~PtrSet() { CloseAll(); }
 
-  void AddInterfacePtr(InterfacePtr<Interface> ptr) {
+  void AddPtr(Ptr<Interface> ptr) {
     auto weak_interface_ptr = new Element(std::move(ptr));
     ptrs_.push_back(weak_interface_ptr->GetWeakPtr());
-    ClearNullInterfacePtrs();
+    ClearNullPtrs();
   }
 
   template <typename FunctionType>
@@ -32,7 +34,7 @@
       if (it)
         function(it->get());
     }
-    ClearNullInterfacePtrs();
+    ClearNullPtrs();
   }
 
   void CloseAll() {
@@ -46,7 +48,7 @@
  private:
   class Element {
    public:
-    explicit Element(InterfacePtr<Interface> ptr)
+    explicit Element(Ptr<Interface> ptr)
         : ptr_(std::move(ptr)), weak_ptr_factory_(this) {
       ptr_.set_connection_error_handler([this]() { delete this; });
     }
@@ -61,13 +63,13 @@
     }
 
    private:
-    InterfacePtr<Interface> ptr_;
+    Ptr<Interface> ptr_;
     base::WeakPtrFactory<Element> weak_ptr_factory_;
 
     DISALLOW_COPY_AND_ASSIGN(Element);
   };
 
-  void ClearNullInterfacePtrs() {
+  void ClearNullPtrs() {
     ptrs_.erase(std::remove_if(ptrs_.begin(), ptrs_.end(),
                                [](const base::WeakPtr<Element>& p) {
                                  return p.get() == nullptr;
@@ -78,6 +80,15 @@
   std::vector<base::WeakPtr<Element>> ptrs_;
 };
 
+}  // namespace internal
+
+template <typename Interface>
+using InterfacePtrSet = internal::PtrSet<Interface, InterfacePtr>;
+
+template <typename Interface>
+using AssociatedInterfacePtrSet =
+    internal::PtrSet<Interface, AssociatedInterfacePtr>;
+
 }  // namespace mojo
 
 #endif  // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_SET_H_
diff --git a/mojo/services/tracing/tracing_app.cc b/mojo/services/tracing/tracing_app.cc
index d921a6d9..c38bfad 100644
--- a/mojo/services/tracing/tracing_app.cc
+++ b/mojo/services/tracing/tracing_app.cc
@@ -38,7 +38,7 @@
         new TraceRecorderImpl(GetProxy(&recorder_ptr), sink_.get()));
     provider_ptr->StartTracing(tracing_categories_, std::move(recorder_ptr));
   }
-  provider_ptrs_.AddInterfacePtr(std::move(provider_ptr));
+  provider_ptrs_.AddPtr(std::move(provider_ptr));
   return true;
 }
 
diff --git a/mojo/shell/shell.cc b/mojo/shell/shell.cc
index 2e39000..cfabfd6 100644
--- a/mojo/shell/shell.cc
+++ b/mojo/shell/shell.cc
@@ -639,7 +639,7 @@
     instances.push_back(instance.second->CreateInstanceInfo());
   listener->SetExistingInstances(std::move(instances));
 
-  instance_listeners_.AddInterfacePtr(std::move(listener));
+  instance_listeners_.AddPtr(std::move(listener));
 }
 
 void Shell::CreateShellClientWithFactory(const Identity& source,
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
index 9ea09ff0..e7b1b88 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
@@ -1632,8 +1632,26 @@
   if (AcquireSocketHandle(fd, &handle) == -1)
     return -1;
 
-  errno = EOPNOTSUPP;
-  return -1;
+  int total_len = 0;
+  int out_len = 0;
+  for (size_t i = 0; i < static_cast<size_t>(msg->msg_iovlen); i++) {
+    if (NULL == msg->msg_iov[i].iov_base) {
+      errno = EFAULT;
+      return -1;
+    }
+    // Note that msg_control is not implemented.
+    Error error = handle->RecvFrom(msg->msg_iov[i].iov_base,
+                                   msg->msg_iov[i].iov_len, flags,
+                                   static_cast<struct sockaddr*>(msg->msg_name),
+                                   &msg->msg_namelen, &out_len);
+    if (error != 0) {
+      errno = error;
+      return -1;
+    }
+    total_len += out_len;
+  }
+
+  return static_cast<ssize_t>(total_len);
 }
 
 ssize_t KernelProxy::send(int fd, const void* buf, size_t len, int flags) {
@@ -1702,8 +1720,26 @@
   if (AcquireSocketHandle(fd, &handle) == -1)
     return -1;
 
-  errno = EOPNOTSUPP;
-  return -1;
+  int total_len = 0;
+  int out_len = 0;
+  for (size_t i = 0; i < static_cast<size_t>(msg->msg_iovlen); i++) {
+    if (NULL == msg->msg_iov[i].iov_base) {
+      errno = EFAULT;
+      return -1;
+    }
+    // Note that msg_control is not implemented.
+    Error error = handle->SendTo(msg->msg_iov[i].iov_base,
+                                 msg->msg_iov[i].iov_len, flags,
+                                 static_cast<struct sockaddr*>(msg->msg_name),
+                                 msg->msg_namelen, &out_len);
+    if (error != 0) {
+      errno = error;
+      return -1;
+    }
+    total_len += out_len;
+  }
+
+  return static_cast<ssize_t>(total_len);
 }
 
 int KernelProxy::setsockopt(int fd,
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
index 669031d..d5d80fea 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
@@ -200,6 +200,7 @@
                            int flags,
                            struct sockaddr* addr,
                            socklen_t* addrlen);
+  // recvmsg ignores ancillary data.
   virtual ssize_t recvmsg(int fd, struct msghdr* msg, int flags);
   virtual ssize_t send(int fd, const void* buf, size_t len, int flags);
   virtual ssize_t sendto(int fd,
@@ -208,6 +209,7 @@
                          int flags,
                          const struct sockaddr* addr,
                          socklen_t addrlen);
+  // sendmsg ignores ancillary data.
   virtual ssize_t sendmsg(int fd, const struct msghdr* msg, int flags);
   virtual int setsockopt(int fd,
                          int lvl,
diff --git a/native_client_sdk/src/libraries/nacl_io/ossocket.h b/native_client_sdk/src/libraries/nacl_io/ossocket.h
index f62a420..89e0d3c4 100644
--- a/native_client_sdk/src/libraries/nacl_io/ossocket.h
+++ b/native_client_sdk/src/libraries/nacl_io/ossocket.h
@@ -15,6 +15,14 @@
 #include <poll.h>
 #include <sys/socket.h>
 #include <sys/select.h>
+
+#if defined(_NEWLIB_VERSION)
+struct iovec {
+  void  *iov_base;
+  size_t iov_len;
+};
+#endif
+
 #define PROVIDES_SOCKET_API
 #endif
 
diff --git a/native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc b/native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc
index c13ae0f..e9e6526 100644
--- a/native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc
+++ b/native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc
@@ -300,6 +300,59 @@
   EXPECT_EQ(0, memcmp(outbuf, inbuf, sizeof(outbuf)));
 }
 
+TEST_F(SocketTestUDP, SendmsgRecvmsg) {
+  char outbuf[256];
+  char inbuf[512];
+
+  memset(outbuf, 1, sizeof(outbuf));
+  memset(inbuf, 0, sizeof(inbuf));
+
+  struct iovec outvec[1];
+  outvec[0].iov_base = &outbuf;
+  outvec[0].iov_len = sizeof(outbuf);
+
+  EXPECT_EQ(0, Bind(sock1_, LOCAL_HOST, PORT1));
+  EXPECT_EQ(0, Bind(sock2_, LOCAL_HOST, PORT2));
+
+  sockaddr_in outaddr;
+  socklen_t outaddrlen = sizeof(outaddr);
+  IP4ToSockAddr(LOCAL_HOST, PORT2, &outaddr);
+
+  struct msghdr outmsg;
+  outmsg.msg_name = &outaddr;
+  outmsg.msg_namelen = outaddrlen;
+  outmsg.msg_iov = outvec;
+  outmsg.msg_iovlen = 1;
+
+  int len1 = ki_sendmsg(sock1_, &outmsg, 0);
+  EXPECT_EQ(sizeof(outbuf), len1);
+
+  // Ensure the buffers are different
+  EXPECT_NE(0, memcmp(outbuf, inbuf, sizeof(outbuf)));
+  memset(&outaddr, 0, sizeof(outaddr));
+
+  // Try to receive the previously sent packet
+  sockaddr_in inaddr;
+  socklen_t inaddrlen = sizeof(inaddr);
+
+  struct iovec invec[1];
+  invec[0].iov_base = &inbuf;
+  invec[0].iov_len = sizeof(inbuf);
+
+  struct msghdr inmsg;
+  inmsg.msg_name = &inaddr;
+  inmsg.msg_namelen = inaddrlen;
+  inmsg.msg_iov = invec;
+  inmsg.msg_iovlen = 1;
+
+  int len2 = ki_recvmsg(sock2_, &inmsg, 0);
+  EXPECT_EQ(sizeof(outbuf), len2);
+  EXPECT_EQ(PORT1, htons(static_cast<sockaddr_in *>(inmsg.msg_name)->sin_port));
+
+  // Now they should be the same
+  EXPECT_EQ(0, memcmp(outbuf, inbuf, sizeof(outbuf)));
+}
+
 const size_t kQueueSize = 65536 * 8;
 TEST_F(SocketTestUDP, FullFifo) {
   char outbuf[16 * 1024];
diff --git a/net/android/keystore_openssl.cc b/net/android/keystore_openssl.cc
index 611b926c..f60842c 100644
--- a/net/android/keystore_openssl.cc
+++ b/net/android/keystore_openssl.cc
@@ -17,6 +17,7 @@
 #include "base/android/scoped_java_ref.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
 #include "crypto/openssl_util.h"
 #include "net/android/keystore.h"
 #include "net/android/legacy_openssl.h"
diff --git a/net/cert/internal/verify_certificate_chain.cc b/net/cert/internal/verify_certificate_chain.cc
index 4061790..20fafc5 100644
--- a/net/cert/internal/verify_certificate_chain.cc
+++ b/net/cert/internal/verify_certificate_chain.cc
@@ -501,6 +501,7 @@
 TrustAnchor::~TrustAnchor() {}
 
 TrustStore::TrustStore() {}
+TrustStore::TrustStore(const TrustStore& other) = default;
 TrustStore::~TrustStore() {}
 
 // This implementation is structured to mimic the description of certificate
diff --git a/net/cert/internal/verify_certificate_chain.h b/net/cert/internal/verify_certificate_chain.h
index 8f7e21f8..35a3ebae 100644
--- a/net/cert/internal/verify_certificate_chain.h
+++ b/net/cert/internal/verify_certificate_chain.h
@@ -37,6 +37,7 @@
 // names to trusted public keys.
 struct NET_EXPORT TrustStore {
   TrustStore();
+  TrustStore(const TrustStore& other);
   ~TrustStore();
 
   std::vector<TrustAnchor> anchors;
diff --git a/net/cert/jwk_serializer_nss.cc b/net/cert/jwk_serializer_nss.cc
index 441a98f..426a207 100644
--- a/net/cert/jwk_serializer_nss.cc
+++ b/net/cert/jwk_serializer_nss.cc
@@ -9,6 +9,7 @@
 #include <nss.h>
 
 #include "base/base64url.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "crypto/nss_util.h"
 #include "crypto/scoped_nss_types.h"
diff --git a/net/cert/nss_cert_database.h b/net/cert/nss_cert_database.h
index de783eb4..fe267f9 100644
--- a/net/cert/nss_cert_database.h
+++ b/net/cert/nss_cert_database.h
@@ -13,6 +13,7 @@
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 #include "crypto/scoped_nss_types.h"
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index aaecaf9a..7846bc3 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -591,37 +591,38 @@
                                                          delete_end_);
 }
 
-// Task class for DeleteAllCreatedBetweenForHost call.
-class CookieMonster::DeleteAllCreatedBetweenForHostTask
+// Task class for DeleteAllCreatedBetweenWithPredicate call.
+class CookieMonster::DeleteAllCreatedBetweenWithPredicateTask
     : public DeleteTask<int> {
  public:
-  DeleteAllCreatedBetweenForHostTask(CookieMonster* cookie_monster,
-                                     Time delete_begin,
-                                     Time delete_end,
-                                     const GURL& url,
-                                     const DeleteCallback& callback)
+  DeleteAllCreatedBetweenWithPredicateTask(
+      CookieMonster* cookie_monster,
+      Time delete_begin,
+      Time delete_end,
+      base::Callback<bool(const CanonicalCookie&)> predicate,
+      const DeleteCallback& callback)
       : DeleteTask<int>(cookie_monster, callback),
         delete_begin_(delete_begin),
         delete_end_(delete_end),
-        url_(url) {}
+        predicate_(predicate) {}
 
   // DeleteTask:
   int RunDeleteTask() override;
 
  protected:
-  ~DeleteAllCreatedBetweenForHostTask() override {}
+  ~DeleteAllCreatedBetweenWithPredicateTask() override {}
 
  private:
   Time delete_begin_;
   Time delete_end_;
-  GURL url_;
+  base::Callback<bool(const CanonicalCookie&)> predicate_;
 
-  DISALLOW_COPY_AND_ASSIGN(DeleteAllCreatedBetweenForHostTask);
+  DISALLOW_COPY_AND_ASSIGN(DeleteAllCreatedBetweenWithPredicateTask);
 };
 
-int CookieMonster::DeleteAllCreatedBetweenForHostTask::RunDeleteTask() {
-  return this->cookie_monster()->DeleteAllCreatedBetweenForHost(
-      delete_begin_, delete_end_, url_);
+int CookieMonster::DeleteAllCreatedBetweenWithPredicateTask::RunDeleteTask() {
+  return this->cookie_monster()->DeleteAllCreatedBetweenWithPredicate(
+      delete_begin_, delete_end_, predicate_);
 }
 
 // Task class for DeleteCanonicalCookie call.
@@ -922,16 +923,19 @@
   DoCookieTask(task);
 }
 
-void CookieMonster::DeleteAllCreatedBetweenForHostAsync(
-    const Time delete_begin,
-    const Time delete_end,
-    const GURL& url,
+void CookieMonster::DeleteAllCreatedBetweenWithPredicateAsync(
+    const Time& delete_begin,
+    const Time& delete_end,
+    const base::Callback<bool(const CanonicalCookie&)>& predicate,
     const DeleteCallback& callback) {
-  scoped_refptr<DeleteAllCreatedBetweenForHostTask> task =
-      new DeleteAllCreatedBetweenForHostTask(this, delete_begin, delete_end,
-                                             url, callback);
-
-  DoCookieTaskForURL(task, url);
+  if (predicate.is_null()) {
+    callback.Run(0);
+    return;
+  }
+  scoped_refptr<DeleteAllCreatedBetweenWithPredicateTask> task =
+      new DeleteAllCreatedBetweenWithPredicateTask(
+          this, delete_begin, delete_end, predicate, callback);
+  DoCookieTask(task);
 }
 
 void CookieMonster::DeleteSessionCookiesAsync(
@@ -1124,42 +1128,30 @@
   return num_deleted;
 }
 
-int CookieMonster::DeleteAllCreatedBetweenForHost(const Time delete_begin,
-                                                  const Time delete_end,
-                                                  const GURL& url) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-
-  if (!HasCookieableScheme(url))
-    return 0;
-
-  const std::string host(url.host());
-
-  // We store host cookies in the store by their canonical host name;
-  // domain cookies are stored with a leading ".".  So this is a pretty
-  // simple lookup and per-cookie delete.
+int CookieMonster::DeleteAllCreatedBetweenWithPredicate(
+    const base::Time& delete_begin,
+    const base::Time& delete_end,
+    const base::Callback<bool(const CanonicalCookie&)>& predicate) {
   int num_deleted = 0;
-  for (CookieMapItPair its = cookies_.equal_range(GetKey(host));
-       its.first != its.second;) {
-    CookieMap::iterator curit = its.first;
-    ++its.first;
+  for (CookieMap::iterator it = cookies_.begin(); it != cookies_.end();) {
+    CookieMap::iterator curit = it;
+    CanonicalCookie* cc = curit->second;
+    ++it;
 
-    const CanonicalCookie* const cc = curit->second;
-
-    // Delete only on a match as a host cookie.
-    if (cc->IsHostCookie() && cc->IsDomainMatch(host) &&
-        cc->CreationDate() >= delete_begin &&
+    if (cc->CreationDate() >= delete_begin &&
         // The assumption that null |delete_end| is equivalent to
         // Time::Max() is confusing.
-        (delete_end.is_null() || cc->CreationDate() < delete_end)) {
-      num_deleted++;
-
-      InternalDeleteCookie(curit, true, DELETE_COOKIE_EXPLICIT);
+        (delete_end.is_null() || cc->CreationDate() < delete_end) &&
+        predicate.Run(*cc)) {
+      InternalDeleteCookie(curit, true, /*sync_to_store*/
+                           DELETE_COOKIE_EXPLICIT);
+      ++num_deleted;
     }
   }
+
   return num_deleted;
 }
 
-
 bool CookieMonster::SetCookieWithOptions(const GURL& url,
                                          const std::string& cookie_line,
                                          const CookieOptions& options) {
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 12e04942..4d36c62 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -183,10 +183,10 @@
   void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
                                     const base::Time& delete_end,
                                     const DeleteCallback& callback) override;
-  void DeleteAllCreatedBetweenForHostAsync(
-      const base::Time delete_begin,
-      const base::Time delete_end,
-      const GURL& url,
+  void DeleteAllCreatedBetweenWithPredicateAsync(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const base::Callback<bool(const CanonicalCookie&)>& predicate,
       const DeleteCallback& callback) override;
   void DeleteSessionCookiesAsync(const DeleteCallback&) override;
   void FlushStore(const base::Closure& callback) override;
@@ -223,7 +223,7 @@
   template <typename Result>
   class DeleteTask;
   class DeleteAllCreatedBetweenTask;
-  class DeleteAllCreatedBetweenForHostTask;
+  class DeleteAllCreatedBetweenWithPredicateTask;
   class DeleteCookieTask;
   class DeleteCanonicalCookieTask;
   class GetCookieListForURLWithOptionsTask;
@@ -239,6 +239,9 @@
   // For SetCookieWithCreationTime.
   FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest,
                            TestCookieDeleteAllCreatedBetweenTimestamps);
+  FRIEND_TEST_ALL_PREFIXES(
+      CookieMonsterTest,
+      TestCookieDeleteAllCreatedBetweenTimestampsWithPredicate);
 
   // For gargage collection constants.
   FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest, TestHostGarbageCollection);
@@ -406,9 +409,11 @@
   int DeleteAllCreatedBetween(const base::Time& delete_begin,
                               const base::Time& delete_end);
 
-  int DeleteAllCreatedBetweenForHost(const base::Time delete_begin,
-                                     const base::Time delete_end,
-                                     const GURL& url);
+  // Predicate will be called with the calling thread.
+  int DeleteAllCreatedBetweenWithPredicate(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const base::Callback<bool(const CanonicalCookie&)>& predicate);
 
   bool SetCookieWithOptions(const GURL& url,
                             const std::string& cookie_line,
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 45c3063b..8abff91 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -37,6 +37,7 @@
 
 namespace net {
 
+using CookiePredicate = CookieStore::CookiePredicate;
 using base::Time;
 using base::TimeDelta;
 
@@ -64,12 +65,36 @@
   virtual ~NewMockPersistentCookieStore() {}
 };
 
+// False means 'less than or equal', so we test both ways for full equal.
+MATCHER_P(CookieEquals, expected, "") {
+  return !(arg.FullCompare(expected) || expected.FullCompare(arg));
+}
+
 const char kTopLevelDomainPlus1[] = "http://www.harvard.edu";
 const char kTopLevelDomainPlus2[] = "http://www.math.harvard.edu";
 const char kTopLevelDomainPlus2Secure[] = "https://www.math.harvard.edu";
 const char kTopLevelDomainPlus3[] = "http://www.bourbaki.math.harvard.edu";
 const char kOtherDomain[] = "http://www.mit.edu";
 
+bool AlwaysTrueCookiePredicate(CanonicalCookie* to_save,
+                               const CanonicalCookie& cookie) {
+  if (to_save)
+    *to_save = cookie;
+  return true;
+}
+
+bool AlwaysFalseCookiePredicate(CanonicalCookie* to_save,
+                                const CanonicalCookie& cookie) {
+  if (to_save)
+    *to_save = cookie;
+  return false;
+}
+
+bool CookieValuePredicate(const std::string& true_value,
+                          const CanonicalCookie& cookie) {
+  return cookie.Value() == true_value;
+}
+
 struct CookieMonsterTestTraits {
   static scoped_ptr<CookieStore> Create() {
     return make_scoped_ptr(new CookieMonster(nullptr, nullptr));
@@ -150,23 +175,23 @@
     return callback.result();
   }
 
-  int DeleteAllCreatedBetweenForHost(CookieMonster* cm,
-                                     const base::Time delete_begin,
-                                     const base::Time delete_end,
-                                     const GURL& url) {
+  int DeleteAllCreatedBetweenWithPredicate(CookieMonster* cm,
+                                           const base::Time delete_begin,
+                                           const base::Time delete_end,
+                                           const CookiePredicate& predicate) {
     DCHECK(cm);
     ResultSavingCookieCallback<int> callback;
-    cm->DeleteAllCreatedBetweenForHostAsync(
-        delete_begin, delete_end, url,
+    cm->DeleteAllCreatedBetweenWithPredicateAsync(
+        delete_begin, delete_end, predicate,
         base::Bind(&ResultSavingCookieCallback<int>::Run,
                    base::Unretained(&callback)));
     callback.WaitUntilDone();
     return callback.result();
   }
 
-  // Helper for DeleteAllForHost test; repopulates CM with same layout
+  // Helper for PredicateSeesAllCookies test; repopulates CM with same layout
   // each time.
-  void PopulateCmForDeleteAllForHost(CookieMonster* cm) {
+  void PopulateCmForPredicateCheck(CookieMonster* cm) {
     GURL url_top_level_domain_plus_1(kTopLevelDomainPlus1);
     GURL url_top_level_domain_plus_2(kTopLevelDomainPlus2);
     GURL url_top_level_domain_plus_2_secure(kTopLevelDomainPlus2Secure);
@@ -186,72 +211,72 @@
 
     // Domain cookies
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_1, "dom_1", "X", ".harvard.edu", "/",
+        cm, url_top_level_domain_plus_1, "dom_1", "A", ".harvard.edu", "/",
         base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "dom_2", "X", ".math.harvard.edu", "/",
+        cm, url_top_level_domain_plus_2, "dom_2", "B", ".math.harvard.edu", "/",
         base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_3, "dom_3", "X",
+        cm, url_top_level_domain_plus_3, "dom_3", "C",
         ".bourbaki.math.harvard.edu", "/", base::Time(), base::Time(),
         base::Time(), false, false, CookieSameSite::DEFAULT_MODE,
         COOKIE_PRIORITY_DEFAULT));
 
     // Host cookies
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_1, "host_1", "X", std::string(), "/",
+        cm, url_top_level_domain_plus_1, "host_1", "A", std::string(), "/",
         base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "host_2", "X", std::string(), "/",
+        cm, url_top_level_domain_plus_2, "host_2", "B", std::string(), "/",
         base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_3, "host_3", "X", std::string(), "/",
+        cm, url_top_level_domain_plus_3, "host_3", "C", std::string(), "/",
         base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
 
     // http_only cookie
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "httpo_check", "x", std::string(), "/",
+        cm, url_top_level_domain_plus_2, "httpo_check", "A", std::string(), "/",
         base::Time(), base::Time(), base::Time(), false, true,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
 
     // same-site cookie
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "firstp_check", "x", std::string(),
+        cm, url_top_level_domain_plus_2, "firstp_check", "A", std::string(),
         "/", base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::STRICT_MODE, COOKIE_PRIORITY_DEFAULT));
 
     // Secure cookies
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2_secure, "sec_dom", "X",
+        cm, url_top_level_domain_plus_2_secure, "sec_dom", "A",
         ".math.harvard.edu", "/", base::Time(), base::Time(), base::Time(),
         true, false, CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2_secure, "sec_host", "X", std::string(),
+        cm, url_top_level_domain_plus_2_secure, "sec_host", "B", std::string(),
         "/", base::Time(), base::Time(), base::Time(), true, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
 
     // Domain path cookies
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "dom_path_1", "X", ".math.harvard.edu",
+        cm, url_top_level_domain_plus_2, "dom_path_1", "A", ".math.harvard.edu",
         "/dir1", base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "dom_path_2", "X", ".math.harvard.edu",
+        cm, url_top_level_domain_plus_2, "dom_path_2", "B", ".math.harvard.edu",
         "/dir1/dir2", base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
 
     // Host path cookies
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "host_path_1", "X", std::string(),
+        cm, url_top_level_domain_plus_2, "host_path_1", "A", std::string(),
         "/dir1", base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
     EXPECT_TRUE(this->SetCookieWithDetails(
-        cm, url_top_level_domain_plus_2, "host_path_2", "X", std::string(),
+        cm, url_top_level_domain_plus_2, "host_path_2", "B", std::string(),
         "/dir1/dir2", base::Time(), base::Time(), base::Time(), false, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
 
@@ -667,14 +692,14 @@
   cookie_monster->GetAllCookiesAsync(callback->AsCallback());
 }
 
-ACTION_P5(DeleteAllCreatedBetweenForHostAction,
+ACTION_P5(DeleteAllCreatedBetweenWithPredicateAction,
           cookie_monster,
           delete_begin,
           delete_end,
-          url,
+          predicate,
           callback) {
-  cookie_monster->DeleteAllCreatedBetweenForHostAsync(
-      delete_begin, delete_end, url, callback->AsCallback());
+  cookie_monster->DeleteAllCreatedBetweenWithPredicateAsync(
+      delete_begin, delete_end, predicate, callback->AsCallback());
 }
 
 ACTION_P3(DeleteCanonicalCookieAction, cookie_monster, cookie, callback) {
@@ -1050,20 +1075,22 @@
   loop.Run();
 }
 
-TEST_F(DeferredCookieTaskTest, DeferredDeleteAllForHostCreatedBetweenCookies) {
+TEST_F(DeferredCookieTaskTest,
+       DeferredDeleteAllWithPredicateCreatedBetweenCookies) {
   MockDeleteCallback delete_callback;
 
-  BeginWithForDomainKey(http_www_google_.domain(),
-                        DeleteAllCreatedBetweenForHostAction(
-                            &cookie_monster(), base::Time(), base::Time::Now(),
-                            http_www_google_.url(), &delete_callback));
+  CookiePredicate predicate = base::Bind(&AlwaysTrueCookiePredicate, nullptr);
+
+  BeginWith(DeleteAllCreatedBetweenWithPredicateAction(
+      &cookie_monster(), base::Time(), base::Time::Now(), predicate,
+      &delete_callback));
 
   WaitForLoadCall();
 
   EXPECT_CALL(delete_callback, Invoke(false))
-      .WillOnce(DeleteAllCreatedBetweenForHostAction(
-          &cookie_monster(), base::Time(), base::Time::Now(),
-          http_www_google_.url(), &delete_callback));
+      .WillOnce(DeleteAllCreatedBetweenWithPredicateAction(
+          &cookie_monster(), base::Time(), base::Time::Now(), predicate,
+          &delete_callback));
   base::RunLoop loop;
   EXPECT_CALL(delete_callback, Invoke(false)).WillOnce(QuitRunLoop(&loop));
 
@@ -1187,7 +1214,7 @@
   EXPECT_EQ(0, DeleteAllCreatedBetween(cm.get(), now - TimeDelta::FromDays(99),
                                        Time()));
 
-  // Create 3 cookies with creation date of today, yesterday and the day before.
+  // Create 5 cookies with different creation dates.
   EXPECT_TRUE(
       cm->SetCookieWithCreationTime(http_www_google_.url(), "T-0=Now", now));
   EXPECT_TRUE(cm->SetCookieWithCreationTime(
@@ -1219,6 +1246,90 @@
   EXPECT_EQ(0, DeleteAll(cm.get()));
 }
 
+TEST_F(CookieMonsterTest,
+       TestCookieDeleteAllCreatedBetweenTimestampsWithPredicate) {
+  scoped_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  Time now = Time::Now();
+
+  CanonicalCookie test_cookie;
+  CookiePredicate true_predicate =
+      base::Bind(&AlwaysTrueCookiePredicate, &test_cookie);
+
+  CookiePredicate false_predicate =
+      base::Bind(&AlwaysFalseCookiePredicate, &test_cookie);
+
+  // Nothing has been added so nothing should be deleted.
+  EXPECT_EQ(
+      0, DeleteAllCreatedBetweenWithPredicate(
+             cm.get(), now - TimeDelta::FromDays(99), Time(), true_predicate));
+
+  // Create 5 cookies with different creation dates.
+  EXPECT_TRUE(
+      cm->SetCookieWithCreationTime(http_www_google_.url(), "T-0=Now", now));
+  EXPECT_TRUE(cm->SetCookieWithCreationTime(
+      http_www_google_.url(), "T-1=Yesterday", now - TimeDelta::FromDays(1)));
+  EXPECT_TRUE(cm->SetCookieWithCreationTime(
+      http_www_google_.url(), "T-2=DayBefore", now - TimeDelta::FromDays(2)));
+  EXPECT_TRUE(cm->SetCookieWithCreationTime(
+      http_www_google_.url(), "T-3=ThreeDays", now - TimeDelta::FromDays(3)));
+  EXPECT_TRUE(cm->SetCookieWithCreationTime(
+      http_www_google_.url(), "T-7=LastWeek", now - TimeDelta::FromDays(7)));
+
+  // Try to delete threedays and the daybefore, but we should do nothing due
+  // to the predicate.
+  EXPECT_EQ(0, DeleteAllCreatedBetweenWithPredicate(
+                   cm.get(), now - TimeDelta::FromDays(3),
+                   now - TimeDelta::FromDays(1), false_predicate));
+  // Same as above with a null predicate, so it shouldn't delete anything.
+  EXPECT_EQ(0, DeleteAllCreatedBetweenWithPredicate(
+                   cm.get(), now - TimeDelta::FromDays(3),
+                   now - TimeDelta::FromDays(1), CookiePredicate()));
+  // Same as above, but we use the true_predicate, so it works.
+  EXPECT_EQ(2, DeleteAllCreatedBetweenWithPredicate(
+                   cm.get(), now - TimeDelta::FromDays(3),
+                   now - TimeDelta::FromDays(1), true_predicate));
+
+  // Try to delete yesterday, also make sure that delete_end is not
+  // inclusive.
+  EXPECT_EQ(0,
+            DeleteAllCreatedBetweenWithPredicate(
+                cm.get(), now - TimeDelta::FromDays(2), now, false_predicate));
+  EXPECT_EQ(1,
+            DeleteAllCreatedBetweenWithPredicate(
+                cm.get(), now - TimeDelta::FromDays(2), now, true_predicate));
+  // Check our cookie values.
+  scoped_ptr<CanonicalCookie> expected_cookie =
+      CanonicalCookie::Create(http_www_google_.url(), "T-1=Yesterday",
+                              now - TimeDelta::FromDays(1), CookieOptions());
+  EXPECT_THAT(test_cookie, CookieEquals(*expected_cookie))
+      << "Actual:\n"
+      << test_cookie.DebugString() << "\nExpected:\n"
+      << expected_cookie->DebugString();
+
+  // Make sure the delete_begin is inclusive.
+  EXPECT_EQ(0,
+            DeleteAllCreatedBetweenWithPredicate(
+                cm.get(), now - TimeDelta::FromDays(7), now, false_predicate));
+  EXPECT_EQ(1,
+            DeleteAllCreatedBetweenWithPredicate(
+                cm.get(), now - TimeDelta::FromDays(7), now, true_predicate));
+
+  // Delete the last (now) item.
+  EXPECT_EQ(0, DeleteAllCreatedBetweenWithPredicate(cm.get(), Time(), Time(),
+                                                    false_predicate));
+  EXPECT_EQ(1, DeleteAllCreatedBetweenWithPredicate(cm.get(), Time(), Time(),
+                                                    true_predicate));
+  expected_cookie = CanonicalCookie::Create(http_www_google_.url(), "T-0=Now",
+                                            now, CookieOptions());
+  EXPECT_THAT(test_cookie, CookieEquals(*expected_cookie))
+      << "Actual:\n"
+      << test_cookie.DebugString() << "\nExpected:\n"
+      << expected_cookie->DebugString();
+
+  // Really make sure everything is gone.
+  EXPECT_EQ(0, DeleteAll(cm.get()));
+}
+
 static const int kAccessDelayMs = kLastAccessThresholdMilliseconds + 20;
 
 TEST_F(CookieMonsterTest, TestLastAccess) {
@@ -1651,75 +1762,23 @@
   delegate->reset();
 }
 
-TEST_F(CookieMonsterTest, DeleteAllForHost) {
+TEST_F(CookieMonsterTest, PredicateSeesAllCookies) {
+  const std::string kTrueValue = "A";
   scoped_ptr<CookieMonster> cm(new CookieMonster(nullptr, nullptr));
+  // We test that we can see all cookies with our predicated. This includes
+  // host, http_only, host secure, and all domain cookies.
+  CookiePredicate value_matcher = base::Bind(&CookieValuePredicate, kTrueValue);
 
-  // Test probes:
-  //    * Non-secure URL, mid-level (http://w.c.b.a)
-  //    * Secure URL, mid-level (https://w.c.b.a)
-  //    * URL with path, mid-level (https:/w.c.b.a/dir1/xx)
-  // All three tests should nuke only the midlevel host cookie,
-  // the http_only cookie, the host secure cookie, and the two host
-  // path cookies.  http_only, secure, and paths are ignored by
-  // this call, and domain cookies arent touched.
-  PopulateCmForDeleteAllForHost(cm.get());
-  EXPECT_EQ("dom_1=X; dom_2=X; dom_3=X; host_3=X",
+  PopulateCmForPredicateCheck(cm.get());
+  EXPECT_EQ(7, DeleteAllCreatedBetweenWithPredicate(
+                   cm.get(), base::Time(), base::Time::Now(), value_matcher));
+
+  EXPECT_EQ("dom_2=B; dom_3=C; host_3=C",
             GetCookies(cm.get(), GURL(kTopLevelDomainPlus3)));
-  EXPECT_EQ("dom_1=X; dom_2=X; host_2=X; sec_dom=X; sec_host=X",
+  EXPECT_EQ("dom_2=B; host_2=B; sec_host=B",
             GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure)));
-  EXPECT_EQ("dom_1=X; host_1=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus1)));
-  EXPECT_EQ(
-      "dom_path_2=X; host_path_2=X; dom_path_1=X; host_path_1=X; "
-      "dom_1=X; dom_2=X; host_2=X; sec_dom=X; sec_host=X",
-      GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure +
-                                std::string("/dir1/dir2/xxx"))));
-
-  EXPECT_EQ(6, DeleteAllCreatedBetweenForHost(cm.get(), base::Time(),
-                                              base::Time::Now(),
-                                              GURL(kTopLevelDomainPlus2)));
-  EXPECT_EQ(8U, GetAllCookies(cm.get()).size());
-
-  EXPECT_EQ("dom_1=X; dom_2=X; dom_3=X; host_3=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus3)));
-  EXPECT_EQ("dom_1=X; dom_2=X; sec_dom=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure)));
-  EXPECT_EQ("dom_1=X; host_1=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus1)));
-  EXPECT_EQ("dom_path_2=X; dom_path_1=X; dom_1=X; dom_2=X; sec_dom=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure +
-                                      std::string("/dir1/dir2/xxx"))));
-
-  PopulateCmForDeleteAllForHost(cm.get());
-  EXPECT_EQ(6, DeleteAllCreatedBetweenForHost(
-                   cm.get(), base::Time(), base::Time::Now(),
-                   GURL(kTopLevelDomainPlus2Secure)));
-  EXPECT_EQ(8U, GetAllCookies(cm.get()).size());
-
-  EXPECT_EQ("dom_1=X; dom_2=X; dom_3=X; host_3=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus3)));
-  EXPECT_EQ("dom_1=X; dom_2=X; sec_dom=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure)));
-  EXPECT_EQ("dom_1=X; host_1=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus1)));
-  EXPECT_EQ("dom_path_2=X; dom_path_1=X; dom_1=X; dom_2=X; sec_dom=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure +
-                                      std::string("/dir1/dir2/xxx"))));
-
-  PopulateCmForDeleteAllForHost(cm.get());
-  EXPECT_EQ(6,
-            DeleteAllCreatedBetweenForHost(
-                cm.get(), base::Time(), base::Time::Now(),
-                GURL(kTopLevelDomainPlus2Secure + std::string("/dir1/xxx"))));
-  EXPECT_EQ(8U, GetAllCookies(cm.get()).size());
-
-  EXPECT_EQ("dom_1=X; dom_2=X; dom_3=X; host_3=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus3)));
-  EXPECT_EQ("dom_1=X; dom_2=X; sec_dom=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure)));
-  EXPECT_EQ("dom_1=X; host_1=X",
-            GetCookies(cm.get(), GURL(kTopLevelDomainPlus1)));
-  EXPECT_EQ("dom_path_2=X; dom_path_1=X; dom_1=X; dom_2=X; sec_dom=X",
+  EXPECT_EQ("", GetCookies(cm.get(), GURL(kTopLevelDomainPlus1)));
+  EXPECT_EQ("dom_path_2=B; host_path_2=B; dom_2=B; host_2=B; sec_host=B",
             GetCookies(cm.get(), GURL(kTopLevelDomainPlus2Secure +
                                       std::string("/dir1/dir2/xxx"))));
 }
diff --git a/net/cookies/cookie_store.cc b/net/cookies/cookie_store.cc
index f1dff9a..cb9acc8b4 100644
--- a/net/cookies/cookie_store.cc
+++ b/net/cookies/cookie_store.cc
@@ -4,6 +4,8 @@
 
 #include "net/cookies/cookie_store.h"
 
+#include "base/bind.h"
+#include "base/callback.h"
 #include "net/cookies/cookie_options.h"
 
 namespace net {
diff --git a/net/cookies/cookie_store.h b/net/cookies/cookie_store.h
index f6426c5..fa063636 100644
--- a/net/cookies/cookie_store.h
+++ b/net/cookies/cookie_store.h
@@ -10,7 +10,7 @@
 #include <string>
 #include <vector>
 
-#include "base/callback.h"
+#include "base/callback_forward.h"
 #include "base/callback_list.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
@@ -43,6 +43,7 @@
   typedef base::CallbackList<void(const CanonicalCookie& cookie, bool removed)>
       CookieChangedCallbackList;
   typedef CookieChangedCallbackList::Subscription CookieChangedSubscription;
+  typedef base::Callback<bool(const CanonicalCookie& cookie)> CookiePredicate;
 
   virtual ~CookieStore();
 
@@ -150,21 +151,21 @@
 
   // Deletes all of the cookies that have a creation_date greater than or equal
   // to |delete_begin| and less than |delete_end|
-  // Returns the number of cookies that have been deleted.
+  // Calls |callback| with the number of cookies deleted.
   virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
                                             const base::Time& delete_end,
                                             const DeleteCallback& callback) = 0;
 
-  // Deletes all of the cookies that match the host of the given URL
-  // regardless of path and that have a creation_date greater than or
-  // equal to |delete_begin| and less then |delete_end|. This includes
-  // all http_only and secure cookies, but does not include any domain
-  // cookies that may apply to this host.
-  // Returns the number of cookies deleted.
-  virtual void DeleteAllCreatedBetweenForHostAsync(
-      const base::Time delete_begin,
-      const base::Time delete_end,
-      const GURL& url,
+  // Deletes all of the cookies that match the given predicate and that have a
+  // creation_date greater than or equal to |delete_begin| and less then
+  // |delete_end|. This includes all http_only and secure cookies. Avoid
+  // deleting cookies that could leave websites with a partial set of visible
+  // cookies.
+  // Calls |callback| with the number of cookies deleted.
+  virtual void DeleteAllCreatedBetweenWithPredicateAsync(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const CookiePredicate& predicate,
       const DeleteCallback& callback) = 0;
 
   virtual void DeleteSessionCookiesAsync(const DeleteCallback&) = 0;
diff --git a/net/cookies/cookie_store_test_helpers.cc b/net/cookies/cookie_store_test_helpers.cc
index d2dc210..0606ec8 100644
--- a/net/cookies/cookie_store_test_helpers.cc
+++ b/net/cookies/cookie_store_test_helpers.cc
@@ -189,10 +189,10 @@
   ADD_FAILURE();
 }
 
-void DelayedCookieMonster::DeleteAllCreatedBetweenForHostAsync(
-    const base::Time delete_begin,
-    const base::Time delete_end,
-    const GURL& url,
+void DelayedCookieMonster::DeleteAllCreatedBetweenWithPredicateAsync(
+    const base::Time& delete_begin,
+    const base::Time& delete_end,
+    const base::Callback<bool(const CanonicalCookie&)>& predicate,
     const DeleteCallback& callback) {
   ADD_FAILURE();
 }
diff --git a/net/cookies/cookie_store_test_helpers.h b/net/cookies/cookie_store_test_helpers.h
index 0ebae5b..f0fe1f9 100644
--- a/net/cookies/cookie_store_test_helpers.h
+++ b/net/cookies/cookie_store_test_helpers.h
@@ -79,10 +79,10 @@
                                     const base::Time& delete_end,
                                     const DeleteCallback& callback) override;
 
-  void DeleteAllCreatedBetweenForHostAsync(
-      const base::Time delete_begin,
-      const base::Time delete_end,
-      const GURL& url,
+  void DeleteAllCreatedBetweenWithPredicateAsync(
+      const base::Time& delete_begin,
+      const base::Time& delete_end,
+      const base::Callback<bool(const CanonicalCookie&)>& predicate,
       const DeleteCallback& callback) override;
 
   void DeleteSessionCookiesAsync(const DeleteCallback&) override;
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h
index ce8008f..2d228a9 100644
--- a/net/cookies/cookie_store_unittest.h
+++ b/net/cookies/cookie_store_unittest.h
@@ -242,17 +242,17 @@
     return callback.result();
   }
 
-  int DeleteAllCreatedBetweenForHost(CookieStore* cs,
-                                     const base::Time delete_begin,
-                                     const base::Time delete_end,
-                                     const GURL& url) {
+  int DeleteAllCreatedBetweenWithPredicate(
+      CookieStore* cs,
+      const base::Time delete_begin,
+      const base::Time delete_end,
+      const CookieStore::CookiePredicate& predicate) {
     DCHECK(cs);
     ResultSavingCookieCallback<int> callback;
-    cs->DeleteAllCreatedBetweenForHostAsync(
-        delete_begin, delete_end, url,
-        base::Bind(
-            &ResultSavingCookieCallback<int>::Run,
-            base::Unretained(&callback)));
+    cs->DeleteAllCreatedBetweenWithPredicateAsync(
+        delete_begin, delete_end, predicate,
+        base::Bind(&ResultSavingCookieCallback<int>::Run,
+                   base::Unretained(&callback)));
     callback.WaitUntilDone();
     return callback.result();
   }
@@ -1044,23 +1044,53 @@
                          this->GetCookies(cs, this->http_www_google_.url()));
 }
 
-TYPED_TEST_P(CookieStoreTest, TestDeleteAllCreatedBetweenForHost) {
+namespace {
+static bool CookieHasValue(const std::string& value,
+                           const CanonicalCookie& cookie) {
+  return cookie.Value() == value;
+}
+}
+
+TYPED_TEST_P(CookieStoreTest, TestDeleteAllCreatedBetweenWithPredicate) {
   CookieStore* cs = this->GetCookieStore();
-  GURL url_not_google("http://www.notgoogle.com");
   base::Time now = base::Time::Now();
+  base::Time last_month = base::Time::Now() - base::TimeDelta::FromDays(30);
+  base::Time last_minute = base::Time::Now() - base::TimeDelta::FromMinutes(1);
+  std::string desired_value("B");
 
   // These 3 cookies match the time range and host.
   EXPECT_TRUE(this->SetCookie(cs, this->http_www_google_.url(), "A=B"));
   EXPECT_TRUE(this->SetCookie(cs, this->http_www_google_.url(), "C=D"));
   EXPECT_TRUE(this->SetCookie(cs, this->http_www_google_.url(), "Y=Z"));
-
-  // This cookie does not match host.
-  EXPECT_TRUE(this->SetCookie(cs, url_not_google, "E=F"));
+  EXPECT_TRUE(this->SetCookie(cs, this->https_www_google_.url(), "E=B"));
 
   // Delete cookies.
-  EXPECT_EQ(3,  // Deletes A=B, C=D, Y=Z
-            this->DeleteAllCreatedBetweenForHost(cs, now, base::Time::Max(),
-                                                 this->http_www_google_.url()));
+  EXPECT_EQ(2,  // Deletes A=B, E=B
+            this->DeleteAllCreatedBetweenWithPredicate(
+                cs, now, base::Time::Max(),
+                base::Bind(&CookieHasValue, desired_value)));
+
+  // Check that we deleted the right ones.
+  this->MatchCookieLines("C=D;Y=Z",
+                         this->GetCookies(cs, this->https_www_google_.url()));
+
+  // Now check that using a null predicate will do nothing.
+  EXPECT_EQ(0, this->DeleteAllCreatedBetweenWithPredicate(
+                   cs, now, base::Time::Max(), CookieStore::CookiePredicate()));
+
+  // Finally, check that we don't delete cookies when our time range is off.
+  desired_value = "D";
+  EXPECT_EQ(0, this->DeleteAllCreatedBetweenWithPredicate(
+                   cs, last_month, last_minute,
+                   base::Bind(&CookieHasValue, desired_value)));
+  this->MatchCookieLines("C=D;Y=Z",
+                         this->GetCookies(cs, this->https_www_google_.url()));
+  // Same thing, but with a good time range.
+  EXPECT_EQ(1, this->DeleteAllCreatedBetweenWithPredicate(
+                   cs, now, base::Time::Max(),
+                   base::Bind(&CookieHasValue, desired_value)));
+  this->MatchCookieLines("Y=Z",
+                         this->GetCookies(cs, this->https_www_google_.url()));
 }
 
 TYPED_TEST_P(CookieStoreTest, TestSecure) {
@@ -1372,7 +1402,7 @@
                            TestCookieDeletion,
                            TestDeleteAll,
                            TestDeleteAllCreatedBetween,
-                           TestDeleteAllCreatedBetweenForHost,
+                           TestDeleteAllCreatedBetweenWithPredicate,
                            TestSecure,
                            NetUtilCookieTest,
                            OverwritePersistentCookie,
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index bc7746da..1c33557 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -593,6 +593,9 @@
 }
 
 int HttpStreamParser::DoReadHeadersComplete(int result) {
+  // DoReadHeadersComplete is called with the result of Socket::Read, which is a
+  // (byte_count | error), and returns (error | OK).
+
   result = HandleReadHeaderResult(result);
 
   // TODO(mmenke):  The code below is ugly and hacky.  A much better and more
@@ -617,7 +620,7 @@
     // cases, can normally go to other states after an error reading headers.
     io_state_ = STATE_DONE;
     // Don't let caller see the headers.
-    response_->headers = NULL;
+    response_->headers = nullptr;
     return upload_error_;
   }
 
@@ -635,7 +638,7 @@
   // Nothing else to do.
   io_state_ = STATE_DONE;
   // Don't let caller see the headers.
-  response_->headers = NULL;
+  response_->headers = nullptr;
   return upload_error_;
 }
 
@@ -843,7 +846,7 @@
 
   read_buf_->set_offset(read_buf_->offset() + result);
   DCHECK_LE(read_buf_->offset(), read_buf_->capacity());
-  DCHECK_GE(result,  0);
+  DCHECK_GT(result, 0);
 
   int end_of_header_offset = FindAndParseResponseHeaders();
 
@@ -893,7 +896,7 @@
     read_buf_unused_offset_ = end_of_header_offset;
     // Now waiting for the body to be read.
   }
-  return result;
+  return OK;
 }
 
 int HttpStreamParser::FindAndParseResponseHeaders() {
diff --git a/net/http/http_stream_parser_fuzzer.cc b/net/http/http_stream_parser_fuzzer.cc
index ac85607..19cd9af 100644
--- a/net/http/http_stream_parser_fuzzer.cc
+++ b/net/http/http_stream_parser_fuzzer.cc
@@ -129,7 +129,7 @@
   result = parser.ReadResponseHeaders(callback.callback());
   result = callback.GetResult(result);
 
-  if (result != net::OK)
+  if (result < 0)
     return 0;
 
   while (true) {
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc
index 7936426..1fa10c9 100644
--- a/net/http/http_stream_parser_unittest.cc
+++ b/net/http/http_stream_parser_unittest.cc
@@ -466,7 +466,7 @@
 
   // Attempt to read the response status and the response headers.
   ASSERT_EQ(ERR_IO_PENDING, parser.ReadResponseHeaders(callback.callback()));
-  ASSERT_GT(callback.WaitForResult(), 0);
+  ASSERT_EQ(OK, callback.WaitForResult());
 
   // Finally, attempt to read the response body.
   scoped_refptr<IOBuffer> body_buffer(new IOBuffer(kBodySize));
@@ -536,7 +536,7 @@
 
   // Attempt to read the response status and the response headers.
   ASSERT_EQ(ERR_IO_PENDING, parser.ReadResponseHeaders(callback.callback()));
-  ASSERT_GT(callback.WaitForResult(), 0);
+  ASSERT_EQ(OK, callback.WaitForResult());
 
   // Finally, attempt to read the response body.
   scoped_refptr<IOBuffer> body_buffer(new IOBuffer(kBodySize));
@@ -629,7 +629,7 @@
 
   // Attempt to read the response status and the response headers.
   ASSERT_EQ(ERR_IO_PENDING, parser.ReadResponseHeaders(callback.callback()));
-  ASSERT_GT(callback.WaitForResult(), 0);
+  ASSERT_EQ(OK, callback.WaitForResult());
 
   // Finally, attempt to read the response body.
   scoped_refptr<IOBuffer> body_buffer(new IOBuffer(kBodySize));
@@ -699,7 +699,7 @@
 
   // Attempt to read the response status and the response headers.
   ASSERT_EQ(ERR_IO_PENDING, parser.ReadResponseHeaders(callback.callback()));
-  ASSERT_GT(callback.WaitForResult(), 0);
+  ASSERT_EQ(OK, callback.WaitForResult());
 
   // Finally, attempt to read the response body.
   scoped_refptr<IOBuffer> body_buffer(new IOBuffer(kBodySize));
@@ -768,7 +768,7 @@
 
   // Attempt to read the response status and the response headers.
   ASSERT_EQ(ERR_IO_PENDING, parser.ReadResponseHeaders(callback.callback()));
-  ASSERT_GT(callback.WaitForResult(), 0);
+  ASSERT_EQ(OK, callback.WaitForResult());
 
   // Finally, attempt to read the response body.
   scoped_refptr<IOBuffer> body_buffer(new IOBuffer(kBodySize));
diff --git a/remoting/remoting_test.gypi b/remoting/remoting_test.gypi
index 0d8bc0e..9be0e35 100644
--- a/remoting/remoting_test.gypi
+++ b/remoting/remoting_test.gypi
@@ -143,6 +143,7 @@
       'dependencies': [
         '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
         '../testing/gtest.gyp:gtest',
+        '../third_party/webrtc/modules/modules.gyp:desktop_capture',
         'remoting_test_support',
       ],
       'sources': [
diff --git a/sandbox/mac/policy.cc b/sandbox/mac/policy.cc
index 293255a..d9ff109 100644
--- a/sandbox/mac/policy.cc
+++ b/sandbox/mac/policy.cc
@@ -25,6 +25,9 @@
     : default_rule(POLICY_DENY_ERROR) {
 }
 
+BootstrapSandboxPolicy::BootstrapSandboxPolicy(
+    const BootstrapSandboxPolicy& other) = default;
+
 BootstrapSandboxPolicy::~BootstrapSandboxPolicy() {}
 
 static bool IsRuleValid(const Rule& rule) {
diff --git a/sandbox/mac/policy.h b/sandbox/mac/policy.h
index e500468..4726038 100644
--- a/sandbox/mac/policy.h
+++ b/sandbox/mac/policy.h
@@ -52,6 +52,7 @@
   typedef std::map<std::string, Rule> NamedRules;
 
   BootstrapSandboxPolicy();
+  BootstrapSandboxPolicy(const BootstrapSandboxPolicy& other);
   ~BootstrapSandboxPolicy();
 
   // The default action to take if the server name being looked up is not
diff --git a/sandbox/win/BUILD.gn b/sandbox/win/BUILD.gn
index 13e3cae5..49d1ece 100644
--- a/sandbox/win/BUILD.gn
+++ b/sandbox/win/BUILD.gn
@@ -12,8 +12,6 @@
   sources = [
     "src/acl.cc",
     "src/acl.h",
-    "src/app_container.cc",
-    "src/app_container.h",
     "src/broker_services.cc",
     "src/broker_services.h",
     "src/crosscall_client.h",
@@ -245,7 +243,6 @@
 
 test("sbox_unittests") {
   sources = [
-    "src/app_container_unittest.cc",
     "src/interception_unittest.cc",
     "src/ipc_unittest.cc",
     "src/job_unittest.cc",
diff --git a/sandbox/win/OWNERS b/sandbox/win/OWNERS
index 85047f7..54a76c1 100644
--- a/sandbox/win/OWNERS
+++ b/sandbox/win/OWNERS
@@ -1,3 +1,4 @@
 cpu@chromium.org
+forshaw@chromium.org
 jschuh@chromium.org
 wfh@chromium.org
diff --git a/sandbox/win/sandbox_win.gypi b/sandbox/win/sandbox_win.gypi
index 6c2770e..eeac488 100644
--- a/sandbox/win/sandbox_win.gypi
+++ b/sandbox/win/sandbox_win.gypi
@@ -15,8 +15,6 @@
         'sources': [
             'src/acl.cc',
             'src/acl.h',
-            'src/app_container.cc',
-            'src/app_container.h',
             'src/broker_services.cc',
             'src/broker_services.h',
             'src/crosscall_client.h',
@@ -266,7 +264,6 @@
         '../testing/gtest.gyp:gtest',
       ],
       'sources': [
-        'src/app_container_unittest.cc',
         'src/interception_unittest.cc',
         'src/service_resolver_unittest.cc',
         'src/restricted_token_unittest.cc',
diff --git a/sandbox/win/src/app_container.cc b/sandbox/win/src/app_container.cc
deleted file mode 100644
index 78d949c..0000000
--- a/sandbox/win/src/app_container.cc
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sandbox/win/src/app_container.h"
-
-#include <Sddl.h>
-#include <stddef.h>
-#include <vector>
-
-#include "base/logging.h"
-#include "base/win/startup_information.h"
-#include "sandbox/win/src/internal_types.h"
-
-namespace {
-
-// Converts the passed in sid string to a PSID that must be relased with
-// LocalFree.
-PSID ConvertSid(const base::string16& sid) {
-  PSID local_sid;
-  if (!ConvertStringSidToSid(sid.c_str(), &local_sid))
-    return NULL;
-  return local_sid;
-}
-
-template <typename T>
-T BindFunction(const char* name) {
-  HMODULE module = GetModuleHandle(sandbox::kKerneldllName);
-  FARPROC function = GetProcAddress(module, name);
-  if (!function) {
-    module = GetModuleHandle(sandbox::kKernelBasedllName);
-    function = GetProcAddress(module, name);
-  }
-  return reinterpret_cast<T>(function);
-}
-
-}  // namespace
-
-namespace sandbox {
-
-AppContainerAttributes::AppContainerAttributes() {
-  memset(&capabilities_, 0, sizeof(capabilities_));
-}
-
-AppContainerAttributes::~AppContainerAttributes() {
-  for (size_t i = 0; i < attributes_.size(); i++)
-    LocalFree(attributes_[i].Sid);
-  LocalFree(capabilities_.AppContainerSid);
-}
-
-ResultCode AppContainerAttributes::SetAppContainer(
-    const base::string16& app_container_sid,
-    const std::vector<base::string16>& capabilities) {
-  DCHECK(!capabilities_.AppContainerSid);
-  DCHECK(attributes_.empty());
-  capabilities_.AppContainerSid = ConvertSid(app_container_sid);
-  if (!capabilities_.AppContainerSid)
-    return SBOX_ERROR_INVALID_APP_CONTAINER;
-
-  for (size_t i = 0; i < capabilities.size(); i++)  {
-    SID_AND_ATTRIBUTES sid_and_attributes;
-    sid_and_attributes.Sid = ConvertSid(capabilities[i]);
-    if (!sid_and_attributes.Sid)
-      return SBOX_ERROR_INVALID_CAPABILITY;
-
-    sid_and_attributes.Attributes = SE_GROUP_ENABLED;
-    attributes_.push_back(sid_and_attributes);
-  }
-
-  if (capabilities.size()) {
-    capabilities_.CapabilityCount = static_cast<DWORD>(capabilities.size());
-    capabilities_.Capabilities = &attributes_[0];
-  }
-  return SBOX_ALL_OK;
-}
-
-ResultCode AppContainerAttributes::ShareForStartup(
-      base::win::StartupInformation* startup_information) const {
-  // The only thing we support so far is an AppContainer.
-  if (!capabilities_.AppContainerSid)
-    return SBOX_ERROR_INVALID_APP_CONTAINER;
-
-  if (!startup_information->UpdateProcThreadAttribute(
-           PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES,
-           const_cast<SECURITY_CAPABILITIES*>(&capabilities_),
-           sizeof(capabilities_)))  {
-    DPLOG(ERROR) << "Failed UpdateProcThreadAttribute";
-    return SBOX_ERROR_CANNOT_INIT_APPCONTAINER;
-  }
-  return SBOX_ALL_OK;
-}
-
-bool AppContainerAttributes::HasAppContainer() const {
-  return (capabilities_.AppContainerSid != NULL);
-}
-
-ResultCode CreateAppContainer(const base::string16& sid,
-                              const base::string16& name) {
-  PSID local_sid;
-  if (!ConvertStringSidToSid(sid.c_str(), &local_sid))
-    return SBOX_ERROR_INVALID_APP_CONTAINER;
-
-  typedef HRESULT (WINAPI* AppContainerRegisterSidPtr)(PSID sid,
-                                                       LPCWSTR moniker,
-                                                       LPCWSTR display_name);
-  static AppContainerRegisterSidPtr AppContainerRegisterSid = NULL;
-
-  if (!AppContainerRegisterSid) {
-    AppContainerRegisterSid =
-        BindFunction<AppContainerRegisterSidPtr>("AppContainerRegisterSid");
-  }
-
-  ResultCode operation_result = SBOX_ERROR_GENERIC;
-  if (AppContainerRegisterSid) {
-    HRESULT rv = AppContainerRegisterSid(local_sid, name.c_str(), name.c_str());
-    if (SUCCEEDED(rv))
-      operation_result = SBOX_ALL_OK;
-    else
-      DLOG(ERROR) << "AppContainerRegisterSid error:" << std::hex << rv;
-  }
-  LocalFree(local_sid);
-  return operation_result;
-}
-
-ResultCode DeleteAppContainer(const base::string16& sid) {
-  PSID local_sid;
-  if (!ConvertStringSidToSid(sid.c_str(), &local_sid))
-    return SBOX_ERROR_INVALID_APP_CONTAINER;
-
-  typedef HRESULT (WINAPI* AppContainerUnregisterSidPtr)(PSID sid);
-  static AppContainerUnregisterSidPtr AppContainerUnregisterSid = NULL;
-
-  if (!AppContainerUnregisterSid) {
-    AppContainerUnregisterSid =
-        BindFunction<AppContainerUnregisterSidPtr>("AppContainerUnregisterSid");
-  }
-
-  ResultCode operation_result = SBOX_ERROR_GENERIC;
-  if (AppContainerUnregisterSid) {
-    HRESULT rv = AppContainerUnregisterSid(local_sid);
-    if (SUCCEEDED(rv))
-      operation_result = SBOX_ALL_OK;
-    else
-      DLOG(ERROR) << "AppContainerUnregisterSid error:" << std::hex << rv;
-  }
-  LocalFree(local_sid);
-  return operation_result;
-}
-
-base::string16 LookupAppContainer(const base::string16& sid) {
-  PSID local_sid;
-  if (!ConvertStringSidToSid(sid.c_str(), &local_sid))
-    return base::string16();
-
-  typedef HRESULT (WINAPI* AppContainerLookupMonikerPtr)(PSID sid,
-                                                         LPWSTR* moniker);
-  typedef BOOLEAN (WINAPI* AppContainerFreeMemoryPtr)(void* ptr);
-
-  static AppContainerLookupMonikerPtr AppContainerLookupMoniker = NULL;
-  static AppContainerFreeMemoryPtr AppContainerFreeMemory = NULL;
-
-  if (!AppContainerLookupMoniker || !AppContainerFreeMemory) {
-    AppContainerLookupMoniker =
-        BindFunction<AppContainerLookupMonikerPtr>("AppContainerLookupMoniker");
-    AppContainerFreeMemory =
-        BindFunction<AppContainerFreeMemoryPtr>("AppContainerFreeMemory");
-  }
-
-  if (!AppContainerLookupMoniker || !AppContainerFreeMemory)
-    return base::string16();
-
-  wchar_t* buffer = NULL;
-  HRESULT rv = AppContainerLookupMoniker(local_sid, &buffer);
-  if (FAILED(rv))
-    return base::string16();
-
-  base::string16 name(buffer);
-  if (!AppContainerFreeMemory(buffer))
-    NOTREACHED();
-  return name;
-}
-
-}  // namespace sandbox
diff --git a/sandbox/win/src/app_container.h b/sandbox/win/src/app_container.h
deleted file mode 100644
index e61cba6..0000000
--- a/sandbox/win/src/app_container.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SANDBOX_WIN_SRC_APP_CONTAINER_H_
-#define SANDBOX_WIN_SRC_APP_CONTAINER_H_
-
-#include <windows.h>
-
-#include <vector>
-
-#include "base/macros.h"
-#include "base/strings/string16.h"
-#include "sandbox/win/src/sandbox_types.h"
-
-namespace base {
-namespace win {
-class StartupInformation;
-}
-}
-
-namespace sandbox {
-
-// Maintains an attribute list to be used during creation of a new sandboxed
-// process.
-class AppContainerAttributes {
- public:
-  AppContainerAttributes();
-  ~AppContainerAttributes();
-
-  // Sets the AppContainer and capabilities to be used with the new process.
-  ResultCode SetAppContainer(const base::string16& app_container_sid,
-                             const std::vector<base::string16>& capabilities);
-
-  // Updates the proc_thred attribute list of the provided startup_information
-  // with the app container related data.
-  // WARNING: startup_information just points back to our internal memory, so
-  // the lifetime of this object has to be greater than the lifetime of the
-  // provided startup_information.
-  ResultCode ShareForStartup(
-      base::win::StartupInformation* startup_information) const;
-
-  bool HasAppContainer() const;
-
- private:
-  SECURITY_CAPABILITIES capabilities_;
-  std::vector<SID_AND_ATTRIBUTES> attributes_;
-
-  DISALLOW_COPY_AND_ASSIGN(AppContainerAttributes);
-};
-
-// Creates a new AppContainer on the system. |sid| is the identifier of the new
-// AppContainer, and |name| will be used as both the display name and moniker.
-// This function fails if the OS doesn't support AppContainers, or if there is
-// an AppContainer registered with the same id.
-ResultCode CreateAppContainer(const base::string16& sid,
-                              const base::string16& name);
-
-// Deletes an AppContainer previously created with a successful call to
-// CreateAppContainer.
-ResultCode DeleteAppContainer(const base::string16& sid);
-
-// Retrieves the name associated with the provided AppContainer sid. Returns an
-// empty string if the AppContainer is not registered with the system.
-base::string16 LookupAppContainer(const base::string16& sid);
-
-}  // namespace sandbox
-
-#endif  // SANDBOX_WIN_SRC_APP_CONTAINER_H_
diff --git a/sandbox/win/src/app_container_test.cc b/sandbox/win/src/app_container_test.cc
index ced5cbd..af13bb7 100644
--- a/sandbox/win/src/app_container_test.cc
+++ b/sandbox/win/src/app_container_test.cc
@@ -4,10 +4,6 @@
 
 #include <windows.h>
 
-#define _ATL_NO_EXCEPTIONS
-#include <atlbase.h>
-#include <atlsecurity.h>
-
 #include "base/strings/string16.h"
 #include "base/win/scoped_handle.h"
 #include "base/win/windows_version.h"
@@ -16,141 +12,31 @@
 
 namespace {
 
-const wchar_t kAppContainerName[] = L"sbox_test";
 const wchar_t kAppContainerSid[] =
     L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-"
     L"924012148-2839372144";
 
-const ULONG kSharing = FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE;
-
-HANDLE CreateTaggedEvent(const base::string16& name,
-                         const base::string16& sid) {
-  base::win::ScopedHandle event(CreateEvent(NULL, FALSE, FALSE, name.c_str()));
-  if (!event.IsValid())
-    return NULL;
-
-  wchar_t file_name[MAX_PATH] = {};
-  wchar_t temp_directory[MAX_PATH] = {};
-  GetTempPath(MAX_PATH, temp_directory);
-  GetTempFileName(temp_directory, L"test", 0, file_name);
-
-  base::win::ScopedHandle file;
-  file.Set(CreateFile(file_name, GENERIC_READ | STANDARD_RIGHTS_READ, kSharing,
-                      NULL, OPEN_EXISTING, 0, NULL));
-  DeleteFile(file_name);
-  if (!file.IsValid())
-    return NULL;
-
-  CSecurityDesc sd;
-  if (!AtlGetSecurityDescriptor(file.Get(), SE_FILE_OBJECT, &sd,
-                                OWNER_SECURITY_INFORMATION |
-                                    GROUP_SECURITY_INFORMATION |
-                                    DACL_SECURITY_INFORMATION)) {
-    return NULL;
-  }
-
-  PSID local_sid;
-  if (!ConvertStringSidToSid(sid.c_str(), &local_sid))
-    return NULL;
-
-  CDacl new_dacl;
-  sd.GetDacl(&new_dacl);
-  CSid csid(reinterpret_cast<SID*>(local_sid));
-  new_dacl.AddAllowedAce(csid, EVENT_ALL_ACCESS);
-  if (!AtlSetDacl(event.Get(), SE_KERNEL_OBJECT, new_dacl))
-    event.Close();
-
-  LocalFree(local_sid);
-  return event.IsValid() ? event.Take() : NULL;
-}
-
 }  // namespace
 
 namespace sandbox {
 
-TEST(AppContainerTest, AllowOpenEvent) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  TestRunner runner(JOB_UNPROTECTED, USER_UNPROTECTED, USER_UNPROTECTED);
-
-  const wchar_t capability[] = L"S-1-15-3-12345678-87654321";
-  base::win::ScopedHandle handle(CreateTaggedEvent(L"test", capability));
-  ASSERT_TRUE(handle.IsValid());
-
-  EXPECT_EQ(SBOX_ALL_OK,
-            runner.broker()->InstallAppContainer(kAppContainerSid,
-                                                 kAppContainerName));
-  EXPECT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetCapability(capability));
-  EXPECT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetAppContainer(kAppContainerSid));
-
-  EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"Event_Open f test"));
-
-  runner.SetTestState(BEFORE_REVERT);
-  EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"Event_Open f test"));
-  EXPECT_EQ(SBOX_ALL_OK,
-            runner.broker()->UninstallAppContainer(kAppContainerSid));
-}
-
-TEST(AppContainerTest, DenyOpenEvent) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  TestRunner runner(JOB_UNPROTECTED, USER_UNPROTECTED, USER_UNPROTECTED);
-
-  const wchar_t capability[] = L"S-1-15-3-12345678-87654321";
-  base::win::ScopedHandle handle(CreateTaggedEvent(L"test", capability));
-  ASSERT_TRUE(handle.IsValid());
-
-  EXPECT_EQ(SBOX_ALL_OK,
-            runner.broker()->InstallAppContainer(kAppContainerSid,
-                                                 kAppContainerName));
-  EXPECT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetAppContainer(kAppContainerSid));
-
-  EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open f test"));
-
-  runner.SetTestState(BEFORE_REVERT);
-  EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open f test"));
-  EXPECT_EQ(SBOX_ALL_OK,
-            runner.broker()->UninstallAppContainer(kAppContainerSid));
-}
-
-TEST(AppContainerTest, NoImpersonation) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  TestRunner runner(JOB_UNPROTECTED, USER_LIMITED, USER_LIMITED);
-  EXPECT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetAppContainer(kAppContainerSid));
-}
-
-TEST(AppContainerTest, WantsImpersonation) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  TestRunner runner(JOB_UNPROTECTED, USER_UNPROTECTED, USER_NON_ADMIN);
-  EXPECT_EQ(SBOX_ERROR_CANNOT_INIT_APPCONTAINER,
-            runner.GetPolicy()->SetAppContainer(kAppContainerSid));
-}
-
-TEST(AppContainerTest, RequiresImpersonation) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  TestRunner runner(JOB_UNPROTECTED, USER_RESTRICTED, USER_RESTRICTED);
-  EXPECT_EQ(SBOX_ERROR_CANNOT_INIT_APPCONTAINER,
-            runner.GetPolicy()->SetAppContainer(kAppContainerSid));
-}
-
 TEST(AppContainerTest, DenyOpenEventForLowBox) {
   if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
     return;
 
   TestRunner runner(JOB_UNPROTECTED, USER_UNPROTECTED, USER_UNPROTECTED);
 
-  base::win::ScopedHandle event(CreateEvent(NULL, FALSE, FALSE, L"test"));
-  ASSERT_TRUE(event.IsValid());
-
   EXPECT_EQ(SBOX_ALL_OK, runner.GetPolicy()->SetLowBox(kAppContainerSid));
+  // Run test once, this ensures the app container directory exists, we
+  // ignore the result.
+  runner.RunTest(L"Event_Open f test");
+  base::string16 event_name = L"AppContainerNamedObjects\\";
+  event_name += kAppContainerSid;
+  event_name += L"\\test";
+
+  base::win::ScopedHandle event(
+      ::CreateEvent(NULL, FALSE, FALSE, event_name.c_str()));
+  ASSERT_TRUE(event.IsValid());
 
   EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open f test"));
 }
diff --git a/sandbox/win/src/app_container_unittest.cc b/sandbox/win/src/app_container_unittest.cc
deleted file mode 100644
index 5aa8b5d..0000000
--- a/sandbox/win/src/app_container_unittest.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-
-#include "base/win/windows_version.h"
-#include "sandbox/win/src/app_container.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace sandbox {
-
-// Tests the low level AppContainer interface.
-TEST(AppContainerTest, CreateAppContainer) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  const wchar_t kName[] = L"Test";
-  const wchar_t kValidSid[] = L"S-1-15-2-12345-234-567-890-123-456-789";
-
-  EXPECT_TRUE(LookupAppContainer(kValidSid).empty());
-  EXPECT_EQ(SBOX_ERROR_GENERIC, DeleteAppContainer(kValidSid));
-
-  EXPECT_EQ(SBOX_ALL_OK, CreateAppContainer(kValidSid, kName));
-  EXPECT_EQ(SBOX_ERROR_GENERIC, CreateAppContainer(kValidSid, kName));
-  EXPECT_EQ(kName, LookupAppContainer(kValidSid));
-  EXPECT_EQ(SBOX_ALL_OK, DeleteAppContainer(kValidSid));
-
-  EXPECT_TRUE(LookupAppContainer(kValidSid).empty());
-  EXPECT_EQ(SBOX_ERROR_GENERIC, DeleteAppContainer(kValidSid));
-
-  EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER,
-            CreateAppContainer(L"Foo", kName));
-}
-
-// Tests handling of security capabilities on the attribute list.
-TEST(AppContainerTest, SecurityCapabilities) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return;
-
-  std::unique_ptr<AppContainerAttributes> attributes(
-      new AppContainerAttributes);
-  std::vector<base::string16> capabilities;
-  EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER,
-            attributes->SetAppContainer(L"S-1-foo", capabilities));
-
-  EXPECT_EQ(SBOX_ALL_OK,
-            attributes->SetAppContainer(L"S-1-15-2-12345-234", capabilities));
-  EXPECT_TRUE(attributes->HasAppContainer());
-
-  attributes.reset(new AppContainerAttributes);
-  capabilities.push_back(L"S-1-15-3-12345678-87654321");
-  capabilities.push_back(L"S-1-15-3-1");
-  capabilities.push_back(L"S-1-15-3-2");
-  capabilities.push_back(L"S-1-15-3-3");
-  EXPECT_EQ(SBOX_ALL_OK,
-            attributes->SetAppContainer(L"S-1-15-2-1-2", capabilities));
-  EXPECT_TRUE(attributes->HasAppContainer());
-}
-
-}  // namespace sandbox
diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc
index 838d49468..32b11f8 100644
--- a/sandbox/win/src/broker_services.cc
+++ b/sandbox/win/src/broker_services.cc
@@ -18,7 +18,6 @@
 #include "base/win/scoped_process_information.h"
 #include "base/win/startup_information.h"
 #include "base/win/windows_version.h"
-#include "sandbox/win/src/app_container.h"
 #include "sandbox/win/src/process_mitigations.h"
 #include "sandbox/win/src/sandbox.h"
 #include "sandbox/win/src/sandbox_policy_base.h"
@@ -328,9 +327,6 @@
   // This downcast is safe as long as we control CreatePolicy()
   PolicyBase* policy_base = static_cast<PolicyBase*>(policy);
 
-  if (policy_base->GetAppContainer() && policy_base->GetLowBoxSid())
-    return SBOX_ERROR_BAD_PARAMS;
-
   // Construct the tokens and the job object that we are going to associate
   // with the soon to be created target process.
   base::win::ScopedHandle initial_token;
@@ -368,10 +364,6 @@
   bool inherit_handles = false;
 
   int attribute_count = 0;
-  const AppContainerAttributes* app_container =
-      policy_base->GetAppContainer();
-  if (app_container)
-    ++attribute_count;
 
   size_t mitigations_size;
   ConvertProcessMitigationsToPolicy(policy_base->GetProcessMitigations(),
@@ -408,12 +400,6 @@
   if (!startup_info.InitializeProcThreadAttributeList(attribute_count))
     return SBOX_ERROR_PROC_THREAD_ATTRIBUTES;
 
-  if (app_container) {
-    result = app_container->ShareForStartup(&startup_info);
-    if (SBOX_ALL_OK != result)
-      return result;
-  }
-
   if (mitigations) {
     if (!startup_info.UpdateProcThreadAttribute(
               PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY, &mitigations,
@@ -555,30 +541,4 @@
   return SBOX_ALL_OK;
 }
 
-ResultCode BrokerServicesBase::InstallAppContainer(const wchar_t* sid,
-                                                   const wchar_t* name) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return SBOX_ERROR_UNSUPPORTED;
-
-  base::string16 old_name = LookupAppContainer(sid);
-  if (old_name.empty())
-    return CreateAppContainer(sid, name);
-
-  if (old_name != name)
-    return SBOX_ERROR_INVALID_APP_CONTAINER;
-
-  return SBOX_ALL_OK;
-}
-
-ResultCode BrokerServicesBase::UninstallAppContainer(const wchar_t* sid) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return SBOX_ERROR_UNSUPPORTED;
-
-  base::string16 name = LookupAppContainer(sid);
-  if (name.empty())
-    return SBOX_ERROR_INVALID_APP_CONTAINER;
-
-  return DeleteAppContainer(sid);
-}
-
 }  // namespace sandbox
diff --git a/sandbox/win/src/broker_services.h b/sandbox/win/src/broker_services.h
index 6c8f523..a102ce9 100644
--- a/sandbox/win/src/broker_services.h
+++ b/sandbox/win/src/broker_services.h
@@ -53,9 +53,6 @@
                          PROCESS_INFORMATION* target) override;
   ResultCode WaitForAllTargets() override;
   ResultCode AddTargetPeer(HANDLE peer_process) override;
-  ResultCode InstallAppContainer(const wchar_t* sid,
-                                 const wchar_t* name) override;
-  ResultCode UninstallAppContainer(const wchar_t* sid) override;
 
   // Checks if the supplied process ID matches one of the broker's active
   // target processes
diff --git a/sandbox/win/src/process_policy_test.cc b/sandbox/win/src/process_policy_test.cc
index 2794595..428a40fb 100644
--- a/sandbox/win/src/process_policy_test.cc
+++ b/sandbox/win/src/process_policy_test.cc
@@ -343,6 +343,43 @@
   return SBOX_TEST_SUCCEEDED;
 }
 
+// Creates a process and checks its exit code. Succeeds on exit code 0.
+SBOX_TESTS_COMMAND int Process_CheckExitCode(int argc, wchar_t **argv) {
+  if (argc != 3)
+    return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
+
+  if ((nullptr == argv) || (nullptr == argv[0]) ||
+      (nullptr == argv[1]) || (nullptr == argv[2])) {
+    return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
+  }
+
+  base::string16 path = MakePathToSys(argv[0], false);
+  base::string16 cmdline = argv[1];
+  base::string16 cwd = argv[2];
+
+  STARTUPINFOW si = {sizeof(si)};
+
+  PROCESS_INFORMATION temp_process_info = {};
+  if (!::CreateProcessW(path.c_str(), &cmdline[0], nullptr, nullptr, FALSE, 0,
+                        nullptr, cwd.c_str(), &si, &temp_process_info)) {
+    return SBOX_TEST_FAILED;
+  }
+  base::win::ScopedProcessInformation pi(temp_process_info);
+  DWORD ret = WaitForSingleObject(pi.process_handle(), 1000);
+  if (ret != WAIT_OBJECT_0)
+    return SBOX_TEST_FAILED;
+
+  DWORD exit_code;
+  if (!GetExitCodeProcess(pi.process_handle(), &exit_code))
+    return SBOX_TEST_FAILED;
+
+  if (exit_code != 0)
+    return SBOX_TEST_FAILED;
+
+  return SBOX_TEST_SUCCEEDED;
+}
+
+
 TEST(ProcessPolicyTest, TestAllAccess) {
   // Check if the "all access" rule fails to be added when the token is too
   // powerful.
@@ -420,6 +457,27 @@
             runner.RunTest(L"Process_Crash"));
 }
 
+TEST(ProcessPolicyTest, CreateProcessWithCWD) {
+  TestRunner runner;
+  base::string16 sys_path = MakePathToSys(L"", false);
+  while (!sys_path.empty() && sys_path.back() == L'\\')
+    sys_path.erase(sys_path.length() - 1);
+
+  base::string16 exe_path = MakePathToSys(L"cmd.exe", false);
+  base::string16 cmd_line = L"\"/c if \\\"%CD%\\\" NEQ \\\"" +
+                            sys_path + L"\\\" exit 1\"";
+
+  ASSERT_TRUE(!exe_path.empty());
+  EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_PROCESS,
+                             TargetPolicy::PROCESS_MIN_EXEC,
+                             exe_path.c_str()));
+
+  base::string16 command = L"Process_CheckExitCode cmd.exe " +
+                           cmd_line + L" " + sys_path;
+  EXPECT_EQ(SBOX_TEST_SUCCEEDED,
+            runner.RunTest(command.c_str()));
+}
+
 TEST(ProcessPolicyTest, OpenToken) {
   TestRunner runner;
   EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"Process_OpenToken"));
diff --git a/sandbox/win/src/process_thread_dispatcher.cc b/sandbox/win/src/process_thread_dispatcher.cc
index 886017c9..89bf5a43 100644
--- a/sandbox/win/src/process_thread_dispatcher.cc
+++ b/sandbox/win/src/process_thread_dispatcher.cc
@@ -120,7 +120,7 @@
 
   static const IPCCall create_params = {
       {IPC_CREATEPROCESSW_TAG,
-       {WCHAR_TYPE, WCHAR_TYPE, WCHAR_TYPE, INOUTPTR_TYPE}},
+       {WCHAR_TYPE, WCHAR_TYPE, WCHAR_TYPE, WCHAR_TYPE, INOUTPTR_TYPE}},
       reinterpret_cast<CallbackGeneric>(
           &ThreadProcessDispatcher::CreateProcessW)};
 
@@ -218,6 +218,7 @@
 bool ThreadProcessDispatcher::CreateProcessW(IPCInfo* ipc, base::string16* name,
                                              base::string16* cmd_line,
                                              base::string16* cur_dir,
+                                             base::string16* target_cur_dir,
                                              CountedBuffer* info) {
   if (sizeof(PROCESS_INFORMATION) != info->Size())
     return false;
@@ -250,7 +251,7 @@
   // If our logic was wrong, at least we wont allow create a random process.
   DWORD ret = ProcessPolicy::CreateProcessWAction(eval, *ipc->client_info,
                                                   exe_name, *cmd_line,
-                                                  proc_info);
+                                                  *target_cur_dir, proc_info);
 
   ipc->return_info.win32_result = ret;
   return true;
diff --git a/sandbox/win/src/process_thread_dispatcher.h b/sandbox/win/src/process_thread_dispatcher.h
index d39ac65d..da91405f 100644
--- a/sandbox/win/src/process_thread_dispatcher.h
+++ b/sandbox/win/src/process_thread_dispatcher.h
@@ -48,6 +48,7 @@
                       base::string16* name,
                       base::string16* cmd_line,
                       base::string16* cur_dir,
+                      base::string16* target_cur_dir,
                       CountedBuffer* info);
 
   // Processes IPC requests coming from calls to CreateThread() in the target.
diff --git a/sandbox/win/src/process_thread_interception.cc b/sandbox/win/src/process_thread_interception.cc
index 9cb20b9d..29ab727 100644
--- a/sandbox/win/src/process_thread_interception.cc
+++ b/sandbox/win/src/process_thread_interception.cc
@@ -296,10 +296,10 @@
 
     const wchar_t* cur_dir = NULL;
 
-    wchar_t current_directory[MAX_PATH];
-    DWORD result = ::GetCurrentDirectory(MAX_PATH, current_directory);
+    wchar_t this_current_directory[MAX_PATH];
+    DWORD result = ::GetCurrentDirectory(MAX_PATH, this_current_directory);
     if (0 != result && result < MAX_PATH)
-      cur_dir = current_directory;
+      cur_dir = this_current_directory;
 
     SharedMemIPCClient ipc(memory);
     CrossCallReturn answer = {0};
@@ -308,7 +308,8 @@
                                  sizeof(PROCESS_INFORMATION));
 
     ResultCode code = CrossCall(ipc, IPC_CREATEPROCESSW_TAG, application_name,
-                                command_line, cur_dir, proc_info, &answer);
+                                command_line, cur_dir, current_directory,
+                                proc_info, &answer);
     if (SBOX_ALL_OK != code)
       break;
 
@@ -359,6 +360,7 @@
     // Convert the input params to unicode.
     UNICODE_STRING *cmd_unicode = NULL;
     UNICODE_STRING *app_unicode = NULL;
+    UNICODE_STRING *cwd_unicode = NULL;
     if (command_line) {
       cmd_unicode = AnsiToUnicode(command_line);
       if (!cmd_unicode)
@@ -373,14 +375,24 @@
       }
     }
 
+    if (current_directory) {
+      cwd_unicode = AnsiToUnicode(current_directory);
+      if (!cwd_unicode) {
+        operator delete(cmd_unicode, NT_ALLOC);
+        operator delete(app_unicode, NT_ALLOC);
+        break;
+      }
+    }
+
     const wchar_t* cmd_line = cmd_unicode ? cmd_unicode->Buffer : NULL;
     const wchar_t* app_name = app_unicode ? app_unicode->Buffer : NULL;
+    const wchar_t* cwd = cwd_unicode ? cwd_unicode->Buffer : NULL;
     const wchar_t* cur_dir = NULL;
 
-    wchar_t current_directory[MAX_PATH];
-    DWORD result = ::GetCurrentDirectory(MAX_PATH, current_directory);
+    wchar_t target_current_directory[MAX_PATH];
+    DWORD result = ::GetCurrentDirectory(MAX_PATH, target_current_directory);
     if (0 != result && result < MAX_PATH)
-      cur_dir = current_directory;
+      cur_dir = target_current_directory;
 
     SharedMemIPCClient ipc(memory);
     CrossCallReturn answer = {0};
@@ -389,10 +401,11 @@
                                  sizeof(PROCESS_INFORMATION));
 
     ResultCode code = CrossCall(ipc, IPC_CREATEPROCESSW_TAG, app_name,
-                                cmd_line, cur_dir, proc_info, &answer);
+                                cmd_line, cur_dir, cwd, proc_info, &answer);
 
     operator delete(cmd_unicode, NT_ALLOC);
     operator delete(app_unicode, NT_ALLOC);
+    operator delete(cwd_unicode, NT_ALLOC);
 
     if (SBOX_ALL_OK != code)
       break;
diff --git a/sandbox/win/src/process_thread_policy.cc b/sandbox/win/src/process_thread_policy.cc
index 40b2453..3cdaeb85 100644
--- a/sandbox/win/src/process_thread_policy.cc
+++ b/sandbox/win/src/process_thread_policy.cc
@@ -218,6 +218,7 @@
                                           const ClientInfo& client_info,
                                           const base::string16 &app_name,
                                           const base::string16 &command_line,
+                                          const base::string16 &current_dir,
                                           PROCESS_INFORMATION* process_info) {
   // The only action supported is ASK_BROKER which means create the process.
   if (GIVE_ALLACCESS != eval_result && GIVE_READONLY != eval_result) {
@@ -230,10 +231,15 @@
       _wcsdup(command_line.c_str()));
 
   BOOL should_give_full_access = (GIVE_ALLACCESS == eval_result);
+
+  const wchar_t* cwd = current_dir.c_str();
+  if (current_dir.empty())
+    cwd = NULL;
+
   if (!CreateProcessExWHelper(client_info.process, should_give_full_access,
                               app_name.c_str(), cmd_line.get(), NULL, NULL,
-                              FALSE, 0, NULL, NULL, &startup_info,
-                              process_info)) {
+                              FALSE, 0, NULL, cwd,
+                              &startup_info, process_info)) {
     return ERROR_ACCESS_DENIED;
   }
   return ERROR_SUCCESS;
diff --git a/sandbox/win/src/process_thread_policy.h b/sandbox/win/src/process_thread_policy.h
index 0cfa451..bc7c0f7 100644
--- a/sandbox/win/src/process_thread_policy.h
+++ b/sandbox/win/src/process_thread_policy.h
@@ -71,10 +71,12 @@
   // 'eval_result' : The desired policy action to accomplish.
   // 'app_name' : The full path of the process to be created.
   // 'command_line' : The command line passed to the created process.
+  // 'current_dir' : The CWD with which to spawn the child process.
   static DWORD CreateProcessWAction(EvalResult eval_result,
                                     const ClientInfo& client_info,
                                     const base::string16 &app_name,
                                     const base::string16 &command_line,
+                                    const base::string16 &current_dir,
                                     PROCESS_INFORMATION* process_info);
 
   // Processes a 'CreateThread()' request from the target.
diff --git a/sandbox/win/src/sandbox.h b/sandbox/win/src/sandbox.h
index 193605d..915a697 100644
--- a/sandbox/win/src/sandbox.h
+++ b/sandbox/win/src/sandbox.h
@@ -91,15 +91,6 @@
   //   If the return is ERROR_GENERIC, you can call ::GetLastError() to get
   //   more information.
   virtual ResultCode AddTargetPeer(HANDLE peer_process) = 0;
-
-  // Install the AppContainer with the specified sid an name. Returns ALL_OK if
-  // successful or an error code if the AppContainer cannot be installed.
-  virtual ResultCode InstallAppContainer(const wchar_t* sid,
-                                         const wchar_t* name) = 0;
-
-  // Removes from the system the AppContainer with the specified sid.
-  // Returns ALL_OK if successful or an error code otherwise.
-  virtual ResultCode UninstallAppContainer(const wchar_t* sid) = 0;
 };
 
 // TargetServices models the current process from the perspective
diff --git a/sandbox/win/src/sandbox_policy.h b/sandbox/win/src/sandbox_policy.h
index edac55ec..3dec071 100644
--- a/sandbox/win/src/sandbox_policy.h
+++ b/sandbox/win/src/sandbox_policy.h
@@ -173,17 +173,6 @@
   // than the current level, the sandbox will fail to start.
   virtual ResultCode SetDelayedIntegrityLevel(IntegrityLevel level) = 0;
 
-  // Sets the AppContainer to be used for the sandboxed process. Any capability
-  // to be enabled for the process should be added before this method is invoked
-  // (by calling SetCapability() as many times as needed).
-  // The desired AppContainer must be already installed on the system, otherwise
-  // launching the sandboxed process will fail. See BrokerServices for details
-  // about installing an AppContainer.
-  // Note that currently Windows restricts the use of impersonation within
-  // AppContainers, so this function is incompatible with the use of an initial
-  // token.
-  virtual ResultCode SetAppContainer(const wchar_t* sid) = 0;
-
   // Sets a capability to be enabled for the sandboxed process' AppContainer.
   virtual ResultCode SetCapability(const wchar_t* sid) = 0;
 
diff --git a/sandbox/win/src/sandbox_policy_base.cc b/sandbox/win/src/sandbox_policy_base.cc
index a3af98d..98cbff6 100644
--- a/sandbox/win/src/sandbox_policy_base.cc
+++ b/sandbox/win/src/sandbox_policy_base.cc
@@ -14,7 +14,6 @@
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/win/windows_version.h"
-#include "sandbox/win/src/app_container.h"
 #include "sandbox/win/src/filesystem_policy.h"
 #include "sandbox/win/src/handle_policy.h"
 #include "sandbox/win/src/interception.h"
@@ -312,30 +311,6 @@
   return SBOX_ALL_OK;
 }
 
-ResultCode PolicyBase::SetAppContainer(const wchar_t* sid) {
-  if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
-    return SBOX_ALL_OK;
-
-  // SetLowBox and SetAppContainer are mutually exclusive.
-  if (lowbox_sid_)
-    return SBOX_ERROR_UNSUPPORTED;
-
-  // Windows refuses to work with an impersonation token for a process inside
-  // an AppContainer. If the caller wants to use a more privileged initial
-  // token, or if the lockdown level will prevent the process from starting,
-  // we have to fail the operation.
-  if (lockdown_level_ < USER_LIMITED || lockdown_level_ != initial_level_)
-    return SBOX_ERROR_CANNOT_INIT_APPCONTAINER;
-
-  DCHECK(!appcontainer_list_.get());
-  appcontainer_list_.reset(new AppContainerAttributes);
-  ResultCode rv = appcontainer_list_->SetAppContainer(sid, capabilities_);
-  if (rv != SBOX_ALL_OK)
-    return rv;
-
-  return SBOX_ALL_OK;
-}
-
 ResultCode PolicyBase::SetCapability(const wchar_t* sid) {
   capabilities_.push_back(sid);
   return SBOX_ALL_OK;
@@ -345,12 +320,7 @@
   if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
     return SBOX_ERROR_UNSUPPORTED;
 
-  // SetLowBox and SetAppContainer are mutually exclusive.
-  if (appcontainer_list_.get())
-    return SBOX_ERROR_UNSUPPORTED;
-
   DCHECK(sid);
-
   if (lowbox_sid_)
     return SBOX_ERROR_BAD_PARAMS;
 
@@ -462,11 +432,6 @@
 ResultCode PolicyBase::MakeTokens(base::win::ScopedHandle* initial,
                                   base::win::ScopedHandle* lockdown,
                                   base::win::ScopedHandle* lowbox) {
-  if (appcontainer_list_.get() && appcontainer_list_->HasAppContainer() &&
-      lowbox_sid_) {
-    return SBOX_ERROR_BAD_PARAMS;
-  }
-
   // Create the 'naked' token. This will be the permanent token associated
   // with the process and therefore with any thread that is not impersonating.
   DWORD result =
@@ -495,19 +460,6 @@
     alternate_desktop_integrity_level_label_ = integrity_level_;
   }
 
-  // We are maintaining two mutually exclusive approaches. One is to start an
-  // AppContainer process through StartupInfoEx and other is replacing
-  // existing token with LowBox token after process creation.
-  if (appcontainer_list_.get() && appcontainer_list_->HasAppContainer()) {
-    // Windows refuses to work with an impersonation token. See SetAppContainer
-    // implementation for more details.
-    if (lockdown_level_ < USER_LIMITED || lockdown_level_ != initial_level_)
-      return SBOX_ERROR_CANNOT_INIT_APPCONTAINER;
-
-    *initial = base::win::ScopedHandle();
-    return SBOX_ALL_OK;
-  }
-
   if (lowbox_sid_) {
     NtCreateLowBoxToken CreateLowBoxToken = NULL;
     ResolveNTFunctionPtr("NtCreateLowBoxToken", &CreateLowBoxToken);
@@ -547,13 +499,6 @@
   return SBOX_ALL_OK;
 }
 
-const AppContainerAttributes* PolicyBase::GetAppContainer() const {
-  if (!appcontainer_list_.get() || !appcontainer_list_->HasAppContainer())
-    return NULL;
-
-  return appcontainer_list_.get();
-}
-
 PSID PolicyBase::GetLowBoxSid() const {
   return lowbox_sid_;
 }
diff --git a/sandbox/win/src/sandbox_policy_base.h b/sandbox/win/src/sandbox_policy_base.h
index a2704a0..22004be 100644
--- a/sandbox/win/src/sandbox_policy_base.h
+++ b/sandbox/win/src/sandbox_policy_base.h
@@ -28,7 +28,6 @@
 
 namespace sandbox {
 
-class AppContainerAttributes;
 class LowLevelPolicy;
 class TargetProcess;
 struct PolicyGlobal;
@@ -53,7 +52,6 @@
   ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) override;
   IntegrityLevel GetIntegrityLevel() const override;
   ResultCode SetDelayedIntegrityLevel(IntegrityLevel integrity_level) override;
-  ResultCode SetAppContainer(const wchar_t* sid) override;
   ResultCode SetCapability(const wchar_t* sid) override;
   ResultCode SetLowBox(const wchar_t* sid) override;
   ResultCode SetProcessMitigations(MitigationFlags flags) override;
@@ -84,8 +82,6 @@
                         base::win::ScopedHandle* lockdown,
                         base::win::ScopedHandle* lowbox);
 
-  const AppContainerAttributes* GetAppContainer() const;
-
   PSID GetLowBoxSid() const;
 
   // Adds a target process to the internal list of targets. Internally a
@@ -155,7 +151,6 @@
   // given type.
   HandleCloser handle_closer_;
   std::vector<base::string16> capabilities_;
-  std::unique_ptr<AppContainerAttributes> appcontainer_list_;
   PSID lowbox_sid_;
   base::win::ScopedHandle lowbox_directory_;
   std::unique_ptr<Dispatcher> dispatcher_;
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 91e9be4..ecb0d00 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -15,17 +15,17 @@
 skia_support_gpu = !is_ios
 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview)
 
-# The list of Skia defines that are to be set for blink.
-gypi_blink_skia_defines =
+# The list of Skia defines that are to be set for chromium.
+gypi_chromium_skia_defines =
     exec_script("//build/gypi_to_gn.py",
                 [
                   rebase_path(
-                      "//third_party/WebKit/public/blink_skia_config.gypi"),
+                      "//skia/chromium_skia_defines.gypi"),
                   "--replace=<(skia_include_path)=//third_party/skia/include",
                   "--replace=<(skia_src_path)=//third_party/skia/src",
                 ],
                 "scope",
-                [ "//third_party/WebKit/public/blink_skia_config.gypi" ])
+                [ "//skia/chromium_skia_defines.gypi" ])
 
 # The list of Skia defines that are to be set for chromium.
 gypi_skia_defines =
@@ -137,7 +137,7 @@
     "//third_party/skia/include/utils",
   ]
 
-  defines = gypi_blink_skia_defines.blink_skia_defines
+  defines = gypi_chromium_skia_defines.chromium_skia_defines
   defines += gypi_skia_defines.skia_for_chromium_defines
 
   defines += []
diff --git a/skia/chromium_skia_defines.gypi b/skia/chromium_skia_defines.gypi
new file mode 100644
index 0000000..2d7b97f
--- /dev/null
+++ b/skia/chromium_skia_defines.gypi
@@ -0,0 +1,24 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+  'variables': {
+
+    # This is a place for defines which will hold out Skia changes.
+    #
+    # When Skia needs to make a change which will affect Chromium, a define may
+    # be added here, the Skia change made behind this define, then Skia rolled
+    # into Chromium. At this point the Chromium side change can be made while
+    # also removing the define. After this Skia can remove the code behind the
+    # now no longer needed define.
+    #
+    # Examples of these sorts of changes are Skia API changes and Skia changes
+    # which will affect blink baselines.
+    #
+    # The intent is that the defines here are transient. Every effort should be
+    # made to remove these defines as soon as practical. This is in contrast to
+    # defines in SkUserConfig.h which are normally more permanent.
+    'chromium_skia_defines': [
+    ],
+  },
+}
diff --git a/skia/skia_common.gypi b/skia/skia_common.gypi
index 594a6468..21801cc5 100644
--- a/skia/skia_common.gypi
+++ b/skia/skia_common.gypi
@@ -6,8 +6,8 @@
 # Skia build.
 {
   'includes': [
-    # blink_skia_config.gypi defines blink_skia_defines
-    '../third_party/WebKit/public/blink_skia_config.gypi',
+    # chromium_skia_defines.gypi defines chromium_skia_defines
+    'chromium_skia_defines.gypi',
 
     # skia_for_chromium_defines.gypi defines skia_for_chromium_defines
     '../third_party/skia/gyp/skia_for_chromium_defines.gypi',
@@ -131,9 +131,9 @@
     'skia_export_defines': [
       'SK_SUPPORT_GPU=<(skia_support_gpu)',
 
-      # This variable contains additional defines, specified in blink's
-      # blink_skia_config.gypi file.
-      '<@(blink_skia_defines)',
+      # This variable contains additional defines, specified in the
+      # chromium_skia_defines.gypi file.
+      '<@(chromium_skia_defines)',
 
       # This variable contains additional defines, specified in skia's
       # skia_for_chromium_defines.gypi file.
diff --git a/sync/PRESUBMIT.py b/sync/PRESUBMIT.py
new file mode 100644
index 0000000..9173777
--- /dev/null
+++ b/sync/PRESUBMIT.py
@@ -0,0 +1,359 @@
+# Copyright (c) 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.
+
+"""Presubmit script for sync
+This checks that ModelTypeInfo entries in model_type.cc follow conventions.
+See CheckModelTypeInfoMap or model_type.cc for more detail on the rules.
+"""
+
+import os
+
+# Some definitions don't follow all the conventions we want to enforce.
+# It's either difficult or impossible to fix this, so we ignore the problem(s).
+GRANDFATHERED_MODEL_TYPES = [
+  'UNSPECIFIED',  # Doesn't have a root tag or notification type.
+  'TOP_LEVEL_FOLDER',  # Doesn't have a root tag or notification type.
+  'AUTOFILL_WALLET_DATA',  # Root tag and model type string lack DATA suffix.
+  'APP_SETTINGS',  # Model type string has inconsistent capitalization.
+  'EXTENSION_SETTINGS',  # Model type string has inconsistent capitalization.
+  'SUPERVISED_USER_SETTINGS',  # Root tag and model type string replace
+                 # 'Supervised' with 'Managed'
+  'SUPERVISED_USERS',  # See previous.
+  'SUPERVISED_USER_WHITELISTS',  # See previous.
+  'SUPERVISED_USER_SHARED_SETTINGS',  # See previous.
+  'PROXY_TABS',  # Doesn't have a root tag or notification type.
+  'NIGORI']  # Model type string is 'encryption keys'.
+
+# Number of distinct fields in a map entry; used to create
+# sets that check for uniqueness.
+MAP_ENTRY_FIELD_COUNT = 6
+
+# String that precedes the ModelType when referencing the
+# proto field number enum e.g.
+# sync_pb::EntitySpecifics::kManagedUserFieldNumber.
+# Used to map from enum references to the ModelType.
+FIELD_NUMBER_PREFIX = 'sync_pb::EntitySpecifics::k'
+
+# Start and end regexes for finding the EntitySpecifics definition in
+# sync.proto.
+PROTO_DEFINITION_START_PATTERN = '^message EntitySpecifics'
+PROTO_DEFINITION_END_PATTERN = '^\}'
+
+# Start and end regexes for finding the ModelTypeInfoMap definition
+# in model_type.cc.
+MODEL_TYPE_START_PATTERN = '^const ModelTypeInfo kModelTypeInfoMap'
+MODEL_TYPE_END_PATTERN = '^\};'
+
+# Strings relating to files we'll need to read.
+# model_type.cc is where the ModelTypeInfoMap is
+# sync.proto is where the proto definitions for ModelTypes are.
+PROTO_FILE_PATH = './protocol/sync.proto'
+MODEL_TYPE_FILE_NAME = 'model_type.cc'
+
+
+def CheckChangeOnUpload(input_api, output_api):
+  """Preupload check function required by presubmit convention.
+  See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+  """
+  for f in input_api.AffectedFiles():
+    if(f.LocalPath().endswith(MODEL_TYPE_FILE_NAME)):
+      return CheckModelTypeInfoMap(input_api, output_api, f)
+  return []
+
+
+def CheckChangeOnCommit(input_api, output_api):
+  """Precommit check function required by presubmit convention.
+  See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+  """
+  for f in input_api.AffectedFiles():
+    if f.LocalPath().endswith(MODEL_TYPE_FILE_NAME):
+      return CheckModelTypeInfoMap(input_api, output_api, f)
+  return []
+
+
+def CheckModelTypeInfoMap(input_api, output_api, model_type_file):
+  """Checks the kModelTypeInfoMap in model_type.cc follows conventions.
+  Checks that the kModelTypeInfoMap follows the below rules:
+    1) The model type string should match the model type name, but with
+       only the first letter capitalized and spaces instead of underscores.
+    2) The root tag should be the same as the model type but all lowercase.
+    3) The notification type should match the proto message name.
+    4) No duplicate data across model types.
+   Args:
+    input_api: presubmit_support InputApi instance
+    output_api: presubmit_support OutputApi instance
+    model_type_file: AffectedFile object where the ModelTypeInfoMap is
+  Returns:
+    A (potentially empty) list PresubmitError objects corresponding to
+    violations of the above rules.
+  """
+  accumulated_problems = []
+  map_entries = ParseModelTypeEntries(
+    input_api, model_type_file.AbsoluteLocalPath())
+  # If any line of the map changed, we check the whole thing since
+  # definitions span multiple lines and there are rules that apply across
+  # all definitions e.g. no duplicated field values.
+  check_map = False
+  for line_num, _ in model_type_file.ChangedContents():
+    for map_entry in map_entries:
+      if line_num in map_entry.affected_lines:
+        check_map = True
+        break
+
+  if not check_map:
+    return []
+  proto_field_definitions = ParseSyncProtoFieldIdentifiers(
+    input_api, os.path.abspath(PROTO_FILE_PATH))
+  accumulated_problems.extend(
+    CheckNoDuplicatedFieldValues(output_api, map_entries))
+
+  for map_entry in map_entries:
+    entry_problems = []
+    entry_problems.extend(
+      CheckNotificationTypeMatchesProtoMessageName(
+        output_api, map_entry, proto_field_definitions))
+
+    if map_entry.model_type not in GRANDFATHERED_MODEL_TYPES:
+      entry_problems.extend(
+        CheckModelTypeStringMatchesModelType(output_api, map_entry))
+      entry_problems.extend(
+        CheckRootTagMatchesModelType(output_api, map_entry))
+
+    if len(entry_problems) > 0:
+      accumulated_problems.extend(entry_problems)
+
+  return accumulated_problems
+
+
+class ModelTypeEnumEntry(object):
+  """Class that encapsulates a ModelTypeInfo definition in model_type.cc.
+  Allows access to each of the named fields in the definition and also
+  which lines the definition spans.
+  Attributes:
+    model_type: entry's ModelType enum value
+    notification_type: model type's notification string
+    root_tag: model type's root tag
+    model_type_string: string corresponding to the ModelType
+    field_number: proto field number
+    histogram_val: value identifying ModelType in histogram
+    affected_lines: lines in model_type.cc that the definition spans
+  """
+  def __init__(self, entry_strings, affected_lines):
+    (model_type, notification_type, root_tag, model_type_string,
+          field_number, histogram_val) = entry_strings
+    self.model_type = model_type
+    self.notification_type = notification_type
+    self.root_tag = root_tag
+    self.model_type_string = model_type_string
+    self.field_number = field_number
+    self.histogram_val = histogram_val
+    self.affected_lines = affected_lines
+
+
+def ParseModelTypeEntries(input_api, model_type_cc_path):
+  """Parses model_type_cc_path for ModelTypeEnumEntries
+  Args:
+    input_api: presubmit_support InputAPI instance
+    model_type_cc_path: path to file containing the ModelTypeInfo entries
+  Returns:
+    A list of ModelTypeEnumEntry objects read from model_type.cc.
+    e.g. ('AUTOFILL_WALLET_METADATA', 'WALLET_METADATA',
+      'autofill_wallet_metadata', 'Autofill Wallet Metadata',
+      'sync_pb::EntitySpecifics::kWalletMetadataFieldNumber', '35',
+      [63, 64, 65])
+  """
+  file_contents = input_api.ReadFile(model_type_cc_path)
+  start_pattern = input_api.re.compile(MODEL_TYPE_START_PATTERN)
+  end_pattern = input_api.re.compile(MODEL_TYPE_END_PATTERN)
+  results, definition_strings, definition_lines = [], [], []
+  inside_enum = False
+  current_line_number = 1
+  for line in file_contents.splitlines():
+    if start_pattern.match(line):
+      inside_enum = True
+      continue
+    if inside_enum:
+      if end_pattern.match(line):
+        break
+      line_entries = line.strip().strip('{},').split(',')
+      definition_strings.extend([entry.strip('" ') for entry in line_entries])
+      definition_lines.append(current_line_number)
+      if line.endswith('},'):
+        results.append(ModelTypeEnumEntry(definition_strings, definition_lines))
+        definition_strings = []
+        definition_lines = []
+    current_line_number += 1
+  return results
+
+
+def ParseSyncProtoFieldIdentifiers(input_api, sync_proto_path):
+  """Parses proto field identifiers from the EntitySpecifics definition.
+  Args:
+    input_api: presubmit_support InputAPI instance
+    proto_path: path to the file containing the proto field definitions
+  Returns:
+    A dictionary of the format {'SyncDataType': 'field_identifier'}
+    e.g. {'AutofillSpecifics': 'autofill'}
+  """
+  proto_field_definitions = {}
+  proto_file_contents = input_api.ReadFile(sync_proto_path).splitlines()
+  start_pattern = input_api.re.compile(PROTO_DEFINITION_START_PATTERN)
+  end_pattern = input_api.re.compile(PROTO_DEFINITION_END_PATTERN)
+  in_proto_def = False
+  for line in proto_file_contents:
+    if start_pattern.match(line):
+      in_proto_def = True
+      continue
+    if in_proto_def:
+      if end_pattern.match(line):
+        break
+      line = line.strip()
+      split_proto_line = line.split(' ')
+      # ignore comments and lines that don't contain definitions.
+      if '//' in line or len(split_proto_line) < 3:
+        continue
+
+      field_typename = split_proto_line[1]
+      field_identifier = split_proto_line[2]
+      proto_field_definitions[field_typename] = field_identifier
+  return proto_field_definitions
+
+
+def StripTrailingS(string):
+  return string.rstrip('sS')
+
+
+def IsTitleCased(string):
+  return reduce(lambda bool1, bool2: bool1 and bool2,
+    [s[0].isupper() for s in string.split(' ')])
+
+
+def FormatPresubmitError(output_api, message, affected_lines):
+  """ Outputs a formatted error message with filename and line number(s).
+  """
+  if len(affected_lines) > 1:
+    message_including_lines = 'Error at lines %d-%d in model_type.cc: %s' %(
+      affected_lines[0], affected_lines[-1], message)
+  else:
+    message_including_lines = 'Error at line %d in model_type.cc: %s' %(
+      affected_lines[0], message)
+  return output_api.PresubmitError(message_including_lines)
+
+
+def CheckNotificationTypeMatchesProtoMessageName(
+  output_api, map_entry, proto_field_definitions):
+  """Check that map_entry's notification type matches sync.proto.
+  Verifies that the notification_type matches the name of the field defined
+  in the sync.proto by looking it up in the proto_field_definitions map.
+  Args:
+    output_api: presubmit_support OutputApi instance
+    map_entry: ModelTypeEnumEntry instance
+    proto_field_definitions: dict of proto field types and field names
+  Returns:
+    A potentially empty list of PresubmitError objects corresponding to
+    violations of the above rule
+  """
+  if map_entry.field_number == '-1':
+    return []
+  proto_message_name = proto_field_definitions[
+    FieldNumberToPrototypeString(map_entry.field_number)]
+  if map_entry.notification_type.lower() != proto_message_name:
+    return [
+      FormatPresubmitError(
+        output_api,'notification type "%s" does not match proto message'
+        ' name defined in sync.proto: ' '"%s"' %
+        (map_entry.notification_type, proto_message_name),
+        map_entry.affected_lines)]
+  return []
+
+
+def CheckNoDuplicatedFieldValues(output_api, map_entries):
+  """Check that map_entries has no duplicated field values.
+  Verifies that every map_entry in map_entries doesn't have a field value
+  used elsewhere in map_entries, ignoring special values ("" and -1).
+  Args:
+    output_api: presubmit_support OutputApi instance
+    map_entries: list of ModelTypeEnumEntry objects to check
+  Returns:
+    A list PresubmitError objects for each duplicated field value
+  """
+  problem_list = []
+  field_value_sets = [set() for i in range(MAP_ENTRY_FIELD_COUNT)]
+  for map_entry in map_entries:
+    field_values = [
+      map_entry.model_type, map_entry.notification_type,
+      map_entry.root_tag, map_entry.model_type_string,
+      map_entry.field_number, map_entry.histogram_val]
+    for i in range(MAP_ENTRY_FIELD_COUNT):
+      field_value = field_values[i]
+      field_value_set = field_value_sets[i]
+      if field_value in field_value_set:
+        problem_list.append(
+          FormatPresubmitError(
+            output_api, 'Duplicated field value "%s"' % field_value,
+            map_entry.affected_lines))
+      elif len(field_value) > 0 and field_value != '-1':
+        field_value_set.add(field_value)
+  return problem_list
+
+
+def CheckModelTypeStringMatchesModelType(output_api, map_entry):
+  """Check that map_entry's model_type_string matches ModelType.
+  Args:
+    output_api: presubmit_support OutputApi instance
+    map_entry: ModelTypeEnumEntry object to check
+  Returns:
+    A list of PresubmitError objects for each violation
+  """
+  problem_list = []
+  expected_model_type_string = map_entry.model_type.lower().replace('_', ' ')
+  if (StripTrailingS(expected_model_type_string) !=
+    StripTrailingS(map_entry.model_type_string.lower())):
+    problem_list.append(
+      FormatPresubmitError(
+        output_api,'model type string "%s" does not match model type.'
+        ' It should be "%s"' % (
+          map_entry.model_type_string, expected_model_type_string.title()),
+        map_entry.affected_lines))
+  if not IsTitleCased(map_entry.model_type_string):
+    problem_list.append(
+      FormatPresubmitError(
+        output_api,'model type string "%s" should be title cased' %
+        (map_entry.model_type_string), map_entry.affected_lines))
+  return problem_list
+
+
+def CheckRootTagMatchesModelType(output_api, map_entry):
+  """Check that map_entry's root tag matches ModelType.
+  Args:
+    output_api: presubmit_support OutputAPI instance
+    map_entry: ModelTypeEnumEntry object to check
+  Returns:
+    A list of PresubmitError objects for each violation
+  """
+  expected_root_tag = map_entry.model_type.lower()
+  if (StripTrailingS(expected_root_tag) !=
+    StripTrailingS(map_entry.root_tag)):
+    return [
+      FormatPresubmitError(
+        output_api,'root tag "%s" does not match model type. It should'
+        'be "%s"' % (map_entry.root_tag, expected_root_tag),
+        map_entry.affected_lines)]
+  return []
+
+
+def FieldNumberToPrototypeString(field_number):
+  """Converts a field number enum reference to an EntitySpecifics string.
+  Converts a reference to the field number enum to the corresponding
+  proto data type string.
+  Args:
+    field_number: string representation of a field number enum reference
+  Returns:
+    A string that is the corresponding proto field data type. e.g.
+    FieldNumberToPrototypeString('EntitySpecifics::kAppFieldNumber')
+    => 'AppSpecifics'
+  """
+  return field_number.replace(FIELD_NUMBER_PREFIX, '').replace(
+    'FieldNumber', 'Specifics').replace(
+    'AppNotificationSpecifics', 'AppNotification')
diff --git a/sync/PRESUBMIT_test.py b/sync/PRESUBMIT_test.py
new file mode 100644
index 0000000..fdcae24
--- /dev/null
+++ b/sync/PRESUBMIT_test.py
@@ -0,0 +1,139 @@
+# Copyright (c) 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.
+
+import os
+import re
+import sys
+import unittest
+import PRESUBMIT
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from PRESUBMIT_test_mocks import MockOutputApi, MockChange
+
+class MockInputApi(object):
+  """ Mocked input api for unit testing of presubmit.
+  This lets us mock things like file system operations and changed files.
+  """
+  def __init__(self):
+    self.re = re
+    self.os_path = os.path
+    self.files = []
+    self.is_committing = False
+
+  def AffectedFiles(self):
+    return self.files
+
+  def AffectedSourceFiles(self):
+    return self.files
+
+  def ReadFile(self, f):
+    """ Returns the mock contents of f if they've been defined.
+    """
+    for api_file in self.files:
+        if api_file.LocalPath() == f:
+            return api_file.NewContents()
+
+
+class MockFile(object):
+  """Mock file object so that presubmit can act invoke file system operations.
+  """
+  def __init__(self, local_path, new_contents):
+    self._local_path = local_path
+    self._new_contents = new_contents
+    self._changed_contents = ([(i + 1, l) for i, l in enumerate(new_contents)])
+
+  def ChangedContents(self):
+    return self._changed_contents
+
+  def NewContents(self):
+    return self._new_contents
+
+  def LocalPath(self):
+    return self._local_path
+
+  def AbsoluteLocalPath(self):
+    return self._local_path
+# Format string used as the contents of a mock sync.proto in order to
+# test presubmit parsing of EntitySpecifics definition in that file.
+MOCK_PROTOFILE_CONTENTS = ('\n'
+  'message EntitySpecifics {\n'
+  '//comment\n'
+  '\n'
+  'optional AutofillSpecifics autofill = 123;\n'
+  'optional AppSpecifics app = 456;\n'
+  'optional AppSettingSpecifics app_setting = 789;\n'
+  '//comment\n'
+  '}\n')
+
+
+# Format string used as the contents of a mock model_type.cc
+# in order to test presubmit parsing of the ModelTypeInfoMap in that file.
+MOCK_MODELTYPE_CONTENTS =('\n'
+  'const ModelTypeInfo kModelTypeInfoMap[] = {\n'
+  '{APP_SETTINGS, "APP_SETTING", "app_settings", "App settings",\n'
+  'sync_pb::EntitySpecifics::kAppSettingFieldNumber, 13},\n'
+  '%s\n'
+  '};\n')
+
+
+class ModelTypeInfoChangeTest(unittest.TestCase):
+  """Unit testing class that contains tests for sync/PRESUBMIT.py.
+  """
+  def test_ValidChangeMultiLine(self):
+    results = self._testChange('{APPS, "APP", "apps", "Apps",\n'
+     'sync_pb::EntitySpecifics::kAppFieldNumber, 12},')
+    self.assertEqual(0, len(results))
+
+  def testValidChangeToleratesPluralization(self):
+    results = self._testChange('{APPS, "APP", "apps", "App",\n'
+      'sync_pb::EntitySpecifics::kAppFieldNumber, 12},')
+    self.assertEqual(0, len(results))
+
+  def testValidChangeGrandfatheredEntry(self):
+    results = self._testChange('{PROXY_TABS, "", "", "Tabs", -1, 25},')
+    self.assertEqual(0, len(results))
+
+  def testInvalidChangeMismatchedNotificationType(self):
+    results = self._testChange('{AUTOFILL, "AUTOFILL_WRONG", "autofill",\n'
+     '"Autofill",sync_pb::EntitySpecifics::kAutofillFieldNumber, 6},')
+    self.assertEqual(1, len(results))
+    self.assertTrue('notification type' in results[0].message)
+
+  def testInvalidChangeInconsistentModelType(self):
+    results = self._testChange('{AUTOFILL, "AUTOFILL", "autofill",\n'
+     '"Autofill Extra",sync_pb::EntitySpecifics::kAutofillFieldNumber, 6},')
+    self.assertEqual(1, len(results))
+    self.assertTrue('model type string' in results[0].message)
+
+  def testInvalidChangeNotTitleCased(self):
+    results = self._testChange('{AUTOFILL, "AUTOFILL", "autofill",\n'
+     '"autofill",sync_pb::EntitySpecifics::kAutofillFieldNumber, 6},')
+    self.assertEqual(1, len(results))
+    self.assertTrue('title' in results[0].message)
+
+  def testInvalidChangeInconsistentRootTag(self):
+    results = self._testChange('{AUTOFILL, "AUTOFILL", "autofill root",\n'
+     '"Autofill",sync_pb::EntitySpecifics::kAutofillFieldNumber, 6},')
+    self.assertEqual(1, len(results))
+    self.assertTrue('root tag' in results[0].message)
+
+  def testInvalidChangeDuplicatedValues(self):
+    results = self._testChange('{APP_SETTINGS, "APP_SETTING",\n'
+      '"app_settings", "App settings",\n'
+      'sync_pb::EntitySpecifics::kAppSettingFieldNumber, 13},\n')
+    self.assertEqual(6, len(results))
+    self.assertTrue('APP_SETTINGS' in results[0].message)
+
+  def _testChange(self, modeltype_literal):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile(os.path.abspath('./protocol/sync.proto'),
+        MOCK_PROTOFILE_CONTENTS),
+      MockFile(os.path.abspath('./syncable/model_type.cc'),
+        MOCK_MODELTYPE_CONTENTS % (modeltype_literal))
+    ]
+
+    return PRESUBMIT.CheckChangeOnCommit(mock_input_api, MockOutputApi())
+if __name__ == '__main__':
+  unittest.main()
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index bf49104..628d2f2f 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -30,10 +30,18 @@
 
 struct ModelTypeInfo {
   const ModelType model_type;
-  const char* const notification_type;  // Model Type notification string.
-  const char* const root_tag;           // Root tag for Model Type
-  const char* const model_type_string;  // String value for Model Type
-  const int specifics_field_number;     // SpecificsFieldNumber for Model Type
+  // Model Type notification string.
+  // This needs to match the corresponding proto message name in sync.proto
+  const char* const notification_type;
+  // Root tag for Model Type
+  // This should be the same as the model type but all lowercase.
+  const char* const root_tag;
+  // String value for Model Type
+  // This should be the same as the model type but space separated and the
+  // first letter of every word capitalized.
+  const char* const model_type_string;
+  // SpecificsFieldNumber for Model Type
+  const int specifics_field_number;
   // Histogram value should be unique for the Model Type, Existing histogram
   // values should never be modified without updating "SyncModelTypes" enum in
   // histograms.xml to maintain backward compatibility.
@@ -43,6 +51,7 @@
 // Below struct entries are in the same order as their definition in the
 // ModelType enum. Don't forget to update the ModelType enum when you make
 // changes to this list.
+// Struct field values should be unique across the entire map.
 const ModelTypeInfo kModelTypeInfoMap[] = {
     {UNSPECIFIED, "", "", "Unspecified", -1, 0},
     {TOP_LEVEL_FOLDER, "", "", "Top Level Folder", -1, 1},
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 1a29887..34912cd0 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -952,6 +952,8 @@
 
 crbug.com/569901 [ Debug ] http/tests/serviceworker/navigation-redirect.html [ Pass Failure ]
 
+crbug.com/599670 [ Win Linux ] http/tests/inspector/resource-parameters-ipv6.html [ Failure Pass ]
+
 crbug.com/472330 fast/borders/border-image-outset-split-inline-vertical-lr.html [ Failure ]
 crbug.com/472330 fast/writing-mode/box-shadow-vertical-lr.html [ Failure ]
 crbug.com/472330 fast/writing-mode/box-shadow-vertical-rl.html [ Failure ]
@@ -1336,6 +1338,9 @@
 
 crbug.com/599975 [ Android ] media/video-autoplay.html [ Timeout ]
 
+# DocumentWriteEvaluator is still experimental
+crbug.com/599115 http/tests/preload/document-write [ Failure ]
+
 crbug.com/601669 [ Win ] svg/as-image/svg-nested.html [ Crash ]
 
 crbug.com/601166 [ Mac10.9 ]  fast/text-autosizing/tables/css-table-lots-of-text-many-cells.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/VirtualTestSuites b/third_party/WebKit/LayoutTests/VirtualTestSuites
index f9f5f74..b7e8e7f 100644
--- a/third_party/WebKit/LayoutTests/VirtualTestSuites
+++ b/third_party/WebKit/LayoutTests/VirtualTestSuites
@@ -247,5 +247,10 @@
     "prefix": "scalefactor200withzoom",
     "base": "fast/hidpi/static",
     "args": ["--force-device-scale-factor=2", "--enable-use-zoom-for-dsf"]
+  },
+  {
+    "prefix": "documentwriteevaluator",
+    "base": "http/tests/preload/document-write",
+    "args": ["--enable-blink-features=DocumentWriteEvaluator"]
   }
 ]
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-structured-clone.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-structured-clone.html
index c5f52315..38c798b 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-structured-clone.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-structured-clone.html
@@ -89,7 +89,7 @@
 var context = document.getElementById("canvas").getContext("2d");
 
 var p1 = createImageBitmap(image1).then(function(image) {imageBitmap1 = image});
-var p2 = createImageBitmap(image2).then(function(image) {imageBitmap2 = image});
+var p2 = createImageBitmap(image2, {imageOrientation: "none", premultiplyAlpha: "none"}).then(function(image) {imageBitmap2 = image});
 Promise.all([p1, p2]).then(function() {
   bitmapWidth = imageBitmap1.width;
   bitmapHeight = imageBitmap1.height;
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/resources/imageBitmap-structured-clone.js b/third_party/WebKit/LayoutTests/fast/canvas/webgl/resources/imageBitmap-structured-clone.js
new file mode 100644
index 0000000..1957982
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/webgl/resources/imageBitmap-structured-clone.js
@@ -0,0 +1,3 @@
+self.onmessage = function(e) {
+    postMessage(e.data);
+};
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-structured-clone-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-structured-clone-expected.txt
new file mode 100644
index 0000000..22c2f2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-structured-clone-expected.txt
@@ -0,0 +1,5 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 
+Test PASSED
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-structured-clone.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-structured-clone.html
new file mode 100644
index 0000000..8e40cee8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-structured-clone.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="./resources/webgl-test-utils-full.js"></script>
+<script src="./resources/tex-image-and-sub-image-utils.js"></script>
+<script src="./resources/tex-image-and-sub-image-image-bitmap-utils.js"></script>
+<script src="../../../resources/js-test.js"></script>
+<script>
+
+window.jsTestIsAsync = true;
+var worker = new Worker('./resources/imageBitmap-structured-clone.js');
+
+var wtu = WebGLTestUtils;
+var tiu = TexImageUtils;
+var gl = null;
+var internalFormat = "RGBA";
+var pixelFormat = "RGBA";
+var pixelType = "UNSIGNED_BYTE";
+var redColor = [255, 0, 0];
+var greenColor = [0, 255, 0];
+var blackColor = [0, 0, 0];
+var halfRed = [128, 0, 0];
+var halfGreen = [0, 128, 0];
+
+var image = new Image();
+
+function promiseRejected()
+{
+    document.getElementById("results").innerHTML = "Promise <span style='color:red'>REJECTED</span>";
+}
+
+function pass()
+{
+    document.getElementById("results").innerHTML = "Test <span style='color:green'>PASSED</span>";
+}
+
+function postToWorker(message) {
+    return new Promise((resolve, reject) => {
+        function onMessage(e) {
+            resolve(e.data);
+            worker.removeEventListener("message", onMessage);
+        }
+        worker.postMessage(message);
+        worker.addEventListener("message", onMessage);
+    });
+}
+
+function generateTest()
+{
+    var bitmaps = [];
+
+    var canvas = document.getElementById("example");
+    gl = canvas.getContext("webgl");
+
+    gl.clearColor(0,0,0,1);
+    gl.clearDepth(1);
+
+    // There is an existing layout test fast/canvas/canvas-ImageBitmap-structured-clone.html
+    // which tests the structured-clone logic for ImageBitmap with default options.
+    // To test ImageBitmap with non-default options such as premultiplyAlpha=none,
+    // we need to use WebGL for testing because normal 2D canvas cannot tell the difference
+    // between a premultiplied/unpremultiplied ImageBitmap.
+    createImageBitmap(image, {imageOrientation: "flipY", premultiplyAlpha: "none"}).then(function(imageBitmap) {
+        var replyPromise = postToWorker(imageBitmap);
+        replyPromise.then(reply => {
+            var retVal = {testPassed: true, alpha: 0.5};
+            var program = tiu.setupTexturedQuad(gl, internalFormat);
+            runOneIteration(false, gl.TEXTURE_2D, program, reply, true, false, retVal);
+            runOneIteration(true, gl.TEXTURE_2D, program, reply, true, false, retVal);
+            program = tiu.setupTexturedQuadWithCubeMap(gl, internalFormat);
+            runOneIteration(false, gl.TEXTURE_CUBE_MAP, program, reply, true, false, retVal);
+            runOneIteration(true, gl.TEXTURE_CUBE_MAP, program, reply, true, false, retVal);
+            if (retVal.testPassed)
+                pass();
+            finishJSTest();
+        });
+    }, function() {
+        promiseRejected();
+        finishJSTest();
+    });
+}
+
+function init()
+{
+    if (window.testRunner) {
+        testRunner.overridePreference("WebKitWebGLEnabled", "1");
+        testRunner.dumpAsText();
+    }
+    image.onload = function() {
+        generateTest();
+    }
+    image.src = "resources/red-green-semi-transparent.png";
+}
+</script>
+</head>
+<body onload="init()">
+<canvas id="texcanvas" width="2" height="2"></canvas>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="results">Test <span style="color:red">FAILED</span></div>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html b/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
index c379f38..0128c0c5 100644
--- a/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/domurl/url-constructor.html
@@ -3,15 +3,15 @@
 <script src="../../resources/testharness.js"></script>
 <script src="../../resources/testharnessreport.js"></script>
 <script>
-
-function assertThrows(func, expected) {
+function assert_type_error(func, expected) {
     try {
         func();
     } catch (ex) {
+        assert_true(ex instanceof TypeError);
         assert_equals(String(ex), expected);
         return;
     }
-    assert_true(false, 'Expected an exception with string: ' + expected);
+    assert_true(false, 'Expected a TypeError exception with string: ' + expected);
 }
 
 test(function() {
@@ -28,27 +28,29 @@
 }, 'Valid URLs');
 
 test(function() {
-    assertThrows(function() {
-        new URL();
-    }, 'TypeError: Failed to construct \'URL\': 1 argument required, but only 0 present.');
-    assertThrows(function() {
-        new URL('');
-    }, 'TypeError: Failed to construct \'URL\': Invalid URL');
-    assertThrows(function() {
-        new URL('','about:blank');
-    }, 'TypeError: Failed to construct \'URL\': Invalid URL');
-    assertThrows(function() {
-        new URL('abc');
-    }, 'TypeError: Failed to construct \'URL\': Invalid URL');
-    assertThrows(function() {
-        new URL('//abc');
-    }, 'TypeError: Failed to construct \'URL\': Invalid URL');
-    assertThrows(function() {
-        new URL('http:///www.domain.com/', 'abc');
-    }, 'TypeError: Failed to construct \'URL\': Invalid base URL');
-    assertThrows(function() {
-        new URL('http:///www.domain.com/', null);
-    }, 'TypeError: Failed to construct \'URL\': Invalid base URL');
+    assert_type_error(
+        function() { new URL(); },
+        'TypeError: Failed to construct \'URL\': 1 argument required, but only 0 present.');
+    assert_type_error(
+        function() { new URL(''); },
+        'TypeError: Failed to construct \'URL\': Invalid URL');
+    assert_type_error(
+        function() { new URL('','about:blank'); },
+        'TypeError: Failed to construct \'URL\': Invalid URL');
+    assert_type_error(
+        function() { new URL('abc'); },
+        'TypeError: Failed to construct \'URL\': Invalid URL');
+    assert_type_error(
+        function() { new URL('//abc'); },
+        'TypeError: Failed to construct \'URL\': Invalid URL');
+    assert_type_error(
+        function() { new URL('http:///www.domain.com/', 'abc'); },
+        'TypeError: Failed to construct \'URL\': Invalid base URL');
+    assert_type_error(
+        function() { new URL('http:///www.domain.com/', null); },
+        'TypeError: Failed to construct \'URL\': Invalid base URL');
+    assert_type_error(
+        function() { new URL('//abc', null); },
+        'TypeError: Failed to construct \'URL\': Invalid base URL');
 }, 'Invalid URL parameters');
-
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/domurl/url-search.html b/third_party/WebKit/LayoutTests/fast/domurl/url-search.html
index 79e169d..41d471d2 100644
--- a/third_party/WebKit/LayoutTests/fast/domurl/url-search.html
+++ b/third_party/WebKit/LayoutTests/fast/domurl/url-search.html
@@ -3,7 +3,6 @@
 <script src="../../resources/testharness.js"></script>
 <script src="../../resources/testharnessreport.js"></script>
 <script>
-
 test(function() {
     var url = new URL('http://www.domain.com/');
     assert_equals(url.search, '');
@@ -25,8 +24,8 @@
     url.search = 'a';
     assert_equals(url.search, '?a');
 
-    url.search = '?a';
-    assert_equals(url.search, '?a');
+    url.search = '?b';
+    assert_equals(url.search, '?b');
 
     url.search = 'a#b';
     assert_equals(url.search, '?a%23b');
@@ -52,5 +51,4 @@
     assert_equals(url.search, '');
     assert_equals(url.href, 'invalid');
 }, 'search property invalid URL');
-
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/domurl/url-searchparams.html b/third_party/WebKit/LayoutTests/fast/domurl/url-searchparams.html
new file mode 100644
index 0000000..9484763
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/domurl/url-searchparams.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<link rel="help" href="https://url.spec.whatwg.org/#interface-urlsearchparams">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+function assert_type_error(f, msg) {
+    assert_throws(TypeError(), f, msg);
+}
+
+test(function() {
+    var url = new URL('http://example.org/?a=b');
+    var searchParams = url.searchParams;
+    assert_true(url.searchParams === searchParams, 'Object identity should hold.');
+}, 'URL.searchParams getter');
+
+test(function() {
+    var url = new URL('http://example.org/?a=b');
+    var searchParams = url.searchParams;
+    assert_equals(searchParams.toString(), 'a=b');
+
+    searchParams.set('a', 'b');
+    assert_equals(url.searchParams.toString(), 'a=b');
+    assert_equals(url.search, '?a=b');
+    url.search = '';
+    assert_equals(url.searchParams.toString(), '');
+    assert_equals(url.search, '');
+    assert_equals(searchParams.toString(), '');
+}, 'URL.searchParams updating, clearing');
+
+test(function() {
+    'use strict';
+    var urlString = 'http://example.org';
+    var url = new URL(urlString);
+    assert_type_error(function() { url.searchParams = new URLSearchParams(urlString); });
+    assert_type_error(function() { url.searchParams = null; });
+    assert_type_error(function() { url.searchParams = 2; });
+    assert_type_error(function() { url.searchParams = {}; });
+}, 'URL.searchParams setter, invalid values');
+
+test(function() {
+    var url = new URL('http://example.org/file?a=b&c=d');
+    var searchParams = url.searchParams;
+    assert_equals(url.search, '?a=b&c=d');
+    assert_equals(searchParams.toString(), 'a=b&c=d');
+
+    // Test that setting 'search' propagates to the URL object's query
+    // object.
+    url.search = 'e=f&g=h';
+    assert_equals(url.search, '?e=f&g=h');
+    assert_equals(searchParams.toString(), 'e=f&g=h');
+
+    // ..and same but with a leading '?'.
+    url.search = '?e=f&g=h';
+    assert_equals(url.search, '?e=f&g=h');
+    assert_equals(searchParams.toString(), 'e=f&g=h');
+
+    // And in the other direction; altering searchParams propagates
+    // back to 'search'.
+    searchParams.append('i', ' j ');
+    assert_equals(url.search, '?e=f&g=h&i=+j+');
+    assert_equals(url.searchParams.toString(), 'e=f&g=h&i=+j+');
+    assert_equals(searchParams.get('i'), ' j ');
+
+    searchParams.set('e', 'updated');
+    assert_equals(url.search, '?e=updated&g=h&i=+j+');
+    assert_equals(searchParams.get('e'), 'updated');
+
+    var url2 = new URL('http://example.org/file??a=b&c=d');
+    assert_equals(url2.search, '??a=b&c=d');
+    assert_equals(url2.searchParams.toString(), '%3Fa=b&c=d');
+
+    url2.href = 'http://example.org/file??a=b';
+    assert_equals(url2.search, '??a=b');
+    assert_equals(url2.searchParams.toString(), '%3Fa=b');
+}, 'URL.searchParams and URL.search setters, update propagation');
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/doubly-nested-with-top-padding-crossing-row-boundaries-expected.html b/third_party/WebKit/LayoutTests/fast/multicol/doubly-nested-with-top-padding-crossing-row-boundaries-expected.html
new file mode 100644
index 0000000..10ac7f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/multicol/doubly-nested-with-top-padding-crossing-row-boundaries-expected.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<p>There should be a small hotpink <em>square</em> below, and nothing else.</p>
+<div style="margin-left:90px; width:20px; height:20px; background:hotpink;"></div>
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/doubly-nested-with-top-padding-crossing-row-boundaries.html b/third_party/WebKit/LayoutTests/fast/multicol/doubly-nested-with-top-padding-crossing-row-boundaries.html
new file mode 100644
index 0000000..d42a17c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/multicol/doubly-nested-with-top-padding-crossing-row-boundaries.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<p>There should be a small hotpink <em>square</em> below, and nothing else.</p>
+<div style="columns:3; column-gap:0; column-fill:auto; width:180px; height:20px;">
+    <div style="height:1px;"></div>
+    <div style="columns:2; column-gap:0; column-fill:auto; height:59px;">
+        <div style="columns:2; column-gap:0; column-fill:auto; width:20px; height:21px; padding-top:57px;">
+            <div style="height:2px;"></div>
+            <div style="height:40px; background:hotpink;"></div>
+        </div>
+    </div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/triply-nested-with-padding-crash-expected.txt b/third_party/WebKit/LayoutTests/fast/multicol/triply-nested-with-padding-crash-expected.txt
new file mode 100644
index 0000000..7bf8ef7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/multicol/triply-nested-with-padding-crash-expected.txt
@@ -0,0 +1,4 @@
+PASS if no crash or assertion failure.
+
+
+
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/triply-nested-with-padding-crash.html b/third_party/WebKit/LayoutTests/fast/multicol/triply-nested-with-padding-crash.html
new file mode 100644
index 0000000..bd9c40ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/multicol/triply-nested-with-padding-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script>
+    if (window.testRunner)
+        testRunner.dumpAsText();
+</script>
+<p>PASS if no crash or assertion failure.</p>
+<div style="columns:2; column-fill:auto; height:21px; line-height:20px;">
+    <div style="columns:2; column-fill:auto; height:42px;">
+        <div style="height:2px;"></div>
+        <div style="columns:2; column-fill:auto; height:61px;">
+            <div style="columns:2; padding-top:100px; padding-bottom:1px;">
+                <br>
+            </div>
+        </div>
+        <div style="height:2px;"></div>
+    </div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
index 5fe86f9..21bd7aa3 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
@@ -3,6 +3,8 @@
 <script src="../resources/testharness.js"></script>
 <script src="../resources/testharnessreport.js"></script>
 <script src="/serviceworker/resources/interfaces.js"></script>
+<body>
+<input type=hidden id=thing value=sekrit>
 <script>
 var c = new PasswordCredential({
     id: 'id',
@@ -51,6 +53,21 @@
 }, "Simple Fetch");
 
 promise_test(function() {
+    document.cookie = "a=1";
+    document.cookie = "b=2";
+    return fetch("./resources/echo-cookies.php", { credentials: c, method: "POST" })
+        .then(resp => resp.json())
+        .then(j => {
+            assert_equals(j.a, '1');
+            assert_equals(j.b, '2');
+        })
+        .then(_ => {
+            document.cookie = "a=1; max-age=0";
+            document.cookie = "b=2; max-age=0";
+        });
+}, "Simple Fetch");
+
+promise_test(function() {
     var r1 = new Request('./resources/echo-post.php', { credentials: c, method: "POST" });
     var r2 = r1.clone();
     return fetch(r1)
@@ -178,6 +195,30 @@
         iconURL: 'https://example.com/icon.png'
     });
 
+    credential.additionalData = new FormData();
+    credential.additionalData.append("excitingData", "exciting value");
+    credential.additionalData.append("csrf", "[randomness]");
+
+    return fetch("./resources/echo-post.php", { credentials: credential, method: "POST" })
+        .then(function (r) {
+            return r.json();
+        })
+        .then(function (j) {
+            assert_equals(j.username, 'id');
+            assert_equals(j.password, 'pencil');
+            assert_equals(j.excitingData, 'exciting value');
+            assert_equals(j.csrf, '[randomness]');
+        });
+}, "'additionalData': FormData properties are properly injected after assignment.");
+
+promise_test(function() {
+    var credential = new PasswordCredential({
+        id: 'id',
+        password: 'pencil',
+        name: 'name',
+        iconURL: 'https://example.com/icon.png'
+    });
+
     var fd = new FormData();
     fd.append("username", "foo");
     fd.append("password", "bar");
@@ -291,4 +332,75 @@
             assert_equals(t, 'a=1&a=2&a=3&username=id&password=pencil');
         });
 }, "'additionalData': URLSearchParams properties are properly injected (ordering matters).");
+
+promise_test(_ => {
+    var id = "id";
+    var name = "name";
+    var icon = "http://example.com/";
+    var password = "pencil";
+
+    if (window.testRunner)
+        testRunner.addMockCredentialManagerResponse(id, name, icon, password);
+
+    return navigator.credentials.get({ password: true })
+        .then(c => {
+            return fetch("./resources/echo-post.php", { credentials: c, method: "POST" })
+                .then(resp => resp.json())
+                .then(j => {
+                    assert_equals(j.username, 'id');
+                    assert_equals(j.password, 'pencil')
+                });
+        });
+}, 'fetch() after get()');
+
+promise_test(_ => {
+    var id = "id";
+    var name = "name";
+    var icon = "http://example.com/";
+    var password = "pencil";
+
+    if (window.testRunner)
+        testRunner.addMockCredentialManagerResponse(id, name, icon, password);
+
+    return navigator.credentials.get({ password: true })
+        .then(c => {
+
+            var fd = new FormData();
+            fd.append('csrf_token', 'sekrit');
+            c.additionalData = fd;
+
+            return fetch("./resources/echo-post.php", { credentials: c, method: "POST" })
+                .then(resp => resp.json())
+                .then(j => {
+                    assert_equals(j.username, 'id');
+                    assert_equals(j.password, 'pencil')
+                    assert_equals(j.csrf_token, 'sekrit')
+                });
+        });
+}, 'fetch() after get() with additionalData');
+
+promise_test(_ => {
+    var id = "id";
+    var name = "name";
+    var icon = "http://example.com/";
+    var password = "pencil";
+
+    if (window.testRunner)
+        testRunner.addMockCredentialManagerResponse(id, name, icon, password);
+
+    return navigator.credentials.get({ password: true })
+        .then(c => {
+            var fd = new FormData();
+            fd.append('csrf_token', document.querySelector('#thing').value);
+            c.additionalData = fd;
+
+            return fetch("./resources/echo-post.php", { credentials: c, method: "POST" })
+                .then(resp => resp.json())
+                .then(j => {
+                    assert_equals(j.username, 'id');
+                    assert_equals(j.password, 'pencil')
+                    assert_equals(j.csrf_token, 'sekrit')
+                });
+        });
+}, 'fetch() after get() with additionalData from DOM');
 </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/echo-cookies.php b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/echo-cookies.php
new file mode 100644
index 0000000..7b6c0a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/echo-cookies.php
@@ -0,0 +1,3 @@
+<?php
+    echo json_encode($_COOKIE);
+?>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
index 1d09e28..2889fc6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-expected.txt
@@ -2,6 +2,7 @@
 
   
 
+http://127.0.0.1:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=
 {
     cache : {
     }
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-ipv6-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-ipv6-expected.txt
new file mode 100644
index 0000000..c5f4c2fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-ipv6-expected.txt
@@ -0,0 +1,66 @@
+Tests that resources panel shows form data parameters.
+
+  
+
+http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=
+{
+    cache : {
+    }
+    connection : <string>
+    request : {
+        bodySize : <number>
+        cookies : [
+        ]
+        headers : <object>
+        headersSize : <number>
+        httpVersion : "HTTP/1.1"
+        method : "POST"
+        postData : {
+            mimeType : "application/x-www-form-urlencoded"
+            params : [
+                {
+                    name : "formParam1"
+                    value : "formValue1"
+                }
+                {
+                    name : "formParam2"
+                    value : ""
+                }
+            ]
+            text : "formParam1=formValue1&formParam2="
+        }
+        queryString : [
+            {
+                name : "queryParam1"
+                value : "queryValue1"
+            }
+            {
+                name : "queryParam2"
+                value : ""
+            }
+        ]
+        url : "http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2="
+    }
+    response : {
+        _transferSize : <number>
+        bodySize : <number>
+        content : {
+            compression : <number>
+            mimeType : "application/xml"
+            size : 14
+        }
+        cookies : [
+        ]
+        headers : <object>
+        headersSize : <number>
+        httpVersion : "HTTP/1.1"
+        redirectURL : ""
+        status : 200
+        statusText : "OK"
+    }
+    serverIPAddress : "[::1]"
+    startedDateTime : <plausible>
+    time : <number>
+    timings : <object>
+}
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-ipv6.html b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-ipv6.html
new file mode 100644
index 0000000..c8a1db6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters-ipv6.html
@@ -0,0 +1,39 @@
+<html>
+<head>
+<script src="inspector-test.js"></script>
+<script src="network-test.js"></script>
+
+<script>
+function submit()
+{
+    document.getElementById("submit").click();
+}
+
+function test()
+{
+    InspectorTest.evaluateInPage("submit()");
+    InspectorTest.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestFinished, onRequestFinished);
+
+    function onRequestFinished(event)
+    {
+        var request = event.data;
+        InspectorTest.addResult(request.url);
+        InspectorTest.addObject(new WebInspector.HAREntry(request).build(), InspectorTest.HARPropertyFormatters);
+        InspectorTest.completeTest();
+    }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that resources panel shows form data parameters.
+</p>
+<form target="target-iframe" method="POST" action="http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=#fragmentParam1=fragmentValue1&fragmentParam2=">
+<input name="formParam1" value="formValue1">
+<input name="formParam2">
+<input id="submit" type="submit">
+</form>
+<iframe name="target-iframe"></iframe>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters.html b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters.html
index 256b66b07..6dcb5d9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-parameters.html
@@ -17,8 +17,7 @@
     function onRequestFinished(event)
     {
         var request = event.data;
-        if (request.url !== "http://127.0.0.1:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=")
-            return;
+        InspectorTest.addResult(request.url);
         InspectorTest.addObject(new WebInspector.HAREntry(request).build(), InspectorTest.HARPropertyFormatters);
         InspectorTest.completeTest();
     }
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script-expected.txt b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script-expected.txt
new file mode 100644
index 0000000..c134cd82
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script-expected.txt
@@ -0,0 +1,9 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+This is a testharness.js-based test.
+PASS Cross origin but asynchronous doc.written scripts are not blocked 
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html
new file mode 100644
index 0000000..430d6eb4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+    var t = async_test('Cross origin but asynchronous doc.written scripts are not blocked');
+    var src = 'http://localhost:8000/loading/resources/js-loaded.js?2';
+    var jsLoaded = false;
+    var loadSuccess = false;
+    if (window.internals) {
+        internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(true);
+        internals.setNetworkStateNotifierTestOnly(true);
+        internals.setNetworkConnectionInfo('cellular2g', 2.0);
+        internals.evictAllResources();
+
+        window.addEventListener('beforeunload', function() {
+            internals.setNetworkStateNotifierTestOnly(false);
+            internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(false);
+        }, false);
+    }
+    document.write('<scr' + 'ipt src="' + src + '"  onload="loadSuccess=true" async></scr' + 'ipt>');
+</script>
+<script>
+    window.addEventListener("load", t.step_func(function() {
+        assert_true(loadSuccess, "Script loaded successfully");
+        assert_true(jsLoaded, "Cross origin but asynchronous doc.written scripts are not blocked");
+        t.done();
+    }));
+</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-expected.txt b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-expected.txt
new file mode 100644
index 0000000..7732f3de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-expected.txt
@@ -0,0 +1,12 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+This is a testharness.js-based test.
+PASS Blocking of scripts doesn't come into effect since feature is disabled 
+PASS Same domain doc.written scripts are not blocked 
+PASS cross-origin script not blocked since it is cached 
+PASS cross origin doc.written scripts are blocked 
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html
new file mode 100644
index 0000000..c9b71995
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+    var sameOrigin = 'http://127.0.0.1:8000'
+    var crossOrigin = 'http://localhost:8000' 
+    var filePath = '/loading/resources/js-loaded.js'
+    var jsLoaded = false;
+    var loadSuccess = false;
+
+    src = crossOrigin + filePath;
+    document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true"></scr' + 'ipt>');
+</script>
+
+<script>
+    test(function () {
+        assert_true(jsLoaded);
+        assert_true(loadSuccess);
+    }, "Blocking of scripts doesn't come into effect since feature is disabled");
+    
+</script>
+<script>
+    if (window.internals) {
+        internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(true);
+        internals.setNetworkStateNotifierTestOnly(true);
+        internals.setNetworkConnectionInfo('cellular2g', 1.0);
+        internals.evictAllResources();
+
+        // Reset the state of the singleton network state notifier.
+        window.addEventListener('beforeunload', function() {
+            internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(false);
+            internals.setNetworkStateNotifierTestOnly(false);
+        }, false);
+    }
+
+    src = sameOrigin + filePath;
+    jsLoaded = false;
+    loadSuccess = false;
+    document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true"></scr' + 'ipt>');
+</script>
+
+<script>
+    test(function () {
+        assert_true(jsLoaded);
+        assert_true(loadSuccess);
+    }, "Same domain doc.written scripts are not blocked");
+</script>
+
+<script>
+    var jsLoaded = false;
+    var loadSuccess = false;
+
+    src = crossOrigin + filePath;
+    document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true"></scr' + 'ipt>');
+</script>
+
+<script>
+    test(function () {
+        assert_true(jsLoaded);
+        assert_true(loadSuccess);
+    }, "cross-origin script not blocked since it is cached");
+    
+</script>
+<script>
+    jsLoaded = false;
+    loadSuccess = false;
+    var loadFailed = false;
+
+    filePath = '/loading/resources/js-loaded.js?1';
+    src = crossOrigin + filePath;
+    document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true" onError="loadFailed=true"></scr' + 'ipt>');
+</script>
+
+<script>
+    test(function () {
+        assert_false(jsLoaded);
+        assert_false(loadSuccess);
+        assert_true(loadFailed);
+    }, "cross origin doc.written scripts are blocked");
+</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type-expected.txt b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type-expected.txt
new file mode 100644
index 0000000..7f84acf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type-expected.txt
@@ -0,0 +1,9 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+This is a testharness.js-based test.
+PASS Document.written scripts are not blocked in a fast connection 
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
new file mode 100644
index 0000000..99854a8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+    var src = 'http://localhost:8000/loading/resources/js-loaded.js';
+    var jsLoaded = false;
+    var loadSuccess = false;
+    if (window.internals) {
+        internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(true);
+        internals.setNetworkStateNotifierTestOnly(true);
+        internals.setNetworkConnectionInfo('cellular3g', 2.0);
+        internals.evictAllResources();
+
+        window.addEventListener('beforeunload', function() {
+            internals.setNetworkStateNotifierTestOnly(false);
+            internals.settings.setDisallowFetchForDocWrittenScriptsInMainFrame(false);
+        }, false);
+    }
+    document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true"></scr' + 'ipt>');
+</script>
+<script>
+    test(function () {
+        assert_true(jsLoaded);
+        assert_true(loadSuccess);
+    }, "Document.written scripts are not blocked in a fast connection");
+
+</script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/resources/js-loaded.js b/third_party/WebKit/LayoutTests/http/tests/loading/resources/js-loaded.js
new file mode 100644
index 0000000..c2a7adb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/resources/js-loaded.js
@@ -0,0 +1 @@
+jsLoaded = true;
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/location-replace-crossdomain.html b/third_party/WebKit/LayoutTests/http/tests/misc/location-replace-crossdomain.html
index 8b62462..5014a35 100644
--- a/third_party/WebKit/LayoutTests/http/tests/misc/location-replace-crossdomain.html
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/location-replace-crossdomain.html
@@ -2,22 +2,24 @@
 <head>
 <script>
 function test()
-{    
+{
+    document.querySelector('iframe').addEventListener('load', function () {
+        if (window.testRunner)
+            testRunner.notifyDone();
+    });
     window.frames['crossDomainFrame'].location.replace("http://127.0.0.1:8000/misc/resources/success.html");
-    if (window.testRunner)
-        setTimeout("testRunner.notifyDone()", 1);
 }
 
 if (window.testRunner)
     testRunner.waitUntilDone();
-    
+
 </script>
 </head>
 <body onload="test();">
 <iframe name="crossDomainFrame" src="http://localhost:8000/misc/resources/failure.html"></iframe>
 </body>
 </html>
-<!--     
-<rdar://problem/4808039> 
+<!--
+<rdar://problem/4808039>
 http://bugs.webkit.org/show_bug.cgi?id=11230
 -->
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
new file mode 100644
index 0000000..4474a7f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+var t = async_test('Simple scripts that inject external scripts via document.write should be preloaded');
+// We reject scripts with "for", so rename window.performance.
+window.perf = window.performance;
+</script>
+<script>
+if (window.perf)
+    var boundedStart = window.perf.now();
+var src = '../../resources/dummy.js';
+document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
+</script>
+<script>
+window.addEventListener("load", t.step_func(function() {
+  window.performance.getEntriesByType('resource').forEach(function(r) {
+    if (r.name.indexOf('dummy.js') != -1) {
+      assert_less_than(r.startTime, boundedStart);
+      assert_greater_than(r.startTime, 0);
+      t.done();
+    }
+  });
+}));
+</script>
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html
deleted file mode 100644
index 88158147..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/preload/document_write_preload.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script>
-var t = async_test('Simple scripts that inject external scripts via document.write should be preloaded');
-// We reject scripts with "for"
-</script>
-<script>
-if (window.performance)
-    var boundedStart = window.performance.now();
-var src = '../resources/dummy.js';
-document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
-</script>
-<script>
-window.addEventListener("load", t.step_func(function() {
-    var resourceTiming = window.performance.getEntriesByType('resource')[2];
-    assert_less_than(resourceTiming.startTime, boundedStart);
-    t.done();
-}));
-</script>
-
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
index 7f0881a..a7326d6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -689,6 +689,7 @@
     getter port
     getter protocol
     getter search
+    getter searchParams
     getter username
     method constructor
     method toString
diff --git a/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-expected.txt
index 1d09e28..2889fc6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-expected.txt
@@ -2,6 +2,7 @@
 
   
 
+http://127.0.0.1:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=
 {
     cache : {
     }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-ipv6-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-ipv6-expected.txt
new file mode 100644
index 0000000..c5f4c2fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/resource-parameters-ipv6-expected.txt
@@ -0,0 +1,66 @@
+Tests that resources panel shows form data parameters.
+
+  
+
+http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=
+{
+    cache : {
+    }
+    connection : <string>
+    request : {
+        bodySize : <number>
+        cookies : [
+        ]
+        headers : <object>
+        headersSize : <number>
+        httpVersion : "HTTP/1.1"
+        method : "POST"
+        postData : {
+            mimeType : "application/x-www-form-urlencoded"
+            params : [
+                {
+                    name : "formParam1"
+                    value : "formValue1"
+                }
+                {
+                    name : "formParam2"
+                    value : ""
+                }
+            ]
+            text : "formParam1=formValue1&formParam2="
+        }
+        queryString : [
+            {
+                name : "queryParam1"
+                value : "queryValue1"
+            }
+            {
+                name : "queryParam2"
+                value : ""
+            }
+        ]
+        url : "http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2="
+    }
+    response : {
+        _transferSize : <number>
+        bodySize : <number>
+        content : {
+            compression : <number>
+            mimeType : "application/xml"
+            size : 14
+        }
+        cookies : [
+        ]
+        headers : <object>
+        headersSize : <number>
+        httpVersion : "HTTP/1.1"
+        redirectURL : ""
+        status : 200
+        statusText : "OK"
+    }
+    serverIPAddress : "[::1]"
+    startedDateTime : <plausible>
+    time : <number>
+    timings : <object>
+}
+
diff --git a/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt b/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
index cf64041..2127f64 100644
--- a/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-expected.txt
@@ -2,6 +2,7 @@
 
   
 
+http://127.0.0.1:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=
 {
     cache : {
     }
diff --git a/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-ipv6-expected.txt b/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-ipv6-expected.txt
new file mode 100644
index 0000000..b143e60
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/resource-parameters-ipv6-expected.txt
@@ -0,0 +1,66 @@
+Tests that resources panel shows form data parameters.
+
+  
+
+http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=
+{
+    cache : {
+    }
+    connection : <string>
+    request : {
+        bodySize : <number>
+        cookies : [
+        ]
+        headers : <object>
+        headersSize : <number>
+        httpVersion : "HTTP/1.1"
+        method : "POST"
+        postData : {
+            mimeType : "application/x-www-form-urlencoded"
+            params : [
+                {
+                    name : "formParam1"
+                    value : "formValue1"
+                }
+                {
+                    name : "formParam2"
+                    value : ""
+                }
+            ]
+            text : "formParam1=formValue1&formParam2="
+        }
+        queryString : [
+            {
+                name : "queryParam1"
+                value : "queryValue1"
+            }
+            {
+                name : "queryParam2"
+                value : ""
+            }
+        ]
+        url : "http://[::1]:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2="
+    }
+    response : {
+        _transferSize : <number>
+        bodySize : <number>
+        content : {
+            compression : <number>
+            mimeType : "application/xml"
+            size : 15
+        }
+        cookies : [
+        ]
+        headers : <object>
+        headersSize : <number>
+        httpVersion : "HTTP/1.1"
+        redirectURL : ""
+        status : 200
+        statusText : "OK"
+    }
+    serverIPAddress : "[::1]"
+    startedDateTime : <plausible>
+    time : <number>
+    timings : <object>
+}
+
diff --git a/third_party/WebKit/LayoutTests/svg/text/text-collapsed-ws-remove-textnode-expected.html b/third_party/WebKit/LayoutTests/svg/text/text-collapsed-ws-remove-textnode-expected.html
new file mode 100644
index 0000000..9519f7a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/text/text-collapsed-ws-remove-textnode-expected.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<svg>
+  <text y="20">Foo bar</text>
+</svg>
diff --git a/third_party/WebKit/LayoutTests/svg/text/text-collapsed-ws-remove-textnode.html b/third_party/WebKit/LayoutTests/svg/text/text-collapsed-ws-remove-textnode.html
new file mode 100644
index 0000000..4bd3ec4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/text/text-collapsed-ws-remove-textnode.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<svg>
+  <text y="20">Foo<tspan> </tspan> bar</text>
+</svg>
+<script>
+runAfterLayoutAndPaint(function() {
+  document.querySelector('tspan').firstChild.remove();
+}, true);
+</script>
diff --git a/third_party/WebKit/LayoutTests/usb/disconnect-when-hidden-or-closed.html b/third_party/WebKit/LayoutTests/usb/disconnect-when-hidden-or-closed.html
deleted file mode 100644
index b897726a..0000000
--- a/third_party/WebKit/LayoutTests/usb/disconnect-when-hidden-or-closed.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/mojo-helpers.js"></script>
-<script src="resources/fake-devices.js"></script>
-<script src="resources/usb-helpers.js"></script>
-<script>
-'use strict';
-
-const visibilityError =
-    'Connection is only allowed while the page is visible. This is a ' +
-    'temporary measure until we are able to effectively communicate to the ' +
-    'user that the page is connected to a device.';
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  testRunner.setPageVisibility('visible');
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    testRunner.setPageVisibility('hidden');
-    return assertRejectsWithError(
-        device.open(), 'SecurityError', visibilityError).then(() => {
-      assert_false(device.opened);
-    });
-  });
-}, 'device connection is disallowed while the tab is hidden');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  testRunner.setPageVisibility('visible');
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    let promise = assertRejectsWithError(
-        device.open(), 'SecurityError', visibilityError);
-    testRunner.setPageVisibility('hidden');
-    return promise.then(() => {
-      assert_false(device.opened);
-    });
-  });
-}, 'device connection is disallowed when it finishes while the tab is hidden');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  testRunner.setPageVisibility('visible');
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open().then(() => {
-      testRunner.setPageVisibility('hidden');
-      return assertRejectsWithError(
-          device.selectConfiguration(1), 'SecurityError', visibilityError);
-    }).then(() => {
-      assert_false(device.opened);
-    });
-  });
-}, 'device connection is closed when tab becomes hidden');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  testRunner.setPageVisibility('visible');
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open().then(() => {
-      testRunner.setPageVisibility('hidden');
-      return assertRejectsWithError(
-          device.selectConfiguration(0), 'SecurityError', visibilityError);
-    }).then(() => {
-      assert_false(device.opened);
-      testRunner.setPageVisibility('visible');
-      return device.open()
-          .then(() => device.selectConfiguration(1))
-          .then(() => device.close());
-    });
-  });
-}, 'device can be reopened when the page is visible');
-</script>
diff --git a/third_party/WebKit/LayoutTests/virtual/documentwriteevaluator/http/tests/preload/document-write/README.txt b/third_party/WebKit/LayoutTests/virtual/documentwriteevaluator/http/tests/preload/document-write/README.txt
new file mode 100644
index 0000000..071756a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/documentwriteevaluator/http/tests/preload/document-write/README.txt
@@ -0,0 +1,3 @@
+# This suite runs the tests in http/tests/preload/document-write with
+# --enable-blink-features=DocumentWriteEvaluator
+
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
index 6d0a76b..a7e370f 100644
--- a/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -561,6 +561,7 @@
     getter port
     getter protocol
     getter search
+    getter searchParams
     getter username
     method constructor
     method toString
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
index 6ceb0141..a4cd2ab 100644
--- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
@@ -575,6 +575,7 @@
 [Worker]     getter port
 [Worker]     getter protocol
 [Worker]     getter search
+[Worker]     getter searchParams
 [Worker]     getter username
 [Worker]     method constructor
 [Worker]     method toString
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
index ab3ee59..aa53b0e 100644
--- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -10,6 +10,7 @@
 CONSOLE WARNING: 'webkitIDBDatabase' is deprecated. Please use 'IDBDatabase' instead.
 CONSOLE WARNING: 'webkitIDBCursor' is deprecated. Please use 'IDBCursor' instead.
 CONSOLE WARNING: 'webkitIndexedDB' is deprecated. Please use 'indexedDB' instead.
+CONSOLE ERROR: The 'WebUSB' feature is currently enabled in limited trials. Please see [Phosphor console URL] for information on enabling a trial for your site.
 CONSOLE ERROR: The 'WebBluetooth' feature is currently enabled in limited trials. Please see [Phosphor console URL] for information on enabling a trial for your site.
 CONSOLE WARNING: 'webkitURL' is deprecated. Please use 'URL' instead.
 This test documents all interface attributes and methods on the global window object and element instances.
@@ -3350,6 +3351,7 @@
     getter product
     getter productSub
     getter serviceWorker
+    getter usb
     getter userAgent
     getter vendor
     getter vendorSub
@@ -5344,6 +5346,7 @@
     getter port
     getter protocol
     getter search
+    getter searchParams
     getter username
     method constructor
     method toString
@@ -6405,6 +6408,7 @@
     getter port
     getter protocol
     getter search
+    getter searchParams
     getter username
     method constructor
     method toString
@@ -6427,6 +6431,18 @@
     attribute BluetoothRemoteGATTService
     attribute BluetoothUUID
     attribute GCController
+    attribute USBAlternateInterface
+    attribute USBConfiguration
+    attribute USBConnectionEvent
+    attribute USBDevice
+    attribute USBEndpoint
+    attribute USBInTransferResult
+    attribute USBInterface
+    attribute USBIsochronousInTransferPacket
+    attribute USBIsochronousInTransferResult
+    attribute USBIsochronousOutTransferPacket
+    attribute USBIsochronousOutTransferResult
+    attribute USBOutTransferResult
     attribute accessibilityController
     attribute applicationCache
     attribute caches
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
index 2d38347..9263c035 100644
--- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
@@ -567,6 +567,7 @@
 [Worker]     getter port
 [Worker]     getter protocol
 [Worker]     getter search
+[Worker]     getter searchParams
 [Worker]     getter username
 [Worker]     method constructor
 [Worker]     method toString
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
index 34db2bcb..e88a9378 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
@@ -699,6 +699,7 @@
 [Worker]     getter port
 [Worker]     getter protocol
 [Worker]     getter search
+[Worker]     getter searchParams
 [Worker]     getter username
 [Worker]     method constructor
 [Worker]     method toString
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
index 9b96840..39665f4e 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -6132,6 +6132,7 @@
     getter port
     getter protocol
     getter search
+    getter searchParams
     getter username
     method constructor
     method toString
@@ -7403,6 +7404,7 @@
     getter port
     getter protocol
     getter search
+    getter searchParams
     getter username
     method constructor
     method toString
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
index 01b3c31..2acb3f4 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
@@ -691,6 +691,7 @@
 [Worker]     getter port
 [Worker]     getter protocol
 [Worker]     getter search
+[Worker]     getter searchParams
 [Worker]     getter username
 [Worker]     method constructor
 [Worker]     method toString
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
index 8d80828..1bfbdbd0 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -88,11 +88,6 @@
 
 ScriptController::ScriptController(LocalFrame* frame)
     : m_windowProxyManager(WindowProxyManager::create(*frame))
-    , m_sourceURL(0)
-{
-}
-
-ScriptController::~ScriptController()
 {
 }
 
@@ -409,10 +404,6 @@
     if (policy == DoNotExecuteScriptWhenScriptsDisabled && !canExecuteScripts(AboutToExecuteScript))
         return v8::Local<v8::Value>();
 
-    String sourceURL = sourceCode.url();
-    const String* savedSourceURL = m_sourceURL;
-    m_sourceURL = &sourceURL;
-
     ScriptState* scriptState = ScriptState::forMainWorld(frame());
     if (!scriptState)
         return v8::Local<v8::Value>();
@@ -424,7 +415,6 @@
         frame()->loader().didAccessInitialDocument();
 
     v8::Local<v8::Value> object = executeScriptAndReturnValue(scriptState->context(), sourceCode, accessControlStatus, compilationFinishTime);
-    m_sourceURL = savedSourceURL;
 
     if (object.IsEmpty())
         return v8::Local<v8::Value>();
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
index 0637b98..325ffc4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
@@ -64,7 +64,7 @@
     NotAboutToExecuteScript
 };
 
-class CORE_EXPORT ScriptController final : public GarbageCollectedFinalized<ScriptController> {
+class CORE_EXPORT ScriptController final : public GarbageCollected<ScriptController> {
     WTF_MAKE_NONCOPYABLE(ScriptController);
 public:
     enum ExecuteScriptPolicy {
@@ -77,7 +77,6 @@
         return new ScriptController(frame);
     }
 
-    ~ScriptController();
     DECLARE_TRACE();
 
     bool initializeMainWorld();
@@ -154,7 +153,6 @@
     v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, AccessControlStatus, ExecuteScriptPolicy, double* compilationFinishTime = 0);
 
     Member<WindowProxyManager> m_windowProxyManager;
-    const String* m_sourceURL;
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
index 44b7af4..2efbe53 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
@@ -1012,7 +1012,7 @@
         return nullptr;
     if (imageBitmap->isNeutered())
         return handleError(DataCloneError, "An ImageBitmap is neutered and could not be cloned.", next);
-    OwnPtr<uint8_t[]> pixelData = imageBitmap->copyBitmapData();
+    OwnPtr<uint8_t[]> pixelData = imageBitmap->copyBitmapData(PremultiplyAlpha);
     m_writer.writeImageBitmap(imageBitmap->width(), imageBitmap->height(), pixelData.get(), imageBitmap->width() * imageBitmap->height() * 4);
     return nullptr;
 }
@@ -1634,7 +1634,9 @@
     ImageData* imageData = doReadImageData();
     if (!imageData)
         return false;
-    RawPtr<ImageBitmap> imageBitmap = ImageBitmap::create(imageData, IntRect(0, 0, imageData->width(), imageData->height()));
+    ImageBitmapOptions options;
+    options.setPremultiplyAlpha("none");
+    RawPtr<ImageBitmap> imageBitmap = ImageBitmap::create(imageData, IntRect(0, 0, imageData->width(), imageData->height()), options, true);
     if (!imageBitmap.get())
         return false;
     *value = toV8(imageBitmap.get(), m_scriptState->context()->Global(), isolate());
diff --git a/third_party/WebKit/Source/core/dom/DOMURL.cpp b/third_party/WebKit/Source/core/dom/DOMURL.cpp
index e0679ba6..1b1373b9 100644
--- a/third_party/WebKit/Source/core/dom/DOMURL.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMURL.cpp
@@ -30,24 +30,37 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/ExecutionContext.h"
+#include "core/dom/URLSearchParams.h"
 #include "core/fetch/MemoryCache.h"
 #include "core/fileapi/Blob.h"
 #include "core/html/PublicURLManager.h"
 #include "platform/blob/BlobURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "wtf/TemporaryChange.h"
 
 namespace blink {
 
 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionState)
 {
-    if (!base.isValid())
+    if (!base.isValid()) {
         exceptionState.throwTypeError("Invalid base URL");
+        return;
+    }
 
     m_url = KURL(base, url);
     if (!m_url.isValid())
         exceptionState.throwTypeError("Invalid URL");
 }
 
+DOMURL::~DOMURL()
+{
+}
+
+DEFINE_TRACE(DOMURL)
+{
+    visitor->trace(m_searchParams);
+}
+
 void DOMURL::setInput(const String& value)
 {
     KURL url(blankURL(), value);
@@ -58,6 +71,16 @@
         m_url = KURL();
         m_input = value;
     }
+    update();
+}
+
+void DOMURL::setSearch(const String& value)
+{
+    DOMURLUtils::setSearch(value);
+    if (!value.isEmpty() && value[0] == '?')
+        updateSearchParams(value.substring(1));
+    else
+        updateSearchParams(value);
 }
 
 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, ExceptionState& exceptionState)
@@ -101,4 +124,27 @@
     executionContext->publicURLManager().revoke(uuid);
 }
 
+URLSearchParams* DOMURL::searchParams()
+{
+    if (!m_searchParams)
+        m_searchParams = URLSearchParams::create(url().query(), this);
+
+    return m_searchParams;
+}
+
+void DOMURL::update()
+{
+    updateSearchParams(url().query());
+}
+
+void DOMURL::updateSearchParams(const String& queryString)
+{
+    if (!m_searchParams)
+        return;
+
+    TemporaryChange<bool> scope(m_isInUpdate, true);
+    ASSERT(m_searchParams->urlObject() == this);
+    m_searchParams->setInput(queryString);
+}
+
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/DOMURL.h b/third_party/WebKit/Source/core/dom/DOMURL.h
index a5d11bd2..4587cb1 100644
--- a/third_party/WebKit/Source/core/dom/DOMURL.h
+++ b/third_party/WebKit/Source/core/dom/DOMURL.h
@@ -40,6 +40,7 @@
 class ExceptionState;
 class ExecutionContext;
 class URLRegistrable;
+class URLSearchParams;
 
 class DOMURL final : public GarbageCollectedFinalized<DOMURL>, public ScriptWrappable, public DOMURLUtils {
     DEFINE_WRAPPERTYPEINFO();
@@ -48,10 +49,12 @@
     {
         return new DOMURL(url, blankURL(), exceptionState);
     }
+
     static DOMURL* create(const String& url, const String& base, ExceptionState& exceptionState)
     {
         return new DOMURL(url, KURL(KURL(), base), exceptionState);
     }
+    ~DOMURL();
 
     static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&);
     static void revokeObjectURL(ExecutionContext*, const String&);
@@ -65,13 +68,22 @@
     String input() const override { return m_input; }
     void setInput(const String&) override;
 
-    DEFINE_INLINE_TRACE() { }
+    void setSearch(const String&) override;
+
+    URLSearchParams* searchParams();
+
+    DECLARE_VIRTUAL_TRACE();
 
 private:
+    friend class URLSearchParams;
     DOMURL(const String& url, const KURL& base, ExceptionState&);
 
+    void update();
+    void updateSearchParams(const String&);
+
     KURL m_url;
     String m_input;
+    WeakMember<URLSearchParams> m_searchParams;
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/DOMURLUtils.cpp b/third_party/WebKit/Source/core/dom/DOMURLUtils.cpp
index 7b3d670..5c3e759a 100644
--- a/third_party/WebKit/Source/core/dom/DOMURLUtils.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMURLUtils.cpp
@@ -26,10 +26,15 @@
 
 #include "core/dom/DOMURLUtils.h"
 
+#include "bindings/core/v8/ExceptionState.h"
 #include "platform/weborigin/KnownPorts.h"
 
 namespace blink {
 
+DOMURLUtils::~DOMURLUtils()
+{
+}
+
 void DOMURLUtils::setHref(const String& value)
 {
     setInput(value);
@@ -117,6 +122,12 @@
 
 void DOMURLUtils::setSearch(const String& value)
 {
+    setSearchInternal(value);
+}
+
+void DOMURLUtils::setSearchInternal(const String& value)
+{
+    ASSERT(!m_isInUpdate);
     KURL kurl = url();
     if (!kurl.isValid())
         return;
diff --git a/third_party/WebKit/Source/core/dom/DOMURLUtils.h b/third_party/WebKit/Source/core/dom/DOMURLUtils.h
index 7bec3e03..a46f8c4 100644
--- a/third_party/WebKit/Source/core/dom/DOMURLUtils.h
+++ b/third_party/WebKit/Source/core/dom/DOMURLUtils.h
@@ -39,7 +39,7 @@
 public:
     virtual void setURL(const KURL&) = 0;
     virtual void setInput(const String&) = 0;
-    ~DOMURLUtils() override { }
+    ~DOMURLUtils() override;
 
     void setHref(const String&);
 
@@ -50,8 +50,15 @@
     void setHostname(const String&);
     void setPort(const String&);
     void setPathname(const String&);
-    void setSearch(const String&);
     void setHash(const String&);
+    virtual void setSearch(const String&);
+
+protected:
+    void setSearchInternal(const String&);
+
+    bool isInUpdate() const { return m_isInUpdate; }
+
+    bool m_isInUpdate = false;
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 9f651847..71ca1303 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5149,7 +5149,7 @@
 {
     if (!m_frame)
         return;
-    m_frame->updateSecurityOrigin(getSecurityOrigin());
+    m_frame->script().updateSecurityOrigin(getSecurityOrigin());
 }
 
 bool Document::isContextThread() const
diff --git a/third_party/WebKit/Source/core/dom/URL.idl b/third_party/WebKit/Source/core/dom/URL.idl
index f5df0bb7b..5f8a2a6 100644
--- a/third_party/WebKit/Source/core/dom/URL.idl
+++ b/third_party/WebKit/Source/core/dom/URL.idl
@@ -44,6 +44,7 @@
     // TODO(philipj): The return type should not be nullable.
     [RaisesException, CallWith=ExecutionContext] static DOMString? createObjectURL(Blob blob);
     [CallWith=ExecutionContext] static void revokeObjectURL(DOMString url);
+    readonly attribute URLSearchParams searchParams;
 };
 
 URL implements URLUtils;
diff --git a/third_party/WebKit/Source/core/dom/URLSearchParams.cpp b/third_party/WebKit/Source/core/dom/URLSearchParams.cpp
index 906ec4c..5fbe1392 100644
--- a/third_party/WebKit/Source/core/dom/URLSearchParams.cpp
+++ b/third_party/WebKit/Source/core/dom/URLSearchParams.cpp
@@ -4,6 +4,7 @@
 
 #include "core/dom/URLSearchParams.h"
 
+#include "core/dom/DOMURL.h"
 #include "platform/network/FormDataEncoder.h"
 #include "platform/weborigin/KURL.h"
 #include "wtf/text/StringBuilder.h"
@@ -46,7 +47,8 @@
     return new URLSearchParams(String());
 }
 
-URLSearchParams::URLSearchParams(const String& queryString)
+URLSearchParams::URLSearchParams(const String& queryString, DOMURL* urlObject)
+    : m_urlObject(urlObject)
 {
     if (!queryString.isEmpty())
         setInput(queryString);
@@ -62,6 +64,29 @@
 {
 }
 
+DEFINE_TRACE(URLSearchParams)
+{
+    visitor->trace(m_urlObject);
+}
+
+#if ENABLE(ASSERT)
+DOMURL* URLSearchParams::urlObject() const
+{
+    return m_urlObject;
+}
+#endif
+
+void URLSearchParams::runUpdateSteps()
+{
+    if (!m_urlObject)
+        return;
+
+    if (m_urlObject->isInUpdate())
+        return;
+
+    m_urlObject->setSearchInternal(toString());
+}
+
 static String decodeString(String input)
 {
     return decodeURLEscapeSequences(input.replace('+', ' '));
@@ -69,7 +94,8 @@
 
 void URLSearchParams::setInput(const String& queryString)
 {
-    DCHECK(m_params.isEmpty());
+    m_params.clear();
+
     size_t start = 0;
     size_t queryStringLength = queryString.length();
     while (start < queryStringLength) {
@@ -91,7 +117,9 @@
         }
         start = nameValueEnd + 1;
     }
+    runUpdateSteps();
 }
+
 static String encodeString(const String& input)
 {
     return encodeWithURLEscapeSequences(input).replace("%20", "+");
@@ -113,6 +141,7 @@
 void URLSearchParams::append(const String& name, const String& value)
 {
     m_params.append(std::make_pair(name, value));
+    runUpdateSteps();
 }
 
 void URLSearchParams::deleteAllWithName(const String& name)
@@ -123,6 +152,7 @@
         else
             i++;
     }
+    runUpdateSteps();
 }
 
 String URLSearchParams::get(const String& name) const
@@ -174,6 +204,8 @@
     // Otherwise, append a new name-value pair to the list.
     if (!foundMatch)
         append(name, value);
+    else
+        runUpdateSteps();
 }
 
 PassRefPtr<EncodedFormData> URLSearchParams::encodeFormData() const
@@ -184,10 +216,6 @@
     return EncodedFormData::create(encodedData.data(), encodedData.size());
 }
 
-DEFINE_TRACE(URLSearchParams)
-{
-}
-
 PairIterable<String, String>::IterationSource* URLSearchParams::startIteration(ScriptState*, ExceptionState&)
 {
     return new URLSearchParamsIterationSource(m_params);
diff --git a/third_party/WebKit/Source/core/dom/URLSearchParams.h b/third_party/WebKit/Source/core/dom/URLSearchParams.h
index 59c7974..5b2b4463 100644
--- a/third_party/WebKit/Source/core/dom/URLSearchParams.h
+++ b/third_party/WebKit/Source/core/dom/URLSearchParams.h
@@ -18,6 +18,7 @@
 namespace blink {
 
 class ExceptionState;
+class DOMURL;
 
 typedef USVStringOrURLSearchParams URLSearchParamsInit;
 
@@ -25,15 +26,14 @@
     DEFINE_WRAPPERTYPEINFO();
 
 public:
-    // TODO(mkwst): We should support integration with URLUtils, as explored in
-    // https://codereview.chromium.org/143313002/. That approach is totally
-    // reasonable, but relies on Node switching to Oilpan. Sigbjorn assures me
-    // that this will happen Real Soon Now(tm).
     static URLSearchParams* create(const URLSearchParamsInit&);
 
-    // TODO(mkwst): ScriptWrappable doesn't have a destructor with Oilpan, so this
-    // won't need to be virtual once that's the default.
-    virtual ~URLSearchParams();
+    static URLSearchParams* create(const String& queryString, DOMURL* urlObject = nullptr)
+    {
+        return new URLSearchParams(queryString, urlObject);
+    }
+
+    ~URLSearchParams();
 
     // URLSearchParams interface methods
     String toString() const;
@@ -49,16 +49,24 @@
     PassRefPtr<EncodedFormData> encodeFormData() const;
     const Vector<std::pair<String, String>>& params() const { return m_params; }
 
+#if ENABLE(ASSERT)
+    DOMURL* urlObject() const;
+#endif
+
     DECLARE_TRACE();
 
 private:
     FRIEND_TEST_ALL_PREFIXES(URLSearchParamsTest, EncodedFormData);
 
-    explicit URLSearchParams(const String&);
+    explicit URLSearchParams(const String&, DOMURL* = nullptr);
     explicit URLSearchParams(URLSearchParams*);
+
+    void runUpdateSteps();
+    IterationSource* startIteration(ScriptState*, ExceptionState&) override;
+
     Vector<std::pair<String, String>> m_params;
 
-    IterationSource* startIteration(ScriptState*, ExceptionState&) override;
+    WeakMember<DOMURL> m_urlObject;
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/URLUtils.idl b/third_party/WebKit/Source/core/dom/URLUtils.idl
index 8826e11..e38f421 100644
--- a/third_party/WebKit/Source/core/dom/URLUtils.idl
+++ b/third_party/WebKit/Source/core/dom/URLUtils.idl
@@ -43,7 +43,5 @@
     attribute USVString port;
     attribute USVString pathname;
     attribute USVString search;
-    // Not yet implemented.
-    // attribute URLSearchParams searchParams;
     attribute USVString hash;
 };
diff --git a/third_party/WebKit/Source/core/fetch/FetchContext.cpp b/third_party/WebKit/Source/core/fetch/FetchContext.cpp
index ba93f78..c91f368 100644
--- a/third_party/WebKit/Source/core/fetch/FetchContext.cpp
+++ b/third_party/WebKit/Source/core/fetch/FetchContext.cpp
@@ -56,7 +56,7 @@
     return CachePolicyVerify;
 }
 
-WebCachePolicy FetchContext::resourceRequestCachePolicy(const ResourceRequest&, Resource::Type) const
+WebCachePolicy FetchContext::resourceRequestCachePolicy(const ResourceRequest&, Resource::Type, FetchRequest::DeferOption defer) const
 {
     return WebCachePolicy::UseProtocolCachePolicy;
 }
diff --git a/third_party/WebKit/Source/core/fetch/FetchContext.h b/third_party/WebKit/Source/core/fetch/FetchContext.h
index c522f85..d229de2 100644
--- a/third_party/WebKit/Source/core/fetch/FetchContext.h
+++ b/third_party/WebKit/Source/core/fetch/FetchContext.h
@@ -73,7 +73,7 @@
     virtual void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType);
     virtual void setFirstPartyForCookies(ResourceRequest&);
     virtual CachePolicy getCachePolicy() const;
-    virtual WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Resource::Type) const;
+    virtual WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Resource::Type, FetchRequest::DeferOption) const;
 
     virtual void dispatchDidChangeResourcePriority(unsigned long identifier, ResourceLoadPriority, int intraPriorityValue);
     virtual void dispatchWillSendRequest(unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& = FetchInitiatorInfo());
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 906ffa18..6d7168c 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -446,7 +446,7 @@
 
     updateMemoryCacheStats(resource, policy, request, factory, isStaticData);
 
-    initializeResourceRequest(request.mutableResourceRequest(), factory.type());
+    initializeResourceRequest(request.mutableResourceRequest(), factory.type(), request.defer());
     switch (policy) {
     case Reload:
         memoryCache()->remove(resource);
@@ -525,10 +525,10 @@
     determineRequestContext(request, type, context().isMainFrame());
 }
 
-void ResourceFetcher::initializeResourceRequest(ResourceRequest& request, Resource::Type type)
+void ResourceFetcher::initializeResourceRequest(ResourceRequest& request, Resource::Type type, FetchRequest::DeferOption defer)
 {
     if (request.getCachePolicy() == WebCachePolicy::UseProtocolCachePolicy)
-        request.setCachePolicy(context().resourceRequestCachePolicy(request, type));
+        request.setCachePolicy(context().resourceRequestCachePolicy(request, type, defer));
     if (request.requestContext() == WebURLRequest::RequestContextUnspecified)
         determineRequestContext(request, type);
     if (type == Resource::LinkPrefetch)
@@ -548,7 +548,7 @@
 
     ResourceRequest revalidatingRequest(resource->resourceRequest());
     revalidatingRequest.clearHTTPReferrer();
-    initializeResourceRequest(revalidatingRequest, resource->getType());
+    initializeResourceRequest(revalidatingRequest, resource->getType(), request.defer());
 
     const AtomicString& lastModified = resource->response().httpHeaderField(HTTPNames::Last_Modified);
     const AtomicString& eTag = resource->response().httpHeaderField(HTTPNames::ETag);
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.h b/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
index 76bfe3cf..627f1fe 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
@@ -165,7 +165,7 @@
 
     void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&);
 
-    void initializeResourceRequest(ResourceRequest&, Resource::Type);
+    void initializeResourceRequest(ResourceRequest&, Resource::Type, FetchRequest::DeferOption);
 
     bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy);
     bool shouldDeferImageLoad(const KURL&) const;
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
index 3852f1b..261ee83 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -226,7 +226,7 @@
     m_image->setPremultiplied(premultiplyAlpha);
 }
 
-ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect, const ImageBitmapOptions& options)
+ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect, const ImageBitmapOptions& options, const bool& isImageDataPremultiplied)
 {
     bool flipY;
     bool premultiplyAlpha;
@@ -240,7 +240,11 @@
         int dstHeight = cropRect.height();
         // TODO (xidachen): skia doesn't support SkImage::NewRasterCopy from a kRGBA color type.
         // For now, we swap R and B channel and uses kBGRA color type.
-        SkImageInfo info = SkImageInfo::Make(cropRect.width(), dstHeight, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType);
+        SkImageInfo info;
+        if (!isImageDataPremultiplied)
+            info = SkImageInfo::Make(cropRect.width(), dstHeight, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType);
+        else
+            info = SkImageInfo::Make(cropRect.width(), dstHeight, kBGRA_8888_SkColorType, kPremul_SkAlphaType);
         int srcPixelBytesPerRow = info.bytesPerPixel() * data->size().width();
         int dstPixelBytesPerRow = info.bytesPerPixel() * cropRect.width();
         if (cropRect == IntRect(IntPoint(), data->size())) {
@@ -362,10 +366,10 @@
     return new ImageBitmap(canvas, normalizedCropRect, options);
 }
 
-ImageBitmap* ImageBitmap::create(ImageData* data, const IntRect& cropRect, const ImageBitmapOptions& options)
+ImageBitmap* ImageBitmap::create(ImageData* data, const IntRect& cropRect, const ImageBitmapOptions& options, const bool& isImageDataPremultiplied)
 {
     IntRect normalizedCropRect = normalizeRect(cropRect);
-    return new ImageBitmap(data, normalizedCropRect, options);
+    return new ImageBitmap(data, normalizedCropRect, options, isImageDataPremultiplied);
 }
 
 ImageBitmap* ImageBitmap::create(ImageBitmap* bitmap, const IntRect& cropRect, const ImageBitmapOptions& options)
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.h b/third_party/WebKit/Source/core/frame/ImageBitmap.h
index f82174b..88b8396 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -37,7 +37,7 @@
     static ImageBitmap* create(HTMLImageElement*, const IntRect&, Document*, const ImageBitmapOptions& = ImageBitmapOptions());
     static ImageBitmap* create(HTMLVideoElement*, const IntRect&, Document*, const ImageBitmapOptions& = ImageBitmapOptions());
     static ImageBitmap* create(HTMLCanvasElement*, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions());
-    static ImageBitmap* create(ImageData*, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions());
+    static ImageBitmap* create(ImageData*, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions(), const bool& isImageDataPremultiplied = false);
     static ImageBitmap* create(ImageBitmap*, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions());
     static ImageBitmap* create(PassRefPtr<StaticBitmapImage>);
     static ImageBitmap* create(PassRefPtr<StaticBitmapImage>, const IntRect&, const ImageBitmapOptions& = ImageBitmapOptions());
@@ -73,7 +73,7 @@
     ImageBitmap(HTMLImageElement*, const IntRect&, Document*, const ImageBitmapOptions&);
     ImageBitmap(HTMLVideoElement*, const IntRect&, Document*, const ImageBitmapOptions&);
     ImageBitmap(HTMLCanvasElement*, const IntRect&, const ImageBitmapOptions&);
-    ImageBitmap(ImageData*, const IntRect&, const ImageBitmapOptions&);
+    ImageBitmap(ImageData*, const IntRect&, const ImageBitmapOptions&, const bool&);
     ImageBitmap(ImageBitmap*, const IntRect&, const ImageBitmapOptions&);
     ImageBitmap(PassRefPtr<StaticBitmapImage>);
     ImageBitmap(PassRefPtr<StaticBitmapImage>, const IntRect&, const ImageBitmapOptions&);
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 25784320..e2c23aa 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -851,11 +851,6 @@
     page()->animator().scheduleVisualUpdate(this);
 }
 
-void LocalFrame::updateSecurityOrigin(SecurityOrigin* origin)
-{
-    script().updateSecurityOrigin(origin);
-}
-
 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
 
 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame)
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.h b/third_party/WebKit/Source/core/frame/LocalFrame.h
index 9f7b7dd5..ad9debd 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.h
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.h
@@ -186,8 +186,6 @@
     WebFrameScheduler* frameScheduler();
     void scheduleVisualUpdateUnlessThrottled();
 
-    void updateSecurityOrigin(SecurityOrigin*);
-
     bool isNavigationAllowed() const { return m_navigationDisableCount == 0; }
 
     ServiceRegistry* serviceRegistry() { return m_serviceRegistry; }
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 72b4c7a7..32c2ce5f 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2333,9 +2333,9 @@
     return *m_audioTracks;
 }
 
-void HTMLMediaElement::audioTrackChanged()
+void HTMLMediaElement::audioTrackChanged(WebMediaPlayer::TrackId trackId, bool enabled)
 {
-    WTF_LOG(Media, "HTMLMediaElement::audioTrackChanged(%p)", this);
+    WTF_LOG(Media, "HTMLMediaElement::audioTrackChanged(%p) trackId=%u enabled=%d", this, trackId, enabled);
     ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled());
 
     audioTracks().scheduleChangeEvent();
@@ -2391,7 +2391,7 @@
 
 void HTMLMediaElement::selectedVideoTrackChanged(WebMediaPlayer::TrackId* selectedTrackId)
 {
-    WTF_LOG(Media, "HTMLMediaElement::selectedVideoTrackChanged(%p)", this);
+    WTF_LOG(Media, "HTMLMediaElement::selectedVideoTrackChanged(%p) selectedTrackId=%s", this, selectedTrackId ? String::format("%u", *selectedTrackId).ascii().data() : "none");
     ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled());
 
     if (selectedTrackId)
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
index a90d467..3693e72 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -174,7 +174,7 @@
     void togglePlayState();
 
     AudioTrackList& audioTracks();
-    void audioTrackChanged();
+    void audioTrackChanged(WebMediaPlayer::TrackId, bool enabled);
 
     VideoTrackList& videoTracks();
     void selectedVideoTrackChanged(WebMediaPlayer::TrackId*);
diff --git a/third_party/WebKit/Source/core/html/track/AudioTrack.cpp b/third_party/WebKit/Source/core/html/track/AudioTrack.cpp
index 50b71043..5f0a5fe 100644
--- a/third_party/WebKit/Source/core/html/track/AudioTrack.cpp
+++ b/third_party/WebKit/Source/core/html/track/AudioTrack.cpp
@@ -32,7 +32,7 @@
     m_enabled = enabled;
 
     if (mediaElement())
-        mediaElement()->audioTrackChanged();
+        mediaElement()->audioTrackChanged(trackId(), enabled);
 }
 
 const AtomicString& AudioTrack::alternativeKeyword()
diff --git a/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp b/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp
index ca54c5c3..0221280a 100644
--- a/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp
@@ -66,8 +66,10 @@
         return;
 
     m_instrumentingAgents->setPageRuntimeAgent(this);
-    if (m_inspectedFrames->root()->loader().stateMachine()->committedFirstRealDocumentLoad())
-        m_inspectedFrames->root()->script().initializeMainWorld();
+    if (m_inspectedFrames->root()->loader().stateMachine()->committedFirstRealDocumentLoad()) {
+        for (const LocalFrame* frame : *m_inspectedFrames)
+            frame->script().initializeMainWorld();
+    }
     InspectorRuntimeAgent::enable(errorString);
 }
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 2a3e595..87e66a0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2143,18 +2143,19 @@
         return;
     }
 
+    LayoutUnit containerWidthInInlineDirection = containerLogicalWidth;
+    if (hasPerpendicularContainingBlock)
+        containerWidthInInlineDirection = perpendicularContainingBlockLogicalHeight();
+
     // Width calculations
     if (treatAsReplaced) {
         computedValues.m_extent = LayoutUnit(logicalWidthLength.value()) + borderAndPaddingLogicalWidth();
-    } else if (parent()->isLayoutGrid() && style()->logicalWidth().isAuto() && style()->logicalMinWidth().isAuto() && style()->overflowX() == OverflowVisible && containerLogicalWidth < minPreferredLogicalWidth()) {
+    } else if (parent()->isLayoutGrid() && style()->logicalWidth().isAuto() && style()->logicalMinWidth().isAuto() && style()->overflowX() == OverflowVisible && containerWidthInInlineDirection < minPreferredLogicalWidth()) {
         // TODO (lajava) Move this logic to the LayoutGrid class.
         // Implied minimum size of Grid items.
-        computedValues.m_extent = constrainLogicalWidthByMinMax(minPreferredLogicalWidth(), containerLogicalWidth, cb);
+        computedValues.m_extent = constrainLogicalWidthByMinMax(minPreferredLogicalWidth(), containerWidthInInlineDirection, cb);
     } else {
-        LayoutUnit containerWidthInInlineDirection = containerLogicalWidth;
-        if (hasPerpendicularContainingBlock) {
-            containerWidthInInlineDirection = perpendicularContainingBlockLogicalHeight();
-        } else if (cb->isFlexItem() && styleToUse.logicalWidth().hasPercent() && !isOutOfFlowPositioned()) {
+        if (!hasPerpendicularContainingBlock && cb->isFlexItem() && styleToUse.logicalWidth().hasPercent() && !isOutOfFlowPositioned()) {
             LayoutUnit stretchedWidth = toLayoutFlexibleBox(cb->parent())->childLogicalWidthForPercentageResolution(*cb);
             if (stretchedWidth != LayoutUnit(-1))
                 containerWidthInInlineDirection = stretchedWidth;
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 067a767..24e837d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -217,7 +217,7 @@
         PaintLayer* parentLayer = layer()->parent();
         setHasTransformRelatedProperty(false); // Either a transform wasn't specified or the object doesn't support transforms, so just null out the bit.
         setHasReflection(false);
-        layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer
+        layer()->removeOnlyThisLayerAfterStyleChange(); // calls destroyLayer() which clears m_layer
         if (wasFloatingBeforeStyleChanged && isFloating())
             setChildNeedsLayout();
         if (hadTransform)
@@ -295,20 +295,10 @@
 
 void LayoutBoxModelObject::createLayer(PaintLayerType type)
 {
-    // If the current paint invalidation container is not a stacking context and this object is
-    // stacked content, creating this layer may cause this object and its
-    // descendants to change paint invalidation container. Therefore we must eagerly invalidate
-    // them on the original paint invalidation container before creating the layer.
-    if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && styleRef().isStacked()) {
-        const LayoutBoxModelObject& currentPaintInvalidationContainer = containerForPaintInvalidation();
-        if (!currentPaintInvalidationContainer.styleRef().isStackingContext())
-            invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaintInvalidationContainer);
-    }
-
     ASSERT(!m_layer);
     m_layer = adoptPtr(new PaintLayer(this, type));
     setHasLayer(true);
-    m_layer->insertOnlyThisLayer();
+    m_layer->insertOnlyThisLayerAfterStyleChange();
 }
 
 void LayoutBoxModelObject::destroyLayer()
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
index 382d87c..b517444e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -1109,9 +1109,14 @@
     const Length& flexBasis = flexBasisForChild(child);
     if (!mainAxisLengthIsDefinite(child, flexBasis))
         return LayoutUnit(-1);
-    LayoutUnit mainSize = isColumnFlow() ? computeDefiniteLogicalHeight() : computeDefiniteLogicalWidth();
-    if (mainSize == LayoutUnit(-1))
-        return mainSize;
+    if (!flexBasis.hasPercent()) {
+        // If flex basis had a percentage, our size is guaranteed to be definite or the flex item's
+        // size could not be definite.
+        // Otherwise, we make up a percentage to check whether we have a definite size.
+        // TODO(cbiesinger): cache this somewhere
+        if (!mainAxisLengthIsDefinite(child, Length(0, Percent)))
+            return LayoutUnit(-1);
+    }
 
     if (hasOrthogonalFlow(child))
         return child.hasOverrideLogicalContentHeight() ? child.overrideLogicalContentHeight() : LayoutUnit(-1);
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
index 2e24425..05fd3d2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -363,12 +363,15 @@
 
         GridSizingData sizingData(gridColumnCount(), gridRowCount());
 
+        // 1- First, the track sizing algorithm is used to resolve the sizes of the grid columns.
         // At this point the logical width is always definite as the above call to updateLogicalWidth()
         // properly resolves intrinsic sizes. We cannot do the same for heights though because many code
         // paths inside updateLogicalHeight() require a previous call to setLogicalHeight() to resolve
         // heights properly (like for positioned items for example).
         computeTrackSizesForDirection(ForColumns, sizingData, availableLogicalWidth());
 
+        // 2- Next, the track sizing algorithm resolves the sizes of the grid rows, using the
+        // grid column sizes calculated in the previous step.
         if (logicalHeightWasIndefinite)
             computeIntrinsicLogicalHeight(sizingData);
         else
@@ -662,6 +665,31 @@
     return (direction == ForRows) ? hasDefiniteLogicalHeight() : hasDefiniteLogicalWidth();
 }
 
+static bool hasOverrideContainingBlockContentSizeForChild(const LayoutBox& child, GridTrackSizingDirection direction)
+{
+    return direction == ForColumns ? child.hasOverrideContainingBlockLogicalWidth() : child.overrideContainingBlockContentLogicalHeight();
+}
+
+static LayoutUnit overrideContainingBlockContentSizeForChild(const LayoutBox& child, GridTrackSizingDirection direction)
+{
+    return direction == ForColumns ? child.overrideContainingBlockContentLogicalWidth() : child.overrideContainingBlockContentLogicalHeight();
+}
+
+static void setOverrideContainingBlockContentSizeForChild(LayoutBox& child, GridTrackSizingDirection direction, LayoutUnit size)
+{
+    if (direction == ForColumns)
+        child.setOverrideContainingBlockContentLogicalWidth(size);
+    else
+        child.setOverrideContainingBlockContentLogicalHeight(size);
+}
+
+static bool shouldClearOverrideContainingBlockContentSizeForChild(const LayoutBox& child, GridTrackSizingDirection direction)
+{
+    if (direction == ForColumns)
+        return child.hasRelativeLogicalWidth() || child.styleRef().logicalWidth().isIntrinsicOrAuto();
+    return child.hasRelativeLogicalHeight() || child.styleRef().logicalHeight().isIntrinsicOrAuto();
+}
+
 GridTrackSize LayoutGrid::gridTrackSize(GridTrackSizingDirection direction, size_t i) const
 {
     bool isForColumns = direction == ForColumns;
@@ -686,72 +714,80 @@
     return GridTrackSize(minTrackBreadth, maxTrackBreadth);
 }
 
+bool LayoutGrid::isOrthogonalChild(const LayoutBox& child) const
+{
+    return child.isHorizontalWritingMode() != isHorizontalWritingMode();
+}
+
 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, GridSizingData& sizingData)
 {
+    GridTrackSizingDirection childBlockDirection = flowAwareDirectionForChild(child, ForRows);
     SubtreeLayoutScope layoutScope(child);
-    bool shouldClearContainingBlockLogicalHeight = child.hasRelativeLogicalHeight() || child.styleRef().logicalHeight().isIntrinsicOrAuto();
-    if (shouldClearContainingBlockLogicalHeight)
+    // If |child| has a relative logical height, we shouldn't let it override its intrinsic height, which is
+    // what we are interested in here. Thus we need to set the block-axis override size to -1 (no possible resolution).
+    if (shouldClearOverrideContainingBlockContentSizeForChild(child, ForRows)) {
+        setOverrideContainingBlockContentSizeForChild(child, childBlockDirection, LayoutUnit(-1));
         layoutScope.setNeedsLayout(&child, LayoutInvalidationReason::GridChanged);
+    }
 
     // We need to clear the stretched height to properly compute logical height during layout.
     if (child.needsLayout())
         child.clearOverrideLogicalContentHeight();
 
-    // If |child| has a relative logical height, we shouldn't let it override its intrinsic height, which is
-    // what we are interested in here. Thus we need to set the override logical height to -1 (no possible resolution).
-    if (shouldClearContainingBlockLogicalHeight)
-        child.setOverrideContainingBlockContentLogicalHeight(LayoutUnit(-1));
     child.layoutIfNeeded();
     return child.logicalHeight() + child.marginLogicalHeight();
 }
 
+GridTrackSizingDirection LayoutGrid::flowAwareDirectionForChild(const LayoutBox& child, GridTrackSizingDirection direction) const
+{
+    return !isOrthogonalChild(child) ? direction : (direction == ForColumns ? ForRows : ForColumns);
+}
+
 LayoutUnit LayoutGrid::minSizeForChild(LayoutBox& child, GridTrackSizingDirection direction, GridSizingData& sizingData)
 {
-    bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
     // TODO(svillar): Properly support orthogonal writing mode.
-    if (hasOrthogonalWritingMode)
+    if (isOrthogonalChild(child))
         return LayoutUnit();
-
-    bool isRowAxis = direction == ForColumns;
+    GridTrackSizingDirection childInlineDirection = flowAwareDirectionForChild(child, ForColumns);
+    bool isRowAxis = direction == childInlineDirection;
     const Length& childSize = isRowAxis ? child.styleRef().logicalWidth() : child.styleRef().logicalHeight();
     const Length& childMinSize = isRowAxis ? child.styleRef().logicalMinWidth() : child.styleRef().logicalMinHeight();
     if (!childSize.isAuto() || childMinSize.isAuto())
         return minContentForChild(child, direction, sizingData);
 
-    bool overrideLogicalWidthHasChanged = updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData);
+    bool overrideSizeHasChanged = updateOverrideContainingBlockContentSizeForChild(child, childInlineDirection, sizingData);
     if (isRowAxis) {
         LayoutUnit marginLogicalWidth = sizingData.sizingOperation == GridSizingData::TrackSizing ? computeMarginLogicalSizeForChild(InlineDirection, child) : marginIntrinsicLogicalWidthForChild(child);
-        return child.computeLogicalWidthUsing(MinSize, childMinSize, child.overrideContainingBlockContentLogicalWidth(), this) + marginLogicalWidth;
+        return child.computeLogicalWidthUsing(MinSize, childMinSize, overrideContainingBlockContentSizeForChild(child, childInlineDirection), this) + marginLogicalWidth;
     }
 
-    if (overrideLogicalWidthHasChanged)
+    if (overrideSizeHasChanged)
         child.setNeedsLayout(LayoutInvalidationReason::GridChanged);
     child.layoutIfNeeded();
     return child.computeLogicalHeightUsing(MinSize, childMinSize, child.intrinsicLogicalHeight()) + child.marginLogicalHeight() + child.scrollbarLogicalHeight();
 }
 
-bool LayoutGrid::updateOverrideContainingBlockContentLogicalWidthForChild(LayoutBox& child, GridSizingData& sizingData)
+bool LayoutGrid::updateOverrideContainingBlockContentSizeForChild(LayoutBox& child, GridTrackSizingDirection direction, GridSizingData& sizingData)
 {
-    LayoutUnit overrideWidth = gridAreaBreadthForChild(child, ForColumns, sizingData.columnTracks);
-    if (child.hasOverrideContainingBlockLogicalWidth() && child.overrideContainingBlockContentLogicalWidth() == overrideWidth)
+    LayoutUnit overrideSize = gridAreaBreadthForChild(child, direction, sizingData);
+    if (hasOverrideContainingBlockContentSizeForChild(child, direction) && overrideContainingBlockContentSizeForChild(child, direction) == overrideSize)
         return false;
 
-    child.setOverrideContainingBlockContentLogicalWidth(overrideWidth);
+    setOverrideContainingBlockContentSizeForChild(child, direction, overrideSize);
     return true;
 }
 
 LayoutUnit LayoutGrid::minContentForChild(LayoutBox& child, GridTrackSizingDirection direction, GridSizingData& sizingData)
 {
-    bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
     // FIXME: Properly support orthogonal writing mode.
-    if (hasOrthogonalWritingMode)
+    if (isOrthogonalChild(child))
         return LayoutUnit();
-
-    if (direction == ForColumns) {
+    GridTrackSizingDirection childInlineDirection = flowAwareDirectionForChild(child, ForColumns);
+    if (direction == childInlineDirection) {
         // If |child| has a relative logical width, we shouldn't let it override its intrinsic width, which is
-        // what we are interested in here. Thus we need to set the override logical width to -1 (no possible resolution).
-        if (child.hasRelativeLogicalWidth())
-            child.setOverrideContainingBlockContentLogicalWidth(LayoutUnit(-1));
+        // what we are interested in here. Thus we need to set the inline-axis override size to -1 (no possible resolution).
+        if (shouldClearOverrideContainingBlockContentSizeForChild(child, ForColumns))
+            setOverrideContainingBlockContentSizeForChild(child, childInlineDirection, LayoutUnit(-1));
 
         // FIXME: It's unclear if we should return the intrinsic width or the preferred width.
         // See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html
@@ -759,23 +795,21 @@
     }
 
     SubtreeLayoutScope layouter(child);
-    if (updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData))
+    if (updateOverrideContainingBlockContentSizeForChild(child, childInlineDirection, sizingData))
         child.setNeedsLayout(LayoutInvalidationReason::GridChanged);
     return logicalHeightForChild(child, sizingData);
 }
 
 LayoutUnit LayoutGrid::maxContentForChild(LayoutBox& child, GridTrackSizingDirection direction, GridSizingData& sizingData)
 {
-    bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
-    // FIXME: Properly support orthogonal writing mode.
-    if (hasOrthogonalWritingMode)
+    if (isOrthogonalChild(child))
         return LayoutUnit();
-
-    if (direction == ForColumns) {
+    GridTrackSizingDirection childInlineDirection = flowAwareDirectionForChild(child, ForColumns);
+    if (direction == childInlineDirection) {
         // If |child| has a relative logical width, we shouldn't let it override its intrinsic width, which is
-        // what we are interested in here. Thus we need to set the override logical width to -1 (no possible resolution).
-        if (child.hasRelativeLogicalWidth())
-            child.setOverrideContainingBlockContentLogicalWidth(LayoutUnit(-1));
+        // what we are interested in here. Thus we need to set the inline-axis override size to -1 (no possible resolution).
+        if (shouldClearOverrideContainingBlockContentSizeForChild(child, ForColumns))
+            setOverrideContainingBlockContentSizeForChild(child, childInlineDirection, LayoutUnit(-1));
 
         // FIXME: It's unclear if we should return the intrinsic width or the preferred width.
         // See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html
@@ -783,7 +817,7 @@
     }
 
     SubtreeLayoutScope layouter(child);
-    if (updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData))
+    if (updateOverrideContainingBlockContentSizeForChild(child, childInlineDirection, sizingData))
         child.setNeedsLayout(LayoutInvalidationReason::GridChanged);
     return logicalHeightForChild(child, sizingData);
 }
@@ -1490,10 +1524,8 @@
     if (!positionedDescendants)
         return;
 
-    bool containerHasHorizontalWritingMode = isHorizontalWritingMode();
     for (auto* child : *positionedDescendants) {
-        bool hasOrthogonalWritingMode = child->isHorizontalWritingMode() != containerHasHorizontalWritingMode;
-        if (hasOrthogonalWritingMode) {
+        if (isOrthogonalChild(*child)) {
             // FIXME: Properly support orthogonal writing mode.
             continue;
         }
@@ -1516,7 +1548,7 @@
 
 void LayoutGrid::offsetAndBreadthForPositionedChild(const LayoutBox& child, GridTrackSizingDirection direction, LayoutUnit& offset, LayoutUnit& breadth)
 {
-    ASSERT(child.isHorizontalWritingMode() == isHorizontalWritingMode());
+    ASSERT(!isOrthogonalChild(child));
     bool isForColumns = direction == ForColumns;
 
     GridSpan positions = GridPositionsResolver::resolveGridPositionsFromStyle(*style(), child, direction);
@@ -1606,8 +1638,9 @@
     return direction == ForColumns ? area.columns : area.rows;
 }
 
-LayoutUnit LayoutGrid::gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection direction, const Vector<GridTrack>& tracks) const
+LayoutUnit LayoutGrid::gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection direction, const GridSizingData& sizingData) const
 {
+    const Vector<GridTrack>& tracks = direction == ForColumns ? sizingData.columnTracks : sizingData.rowTracks;
     const GridSpan& span = cachedGridSpan(child, direction);
     LayoutUnit gridAreaBreadth;
     for (const auto& trackPosition : span)
@@ -1805,7 +1838,6 @@
 
 GridAxisPosition LayoutGrid::columnAxisPositionForChild(const LayoutBox& child) const
 {
-    bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
     bool hasSameWritingMode = child.styleRef().getWritingMode() == styleRef().getWritingMode();
 
     switch (ComputedStyle::resolveAlignment(styleRef(), child.styleRef(), ItemPositionStretch)) {
@@ -1813,12 +1845,12 @@
         // If orthogonal writing-modes, this computes to 'start'.
         // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
         // self-start is based on the child's block axis direction. That's why we need to check against the grid container's block flow.
-        return (hasOrthogonalWritingMode || hasSameWritingMode) ? GridAxisStart : GridAxisEnd;
+        return (isOrthogonalChild(child) || hasSameWritingMode) ? GridAxisStart : GridAxisEnd;
     case ItemPositionSelfEnd:
         // If orthogonal writing-modes, this computes to 'end'.
         // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
         // self-end is based on the child's block axis direction. That's why we need to check against the grid container's block flow.
-        return (hasOrthogonalWritingMode || hasSameWritingMode) ? GridAxisEnd : GridAxisStart;
+        return (isOrthogonalChild(child) || hasSameWritingMode) ? GridAxisEnd : GridAxisStart;
     case ItemPositionLeft:
         // The alignment axis (column axis) and the inline axis are parallell in
         // orthogonal writing mode. Otherwise this this is equivalent to 'start'.
@@ -1828,7 +1860,7 @@
         // The alignment axis (column axis) and the inline axis are parallell in
         // orthogonal writing mode. Otherwise this this is equivalent to 'start'.
         // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
-        return hasOrthogonalWritingMode ? GridAxisEnd : GridAxisStart;
+        return isOrthogonalChild(child) ? GridAxisEnd : GridAxisStart;
     case ItemPositionCenter:
         return GridAxisCenter;
     case ItemPositionFlexStart: // Only used in flex layout, otherwise equivalent to 'start'.
@@ -1854,7 +1886,6 @@
 
 GridAxisPosition LayoutGrid::rowAxisPositionForChild(const LayoutBox& child) const
 {
-    bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
     bool hasSameDirection = child.styleRef().direction() == styleRef().direction();
     bool isLTR = styleRef().isLeftToRightDirection();
 
@@ -1863,11 +1894,11 @@
         // For orthogonal writing-modes, this computes to 'start'
         // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
         // self-start is based on the child's direction. That's why we need to check against the grid container's direction.
-        return (hasOrthogonalWritingMode || hasSameDirection) ? GridAxisStart : GridAxisEnd;
+        return (isOrthogonalChild(child) || hasSameDirection) ? GridAxisStart : GridAxisEnd;
     case ItemPositionSelfEnd:
         // For orthogonal writing-modes, this computes to 'start'
         // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
-        return (hasOrthogonalWritingMode || hasSameDirection) ? GridAxisEnd : GridAxisStart;
+        return (isOrthogonalChild(child) || hasSameDirection) ? GridAxisEnd : GridAxisStart;
     case ItemPositionLeft:
         return isLTR ? GridAxisStart : GridAxisEnd;
     case ItemPositionRight:
@@ -2078,7 +2109,7 @@
 LayoutPoint LayoutGrid::findChildLogicalPosition(const LayoutBox& child, GridSizingData& sizingData) const
 {
     LayoutUnit rowAxisOffset = rowAxisOffsetForChild(child, sizingData);
-    // We stored m_columnPosition s's data ignoring the direction, hence we might need now
+    // We stored m_columnPosition's data ignoring the direction, hence we might need now
     // to translate positions from RTL to LTR, as it's more convenient for painting.
     if (!style()->isLeftToRightDirection()) {
         LayoutUnit alignmentOffset =  m_columnPositions[0] - borderAndPaddingStart();
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.h b/third_party/WebKit/Source/core/layout/LayoutGrid.h
index b9d3209..9e4437b0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -148,7 +148,7 @@
 
     GridTrackSize gridTrackSize(GridTrackSizingDirection, size_t) const;
 
-    bool updateOverrideContainingBlockContentLogicalWidthForChild(LayoutBox&, GridSizingData&);
+    bool updateOverrideContainingBlockContentSizeForChild(LayoutBox&, GridTrackSizingDirection, GridSizingData&);
     LayoutUnit logicalHeightForChild(LayoutBox&, GridSizingData&);
     LayoutUnit minSizeForChild(LayoutBox&, GridTrackSizingDirection, GridSizingData&);
     LayoutUnit minContentForChild(LayoutBox&, GridTrackSizingDirection, GridSizingData&);
@@ -162,7 +162,7 @@
     GridArea cachedGridArea(const LayoutBox&) const;
     GridSpan cachedGridSpan(const LayoutBox&, GridTrackSizingDirection) const;
 
-    LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection, const Vector<GridTrack>&) const;
+    LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, GridTrackSizingDirection, const GridSizingData&) const;
     LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets(const LayoutBox&, GridTrackSizingDirection, const GridSizingData&) const;
 
     void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, GridSizingData&);
@@ -198,6 +198,9 @@
 
     bool hasDefiniteLogicalSize(GridTrackSizingDirection) const;
 
+    bool isOrthogonalChild(const LayoutBox&) const;
+    GridTrackSizingDirection flowAwareDirectionForChild(const LayoutBox&, GridTrackSizingDirection) const;
+
     typedef Vector<Vector<GridCell>> GridRepresentation;
     GridRepresentation m_grid;
     bool m_gridIsDirty;
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index 4e388740..20b46ed 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -386,6 +386,7 @@
 
     if (FragmentationContext* enclosingFragmentationContext = this->enclosingFragmentationContext()) {
         m_blockOffsetInEnclosingFragmentationContext = multiColumnBlockFlow()->offsetFromLogicalTopOfFirstPage();
+        m_blockOffsetInEnclosingFragmentationContext += multiColumnBlockFlow()->borderAndPaddingBefore();
 
         if (LayoutMultiColumnFlowThread* enclosingFlowThread = enclosingFragmentationContext->associatedFlowThread()) {
             if (LayoutMultiColumnSet* firstSet = firstMultiColumnSet()) {
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index d80c768..0c6f807a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -352,7 +352,7 @@
     // To avoid the problem altogether, detect early if we're inside a hidden SVG subtree
     // and stop creating layers at all for these cases - they're not used anyways.
     if (newChild->hasLayer() && !layerCreationAllowedForSubtree())
-        toLayoutBoxModelObject(newChild)->layer()->removeOnlyThisLayer();
+        toLayoutBoxModelObject(newChild)->layer()->removeOnlyThisLayerAfterStyleChange();
 }
 
 void LayoutObject::removeChild(LayoutObject* oldChild)
diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
index 67822a1..d743aac8 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
@@ -35,7 +35,7 @@
 
 LayoutUnit MultiColumnFragmentainerGroup::blockOffsetInEnclosingFragmentationContext() const
 {
-    return logicalTop() + m_columnSet.logicalTop() + m_columnSet.multiColumnFlowThread()->blockOffsetInEnclosingFragmentationContext();
+    return logicalTop() + m_columnSet.logicalTopFromMulticolContentEdge() + m_columnSet.multiColumnFlowThread()->blockOffsetInEnclosingFragmentationContext();
 }
 
 void MultiColumnFragmentainerGroup::resetColumnHeight()
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 0a63d3a..5ad8728 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -57,6 +57,7 @@
 #include "core/loader/PingLoader.h"
 #include "core/loader/ProgressTracker.h"
 #include "core/loader/appcache/ApplicationCacheHost.h"
+#include "core/page/NetworkStateNotifier.h"
 #include "core/page/Page.h"
 #include "core/svg/graphics/SVGImageChromeClient.h"
 #include "core/timing/DOMWindowPerformance.h"
@@ -175,7 +176,7 @@
     return WebCachePolicy::UseProtocolCachePolicy;
 }
 
-WebCachePolicy FrameFetchContext::resourceRequestCachePolicy(const ResourceRequest& request, Resource::Type type) const
+WebCachePolicy FrameFetchContext::resourceRequestCachePolicy(const ResourceRequest& request, Resource::Type type, FetchRequest::DeferOption defer) const
 {
     ASSERT(frame());
     if (type == Resource::MainResource) {
@@ -204,16 +205,27 @@
     // For users on slow connections, we want to avoid blocking the parser in
     // the main frame on script loads inserted via document.write, since it can
     // add significant delays before page content is displayed on the screen.
-    // For now, as a prototype, we block fetches for main frame scripts
-    // inserted via document.write as long as the
-    // disallowFetchForDocWrittenScriptsInMainFrame setting is enabled. In the
-    // future, we'll extend this logic to only block if estimated network RTT
-    // is above some threshold.
     if (type == Resource::Script && isMainFrame()) {
         const bool isInDocumentWrite = m_document && m_document->isInDocumentWrite();
         const bool disallowFetchForDocWriteScripts = frame()->settings() && frame()->settings()->disallowFetchForDocWrittenScriptsInMainFrame();
-        if (isInDocumentWrite && disallowFetchForDocWriteScripts)
-            return WebCachePolicy::ReturnCacheDataDontLoad;
+
+        if (isInDocumentWrite && disallowFetchForDocWriteScripts) {
+            // only synchronously loaded scripts should be blocked
+            const bool isSync = defer == FetchRequest::NoDefer;
+
+            // Not blocking same origin scripts as they may be used to render main page content
+            // whereas cross-origin scripts inserted via document.write are likely
+            // for third party content.
+            const bool isThirdParty = request.url().host() != m_document->getSecurityOrigin()->domain();
+
+            // Only blocking in slow connections where the performance penalty is worst case.
+            // For now we restrict slow connections to 2G, in future this might be expanded using the
+            // network quality estimator.
+            const bool isSlowConnection = networkStateNotifier().connectionType() == WebConnectionTypeCellular2G;
+
+            if (isSync && isThirdParty && isSlowConnection)
+                return WebCachePolicy::ReturnCacheDataDontLoad;
+        }
     }
 
     if (request.isConditional())
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.h b/third_party/WebKit/Source/core/loader/FrameFetchContext.h
index 001a5cfa..d5dd9aa 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.h
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.h
@@ -70,7 +70,7 @@
     void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType) override;
     void setFirstPartyForCookies(ResourceRequest&) override;
     CachePolicy getCachePolicy() const override;
-    WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Resource::Type) const override;
+    WebCachePolicy resourceRequestCachePolicy(const ResourceRequest&, Resource::Type, FetchRequest::DeferOption) const override;
     void dispatchDidChangeResourcePriority(unsigned long identifier, ResourceLoadPriority, int intraPriorityValue) override;
     void dispatchWillSendRequest(unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& = FetchInitiatorInfo()) override;
     void dispatchDidLoadResourceFromMemoryCache(const Resource*, WebURLRequest::FrameType, WebURLRequest::RequestContext) override;
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index d654b80b..b3b12fa 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -396,47 +396,47 @@
 {
     // Default case
     ResourceRequest request("http://www.example.com");
-    EXPECT_EQ(WebCachePolicy::UseProtocolCachePolicy, fetchContext->resourceRequestCachePolicy(request, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::UseProtocolCachePolicy, fetchContext->resourceRequestCachePolicy(request, Resource::MainResource, FetchRequest::NoDefer));
 
     // Post
     ResourceRequest postRequest("http://www.example.com");
     postRequest.setHTTPMethod("POST");
-    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, fetchContext->resourceRequestCachePolicy(postRequest, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, fetchContext->resourceRequestCachePolicy(postRequest, Resource::MainResource, FetchRequest::NoDefer));
 
     // Re-post
     document->frame()->loader().setLoadType(FrameLoadTypeBackForward);
-    EXPECT_EQ(WebCachePolicy::ReturnCacheDataDontLoad, fetchContext->resourceRequestCachePolicy(postRequest, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ReturnCacheDataDontLoad, fetchContext->resourceRequestCachePolicy(postRequest, Resource::MainResource, FetchRequest::NoDefer));
 
     // Enconding overriden
     document->frame()->loader().setLoadType(FrameLoadTypeStandard);
     document->frame()->host()->setOverrideEncoding("foo");
-    EXPECT_EQ(WebCachePolicy::ReturnCacheDataElseLoad, fetchContext->resourceRequestCachePolicy(request, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ReturnCacheDataElseLoad, fetchContext->resourceRequestCachePolicy(request, Resource::MainResource, FetchRequest::NoDefer));
     document->frame()->host()->setOverrideEncoding(AtomicString());
 
     // FrameLoadTypeSame
     document->frame()->loader().setLoadType(FrameLoadTypeSame);
-    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, fetchContext->resourceRequestCachePolicy(request, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, fetchContext->resourceRequestCachePolicy(request, Resource::MainResource, FetchRequest::NoDefer));
 
     // Conditional request
     document->frame()->loader().setLoadType(FrameLoadTypeStandard);
     ResourceRequest conditional("http://www.example.com");
     conditional.setHTTPHeaderField(HTTPNames::If_Modified_Since, "foo");
-    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, fetchContext->resourceRequestCachePolicy(conditional, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, fetchContext->resourceRequestCachePolicy(conditional, Resource::MainResource, FetchRequest::NoDefer));
 
     // Set up a child frame
     FrameFetchContext* childFetchContext = createChildFrame();
 
     // Child frame as part of back/forward
     document->frame()->loader().setLoadType(FrameLoadTypeBackForward);
-    EXPECT_EQ(WebCachePolicy::ReturnCacheDataElseLoad, childFetchContext->resourceRequestCachePolicy(request, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ReturnCacheDataElseLoad, childFetchContext->resourceRequestCachePolicy(request, Resource::MainResource, FetchRequest::NoDefer));
 
     // Child frame as part of reload
     document->frame()->loader().setLoadType(FrameLoadTypeReload);
-    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, childFetchContext->resourceRequestCachePolicy(request, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::ValidatingCacheData, childFetchContext->resourceRequestCachePolicy(request, Resource::MainResource, FetchRequest::NoDefer));
 
     // Child frame as part of reload bypassing cache
     document->frame()->loader().setLoadType(FrameLoadTypeReloadBypassingCache);
-    EXPECT_EQ(WebCachePolicy::BypassingCache, childFetchContext->resourceRequestCachePolicy(request, Resource::MainResource));
+    EXPECT_EQ(WebCachePolicy::BypassingCache, childFetchContext->resourceRequestCachePolicy(request, Resource::MainResource, FetchRequest::NoDefer));
 }
 
 TEST_F(FrameFetchContextTest, ModifyPriorityForExperiments)
diff --git a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
index 6bbba10..550d93d 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
+++ b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
@@ -222,9 +222,6 @@
     virtual void didRequestAutocomplete(HTMLFormElement*) = 0;
 
     virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings; }
-    // Informs the embedder that a WebGL canvas inside this frame received a lost context
-    // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h).
-    virtual void didLoseWebGLContext(int) { }
 
     // If an HTML document is being loaded, informs the embedder that the document will have its <body> attached soon.
     virtual void dispatchWillInsertBody() { }
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 5eed8187..7b419ad 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1252,11 +1252,12 @@
     return oldChild;
 }
 
-void PaintLayer::removeOnlyThisLayer()
+void PaintLayer::removeOnlyThisLayerAfterStyleChange()
 {
     if (!m_parent)
         return;
 
+    bool didSetPaintInvalidation = false;
     if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
         DisableCompositingQueryAsserts disabler; // We need the current compositing status.
         if (isPaintInvalidationContainer()) {
@@ -1266,9 +1267,15 @@
             DisablePaintInvalidationStateAsserts disabler;
             layoutObject()->invalidatePaintIncludingNonCompositingDescendants();
             layoutObject()->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
+            didSetPaintInvalidation = true;
         }
     }
 
+    if (!didSetPaintInvalidation && isSelfPaintingLayer()) {
+        if (PaintLayer* enclosingSelfPaintingLayer = m_parent->enclosingSelfPaintingLayer())
+            enclosingSelfPaintingLayer->mergeNeedsPaintPhaseFlagsFrom(*this);
+    }
+
     clipper().clearClipRectsIncludingDescendants();
 
     PaintLayer* nextSib = nextSibling();
@@ -1295,7 +1302,7 @@
     m_layoutObject->destroyLayer();
 }
 
-void PaintLayer::insertOnlyThisLayer()
+void PaintLayer::insertOnlyThisLayerAfterStyleChange()
 {
     if (!m_parent && layoutObject()->parent()) {
         // We need to connect ourselves when our layoutObject() has a parent.
@@ -1310,6 +1317,23 @@
     for (LayoutObject* curr = layoutObject()->slowFirstChild(); curr; curr = curr->nextSibling())
         curr->moveLayers(m_parent, this);
 
+    // If the previous paint invalidation container is not a stacking context and this object is
+    // stacked content, creating this layer may cause this object and its descendants to change
+    // paint invalidation container.
+    bool didSetPaintInvalidation = false;
+    if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && !layoutObject()->isLayoutView() && layoutObject()->isRooted() && layoutObject()->styleRef().isStacked()) {
+        const LayoutBoxModelObject& previousPaintInvalidationContainer = layoutObject()->parent()->containerForPaintInvalidation();
+        if (!previousPaintInvalidationContainer.styleRef().isStackingContext()) {
+            layoutObject()->invalidatePaintIncludingNonSelfPaintingLayerDescendants(previousPaintInvalidationContainer);
+            didSetPaintInvalidation = true;
+        }
+    }
+
+    if (!didSetPaintInvalidation && isSelfPaintingLayer()) {
+        if (PaintLayer* enclosingSelfPaintingLayer = m_parent->enclosingSelfPaintingLayer())
+            mergeNeedsPaintPhaseFlagsFrom(*enclosingSelfPaintingLayer);
+    }
+
     // Clear out all the clip rects.
     clipper().clearClipRectsIncludingDescendants();
 }
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h
index 2a28fab1..c24a277c 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -231,8 +231,8 @@
     void addChild(PaintLayer* newChild, PaintLayer* beforeChild = 0);
     PaintLayer* removeChild(PaintLayer*);
 
-    void removeOnlyThisLayer();
-    void insertOnlyThisLayer();
+    void removeOnlyThisLayerAfterStyleChange();
+    void insertOnlyThisLayerAfterStyleChange();
 
     void styleDidChange(StyleDifference, const ComputedStyle* oldStyle);
 
@@ -660,6 +660,7 @@
 
     // Used to skip PaintPhaseDescendantOutlinesOnly for layers that have never had descendant outlines.
     // Once it's set we never clear it because it's not easy to track if all outlines have been removed.
+    // For more details, see core/paint/REAME.md#Empty paint phase optimization.
     bool needsPaintPhaseDescendantOutlines() const { return m_needsPaintPhaseDescendantOutlines; }
     void setNeedsPaintPhaseDescendantOutlines() { ASSERT(isSelfPaintingLayer()); m_needsPaintPhaseDescendantOutlines = true; }
 
@@ -762,6 +763,13 @@
         return *m_rareData;
     }
 
+    void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer)
+    {
+        m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendantOutlines;
+        m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat;
+        m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDescendantBlockBackgrounds;
+    }
+
     unsigned m_layerType : 2; // PaintLayerType
 
     // Self-painting layer is an optimization where we avoid the heavy Layer painting
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
index b7f4bbf..3ff56a1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
@@ -364,7 +364,7 @@
 TEST_P(PaintLayerPainterTest, PaintPhasesUpdateOnLayerRemoval)
 {
     setBodyInnerHTML(
-        "<div id='layer' style='opacity: 0.5'>"
+        "<div id='layer' style='position: relative'>"
         "  <div style='height: 100px'>"
         "    <div style='height: 20px; outline: 1px solid red; background-color: green'>outline and background</div>"
         "    <div style='float: left'>float</div>"
@@ -383,7 +383,7 @@
     EXPECT_FALSE(htmlLayer.needsPaintPhaseFloat());
     EXPECT_FALSE(htmlLayer.needsPaintPhaseDescendantBlockBackgrounds());
 
-    toHTMLElement(layerDiv.node())->setAttribute(HTMLNames::styleAttr, "opacity: 1");
+    toHTMLElement(layerDiv.node())->setAttribute(HTMLNames::styleAttr, "");
     document().view()->updateAllLifecyclePhases();
 
     EXPECT_FALSE(layerDiv.hasLayer());
@@ -392,4 +392,32 @@
     EXPECT_TRUE(htmlLayer.needsPaintPhaseDescendantBlockBackgrounds());
 }
 
+TEST_P(PaintLayerPainterTest, PaintPhasesUpdateOnLayerAddition)
+{
+    setBodyInnerHTML(
+        "<div id='will-be-layer'>"
+        "  <div style='height: 100px'>"
+        "    <div style='height: 20px; outline: 1px solid red; background-color: green'>outline and background</div>"
+        "    <div style='float: left'>float</div>"
+        "  </div>"
+        "</div>");
+
+    LayoutBlock& layerDiv = *toLayoutBlock(document().getElementById("will-be-layer")->layoutObject());
+    EXPECT_FALSE(layerDiv.hasLayer());
+
+    PaintLayer& htmlLayer = *toLayoutBlock(document().documentElement()->layoutObject())->layer();
+    EXPECT_TRUE(htmlLayer.needsPaintPhaseDescendantOutlines());
+    EXPECT_TRUE(htmlLayer.needsPaintPhaseFloat());
+    EXPECT_TRUE(htmlLayer.needsPaintPhaseDescendantBlockBackgrounds());
+
+    toHTMLElement(layerDiv.node())->setAttribute(HTMLNames::styleAttr, "position: relative");
+    document().view()->updateAllLifecyclePhases();
+    ASSERT_TRUE(layerDiv.hasLayer());
+    PaintLayer& layer = *layerDiv.layer();
+    ASSERT_TRUE(layer.isSelfPaintingLayer());
+    EXPECT_TRUE(layer.needsPaintPhaseDescendantOutlines());
+    EXPECT_TRUE(layer.needsPaintPhaseFloat());
+    EXPECT_TRUE(layer.needsPaintPhaseDescendantBlockBackgrounds());
+}
+
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 5d834b4..087eaa3ce 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -621,16 +621,18 @@
 
     m_scrollbarManager.setCanDetachScrollbars(true);
 
-    DoubleSize originalScrollOffset = adjustedScrollOffset();
+    IntPoint originalOrigin = scrollOrigin();
     computeScrollDimensions();
 
     // Layout may cause us to be at an invalid scroll position. In this case we need
     // to pull our scroll offsets back to the max (or push them up to the min).
     DoublePoint clampedScrollPosition = clampScrollPosition(scrollPositionDouble());
-    if (clampedScrollPosition != scrollPositionDouble())
+    if (clampedScrollPosition != scrollPositionDouble()) {
         scrollToPosition(clampedScrollPosition);
-
-    if (originalScrollOffset != adjustedScrollOffset()) {
+    } else if (originalOrigin != scrollOrigin()) {
+        // TODO: We should be able to use scrollOriginChanged() here, but we can't because
+        // PaintLayerScrollableArea does not maintain that flag: it gets set, but it never
+        // gets unset.  We should unset the flag after layout.
         scrollPositionChanged(scrollPositionDouble(), ProgrammaticScroll);
     }
 
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp
index 35e8c50f..8340737 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp
@@ -139,6 +139,10 @@
 
     static void addObjectPaintProperties(const ObjectPaintProperties& paintProperties, PropertyTreePrinter<ClipPaintPropertyNode>& printer)
     {
+        if (const ClipPaintPropertyNode* cssClip = paintProperties.cssClip())
+            printer.addPropertyNode(cssClip, "CssClip");
+        if (const ClipPaintPropertyNode* cssClipFixedPosition = paintProperties.cssClipFixedPosition())
+            printer.addPropertyNode(cssClipFixedPosition, "CssClipFixedPosition");
         if (const ClipPaintPropertyNode* overflowClip = paintProperties.overflowClip())
             printer.addPropertyNode(overflowClip, "OverflowClip");
     }
diff --git a/third_party/WebKit/Source/core/paint/README.md b/third_party/WebKit/Source/core/paint/README.md
index b3516cd..645b76cb 100644
--- a/third_party/WebKit/Source/core/paint/README.md
+++ b/third_party/WebKit/Source/core/paint/README.md
@@ -216,3 +216,29 @@
 *   whether we can use cached subsequence for a PaintLayer.
 See `shouldCreateSubsequence()` and `shouldRepaintSubsequence()` in `PaintLayerPainter.cpp` for
 the conditions.
+
+## Empty paint phase optimization
+
+During painting, we walk the layout tree multiple times for multiple paint phases. Sometimes
+a layer contain nothing needing a certain paint phase and we can skip tree walk for such
+empty phases. Now we have optimized `PaintPhaseDescendantBlockBackgroundsOnly`,
+`PaintPhaseDescendantOutlinesOnly` and `PaintPhaseFloat` for empty paint phases.
+
+During paint invalidation, we set the containing self-painting layer's `needsPaintPhaseXXX`
+flag if the object has something needing to be painted in the paint phase.
+
+During painting, we check the flag before painting a paint phase and skip the tree walk if
+the flag is not set.
+
+It's hard to clear a `needsPaintPhaseXXX` flag when a layer no longer needs the paint phase,
+so we never clear the flags.
+
+When layer structure changes, and we are not invalidate paint of the changed subtree,
+we need to manually update the `needsPaintPhaseXXX` flags. For example, if an object changes
+style and creates a self-painting-layer, we copy the flags from its containing self-painting
+layer to this layer, assuming that this layer needs all paint phases that its container
+self-painting layer needs.
+
+We could update the `needsPaintPhaseXXX` flags in a separate tree walk, but that would regress
+performance of the first paint. For slimming paint v2, we can update the flags during the
+pre-painting tree walk to simplify the logics.
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
index 1cd8ead..47956d3 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
@@ -207,8 +207,6 @@
      */
     setRemoteAddress: function(ip, port)
     {
-        if (ip.indexOf(":") !== -1)
-            ip = "[" + ip + "]";
         this._remoteAddress = ip + ":" + port;
         this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.RemoteAddressChanged, this);
     },
diff --git a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
index 42593b1..ed3790f 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
@@ -470,8 +470,11 @@
 
     updateChildrenIfNecessary();
     unsigned columnCount = m_columns.size();
-    for (unsigned c = 0; c < columnCount; c++)
-        toAXTableColumn(m_columns[c].get())->headerObjectsForColumn(headers);
+    for (unsigned c = 0; c < columnCount; c++) {
+        AXObject* column = m_columns[c].get();
+        if (column->isTableCol())
+            toAXTableColumn(column)->headerObjectsForColumn(headers);
+    }
 }
 
 void AXTable::rowHeaders(AXObjectVector& headers)
@@ -481,8 +484,11 @@
 
     updateChildrenIfNecessary();
     unsigned rowCount = m_rows.size();
-    for (unsigned r = 0; r < rowCount; r++)
-        toAXTableRow(m_rows[r].get())->headerObjectsForRow(headers);
+    for (unsigned r = 0; r < rowCount; r++) {
+        AXObject* row = m_rows[r].get();
+        if (row->isTableRow())
+            toAXTableRow(m_rows[r].get())->headerObjectsForRow(headers);
+    }
 }
 
 unsigned AXTable::columnCount()
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
index 1f1a57e..3c06082 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
@@ -1034,12 +1034,6 @@
             buffer->setHasExpensiveOp();
     }
 
-    if (imageSource->isCanvasElement() && static_cast<HTMLCanvasElement*>(imageSource)->is3D()) {
-        // WebGL to 2D canvas: must flush graphics context to prevent a race
-        // FIXME: crbug.com/516331 Fix the underlying synchronization issue so this flush can be eliminated.
-        imageBuffer()->flushGpu(FlushReasonDrawImageOfWebGL);
-    }
-
     if (originClean() && wouldTaintOrigin(imageSource))
         setOriginTainted();
 }
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index 799d030..f38dc92 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -602,11 +602,14 @@
     ResourceLoaderOptions resourceLoaderOptions;
     resourceLoaderOptions.dataBufferingPolicy = DoNotBufferData;
     if (m_request->credentials() == WebURLRequest::FetchCredentialsModeInclude
+        || m_request->credentials() == WebURLRequest::FetchCredentialsModePassword
         || (m_request->credentials() == WebURLRequest::FetchCredentialsModeSameOrigin && !corsFlag)) {
         resourceLoaderOptions.allowCredentials = AllowStoredCredentials;
     }
-    if (m_request->credentials() == WebURLRequest::FetchCredentialsModeInclude)
+    if (m_request->credentials() == WebURLRequest::FetchCredentialsModeInclude
+        || m_request->credentials() == WebURLRequest::FetchCredentialsModePassword) {
         resourceLoaderOptions.credentialsRequested = ClientRequestedCredentials;
+    }
     resourceLoaderOptions.securityOrigin = m_request->origin().get();
 
     ThreadableLoaderOptions threadableLoaderOptions;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 1ec1427..dd0ca30 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -5041,13 +5041,6 @@
     ASSERT(m_contextLostMode != NotLostContext);
     m_autoRecoveryMethod = autoRecoveryMethod;
 
-    if (mode == RealLostContext) {
-        // Inform the embedder that a lost context was received. In response, the embedder might
-        // decide to take action such as asking the user for permission to use WebGL again.
-        if (LocalFrame* frame = canvas()->document().frame())
-            frame->loader().client()->didLoseWebGLContext(contextGL()->GetGraphicsResetStatusKHR());
-    }
-
     // Make absolutely sure we do not refer to an already-deleted texture or framebuffer.
     drawingBuffer()->setTexture2DBinding(0);
     drawingBuffer()->setFramebufferBinding(GL_FRAMEBUFFER, 0);
diff --git a/third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl b/third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl
index d916a0e..d06dd108 100644
--- a/third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl
+++ b/third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl
@@ -6,7 +6,6 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
 ] partial interface Navigator {
-    readonly attribute USB usb;
+    [OriginTrialEnabled=WebUSB] readonly attribute USB usb;
 };
diff --git a/third_party/WebKit/Source/modules/webusb/USB.idl b/third_party/WebKit/Source/modules/webusb/USB.idl
index 2c7489c..dd9986d 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.idl
+++ b/third_party/WebKit/Source/modules/webusb/USB.idl
@@ -7,7 +7,7 @@
 [
     GarbageCollected,
     NoInterfaceObject,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USB : EventTarget {
     attribute EventHandler onconnect;
     attribute EventHandler ondisconnect;
diff --git a/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl b/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl
index cbf37fa..81a8fb2 100644
--- a/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl
@@ -8,7 +8,7 @@
     Constructor(USBInterface deviceInterface, octet alternateSetting),
     RaisesException=Constructor,
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBAlternateInterface {
     readonly attribute octet alternateSetting;
     readonly attribute octet interfaceClass;
diff --git a/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl b/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl
index 3cd0ec97..6f96dfd 100644
--- a/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl
@@ -8,7 +8,7 @@
     Constructor(USBDevice device, octet configurationValue),
     RaisesException=Constructor,
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBConfiguration {
     readonly attribute octet configurationValue;
     readonly attribute DOMString? configurationName;
diff --git a/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl b/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl
index beaba0e..be53425 100644
--- a/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl
@@ -6,7 +6,7 @@
 
 [
     Constructor(DOMString type, optional USBConnectionEventInit eventInitDict),
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBConnectionEvent : Event {
     readonly attribute USBDevice device;
 };
diff --git a/third_party/WebKit/Source/modules/webusb/USBController.cpp b/third_party/WebKit/Source/modules/webusb/USBController.cpp
index 5277fa9..68f21c52 100644
--- a/third_party/WebKit/Source/modules/webusb/USBController.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USBController.cpp
@@ -15,7 +15,6 @@
 
 void USBController::provideTo(LocalFrame& frame, WebUSBClient* client)
 {
-    ASSERT(RuntimeEnabledFeatures::webUSBEnabled());
     USBController* controller = new USBController(frame, client);
     Supplement<LocalFrame>::provideTo(frame, supplementName(), controller);
 }
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
index b57aa4d..23109857 100644
--- a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
@@ -11,7 +11,6 @@
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/DOMArrayBufferView.h"
 #include "core/dom/DOMException.h"
-#include "core/dom/Document.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/webusb/USBConfiguration.h"
 #include "modules/webusb/USBControlTransferParameters.h"
@@ -31,9 +30,6 @@
 const char kInterfaceNotFound[] = "The interface number provided is not supported by the device in its current configuration.";
 const char kInterfaceStateChangeInProgress[] = "An operation that changes interface state is in progress.";
 const char kOpenRequired[] = "The device must be opened first.";
-const char kVisibiltyError[] = "Connection is only allowed while the page is visible. This is a temporary measure until we are able to effectively communicate to the user that the page is connected to a device.";
-
-
 
 String convertTransferStatus(const WebUSBTransferInfo::Status& status)
 {
@@ -65,13 +61,7 @@
             return;
 
         m_device->onDeviceOpenedOrClosed(m_desiredState);
-        if (m_device->page()->isPageVisible()) {
-            m_resolver->resolve();
-        } else {
-            m_device->pageVisibilityChanged();
-            m_resolver->reject(DOMException::create(SecurityError, kVisibiltyError));
-            return;
-        }
+        m_resolver->resolve();
     }
 
     void onError(const WebUSBError& e) override
@@ -288,7 +278,6 @@
 
 USBDevice::USBDevice(PassOwnPtr<WebUSBDevice> device, ExecutionContext* context)
     : ContextLifecycleObserver(context)
-    , PageLifecycleObserver(toDocument(context)->page())
     , m_device(device)
     , m_opened(false)
     , m_deviceStateChangeInProgress(false)
@@ -595,18 +584,9 @@
     }
 }
 
-void USBDevice::pageVisibilityChanged()
-{
-    if (!page()->isPageVisible() && m_opened) {
-        m_device->close(new WebUSBDeviceCloseCallbacks());
-        m_opened = false;
-    }
-}
-
 DEFINE_TRACE(USBDevice)
 {
     ContextLifecycleObserver::trace(visitor);
-    PageLifecycleObserver::trace(visitor);
 }
 
 int USBDevice::findConfigurationIndex(uint8_t configurationValue) const
@@ -641,19 +621,8 @@
     return -1;
 }
 
-bool USBDevice::ensurePageVisible(ScriptPromiseResolver* resolver) const
-{
-    if (!page()->isPageVisible()) {
-        resolver->reject(DOMException::create(SecurityError, kVisibiltyError));
-        return false;
-    }
-    return true;
-}
-
 bool USBDevice::ensureNoDeviceOrInterfaceChangeInProgress(ScriptPromiseResolver* resolver) const
 {
-    if (!ensurePageVisible(resolver))
-        return false;
     if (m_deviceStateChangeInProgress)
         resolver->reject(DOMException::create(InvalidStateError, kDeviceStateChangeInProgress));
     else if (anyInterfaceChangeInProgress())
@@ -665,8 +634,6 @@
 
 bool USBDevice::ensureDeviceConfigured(ScriptPromiseResolver* resolver) const
 {
-    if (!ensurePageVisible(resolver))
-        return false;
     if (m_deviceStateChangeInProgress)
         resolver->reject(DOMException::create(InvalidStateError, kDeviceStateChangeInProgress));
     else if (!m_opened)
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.h b/third_party/WebKit/Source/modules/webusb/USBDevice.h
index a5e01ee..9b5154b8 100644
--- a/third_party/WebKit/Source/modules/webusb/USBDevice.h
+++ b/third_party/WebKit/Source/modules/webusb/USBDevice.h
@@ -9,7 +9,6 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "bindings/modules/v8/UnionTypesModules.h"
 #include "core/dom/ContextLifecycleObserver.h"
-#include "core/page/PageLifecycleObserver.h"
 #include "platform/heap/Handle.h"
 #include "public/platform/modules/webusb/WebUSBDevice.h"
 #include "public/platform/modules/webusb/WebUSBDeviceInfo.h"
@@ -26,8 +25,7 @@
 class USBDevice
     : public GarbageCollectedFinalized<USBDevice>
     , public ContextLifecycleObserver
-    , public ScriptWrappable
-    , public PageLifecycleObserver {
+    , public ScriptWrappable {
     USING_GARBAGE_COLLECTED_MIXIN(USBDevice);
     DEFINE_WRAPPERTYPEINFO();
 public:
@@ -90,16 +88,12 @@
     // ContextLifecycleObserver interface.
     void contextDestroyed() override;
 
-    // PageLifecycleObserver interface.
-    void pageVisibilityChanged() override;
-
     DECLARE_TRACE();
 
 private:
     int findConfigurationIndex(uint8_t configurationValue) const;
     int findInterfaceIndex(uint8_t interfaceNumber) const;
     int findAlternateIndex(size_t interfaceIndex, uint8_t alternateSetting) const;
-    bool ensurePageVisible(ScriptPromiseResolver*) const;
     bool ensureNoDeviceOrInterfaceChangeInProgress(ScriptPromiseResolver*) const;
     bool ensureDeviceConfigured(ScriptPromiseResolver*) const;
     bool ensureInterfaceClaimed(uint8_t interfaceNumber, ScriptPromiseResolver*) const;
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.idl b/third_party/WebKit/Source/modules/webusb/USBDevice.idl
index 9c055b04..89925eb5 100644
--- a/third_party/WebKit/Source/modules/webusb/USBDevice.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBDevice.idl
@@ -14,7 +14,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBDevice {
     readonly attribute DOMString guid;
     readonly attribute octet usbVersionMajor;
diff --git a/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl b/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl
index 9124e6d..71d9558 100644
--- a/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl
@@ -19,7 +19,7 @@
     Constructor(USBAlternateInterface alternate, octet endpointNumber, USBDirection direction),
     RaisesException=Constructor,
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBEndpoint {
     readonly attribute octet endpointNumber;
     readonly attribute USBDirection direction;
diff --git a/third_party/WebKit/Source/modules/webusb/USBInTransferResult.idl b/third_party/WebKit/Source/modules/webusb/USBInTransferResult.idl
index 2251b1df..a1173e3 100644
--- a/third_party/WebKit/Source/modules/webusb/USBInTransferResult.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBInTransferResult.idl
@@ -6,7 +6,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBInTransferResult {
     readonly attribute DataView data;
     readonly attribute USBTransferStatus status;
diff --git a/third_party/WebKit/Source/modules/webusb/USBInterface.idl b/third_party/WebKit/Source/modules/webusb/USBInterface.idl
index 6b1b427..7bd199ba 100644
--- a/third_party/WebKit/Source/modules/webusb/USBInterface.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBInterface.idl
@@ -8,7 +8,7 @@
     Constructor(USBConfiguration configuration, octet interfaceNumber),
     RaisesException=Constructor,
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBInterface {
     readonly attribute octet interfaceNumber;
     readonly attribute USBAlternateInterface? alternate;
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.idl b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.idl
index 3129bde..d8a78b2 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.idl
@@ -6,7 +6,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBIsochronousInTransferPacket {
     readonly attribute USBTransferStatus status;
     readonly attribute DataView data;
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.idl b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.idl
index 139856f9..d644043 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.idl
@@ -6,7 +6,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBIsochronousInTransferResult {
     readonly attribute DataView data;
     readonly attribute sequence<USBIsochronousInTransferPacket> packets;
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.idl b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.idl
index c6789c3..839af88 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.idl
@@ -6,7 +6,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBIsochronousOutTransferPacket {
     readonly attribute USBTransferStatus status;
     readonly attribute unsigned long bytesWritten;
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.idl b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.idl
index aebd8e1..fa779303 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.idl
@@ -6,7 +6,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBIsochronousOutTransferResult {
     readonly attribute sequence<USBIsochronousOutTransferPacket> packets;
 };
diff --git a/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.idl b/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.idl
index b43587a..79f4799b 100644
--- a/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.idl
+++ b/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.idl
@@ -6,7 +6,7 @@
 
 [
     GarbageCollected,
-    RuntimeEnabled=WebUSB,
+    OriginTrialEnabled=WebUSB,
 ] interface USBOutTransferResult {
     readonly attribute unsigned long bytesWritten;
     readonly attribute USBTransferStatus status;
diff --git a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
index 56c1455..c8e01875 100644
--- a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
+++ b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
@@ -66,7 +66,7 @@
 DeviceLight status=experimental
 DeviceOrientationAbsolute status=stable
 DisplayList2dCanvas status=stable
-DocumentWriteEvaluator status=test
+DocumentWriteEvaluator
 DurableStorage status=experimental
 ForceDisplayList2dCanvas
 // See crbug.com/585250.
@@ -215,7 +215,7 @@
 WebBluetooth origin_trial_feature_name=WebBluetooth
 WebGLDraftExtensions status=experimental
 WebGLImageChromium
-WebUSB status=experimental
+WebUSB status=experimental, origin_trial_feature_name=WebUSB
 WebVR depends_on=GeometryInterfaces, status=test
 WebVTTRegions status=experimental
 V8IdleTasks
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index f5095fea..58dbd04 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -135,14 +135,22 @@
     function.appendArgument(accessorPropertiesOnly);
     function.appendArgument(generatePreview);
 
-    OwnPtr<protocol::Value> result = makeCallWithExceptionDetails(function, exceptionDetails);
-    if (exceptionDetails->isJust()) {
+    v8::TryCatch tryCatch(isolate());
+    v8::Local<v8::Value> resultValue = function.callWithoutExceptionHandling();
+    if (tryCatch.HasCaught()) {
+        *exceptionDetails = createExceptionDetails(tryCatch.Message());
         // FIXME: make properties optional
         *properties = Array<PropertyDescriptor>::create();
         return;
     }
+
+    OwnPtr<protocol::Value> protocolValue = toProtocolValue(function.context(), resultValue);
+    if (hasInternalError(errorString, !protocolValue))
+        return;
     protocol::ErrorSupport errors(errorString);
-    *properties = Array<PropertyDescriptor>::parse(result.get(), &errors);
+    OwnPtr<Array<PropertyDescriptor>> result = Array<PropertyDescriptor>::parse(protocolValue.get(), &errors);
+    if (!hasInternalError(errorString, errors.hasErrors()))
+        *properties = result.release();
 }
 
 void InjectedScript::releaseObject(const String16& objectId)
@@ -197,7 +205,7 @@
     function.appendArgument(forceValueType);
     function.appendArgument(generatePreview);
     bool hadException = false;
-    callFunctionWithEvalEnabled(function, hadException);
+    function.call(hadException);
     return !hasInternalError(errorString, hadException);
 }
 
@@ -210,7 +218,7 @@
     function.appendArgument(forceValueType);
     function.appendArgument(generatePreview);
     bool hadException = false;
-    callFunctionWithEvalEnabled(function, hadException);
+    function.call(hadException);
     return !hasInternalError(errorString, hadException);
 }
 
@@ -223,7 +231,7 @@
     function.appendArgument(forceValueType);
     function.appendArgument(generatePreview);
     bool hadException = false;
-    v8::Local<v8::Value> r = callFunctionWithEvalEnabled(function, hadException);
+    v8::Local<v8::Value> r = function.call(hadException);
     if (hasInternalError(errorString, hadException || r.IsEmpty()))
         return v8::MaybeLocal<v8::Value>();
     return r;
@@ -240,7 +248,7 @@
     else
         function.appendArgument(columns);
     bool hadException = false;
-    v8::Local<v8::Value>  r = callFunctionWithEvalEnabled(function, hadException);
+    v8::Local<v8::Value>  r = function.call(hadException);
     if (hadException)
         return nullptr;
     protocol::ErrorSupport errors;
@@ -267,7 +275,7 @@
     if (objectGroup == "console") {
         V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "clearLastEvaluationResult");
         bool hadException = false;
-        callFunctionWithEvalEnabled(function, hadException);
+        function.call(hadException);
         ASSERT(!hadException);
     }
 }
@@ -277,7 +285,9 @@
     v8::HandleScope handles(isolate());
     V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "setCustomObjectFormatterEnabled");
     function.appendArgument(enabled);
-    makeCall(function);
+    bool hadException = false;
+    function.call(hadException);
+    ASSERT(!hadException);
 }
 
 bool InjectedScript::canAccessInspectedWindow() const
@@ -293,61 +303,6 @@
     return m_value.Get(isolate());
 }
 
-v8::Local<v8::Value> InjectedScript::callFunctionWithEvalEnabled(V8FunctionCall& function, bool& hadException) const
-{
-    v8::Local<v8::Context> localContext = m_context->context();
-    v8::Context::Scope scope(localContext);
-    bool evalIsDisabled = !localContext->IsCodeGenerationFromStringsAllowed();
-    // Temporarily enable allow evals for inspector.
-    if (evalIsDisabled)
-        localContext->AllowCodeGenerationFromStrings(true);
-    v8::Local<v8::Value> resultValue = function.call(hadException);
-    if (evalIsDisabled)
-        localContext->AllowCodeGenerationFromStrings(false);
-    return resultValue;
-}
-
-PassOwnPtr<protocol::Value> InjectedScript::makeCall(V8FunctionCall& function)
-{
-    OwnPtr<protocol::Value> result;
-    if (!canAccessInspectedWindow()) {
-        result = protocol::StringValue::create("Can not access given context.");
-        return nullptr;
-    }
-
-    bool hadException = false;
-    v8::Local<v8::Value> resultValue = callFunctionWithEvalEnabled(function, hadException);
-
-    ASSERT(!hadException);
-    if (!hadException) {
-        result = toProtocolValue(function.context(), resultValue);
-        if (!result)
-            result = protocol::StringValue::create("Object has too long reference chain");
-    } else {
-        result = protocol::StringValue::create("Exception while making a call.");
-    }
-    return result.release();
-}
-
-PassOwnPtr<protocol::Value> InjectedScript::makeCallWithExceptionDetails(V8FunctionCall& function, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
-{
-    OwnPtr<protocol::Value> result;
-    v8::HandleScope handles(isolate());
-    v8::Context::Scope scope(m_context->context());
-    v8::TryCatch tryCatch(isolate());
-    v8::Local<v8::Value> resultValue = function.callWithoutExceptionHandling();
-    if (tryCatch.HasCaught()) {
-        v8::Local<v8::Message> message = tryCatch.Message();
-        String16 text = !message.IsEmpty() ? toProtocolStringWithTypeCheck(message->Get()) : "Internal error";
-        *exceptionDetails = protocol::Runtime::ExceptionDetails::create().setText(text).build();
-    } else {
-        result = toProtocolValue(function.context(), resultValue);
-        if (!result)
-            result = protocol::StringValue::create("Object has too long reference chain");
-    }
-    return result.release();
-}
-
 bool InjectedScript::setLastEvaluationResult(ErrorString* errorString, v8::Local<v8::Value> value)
 {
     V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value(), "setLastEvaluationResult");
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
index 6a4dd164a..6379b09 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
@@ -109,9 +109,6 @@
     InjectedScript(InspectedContext*, v8::Local<v8::Object>, PassOwnPtr<InjectedScriptNative>);
 
     v8::Local<v8::Value> v8Value() const;
-    v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadException) const;
-    PassOwnPtr<protocol::Value> makeCall(V8FunctionCall&);
-    PassOwnPtr<protocol::Value> makeCallWithExceptionDetails(V8FunctionCall&, Maybe<protocol::Runtime::ExceptionDetails>*);
     v8::MaybeLocal<v8::Value> wrapValue(ErrorString*, v8::Local<v8::Value>, const String16& groupName, bool forceValueType, bool generatePreview) const;
     v8::MaybeLocal<v8::Object> callFunctionReturnObject(ErrorString*, V8FunctionCall&) const;
 
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
index 5d7c210..590bb2d2 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.cpp
@@ -82,12 +82,6 @@
     return result;
 }
 
-v8::Local<v8::Value> V8FunctionCall::call()
-{
-    bool hadException = false;
-    return call(hadException);
-}
-
 v8::Local<v8::Value> V8FunctionCall::callWithoutExceptionHandling()
 {
     v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_value);
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.h b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.h
index a9230cc..1c94d24 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8FunctionCall.h
@@ -51,7 +51,6 @@
     void appendUndefinedArgument();
 
     v8::Local<v8::Value> call(bool& hadException, bool reportExceptions = true);
-    v8::Local<v8::Value> call();
     v8::Local<v8::Function> function();
     v8::Local<v8::Value> callWithoutExceptionHandling();
     v8::Local<v8::Context> context() { return m_context; }
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index 2831ae1..e71486a 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -973,12 +973,6 @@
     return enabledPerSettings;
 }
 
-void FrameLoaderClientImpl::didLoseWebGLContext(int arbRobustnessContextLostReason)
-{
-    if (m_webFrame->client())
-        m_webFrame->client()->didLoseWebGLContext(arbRobustnessContextLostReason);
-}
-
 void FrameLoaderClientImpl::dispatchWillInsertBody()
 {
     if (m_webFrame->client())
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.h b/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
index 3a01970..22ad6d58e 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
@@ -163,7 +163,6 @@
     void didRequestAutocomplete(HTMLFormElement*) override;
 
     bool allowWebGL(bool enabledPerSettings) override;
-    void didLoseWebGLContext(int arbRobustnessContextLostReason) override;
 
     void dispatchWillInsertBody() override;
 
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 0710449..95f5e69 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1519,6 +1519,10 @@
     provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
     provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::create(this));
 
+    // Always provided so that availability of the API can be controlled by
+    // OriginTrials::webUSBEnabled().
+    USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr);
+
     bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled();
 #if OS(CHROMEOS) || OS(ANDROID)
     enableWebBluetooth = true;
@@ -1533,8 +1537,6 @@
         PresentationController::provideTo(*m_frame, m_client ? m_client->presentationClient() : nullptr);
     if (RuntimeEnabledFeatures::permissionsEnabled())
         PermissionController::provideTo(*m_frame, m_client ? m_client->permissionClient() : nullptr);
-    if (RuntimeEnabledFeatures::webUSBEnabled())
-        USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr);
     if (RuntimeEnabledFeatures::webVREnabled())
         VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr);
     if (RuntimeEnabledFeatures::wakeLockEnabled())
diff --git a/third_party/WebKit/public/OWNERS b/third_party/WebKit/public/OWNERS
index 2ae0b849..2d350a7 100644
--- a/third_party/WebKit/public/OWNERS
+++ b/third_party/WebKit/public/OWNERS
@@ -16,6 +16,3 @@
 # This is for the common case of adding or renaming files. If you're doing
 # structural changes, please get a review from a reviewer in this file.
 per-file blink_headers.gypi=*
-
-per-file blink_skia_config.gypi=bungeman@chromium.org
-per-file blink_skia_config.gypi=reed@chromium.org
diff --git a/third_party/WebKit/public/blink_skia_config.gypi b/third_party/WebKit/public/blink_skia_config.gypi
deleted file mode 100644
index 4fe5dcd..0000000
--- a/third_party/WebKit/public/blink_skia_config.gypi
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
-  'variables': {
-
-    # Place defines here that require significant Blink rebaselining, or that
-    # are otherwise best removed in Blink and then rolled into Chromium.
-    # Defines should be in single quotes and a comma must appear after every one.
-    # DO NOT remove the define until you are ready to rebaseline, and
-    # AFTER the flag has been removed from skia.gyp in Chromium.
-    'blink_skia_defines': [
-    ],
-  },
-}
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
index 39e0d44..53ae47d 100644
--- a/third_party/WebKit/public/web/WebFrameClient.h
+++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -619,12 +619,6 @@
     // content/ APIs.
     virtual bool allowWebGL(bool defaultValue) { return defaultValue; }
 
-    // Notifies the client that a WebGL context was lost on this page with the
-    // given reason (one of the GL_ARB_robustness status codes; see
-    // Extensions3D.h in WebCore/platform/graphics).
-    virtual void didLoseWebGLContext(int) { }
-
-
     // Screen Orientation --------------------------------------------------
 
     // Access the embedder API for (client-based) screen orientation client .
diff --git a/third_party/android_data_chart/java/src/org/chromium/third_party/android/datausagechart/ChartDataUsageView.java b/third_party/android_data_chart/java/src/org/chromium/third_party/android/datausagechart/ChartDataUsageView.java
index f5ff9bd..4a3e345 100644
--- a/third_party/android_data_chart/java/src/org/chromium/third_party/android/datausagechart/ChartDataUsageView.java
+++ b/third_party/android_data_chart/java/src/org/chromium/third_party/android/datausagechart/ChartDataUsageView.java
@@ -23,7 +23,6 @@
 import android.text.TextUtils;
 import android.text.format.DateUtils;
 import android.util.AttributeSet;
-import android.view.MotionEvent;
 import android.view.View;
 
 import org.chromium.third_party.android.R;
@@ -87,7 +86,6 @@
         // tell everyone about our axis
         mOriginalSeries.init(mHoriz, mVert);
         mCompressedSeries.init(mHoriz, mVert);
-        setActivated(false);
     }
 
     public void bindOriginalNetworkStats(NetworkStatsHistory stats) {
@@ -145,23 +143,6 @@
         mOriginalSeries.setEstimateVisible(false);
     }
 
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        if (isActivated()) return false;
-        switch (event.getAction()) {
-            case MotionEvent.ACTION_DOWN: {
-                return true;
-            }
-            case MotionEvent.ACTION_UP: {
-                setActivated(true);
-                return true;
-            }
-            default: {
-                return false;
-            }
-        }
-    }
-
     public long getInspectStart() {
         return mLeft;
     }
@@ -192,7 +173,6 @@
                 || visibleEnd != end + timeZoneOffset) {
             min = start;
             max = end;
-            setActivated(true);
         }
 
         mLeft = min;
diff --git a/tools/android/forwarder2/daemon.cc b/tools/android/forwarder2/daemon.cc
index e5ebe07..1ec390d 100644
--- a/tools/android/forwarder2/daemon.cc
+++ b/tools/android/forwarder2/daemon.cc
@@ -13,15 +13,16 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
+
 #include <cstdlib>
 #include <cstring>
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
@@ -53,7 +54,7 @@
                          Daemon::ServerDelegate* server_delegate) {
   bool failed = false;
   for (;;) {
-    scoped_ptr<Socket> client_socket(new Socket());
+    std::unique_ptr<Socket> client_socket(new Socket());
     if (!server_socket->Accept(client_socket.get())) {
       if (server_socket->DidReceiveEvent())
         break;
@@ -97,13 +98,13 @@
   SIGNAL_SAFE_LOG(ERROR, string_builder.buffer());
 }
 
-scoped_ptr<Socket> ConnectToUnixDomainSocket(
+std::unique_ptr<Socket> ConnectToUnixDomainSocket(
     const std::string& socket_name,
     int tries_count,
     int idle_time_msec,
     const std::string& expected_welcome_message) {
   for (int i = 0; i < tries_count; ++i) {
-    scoped_ptr<Socket> socket(new Socket());
+    std::unique_ptr<Socket> socket(new Socket());
     if (!socket->ConnectUnix(socket_name)) {
       if (idle_time_msec)
         usleep(idle_time_msec * 1000);
@@ -122,7 +123,7 @@
     }
     return socket;
   }
-  return scoped_ptr<Socket>();
+  return nullptr;
 }
 
 }  // namespace
@@ -147,7 +148,7 @@
 bool Daemon::SpawnIfNeeded() {
   const int kSingleTry = 1;
   const int kNoIdleTime = 0;
-  scoped_ptr<Socket> client_socket = ConnectToUnixDomainSocket(
+  std::unique_ptr<Socket> client_socket = ConnectToUnixDomainSocket(
       identifier_, kSingleTry, kNoIdleTime, identifier_);
   if (!client_socket) {
     switch (fork()) {
@@ -170,7 +171,7 @@
         CHECK_EQ(dup(null_fd), STDERR_FILENO);
         Socket command_socket;
         if (!command_socket.BindUnix(identifier_)) {
-          scoped_ptr<Socket> client_socket = ConnectToUnixDomainSocket(
+          std::unique_ptr<Socket> client_socket = ConnectToUnixDomainSocket(
               identifier_, kSingleTry, kNoIdleTime, identifier_);
           if (client_socket.get()) {
             // The daemon was spawned by a concurrent process.
diff --git a/tools/android/forwarder2/daemon.h b/tools/android/forwarder2/daemon.h
index f983a2ea..54285df 100644
--- a/tools/android/forwarder2/daemon.h
+++ b/tools/android/forwarder2/daemon.h
@@ -5,10 +5,10 @@
 #ifndef TOOLS_ANDROID_FORWARDER2_DAEMON_H_
 #define TOOLS_ANDROID_FORWARDER2_DAEMON_H_
 
+#include <memory>
 #include <string>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 
 namespace forwarder2 {
 
@@ -37,7 +37,7 @@
     // setup signal handlers or perform global initialization.
     virtual void Init() = 0;
 
-    virtual void OnClientConnected(scoped_ptr<Socket> client_socket) = 0;
+    virtual void OnClientConnected(std::unique_ptr<Socket> client_socket) = 0;
   };
 
   // |identifier| should be a unique string identifier. It is used to
diff --git a/tools/android/forwarder2/device_controller.cc b/tools/android/forwarder2/device_controller.cc
index 7ad38d9..a3c5505 100644
--- a/tools/android/forwarder2/device_controller.cc
+++ b/tools/android/forwarder2/device_controller.cc
@@ -4,12 +4,12 @@
 
 #include "tools/android/forwarder2/device_controller.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "tools/android/forwarder2/command.h"
@@ -20,11 +20,11 @@
 namespace forwarder2 {
 
 // static
-scoped_ptr<DeviceController> DeviceController::Create(
+std::unique_ptr<DeviceController> DeviceController::Create(
     const std::string& adb_unix_socket,
     int exit_notifier_fd) {
-  scoped_ptr<DeviceController> device_controller;
-  scoped_ptr<Socket> host_socket(new Socket());
+  std::unique_ptr<DeviceController> device_controller;
+  std::unique_ptr<Socket> host_socket(new Socket());
   if (!host_socket->BindUnix(adb_unix_socket)) {
     PLOG(ERROR) << "Could not BindAndListen DeviceController socket on port "
                 << adb_unix_socket << ": ";
@@ -44,7 +44,7 @@
   AcceptHostCommandSoon();
 }
 
-DeviceController::DeviceController(scoped_ptr<Socket> host_socket,
+DeviceController::DeviceController(std::unique_ptr<Socket> host_socket,
                                    int exit_notifier_fd)
     : host_socket_(std::move(host_socket)),
       exit_notifier_fd_(exit_notifier_fd),
@@ -60,7 +60,7 @@
 }
 
 void DeviceController::AcceptHostCommandInternal() {
-  scoped_ptr<Socket> socket(new Socket);
+  std::unique_ptr<Socket> socket(new Socket);
   if (!host_socket_->Accept(socket.get())) {
     if (!host_socket_->DidReceiveEvent())
       PLOG(ERROR) << "Could not Accept DeviceController socket";
@@ -89,7 +89,7 @@
                      << ". Attempting to restart the listener.\n";
         DeleteRefCountedValueInMapFromIterator(listener_it, &listeners_);
       }
-      scoped_ptr<DeviceListener> new_listener(DeviceListener::Create(
+      std::unique_ptr<DeviceListener> new_listener(DeviceListener::Create(
           std::move(socket), port,
           base::Bind(&DeviceController::DeleteListenerOnError,
                      weak_ptr_factory_.GetWeakPtr())));
@@ -136,8 +136,8 @@
 
 // static
 void DeviceController::DeleteListenerOnError(
-      const base::WeakPtr<DeviceController>& device_controller_ptr,
-      scoped_ptr<DeviceListener> device_listener) {
+    const base::WeakPtr<DeviceController>& device_controller_ptr,
+    std::unique_ptr<DeviceListener> device_listener) {
   DeviceListener* const listener = device_listener.release();
   DeviceController* const controller = device_controller_ptr.get();
   if (!controller) {
diff --git a/tools/android/forwarder2/device_controller.h b/tools/android/forwarder2/device_controller.h
index 5a31e7b..28fbea4 100644
--- a/tools/android/forwarder2/device_controller.h
+++ b/tools/android/forwarder2/device_controller.h
@@ -5,13 +5,13 @@
 #ifndef TOOLS_ANDROID_FORWARDER2_DEVICE_CONTROLLER_H_
 #define TOOLS_ANDROID_FORWARDER2_DEVICE_CONTROLLER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "tools/android/forwarder2/socket.h"
 
@@ -28,8 +28,9 @@
 // DeviceListener each).
 class DeviceController {
  public:
-  static scoped_ptr<DeviceController> Create(const std::string& adb_unix_socket,
-                                             int exit_notifier_fd);
+  static std::unique_ptr<DeviceController> Create(
+      const std::string& adb_unix_socket,
+      int exit_notifier_fd);
   ~DeviceController();
 
   void Start();
@@ -38,7 +39,7 @@
   typedef base::hash_map<
       int /* port */, linked_ptr<DeviceListener> > ListenersMap;
 
-  DeviceController(scoped_ptr<Socket> host_socket, int exit_notifier_fd);
+  DeviceController(std::unique_ptr<Socket> host_socket, int exit_notifier_fd);
 
   void AcceptHostCommandSoon();
   void AcceptHostCommandInternal();
@@ -47,9 +48,9 @@
   // destroyed which is why a weak pointer is used.
   static void DeleteListenerOnError(
       const base::WeakPtr<DeviceController>& device_controller_ptr,
-      scoped_ptr<DeviceListener> device_listener);
+      std::unique_ptr<DeviceListener> device_listener);
 
-  const scoped_ptr<Socket> host_socket_;
+  const std::unique_ptr<Socket> host_socket_;
   // Used to notify the controller to exit.
   const int exit_notifier_fd_;
   // Lets ensure DeviceListener instances are deleted on the thread they were
diff --git a/tools/android/forwarder2/device_forwarder_main.cc b/tools/android/forwarder2/device_forwarder_main.cc
index 09790f9..af796b3d 100644
--- a/tools/android/forwarder2/device_forwarder_main.cc
+++ b/tools/android/forwarder2/device_forwarder_main.cc
@@ -67,7 +67,7 @@
     controller_thread_->Start();
   }
 
-  void OnClientConnected(scoped_ptr<Socket> client_socket) override {
+  void OnClientConnected(std::unique_ptr<Socket> client_socket) override {
     if (initialized_) {
       client_socket->WriteString("OK");
       return;
@@ -80,9 +80,10 @@
   }
 
  private:
-  void StartController(int exit_notifier_fd, scoped_ptr<Socket> client_socket) {
+  void StartController(int exit_notifier_fd,
+                       std::unique_ptr<Socket> client_socket) {
     DCHECK(!controller_.get());
-    scoped_ptr<DeviceController> controller(
+    std::unique_ptr<DeviceController> controller(
         DeviceController::Create(kUnixDomainSocketPath, exit_notifier_fd));
     if (!controller.get()) {
       client_socket->WriteString(
@@ -97,8 +98,8 @@
     client_socket->Close();
   }
 
-  scoped_ptr<DeviceController> controller_;
-  scoped_ptr<base::Thread> controller_thread_;
+  std::unique_ptr<DeviceController> controller_;
+  std::unique_ptr<base::Thread> controller_thread_;
   bool initialized_;
 };
 
diff --git a/tools/android/forwarder2/device_listener.cc b/tools/android/forwarder2/device_listener.cc
index 9825c3c..98459f0e 100644
--- a/tools/android/forwarder2/device_listener.cc
+++ b/tools/android/forwarder2/device_listener.cc
@@ -4,13 +4,13 @@
 
 #include "tools/android/forwarder2/device_listener.h"
 
+#include <memory>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "tools/android/forwarder2/command.h"
@@ -20,12 +20,12 @@
 namespace forwarder2 {
 
 // static
-scoped_ptr<DeviceListener> DeviceListener::Create(
-    scoped_ptr<Socket> host_socket,
+std::unique_ptr<DeviceListener> DeviceListener::Create(
+    std::unique_ptr<Socket> host_socket,
     int listener_port,
     const ErrorCallback& error_callback) {
-  scoped_ptr<Socket> listener_socket(new Socket());
-  scoped_ptr<DeviceListener> device_listener;
+  std::unique_ptr<Socket> listener_socket(new Socket());
+  std::unique_ptr<DeviceListener> device_listener;
   if (!listener_socket->BindTcp("", listener_port)) {
     LOG(ERROR) << "Device could not bind and listen to local port "
                << listener_port;
@@ -52,15 +52,15 @@
   AcceptNextClientSoon();
 }
 
-void DeviceListener::SetAdbDataSocket(scoped_ptr<Socket> adb_data_socket) {
+void DeviceListener::SetAdbDataSocket(std::unique_ptr<Socket> adb_data_socket) {
   thread_.task_runner()->PostTask(
       FROM_HERE,
       base::Bind(&DeviceListener::OnAdbDataSocketReceivedOnInternalThread,
                  base::Unretained(this), base::Passed(&adb_data_socket)));
 }
 
-DeviceListener::DeviceListener(scoped_ptr<Socket> listener_socket,
-                               scoped_ptr<Socket> host_socket,
+DeviceListener::DeviceListener(std::unique_ptr<Socket> listener_socket,
+                               std::unique_ptr<Socket> host_socket,
                                int port,
                                const ErrorCallback& error_callback)
     : self_deleter_helper_(this, error_callback),
@@ -116,7 +116,7 @@
 }
 
 void DeviceListener::OnAdbDataSocketReceivedOnInternalThread(
-    scoped_ptr<Socket> adb_data_socket) {
+    std::unique_ptr<Socket> adb_data_socket) {
   DCHECK(adb_data_socket);
   SendCommand(command::ADB_DATA_SOCKET_SUCCESS, listener_port_,
               host_socket_.get());
diff --git a/tools/android/forwarder2/device_listener.h b/tools/android/forwarder2/device_listener.h
index 2b1a5b2..c235518 100644
--- a/tools/android/forwarder2/device_listener.h
+++ b/tools/android/forwarder2/device_listener.h
@@ -5,12 +5,13 @@
 #ifndef TOOLS_ANDROID_FORWARDER2_DEVICE_LISTENER_H_
 #define TOOLS_ANDROID_FORWARDER2_DEVICE_LISTENER_H_
 
+#include <memory>
+
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/threading/thread.h"
 #include "tools/android/forwarder2/forwarders_manager.h"
 #include "tools/android/forwarder2/pipe_notifier.h"
@@ -45,23 +46,24 @@
   // Callback that is used for self-deletion on error to let the device
   // controller perform some additional cleanup work (e.g. removing the device
   // listener instance from its internal map before deleting it).
-  typedef base::Callback<void (scoped_ptr<DeviceListener>)> ErrorCallback;
+  typedef base::Callback<void(std::unique_ptr<DeviceListener>)> ErrorCallback;
 
-  static scoped_ptr<DeviceListener> Create(scoped_ptr<Socket> host_socket,
-                                           int port,
-                                           const ErrorCallback& error_callback);
+  static std::unique_ptr<DeviceListener> Create(
+      std::unique_ptr<Socket> host_socket,
+      int port,
+      const ErrorCallback& error_callback);
 
   ~DeviceListener();
 
   void Start();
 
-  void SetAdbDataSocket(scoped_ptr<Socket> adb_data_socket);
+  void SetAdbDataSocket(std::unique_ptr<Socket> adb_data_socket);
 
   int listener_port() const { return listener_port_; }
 
  private:
-  DeviceListener(scoped_ptr<Socket> listener_socket,
-                 scoped_ptr<Socket> host_socket,
+  DeviceListener(std::unique_ptr<Socket> listener_socket,
+                 std::unique_ptr<Socket> host_socket,
                  int port,
                  const ErrorCallback& error_callback);
 
@@ -72,7 +74,7 @@
   void AcceptClientOnInternalThread();
 
   void OnAdbDataSocketReceivedOnInternalThread(
-      scoped_ptr<Socket> adb_data_socket);
+      std::unique_ptr<Socket> adb_data_socket);
 
   void OnInternalThreadError();
 
@@ -87,10 +89,10 @@
   PipeNotifier deletion_notifier_;
   // The local device listener socket for accepting connections from the local
   // port (listener_port_).
-  const scoped_ptr<Socket> listener_socket_;
+  const std::unique_ptr<Socket> listener_socket_;
   // The listener socket for sending control commands.
-  const scoped_ptr<Socket> host_socket_;
-  scoped_ptr<Socket> device_data_socket_;
+  const std::unique_ptr<Socket> host_socket_;
+  std::unique_ptr<Socket> device_data_socket_;
   const int listener_port_;
   // Task runner used for deletion set at construction time (i.e. the object is
   // deleted on the same thread it is created on).
diff --git a/tools/android/forwarder2/forwarder.cc b/tools/android/forwarder2/forwarder.cc
index 9945674a..3c49eef1 100644
--- a/tools/android/forwarder2/forwarder.cc
+++ b/tools/android/forwarder2/forwarder.cc
@@ -223,7 +223,8 @@
   DISALLOW_COPY_AND_ASSIGN(BufferedCopier);
 };
 
-Forwarder::Forwarder(scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2)
+Forwarder::Forwarder(std::unique_ptr<Socket> socket1,
+                     std::unique_ptr<Socket> socket2)
     : socket1_(std::move(socket1)),
       socket2_(std::move(socket2)),
       buffer1_(new BufferedCopier(socket1_.get(), socket2_.get())),
diff --git a/tools/android/forwarder2/forwarder.h b/tools/android/forwarder2/forwarder.h
index 0be86fcc..857babd 100644
--- a/tools/android/forwarder2/forwarder.h
+++ b/tools/android/forwarder2/forwarder.h
@@ -7,7 +7,8 @@
 
 #include <sys/select.h>
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/threading/thread_checker.h"
 
 namespace forwarder2 {
@@ -18,7 +19,7 @@
 // that this class is not thread-safe.
 class Forwarder {
  public:
-  Forwarder(scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2);
+  Forwarder(std::unique_ptr<Socket> socket1, std::unique_ptr<Socket> socket2);
 
   ~Forwarder();
 
@@ -34,12 +35,12 @@
   class BufferedCopier;
 
   base::ThreadChecker thread_checker_;
-  const scoped_ptr<Socket> socket1_;
-  const scoped_ptr<Socket> socket2_;
+  const std::unique_ptr<Socket> socket1_;
+  const std::unique_ptr<Socket> socket2_;
   // Copies data from socket1 to socket2.
-  const scoped_ptr<BufferedCopier> buffer1_;
+  const std::unique_ptr<BufferedCopier> buffer1_;
   // Copies data from socket2 to socket1.
-  const scoped_ptr<BufferedCopier> buffer2_;
+  const std::unique_ptr<BufferedCopier> buffer2_;
 };
 
 }  // namespace forwarder2
diff --git a/tools/android/forwarder2/forwarders_manager.cc b/tools/android/forwarder2/forwarders_manager.cc
index fb6890fe..c3dd026 100644
--- a/tools/android/forwarder2/forwarders_manager.cc
+++ b/tools/android/forwarder2/forwarders_manager.cc
@@ -31,8 +31,9 @@
   deletion_notifier_.Notify();
 }
 
-void ForwardersManager::CreateAndStartNewForwarder(scoped_ptr<Socket> socket1,
-                                                   scoped_ptr<Socket> socket2) {
+void ForwardersManager::CreateAndStartNewForwarder(
+    std::unique_ptr<Socket> socket1,
+    std::unique_ptr<Socket> socket2) {
   // Note that the internal Forwarder vector is populated on the internal thread
   // which is the only thread from which it's accessed.
   thread_.task_runner()->PostTask(
@@ -47,8 +48,8 @@
 }
 
 void ForwardersManager::CreateNewForwarderOnInternalThread(
-    scoped_ptr<Socket> socket1,
-    scoped_ptr<Socket> socket2) {
+    std::unique_ptr<Socket> socket1,
+    std::unique_ptr<Socket> socket2) {
   DCHECK(thread_.task_runner()->RunsTasksOnCurrentThread());
   forwarders_.push_back(new Forwarder(std::move(socket1), std::move(socket2)));
 }
diff --git a/tools/android/forwarder2/forwarders_manager.h b/tools/android/forwarder2/forwarders_manager.h
index 4c6dea679..2cdafdb0 100644
--- a/tools/android/forwarder2/forwarders_manager.h
+++ b/tools/android/forwarder2/forwarders_manager.h
@@ -5,7 +5,8 @@
 #ifndef TOOLS_ANDROID_FORWARDER2_FORWARDERS_MANAGER_H_
 #define TOOLS_ANDROID_FORWARDER2_FORWARDERS_MANAGER_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/memory/scoped_vector.h"
 #include "base/threading/thread.h"
 #include "tools/android/forwarder2/pipe_notifier.h"
@@ -24,12 +25,12 @@
   ~ForwardersManager();
 
   // Can be called on any thread.
-  void CreateAndStartNewForwarder(scoped_ptr<Socket> socket1,
-                                  scoped_ptr<Socket> socket2);
+  void CreateAndStartNewForwarder(std::unique_ptr<Socket> socket1,
+                                  std::unique_ptr<Socket> socket2);
 
  private:
-  void CreateNewForwarderOnInternalThread(scoped_ptr<Socket> socket1,
-                                          scoped_ptr<Socket> socket2);
+  void CreateNewForwarderOnInternalThread(std::unique_ptr<Socket> socket1,
+                                          std::unique_ptr<Socket> socket2);
 
   void WaitForEventsOnInternalThreadSoon();
   void WaitForEventsOnInternalThread();
diff --git a/tools/android/forwarder2/host_controller.cc b/tools/android/forwarder2/host_controller.cc
index 68394df..0510890 100644
--- a/tools/android/forwarder2/host_controller.cc
+++ b/tools/android/forwarder2/host_controller.cc
@@ -4,13 +4,13 @@
 
 #include "tools/android/forwarder2/host_controller.h"
 
+#include <memory>
 #include <string>
 #include <utility>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/thread_task_runner_handle.h"
 #include "tools/android/forwarder2/command.h"
 #include "tools/android/forwarder2/forwarder.h"
@@ -19,15 +19,15 @@
 namespace forwarder2 {
 
 // static
-scoped_ptr<HostController> HostController::Create(
+std::unique_ptr<HostController> HostController::Create(
     int device_port,
     int host_port,
     int adb_port,
     int exit_notifier_fd,
     const ErrorCallback& error_callback) {
-  scoped_ptr<HostController> host_controller;
-  scoped_ptr<PipeNotifier> delete_controller_notifier(new PipeNotifier());
-  scoped_ptr<Socket> adb_control_socket(new Socket());
+  std::unique_ptr<HostController> host_controller;
+  std::unique_ptr<PipeNotifier> delete_controller_notifier(new PipeNotifier());
+  std::unique_ptr<Socket> adb_control_socket(new Socket());
   adb_control_socket->AddEventFd(exit_notifier_fd);
   adb_control_socket->AddEventFd(delete_controller_notifier->receiver_fd());
   if (!adb_control_socket->ConnectTcp(std::string(), adb_port)) {
@@ -70,8 +70,8 @@
     int adb_port,
     int exit_notifier_fd,
     const ErrorCallback& error_callback,
-    scoped_ptr<Socket> adb_control_socket,
-    scoped_ptr<PipeNotifier> delete_controller_notifier)
+    std::unique_ptr<Socket> adb_control_socket,
+    std::unique_ptr<PipeNotifier> delete_controller_notifier)
     : self_deleter_helper_(this, error_callback),
       device_port_(device_port),
       host_port_(host_port),
@@ -97,7 +97,7 @@
     return;
   }
   // Try to connect to host server.
-  scoped_ptr<Socket> host_server_data_socket(new Socket());
+  std::unique_ptr<Socket> host_server_data_socket(new Socket());
   if (!host_server_data_socket->ConnectTcp(std::string(), host_port_)) {
     LOG(ERROR) << "Could not Connect HostServerData socket on port: "
                << host_port_;
@@ -121,8 +121,8 @@
 }
 
 void HostController::StartForwarder(
-    scoped_ptr<Socket> host_server_data_socket) {
-  scoped_ptr<Socket> adb_data_socket(new Socket());
+    std::unique_ptr<Socket> host_server_data_socket) {
+  std::unique_ptr<Socket> adb_data_socket(new Socket());
   if (!adb_data_socket->ConnectTcp("", adb_port_)) {
     LOG(ERROR) << "Could not connect AdbDataSocket on port: " << adb_port_;
     OnInternalThreadError();
diff --git a/tools/android/forwarder2/host_controller.h b/tools/android/forwarder2/host_controller.h
index 484adac..73282451 100644
--- a/tools/android/forwarder2/host_controller.h
+++ b/tools/android/forwarder2/host_controller.h
@@ -5,12 +5,12 @@
 #ifndef TOOLS_ANDROID_FORWARDER2_HOST_CONTROLLER_H_
 #define TOOLS_ANDROID_FORWARDER2_HOST_CONTROLLER_H_
 
+#include <memory>
 #include <string>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread.h"
 #include "tools/android/forwarder2/forwarders_manager.h"
@@ -34,15 +34,16 @@
  public:
   // Callback used for self-deletion when an error happens so that the client
   // can perform some cleanup work before deleting the HostController instance.
-  typedef base::Callback<void (scoped_ptr<HostController>)> ErrorCallback;
+  typedef base::Callback<void(std::unique_ptr<HostController>)> ErrorCallback;
 
   // If |device_port| is zero then a dynamic port is allocated (and retrievable
   // through device_port() below).
-  static scoped_ptr<HostController> Create(int device_port,
-                                           int host_port,
-                                           int adb_port,
-                                           int exit_notifier_fd,
-                                           const ErrorCallback& error_callback);
+  static std::unique_ptr<HostController> Create(
+      int device_port,
+      int host_port,
+      int adb_port,
+      int exit_notifier_fd,
+      const ErrorCallback& error_callback);
 
   ~HostController();
 
@@ -59,13 +60,13 @@
                  int adb_port,
                  int exit_notifier_fd,
                  const ErrorCallback& error_callback,
-                 scoped_ptr<Socket> adb_control_socket,
-                 scoped_ptr<PipeNotifier> delete_controller_notifier);
+                 std::unique_ptr<Socket> adb_control_socket,
+                 std::unique_ptr<PipeNotifier> delete_controller_notifier);
 
   void ReadNextCommandSoon();
   void ReadCommandOnInternalThread();
 
-  void StartForwarder(scoped_ptr<Socket> host_server_data_socket);
+  void StartForwarder(std::unique_ptr<Socket> host_server_data_socket);
 
   // Note that this gets also called when ~HostController() is invoked.
   void OnInternalThreadError();
@@ -78,10 +79,10 @@
   const int adb_port_;
   // Used to notify the controller when the process is killed.
   const int global_exit_notifier_fd_;
-  scoped_ptr<Socket> adb_control_socket_;
+  std::unique_ptr<Socket> adb_control_socket_;
   // Used to cancel the pending blocking IO operations when the host controller
   // instance is deleted.
-  scoped_ptr<PipeNotifier> delete_controller_notifier_;
+  std::unique_ptr<PipeNotifier> delete_controller_notifier_;
   // Task runner used for deletion set at deletion time (i.e. the object is
   // deleted on the same thread it is created on).
   const scoped_refptr<base::SingleThreadTaskRunner> deletion_task_runner_;
diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc
index 04684f0..2fae616f 100644
--- a/tools/android/forwarder2/host_forwarder_main.cc
+++ b/tools/android/forwarder2/host_forwarder_main.cc
@@ -102,7 +102,7 @@
                      const std::string& device_serial,
                      int device_port,
                      int host_port,
-                     scoped_ptr<Socket> client_socket) {
+                     std::unique_ptr<Socket> client_socket) {
     // Lazy initialize so that the CLI process doesn't get this thread created.
     InitOnce();
     thread_->task_runner()->PostTask(
@@ -135,7 +135,7 @@
   // controller manager was destroyed which is why a weak pointer is used.
   static void DeleteHostController(
       const base::WeakPtr<HostControllersManager>& manager_ptr,
-      scoped_ptr<HostController> host_controller) {
+      std::unique_ptr<HostController> host_controller) {
     HostController* const controller = host_controller.release();
     HostControllersManager* const manager = manager_ptr.get();
     if (!manager) {
@@ -156,7 +156,7 @@
                                      const std::string& device_serial,
                                      int device_port,
                                      int host_port,
-                                     scoped_ptr<Socket> client_socket) {
+                                     std::unique_ptr<Socket> client_socket) {
     const int adb_port = GetAdbPortForDevice(adb_path, device_serial);
     if (adb_port < 0) {
       SendMessage(
@@ -198,11 +198,10 @@
       }
     }
     // Create a new host controller.
-    scoped_ptr<HostController> host_controller(
-        HostController::Create(
-            device_port, host_port, adb_port, GetExitNotifierFD(),
-            base::Bind(&HostControllersManager::DeleteHostController,
-                       weak_ptr_factory_.GetWeakPtr())));
+    std::unique_ptr<HostController> host_controller(HostController::Create(
+        device_port, host_port, adb_port, GetExitNotifierFD(),
+        base::Bind(&HostControllersManager::DeleteHostController,
+                   weak_ptr_factory_.GetWeakPtr())));
     if (!host_controller.get()) {
       has_failed_ = true;
       SendMessage("ERROR: Connection to device failed.", client_socket.get());
@@ -222,7 +221,7 @@
                        linked_ptr<HostController>(host_controller.release())));
   }
 
-  void LogExistingControllers(const scoped_ptr<Socket>& client_socket) {
+  void LogExistingControllers(const std::unique_ptr<Socket>& client_socket) {
     SendMessage("ERROR: Existing controllers:", client_socket.get());
     for (const auto& controller : *controllers_) {
       SendMessage(base::StringPrintf("ERROR:   %s", controller.first.c_str()),
@@ -309,10 +308,11 @@
   }
 
   base::hash_map<std::string, int> device_serial_to_adb_port_map_;
-  scoped_ptr<HostControllerMap> controllers_;
+  std::unique_ptr<HostControllerMap> controllers_;
   bool has_failed_;
-  scoped_ptr<base::AtExitManager> at_exit_manager_;  // Needed by base::Thread.
-  scoped_ptr<base::Thread> thread_;
+  std::unique_ptr<base::AtExitManager>
+      at_exit_manager_;  // Needed by base::Thread.
+  std::unique_ptr<base::Thread> thread_;
   base::WeakPtrFactory<HostControllersManager> weak_ptr_factory_;
 };
 
@@ -334,7 +334,7 @@
     signal(SIGINT, KillHandler);
   }
 
-  void OnClientConnected(scoped_ptr<Socket> client_socket) override {
+  void OnClientConnected(std::unique_ptr<Socket> client_socket) override {
     char buf[kBufSize];
     const int bytes_read = client_socket->Read(buf, sizeof(buf));
     if (bytes_read <= 0) {
diff --git a/tools/android/forwarder2/self_deleter_helper.h b/tools/android/forwarder2/self_deleter_helper.h
index 9739bd0..089df03f 100644
--- a/tools/android/forwarder2/self_deleter_helper.h
+++ b/tools/android/forwarder2/self_deleter_helper.h
@@ -5,13 +5,15 @@
 #ifndef TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_
 #define TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_
 
+#include <memory>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/thread_task_runner_handle.h"
 
@@ -42,7 +44,7 @@
 // Usage example:
 // class Object {
 //  public:
-//   typedef base::Callback<void (scoped_ptr<Object>)> ErrorCallback;
+//   typedef base::Callback<void (std::unique_ptr<Object>)> ErrorCallback;
 //
 //   Object(const ErrorCallback& error_callback)
 //       : self_deleter_helper_(this, error_callback) {
@@ -80,7 +82,7 @@
 //   }
 //
 //  private:
-//   void DeleteObjectOnError(scoped_ptr<Object> object) {
+//   void DeleteObjectOnError(std::unique_ptr<Object> object) {
 //     DCHECK(thread_checker_.CalledOnValidThread());
 //     DCHECK_EQ(object_, object);
 //     // Do some extra work with |object| before it gets deleted...
@@ -89,13 +91,13 @@
 //   }
 //
 //   base::ThreadChecker thread_checker_;
-//   scoped_ptr<Object> object_;
+//   std::unique_ptr<Object> object_;
 // };
 //
 template <typename T>
 class SelfDeleterHelper {
  public:
-  typedef base::Callback<void (scoped_ptr<T>)> DeletionCallback;
+  typedef base::Callback<void(std::unique_ptr<T>)> DeletionCallback;
 
   SelfDeleterHelper(T* self_deleting_object,
                     const DeletionCallback& deletion_callback)
@@ -119,7 +121,7 @@
  private:
   void SelfDelete() {
     DCHECK(construction_runner_->RunsTasksOnCurrentThread());
-    deletion_callback_.Run(make_scoped_ptr(self_deleting_object_));
+    deletion_callback_.Run(base::WrapUnique(self_deleting_object_));
   }
 
   const scoped_refptr<base::SingleThreadTaskRunner> construction_runner_;
diff --git a/tools/android/md5sum/md5sum.cc b/tools/android/md5sum/md5sum.cc
index 94efa10..eaee434 100644
--- a/tools/android/md5sum/md5sum.cc
+++ b/tools/android/md5sum/md5sum.cc
@@ -9,6 +9,7 @@
 
 #include <fstream>
 #include <iostream>
+#include <memory>
 #include <set>
 #include <string>
 
@@ -17,7 +18,6 @@
 #include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/md5.h"
-#include "base/memory/scoped_ptr.h"
 
 namespace {
 
@@ -31,7 +31,7 @@
   base::MD5Context ctx;
   base::MD5Init(&ctx);
   const size_t kBufferSize = 1 << 16;
-  scoped_ptr<char[]> buf(new char[kBufferSize]);
+  std::unique_ptr<char[]> buf(new char[kBufferSize]);
   size_t len;
   while ((len = fread(buf.get(), 1, kBufferSize, file.get())) > 0)
     base::MD5Update(&ctx, base::StringPiece(buf.get(), len));
diff --git a/tools/battor_agent/battor_agent.cc b/tools/battor_agent/battor_agent.cc
index 0195b81..323da51 100644
--- a/tools/battor_agent/battor_agent.cc
+++ b/tools/battor_agent/battor_agent.cc
@@ -55,15 +55,15 @@
 
 // Attempts to decode the specified vector of bytes decodes to a valid EEPROM.
 // Returns the new EEPROM, or nullptr if unsuccessful.
-scoped_ptr<BattOrEEPROM> ParseEEPROM(BattOrMessageType message_type,
-                                     const vector<char>& msg) {
+std::unique_ptr<BattOrEEPROM> ParseEEPROM(BattOrMessageType message_type,
+                                          const vector<char>& msg) {
   if (message_type != BATTOR_MESSAGE_TYPE_CONTROL_ACK)
     return nullptr;
 
   if (msg.size() != sizeof(BattOrEEPROM))
     return nullptr;
 
-  scoped_ptr<BattOrEEPROM> eeprom(new BattOrEEPROM());
+  std::unique_ptr<BattOrEEPROM> eeprom(new BattOrEEPROM());
   memcpy(eeprom.get(), msg.data(), sizeof(BattOrEEPROM));
   return eeprom;
 }
@@ -244,7 +244,7 @@
 
 void BattOrAgent::OnMessageRead(bool success,
                                 BattOrMessageType type,
-                                scoped_ptr<vector<char>> bytes) {
+                                std::unique_ptr<vector<char>> bytes) {
   // Return immediately if whatever action we were trying to perform already
   // timed out.
   if (timeout_callback_.IsCancelled())
diff --git a/tools/battor_agent/battor_agent.h b/tools/battor_agent/battor_agent.h
index 524b5a8..3c6c77d 100644
--- a/tools/battor_agent/battor_agent.h
+++ b/tools/battor_agent/battor_agent.h
@@ -65,13 +65,13 @@
   void OnBytesSent(bool success) override;
   void OnMessageRead(bool success,
                      BattOrMessageType type,
-                     scoped_ptr<std::vector<char>> bytes) override;
+                     std::unique_ptr<std::vector<char>> bytes) override;
 
  protected:
   // The connection that knows how to communicate with the BattOr in terms of
   // protocol primitives. This is protected so that it can be replaced with a
   // fake in testing.
-  scoped_ptr<BattOrConnection> connection_;
+  std::unique_ptr<BattOrConnection> connection_;
 
   // Timeout for when an action isn't completed within the allotted time. This
   // is virtual and protected so that timeouts can be disabled in testing. The
@@ -161,7 +161,7 @@
   base::ThreadChecker thread_checker_;
 
   // The BattOr's EEPROM (which is required for calibration).
-  scoped_ptr<BattOrEEPROM> battor_eeprom_;
+  std::unique_ptr<BattOrEEPROM> battor_eeprom_;
 
   // The first frame (required for calibration).
   std::vector<RawBattOrSample> calibration_frame_;
diff --git a/tools/battor_agent/battor_agent_bin.cc b/tools/battor_agent/battor_agent_bin.cc
index cd9eeb3..7424d1d 100644
--- a/tools/battor_agent/battor_agent_bin.cc
+++ b/tools/battor_agent/battor_agent_bin.cc
@@ -295,7 +295,7 @@
   base::Thread ui_thread_;
 
   // The agent capable of asynchronously communicating with the BattOr.
-  scoped_ptr<BattOrAgent> agent_;
+  std::unique_ptr<BattOrAgent> agent_;
 
   std::string trace_output_file_;
 
diff --git a/tools/battor_agent/battor_agent_unittest.cc b/tools/battor_agent/battor_agent_unittest.cc
index 99433eb..3b6c543 100644
--- a/tools/battor_agent/battor_agent_unittest.cc
+++ b/tools/battor_agent/battor_agent_unittest.cc
@@ -26,8 +26,8 @@
 
 // Creates a byte vector copy of the specified object.
 template <typename T>
-scoped_ptr<std::vector<char>> ToCharVector(const T& object) {
-  return scoped_ptr<std::vector<char>>(new std::vector<char>(
+std::unique_ptr<std::vector<char>> ToCharVector(const T& object) {
+  return std::unique_ptr<std::vector<char>>(new std::vector<char>(
       reinterpret_cast<const char*>(&object),
       reinterpret_cast<const char*>(&object) + sizeof(T)));
 }
@@ -42,10 +42,10 @@
                 expected_buffer_size) == 0;
 }
 
-scoped_ptr<vector<char>> CreateFrame(const BattOrFrameHeader& frame_header,
-                                     const RawBattOrSample* samples,
-                                     const size_t& num_samples) {
-  scoped_ptr<vector<char>> bytes(new vector<char>(
+std::unique_ptr<vector<char>> CreateFrame(const BattOrFrameHeader& frame_header,
+                                          const RawBattOrSample* samples,
+                                          const size_t& num_samples) {
+  std::unique_ptr<vector<char>> bytes(new vector<char>(
       sizeof(BattOrFrameHeader) + sizeof(RawBattOrSample) * num_samples));
   memcpy(bytes->data(), &frame_header, sizeof(BattOrFrameHeader));
   memcpy(bytes->data() + sizeof(BattOrFrameHeader), samples,
@@ -80,7 +80,8 @@
  public:
   TestableBattOrAgent(BattOrAgent::Listener* listener)
       : BattOrAgent("/dev/test", listener, nullptr, nullptr) {
-    connection_ = scoped_ptr<BattOrConnection>(new MockBattOrConnection(this));
+    connection_ =
+        std::unique_ptr<BattOrConnection>(new MockBattOrConnection(this));
   }
 
   MockBattOrConnection* GetConnection() {
@@ -122,7 +123,7 @@
 
   void OnMessageRead(bool success,
                      BattOrMessageType type,
-                     scoped_ptr<std::vector<char>> bytes) {
+                     std::unique_ptr<std::vector<char>> bytes) {
     agent_->OnMessageRead(success, type, std::move(bytes));
     task_runner_->RunUntilIdle();
   }
@@ -291,7 +292,7 @@
   // Needed to support ThreadTaskRunnerHandle::Get() in code under test.
   base::ThreadTaskRunnerHandle thread_task_runner_handle_;
 
-  scoped_ptr<TestableBattOrAgent> agent_;
+  std::unique_ptr<TestableBattOrAgent> agent_;
   bool is_command_complete_;
   BattOrError command_error_;
   std::string trace_;
@@ -709,7 +710,7 @@
   };
 
   // Remove the last byte from the frame to make it invalid.
-  scoped_ptr<vector<char>> cal_frame_bytes =
+  std::unique_ptr<vector<char>> cal_frame_bytes =
       CreateFrame(cal_frame_header, cal_frame, 2);
   cal_frame_bytes->pop_back();
 
@@ -733,7 +734,8 @@
   RawBattOrSample frame[] = {RawBattOrSample{1, 1}};
 
   // Remove the last byte from the frame to make it invalid.
-  scoped_ptr<vector<char>> frame_bytes = CreateFrame(frame_header, frame, 2);
+  std::unique_ptr<vector<char>> frame_bytes =
+      CreateFrame(frame_header, frame, 2);
   frame_bytes->pop_back();
 
   OnMessageRead(true, BATTOR_MESSAGE_TYPE_SAMPLES, std::move(frame_bytes));
diff --git a/tools/battor_agent/battor_connection.h b/tools/battor_agent/battor_connection.h
index 9b844299..b8aed3c 100644
--- a/tools/battor_agent/battor_connection.h
+++ b/tools/battor_agent/battor_connection.h
@@ -5,10 +5,10 @@
 #ifndef TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_
 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "tools/battor_agent/battor_protocol_types.h"
 
@@ -36,7 +36,7 @@
     virtual void OnBytesSent(bool success) = 0;
     virtual void OnMessageRead(bool success,
                                BattOrMessageType type,
-                               scoped_ptr<std::vector<char>> bytes) = 0;
+                               std::unique_ptr<std::vector<char>> bytes) = 0;
   };
 
   BattOrConnection(Listener* listener);
diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
index 7921b27..cce643a6 100644
--- a/tools/battor_agent/battor_connection_impl.cc
+++ b/tools/battor_agent/battor_connection_impl.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
+#include "base/memory/ptr_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "device/serial/buffer.h"
 #include "device/serial/serial_io_handler.h"
@@ -119,7 +120,7 @@
   data.push_back(BATTOR_CONTROL_BYTE_END);
 
   pending_write_length_ = data.size();
-  io_handler_->Write(make_scoped_ptr(new device::SendBuffer(
+  io_handler_->Write(base::WrapUnique(new device::SendBuffer(
       data, base::Bind(&BattOrConnectionImpl::OnBytesSent, AsWeakPtr()))));
 }
 
@@ -130,7 +131,7 @@
   // Check the left-over bytes from the last read to make sure that we don't
   // already have a full message.
   BattOrMessageType parsed_type;
-  scoped_ptr<vector<char>> bytes(new vector<char>());
+  std::unique_ptr<vector<char>> bytes(new vector<char>());
   bytes->reserve(max_bytes_to_read);
 
   if (ParseMessage(&parsed_type, bytes.get())) {
@@ -161,7 +162,7 @@
   auto on_receive_buffer_filled =
       base::Bind(&BattOrConnectionImpl::OnBytesRead, AsWeakPtr());
 
-  io_handler_->Read(make_scoped_ptr(new device::ReceiveBuffer(
+  io_handler_->Read(base::WrapUnique(new device::ReceiveBuffer(
       pending_read_buffer_, static_cast<uint32_t>(max_bytes_to_read),
       on_receive_buffer_filled)));
 }
@@ -180,7 +181,7 @@
                               pending_read_buffer_->data() + bytes_read);
 
   BattOrMessageType type;
-  scoped_ptr<vector<char>> bytes(new vector<char>());
+  std::unique_ptr<vector<char>> bytes(new vector<char>());
   bytes->reserve(GetMaxBytesForMessageType(pending_read_message_type_));
 
   if (!ParseMessage(&type, bytes.get())) {
@@ -199,9 +200,10 @@
   EndReadBytes(true, type, std::move(bytes));
 }
 
-void BattOrConnectionImpl::EndReadBytes(bool success,
-                                        BattOrMessageType type,
-                                        scoped_ptr<std::vector<char>> bytes) {
+void BattOrConnectionImpl::EndReadBytes(
+    bool success,
+    BattOrMessageType type,
+    std::unique_ptr<std::vector<char>> bytes) {
   pending_read_buffer_ = nullptr;
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE,
diff --git a/tools/battor_agent/battor_connection_impl.h b/tools/battor_agent/battor_connection_impl.h
index 893ef0ff..e0ce5a2 100644
--- a/tools/battor_agent/battor_connection_impl.h
+++ b/tools/battor_agent/battor_connection_impl.h
@@ -65,7 +65,7 @@
 
   void EndReadBytes(bool success,
                     BattOrMessageType type,
-                    scoped_ptr<std::vector<char>> data);
+                    std::unique_ptr<std::vector<char>> data);
 
   // Pulls off the next complete message from already_read_buffer_, returning
   // its type and contents (via out parameters) and whether a complete message
diff --git a/tools/battor_agent/battor_connection_impl_unittest.cc b/tools/battor_agent/battor_connection_impl_unittest.cc
index a1b8540f..233e7e6 100644
--- a/tools/battor_agent/battor_connection_impl_unittest.cc
+++ b/tools/battor_agent/battor_connection_impl_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -48,7 +49,7 @@
   void OnBytesSent(bool success) override { send_success_ = success; }
   void OnMessageRead(bool success,
                      BattOrMessageType type,
-                     scoped_ptr<std::vector<char>> bytes) override {
+                     std::unique_ptr<std::vector<char>> bytes) override {
     is_read_complete_ = true;
     read_success_ = success;
     read_type_ = type;
@@ -77,8 +78,9 @@
     scoped_refptr<net::IOBuffer> buffer(
         new net::IOBuffer((size_t)bytes_to_read));
 
-    connection_->GetIoHandler()->Read(make_scoped_ptr(new device::ReceiveBuffer(
-        buffer, bytes_to_read, base::Bind(&NullReadCallback))));
+    connection_->GetIoHandler()->Read(
+        base::WrapUnique(new device::ReceiveBuffer(
+            buffer, bytes_to_read, base::Bind(&NullReadCallback))));
     task_runner_->RunUntilIdle();
 
     return buffer;
@@ -96,7 +98,7 @@
   // Writes the specified bytes directly to the serial connection.
   void SendBytesRaw(const char* data, uint16_t bytes_to_send) {
     std::vector<char> data_vector(data, data + bytes_to_send);
-    connection_->GetIoHandler()->Write(make_scoped_ptr(
+    connection_->GetIoHandler()->Write(base::WrapUnique(
         new device::SendBuffer(data_vector, base::Bind(&NullWriteCallback))));
     task_runner_->RunUntilIdle();
   }
@@ -109,7 +111,7 @@
   std::vector<char>* GetReadMessage() { return read_bytes_.get(); }
 
  private:
-  scoped_ptr<TestableBattOrConnection> connection_;
+  std::unique_ptr<TestableBattOrConnection> connection_;
 
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
   base::ThreadTaskRunnerHandle thread_task_runner_handle_;
@@ -122,7 +124,7 @@
   bool is_read_complete_;
   bool read_success_;
   BattOrMessageType read_type_;
-  scoped_ptr<std::vector<char>> read_bytes_;
+  std::unique_ptr<std::vector<char>> read_bytes_;
 };
 
 TEST_F(BattOrConnectionImplTest, InitSendsCorrectBytes) {
diff --git a/tools/battor_agent/battor_finder.cc b/tools/battor_agent/battor_finder.cc
index a8248e5..0aa54ac12 100644
--- a/tools/battor_agent/battor_finder.cc
+++ b/tools/battor_agent/battor_finder.cc
@@ -25,7 +25,7 @@
 }  // namespace
 
 std::string BattOrFinder::FindBattOr() {
-  scoped_ptr<device::SerialDeviceEnumerator> serial_device_enumerator =
+  std::unique_ptr<device::SerialDeviceEnumerator> serial_device_enumerator =
       device::SerialDeviceEnumerator::Create();
 
   mojo::Array<device::serial::DeviceInfoPtr> devices =
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index 6c33f75d..f37770f 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -775,7 +775,7 @@
 // ref-counting classes (base::RefCounted / base::RefCountedThreadSafe),
 // ensure that there are no public destructors in the class hierarchy. This
 // is to guard against accidentally stack-allocating a RefCounted class or
-// sticking it in a non-ref-counted container (like scoped_ptr<>).
+// sticking it in a non-ref-counted container (like std::unique_ptr<>).
 void FindBadConstructsConsumer::CheckRefCountedDtors(
     SourceLocation record_location,
     CXXRecordDecl* record) {
diff --git a/tools/cygprofile/cygprofile.cc b/tools/cygprofile/cygprofile.cc
index 6b5182d..d699c3e3 100644
--- a/tools/cygprofile/cygprofile.cc
+++ b/tools/cygprofile/cygprofile.cc
@@ -24,6 +24,7 @@
 #include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_piece.h"
@@ -266,7 +267,7 @@
 ThreadLogsManager::~ThreadLogsManager() {
   // Note that the internal thread does some work until it sees |flush_thread_|
   // = NULL.
-  scoped_ptr<Thread> flush_thread;
+  std::unique_ptr<Thread> flush_thread;
   {
     base::AutoLock auto_lock(lock_);
     flush_thread_.swap(flush_thread);
@@ -276,7 +277,7 @@
   STLDeleteContainerPointers(logs_.begin(), logs_.end());
 }
 
-void ThreadLogsManager::AddLog(scoped_ptr<ThreadLog> new_log) {
+void ThreadLogsManager::AddLog(std::unique_ptr<ThreadLog> new_log) {
   base::AutoLock auto_lock(lock_);
 
   if (logs_.empty())
@@ -361,7 +362,7 @@
     g_tls_log = kMagicBeingConstructed;
     ThreadLog* new_log = new ThreadLog();
     CHECK(new_log);
-    g_logs_manager.Pointer()->AddLog(make_scoped_ptr(new_log));
+    g_logs_manager.Pointer()->AddLog(base::WrapUnique(new_log));
     g_tls_log = new_log;
   }
 
diff --git a/tools/cygprofile/cygprofile.h b/tools/cygprofile/cygprofile.h
index 4ff1376..439f1e5 100644
--- a/tools/cygprofile/cygprofile.h
+++ b/tools/cygprofile/cygprofile.h
@@ -20,15 +20,15 @@
 #ifndef TOOLS_CYGPROFILE_CYGPROFILE_H_
 #define TOOLS_CYGPROFILE_CYGPROFILE_H_
 
-#include <vector>
-
 #include <sys/time.h>
 #include <sys/types.h>
 
+#include <memory>
+#include <vector>
+
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "build/build_config.h"
 
@@ -139,7 +139,7 @@
   ~ThreadLogsManager();
 
   // Can be called from any thread.
-  void AddLog(scoped_ptr<ThreadLog> new_log);
+  void AddLog(std::unique_ptr<ThreadLog> new_log);
 
  private:
   void StartInternalFlushThread_Locked();
@@ -155,7 +155,7 @@
 
   // Protects the state below.
   base::Lock lock_;
-  scoped_ptr<Thread> flush_thread_;
+  std::unique_ptr<Thread> flush_thread_;
   std::vector<ThreadLog*> logs_;
 
   DISALLOW_COPY_AND_ASSIGN(ThreadLogsManager);
diff --git a/tools/cygprofile/cygprofile_unittest.cc b/tools/cygprofile/cygprofile_unittest.cc
index 52195004..280e6e57 100644
--- a/tools/cygprofile/cygprofile_unittest.cc
+++ b/tools/cygprofile/cygprofile_unittest.cc
@@ -70,7 +70,7 @@
                  base::Unretained(&notify_event)));
 
   std::vector<LogEntry> entries;
-  scoped_ptr<ThreadLog> thread_log(
+  std::unique_ptr<ThreadLog> thread_log(
       new ThreadLog(base::Bind(&FlushEntries, base::Unretained(&entries))));
 
   thread_log->AddEntry(reinterpret_cast<void*>(0x2));
diff --git a/tools/gn/build_settings.cc b/tools/gn/build_settings.cc
index 72a74c3..14f1aa8 100644
--- a/tools/gn/build_settings.cc
+++ b/tools/gn/build_settings.cc
@@ -59,7 +59,7 @@
   return dir.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/');
 }
 
-void BuildSettings::ItemDefined(scoped_ptr<Item> item) const {
+void BuildSettings::ItemDefined(std::unique_ptr<Item> item) const {
   DCHECK(item);
   if (!item_defined_callback_.is_null())
     item_defined_callback_.Run(std::move(item));
diff --git a/tools/gn/build_settings.h b/tools/gn/build_settings.h
index 8fe2ce9..5424cf9 100644
--- a/tools/gn/build_settings.h
+++ b/tools/gn/build_settings.h
@@ -6,13 +6,13 @@
 #define TOOLS_GN_BUILD_SETTINGS_H_
 
 #include <map>
+#include <memory>
 #include <set>
 #include <utility>
 
 #include "base/callback.h"
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/args.h"
 #include "tools/gn/scope.h"
 #include "tools/gn/source_dir.h"
@@ -24,7 +24,7 @@
 // may be multiple Settings objects that refer to this, one for each toolchain.
 class BuildSettings {
  public:
-  typedef base::Callback<void(scoped_ptr<Item>)> ItemDefinedCallback;
+  typedef base::Callback<void(std::unique_ptr<Item>)> ItemDefinedCallback;
   typedef base::Callback<void(const std::string&)> PrintCallback;
 
   BuildSettings();
@@ -74,7 +74,7 @@
   base::FilePath GetFullPathSecondary(const SourceDir& dir) const;
 
   // Called when an item is defined from a background thread.
-  void ItemDefined(scoped_ptr<Item> item) const;
+  void ItemDefined(std::unique_ptr<Item> item) const;
   void set_item_defined_callback(ItemDefinedCallback cb) {
     item_defined_callback_ = cb;
   }
@@ -91,7 +91,7 @@
   const std::set<SourceFile>* exec_script_whitelist() const {
     return exec_script_whitelist_.get();
   }
-  void set_exec_script_whitelist(scoped_ptr<std::set<SourceFile>> list) {
+  void set_exec_script_whitelist(std::unique_ptr<std::set<SourceFile>> list) {
     exec_script_whitelist_ = std::move(list);
   }
 
@@ -120,7 +120,7 @@
   ItemDefinedCallback item_defined_callback_;
   PrintCallback print_callback_;
 
-  scoped_ptr<std::set<SourceFile>> exec_script_whitelist_;
+  std::unique_ptr<std::set<SourceFile>> exec_script_whitelist_;
 
   bool check_for_bad_items_;
 
diff --git a/tools/gn/builder.cc b/tools/gn/builder.cc
index a05493b..22b4c47 100644
--- a/tools/gn/builder.cc
+++ b/tools/gn/builder.cc
@@ -58,7 +58,7 @@
 Builder::~Builder() {
 }
 
-void Builder::ItemDefined(scoped_ptr<Item> item) {
+void Builder::ItemDefined(std::unique_ptr<Item> item) {
   ScopedTrace trace(TraceItem::TRACE_DEFINE_TARGET, item->label());
   trace.SetToolchain(item->settings()->toolchain_label());
 
diff --git a/tools/gn/builder.h b/tools/gn/builder.h
index 3a22266..0445976 100644
--- a/tools/gn/builder.h
+++ b/tools/gn/builder.h
@@ -33,7 +33,7 @@
 
   Loader* loader() const { return loader_; }
 
-  void ItemDefined(scoped_ptr<Item> item);
+  void ItemDefined(std::unique_ptr<Item> item);
 
   // Returns NULL if there is not a thing with the corresponding label.
   const Item* GetItem(const Label& label) const;
diff --git a/tools/gn/builder_record.h b/tools/gn/builder_record.h
index 469b1cf..a767c9b 100644
--- a/tools/gn/builder_record.h
+++ b/tools/gn/builder_record.h
@@ -5,11 +5,11 @@
 #ifndef TOOLS_GN_BUILDER_RECORD_H_
 #define TOOLS_GN_BUILDER_RECORD_H_
 
+#include <memory>
 #include <set>
 #include <utility>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/item.h"
 #include "tools/gn/location.h"
 
@@ -55,7 +55,7 @@
 
   Item* item() { return item_.get(); }
   const Item* item() const { return item_.get(); }
-  void set_item(scoped_ptr<Item> item) { item_ = std::move(item); }
+  void set_item(std::unique_ptr<Item> item) { item_ = std::move(item); }
 
   // Indicates from where this item was originally referenced from that caused
   // it to be loaded. For targets for which we encountered the declaration
@@ -97,7 +97,7 @@
  private:
   ItemType type_;
   Label label_;
-  scoped_ptr<Item> item_;
+  std::unique_ptr<Item> item_;
   const ParseNode* originally_referenced_from_;
   bool should_generate_;
   bool resolved_;
diff --git a/tools/gn/builder_unittest.cc b/tools/gn/builder_unittest.cc
index 5129063..96fad7d 100644
--- a/tools/gn/builder_unittest.cc
+++ b/tools/gn/builder_unittest.cc
@@ -78,7 +78,7 @@
   Toolchain* DefineToolchain() {
     Toolchain* tc = new Toolchain(&settings_, settings_.toolchain_label());
     TestWithScope::SetupToolchain(tc);
-    builder_->ItemDefined(scoped_ptr<Item>(tc));
+    builder_->ItemDefined(std::unique_ptr<Item>(tc));
     return tc;
   }
 
@@ -107,7 +107,7 @@
   Target* a = new Target(&settings_, a_label);
   a->public_deps().push_back(LabelTargetPair(b_label));
   a->set_output_type(Target::EXECUTABLE);
-  builder_->ItemDefined(scoped_ptr<Item>(a));
+  builder_->ItemDefined(std::unique_ptr<Item>(a));
 
   // Should have requested that B and the toolchain is loaded.
   EXPECT_TRUE(loader_->HasLoadedTwo(SourceFile("//tc/BUILD.gn"),
@@ -152,7 +152,7 @@
   Target* c = new Target(&settings_, c_label);
   c->set_output_type(Target::STATIC_LIBRARY);
   c->visibility().SetPublic();
-  builder_->ItemDefined(scoped_ptr<Item>(c));
+  builder_->ItemDefined(std::unique_ptr<Item>(c));
 
   // C only depends on the already-loaded toolchain so we shouldn't have
   // requested anything else.
@@ -163,7 +163,7 @@
   a->public_deps().push_back(LabelTargetPair(c_label));
   b->set_output_type(Target::SHARED_LIBRARY);
   b->visibility().SetPublic();
-  builder_->ItemDefined(scoped_ptr<Item>(b));
+  builder_->ItemDefined(std::unique_ptr<Item>(b));
 
   // B depends only on the already-loaded C and toolchain so we shouldn't have
   // requested anything else.
@@ -194,7 +194,7 @@
   settings2.set_toolchain_label(toolchain_label2);
   Toolchain* tc2 = new Toolchain(&settings2, toolchain_label2);
   TestWithScope::SetupToolchain(tc2);
-  builder_->ItemDefined(scoped_ptr<Item>(tc2));
+  builder_->ItemDefined(std::unique_ptr<Item>(tc2));
 
   // Construct a dependency chain: A -> B. A is in the default toolchain, B
   // is not.
@@ -207,7 +207,7 @@
   Target* b = new Target(&settings2, b_label);
   b->visibility().SetPublic();
   b->set_output_type(Target::EXECUTABLE);
-  builder_->ItemDefined(scoped_ptr<Item>(b));
+  builder_->ItemDefined(std::unique_ptr<Item>(b));
 
   // B should not be marked generated by default.
   BuilderRecord* b_record = builder_->GetRecord(b_label);
@@ -217,7 +217,7 @@
   Target* a = new Target(&settings_, a_label);
   a->public_deps().push_back(LabelTargetPair(b_label));
   a->set_output_type(Target::EXECUTABLE);
-  builder_->ItemDefined(scoped_ptr<Item>(a));
+  builder_->ItemDefined(std::unique_ptr<Item>(a));
 
   // A should have the generate bit set since it's in the default toolchain.
   BuilderRecord* a_record = builder_->GetRecord(a_label);
@@ -242,7 +242,7 @@
   // The builder will take ownership of the pointers.
   Config* a = new Config(&settings_, a_label);
   a->configs().push_back(LabelConfigPair(b_label));
-  builder_->ItemDefined(scoped_ptr<Item>(a));
+  builder_->ItemDefined(std::unique_ptr<Item>(a));
 
   // Should have requested that B is loaded.
   EXPECT_TRUE(loader_->HasLoadedOne(SourceFile("//b/BUILD.gn")));
diff --git a/tools/gn/command_format.cc b/tools/gn/command_format.cc
index ae36e37..a054b21b 100644
--- a/tools/gn/command_format.cc
+++ b/tools/gn/command_format.cc
@@ -982,7 +982,7 @@
   }
 
   // Parse.
-  scoped_ptr<ParseNode> parse_node = Parser::Parse(tokens, &err);
+  std::unique_ptr<ParseNode> parse_node = Parser::Parse(tokens, &err);
   if (err.has_error()) {
     err.PrintToStdout();
     return false;
diff --git a/tools/gn/eclipse_writer.cc b/tools/gn/eclipse_writer.cc
index e38e247..ee91f61 100644
--- a/tools/gn/eclipse_writer.cc
+++ b/tools/gn/eclipse_writer.cc
@@ -5,9 +5,9 @@
 #include "tools/gn/eclipse_writer.h"
 
 #include <fstream>
+#include <memory>
 
 #include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/builder.h"
 #include "tools/gn/config_values_extractors.h"
 #include "tools/gn/filesystem_utils.h"
@@ -127,7 +127,7 @@
   {
     const char* kIncludesSectionName =
         "org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths";
-    scoped_ptr<XmlElementWriter> section_element =
+    std::unique_ptr<XmlElementWriter> section_element =
         cdt_properties_element.SubElement(
             "section", XmlAttributes("name", kIncludesSectionName));
 
@@ -135,7 +135,7 @@
         "language", XmlAttributes("name", "holder for library settings"));
 
     for (const std::string& language : languages_) {
-      scoped_ptr<XmlElementWriter> language_element =
+      std::unique_ptr<XmlElementWriter> language_element =
           section_element->SubElement("language",
                                       XmlAttributes("name", language));
       for (const std::string& include_dir : include_dirs_) {
@@ -150,7 +150,7 @@
   {
     const char* kMacrosSectionName =
         "org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros";
-    scoped_ptr<XmlElementWriter> section_element =
+    std::unique_ptr<XmlElementWriter> section_element =
         cdt_properties_element.SubElement(
             "section", XmlAttributes("name", kMacrosSectionName));
 
@@ -158,11 +158,11 @@
         "language", XmlAttributes("name", "holder for library settings"));
 
     for (const std::string& language : languages_) {
-      scoped_ptr<XmlElementWriter> language_element =
+      std::unique_ptr<XmlElementWriter> language_element =
           section_element->SubElement("language",
                                       XmlAttributes("name", language));
       for (const auto& key_val : defines_) {
-        scoped_ptr<XmlElementWriter> macro_element =
+        std::unique_ptr<XmlElementWriter> macro_element =
             language_element->SubElement("macro");
         macro_element->SubElement("name")->Text(EscapeForXML(key_val.first));
         macro_element->SubElement("value")->Text(EscapeForXML(key_val.second));
diff --git a/tools/gn/exec_process.cc b/tools/gn/exec_process.cc
index e5ab248..8a47fbe 100644
--- a/tools/gn/exec_process.cc
+++ b/tools/gn/exec_process.cc
@@ -6,10 +6,11 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/process/kill.h"
 #include "base/process/launch.h"
 #include "base/process/process.h"
@@ -157,7 +158,7 @@
   int out_fd[2], err_fd[2];
   pid_t pid;
   base::InjectiveMultimap fd_shuffle1, fd_shuffle2;
-  scoped_ptr<char*[]> argv_cstr(new char*[argv.size() + 1]);
+  std::unique_ptr<char* []> argv_cstr(new char*[argv.size() + 1]);
 
   fd_shuffle1.reserve(3);
   fd_shuffle2.reserve(3);
diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc
index 72097f2b..f3344ff 100644
--- a/tools/gn/function_toolchain.cc
+++ b/tools/gn/function_toolchain.cc
@@ -324,7 +324,7 @@
 
   // This object will actually be copied into the one owned by the toolchain
   // manager, but that has to be done in the lock.
-  scoped_ptr<Toolchain> toolchain(new Toolchain(scope->settings(), label));
+  std::unique_ptr<Toolchain> toolchain(new Toolchain(scope->settings(), label));
   toolchain->set_defined_from(function);
   toolchain->visibility().SetPublic();
 
@@ -844,7 +844,7 @@
     subst_output_validator = &IsValidToolSubstitution;
   }
 
-  scoped_ptr<Tool> tool(new Tool);
+  std::unique_ptr<Tool> tool(new Tool);
 
   if (!ReadPattern(&block_scope, "command", subst_validator, tool.get(),
                    &Tool::set_command, err) ||
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc
index fc51cc8..f6d405d 100644
--- a/tools/gn/functions.cc
+++ b/tools/gn/functions.cc
@@ -301,7 +301,7 @@
     g_scheduler->Log("Defining config", label.GetUserVisibleName(true));
 
   // Create the new config.
-  scoped_ptr<Config> config(new Config(scope->settings(), label));
+  std::unique_ptr<Config> config(new Config(scope->settings(), label));
   config->set_defined_from(function);
   if (!Visibility::FillItemVisibility(config.get(), scope, err))
     return Value();
@@ -535,7 +535,7 @@
   if (!EnsureSingleStringArg(function, args, err))
     return Value();
 
-  scoped_ptr<base::Environment> env(base::Environment::Create());
+  std::unique_ptr<base::Environment> env(base::Environment::Create());
 
   std::string result;
   if (!env->GetVar(args[0].string_value().c_str(), &result))
@@ -670,7 +670,7 @@
   if (args.size() != 1) {
     *err = Err(function, "set_sources_assignment_filter takes one argument.");
   } else {
-    scoped_ptr<PatternList> f(new PatternList);
+    std::unique_ptr<PatternList> f(new PatternList);
     f->SetFromValue(args[0], err);
     if (!err->has_error())
       scope->set_sources_assignment_filter(std::move(f));
diff --git a/tools/gn/functions_unittest.cc b/tools/gn/functions_unittest.cc
index e2f6756..2267071 100644
--- a/tools/gn/functions_unittest.cc
+++ b/tools/gn/functions_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "tools/gn/parse_tree.h"
 #include "tools/gn/test_with_scope.h"
@@ -21,7 +22,7 @@
   Token undefined_token(Location(), Token::IDENTIFIER, "undef");
   ListNode args_list_identifier_undefined;
   args_list_identifier_undefined.append_item(
-      scoped_ptr<ParseNode>(new IdentifierNode(undefined_token)));
+      std::unique_ptr<ParseNode>(new IdentifierNode(undefined_token)));
   Value result = functions::RunDefined(setup.scope(), &function_call,
                                        &args_list_identifier_undefined, &err);
   ASSERT_EQ(Value::BOOLEAN, result.type());
@@ -30,14 +31,14 @@
   // Define a value that's itself a scope value.
   const char kDef[] = "def";  // Defined variable name.
   setup.scope()->SetValue(
-      kDef, Value(nullptr, scoped_ptr<Scope>(new Scope(setup.scope()))),
+      kDef, Value(nullptr, std::unique_ptr<Scope>(new Scope(setup.scope()))),
       nullptr);
 
   // Test the defined identifier.
   Token defined_token(Location(), Token::IDENTIFIER, kDef);
   ListNode args_list_identifier_defined;
   args_list_identifier_defined.append_item(
-      scoped_ptr<ParseNode>(new IdentifierNode(defined_token)));
+      std::unique_ptr<ParseNode>(new IdentifierNode(defined_token)));
   result = functions::RunDefined(setup.scope(), &function_call,
                                  &args_list_identifier_defined, &err);
   ASSERT_EQ(Value::BOOLEAN, result.type());
@@ -45,10 +46,10 @@
 
   // Should also work by passing an accessor node so you can do
   // "defined(def.foo)" to see if foo is defined on the def scope.
-  scoped_ptr<AccessorNode> undef_accessor(new AccessorNode);
+  std::unique_ptr<AccessorNode> undef_accessor(new AccessorNode);
   undef_accessor->set_base(defined_token);
-  undef_accessor->set_member(scoped_ptr<IdentifierNode>(
-      new IdentifierNode(undefined_token)));
+  undef_accessor->set_member(
+      base::WrapUnique(new IdentifierNode(undefined_token)));
   ListNode args_list_accessor_defined;
   args_list_accessor_defined.append_item(std::move(undef_accessor));
   result = functions::RunDefined(setup.scope(), &function_call,
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc
index 259f9f6..1002081a8 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -55,7 +55,7 @@
                                     const LocationRange& range) {
   InputFile* clone_input_file;
   std::vector<Token>* tokens;  // Don't care about this.
-  scoped_ptr<ParseNode>* parse_root;  // Don't care about this.
+  std::unique_ptr<ParseNode>* parse_root;  // Don't care about this.
 
   g_scheduler->input_file_manager()->AddDynamicInput(
       input_file.name(), &clone_input_file, &tokens, &parse_root);
diff --git a/tools/gn/import_manager.cc b/tools/gn/import_manager.cc
index 2d39846..83cc090 100644
--- a/tools/gn/import_manager.cc
+++ b/tools/gn/import_manager.cc
@@ -4,7 +4,8 @@
 
 #include "tools/gn/import_manager.h"
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/stl_util.h"
 #include "tools/gn/parse_tree.h"
 #include "tools/gn/scheduler.h"
@@ -22,7 +23,7 @@
   if (!node)
     return nullptr;
 
-  scoped_ptr<Scope> scope(new Scope(settings->base_config()));
+  std::unique_ptr<Scope> scope(new Scope(settings->base_config()));
   scope->set_source_dir(file.GetDir());
 
   // Don't allow ScopePerFileProvider to provide target-related variables.
diff --git a/tools/gn/input_conversion.cc b/tools/gn/input_conversion.cc
index b43ee121..043737a 100644
--- a/tools/gn/input_conversion.cc
+++ b/tools/gn/input_conversion.cc
@@ -38,7 +38,7 @@
   // so the origin parse nodes for the values will be preserved.
   InputFile* input_file;
   std::vector<Token>* tokens;
-  scoped_ptr<ParseNode>* parse_root_ptr;
+  std::unique_ptr<ParseNode>* parse_root_ptr;
   g_scheduler->input_file_manager()->AddDynamicInput(
       SourceFile(), &input_file, &tokens, &parse_root_ptr);
 
@@ -74,7 +74,7 @@
   if (!parse_root)
     return Value();
 
-  scoped_ptr<Scope> scope(new Scope(settings));
+  std::unique_ptr<Scope> scope(new Scope(settings));
   Value result = parse_root->Execute(scope.get(), err);
   if (err->has_error())
     return Value();
diff --git a/tools/gn/input_file_manager.cc b/tools/gn/input_file_manager.cc
index de84101..a3e64606 100644
--- a/tools/gn/input_file_manager.cc
+++ b/tools/gn/input_file_manager.cc
@@ -27,7 +27,7 @@
                 const SourceFile& name,
                 InputFile* file,
                 std::vector<Token>* tokens,
-                scoped_ptr<ParseNode>* root,
+                std::unique_ptr<ParseNode>* root,
                 Err* err) {
   // Do all of this stuff outside the lock. We should not give out file
   // pointers until the read is complete.
@@ -226,10 +226,11 @@
   return data->parsed_root.get();
 }
 
-void InputFileManager::AddDynamicInput(const SourceFile& name,
-                                       InputFile** file,
-                                       std::vector<Token>** tokens,
-                                       scoped_ptr<ParseNode>** parse_root) {
+void InputFileManager::AddDynamicInput(
+    const SourceFile& name,
+    InputFile** file,
+    std::vector<Token>** tokens,
+    std::unique_ptr<ParseNode>** parse_root) {
   InputFileData* data = new InputFileData(name);
   {
     base::AutoLock lock(lock_);
@@ -270,7 +271,7 @@
                                 InputFile* file,
                                 Err* err) {
   std::vector<Token> tokens;
-  scoped_ptr<ParseNode> root;
+  std::unique_ptr<ParseNode> root;
   bool success = DoLoadFile(origin, build_settings, name, file,
                             &tokens, &root, err);
   // Can't return early. We have to ensure that the completion event is
diff --git a/tools/gn/input_file_manager.h b/tools/gn/input_file_manager.h
index 38ff37e..ba055e2 100644
--- a/tools/gn/input_file_manager.h
+++ b/tools/gn/input_file_manager.h
@@ -82,7 +82,7 @@
   void AddDynamicInput(const SourceFile& name,
                        InputFile** file,
                        std::vector<Token>** tokens,
-                       scoped_ptr<ParseNode>** parse_root);
+                       std::unique_ptr<ParseNode>** parse_root);
 
   // Does not count dynamic input.
   int GetInputFileCount() const;
@@ -111,12 +111,12 @@
     // Event to signal when the load is complete (or fails). This is lazily
     // created only when a thread is synchronously waiting for this load (which
     // only happens for imports).
-    scoped_ptr<base::WaitableEvent> completion_event;
+    std::unique_ptr<base::WaitableEvent> completion_event;
 
     std::vector<Token> tokens;
 
     // Null before the file is loaded or if loading failed.
-    scoped_ptr<ParseNode> parsed_root;
+    std::unique_ptr<ParseNode> parsed_root;
     Err parse_error;
   };
 
diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc
index aebb6af..9061be82 100644
--- a/tools/gn/loader.cc
+++ b/tools/gn/loader.cc
@@ -5,6 +5,7 @@
 #include "tools/gn/loader.h"
 
 #include "base/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
 #include "tools/gn/build_settings.h"
@@ -266,7 +267,7 @@
 
   // Pass all of the items that were defined off to the builder.
   for (auto& item : collected_items) {
-    settings->build_settings()->ItemDefined(make_scoped_ptr(item));
+    settings->build_settings()->ItemDefined(base::WrapUnique(item));
     item = nullptr;
   }
 
diff --git a/tools/gn/loader_unittest.cc b/tools/gn/loader_unittest.cc
index 6496eaa..47d0f80d 100644
--- a/tools/gn/loader_unittest.cc
+++ b/tools/gn/loader_unittest.cc
@@ -40,9 +40,9 @@
 
  private:
   struct CannedResult {
-    scoped_ptr<InputFile> input_file;
+    std::unique_ptr<InputFile> input_file;
     std::vector<Token> tokens;
-    scoped_ptr<ParseNode> root;
+    std::unique_ptr<ParseNode> root;
   };
 
   bool AsyncLoadFile(const LocationRange& origin,
@@ -54,7 +54,7 @@
     return true;
   }
 
-  typedef std::map<SourceFile, scoped_ptr<CannedResult> > CannedResponseMap;
+  typedef std::map<SourceFile, std::unique_ptr<CannedResult>> CannedResponseMap;
   CannedResponseMap canned_responses_;
 
   std::vector< std::pair<SourceFile, Callback> > pending_;
@@ -68,7 +68,7 @@
 // Sets a given response for a given source file.
 void MockInputFileManager::AddCannedResponse(const SourceFile& source_file,
                                              const std::string& source) {
-  scoped_ptr<CannedResult> canned(new CannedResult);
+  std::unique_ptr<CannedResult> canned(new CannedResult);
   canned->input_file.reset(new InputFile(source_file));
   canned->input_file->SetContents(source);
 
diff --git a/tools/gn/ninja_binary_target_writer_unittest.cc b/tools/gn/ninja_binary_target_writer_unittest.cc
index 0b87883..1e02446d 100644
--- a/tools/gn/ninja_binary_target_writer_unittest.cc
+++ b/tools/gn/ninja_binary_target_writer_unittest.cc
@@ -476,7 +476,7 @@
   pch_settings.set_default_toolchain_label(setup.toolchain()->label());
 
   // Declare a C++ compiler that supports PCH.
-  scoped_ptr<Tool> cxx_tool(new Tool);
+  std::unique_ptr<Tool> cxx_tool(new Tool);
   TestWithScope::SetCommandForTool(
       "c++ {{source}} {{cflags}} {{cflags_cc}} {{defines}} {{include_dirs}} "
       "-o {{output}}",
@@ -487,7 +487,7 @@
   pch_toolchain.SetTool(Toolchain::TYPE_CXX, std::move(cxx_tool));
 
   // Add a C compiler as well.
-  scoped_ptr<Tool> cc_tool(new Tool);
+  std::unique_ptr<Tool> cc_tool(new Tool);
   TestWithScope::SetCommandForTool(
       "cc {{source}} {{cflags}} {{cflags_c}} {{defines}} {{include_dirs}} "
       "-o {{output}}",
@@ -604,7 +604,7 @@
   pch_settings.set_default_toolchain_label(setup.toolchain()->label());
 
   // Declare a C++ compiler that supports PCH.
-  scoped_ptr<Tool> cxx_tool(new Tool);
+  std::unique_ptr<Tool> cxx_tool(new Tool);
   TestWithScope::SetCommandForTool(
       "c++ {{source}} {{cflags}} {{cflags_cc}} {{defines}} {{include_dirs}} "
       "-o {{output}}",
@@ -616,7 +616,7 @@
   pch_toolchain.ToolchainSetupComplete();
 
   // Add a C compiler as well.
-  scoped_ptr<Tool> cc_tool(new Tool);
+  std::unique_ptr<Tool> cc_tool(new Tool);
   TestWithScope::SetCommandForTool(
       "cc {{source}} {{cflags}} {{cflags_c}} {{defines}} {{include_dirs}} "
       "-o {{output}}",
diff --git a/tools/gn/operators_unittest.cc b/tools/gn/operators_unittest.cc
index 0e7308d2..dd31b826 100644
--- a/tools/gn/operators_unittest.cc
+++ b/tools/gn/operators_unittest.cc
@@ -29,9 +29,9 @@
 // Returns a list populated with a single literal Value corresponding to the
 // given token. The token must outlive the list (since the list will just
 // copy the reference).
-scoped_ptr<ListNode> ListWithLiteral(const Token& token) {
-  scoped_ptr<ListNode> list(new ListNode);
-  list->append_item(scoped_ptr<ParseNode>(new LiteralNode(token)));
+std::unique_ptr<ListNode> ListWithLiteral(const Token& token) {
+  std::unique_ptr<ListNode> list(new ListNode);
+  list->append_item(std::unique_ptr<ParseNode>(new LiteralNode(token)));
   return list;
 }
 
@@ -53,10 +53,11 @@
 
   // Append to the sources variable.
   Token identifier_token(Location(), Token::IDENTIFIER, sources);
-  node.set_left(scoped_ptr<ParseNode>(new IdentifierNode(identifier_token)));
+  node.set_left(
+      std::unique_ptr<ParseNode>(new IdentifierNode(identifier_token)));
 
   // Set up the filter on the scope to remove everything ending with "rm"
-  scoped_ptr<PatternList> pattern_list(new PatternList);
+  std::unique_ptr<PatternList> pattern_list(new PatternList);
   pattern_list->Append(Pattern("*rm"));
   setup.scope()->set_sources_assignment_filter(std::move(pattern_list));
 
@@ -83,8 +84,8 @@
 
   // Append a list with the two strings from above.
   ListNode list;
-  list.append_item(scoped_ptr<ParseNode>(new LiteralNode(string_1)));
-  list.append_item(scoped_ptr<ParseNode>(new LiteralNode(string_2)));
+  list.append_item(std::unique_ptr<ParseNode>(new LiteralNode(string_1)));
+  list.append_item(std::unique_ptr<ParseNode>(new LiteralNode(string_2)));
   ExecuteBinaryOperator(setup.scope(), &node, node.left(), &list, &err);
   EXPECT_FALSE(err.has_error());
 
@@ -116,10 +117,11 @@
 
   // Append to the foo variable.
   Token identifier_token(Location(), Token::IDENTIFIER, foo);
-  node.set_left(scoped_ptr<ParseNode>(new IdentifierNode(identifier_token)));
+  node.set_left(
+      std::unique_ptr<ParseNode>(new IdentifierNode(identifier_token)));
 
   // Append a list with a list, the result should be a nested list.
-  scoped_ptr<ListNode> outer_list(new ListNode);
+  std::unique_ptr<ListNode> outer_list(new ListNode);
   const char twelve_str[] = "12";
   Token twelve(Location(), Token::INTEGER, twelve_str);
   outer_list->append_item(ListWithLiteral(twelve));
@@ -146,12 +148,12 @@
   // This should fail.
   const char str_str[] = "\"hi\"";
   Token str(Location(), Token::STRING, str_str);
-  node.set_right(scoped_ptr<ParseNode>(new LiteralNode(str)));
+  node.set_right(std::unique_ptr<ParseNode>(new LiteralNode(str)));
   ExecuteBinaryOperator(setup.scope(), &node, node.left(), node.right(), &err);
   EXPECT_TRUE(err.has_error());
   err = Err();
 
-  node.set_right(scoped_ptr<ParseNode>(new LiteralNode(twelve)));
+  node.set_right(std::unique_ptr<ParseNode>(new LiteralNode(twelve)));
   ExecuteBinaryOperator(setup.scope(), &node, node.left(), node.right(), &err);
   EXPECT_TRUE(err.has_error());
 }
@@ -169,12 +171,13 @@
   // Set the left to false.
   const char false_str[] = "false";
   Token false_tok(Location(), Token::FALSE_TOKEN, false_str);
-  node.set_left(scoped_ptr<ParseNode>(new LiteralNode(false_tok)));
+  node.set_left(std::unique_ptr<ParseNode>(new LiteralNode(false_tok)));
 
   // Set right as foo, but don't define a value for it.
   const char foo[] = "foo";
   Token identifier_token(Location(), Token::IDENTIFIER, foo);
-  node.set_right(scoped_ptr<ParseNode>(new IdentifierNode(identifier_token)));
+  node.set_right(
+      std::unique_ptr<ParseNode>(new IdentifierNode(identifier_token)));
 
   Value ret = ExecuteBinaryOperator(setup.scope(), &node, node.left(),
                                     node.right(), &err);
@@ -194,12 +197,13 @@
   // Set the left to false.
   const char false_str[] = "true";
   Token false_tok(Location(), Token::TRUE_TOKEN, false_str);
-  node.set_left(scoped_ptr<ParseNode>(new LiteralNode(false_tok)));
+  node.set_left(std::unique_ptr<ParseNode>(new LiteralNode(false_tok)));
 
   // Set right as foo, but don't define a value for it.
   const char foo[] = "foo";
   Token identifier_token(Location(), Token::IDENTIFIER, foo);
-  node.set_right(scoped_ptr<ParseNode>(new IdentifierNode(identifier_token)));
+  node.set_right(
+      std::unique_ptr<ParseNode>(new IdentifierNode(identifier_token)));
 
   Value ret = ExecuteBinaryOperator(setup.scope(), &node, node.left(),
                                     node.right(), &err);
diff --git a/tools/gn/parse_tree.h b/tools/gn/parse_tree.h
index 6693bbd19..2853799 100644
--- a/tools/gn/parse_tree.h
+++ b/tools/gn/parse_tree.h
@@ -6,11 +6,12 @@
 #define TOOLS_GN_PARSE_TREE_H_
 
 #include <stddef.h>
+
+#include <memory>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/err.h"
 #include "tools/gn/token.h"
 #include "tools/gn/value.h"
@@ -100,7 +101,7 @@
   void PrintComments(std::ostream& out, int indent) const;
 
  private:
-  scoped_ptr<Comments> comments_;
+  std::unique_ptr<Comments> comments_;
 
   DISALLOW_COPY_AND_ASSIGN(ParseNode);
 };
@@ -150,12 +151,12 @@
 
   // Index is the expression inside the []. Will be null if member is set.
   const ParseNode* index() const { return index_.get(); }
-  void set_index(scoped_ptr<ParseNode> i) { index_ = std::move(i); }
+  void set_index(std::unique_ptr<ParseNode> i) { index_ = std::move(i); }
 
   // The member is the identifier on the right hand side of the dot. Will be
   // null if the index is set.
   const IdentifierNode* member() const { return member_.get(); }
-  void set_member(scoped_ptr<IdentifierNode> i) { member_ = std::move(i); }
+  void set_member(std::unique_ptr<IdentifierNode> i) { member_ = std::move(i); }
 
   void SetNewLocation(int line_number);
 
@@ -167,8 +168,8 @@
 
   // Either index or member will be set according to what type of access this
   // is.
-  scoped_ptr<ParseNode> index_;
-  scoped_ptr<IdentifierNode> member_;
+  std::unique_ptr<ParseNode> index_;
+  std::unique_ptr<IdentifierNode> member_;
 
   DISALLOW_COPY_AND_ASSIGN(AccessorNode);
 };
@@ -192,15 +193,17 @@
   void set_op(const Token& t) { op_ = t; }
 
   const ParseNode* left() const { return left_.get(); }
-  void set_left(scoped_ptr<ParseNode> left) { left_ = std::move(left); }
+  void set_left(std::unique_ptr<ParseNode> left) { left_ = std::move(left); }
 
   const ParseNode* right() const { return right_.get(); }
-  void set_right(scoped_ptr<ParseNode> right) { right_ = std::move(right); }
+  void set_right(std::unique_ptr<ParseNode> right) {
+    right_ = std::move(right);
+  }
 
  private:
-  scoped_ptr<ParseNode> left_;
+  std::unique_ptr<ParseNode> left_;
   Token op_;
-  scoped_ptr<ParseNode> right_;
+  std::unique_ptr<ParseNode> right_;
 
   DISALLOW_COPY_AND_ASSIGN(BinaryOpNode);
 };
@@ -221,11 +224,11 @@
   void Print(std::ostream& out, int indent) const override;
 
   void set_begin_token(const Token& t) { begin_token_ = t; }
-  void set_end(scoped_ptr<EndNode> e) { end_ = std::move(e); }
+  void set_end(std::unique_ptr<EndNode> e) { end_ = std::move(e); }
   const EndNode* End() const { return end_.get(); }
 
   const std::vector<ParseNode*>& statements() const { return statements_; }
-  void append_statement(scoped_ptr<ParseNode> s) {
+  void append_statement(std::unique_ptr<ParseNode> s) {
     statements_.push_back(s.release());
   }
 
@@ -233,7 +236,7 @@
   // Tokens corresponding to { and }, if any (may be NULL). The end is stored
   // in a custom parse node so that it can have comments hung off of it.
   Token begin_token_;
-  scoped_ptr<EndNode> end_;
+  std::unique_ptr<EndNode> end_;
 
   // Owning pointers, use unique_ptr when we can use C++11.
   std::vector<ParseNode*> statements_;
@@ -259,23 +262,25 @@
   void set_if_token(const Token& token) { if_token_ = token; }
 
   const ParseNode* condition() const { return condition_.get(); }
-  void set_condition(scoped_ptr<ParseNode> c) { condition_ = std::move(c); }
+  void set_condition(std::unique_ptr<ParseNode> c) {
+    condition_ = std::move(c);
+  }
 
   const BlockNode* if_true() const { return if_true_.get(); }
-  void set_if_true(scoped_ptr<BlockNode> t) { if_true_ = std::move(t); }
+  void set_if_true(std::unique_ptr<BlockNode> t) { if_true_ = std::move(t); }
 
   // This is either empty, a block (for the else clause), or another
   // condition.
   const ParseNode* if_false() const { return if_false_.get(); }
-  void set_if_false(scoped_ptr<ParseNode> f) { if_false_ = std::move(f); }
+  void set_if_false(std::unique_ptr<ParseNode> f) { if_false_ = std::move(f); }
 
  private:
   // Token corresponding to the "if" string.
   Token if_token_;
 
-  scoped_ptr<ParseNode> condition_;  // Always non-null.
-  scoped_ptr<BlockNode> if_true_;  // Always non-null.
-  scoped_ptr<ParseNode> if_false_;  // May be null.
+  std::unique_ptr<ParseNode> condition_;  // Always non-null.
+  std::unique_ptr<BlockNode> if_true_;    // Always non-null.
+  std::unique_ptr<ParseNode> if_false_;   // May be null.
 
   DISALLOW_COPY_AND_ASSIGN(ConditionNode);
 };
@@ -299,15 +304,15 @@
   void set_function(Token t) { function_ = t; }
 
   const ListNode* args() const { return args_.get(); }
-  void set_args(scoped_ptr<ListNode> a) { args_ = std::move(a); }
+  void set_args(std::unique_ptr<ListNode> a) { args_ = std::move(a); }
 
   const BlockNode* block() const { return block_.get(); }
-  void set_block(scoped_ptr<BlockNode> b) { block_ = std::move(b); }
+  void set_block(std::unique_ptr<BlockNode> b) { block_ = std::move(b); }
 
  private:
   Token function_;
-  scoped_ptr<ListNode> args_;
-  scoped_ptr<BlockNode> block_;  // May be null.
+  std::unique_ptr<ListNode> args_;
+  std::unique_ptr<BlockNode> block_;  // May be null.
 
   DISALLOW_COPY_AND_ASSIGN(FunctionCallNode);
 };
@@ -355,10 +360,10 @@
   void Print(std::ostream& out, int indent) const override;
 
   void set_begin_token(const Token& t) { begin_token_ = t; }
-  void set_end(scoped_ptr<EndNode> e) { end_ = std::move(e); }
+  void set_end(std::unique_ptr<EndNode> e) { end_ = std::move(e); }
   const EndNode* End() const { return end_.get(); }
 
-  void append_item(scoped_ptr<ParseNode> s) {
+  void append_item(std::unique_ptr<ParseNode> s) {
     contents_.push_back(s.release());
   }
   const std::vector<const ParseNode*>& contents() const { return contents_; }
@@ -389,7 +394,7 @@
   // Tokens corresponding to the [ and ]. The end token is stored in inside an
   // custom parse node so that it can have comments hung off of it.
   Token begin_token_;
-  scoped_ptr<EndNode> end_;
+  std::unique_ptr<EndNode> end_;
   bool prefer_multiline_;
 
   // Owning pointers, use unique_ptr when we can use C++11.
@@ -444,13 +449,13 @@
   void set_op(const Token& t) { op_ = t; }
 
   const ParseNode* operand() const { return operand_.get(); }
-  void set_operand(scoped_ptr<ParseNode> operand) {
+  void set_operand(std::unique_ptr<ParseNode> operand) {
     operand_ = std::move(operand);
   }
 
  private:
   Token op_;
-  scoped_ptr<ParseNode> operand_;
+  std::unique_ptr<ParseNode> operand_;
 
   DISALLOW_COPY_AND_ASSIGN(UnaryOpNode);
 };
diff --git a/tools/gn/parse_tree_unittest.cc b/tools/gn/parse_tree_unittest.cc
index fba902a9..f5edbc8 100644
--- a/tools/gn/parse_tree_unittest.cc
+++ b/tools/gn/parse_tree_unittest.cc
@@ -24,7 +24,7 @@
   AccessorNode accessor;
   accessor.set_base(base_token);
 
-  scoped_ptr<IdentifierNode> member_identifier(
+  std::unique_ptr<IdentifierNode> member_identifier(
       new IdentifierNode(member_token));
   accessor.set_member(std::move(member_identifier));
 
@@ -37,7 +37,7 @@
   // Define a as a Scope. It should still fail because b isn't defined.
   err = Err();
   setup.scope()->SetValue(
-      "a", Value(nullptr, scoped_ptr<Scope>(new Scope(setup.scope()))),
+      "a", Value(nullptr, std::unique_ptr<Scope>(new Scope(setup.scope()))),
       nullptr);
   result = accessor.Execute(setup.scope(), &err);
   EXPECT_TRUE(err.has_error());
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc
index d3e2f0f..33abfd0b 100644
--- a/tools/gn/parser.cc
+++ b/tools/gn/parser.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/logging.h"
+#include "base/memory/ptr_util.h"
 #include "tools/gn/functions.h"
 #include "tools/gn/operators.h"
 #include "tools/gn/token.h"
@@ -206,17 +207,18 @@
 }
 
 // static
-scoped_ptr<ParseNode> Parser::Parse(const std::vector<Token>& tokens,
-                                    Err* err) {
+std::unique_ptr<ParseNode> Parser::Parse(const std::vector<Token>& tokens,
+                                         Err* err) {
   Parser p(tokens, err);
   return p.ParseFile();
 }
 
 // static
-scoped_ptr<ParseNode> Parser::ParseExpression(const std::vector<Token>& tokens,
-                                              Err* err) {
+std::unique_ptr<ParseNode> Parser::ParseExpression(
+    const std::vector<Token>& tokens,
+    Err* err) {
   Parser p(tokens, err);
-  scoped_ptr<ParseNode> expr = p.ParseExpression();
+  std::unique_ptr<ParseNode> expr = p.ParseExpression();
   if (!p.at_end() && !err->has_error()) {
     *err = Err(p.cur_token(), "Trailing garbage");
     return nullptr;
@@ -225,8 +227,8 @@
 }
 
 // static
-scoped_ptr<ParseNode> Parser::ParseValue(const std::vector<Token>& tokens,
-                                         Err* err) {
+std::unique_ptr<ParseNode> Parser::ParseValue(const std::vector<Token>& tokens,
+                                              Err* err) {
   for (const Token& token : tokens) {
     switch (token.type()) {
       case Token::INTEGER:
@@ -314,13 +316,13 @@
   return tokens_[cur_++];
 }
 
-scoped_ptr<ParseNode> Parser::ParseExpression() {
+std::unique_ptr<ParseNode> Parser::ParseExpression() {
   return ParseExpression(0);
 }
 
-scoped_ptr<ParseNode> Parser::ParseExpression(int precedence) {
+std::unique_ptr<ParseNode> Parser::ParseExpression(int precedence) {
   if (at_end())
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
 
   Token token = Consume();
   PrefixFunc prefix = expressions_[token.type()].prefix;
@@ -329,10 +331,10 @@
     *err_ = Err(token,
                 std::string("Unexpected token '") + token.value().as_string() +
                     std::string("'"));
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
 
-  scoped_ptr<ParseNode> left = (this->*prefix)(token);
+  std::unique_ptr<ParseNode> left = (this->*prefix)(token);
   if (has_error())
     return left;
 
@@ -344,84 +346,86 @@
       *err_ = Err(token,
                   std::string("Unexpected token '") +
                       token.value().as_string() + std::string("'"));
-      return scoped_ptr<ParseNode>();
+      return std::unique_ptr<ParseNode>();
     }
     left = (this->*infix)(std::move(left), token);
     if (has_error())
-      return scoped_ptr<ParseNode>();
+      return std::unique_ptr<ParseNode>();
   }
 
   return left;
 }
 
-scoped_ptr<ParseNode> Parser::Literal(Token token) {
-  return make_scoped_ptr(new LiteralNode(token));
+std::unique_ptr<ParseNode> Parser::Literal(Token token) {
+  return base::WrapUnique(new LiteralNode(token));
 }
 
-scoped_ptr<ParseNode> Parser::Name(Token token) {
-  return IdentifierOrCall(scoped_ptr<ParseNode>(), token);
+std::unique_ptr<ParseNode> Parser::Name(Token token) {
+  return IdentifierOrCall(std::unique_ptr<ParseNode>(), token);
 }
 
-scoped_ptr<ParseNode> Parser::BlockComment(Token token) {
-  scoped_ptr<BlockCommentNode> comment(new BlockCommentNode());
+std::unique_ptr<ParseNode> Parser::BlockComment(Token token) {
+  std::unique_ptr<BlockCommentNode> comment(new BlockCommentNode());
   comment->set_comment(token);
   return std::move(comment);
 }
 
-scoped_ptr<ParseNode> Parser::Group(Token token) {
-  scoped_ptr<ParseNode> expr = ParseExpression();
+std::unique_ptr<ParseNode> Parser::Group(Token token) {
+  std::unique_ptr<ParseNode> expr = ParseExpression();
   if (has_error())
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   Consume(Token::RIGHT_PAREN, "Expected ')'");
   return expr;
 }
 
-scoped_ptr<ParseNode> Parser::Not(Token token) {
-  scoped_ptr<ParseNode> expr = ParseExpression(PRECEDENCE_PREFIX + 1);
+std::unique_ptr<ParseNode> Parser::Not(Token token) {
+  std::unique_ptr<ParseNode> expr = ParseExpression(PRECEDENCE_PREFIX + 1);
   if (has_error())
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   if (!expr) {
     if (!has_error())
       *err_ = Err(token, "Expected right-hand side for '!'.");
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
-  scoped_ptr<UnaryOpNode> unary_op(new UnaryOpNode);
+  std::unique_ptr<UnaryOpNode> unary_op(new UnaryOpNode);
   unary_op->set_op(token);
   unary_op->set_operand(std::move(expr));
   return std::move(unary_op);
 }
 
-scoped_ptr<ParseNode> Parser::List(Token node) {
-  scoped_ptr<ParseNode> list(ParseList(node, Token::RIGHT_BRACKET, true));
+std::unique_ptr<ParseNode> Parser::List(Token node) {
+  std::unique_ptr<ParseNode> list(ParseList(node, Token::RIGHT_BRACKET, true));
   if (!has_error() && !at_end())
     Consume(Token::RIGHT_BRACKET, "Expected ']'");
   return list;
 }
 
-scoped_ptr<ParseNode> Parser::BinaryOperator(scoped_ptr<ParseNode> left,
-                                             Token token) {
-  scoped_ptr<ParseNode> right =
+std::unique_ptr<ParseNode> Parser::BinaryOperator(
+    std::unique_ptr<ParseNode> left,
+    Token token) {
+  std::unique_ptr<ParseNode> right =
       ParseExpression(expressions_[token.type()].precedence + 1);
   if (!right) {
     if (!has_error()) {
       *err_ = Err(token, "Expected right-hand side for '" +
                              token.value().as_string() + "'");
     }
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
-  scoped_ptr<BinaryOpNode> binary_op(new BinaryOpNode);
+  std::unique_ptr<BinaryOpNode> binary_op(new BinaryOpNode);
   binary_op->set_op(token);
   binary_op->set_left(std::move(left));
   binary_op->set_right(std::move(right));
   return std::move(binary_op);
 }
 
-scoped_ptr<ParseNode> Parser::IdentifierOrCall(scoped_ptr<ParseNode> left,
-                                               Token token) {
-  scoped_ptr<ListNode> list(new ListNode);
+std::unique_ptr<ParseNode> Parser::IdentifierOrCall(
+    std::unique_ptr<ParseNode> left,
+    Token token) {
+  std::unique_ptr<ListNode> list(new ListNode);
   list->set_begin_token(token);
-  list->set_end(make_scoped_ptr(new EndNode(token)));
-  scoped_ptr<BlockNode> block;
+  list->set_end(base::WrapUnique(new EndNode(token)));
+  std::unique_ptr<BlockNode> block;
   bool has_arg = false;
   if (LookAhead(Token::LEFT_PAREN)) {
     Token start_token = Consume();
@@ -432,22 +436,22 @@
     } else {
       list = ParseList(start_token, Token::RIGHT_PAREN, false);
       if (has_error())
-        return scoped_ptr<ParseNode>();
+        return std::unique_ptr<ParseNode>();
       Consume(Token::RIGHT_PAREN, "Expected ')' after call");
     }
     // Optionally with a scope.
     if (LookAhead(Token::LEFT_BRACE)) {
       block = ParseBlock();
       if (has_error())
-        return scoped_ptr<ParseNode>();
+        return std::unique_ptr<ParseNode>();
     }
   }
 
   if (!left && !has_arg) {
     // Not a function call, just a standalone identifier.
-    return scoped_ptr<ParseNode>(new IdentifierNode(token));
+    return std::unique_ptr<ParseNode>(new IdentifierNode(token));
   }
-  scoped_ptr<FunctionCallNode> func_call(new FunctionCallNode);
+  std::unique_ptr<FunctionCallNode> func_call(new FunctionCallNode);
   func_call->set_function(token);
   func_call->set_args(std::move(list));
   if (block)
@@ -455,27 +459,27 @@
   return std::move(func_call);
 }
 
-scoped_ptr<ParseNode> Parser::Assignment(scoped_ptr<ParseNode> left,
-                                         Token token) {
+std::unique_ptr<ParseNode> Parser::Assignment(std::unique_ptr<ParseNode> left,
+                                              Token token) {
   if (left->AsIdentifier() == nullptr) {
     *err_ = Err(left.get(), "Left-hand side of assignment must be identifier.");
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
-  scoped_ptr<ParseNode> value = ParseExpression(PRECEDENCE_ASSIGNMENT);
+  std::unique_ptr<ParseNode> value = ParseExpression(PRECEDENCE_ASSIGNMENT);
   if (!value) {
     if (!has_error())
       *err_ = Err(token, "Expected right-hand side for assignment.");
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
-  scoped_ptr<BinaryOpNode> assign(new BinaryOpNode);
+  std::unique_ptr<BinaryOpNode> assign(new BinaryOpNode);
   assign->set_op(token);
   assign->set_left(std::move(left));
   assign->set_right(std::move(value));
   return std::move(assign);
 }
 
-scoped_ptr<ParseNode> Parser::Subscript(scoped_ptr<ParseNode> left,
-                                        Token token) {
+std::unique_ptr<ParseNode> Parser::Subscript(std::unique_ptr<ParseNode> left,
+                                             Token token) {
   // TODO: Maybe support more complex expressions like a[0][0]. This would
   // require work on the evaluator too.
   if (left->AsIdentifier() == nullptr) {
@@ -483,45 +487,45 @@
         "The thing on the left hand side of the [] must be an identifier\n"
         "and not an expression. If you need this, you'll have to assign the\n"
         "value to a temporary before subscripting. Sorry.");
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
-  scoped_ptr<ParseNode> value = ParseExpression();
+  std::unique_ptr<ParseNode> value = ParseExpression();
   Consume(Token::RIGHT_BRACKET, "Expecting ']' after subscript.");
-  scoped_ptr<AccessorNode> accessor(new AccessorNode);
+  std::unique_ptr<AccessorNode> accessor(new AccessorNode);
   accessor->set_base(left->AsIdentifier()->value());
   accessor->set_index(std::move(value));
   return std::move(accessor);
 }
 
-scoped_ptr<ParseNode> Parser::DotOperator(scoped_ptr<ParseNode> left,
-                                          Token token) {
+std::unique_ptr<ParseNode> Parser::DotOperator(std::unique_ptr<ParseNode> left,
+                                               Token token) {
   if (left->AsIdentifier() == nullptr) {
     *err_ = Err(left.get(), "May only use \".\" for identifiers.",
         "The thing on the left hand side of the dot must be an identifier\n"
         "and not an expression. If you need this, you'll have to assign the\n"
         "value to a temporary first. Sorry.");
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
 
-  scoped_ptr<ParseNode> right = ParseExpression(PRECEDENCE_DOT);
+  std::unique_ptr<ParseNode> right = ParseExpression(PRECEDENCE_DOT);
   if (!right || !right->AsIdentifier()) {
     *err_ = Err(token, "Expected identifier for right-hand-side of \".\"",
         "Good: a.cookies\nBad: a.42\nLooks good but still bad: a.cookies()");
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
 
-  scoped_ptr<AccessorNode> accessor(new AccessorNode);
+  std::unique_ptr<AccessorNode> accessor(new AccessorNode);
   accessor->set_base(left->AsIdentifier()->value());
-  accessor->set_member(scoped_ptr<IdentifierNode>(
+  accessor->set_member(std::unique_ptr<IdentifierNode>(
       static_cast<IdentifierNode*>(right.release())));
   return std::move(accessor);
 }
 
 // Does not Consume the start or end token.
-scoped_ptr<ListNode> Parser::ParseList(Token start_token,
-                                       Token::Type stop_before,
-                                       bool allow_trailing_comma) {
-  scoped_ptr<ListNode> list(new ListNode);
+std::unique_ptr<ListNode> Parser::ParseList(Token start_token,
+                                            Token::Type stop_before,
+                                            bool allow_trailing_comma) {
+  std::unique_ptr<ListNode> list(new ListNode);
   list->set_begin_token(start_token);
   bool just_got_comma = false;
   bool first_time = true;
@@ -530,7 +534,7 @@
       if (!just_got_comma) {
         // Require commas separate things in lists.
         *err_ = Err(cur_token(), "Expected comma between items.");
-        return scoped_ptr<ListNode>();
+        return std::unique_ptr<ListNode>();
       }
     }
     first_time = false;
@@ -540,11 +544,11 @@
     // boolean expressions (the lowest of which is OR), but above assignments.
     list->append_item(ParseExpression(PRECEDENCE_OR));
     if (has_error())
-      return scoped_ptr<ListNode>();
+      return std::unique_ptr<ListNode>();
     if (at_end()) {
       *err_ =
           Err(tokens_[tokens_.size() - 1], "Unexpected end of file in list.");
-      return scoped_ptr<ListNode>();
+      return std::unique_ptr<ListNode>();
     }
     if (list->contents().back()->AsBlockComment()) {
       // If there was a comment inside the list, we don't need a comma to the
@@ -556,18 +560,18 @@
   }
   if (just_got_comma && !allow_trailing_comma) {
     *err_ = Err(cur_token(), "Trailing comma");
-    return scoped_ptr<ListNode>();
+    return std::unique_ptr<ListNode>();
   }
-  list->set_end(make_scoped_ptr(new EndNode(cur_token())));
+  list->set_end(base::WrapUnique(new EndNode(cur_token())));
   return list;
 }
 
-scoped_ptr<ParseNode> Parser::ParseFile() {
-  scoped_ptr<BlockNode> file(new BlockNode);
+std::unique_ptr<ParseNode> Parser::ParseFile() {
+  std::unique_ptr<BlockNode> file(new BlockNode);
   for (;;) {
     if (at_end())
       break;
-    scoped_ptr<ParseNode> statement = ParseStatement();
+    std::unique_ptr<ParseNode> statement = ParseStatement();
     if (!statement)
       break;
     file->append_statement(std::move(statement));
@@ -575,7 +579,7 @@
   if (!at_end() && !has_error())
     *err_ = Err(cur_token(), "Unexpected here, should be newline.");
   if (has_error())
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
 
   // TODO(scottmg): If this is measurably expensive, it could be done only
   // when necessary (when reformatting, or during tests). Comments are
@@ -586,7 +590,7 @@
   return std::move(file);
 }
 
-scoped_ptr<ParseNode> Parser::ParseStatement() {
+std::unique_ptr<ParseNode> Parser::ParseStatement() {
   if (LookAhead(Token::IF)) {
     return ParseCondition();
   } else if (LookAhead(Token::BLOCK_COMMENT)) {
@@ -594,7 +598,7 @@
   } else {
     // TODO(scottmg): Is this too strict? Just drop all the testing if we want
     // to allow "pointless" expressions and return ParseExpression() directly.
-    scoped_ptr<ParseNode> stmt = ParseExpression();
+    std::unique_ptr<ParseNode> stmt = ParseExpression();
     if (stmt) {
       if (stmt->AsFunctionCall() || IsAssignment(stmt.get()))
         return stmt;
@@ -603,34 +607,34 @@
       Token token = at_end() ? tokens_[tokens_.size() - 1] : cur_token();
       *err_ = Err(token, "Expecting assignment or function call.");
     }
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   }
 }
 
-scoped_ptr<BlockNode> Parser::ParseBlock() {
+std::unique_ptr<BlockNode> Parser::ParseBlock() {
   Token begin_token =
       Consume(Token::LEFT_BRACE, "Expected '{' to start a block.");
   if (has_error())
-    return scoped_ptr<BlockNode>();
-  scoped_ptr<BlockNode> block(new BlockNode);
+    return std::unique_ptr<BlockNode>();
+  std::unique_ptr<BlockNode> block(new BlockNode);
   block->set_begin_token(begin_token);
 
   for (;;) {
     if (LookAhead(Token::RIGHT_BRACE)) {
-      block->set_end(make_scoped_ptr(new EndNode(Consume())));
+      block->set_end(base::WrapUnique(new EndNode(Consume())));
       break;
     }
 
-    scoped_ptr<ParseNode> statement = ParseStatement();
+    std::unique_ptr<ParseNode> statement = ParseStatement();
     if (!statement)
-      return scoped_ptr<BlockNode>();
+      return std::unique_ptr<BlockNode>();
     block->append_statement(std::move(statement));
   }
   return block;
 }
 
-scoped_ptr<ParseNode> Parser::ParseCondition() {
-  scoped_ptr<ConditionNode> condition(new ConditionNode);
+std::unique_ptr<ParseNode> Parser::ParseCondition() {
+  std::unique_ptr<ConditionNode> condition(new ConditionNode);
   condition->set_if_token(Consume(Token::IF, "Expected 'if'"));
   Consume(Token::LEFT_PAREN, "Expected '(' after 'if'.");
   condition->set_condition(ParseExpression());
@@ -645,11 +649,11 @@
       condition->set_if_false(ParseStatement());
     } else {
       *err_ = Err(cur_token(), "Expected '{' or 'if' after 'else'.");
-      return scoped_ptr<ParseNode>();
+      return std::unique_ptr<ParseNode>();
     }
   }
   if (has_error())
-    return scoped_ptr<ParseNode>();
+    return std::unique_ptr<ParseNode>();
   return std::move(condition);
 }
 
diff --git a/tools/gn/parser.h b/tools/gn/parser.h
index 42d41ef..de828a4 100644
--- a/tools/gn/parser.h
+++ b/tools/gn/parser.h
@@ -8,18 +8,18 @@
 #include <stddef.h>
 
 #include <map>
+#include <memory>
 #include <vector>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/err.h"
 #include "tools/gn/parse_tree.h"
 
 class Parser;
-typedef scoped_ptr<ParseNode> (Parser::*PrefixFunc)(Token token);
-typedef scoped_ptr<ParseNode> (Parser::*InfixFunc)(scoped_ptr<ParseNode> left,
-                                                   Token token);
+typedef std::unique_ptr<ParseNode> (Parser::*PrefixFunc)(Token token);
+typedef std::unique_ptr<ParseNode> (
+    Parser::*InfixFunc)(std::unique_ptr<ParseNode> left, Token token);
 
 extern const char kGrammar_Help[];
 
@@ -35,53 +35,58 @@
 class Parser {
  public:
   // Will return a null pointer and set the err on error.
-  static scoped_ptr<ParseNode> Parse(const std::vector<Token>& tokens,
-                                     Err* err);
+  static std::unique_ptr<ParseNode> Parse(const std::vector<Token>& tokens,
+                                          Err* err);
 
   // Alternative to parsing that assumes the input is an expression.
-  static scoped_ptr<ParseNode> ParseExpression(const std::vector<Token>& tokens,
-                                               Err* err);
+  static std::unique_ptr<ParseNode> ParseExpression(
+      const std::vector<Token>& tokens,
+      Err* err);
 
   // Alternative to parsing that assumes the input is a literal value.
-  static scoped_ptr<ParseNode> ParseValue(const std::vector<Token>& tokens,
-                                          Err* err);
+  static std::unique_ptr<ParseNode> ParseValue(const std::vector<Token>& tokens,
+                                               Err* err);
 
  private:
   // Vector must be valid for lifetime of call.
   Parser(const std::vector<Token>& tokens, Err* err);
   ~Parser();
 
-  scoped_ptr<ParseNode> ParseExpression();
+  std::unique_ptr<ParseNode> ParseExpression();
 
   // Parses an expression with the given precedence or higher.
-  scoped_ptr<ParseNode> ParseExpression(int precedence);
+  std::unique_ptr<ParseNode> ParseExpression(int precedence);
 
   // |PrefixFunc|s used in parsing expressions.
-  scoped_ptr<ParseNode> Literal(Token token);
-  scoped_ptr<ParseNode> Name(Token token);
-  scoped_ptr<ParseNode> Group(Token token);
-  scoped_ptr<ParseNode> Not(Token token);
-  scoped_ptr<ParseNode> List(Token token);
-  scoped_ptr<ParseNode> BlockComment(Token token);
+  std::unique_ptr<ParseNode> Literal(Token token);
+  std::unique_ptr<ParseNode> Name(Token token);
+  std::unique_ptr<ParseNode> Group(Token token);
+  std::unique_ptr<ParseNode> Not(Token token);
+  std::unique_ptr<ParseNode> List(Token token);
+  std::unique_ptr<ParseNode> BlockComment(Token token);
 
   // |InfixFunc|s used in parsing expressions.
-  scoped_ptr<ParseNode> BinaryOperator(scoped_ptr<ParseNode> left, Token token);
-  scoped_ptr<ParseNode> IdentifierOrCall(scoped_ptr<ParseNode> left,
+  std::unique_ptr<ParseNode> BinaryOperator(std::unique_ptr<ParseNode> left,
+                                            Token token);
+  std::unique_ptr<ParseNode> IdentifierOrCall(std::unique_ptr<ParseNode> left,
+                                              Token token);
+  std::unique_ptr<ParseNode> Assignment(std::unique_ptr<ParseNode> left,
+                                        Token token);
+  std::unique_ptr<ParseNode> Subscript(std::unique_ptr<ParseNode> left,
+                                       Token token);
+  std::unique_ptr<ParseNode> DotOperator(std::unique_ptr<ParseNode> left,
                                          Token token);
-  scoped_ptr<ParseNode> Assignment(scoped_ptr<ParseNode> left, Token token);
-  scoped_ptr<ParseNode> Subscript(scoped_ptr<ParseNode> left, Token token);
-  scoped_ptr<ParseNode> DotOperator(scoped_ptr<ParseNode> left, Token token);
 
   // Helper to parse a comma separated list, optionally allowing trailing
   // commas (allowed in [] lists, not in function calls).
-  scoped_ptr<ListNode> ParseList(Token start_token,
-                                 Token::Type stop_before,
-                                 bool allow_trailing_comma);
+  std::unique_ptr<ListNode> ParseList(Token start_token,
+                                      Token::Type stop_before,
+                                      bool allow_trailing_comma);
 
-  scoped_ptr<ParseNode> ParseFile();
-  scoped_ptr<ParseNode> ParseStatement();
-  scoped_ptr<BlockNode> ParseBlock();
-  scoped_ptr<ParseNode> ParseCondition();
+  std::unique_ptr<ParseNode> ParseFile();
+  std::unique_ptr<ParseNode> ParseStatement();
+  std::unique_ptr<BlockNode> ParseBlock();
+  std::unique_ptr<ParseNode> ParseCondition();
 
   // Generates a pre- and post-order traversal of the tree.
   void TraverseOrder(const ParseNode* root,
diff --git a/tools/gn/parser_unittest.cc b/tools/gn/parser_unittest.cc
index b6c2009..3970373 100644
--- a/tools/gn/parser_unittest.cc
+++ b/tools/gn/parser_unittest.cc
@@ -26,7 +26,7 @@
   ASSERT_TRUE(GetTokens(&input_file, &tokens));
 
   Err err;
-  scoped_ptr<ParseNode> result = Parser::Parse(tokens, &err);
+  std::unique_ptr<ParseNode> result = Parser::Parse(tokens, &err);
   if (!result)
     err.PrintToStdout();
   ASSERT_TRUE(result);
@@ -44,7 +44,7 @@
   ASSERT_TRUE(GetTokens(&input_file, &tokens));
 
   Err err;
-  scoped_ptr<ParseNode> result = Parser::ParseExpression(tokens, &err);
+  std::unique_ptr<ParseNode> result = Parser::ParseExpression(tokens, &err);
   ASSERT_TRUE(result);
 
   std::ostringstream collector;
@@ -62,7 +62,7 @@
   Err err;
   std::vector<Token> tokens = Tokenizer::Tokenize(&input_file, &err);
   if (!err.has_error()) {
-    scoped_ptr<ParseNode> result = Parser::Parse(tokens, &err);
+    std::unique_ptr<ParseNode> result = Parser::Parse(tokens, &err);
     ASSERT_FALSE(result);
     ASSERT_TRUE(err.has_error());
   }
@@ -80,7 +80,7 @@
   Err err;
   std::vector<Token> tokens = Tokenizer::Tokenize(&input_file, &err);
   if (!err.has_error()) {
-    scoped_ptr<ParseNode> result = Parser::ParseExpression(tokens, &err);
+    std::unique_ptr<ParseNode> result = Parser::ParseExpression(tokens, &err);
     ASSERT_FALSE(result);
     ASSERT_TRUE(err.has_error());
   }
diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc
index dc22367..d3d29d44 100644
--- a/tools/gn/scope.cc
+++ b/tools/gn/scope.cc
@@ -380,8 +380,8 @@
   return true;
 }
 
-scoped_ptr<Scope> Scope::MakeClosure() const {
-  scoped_ptr<Scope> result;
+std::unique_ptr<Scope> Scope::MakeClosure() const {
+  std::unique_ptr<Scope> result;
   if (const_containing_) {
     // We reached the top of the mutable scope stack. The result scope just
     // references the const scope (which will never change).
diff --git a/tools/gn/scope.h b/tools/gn/scope.h
index 96b3939a..72aa0c3 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -6,13 +6,13 @@
 #define TOOLS_GN_SCOPE_H_
 
 #include <map>
+#include <memory>
 #include <set>
 #include <utility>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "tools/gn/err.h"
 #include "tools/gn/pattern.h"
@@ -227,7 +227,7 @@
   // be included. The resulting closure will reference the const containing
   // scope as its containing scope (since we assume the const scope won't
   // change, we don't have to copy its values).
-  scoped_ptr<Scope> MakeClosure() const;
+  std::unique_ptr<Scope> MakeClosure() const;
 
   // Makes an empty scope with the given name. Returns NULL if the name is
   // already set.
@@ -239,8 +239,7 @@
 
   // Filter to apply when the sources variable is assigned. May return NULL.
   const PatternList* GetSourcesAssignmentFilter() const;
-  void set_sources_assignment_filter(
-      scoped_ptr<PatternList> f) {
+  void set_sources_assignment_filter(std::unique_ptr<PatternList> f) {
     sources_assignment_filter_ = std::move(f);
   }
 
@@ -342,7 +341,7 @@
 
   // Null indicates not set and that we should fallback to the containing
   // scope's filter.
-  scoped_ptr<PatternList> sources_assignment_filter_;
+  std::unique_ptr<PatternList> sources_assignment_filter_;
 
   // Owning pointers, must be deleted.
   typedef std::map<std::string, scoped_refptr<const Template> > TemplateMap;
diff --git a/tools/gn/scope_per_file_provider.h b/tools/gn/scope_per_file_provider.h
index 8cdfa6c..ac0d872 100644
--- a/tools/gn/scope_per_file_provider.h
+++ b/tools/gn/scope_per_file_provider.h
@@ -5,8 +5,9 @@
 #ifndef TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_
 #define TOOLS_GN_SCOPE_PER_FILE_PROVIDER_H_
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/scope.h"
 
 // ProgrammaticProvider for a scope to provide it with per-file built-in
@@ -35,14 +36,14 @@
   bool allow_target_vars_;
 
   // All values are lazily created.
-  scoped_ptr<Value> current_toolchain_;
-  scoped_ptr<Value> default_toolchain_;
-  scoped_ptr<Value> python_path_;
-  scoped_ptr<Value> root_build_dir_;
-  scoped_ptr<Value> root_gen_dir_;
-  scoped_ptr<Value> root_out_dir_;
-  scoped_ptr<Value> target_gen_dir_;
-  scoped_ptr<Value> target_out_dir_;
+  std::unique_ptr<Value> current_toolchain_;
+  std::unique_ptr<Value> default_toolchain_;
+  std::unique_ptr<Value> python_path_;
+  std::unique_ptr<Value> root_build_dir_;
+  std::unique_ptr<Value> root_gen_dir_;
+  std::unique_ptr<Value> root_out_dir_;
+  std::unique_ptr<Value> target_gen_dir_;
+  std::unique_ptr<Value> target_out_dir_;
 
   DISALLOW_COPY_AND_ASSIGN(ScopePerFileProvider);
 };
diff --git a/tools/gn/scope_unittest.cc b/tools/gn/scope_unittest.cc
index ce79973c..de2005a 100644
--- a/tools/gn/scope_unittest.cc
+++ b/tools/gn/scope_unittest.cc
@@ -217,7 +217,7 @@
   nested2.SetValue("on_two", Value(&assignment, "on_two2"), &assignment);
 
   // Making a closure from the root scope.
-  scoped_ptr<Scope> result = setup.scope()->MakeClosure();
+  std::unique_ptr<Scope> result = setup.scope()->MakeClosure();
   EXPECT_FALSE(result->containing());  // Should have no containing scope.
   EXPECT_TRUE(result->GetValue("on_root"));  // Value should be copied.
 
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 9661506..384a2af1 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -140,7 +140,7 @@
 // Called on any thread. Post the item to the builder on the main thread.
 void ItemDefinedCallback(base::MessageLoop* main_loop,
                          scoped_refptr<Builder> builder,
-                         scoped_ptr<Item> item) {
+                         std::unique_ptr<Item> item) {
   DCHECK(item);
   main_loop->PostTask(FROM_HERE, base::Bind(&Builder::ItemDefined, builder,
                                             base::Passed(&item)));
@@ -199,7 +199,7 @@
   DWORD path_length = ::GetEnvironmentVariable(kPathEnvVarName, nullptr, 0);
   if (path_length == 0)
     return base::FilePath();
-  scoped_ptr<base::char16[]> full_path(new base::char16[path_length]);
+  std::unique_ptr<base::char16[]> full_path(new base::char16[path_length]);
   DWORD actual_path_length =
       ::GetEnvironmentVariable(kPathEnvVarName, full_path.get(), path_length);
   CHECK_EQ(path_length, actual_path_length + 1);
@@ -712,7 +712,7 @@
       err.PrintToStdout();
       return false;
     }
-    scoped_ptr<std::set<SourceFile>> whitelist(new std::set<SourceFile>);
+    std::unique_ptr<std::set<SourceFile>> whitelist(new std::set<SourceFile>);
     for (const auto& item : exec_script_whitelist_value->list_value()) {
       if (!item.VerifyTypeIs(Value::STRING, &err)) {
         err.PrintToStdout();
diff --git a/tools/gn/setup.h b/tools/gn/setup.h
index 5b81a55..4f2d88599 100644
--- a/tools/gn/setup.h
+++ b/tools/gn/setup.h
@@ -5,11 +5,11 @@
 #ifndef TOOLS_GN_SETUP_H_
 #define TOOLS_GN_SETUP_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/files/file_path.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/build_settings.h"
 #include "tools/gn/builder.h"
 #include "tools/gn/label_pattern.h"
@@ -135,7 +135,7 @@
   bool check_public_headers_;
 
   // See getter for info.
-  scoped_ptr<std::vector<LabelPattern>> check_patterns_;
+  std::unique_ptr<std::vector<LabelPattern>> check_patterns_;
 
   Scheduler scheduler_;
 
@@ -146,9 +146,9 @@
 
   // State for invoking the dotfile.
   base::FilePath dotfile_name_;
-  scoped_ptr<InputFile> dotfile_input_file_;
+  std::unique_ptr<InputFile> dotfile_input_file_;
   std::vector<Token> dotfile_tokens_;
-  scoped_ptr<ParseNode> dotfile_root_;
+  std::unique_ptr<ParseNode> dotfile_root_;
 
   // Set to true when we should populate the build arguments from the command
   // line or build argument file. See setter above.
@@ -157,9 +157,9 @@
   // State for invoking the command line args. We specifically want to keep
   // this around for the entire run so that Values can blame to the command
   // line when we issue errors about them.
-  scoped_ptr<InputFile> args_input_file_;
+  std::unique_ptr<InputFile> args_input_file_;
   std::vector<Token> args_tokens_;
-  scoped_ptr<ParseNode> args_root_;
+  std::unique_ptr<ParseNode> args_root_;
 
   DISALLOW_COPY_AND_ASSIGN(Setup);
 };
diff --git a/tools/gn/string_utils.cc b/tools/gn/string_utils.cc
index 6f47b91..5e80681 100644
--- a/tools/gn/string_utils.cc
+++ b/tools/gn/string_utils.cc
@@ -81,7 +81,7 @@
   }
 
   // Parse.
-  scoped_ptr<ParseNode> node = Parser::ParseExpression(tokens, err);
+  std::unique_ptr<ParseNode> node = Parser::ParseExpression(tokens, err);
   if (err->has_error()) {
     // Rewrite error as above.
     *err = ErrInsideStringToken(token, begin_offset, end_offset - begin_offset,
diff --git a/tools/gn/string_utils_unittest.cc b/tools/gn/string_utils_unittest.cc
index 570997f..eb021a8 100644
--- a/tools/gn/string_utils_unittest.cc
+++ b/tools/gn/string_utils_unittest.cc
@@ -23,7 +23,8 @@
   scope.SetValue("onestring", Value(nullptr, "one"), nullptr);
 
   // Nested scope called "onescope" with a value "one" inside it.
-  scoped_ptr<Scope> onescope(new Scope(static_cast<const Settings*>(nullptr)));
+  std::unique_ptr<Scope> onescope(
+      new Scope(static_cast<const Settings*>(nullptr)));
   onescope->SetValue("one", Value(nullptr, one), nullptr);
   scope.SetValue("onescope", Value(nullptr, std::move(onescope)), nullptr);
 
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index 4a84bcd5..2132a5b 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -88,7 +88,7 @@
   if (g_scheduler->verbose_logging())
     g_scheduler->Log("Defining target", label.GetUserVisibleName(true));
 
-  scoped_ptr<Target> target(new Target(scope->settings(), label));
+  std::unique_ptr<Target> target(new Target(scope->settings(), label));
   target->set_defined_from(function_call);
 
   // Create and call out to the proper generator.
diff --git a/tools/gn/target_unittest.cc b/tools/gn/target_unittest.cc
index 8629ff21..e2e41a87 100644
--- a/tools/gn/target_unittest.cc
+++ b/tools/gn/target_unittest.cc
@@ -431,7 +431,7 @@
 
   Toolchain toolchain(setup.settings(), Label(SourceDir("//tc/"), "tc"));
 
-  scoped_ptr<Tool> solink_tool(new Tool());
+  std::unique_ptr<Tool> solink_tool(new Tool());
   solink_tool->set_output_prefix("lib");
   solink_tool->set_default_output_extension(".so");
 
@@ -470,7 +470,7 @@
 
   Toolchain toolchain(setup.settings(), Label(SourceDir("//tc/"), "tc"));
 
-  scoped_ptr<Tool> solink_tool(new Tool());
+  std::unique_ptr<Tool> solink_tool(new Tool());
   solink_tool->set_output_prefix("");
   solink_tool->set_default_output_extension(".dll");
 
diff --git a/tools/gn/template.cc b/tools/gn/template.cc
index 012e716..8b8ae69 100644
--- a/tools/gn/template.cc
+++ b/tools/gn/template.cc
@@ -18,7 +18,7 @@
       definition_(def) {
 }
 
-Template::Template(scoped_ptr<Scope> scope, const FunctionCallNode* def)
+Template::Template(std::unique_ptr<Scope> scope, const FunctionCallNode* def)
     : closure_(std::move(scope)), definition_(def) {}
 
 Template::~Template() {
@@ -36,7 +36,7 @@
 
   // First run the invocation's block. Need to allocate the scope on the heap
   // so we can pass ownership to the template.
-  scoped_ptr<Scope> invocation_scope(new Scope(scope));
+  std::unique_ptr<Scope> invocation_scope(new Scope(scope));
   if (!FillTargetBlockScope(scope, invocation,
                             invocation->function().value().as_string(),
                             block, args, invocation_scope.get(), err))
@@ -78,7 +78,7 @@
   // if we instead create a value and then set the scope on it, the copy can
   // be avoided.
   const char kInvoker[] = "invoker";
-  template_scope.SetValue(kInvoker, Value(nullptr, scoped_ptr<Scope>()),
+  template_scope.SetValue(kInvoker, Value(nullptr, std::unique_ptr<Scope>()),
                           invocation);
   Value* invoker_value = template_scope.GetMutableValue(kInvoker, false);
   invoker_value->SetScopeValue(std::move(invocation_scope));
diff --git a/tools/gn/template.h b/tools/gn/template.h
index 43aaf7f..a79d82f3 100644
--- a/tools/gn/template.h
+++ b/tools/gn/template.h
@@ -5,10 +5,10 @@
 #ifndef TOOLS_GN_TEMPLATE_H_
 #define TOOLS_GN_TEMPLATE_H_
 
+#include <memory>
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
 
 class BlockNode;
 class Err;
@@ -30,7 +30,7 @@
   Template(const Scope* scope, const FunctionCallNode* def);
 
   // Takes ownership of a previously-constructed closure.
-  Template(scoped_ptr<Scope> closure, const FunctionCallNode* def);
+  Template(std::unique_ptr<Scope> closure, const FunctionCallNode* def);
 
   // Invoke the template. The values correspond to the state of the code
   // invoking the template.
@@ -49,7 +49,7 @@
   Template();
   ~Template();
 
-  scoped_ptr<Scope> closure_;
+  std::unique_ptr<Scope> closure_;
   const FunctionCallNode* definition_;
 };
 
diff --git a/tools/gn/test_with_scope.cc b/tools/gn/test_with_scope.cc
index 2be27fa..32d5dd67 100644
--- a/tools/gn/test_with_scope.cc
+++ b/tools/gn/test_with_scope.cc
@@ -42,7 +42,7 @@
   Err err;
 
   // CC
-  scoped_ptr<Tool> cc_tool(new Tool);
+  std::unique_ptr<Tool> cc_tool(new Tool);
   SetCommandForTool(
       "cc {{source}} {{cflags}} {{cflags_c}} {{defines}} {{include_dirs}} "
       "-o {{output}}",
@@ -52,7 +52,7 @@
   toolchain->SetTool(Toolchain::TYPE_CC, std::move(cc_tool));
 
   // CXX
-  scoped_ptr<Tool> cxx_tool(new Tool);
+  std::unique_ptr<Tool> cxx_tool(new Tool);
   SetCommandForTool(
       "c++ {{source}} {{cflags}} {{cflags_cc}} {{defines}} {{include_dirs}} "
       "-o {{output}}",
@@ -62,7 +62,7 @@
   toolchain->SetTool(Toolchain::TYPE_CXX, std::move(cxx_tool));
 
   // OBJC
-  scoped_ptr<Tool> objc_tool(new Tool);
+  std::unique_ptr<Tool> objc_tool(new Tool);
   SetCommandForTool(
       "objcc {{source}} {{cflags}} {{cflags_objc}} {{defines}} "
       "{{include_dirs}} -o {{output}}",
@@ -72,7 +72,7 @@
   toolchain->SetTool(Toolchain::TYPE_OBJC, std::move(objc_tool));
 
   // OBJC
-  scoped_ptr<Tool> objcxx_tool(new Tool);
+  std::unique_ptr<Tool> objcxx_tool(new Tool);
   SetCommandForTool(
       "objcxx {{source}} {{cflags}} {{cflags_objcc}} {{defines}} "
       "{{include_dirs}} -o {{output}}",
@@ -84,7 +84,7 @@
   // Don't use RC and ASM tools in unit tests yet. Add here if needed.
 
   // ALINK
-  scoped_ptr<Tool> alink_tool(new Tool);
+  std::unique_ptr<Tool> alink_tool(new Tool);
   SetCommandForTool("ar {{output}} {{source}}", alink_tool.get());
   alink_tool->set_lib_switch("-l");
   alink_tool->set_lib_dir_switch("-L");
@@ -94,7 +94,7 @@
   toolchain->SetTool(Toolchain::TYPE_ALINK, std::move(alink_tool));
 
   // SOLINK
-  scoped_ptr<Tool> solink_tool(new Tool);
+  std::unique_ptr<Tool> solink_tool(new Tool);
   SetCommandForTool("ld -shared -o {{target_output_name}}.so {{inputs}} "
       "{{ldflags}} {{libs}}", solink_tool.get());
   solink_tool->set_lib_switch("-l");
@@ -106,7 +106,7 @@
   toolchain->SetTool(Toolchain::TYPE_SOLINK, std::move(solink_tool));
 
   // SOLINK_MODULE
-  scoped_ptr<Tool> solink_module_tool(new Tool);
+  std::unique_ptr<Tool> solink_module_tool(new Tool);
   SetCommandForTool("ld -bundle -o {{target_output_name}}.so {{inputs}} "
       "{{ldflags}} {{libs}}", solink_module_tool.get());
   solink_module_tool->set_lib_switch("-l");
@@ -119,7 +119,7 @@
                      std::move(solink_module_tool));
 
   // LINK
-  scoped_ptr<Tool> link_tool(new Tool);
+  std::unique_ptr<Tool> link_tool(new Tool);
   SetCommandForTool("ld -o {{target_output_name}} {{source}} "
       "{{ldflags}} {{libs}}", link_tool.get());
   link_tool->set_lib_switch("-l");
@@ -129,23 +129,23 @@
   toolchain->SetTool(Toolchain::TYPE_LINK, std::move(link_tool));
 
   // STAMP
-  scoped_ptr<Tool> stamp_tool(new Tool);
+  std::unique_ptr<Tool> stamp_tool(new Tool);
   SetCommandForTool("touch {{output}}", stamp_tool.get());
   toolchain->SetTool(Toolchain::TYPE_STAMP, std::move(stamp_tool));
 
   // COPY
-  scoped_ptr<Tool> copy_tool(new Tool);
+  std::unique_ptr<Tool> copy_tool(new Tool);
   SetCommandForTool("cp {{source}} {{output}}", copy_tool.get());
   toolchain->SetTool(Toolchain::TYPE_COPY, std::move(copy_tool));
 
   // COPY_BUNDLE_DATA
-  scoped_ptr<Tool> copy_bundle_data_tool(new Tool);
+  std::unique_ptr<Tool> copy_bundle_data_tool(new Tool);
   SetCommandForTool("cp {{source}} {{output}}", copy_bundle_data_tool.get());
   toolchain->SetTool(Toolchain::TYPE_COPY_BUNDLE_DATA,
                      std::move(copy_bundle_data_tool));
 
   // COMPILE_XCASSETS
-  scoped_ptr<Tool> compile_xcassets_tool(new Tool);
+  std::unique_ptr<Tool> compile_xcassets_tool(new Tool);
   SetCommandForTool("touch {{output}}", compile_xcassets_tool.get());
   toolchain->SetTool(Toolchain::TYPE_COMPILE_XCASSETS,
                      std::move(compile_xcassets_tool));
diff --git a/tools/gn/test_with_scope.h b/tools/gn/test_with_scope.h
index 75b0899d..fa6fb4b 100644
--- a/tools/gn/test_with_scope.h
+++ b/tools/gn/test_with_scope.h
@@ -92,7 +92,7 @@
   InputFile input_file_;
 
   std::vector<Token> tokens_;
-  scoped_ptr<ParseNode> parsed_;
+  std::unique_ptr<ParseNode> parsed_;
 
   Err parse_err_;
 
diff --git a/tools/gn/toolchain.cc b/tools/gn/toolchain.cc
index 280fb12..14d2bfd 100644
--- a/tools/gn/toolchain.cc
+++ b/tools/gn/toolchain.cc
@@ -91,7 +91,7 @@
   return tools_[static_cast<size_t>(type)].get();
 }
 
-void Toolchain::SetTool(ToolType type, scoped_ptr<Tool> t) {
+void Toolchain::SetTool(ToolType type, std::unique_ptr<Tool> t) {
   DCHECK(type != TYPE_NONE);
   DCHECK(!tools_[type].get());
   t->SetComplete();
diff --git a/tools/gn/toolchain.h b/tools/gn/toolchain.h
index 47a3a44..0c20726 100644
--- a/tools/gn/toolchain.h
+++ b/tools/gn/toolchain.h
@@ -5,8 +5,9 @@
 #ifndef TOOLS_GN_TOOLCHAIN_H_
 #define TOOLS_GN_TOOLCHAIN_H_
 
+#include <memory>
+
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_piece.h"
 #include "tools/gn/item.h"
 #include "tools/gn/label_ptr.h"
@@ -81,7 +82,7 @@
 
   // Set a tool. When all tools are configured, you should call
   // ToolchainSetupComplete().
-  void SetTool(ToolType type, scoped_ptr<Tool> t);
+  void SetTool(ToolType type, std::unique_ptr<Tool> t);
 
   // Does final setup on the toolchain once all tools are known.
   void ToolchainSetupComplete();
@@ -117,7 +118,7 @@
   int concurrent_links() const { return concurrent_links_; }
 
  private:
-  scoped_ptr<Tool> tools_[TYPE_NUMTYPES];
+  std::unique_ptr<Tool> tools_[TYPE_NUMTYPES];
 
   // How many links to run in parallel. Only the default toolchain's version of
   // this variable applies.
diff --git a/tools/gn/value.cc b/tools/gn/value.cc
index 57f23b07..1bf0bb7 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -56,7 +56,7 @@
       origin_(origin) {
 }
 
-Value::Value(const ParseNode* origin, scoped_ptr<Scope> scope)
+Value::Value(const ParseNode* origin, std::unique_ptr<Scope> scope)
     : type_(SCOPE),
       string_value_(),
       boolean_value_(false),
@@ -111,7 +111,7 @@
   }
 }
 
-void Value::SetScopeValue(scoped_ptr<Scope> scope) {
+void Value::SetScopeValue(std::unique_ptr<Scope> scope) {
   DCHECK(type_ == SCOPE);
   scope_value_ = std::move(scope);
 }
diff --git a/tools/gn/value.h b/tools/gn/value.h
index 44fba4ad..a8a83fb7 100644
--- a/tools/gn/value.h
+++ b/tools/gn/value.h
@@ -6,11 +6,12 @@
 #define TOOLS_GN_VALUE_H_
 
 #include <stdint.h>
+
 #include <map>
+#include <memory>
 
 #include "base/logging.h"
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "tools/gn/err.h"
 
 class ParseNode;
@@ -39,7 +40,7 @@
   // use-cases for creating values and immediately setting the scope on it. So
   // you can pass a null scope here if you promise to set it before any other
   // code gets it (code will generally assume the scope is not null).
-  Value(const ParseNode* origin, scoped_ptr<Scope> scope);
+  Value(const ParseNode* origin, std::unique_ptr<Scope> scope);
 
   Value(const Value& other);
   ~Value();
@@ -99,7 +100,7 @@
     DCHECK(type_ == SCOPE);
     return scope_value_.get();
   }
-  void SetScopeValue(scoped_ptr<Scope> scope);
+  void SetScopeValue(std::unique_ptr<Scope> scope);
 
   // Converts the given value to a string. Returns true if strings should be
   // quoted or the ToString of a string should be the string itself. If the
@@ -124,7 +125,7 @@
   bool boolean_value_;
   int64_t int_value_;
   std::vector<Value> list_value_;
-  scoped_ptr<Scope> scope_value_;
+  std::unique_ptr<Scope> scope_value_;
 
   const ParseNode* origin_;
 };
diff --git a/tools/gn/value_unittest.cc b/tools/gn/value_unittest.cc
index 75f9f60..9fefaf7 100644
--- a/tools/gn/value_unittest.cc
+++ b/tools/gn/value_unittest.cc
@@ -34,7 +34,7 @@
   // Scopes.
   TestWithScope setup;
   Scope* scope = new Scope(setup.scope());
-  Value scopeval(nullptr, scoped_ptr<Scope>(scope));
+  Value scopeval(nullptr, std::unique_ptr<Scope>(scope));
   EXPECT_EQ("{ }", scopeval.ToString(false));
 
   scope->SetValue("a", Value(nullptr, static_cast<int64_t>(42)), nullptr);
diff --git a/tools/gn/visual_studio_writer.cc b/tools/gn/visual_studio_writer.cc
index 4c88f35d..e0483465 100644
--- a/tools/gn/visual_studio_writer.cc
+++ b/tools/gn/visual_studio_writer.cc
@@ -6,11 +6,11 @@
 
 #include <algorithm>
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -352,19 +352,20 @@
           .add("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003"));
 
   {
-    scoped_ptr<XmlElementWriter> configurations = project.SubElement(
+    std::unique_ptr<XmlElementWriter> configurations = project.SubElement(
         "ItemGroup", XmlAttributes("Label", "ProjectConfigurations"));
-    scoped_ptr<XmlElementWriter> project_config = configurations->SubElement(
-        "ProjectConfiguration",
-        XmlAttributes("Include", std::string(kConfigurationName) + '|' +
-                                     solution_project.config_platform));
+    std::unique_ptr<XmlElementWriter> project_config =
+        configurations->SubElement(
+            "ProjectConfiguration",
+            XmlAttributes("Include", std::string(kConfigurationName) + '|' +
+                                         solution_project.config_platform));
     project_config->SubElement("Configuration")->Text(kConfigurationName);
     project_config->SubElement("Platform")
         ->Text(solution_project.config_platform);
   }
 
   {
-    scoped_ptr<XmlElementWriter> globals =
+    std::unique_ptr<XmlElementWriter> globals =
         project.SubElement("PropertyGroup", XmlAttributes("Label", "Globals"));
     globals->SubElement("ProjectGuid")->Text(solution_project.guid);
     globals->SubElement("Keyword")->Text("Win32Proj");
@@ -378,7 +379,7 @@
                               "$(VCTargetsPath)\\Microsoft.Cpp.Default.props"));
 
   {
-    scoped_ptr<XmlElementWriter> configuration = project.SubElement(
+    std::unique_ptr<XmlElementWriter> configuration = project.SubElement(
         "PropertyGroup", XmlAttributes("Label", "Configuration"));
     configuration->SubElement("CharacterSet")->Text("Unicode");
     std::string configuration_type = GetConfigurationType(target, err);
@@ -388,7 +389,7 @@
   }
 
   {
-    scoped_ptr<XmlElementWriter> locals =
+    std::unique_ptr<XmlElementWriter> locals =
         project.SubElement("PropertyGroup", XmlAttributes("Label", "Locals"));
     locals->SubElement("PlatformToolset")->Text(toolset_version_);
   }
@@ -404,7 +405,7 @@
                      XmlAttributes("Label", "ExtensionSettings"));
 
   {
-    scoped_ptr<XmlElementWriter> property_sheets = project.SubElement(
+    std::unique_ptr<XmlElementWriter> property_sheets = project.SubElement(
         "ImportGroup", XmlAttributes("Label", "PropertySheets"));
     property_sheets->SubElement(
         "Import",
@@ -419,10 +420,11 @@
   project.SubElement("PropertyGroup", XmlAttributes("Label", "UserMacros"));
 
   {
-    scoped_ptr<XmlElementWriter> properties =
+    std::unique_ptr<XmlElementWriter> properties =
         project.SubElement("PropertyGroup");
     {
-      scoped_ptr<XmlElementWriter> out_dir = properties->SubElement("OutDir");
+      std::unique_ptr<XmlElementWriter> out_dir =
+          properties->SubElement("OutDir");
       path_output.WriteDir(out_dir->StartContent(false),
                            build_settings_->build_dir(),
                            PathOutput::DIR_NO_LAST_SLASH);
@@ -435,13 +437,13 @@
   }
 
   {
-    scoped_ptr<XmlElementWriter> item_definitions =
+    std::unique_ptr<XmlElementWriter> item_definitions =
         project.SubElement("ItemDefinitionGroup");
     {
-      scoped_ptr<XmlElementWriter> cl_compile =
+      std::unique_ptr<XmlElementWriter> cl_compile =
           item_definitions->SubElement("ClCompile");
       {
-        scoped_ptr<XmlElementWriter> include_dirs =
+        std::unique_ptr<XmlElementWriter> include_dirs =
             cl_compile->SubElement("AdditionalIncludeDirectories");
         RecursiveTargetConfigToStream<SourceDir>(
             target, &ConfigValues::include_dirs, IncludeDirWriter(path_output),
@@ -483,7 +485,7 @@
         cl_compile->SubElement("PrecompiledHeader")->Text("NotUsing");
       }
       {
-        scoped_ptr<XmlElementWriter> preprocessor_definitions =
+        std::unique_ptr<XmlElementWriter> preprocessor_definitions =
             cl_compile->SubElement("PreprocessorDefinitions");
         RecursiveTargetConfigToStream<std::string>(
             target, &ConfigValues::defines, SemicolonSeparatedWriter(),
@@ -505,7 +507,7 @@
   }
 
   {
-    scoped_ptr<XmlElementWriter> group = project.SubElement("ItemGroup");
+    std::unique_ptr<XmlElementWriter> group = project.SubElement("ItemGroup");
     if (!target->config_values().precompiled_source().is_null()) {
       group
           ->SubElement(
@@ -537,7 +539,7 @@
   std::string ninja_target = GetNinjaTarget(target);
 
   {
-    scoped_ptr<XmlElementWriter> build =
+    std::unique_ptr<XmlElementWriter> build =
         project.SubElement("Target", XmlAttributes("Name", "Build"));
     build->SubElement(
         "Exec", XmlAttributes("Command",
@@ -545,7 +547,7 @@
   }
 
   {
-    scoped_ptr<XmlElementWriter> clean =
+    std::unique_ptr<XmlElementWriter> clean =
         project.SubElement("Target", XmlAttributes("Name", "Clean"));
     clean->SubElement(
         "Exec",
@@ -567,7 +569,7 @@
   std::ostringstream files_out;
 
   {
-    scoped_ptr<XmlElementWriter> filters_group =
+    std::unique_ptr<XmlElementWriter> filters_group =
         project.SubElement("ItemGroup");
     XmlElementWriter files_group(files_out, "ItemGroup", XmlAttributes(), 2);
 
@@ -586,7 +588,7 @@
     for (const SourceFile& file : target->sources()) {
       SourceFileType type = GetSourceFileType(file);
       if (type == SOURCE_H || type == SOURCE_CPP || type == SOURCE_C) {
-        scoped_ptr<XmlElementWriter> cl_item = files_group.SubElement(
+        std::unique_ptr<XmlElementWriter> cl_item = files_group.SubElement(
             type == SOURCE_H ? "ClInclude" : "ClCompile", "Include",
             SourceFileWriter(file_path_output, file));
 
diff --git a/tools/gn/xml_element_writer.cc b/tools/gn/xml_element_writer.cc
index a608ee3..fcf34b28 100644
--- a/tools/gn/xml_element_writer.cc
+++ b/tools/gn/xml_element_writer.cc
@@ -4,6 +4,8 @@
 
 #include "tools/gn/xml_element_writer.h"
 
+#include "base/memory/ptr_util.h"
+
 XmlAttributes::XmlAttributes() {}
 
 XmlAttributes::XmlAttributes(const base::StringPiece& attr_key,
@@ -53,16 +55,16 @@
   out_ << content;
 }
 
-scoped_ptr<XmlElementWriter> XmlElementWriter::SubElement(
+std::unique_ptr<XmlElementWriter> XmlElementWriter::SubElement(
     const std::string& tag) {
   return SubElement(tag, XmlAttributes());
 }
 
-scoped_ptr<XmlElementWriter> XmlElementWriter::SubElement(
+std::unique_ptr<XmlElementWriter> XmlElementWriter::SubElement(
     const std::string& tag,
     const XmlAttributes& attributes) {
   StartContent(true);
-  return make_scoped_ptr(
+  return base::WrapUnique(
       new XmlElementWriter(out_, tag, attributes, indent_ + 2));
 }
 
diff --git a/tools/gn/xml_element_writer.h b/tools/gn/xml_element_writer.h
index 186bd35c..8a83df0a 100644
--- a/tools/gn/xml_element_writer.h
+++ b/tools/gn/xml_element_writer.h
@@ -6,12 +6,13 @@
 #define TOOLS_GN_XML_ELEMENT_WRITER_H_
 
 #include <iosfwd>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
 #include "base/strings/string_piece.h"
 
 // Vector of XML attribute key-value pairs.
@@ -58,13 +59,14 @@
 
   // Starts new XML sub-element. Caller must ensure that parent element outlives
   // its children.
-  scoped_ptr<XmlElementWriter> SubElement(const std::string& tag);
-  scoped_ptr<XmlElementWriter> SubElement(const std::string& tag,
-                                          const XmlAttributes& attributes);
+  std::unique_ptr<XmlElementWriter> SubElement(const std::string& tag);
+  std::unique_ptr<XmlElementWriter> SubElement(const std::string& tag,
+                                               const XmlAttributes& attributes);
   template <class Writer>
-  scoped_ptr<XmlElementWriter> SubElement(const std::string& tag,
-                                          const std::string& attribute_name,
-                                          const Writer& attribute_value_writer);
+  std::unique_ptr<XmlElementWriter> SubElement(
+      const std::string& tag,
+      const std::string& attribute_name,
+      const Writer& attribute_value_writer);
 
   // Finishes opening tag if it isn't finished yet and optionally starts new
   // document line. Returns the stream where XML element content can be written.
@@ -109,12 +111,12 @@
 }
 
 template <class Writer>
-scoped_ptr<XmlElementWriter> XmlElementWriter::SubElement(
+std::unique_ptr<XmlElementWriter> XmlElementWriter::SubElement(
     const std::string& tag,
     const std::string& attribute_name,
     const Writer& attribute_value_writer) {
   StartContent(true);
-  return make_scoped_ptr(new XmlElementWriter(
+  return base::WrapUnique(new XmlElementWriter(
       out_, tag, attribute_name, attribute_value_writer, indent_ + 2));
 }
 
diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc
index e9d39bd..56d1be9c 100644
--- a/tools/imagediff/image_diff.cc
+++ b/tools/imagediff/image_diff.cc
@@ -13,6 +13,7 @@
 
 #include <algorithm>
 #include <iostream>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -21,7 +22,6 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/process/memory.h"
 #include "base/strings/string_util.h"
@@ -84,7 +84,7 @@
     if (byte_length == 0)
       return false;
 
-    scoped_ptr<unsigned char[]> source(new unsigned char[byte_length]);
+    std::unique_ptr<unsigned char[]> source(new unsigned char[byte_length]);
     if (fread(source.get(), 1, byte_length, stdin) != byte_length)
       return false;
 
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 1bb8ed06..c1fb9d2e 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -785,7 +785,7 @@
 
     size_t count = RandElementCount();
     for (size_t i = 0; i < count; ++i) {
-      scoped_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
+      std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
       if (!FuzzParam(render_pass.get(), fuzzer))
         return false;
       p->push_back(std::move(render_pass));
@@ -928,7 +928,7 @@
     if (!fuzzer->ShouldGenerate())
       return true;
 
-    scoped_ptr<content::SyntheticGestureParams> gesture_params;
+    std::unique_ptr<content::SyntheticGestureParams> gesture_params;
     switch (RandInRange(
         content::SyntheticGestureParams::SYNTHETIC_GESTURE_TYPE_MAX + 1)) {
       case content::SyntheticGestureParams::GestureType::
diff --git a/tools/ipc_fuzzer/message_replay/replay_process.h b/tools/ipc_fuzzer/message_replay/replay_process.h
index f60c270..9929b72 100644
--- a/tools/ipc_fuzzer/message_replay/replay_process.h
+++ b/tools/ipc_fuzzer/message_replay/replay_process.h
@@ -7,8 +7,9 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/threading/thread.h"
@@ -47,12 +48,12 @@
  private:
   void SendNextMessage();
 
-  scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
-  scoped_ptr<IPC::ChannelProxy> channel_;
+  std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
+  std::unique_ptr<IPC::ChannelProxy> channel_;
   base::MessageLoop main_loop_;
   base::Thread io_thread_;
   base::WaitableEvent shutdown_event_;
-  scoped_ptr<base::Timer> timer_;
+  std::unique_ptr<base::Timer> timer_;
   MessageVector messages_;
   size_t message_index_;
 
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index db8684d..0904e39b 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -411,15 +411,15 @@
     classname = cpp_util.Classname(schema_util.StripNamespace(type_.name))
     c = Code()
     (c.Append('// static')
-      .Append('scoped_ptr<%s> %s::FromValue(%s) {' % (classname,
+      .Append('std::unique_ptr<%s> %s::FromValue(%s) {' % (classname,
         cpp_namespace, self._GenerateParams(('const base::Value& value',))))
     )
     if self._generate_error_messages:
       c.Append('DCHECK(error);')
-    (c.Append('  scoped_ptr<%s> out(new %s());' % (classname, classname))
+    (c.Append('  std::unique_ptr<%s> out(new %s());' % (classname, classname))
       .Append('  if (!Populate(%s))' % self._GenerateArgs(
           ('value', 'out.get()')))
-      .Append('    return scoped_ptr<%s>();' % classname)
+      .Append('    return nullptr;')
       .Append('  return out;')
       .Append('}')
     )
@@ -441,9 +441,9 @@
     into a base::DictionaryValue.
     """
     c = Code()
-    (c.Sblock('scoped_ptr<base::DictionaryValue> %s::ToValue() const {' %
+    (c.Sblock('std::unique_ptr<base::DictionaryValue> %s::ToValue() const {' %
           cpp_namespace)
-        .Append('scoped_ptr<base::DictionaryValue> value('
+        .Append('std::unique_ptr<base::DictionaryValue> value('
                     'new base::DictionaryValue());')
         .Append()
     )
@@ -500,8 +500,9 @@
     into a base::Value.
     """
     c = Code()
-    c.Sblock('scoped_ptr<base::Value> %s::ToValue() const {' % cpp_namespace)
-    c.Append('scoped_ptr<base::Value> result;')
+    c.Sblock('std::unique_ptr<base::Value> %s::ToValue() const {' %
+                 cpp_namespace)
+    c.Append('std::unique_ptr<base::Value> result;')
     for choice in type_.choices:
       choice_var = 'as_%s' % choice.unix_name
       # Enums cannot be wrapped with scoped_ptr, but the XXX_NONE enum value
@@ -679,7 +680,7 @@
     (c.Concat(self._GenerateError(
         '"expected %%(total)d arguments, got " '
         '+ base::IntToString(%%(var)s.GetSize())'))
-      .Append('return scoped_ptr<Params>();')
+      .Append('return nullptr;')
       .Eblock('}')
       .Substitute({
         'var': var,
@@ -696,13 +697,13 @@
     """
     c = Code()
     (c.Append('// static')
-      .Sblock('scoped_ptr<Params> Params::Create(%s) {' % self._GenerateParams(
-        ['const base::ListValue& args']))
+      .Sblock('std::unique_ptr<Params> Params::Create(%s) {' %
+                  self._GenerateParams(['const base::ListValue& args']))
     )
     if self._generate_error_messages:
       c.Append('DCHECK(error);')
     (c.Concat(self._GenerateParamsCheck(function, 'args'))
-      .Append('scoped_ptr<Params> params(new Params());')
+      .Append('std::unique_ptr<Params> params(new Params());')
     )
 
     for param in function.params:
@@ -713,7 +714,7 @@
       # incorrect or missing, those following it are not processed. Note that
       # for optional arguments, we allow missing arguments and proceed because
       # there may be other arguments following it.
-      failure_value = 'scoped_ptr<Params>()'
+      failure_value = 'std::unique_ptr<Params>()'
       c.Append()
       value_var = param.unix_name + '_value'
       (c.Append('const base::Value* %(value_var)s = NULL;')
@@ -812,7 +813,7 @@
           c.Append('return %(failure_value)s;')
         (c.Eblock('}')
           .Sblock('else {')
-          .Append('scoped_ptr<%(cpp_type)s> temp(new %(cpp_type)s());')
+          .Append('std::unique_ptr<%(cpp_type)s> temp(new %(cpp_type)s());')
           .Append('if (!%%(cpp_type)s::Populate(%s)) {' % self._GenerateArgs(
             ('*dictionary', 'temp.get()')))
           .Append('  return %(failure_value)s;')
@@ -876,7 +877,7 @@
       c.Eblock('}')
     elif underlying_type.property_type == PropertyType.CHOICES:
       if is_ptr:
-        (c.Append('scoped_ptr<%(cpp_type)s> temp(new %(cpp_type)s());')
+        (c.Append('std::unique_ptr<%(cpp_type)s> temp(new %(cpp_type)s());')
           .Append('if (!%%(cpp_type)s::Populate(%s))' % self._GenerateArgs(
             ('*%(src_var)s', 'temp.get()')))
           .Append('  return %(failure_value)s;')
@@ -1085,9 +1086,9 @@
     params = callback.params
     c.Concat(self._GeneratePropertyFunctions(function_scope, params))
 
-    (c.Sblock('scoped_ptr<base::ListValue> %(function_scope)s'
+    (c.Sblock('std::unique_ptr<base::ListValue> %(function_scope)s'
                   'Create(%(declaration_list)s) {')
-      .Append('scoped_ptr<base::ListValue> create_results('
+      .Append('std::unique_ptr<base::ListValue> create_results('
               'new base::ListValue());')
     )
     declaration_list = []
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
index 23460c63..269a995 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -125,7 +125,7 @@
       # Wrap ptrs and base::Values in containers (which aren't movable) in
       # scoped_ptrs.
       if is_ptr or (is_in_container and is_base_value):
-        cpp_type = 'scoped_ptr<%s>' % cpp_util.PadForGenerics(cpp_type)
+        cpp_type = 'std::unique_ptr<%s>' % cpp_util.PadForGenerics(cpp_type)
 
     return cpp_type
 
diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py
index a190eded..c64241cd 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -53,11 +53,11 @@
       .Append('#include <stdint.h>')
       .Append()
       .Append('#include <map>')
+      .Append('#include <memory>')
       .Append('#include <string>')
       .Append('#include <vector>')
       .Append()
       .Append('#include "base/logging.h"')
-      .Append('#include "base/memory/scoped_ptr.h"')
       .Append('#include "base/values.h"')
       .Cblock(self._type_helper.GenerateIncludes(include_soft=include_soft))
       .Append()
@@ -241,7 +241,7 @@
           (c.Append()
             .Comment('Creates a %s object from a base::Value, or NULL on '
                      'failure.' % classname)
-            .Append('static scoped_ptr<%s> FromValue(%s);' % (
+            .Append('static std::unique_ptr<%s> FromValue(%s);' % (
                 classname, self._GenerateParams(('const base::Value& value',))))
           )
       if type_.origin.from_client:
@@ -251,7 +251,7 @@
         (c.Append()
           .Comment('Returns a new %s representing the serialized form of this '
                    '%s object.' % (value_type, classname))
-          .Append('scoped_ptr<%s> ToValue() const;' % value_type)
+          .Append('std::unique_ptr<%s> ToValue() const;' % value_type)
         )
       if type_.property_type == PropertyType.CHOICES:
         # Choices are modelled with optional fields for each choice. Exactly one
@@ -328,8 +328,8 @@
 
     c = Code()
     (c.Sblock('struct Params {')
-      .Append('static scoped_ptr<Params> Create(%s);' % self._GenerateParams(
-          ('const base::ListValue& args',)))
+      .Append('static std::unique_ptr<Params> Create(%s);' %
+                  self._GenerateParams(('const base::ListValue& args',)))
       .Append('~Params();')
       .Append()
       .Cblock(self._GenerateTypes(p.type_ for p in function.params))
@@ -368,7 +368,7 @@
         c.Comment(param.description)
       declaration_list.append(cpp_util.GetParameterDeclaration(
           param, self._type_helper.GetCppType(param.type_)))
-    c.Append('scoped_ptr<base::ListValue> Create(%s);' %
+    c.Append('std::unique_ptr<base::ListValue> Create(%s);' %
              ', '.join(declaration_list))
     return c
 
diff --git a/tools/json_schema_compiler/test/additional_properties_unittest.cc b/tools/json_schema_compiler/test/additional_properties_unittest.cc
index dc980af..67efea8 100644
--- a/tools/json_schema_compiler/test/additional_properties_unittest.cc
+++ b/tools/json_schema_compiler/test/additional_properties_unittest.cc
@@ -2,42 +2,49 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "testing/gtest/include/gtest/gtest.h"
 #include "tools/json_schema_compiler/test/additional_properties.h"
 
+#include <memory>
+
+#include "testing/gtest/include/gtest/gtest.h"
+
 using namespace test::api::additional_properties;
 
 TEST(JsonSchemaCompilerAdditionalPropertiesTest,
     AdditionalPropertiesTypePopulate) {
   {
-    scoped_ptr<base::ListValue> list_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> list_value(new base::ListValue());
     list_value->Append(new base::StringValue("asdf"));
     list_value->Append(new base::FundamentalValue(4));
-    scoped_ptr<base::DictionaryValue> type_value(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> type_value(
+        new base::DictionaryValue());
     type_value->SetString("string", "value");
     type_value->SetInteger("other", 9);
     type_value->Set("another", list_value.release());
-    scoped_ptr<AdditionalPropertiesType> type(new AdditionalPropertiesType());
+    std::unique_ptr<AdditionalPropertiesType> type(
+        new AdditionalPropertiesType());
     ASSERT_TRUE(AdditionalPropertiesType::Populate(*type_value, type.get()));
     EXPECT_TRUE(type->additional_properties.Equals(type_value.get()));
   }
   {
-    scoped_ptr<base::DictionaryValue> type_value(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> type_value(
+        new base::DictionaryValue());
     type_value->SetInteger("string", 3);
-    scoped_ptr<AdditionalPropertiesType> type(new AdditionalPropertiesType());
+    std::unique_ptr<AdditionalPropertiesType> type(
+        new AdditionalPropertiesType());
     EXPECT_FALSE(AdditionalPropertiesType::Populate(*type_value, type.get()));
   }
 }
 
 TEST(JsonSchemaCompilerAdditionalPropertiesTest,
     AdditionalPropertiesParamsCreate) {
-  scoped_ptr<base::DictionaryValue> param_object_value(
+  std::unique_ptr<base::DictionaryValue> param_object_value(
       new base::DictionaryValue());
   param_object_value->SetString("str", "a");
   param_object_value->SetInteger("num", 1);
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
   params_value->Append(param_object_value->DeepCopy());
-  scoped_ptr<AdditionalProperties::Params> params(
+  std::unique_ptr<AdditionalProperties::Params> params(
       AdditionalProperties::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   EXPECT_TRUE(params->param_object.additional_properties.Equals(
diff --git a/tools/json_schema_compiler/test/any_unittest.cc b/tools/json_schema_compiler/test/any_unittest.cc
index d10a3eb4..52587e7e 100644
--- a/tools/json_schema_compiler/test/any_unittest.cc
+++ b/tools/json_schema_compiler/test/any_unittest.cc
@@ -10,47 +10,47 @@
 TEST(JsonSchemaCompilerAnyTest, AnyTypePopulate) {
   {
     AnyType any_type;
-    scoped_ptr<base::DictionaryValue> any_type_value(
+    std::unique_ptr<base::DictionaryValue> any_type_value(
         new base::DictionaryValue());
     any_type_value->SetString("any", "value");
     EXPECT_TRUE(AnyType::Populate(*any_type_value, &any_type));
-    scoped_ptr<base::Value> any_type_to_value(any_type.ToValue());
+    std::unique_ptr<base::Value> any_type_to_value(any_type.ToValue());
     EXPECT_TRUE(any_type_value->Equals(any_type_to_value.get()));
   }
   {
     AnyType any_type;
-    scoped_ptr<base::DictionaryValue> any_type_value(
+    std::unique_ptr<base::DictionaryValue> any_type_value(
         new base::DictionaryValue());
     any_type_value->SetInteger("any", 5);
     EXPECT_TRUE(AnyType::Populate(*any_type_value, &any_type));
-    scoped_ptr<base::Value> any_type_to_value(any_type.ToValue());
+    std::unique_ptr<base::Value> any_type_to_value(any_type.ToValue());
     EXPECT_TRUE(any_type_value->Equals(any_type_to_value.get()));
   }
 }
 
 TEST(JsonSchemaCompilerAnyTest, OptionalAnyParamsCreate) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<OptionalAny::Params> params(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<OptionalAny::Params> params(
         OptionalAny::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_FALSE(params->any_name.get());
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<base::Value> param(new base::StringValue("asdf"));
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::Value> param(new base::StringValue("asdf"));
     params_value->Append(param->DeepCopy());
-    scoped_ptr<OptionalAny::Params> params(
+    std::unique_ptr<OptionalAny::Params> params(
         OptionalAny::Params::Create(*params_value));
     ASSERT_TRUE(params);
     ASSERT_TRUE(params->any_name);
     EXPECT_TRUE(params->any_name->Equals(param.get()));
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<base::Value> param(new base::FundamentalValue(true));
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::Value> param(new base::FundamentalValue(true));
     params_value->Append(param->DeepCopy());
-    scoped_ptr<OptionalAny::Params> params(
+    std::unique_ptr<OptionalAny::Params> params(
         OptionalAny::Params::Create(*params_value));
     ASSERT_TRUE(params);
     ASSERT_TRUE(params->any_name);
diff --git a/tools/json_schema_compiler/test/arrays_unittest.cc b/tools/json_schema_compiler/test/arrays_unittest.cc
index 2c3a461..0c99be9 100644
--- a/tools/json_schema_compiler/test/arrays_unittest.cc
+++ b/tools/json_schema_compiler/test/arrays_unittest.cc
@@ -6,6 +6,8 @@
 
 #include <stddef.h>
 
+#include <memory>
+
 #include "base/macros.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "tools/json_schema_compiler/test/enums.h"
@@ -15,8 +17,8 @@
 namespace {
 
 // TODO(calamity): Change to AppendString etc once kalman's patch goes through
-static scoped_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() {
-  base::DictionaryValue* value = new base::DictionaryValue();
+static std::unique_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() {
+  std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
   base::ListValue* strings_value = new base::ListValue();
   strings_value->Append(new base::StringValue("a"));
   strings_value->Append(new base::StringValue("b"));
@@ -35,7 +37,7 @@
   value->Set("booleans", booleans_value);
   value->Set("strings", strings_value);
   value->Set("integers", integers_value);
-  return scoped_ptr<base::DictionaryValue>(value);
+  return value;
 }
 
 static base::Value* CreateItemValue(int val) {
@@ -48,8 +50,9 @@
 
 TEST(JsonSchemaCompilerArrayTest, BasicArrayType) {
   {
-    scoped_ptr<base::DictionaryValue> value = CreateBasicArrayTypeDictionary();
-    scoped_ptr<BasicArrayType> basic_array_type(new BasicArrayType());
+    std::unique_ptr<base::DictionaryValue> value =
+        CreateBasicArrayTypeDictionary();
+    std::unique_ptr<BasicArrayType> basic_array_type(new BasicArrayType());
     ASSERT_TRUE(BasicArrayType::Populate(*value, basic_array_type.get()));
     EXPECT_TRUE(value->Equals(basic_array_type->ToValue().get()));
   }
@@ -76,7 +79,7 @@
             enum_array_reference.types);
 
   // Test ToValue.
-  scoped_ptr<base::Value> as_value(enum_array_reference.ToValue());
+  std::unique_ptr<base::Value> as_value(enum_array_reference.ToValue());
   EXPECT_TRUE(value.Equals(as_value.get())) << value << " != " << *as_value;
 }
 
@@ -117,7 +120,7 @@
             enum_array_mixed.external_enums);
 
   // Test ToValue.
-  scoped_ptr<base::Value> as_value(enum_array_mixed.ToValue());
+  std::unique_ptr<base::Value> as_value(enum_array_mixed.ToValue());
   EXPECT_TRUE(value.Equals(as_value.get())) << value << " != " << *as_value;
 }
 
@@ -128,7 +131,7 @@
     enums.push_back(ENUMERATION_TWO);
     enums.push_back(ENUMERATION_THREE);
 
-    scoped_ptr<base::ListValue> types(new base::ListValue());
+    std::unique_ptr<base::ListValue> types(new base::ListValue());
     for (size_t i = 0; i < enums.size(); ++i)
       types->Append(new base::StringValue(ToString(enums[i])));
 
@@ -141,7 +144,7 @@
   }
   {
     base::DictionaryValue value;
-    scoped_ptr<base::ListValue> enum_array(new base::ListValue());
+    std::unique_ptr<base::ListValue> enum_array(new base::ListValue());
     enum_array->Append(new base::StringValue("invalid"));
 
     value.Set("types", enum_array.release());
@@ -153,13 +156,13 @@
 
 TEST(JsonSchemaCompilerArrayTest, RefArrayType) {
   {
-    scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
-    scoped_ptr<base::ListValue> ref_array(new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
+    std::unique_ptr<base::ListValue> ref_array(new base::ListValue());
     ref_array->Append(CreateItemValue(1));
     ref_array->Append(CreateItemValue(2));
     ref_array->Append(CreateItemValue(3));
     value->Set("refs", ref_array.release());
-    scoped_ptr<RefArrayType> ref_array_type(new RefArrayType());
+    std::unique_ptr<RefArrayType> ref_array_type(new RefArrayType());
     EXPECT_TRUE(RefArrayType::Populate(*value, ref_array_type.get()));
     ASSERT_EQ(3u, ref_array_type->refs.size());
     EXPECT_EQ(1, ref_array_type->refs[0].val);
@@ -167,24 +170,24 @@
     EXPECT_EQ(3, ref_array_type->refs[2].val);
   }
   {
-    scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
-    scoped_ptr<base::ListValue> not_ref_array(new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
+    std::unique_ptr<base::ListValue> not_ref_array(new base::ListValue());
     not_ref_array->Append(CreateItemValue(1));
     not_ref_array->Append(new base::FundamentalValue(3));
     value->Set("refs", not_ref_array.release());
-    scoped_ptr<RefArrayType> ref_array_type(new RefArrayType());
+    std::unique_ptr<RefArrayType> ref_array_type(new RefArrayType());
     EXPECT_FALSE(RefArrayType::Populate(*value, ref_array_type.get()));
   }
 }
 
 TEST(JsonSchemaCompilerArrayTest, IntegerArrayParamsCreate) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
-  scoped_ptr<base::ListValue> integer_array(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> integer_array(new base::ListValue());
   integer_array->Append(new base::FundamentalValue(2));
   integer_array->Append(new base::FundamentalValue(4));
   integer_array->Append(new base::FundamentalValue(8));
   params_value->Append(integer_array.release());
-  scoped_ptr<IntegerArray::Params> params(
+  std::unique_ptr<IntegerArray::Params> params(
       IntegerArray::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   ASSERT_EQ(3u, params->nums.size());
@@ -194,13 +197,13 @@
 }
 
 TEST(JsonSchemaCompilerArrayTest, AnyArrayParamsCreate) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
-  scoped_ptr<base::ListValue> any_array(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> any_array(new base::ListValue());
   any_array->Append(new base::FundamentalValue(1));
   any_array->Append(new base::StringValue("test"));
   any_array->Append(CreateItemValue(2));
   params_value->Append(any_array.release());
-  scoped_ptr<AnyArray::Params> params(
+  std::unique_ptr<AnyArray::Params> params(
       AnyArray::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   ASSERT_EQ(3u, params->anys.size());
@@ -210,12 +213,12 @@
 }
 
 TEST(JsonSchemaCompilerArrayTest, ObjectArrayParamsCreate) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
-  scoped_ptr<base::ListValue> item_array(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> item_array(new base::ListValue());
   item_array->Append(CreateItemValue(1));
   item_array->Append(CreateItemValue(2));
   params_value->Append(item_array.release());
-  scoped_ptr<ObjectArray::Params> params(
+  std::unique_ptr<ObjectArray::Params> params(
       ObjectArray::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   ASSERT_EQ(2u, params->objects.size());
@@ -224,12 +227,12 @@
 }
 
 TEST(JsonSchemaCompilerArrayTest, RefArrayParamsCreate) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
-  scoped_ptr<base::ListValue> item_array(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> item_array(new base::ListValue());
   item_array->Append(CreateItemValue(1));
   item_array->Append(CreateItemValue(2));
   params_value->Append(item_array.release());
-  scoped_ptr<RefArray::Params> params(
+  std::unique_ptr<RefArray::Params> params(
       RefArray::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   ASSERT_EQ(2u, params->refs.size());
@@ -241,7 +244,7 @@
   std::vector<int> integers;
   integers.push_back(1);
   integers.push_back(2);
-  scoped_ptr<base::ListValue> results =
+  std::unique_ptr<base::ListValue> results =
       ReturnIntegerArray::Results::Create(integers);
 
   base::ListValue expected;
@@ -258,7 +261,7 @@
   items.push_back(Item());
   items[0].val = 1;
   items[1].val = 2;
-  scoped_ptr<base::ListValue> results =
+  std::unique_ptr<base::ListValue> results =
       ReturnRefArray::Results::Create(items);
 
   base::ListValue expected;
diff --git a/tools/json_schema_compiler/test/callbacks_unittest.cc b/tools/json_schema_compiler/test/callbacks_unittest.cc
index a12584d..f213bb8 100644
--- a/tools/json_schema_compiler/test/callbacks_unittest.cc
+++ b/tools/json_schema_compiler/test/callbacks_unittest.cc
@@ -11,7 +11,7 @@
 TEST(JsonSchemaCompilerCallbacksTest, ReturnsObjectResultCreate) {
   ReturnsObject::Results::SomeObject some_object;
   some_object.state = ENUMERATION_FOO;
-  scoped_ptr<base::ListValue> results =
+  std::unique_ptr<base::ListValue> results =
       ReturnsObject::Results::Create(some_object);
 
   base::DictionaryValue* expected_dict = new base::DictionaryValue();
@@ -24,7 +24,7 @@
 TEST(JsonSchemaCompilerCallbacksTest, ReturnsMultipleResultCreate) {
   ReturnsMultiple::Results::SomeObject some_object;
   some_object.state = ENUMERATION_FOO;
-  scoped_ptr<base::ListValue> results =
+  std::unique_ptr<base::ListValue> results =
       ReturnsMultiple::Results::Create(5, some_object);
 
   base::DictionaryValue* expected_dict = new base::DictionaryValue();
diff --git a/tools/json_schema_compiler/test/choices_unittest.cc b/tools/json_schema_compiler/test/choices_unittest.cc
index f86c978..608ece98 100644
--- a/tools/json_schema_compiler/test/choices_unittest.cc
+++ b/tools/json_schema_compiler/test/choices_unittest.cc
@@ -20,22 +20,22 @@
 
 TEST(JsonSchemaCompilerChoicesTest, TakesIntegersParamsCreate) {
   {
-    scoped_ptr<TakesIntegers::Params> params(
+    std::unique_ptr<TakesIntegers::Params> params(
         TakesIntegers::Params::Create(*List(new base::FundamentalValue(true))));
     EXPECT_FALSE(params);
   }
   {
-    scoped_ptr<TakesIntegers::Params> params(
+    std::unique_ptr<TakesIntegers::Params> params(
         TakesIntegers::Params::Create(*List(new base::FundamentalValue(6))));
     ASSERT_TRUE(params);
     EXPECT_FALSE(params->nums.as_integers);
     EXPECT_EQ(6, *params->nums.as_integer);
   }
   {
-    scoped_ptr<TakesIntegers::Params> params(TakesIntegers::Params::Create(
-        *List(List(new base::FundamentalValue(2),
-                   new base::FundamentalValue(6),
-                   new base::FundamentalValue(8)).release())));
+    std::unique_ptr<TakesIntegers::Params> params(TakesIntegers::Params::Create(
+        *List(List(new base::FundamentalValue(2), new base::FundamentalValue(6),
+                   new base::FundamentalValue(8))
+                  .release())));
     ASSERT_TRUE(params);
     ASSERT_TRUE(params->nums.as_integers);
     EXPECT_EQ(Vector(2, 6, 8), *params->nums.as_integers);
@@ -44,7 +44,7 @@
 
 TEST(JsonSchemaCompilerChoicesTest, ObjectWithChoicesParamsCreate) {
   {
-    scoped_ptr<ObjectWithChoices::Params> params(
+    std::unique_ptr<ObjectWithChoices::Params> params(
         ObjectWithChoices::Params::Create(*List(
             Dictionary("strings", new base::StringValue("asdf")).release())));
     ASSERT_TRUE(params);
@@ -53,10 +53,11 @@
     EXPECT_FALSE(params->string_info.integers);
   }
   {
-    scoped_ptr<ObjectWithChoices::Params> params(
-        ObjectWithChoices::Params::Create(*List(
-            Dictionary("strings", new base::StringValue("asdf"),
-                       "integers", new base::FundamentalValue(6)).release())));
+    std::unique_ptr<ObjectWithChoices::Params> params(
+        ObjectWithChoices::Params::Create(
+            *List(Dictionary("strings", new base::StringValue("asdf"),
+                             "integers", new base::FundamentalValue(6))
+                      .release())));
     ASSERT_TRUE(params);
     EXPECT_FALSE(params->string_info.strings.as_strings);
     EXPECT_EQ("asdf", *params->string_info.strings.as_string);
@@ -71,34 +72,37 @@
 
 TEST(JsonSchemaCompilerChoicesTest, ObjectWithChoicesParamsCreateFail) {
   {
-    scoped_ptr<base::DictionaryValue> object_param(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> object_param(
+        new base::DictionaryValue());
     object_param->SetWithoutPathExpansion("strings",
                                           new base::FundamentalValue(5));
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(object_param.release());
-    scoped_ptr<ObjectWithChoices::Params> params(
+    std::unique_ptr<ObjectWithChoices::Params> params(
         ObjectWithChoices::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
   {
-    scoped_ptr<base::DictionaryValue> object_param(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> object_param(
+        new base::DictionaryValue());
     object_param->SetWithoutPathExpansion("strings",
                                           new base::StringValue("asdf"));
     object_param->SetWithoutPathExpansion("integers",
                                           new base::StringValue("asdf"));
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(object_param.release());
-    scoped_ptr<ObjectWithChoices::Params> params(
+    std::unique_ptr<ObjectWithChoices::Params> params(
         ObjectWithChoices::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
   {
-    scoped_ptr<base::DictionaryValue> object_param(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> object_param(
+        new base::DictionaryValue());
     object_param->SetWithoutPathExpansion("integers",
                                           new base::FundamentalValue(6));
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(object_param.release());
-    scoped_ptr<ObjectWithChoices::Params> params(
+    std::unique_ptr<ObjectWithChoices::Params> params(
         ObjectWithChoices::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
@@ -149,7 +153,7 @@
     ReturnChoices::Results::Result results;
     results.as_integers.reset(new std::vector<int>(Vector(1, 2)));
 
-    scoped_ptr<base::Value> results_value = results.ToValue();
+    std::unique_ptr<base::Value> results_value = results.ToValue();
     ASSERT_TRUE(results_value);
 
     base::ListValue expected;
@@ -162,7 +166,7 @@
     ReturnChoices::Results::Result results;
     results.as_integer.reset(new int(5));
 
-    scoped_ptr<base::Value> results_value = results.ToValue();
+    std::unique_ptr<base::Value> results_value = results.ToValue();
     ASSERT_TRUE(results_value);
 
     base::FundamentalValue expected(5);
@@ -176,8 +180,8 @@
   // NestedChoices.
   {
     // The plain integer choice.
-    scoped_ptr<base::Value> value = ReadJson("42");
-    scoped_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
+    std::unique_ptr<base::Value> value = ReadJson("42");
+    std::unique_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
 
     ASSERT_TRUE(obj);
     ASSERT_TRUE(obj->as_integer);
@@ -190,8 +194,8 @@
 
   {
     // The string choice within the first choice.
-    scoped_ptr<base::Value> value = ReadJson("\"foo\"");
-    scoped_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
+    std::unique_ptr<base::Value> value = ReadJson("\"foo\"");
+    std::unique_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
 
     ASSERT_TRUE(obj);
     EXPECT_FALSE(obj->as_integer);
@@ -206,8 +210,8 @@
 
   {
     // The boolean choice within the first choice.
-    scoped_ptr<base::Value> value = ReadJson("true");
-    scoped_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
+    std::unique_ptr<base::Value> value = ReadJson("true");
+    std::unique_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
 
     ASSERT_TRUE(obj);
     EXPECT_FALSE(obj->as_integer);
@@ -222,8 +226,8 @@
 
   {
     // The double choice within the second choice.
-    scoped_ptr<base::Value> value = ReadJson("42.0");
-    scoped_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
+    std::unique_ptr<base::Value> value = ReadJson("42.0");
+    std::unique_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
 
     ASSERT_TRUE(obj);
     EXPECT_FALSE(obj->as_integer);
@@ -239,9 +243,9 @@
 
   {
     // The ChoiceType choice within the second choice.
-    scoped_ptr<base::Value> value = ReadJson(
-        "{\"integers\": [1, 2], \"strings\": \"foo\"}");
-    scoped_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
+    std::unique_ptr<base::Value> value =
+        ReadJson("{\"integers\": [1, 2], \"strings\": \"foo\"}");
+    std::unique_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
 
     ASSERT_TRUE(obj);
     EXPECT_FALSE(obj->as_integer);
@@ -266,12 +270,12 @@
 
   {
     // The array of ChoiceTypes within the second choice.
-    scoped_ptr<base::Value> value = ReadJson(
+    std::unique_ptr<base::Value> value = ReadJson(
         "["
         "  {\"integers\": [1, 2], \"strings\": \"foo\"},"
         "  {\"integers\": 3, \"strings\": [\"bar\", \"baz\"]}"
         "]");
-    scoped_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
+    std::unique_ptr<NestedChoice> obj = NestedChoice::FromValue(*value);
 
     ASSERT_TRUE(obj);
     EXPECT_FALSE(obj->as_integer);
diff --git a/tools/json_schema_compiler/test/crossref_unittest.cc b/tools/json_schema_compiler/test/crossref_unittest.cc
index cc20675..56dec92d 100644
--- a/tools/json_schema_compiler/test/crossref_unittest.cc
+++ b/tools/json_schema_compiler/test/crossref_unittest.cc
@@ -2,22 +2,24 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "tools/json_schema_compiler/test/simple_api.h"
 #include "tools/json_schema_compiler/test/crossref.h"
 
+#include <memory>
+
 #include "testing/gtest/include/gtest/gtest.h"
+#include "tools/json_schema_compiler/test/simple_api.h"
 
 using namespace test::api;
 
 namespace {
 
-scoped_ptr<base::DictionaryValue> CreateTestTypeValue() {
-  base::DictionaryValue* value(new base::DictionaryValue());
+std::unique_ptr<base::DictionaryValue> CreateTestTypeValue() {
+  std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
   value->Set("number", new base::FundamentalValue(1.1));
   value->Set("integer", new base::FundamentalValue(4));
   value->Set("string", new base::StringValue("bling"));
   value->Set("boolean", new base::FundamentalValue(true));
-  return scoped_ptr<base::DictionaryValue>(value);
+  return value;
 }
 
 }  // namespace
@@ -40,15 +42,16 @@
   EXPECT_EQ(simple_api::TEST_ENUM_NONE, crossref_type.test_enum_optional_extra);
 
   // Test ToValue of the compiled type --> value.
-  scoped_ptr<base::DictionaryValue> crossref_value = crossref_type.ToValue();
+  std::unique_ptr<base::DictionaryValue> crossref_value =
+      crossref_type.ToValue();
   ASSERT_TRUE(crossref_value);
   EXPECT_TRUE(crossref_orig.Equals(crossref_value.get()));
 }
 
 TEST(JsonSchemaCompilerCrossrefTest, TestTypeOptionalParamCreate) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
   params_value->Append(CreateTestTypeValue().release());
-  scoped_ptr<crossref::TestTypeOptionalParam::Params> params(
+  std::unique_ptr<crossref::TestTypeOptionalParam::Params> params(
       crossref::TestTypeOptionalParam::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   EXPECT_TRUE(params->test_type.get());
@@ -57,21 +60,22 @@
 }
 
 TEST(JsonSchemaCompilerCrossrefTest, TestTypeOptionalParamFail) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
-  scoped_ptr<base::DictionaryValue> test_type_value = CreateTestTypeValue();
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::DictionaryValue> test_type_value =
+      CreateTestTypeValue();
   test_type_value->RemoveWithoutPathExpansion("number", NULL);
   params_value->Append(test_type_value.release());
-  scoped_ptr<crossref::TestTypeOptionalParam::Params> params(
+  std::unique_ptr<crossref::TestTypeOptionalParam::Params> params(
       crossref::TestTypeOptionalParam::Params::Create(*params_value));
   EXPECT_FALSE(params.get());
 }
 
 TEST(JsonSchemaCompilerCrossrefTest, GetTestType) {
-  scoped_ptr<base::DictionaryValue> value = CreateTestTypeValue();
-  scoped_ptr<simple_api::TestType> test_type(new simple_api::TestType());
+  std::unique_ptr<base::DictionaryValue> value = CreateTestTypeValue();
+  std::unique_ptr<simple_api::TestType> test_type(new simple_api::TestType());
   EXPECT_TRUE(simple_api::TestType::Populate(*value, test_type.get()));
 
-  scoped_ptr<base::ListValue> results =
+  std::unique_ptr<base::ListValue> results =
       crossref::GetTestType::Results::Create(*test_type);
   base::DictionaryValue* result_dict = NULL;
   results->GetDictionary(0, &result_dict);
@@ -80,13 +84,13 @@
 
 TEST(JsonSchemaCompilerCrossrefTest, TestTypeInObjectParamsCreate) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<base::DictionaryValue> param_object_value(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> param_object_value(
         new base::DictionaryValue());
     param_object_value->Set("testType", CreateTestTypeValue().release());
     param_object_value->Set("boolean", new base::FundamentalValue(true));
     params_value->Append(param_object_value.release());
-    scoped_ptr<crossref::TestTypeInObject::Params> params(
+    std::unique_ptr<crossref::TestTypeInObject::Params> params(
         crossref::TestTypeInObject::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_TRUE(params->param_object.test_type.get());
@@ -95,35 +99,35 @@
         params->param_object.test_type->ToValue().get()));
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<base::DictionaryValue> param_object_value(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> param_object_value(
         new base::DictionaryValue());
     param_object_value->Set("boolean", new base::FundamentalValue(true));
     params_value->Append(param_object_value.release());
-    scoped_ptr<crossref::TestTypeInObject::Params> params(
+    std::unique_ptr<crossref::TestTypeInObject::Params> params(
         crossref::TestTypeInObject::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_FALSE(params->param_object.test_type.get());
     EXPECT_TRUE(params->param_object.boolean);
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<base::DictionaryValue> param_object_value(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> param_object_value(
         new base::DictionaryValue());
     param_object_value->Set("testType", new base::StringValue("invalid"));
     param_object_value->Set("boolean", new base::FundamentalValue(true));
     params_value->Append(param_object_value.release());
-    scoped_ptr<crossref::TestTypeInObject::Params> params(
+    std::unique_ptr<crossref::TestTypeInObject::Params> params(
         crossref::TestTypeInObject::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<base::DictionaryValue> param_object_value(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> param_object_value(
         new base::DictionaryValue());
     param_object_value->Set("testType", CreateTestTypeValue().release());
     params_value->Append(param_object_value.release());
-    scoped_ptr<crossref::TestTypeInObject::Params> params(
+    std::unique_ptr<crossref::TestTypeInObject::Params> params(
         crossref::TestTypeInObject::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
diff --git a/tools/json_schema_compiler/test/enums_unittest.cc b/tools/json_schema_compiler/test/enums_unittest.cc
index 2eee096..345938a 100644
--- a/tools/json_schema_compiler/test/enums_unittest.cc
+++ b/tools/json_schema_compiler/test/enums_unittest.cc
@@ -32,7 +32,7 @@
     base::ListValue args;
     args.Append(new base::StringValue("one"));
 
-    scoped_ptr<TakesEnumAsType::Params> params(
+    std::unique_ptr<TakesEnumAsType::Params> params(
         TakesEnumAsType::Params::Create(args));
     ASSERT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_ONE, params->enumeration);
@@ -74,7 +74,7 @@
     base::ListValue params_value;
     params_value.Append(List(new base::StringValue("one"),
                              new base::StringValue("two")).release());
-    scoped_ptr<TakesEnumArrayAsType::Params> params(
+    std::unique_ptr<TakesEnumArrayAsType::Params> params(
         TakesEnumArrayAsType::Params::Create(params_value));
     ASSERT_TRUE(params);
     EXPECT_EQ(2U, params->values.size());
@@ -84,7 +84,7 @@
   {
     base::ListValue params_value;
     params_value.Append(List(new base::StringValue("invalid")).release());
-    scoped_ptr<TakesEnumArrayAsType::Params> params(
+    std::unique_ptr<TakesEnumArrayAsType::Params> params(
         TakesEnumArrayAsType::Params::Create(params_value));
     EXPECT_FALSE(params);
   }
@@ -93,13 +93,14 @@
 TEST(JsonSchemaCompilerEnumsTest, ReturnsEnumCreate) {
   {
     Enumeration state = ENUMERATION_ONE;
-    scoped_ptr<base::Value> result(new base::StringValue(ToString(state)));
-    scoped_ptr<base::Value> expected(new base::StringValue("one"));
+    std::unique_ptr<base::Value> result(new base::StringValue(ToString(state)));
+    std::unique_ptr<base::Value> expected(new base::StringValue("one"));
     EXPECT_TRUE(result->Equals(expected.get()));
   }
   {
     Enumeration state = ENUMERATION_ONE;
-    scoped_ptr<base::ListValue> results = ReturnsEnum::Results::Create(state);
+    std::unique_ptr<base::ListValue> results =
+        ReturnsEnum::Results::Create(state);
     base::ListValue expected;
     expected.Append(new base::StringValue("one"));
     EXPECT_TRUE(results->Equals(&expected));
@@ -108,7 +109,7 @@
 
 TEST(JsonSchemaCompilerEnumsTest, ReturnsTwoEnumsCreate) {
   {
-    scoped_ptr<base::ListValue> results = ReturnsTwoEnums::Results::Create(
+    std::unique_ptr<base::ListValue> results = ReturnsTwoEnums::Results::Create(
         ENUMERATION_ONE, OTHER_ENUMERATION_HAM);
     base::ListValue expected;
     expected.Append(new base::StringValue("one"));
@@ -145,7 +146,7 @@
   {
     base::ListValue params_value;
     params_value.Append(new base::StringValue("two"));
-    scoped_ptr<TakesEnum::Params> params(
+    std::unique_ptr<TakesEnum::Params> params(
         TakesEnum::Params::Create(params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_TWO, params->state);
@@ -153,7 +154,7 @@
   {
     base::ListValue params_value;
     params_value.Append(new base::StringValue("invalid"));
-    scoped_ptr<TakesEnum::Params> params(
+    std::unique_ptr<TakesEnum::Params> params(
         TakesEnum::Params::Create(params_value));
     EXPECT_FALSE(params.get());
   }
@@ -164,7 +165,7 @@
     base::ListValue params_value;
     params_value.Append(List(new base::StringValue("one"),
                              new base::StringValue("two")).release());
-    scoped_ptr<TakesEnumArray::Params> params(
+    std::unique_ptr<TakesEnumArray::Params> params(
         TakesEnumArray::Params::Create(params_value));
     ASSERT_TRUE(params);
     EXPECT_EQ(2U, params->values.size());
@@ -174,7 +175,7 @@
   {
     base::ListValue params_value;
     params_value.Append(List(new base::StringValue("invalid")).release());
-    scoped_ptr<TakesEnumArray::Params> params(
+    std::unique_ptr<TakesEnumArray::Params> params(
         TakesEnumArray::Params::Create(params_value));
     EXPECT_FALSE(params);
   }
@@ -184,14 +185,14 @@
   {
     base::ListValue params_value;
     params_value.Append(new base::StringValue("three"));
-    scoped_ptr<TakesOptionalEnum::Params> params(
+    std::unique_ptr<TakesOptionalEnum::Params> params(
         TakesOptionalEnum::Params::Create(params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_THREE, params->state);
   }
   {
     base::ListValue params_value;
-    scoped_ptr<TakesOptionalEnum::Params> params(
+    std::unique_ptr<TakesOptionalEnum::Params> params(
         TakesOptionalEnum::Params::Create(params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_NONE, params->state);
@@ -199,7 +200,7 @@
   {
     base::ListValue params_value;
     params_value.Append(new base::StringValue("invalid"));
-    scoped_ptr<TakesOptionalEnum::Params> params(
+    std::unique_ptr<TakesOptionalEnum::Params> params(
         TakesOptionalEnum::Params::Create(params_value));
     EXPECT_FALSE(params.get());
   }
@@ -210,7 +211,7 @@
     base::ListValue params_value;
     params_value.Append(new base::StringValue("one"));
     params_value.Append(new base::StringValue("ham"));
-    scoped_ptr<TakesMultipleOptionalEnums::Params> params(
+    std::unique_ptr<TakesMultipleOptionalEnums::Params> params(
         TakesMultipleOptionalEnums::Params::Create(params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_ONE, params->state);
@@ -219,7 +220,7 @@
   {
     base::ListValue params_value;
     params_value.Append(new base::StringValue("one"));
-    scoped_ptr<TakesMultipleOptionalEnums::Params> params(
+    std::unique_ptr<TakesMultipleOptionalEnums::Params> params(
         TakesMultipleOptionalEnums::Params::Create(params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_ONE, params->state);
@@ -227,7 +228,7 @@
   }
   {
     base::ListValue params_value;
-    scoped_ptr<TakesMultipleOptionalEnums::Params> params(
+    std::unique_ptr<TakesMultipleOptionalEnums::Params> params(
         TakesMultipleOptionalEnums::Params::Create(params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ(ENUMERATION_NONE, params->state);
@@ -237,7 +238,7 @@
     base::ListValue params_value;
     params_value.Append(new base::StringValue("three"));
     params_value.Append(new base::StringValue("invalid"));
-    scoped_ptr<TakesMultipleOptionalEnums::Params> params(
+    std::unique_ptr<TakesMultipleOptionalEnums::Params> params(
         TakesMultipleOptionalEnums::Params::Create(params_value));
     EXPECT_FALSE(params.get());
   }
@@ -246,13 +247,14 @@
 TEST(JsonSchemaCompilerEnumsTest, OnEnumFiredCreate) {
   {
     Enumeration some_enum = ENUMERATION_ONE;
-    scoped_ptr<base::Value> result(new base::StringValue(ToString(some_enum)));
-    scoped_ptr<base::Value> expected(new base::StringValue("one"));
+    std::unique_ptr<base::Value> result(
+        new base::StringValue(ToString(some_enum)));
+    std::unique_ptr<base::Value> expected(new base::StringValue("one"));
     EXPECT_TRUE(result->Equals(expected.get()));
   }
   {
     Enumeration some_enum = ENUMERATION_ONE;
-    scoped_ptr<base::ListValue> results(OnEnumFired::Create(some_enum));
+    std::unique_ptr<base::ListValue> results(OnEnumFired::Create(some_enum));
     base::ListValue expected;
     expected.Append(new base::StringValue("one"));
     EXPECT_TRUE(results->Equals(&expected));
@@ -261,7 +263,7 @@
 
 TEST(JsonSchemaCompilerEnumsTest, OnTwoEnumsFiredCreate) {
   {
-    scoped_ptr<base::Value> results(
+    std::unique_ptr<base::Value> results(
         OnTwoEnumsFired::Create(ENUMERATION_ONE, OTHER_ENUMERATION_HAM));
     base::ListValue expected;
     expected.Append(new base::StringValue("one"));
diff --git a/tools/json_schema_compiler/test/error_generation_unittest.cc b/tools/json_schema_compiler/test/error_generation_unittest.cc
index 0258740..5f74801 100644
--- a/tools/json_schema_compiler/test/error_generation_unittest.cc
+++ b/tools/json_schema_compiler/test/error_generation_unittest.cc
@@ -33,12 +33,12 @@
 
 TEST(JsonSchemaCompilerErrorTest, RequiredPropertyPopulate) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "string", new base::StringValue("bling"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new base::StringValue("bling"));
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<TestType>(*value)));
   }
   {
-    scoped_ptr<base::BinaryValue> value(new base::BinaryValue());
+    std::unique_ptr<base::BinaryValue> value(new base::BinaryValue());
     EXPECT_TRUE(EqualsUtf16("expected dictionary, got binary",
         GetPopulateError<TestType>(*value)));
   }
@@ -46,12 +46,12 @@
 
 TEST(JsonSchemaCompilerErrorTest, UnexpectedTypePopulation) {
   {
-    scoped_ptr<base::ListValue> value(new base::ListValue());
+    std::unique_ptr<base::ListValue> value(new base::ListValue());
     EXPECT_TRUE(EqualsUtf16("",
         GetPopulateError<ChoiceType::Integers>(*value)));
   }
   {
-    scoped_ptr<base::BinaryValue> value(new base::BinaryValue());
+    std::unique_ptr<base::BinaryValue> value(new base::BinaryValue());
     EXPECT_TRUE(EqualsUtf16("expected integers or integer, got binary",
         GetPopulateError<ChoiceType::Integers>(*value)));
   }
@@ -61,12 +61,12 @@
 
 TEST(JsonSchemaCompilerErrorTest, TypeIsRequired) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "integers", new FundamentalValue(5));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("integers", new FundamentalValue(5));
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ChoiceType>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
     EXPECT_TRUE(EqualsUtf16("'integers' is required",
         GetPopulateError<ChoiceType>(*value)));
   }
@@ -76,15 +76,14 @@
 
 TEST(JsonSchemaCompilerErrorTest, TooManyParameters) {
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5));
     base::string16 error;
     EXPECT_TRUE(TestFunction::Params::Create(*params_value, &error));
   }
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5),
-        new FundamentalValue(5));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5), new FundamentalValue(5));
     base::string16 error;
     EXPECT_FALSE(TestFunction::Params::Create(*params_value, &error));
     EXPECT_TRUE(EqualsUtf16("expected 1 arguments, got 2", error));
@@ -95,13 +94,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, ParamIsRequired) {
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5));
     base::string16 error;
     EXPECT_TRUE(TestFunction::Params::Create(*params_value, &error));
   }
   {
-    scoped_ptr<base::ListValue> params_value =
+    std::unique_ptr<base::ListValue> params_value =
         List(base::Value::CreateNullValue().release());
     base::string16 error;
     EXPECT_FALSE(TestFunction::Params::Create(*params_value, &error));
@@ -113,13 +112,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, WrongPropertyValueType) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-      "string", new base::StringValue("yes"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new base::StringValue("yes"));
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<TestType>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "string", new FundamentalValue(1.1));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new FundamentalValue(1.1));
     EXPECT_TRUE(EqualsUtf16("'string': expected string, got number",
         GetPopulateError<TestType>(*value)));
   }
@@ -128,13 +127,13 @@
 TEST(JsonSchemaCompilerErrorTest, WrongParameterCreationType) {
   {
     base::string16 error;
-    scoped_ptr<base::ListValue> params_value = List(
-        new base::StringValue("Yeah!"));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new base::StringValue("Yeah!"));
     EXPECT_TRUE(TestString::Params::Create(*params_value, &error));
   }
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5));
     base::string16 error;
     EXPECT_FALSE(TestTypeInObject::Params::Create(*params_value, &error));
     EXPECT_TRUE(EqualsUtf16("'paramObject': expected dictionary, got integer",
@@ -144,12 +143,12 @@
 
 TEST(JsonSchemaCompilerErrorTest, WrongTypeValueType) {
   {
-    scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ObjectType>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "otherType", new FundamentalValue(1.1));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("otherType", new FundamentalValue(1.1));
     ObjectType out;
     base::string16 error;
     EXPECT_TRUE(ObjectType::Populate(*value, &out, &error));
@@ -161,15 +160,14 @@
 
 TEST(JsonSchemaCompilerErrorTest, UnableToPopulateArray) {
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5));
     EXPECT_TRUE(EqualsUtf16("",
         GetPopulateError<ChoiceType::Integers>(*params_value)));
   }
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5),
-        new FundamentalValue(false));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5), new FundamentalValue(false));
     EXPECT_TRUE(EqualsUtf16(
         "expected integer, got boolean; unable to populate array 'integers'",
         GetPopulateError<ChoiceType::Integers>(*params_value)));
@@ -178,13 +176,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, BinaryTypeExpected) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "data", new base::BinaryValue());
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("data", new base::BinaryValue());
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<BinaryData>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "data", new FundamentalValue(1.1));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("data", new FundamentalValue(1.1));
     EXPECT_TRUE(EqualsUtf16("'data': expected binary, got number",
         GetPopulateError<BinaryData>(*value)));
   }
@@ -192,13 +190,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, ListExpected) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "TheArray", new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("TheArray", new base::ListValue());
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ArrayObject>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "TheArray", new FundamentalValue(5));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("TheArray", new FundamentalValue(5));
     EXPECT_TRUE(EqualsUtf16("'TheArray': expected list, got integer",
         GetPopulateError<ArrayObject>(*value)));
   }
@@ -208,13 +206,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, BadEnumValue) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "enumeration", new base::StringValue("one"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("enumeration", new base::StringValue("one"));
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<HasEnumeration>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "enumeration", new base::StringValue("bad sauce"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("enumeration", new base::StringValue("bad sauce"));
     EXPECT_TRUE(EqualsUtf16("'Enumeration': expected \"one\" or \"two\" "
               "or \"three\", got \"bad sauce\"",
         GetPopulateError<HasEnumeration>(*value)));
@@ -225,13 +223,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, WarnOnOptionalFailure) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "string", new base::StringValue("bling"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new base::StringValue("bling"));
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<OptionalTestType>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "string", new base::FundamentalValue(1));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new base::FundamentalValue(1));
 
     OptionalTestType out;
     base::string16 error;
@@ -244,14 +242,14 @@
 
 TEST(JsonSchemaCompilerErrorTest, OptionalBinaryTypeFailure) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "data", new base::BinaryValue());
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("data", new base::BinaryValue());
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<OptionalBinaryData>(*value)));
   }
   {
     // There's a bug with silent failures if the key doesn't exist.
-    scoped_ptr<base::DictionaryValue> value = Dictionary("data",
-        new base::FundamentalValue(1));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("data", new base::FundamentalValue(1));
 
     OptionalBinaryData out;
     base::string16 error;
@@ -264,13 +262,13 @@
 
 TEST(JsonSchemaCompilerErrorTest, OptionalArrayTypeFailure) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "TheArray", new base::ListValue());
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("TheArray", new base::ListValue());
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ArrayObject>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "TheArray", new FundamentalValue(5));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("TheArray", new FundamentalValue(5));
     ArrayObject out;
     base::string16 error;
     EXPECT_TRUE(ArrayObject::Populate(*value, &out, &error));
@@ -282,15 +280,14 @@
 
 TEST(JsonSchemaCompilerErrorTest, OptionalUnableToPopulateArray) {
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5));
     EXPECT_TRUE(EqualsUtf16("",
         GetPopulateError<OptionalChoiceType::Integers>(*params_value)));
   }
   {
-    scoped_ptr<base::ListValue> params_value = List(
-        new FundamentalValue(5),
-        new FundamentalValue(false));
+    std::unique_ptr<base::ListValue> params_value =
+        List(new FundamentalValue(5), new FundamentalValue(false));
     OptionalChoiceType::Integers out;
     base::string16 error;
     EXPECT_TRUE(OptionalChoiceType::Integers::Populate(*params_value, &out,
@@ -304,9 +301,8 @@
 
 TEST(JsonSchemaCompilerErrorTest, MultiplePopulationErrors) {
   {
-
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "TheArray", new FundamentalValue(5));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("TheArray", new FundamentalValue(5));
     ArrayObject out;
     base::string16 error;
     EXPECT_TRUE(ArrayObject::Populate(*value, &out, &error));
@@ -324,14 +320,14 @@
 
 TEST(JsonSchemaCompilerErrorTest, TooManyKeys) {
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-      "string", new base::StringValue("yes"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new base::StringValue("yes"));
     EXPECT_TRUE(EqualsUtf16("", GetPopulateError<TestType>(*value)));
   }
   {
-    scoped_ptr<base::DictionaryValue> value = Dictionary(
-        "string", new base::StringValue("yes"),
-        "ohno", new base::StringValue("many values"));
+    std::unique_ptr<base::DictionaryValue> value =
+        Dictionary("string", new base::StringValue("yes"), "ohno",
+                   new base::StringValue("many values"));
     EXPECT_TRUE(EqualsUtf16("found unexpected key 'ohno'",
         GetPopulateError<TestType>(*value)));
   }
diff --git a/tools/json_schema_compiler/test/functions_on_types_unittest.cc b/tools/json_schema_compiler/test/functions_on_types_unittest.cc
index 86ce4920..273512e 100644
--- a/tools/json_schema_compiler/test/functions_on_types_unittest.cc
+++ b/tools/json_schema_compiler/test/functions_on_types_unittest.cc
@@ -10,36 +10,36 @@
 
 TEST(JsonSchemaCompilerFunctionsOnTypesTest, StorageAreaGetParamsCreate) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<StorageArea::Get::Params> params(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<StorageArea::Get::Params> params(
         StorageArea::Get::Params::Create(*params_value));
     ASSERT_TRUE(params);
     EXPECT_FALSE(params->keys);
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(new base::FundamentalValue(9));
-    scoped_ptr<StorageArea::Get::Params> params(
+    std::unique_ptr<StorageArea::Get::Params> params(
         StorageArea::Get::Params::Create(*params_value));
     EXPECT_FALSE(params);
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(new base::StringValue("test"));
-    scoped_ptr<StorageArea::Get::Params> params(
+    std::unique_ptr<StorageArea::Get::Params> params(
         StorageArea::Get::Params::Create(*params_value));
     ASSERT_TRUE(params);
     ASSERT_TRUE(params->keys);
     EXPECT_EQ("test", *params->keys->as_string);
   }
   {
-    scoped_ptr<base::DictionaryValue> keys_object_value(
+    std::unique_ptr<base::DictionaryValue> keys_object_value(
         new base::DictionaryValue());
     keys_object_value->SetInteger("integer", 5);
     keys_object_value->SetString("string", "string");
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(keys_object_value->DeepCopy());
-    scoped_ptr<StorageArea::Get::Params> params(
+    std::unique_ptr<StorageArea::Get::Params> params(
         StorageArea::Get::Params::Create(*params_value));
     ASSERT_TRUE(params);
     ASSERT_TRUE(params->keys);
@@ -52,7 +52,7 @@
   StorageArea::Get::Results::Items items;
   items.additional_properties.SetDouble("asdf", 0.1);
   items.additional_properties.SetString("sdfg", "zxcv");
-  scoped_ptr<base::ListValue> results =
+  std::unique_ptr<base::ListValue> results =
       StorageArea::Get::Results::Create(items);
   base::DictionaryValue* item_result = NULL;
   ASSERT_TRUE(results->GetDictionary(0, &item_result));
@@ -60,11 +60,12 @@
 }
 
 TEST(JsonSchemaCompilerFunctionsOnTypesTest, ChromeSettingGetParamsCreate) {
-  scoped_ptr<base::DictionaryValue> details_value(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> details_value(
+      new base::DictionaryValue());
   details_value->SetBoolean("incognito", true);
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
   params_value->Append(details_value.release());
-  scoped_ptr<ChromeSetting::Get::Params> params(
+  std::unique_ptr<ChromeSetting::Get::Params> params(
       ChromeSetting::Get::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   EXPECT_TRUE(*params->details.incognito);
diff --git a/tools/json_schema_compiler/test/idl_schemas_unittest.cc b/tools/json_schema_compiler/test/idl_schemas_unittest.cc
index 4c5ff1a..2599d9e 100644
--- a/tools/json_schema_compiler/test/idl_schemas_unittest.cc
+++ b/tools/json_schema_compiler/test/idl_schemas_unittest.cc
@@ -29,7 +29,7 @@
   MyType1 a;
   a.x = 5;
   a.y = std::string("foo");
-  scoped_ptr<base::DictionaryValue> serialized = a.ToValue();
+  std::unique_ptr<base::DictionaryValue> serialized = a.ToValue();
   MyType1 b;
   EXPECT_TRUE(MyType1::Populate(*serialized.get(), &b));
   EXPECT_EQ(a.x, b.x);
@@ -38,7 +38,8 @@
   // Test Function2, which takes an integer parameter.
   base::ListValue list;
   list.Append(new base::FundamentalValue(5));
-  scoped_ptr<Function2::Params> f2_params = Function2::Params::Create(list);
+  std::unique_ptr<Function2::Params> f2_params =
+      Function2::Params::Create(list);
   EXPECT_EQ(5, f2_params->x);
 
   // Test Function3, which takes a MyType1 parameter.
@@ -51,22 +52,23 @@
   tmp->SetString("b", "bstring");
   tmp->SetString("c", "cstring");
   list.Append(tmp);
-  scoped_ptr<Function3::Params> f3_params = Function3::Params::Create(list);
+  std::unique_ptr<Function3::Params> f3_params =
+      Function3::Params::Create(list);
   EXPECT_EQ(17, f3_params->arg.x);
   EXPECT_EQ("hello", f3_params->arg.y);
 
   // Test functions that take a callback function as a parameter, with varying
   // callback signatures.
-  scoped_ptr<base::ListValue> f4_results = Function4::Results::Create();
+  std::unique_ptr<base::ListValue> f4_results = Function4::Results::Create();
   base::ListValue expected;
   EXPECT_TRUE(f4_results->Equals(&expected));
 
-  scoped_ptr<base::ListValue> f5_results(Function5::Results::Create(13));
+  std::unique_ptr<base::ListValue> f5_results(Function5::Results::Create(13));
   base::Value* f5_result_int = NULL;
   ASSERT_TRUE(f5_results->Get(0, &f5_result_int));
   EXPECT_TRUE(f5_result_int->IsType(base::Value::TYPE_INTEGER));
 
-  scoped_ptr<base::ListValue> f6_results(Function6::Results::Create(a));
+  std::unique_ptr<base::ListValue> f6_results(Function6::Results::Create(a));
   base::Value* f6_result_dict = NULL;
   ASSERT_TRUE(f6_results->Get(0, &f6_result_dict));
   MyType1 c;
@@ -79,7 +81,8 @@
   // Test a function that takes one optional argument, both without and with
   // that argument.
   base::ListValue list;
-  scoped_ptr<Function7::Params> f7_params = Function7::Params::Create(list);
+  std::unique_ptr<Function7::Params> f7_params =
+      Function7::Params::Create(list);
   EXPECT_EQ(NULL, f7_params->arg.get());
   list.Append(new base::FundamentalValue(7));
   f7_params = Function7::Params::Create(list);
@@ -89,7 +92,8 @@
   // argument.
   list.Clear();
   list.Append(new base::FundamentalValue(8));
-  scoped_ptr<Function8::Params> f8_params = Function8::Params::Create(list);
+  std::unique_ptr<Function8::Params> f8_params =
+      Function8::Params::Create(list);
   EXPECT_EQ(8, f8_params->arg1);
   EXPECT_EQ(NULL, f8_params->arg2.get());
   list.Append(new base::StringValue("foo"));
@@ -99,7 +103,8 @@
 
   // Test a function with an optional argument of custom type.
   list.Clear();
-  scoped_ptr<Function9::Params> f9_params = Function9::Params::Create(list);
+  std::unique_ptr<Function9::Params> f9_params =
+      Function9::Params::Create(list);
   EXPECT_EQ(NULL, f9_params->arg.get());
   list.Clear();
   base::DictionaryValue* tmp = new base::DictionaryValue();
@@ -123,7 +128,8 @@
   base::ListValue list;
   list.Append(new base::FundamentalValue(33));
   list.Append(new base::ListValue);
-  scoped_ptr<Function10::Params> f10_params = Function10::Params::Create(list);
+  std::unique_ptr<Function10::Params> f10_params =
+      Function10::Params::Create(list);
   ASSERT_TRUE(f10_params != NULL);
   EXPECT_EQ(33, f10_params->x);
   EXPECT_TRUE(f10_params->y.empty());
@@ -154,7 +160,8 @@
   sublist2->Append(a.ToValue().release());
   sublist2->Append(b.ToValue().release());
   list.Append(sublist2);
-  scoped_ptr<Function11::Params> f11_params = Function11::Params::Create(list);
+  std::unique_ptr<Function11::Params> f11_params =
+      Function11::Params::Create(list);
   ASSERT_TRUE(f11_params != NULL);
   ASSERT_EQ(2u, f11_params->arg.size());
   EXPECT_EQ(5, f11_params->arg[0].x);
@@ -167,7 +174,7 @@
   // Test the FooType type.
   FooType f1;
   f1.x = 3;
-  scoped_ptr<base::DictionaryValue> serialized_foo = f1.ToValue();
+  std::unique_ptr<base::DictionaryValue> serialized_foo = f1.ToValue();
   FooType f2;
   EXPECT_TRUE(FooType::Populate(*serialized_foo.get(), &f2));
   EXPECT_EQ(f1.x, f2.x);
@@ -175,7 +182,7 @@
   // Test the BarType type.
   BarType b1;
   b1.x.reset(new base::FundamentalValue(7));
-  scoped_ptr<base::DictionaryValue> serialized_bar = b1.ToValue();
+  std::unique_ptr<base::DictionaryValue> serialized_bar = b1.ToValue();
   BarType b2;
   EXPECT_TRUE(BarType::Populate(*serialized_bar.get(), &b2));
   int tmp_int = 0;
@@ -183,15 +190,16 @@
   EXPECT_EQ(7, tmp_int);
 
   // Test the params to the ObjectFunction1 function.
-  scoped_ptr<base::DictionaryValue> icon_props(new base::DictionaryValue());
+  std::unique_ptr<base::DictionaryValue> icon_props(
+      new base::DictionaryValue());
   icon_props->SetString("hello", "world");
   ObjectFunction1::Params::Icon icon;
   EXPECT_TRUE(ObjectFunction1::Params::Icon::Populate(*(icon_props.get()),
                                                       &icon));
   base::ListValue list;
   list.Append(icon_props.release());
-  scoped_ptr<ObjectFunction1::Params> params =
-    ObjectFunction1::Params::Create(list);
+  std::unique_ptr<ObjectFunction1::Params> params =
+      ObjectFunction1::Params::Create(list);
   ASSERT_TRUE(params.get() != NULL);
   std::string tmp;
   EXPECT_TRUE(params->icon.additional_properties.GetString("hello", &tmp));
diff --git a/tools/json_schema_compiler/test/objects_unittest.cc b/tools/json_schema_compiler/test/objects_unittest.cc
index 5c00926b..fffaff1 100644
--- a/tools/json_schema_compiler/test/objects_unittest.cc
+++ b/tools/json_schema_compiler/test/objects_unittest.cc
@@ -16,17 +16,18 @@
 
 TEST(JsonSchemaCompilerObjectsTest, ObjectParamParamsCreate) {
   {
-    scoped_ptr<base::ListValue> strings(new base::ListValue());
+    std::unique_ptr<base::ListValue> strings(new base::ListValue());
     strings->Append(new base::StringValue("one"));
     strings->Append(new base::StringValue("two"));
-    scoped_ptr<base::DictionaryValue> info_value(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> info_value(
+        new base::DictionaryValue());
     info_value->Set("strings", strings.release());
     info_value->Set("integer", new base::FundamentalValue(5));
     info_value->Set("boolean", new base::FundamentalValue(true));
 
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(info_value.release());
-    scoped_ptr<ObjectParam::Params> params(
+    std::unique_ptr<ObjectParam::Params> params(
         ObjectParam::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_EQ((size_t) 2, params->info.strings.size());
@@ -36,16 +37,17 @@
     EXPECT_TRUE(params->info.boolean);
   }
   {
-    scoped_ptr<base::ListValue> strings(new base::ListValue());
+    std::unique_ptr<base::ListValue> strings(new base::ListValue());
     strings->Append(new base::StringValue("one"));
     strings->Append(new base::StringValue("two"));
-    scoped_ptr<base::DictionaryValue> info_value(new base::DictionaryValue());
+    std::unique_ptr<base::DictionaryValue> info_value(
+        new base::DictionaryValue());
     info_value->Set("strings", strings.release());
     info_value->Set("integer", new base::FundamentalValue(5));
 
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(info_value.release());
-    scoped_ptr<ObjectParam::Params> params(
+    std::unique_ptr<ObjectParam::Params> params(
         ObjectParam::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
@@ -54,7 +56,8 @@
 TEST(JsonSchemaCompilerObjectsTest, ReturnsObjectResultCreate) {
   ReturnsObject::Results::Info info;
   info.state = FIRST_STATE_FOO;
-  scoped_ptr<base::ListValue> results = ReturnsObject::Results::Create(info);
+  std::unique_ptr<base::ListValue> results =
+      ReturnsObject::Results::Create(info);
 
   base::DictionaryValue expected;
   expected.SetString("state", "foo");
@@ -66,7 +69,7 @@
 TEST(JsonSchemaCompilerObjectsTest, OnObjectFiredCreate) {
   OnObjectFired::SomeObject object;
   object.state = FIRST_STATE_BAR;
-  scoped_ptr<base::ListValue> results(OnObjectFired::Create(object));
+  std::unique_ptr<base::ListValue> results(OnObjectFired::Create(object));
 
   base::DictionaryValue expected;
   expected.SetString("state", "bar");
diff --git a/tools/json_schema_compiler/test/simple_api_unittest.cc b/tools/json_schema_compiler/test/simple_api_unittest.cc
index 8d38331..3c2baa39 100644
--- a/tools/json_schema_compiler/test/simple_api_unittest.cc
+++ b/tools/json_schema_compiler/test/simple_api_unittest.cc
@@ -10,8 +10,8 @@
 
 namespace {
 
-static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() {
-  scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
+static std::unique_ptr<base::DictionaryValue> CreateTestTypeDictionary() {
+  std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
   value->SetWithoutPathExpansion("number", new base::FundamentalValue(1.1));
   value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4));
   value->SetWithoutPathExpansion("string", new base::StringValue("bling"));
@@ -22,16 +22,17 @@
 }  // namespace
 
 TEST(JsonSchemaCompilerSimpleTest, IncrementIntegerResultCreate) {
-  scoped_ptr<base::ListValue> results = IncrementInteger::Results::Create(5);
+  std::unique_ptr<base::ListValue> results =
+      IncrementInteger::Results::Create(5);
   base::ListValue expected;
   expected.Append(new base::FundamentalValue(5));
   EXPECT_TRUE(results->Equals(&expected));
 }
 
 TEST(JsonSchemaCompilerSimpleTest, IncrementIntegerParamsCreate) {
-  scoped_ptr<base::ListValue> params_value(new base::ListValue());
+  std::unique_ptr<base::ListValue> params_value(new base::ListValue());
   params_value->Append(new base::FundamentalValue(6));
-  scoped_ptr<IncrementInteger::Params> params(
+  std::unique_ptr<IncrementInteger::Params> params(
       IncrementInteger::Params::Create(*params_value));
   EXPECT_TRUE(params.get());
   EXPECT_EQ(6, params->num);
@@ -39,16 +40,16 @@
 
 TEST(JsonSchemaCompilerSimpleTest, NumberOfParams) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(new base::StringValue("text"));
     params_value->Append(new base::StringValue("text"));
-    scoped_ptr<OptionalString::Params> params(
+    std::unique_ptr<OptionalString::Params> params(
         OptionalString::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<IncrementInteger::Params> params(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<IncrementInteger::Params> params(
         IncrementInteger::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
@@ -56,16 +57,16 @@
 
 TEST(JsonSchemaCompilerSimpleTest, OptionalStringParamsCreate) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
-    scoped_ptr<OptionalString::Params> params(
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<OptionalString::Params> params(
         OptionalString::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_FALSE(params->str.get());
   }
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(new base::StringValue("asdf"));
-    scoped_ptr<OptionalString::Params> params(
+    std::unique_ptr<OptionalString::Params> params(
         OptionalString::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_TRUE(params->str.get());
@@ -75,9 +76,9 @@
 
 TEST(JsonSchemaCompilerSimpleTest, OptionalParamsTakingNull) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(base::Value::CreateNullValue());
-    scoped_ptr<OptionalString::Params> params(
+    std::unique_ptr<OptionalString::Params> params(
         OptionalString::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_FALSE(params->str.get());
@@ -86,9 +87,9 @@
 
 TEST(JsonSchemaCompilerSimpleTest, OptionalStringParamsWrongType) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(new base::FundamentalValue(5));
-    scoped_ptr<OptionalString::Params> params(
+    std::unique_ptr<OptionalString::Params> params(
         OptionalString::Params::Create(*params_value));
     EXPECT_FALSE(params.get());
   }
@@ -96,10 +97,10 @@
 
 TEST(JsonSchemaCompilerSimpleTest, OptionalBeforeRequired) {
   {
-    scoped_ptr<base::ListValue> params_value(new base::ListValue());
+    std::unique_ptr<base::ListValue> params_value(new base::ListValue());
     params_value->Append(base::Value::CreateNullValue());
     params_value->Append(new base::StringValue("asdf"));
-    scoped_ptr<OptionalBeforeRequired::Params> params(
+    std::unique_ptr<OptionalBeforeRequired::Params> params(
         OptionalBeforeRequired::Params::Create(*params_value));
     EXPECT_TRUE(params.get());
     EXPECT_FALSE(params->first.get());
@@ -108,15 +109,15 @@
 }
 
 TEST(JsonSchemaCompilerSimpleTest, NoParamsResultCreate) {
-  scoped_ptr<base::ListValue> results = OptionalString::Results::Create();
+  std::unique_ptr<base::ListValue> results = OptionalString::Results::Create();
   base::ListValue expected;
   EXPECT_TRUE(results->Equals(&expected));
 }
 
 TEST(JsonSchemaCompilerSimpleTest, TestTypePopulate) {
   {
-    scoped_ptr<TestType> test_type(new TestType());
-    scoped_ptr<base::DictionaryValue> value = CreateTestTypeDictionary();
+    std::unique_ptr<TestType> test_type(new TestType());
+    std::unique_ptr<base::DictionaryValue> value = CreateTestTypeDictionary();
     EXPECT_TRUE(TestType::Populate(*value, test_type.get()));
     EXPECT_EQ("bling", test_type->string);
     EXPECT_EQ(1.1, test_type->number);
@@ -125,8 +126,8 @@
     EXPECT_TRUE(value->Equals(test_type->ToValue().get()));
   }
   {
-    scoped_ptr<TestType> test_type(new TestType());
-    scoped_ptr<base::DictionaryValue> value = CreateTestTypeDictionary();
+    std::unique_ptr<TestType> test_type(new TestType());
+    std::unique_ptr<base::DictionaryValue> value = CreateTestTypeDictionary();
     value->Remove("number", NULL);
     EXPECT_FALSE(TestType::Populate(*value, test_type.get()));
   }
@@ -134,10 +135,10 @@
 
 TEST(JsonSchemaCompilerSimpleTest, GetTestType) {
   {
-    scoped_ptr<base::DictionaryValue> value = CreateTestTypeDictionary();
-    scoped_ptr<TestType> test_type(new TestType());
+    std::unique_ptr<base::DictionaryValue> value = CreateTestTypeDictionary();
+    std::unique_ptr<TestType> test_type(new TestType());
     EXPECT_TRUE(TestType::Populate(*value, test_type.get()));
-    scoped_ptr<base::ListValue> results =
+    std::unique_ptr<base::ListValue> results =
         GetTestType::Results::Create(*test_type);
 
     base::DictionaryValue* result = NULL;
@@ -148,7 +149,7 @@
 
 TEST(JsonSchemaCompilerSimpleTest, OnIntegerFiredCreate) {
   {
-    scoped_ptr<base::ListValue> results(OnIntegerFired::Create(5));
+    std::unique_ptr<base::ListValue> results(OnIntegerFired::Create(5));
     base::ListValue expected;
     expected.Append(new base::FundamentalValue(5));
     EXPECT_TRUE(results->Equals(&expected));
@@ -157,7 +158,7 @@
 
 TEST(JsonSchemaCompilerSimpleTest, OnStringFiredCreate) {
   {
-    scoped_ptr<base::ListValue> results(OnStringFired::Create("yo dawg"));
+    std::unique_ptr<base::ListValue> results(OnStringFired::Create("yo dawg"));
     base::ListValue expected;
     expected.Append(new base::StringValue("yo dawg"));
     EXPECT_TRUE(results->Equals(&expected));
@@ -167,13 +168,14 @@
 TEST(JsonSchemaCompilerSimpleTest, OnTestTypeFiredCreate) {
   {
     TestType some_test_type;
-    scoped_ptr<base::DictionaryValue> expected = CreateTestTypeDictionary();
+    std::unique_ptr<base::DictionaryValue> expected =
+        CreateTestTypeDictionary();
     ASSERT_TRUE(expected->GetDouble("number", &some_test_type.number));
     ASSERT_TRUE(expected->GetString("string", &some_test_type.string));
     ASSERT_TRUE(expected->GetInteger("integer", &some_test_type.integer));
     ASSERT_TRUE(expected->GetBoolean("boolean", &some_test_type.boolean));
 
-    scoped_ptr<base::ListValue> results(
+    std::unique_ptr<base::ListValue> results(
         OnTestTypeFired::Create(some_test_type));
     base::DictionaryValue* result = NULL;
     results->GetDictionary(0, &result);
diff --git a/tools/json_schema_compiler/test/test_util.cc b/tools/json_schema_compiler/test/test_util.cc
index 3dc04c9..c1ac198 100644
--- a/tools/json_schema_compiler/test/test_util.cc
+++ b/tools/json_schema_compiler/test/test_util.cc
@@ -12,55 +12,55 @@
 namespace json_schema_compiler {
 namespace test_util {
 
-scoped_ptr<base::Value> ReadJson(const base::StringPiece& json) {
+std::unique_ptr<base::Value> ReadJson(const base::StringPiece& json) {
   int error_code;
   std::string error_msg;
-  scoped_ptr<base::Value> result(base::JSONReader::ReadAndReturnError(
-      json,
-      base::JSON_ALLOW_TRAILING_COMMAS,
-      &error_code,
-      &error_msg));
+  std::unique_ptr<base::Value> result(base::JSONReader::ReadAndReturnError(
+      json, base::JSON_ALLOW_TRAILING_COMMAS, &error_code, &error_msg));
   // CHECK not ASSERT since passing invalid |json| is a test error.
   CHECK(result) << error_msg;
   return result;
 }
 
-scoped_ptr<base::ListValue> List(base::Value* a) {
-  scoped_ptr<base::ListValue> list(new base::ListValue());
+std::unique_ptr<base::ListValue> List(base::Value* a) {
+  std::unique_ptr<base::ListValue> list(new base::ListValue());
   list->Append(a);
   return list;
 }
-scoped_ptr<base::ListValue> List(base::Value* a, base::Value* b) {
-  scoped_ptr<base::ListValue> list = List(a);
+std::unique_ptr<base::ListValue> List(base::Value* a, base::Value* b) {
+  std::unique_ptr<base::ListValue> list = List(a);
   list->Append(b);
   return list;
 }
-scoped_ptr<base::ListValue> List(base::Value* a,
-                                 base::Value* b,
-                                 base::Value* c) {
-  scoped_ptr<base::ListValue> list = List(a, b);
+std::unique_ptr<base::ListValue> List(base::Value* a,
+                                      base::Value* b,
+                                      base::Value* c) {
+  std::unique_ptr<base::ListValue> list = List(a, b);
   list->Append(c);
   return list;
 }
 
-scoped_ptr<base::DictionaryValue> Dictionary(
-    const std::string& ak, base::Value* av) {
-  scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+                                                  base::Value* av) {
+  std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetWithoutPathExpansion(ak, av);
   return dict;
 }
-scoped_ptr<base::DictionaryValue> Dictionary(
-    const std::string& ak, base::Value* av,
-    const std::string& bk, base::Value* bv) {
-  scoped_ptr<base::DictionaryValue> dict = Dictionary(ak, av);
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+                                                  base::Value* av,
+                                                  const std::string& bk,
+                                                  base::Value* bv) {
+  std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, av);
   dict->SetWithoutPathExpansion(bk, bv);
   return dict;
 }
-scoped_ptr<base::DictionaryValue> Dictionary(
-    const std::string& ak, base::Value* av,
-    const std::string& bk, base::Value* bv,
-    const std::string& ck, base::Value* cv) {
-  scoped_ptr<base::DictionaryValue> dict = Dictionary(ak, av, bk, bv);
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+                                                  base::Value* av,
+                                                  const std::string& bk,
+                                                  base::Value* bv,
+                                                  const std::string& ck,
+                                                  base::Value* cv) {
+  std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, av, bk, bv);
   dict->SetWithoutPathExpansion(ck, cv);
   return dict;
 }
diff --git a/tools/json_schema_compiler/test/test_util.h b/tools/json_schema_compiler/test/test_util.h
index 7590004..d82e905 100644
--- a/tools/json_schema_compiler/test/test_util.h
+++ b/tools/json_schema_compiler/test/test_util.h
@@ -5,14 +5,15 @@
 #ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
 #define TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "base/strings/string_piece.h"
 #include "base/values.h"
 
 namespace json_schema_compiler {
 namespace test_util {
 
-scoped_ptr<base::Value> ReadJson(const base::StringPiece& json);
+std::unique_ptr<base::Value> ReadJson(const base::StringPiece& json);
 
 template <typename T>
 std::vector<T> Vector(const T& a) {
@@ -33,21 +34,24 @@
   return arr;
 }
 
-scoped_ptr<base::ListValue> List(base::Value* a);
-scoped_ptr<base::ListValue> List(base::Value* a, base::Value* b);
-scoped_ptr<base::ListValue> List(base::Value* a,
-                                 base::Value* b,
-                                 base::Value* c);
+std::unique_ptr<base::ListValue> List(base::Value* a);
+std::unique_ptr<base::ListValue> List(base::Value* a, base::Value* b);
+std::unique_ptr<base::ListValue> List(base::Value* a,
+                                      base::Value* b,
+                                      base::Value* c);
 
-scoped_ptr<base::DictionaryValue> Dictionary(
-    const std::string& ak, base::Value* av);
-scoped_ptr<base::DictionaryValue> Dictionary(
-    const std::string& ak, base::Value* av,
-    const std::string& bk, base::Value* bv);
-scoped_ptr<base::DictionaryValue> Dictionary(
-    const std::string& ak, base::Value* av,
-    const std::string& bk, base::Value* bv,
-    const std::string& ck, base::Value* cv);
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+                                                  base::Value* av);
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+                                                  base::Value* av,
+                                                  const std::string& bk,
+                                                  base::Value* bv);
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+                                                  base::Value* av,
+                                                  const std::string& bk,
+                                                  base::Value* bv,
+                                                  const std::string& ck,
+                                                  base::Value* cv);
 
 }  // namespace test_util
 }  // namespace json_schema_compiler
diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc
index c7fc433..dcb44ec 100644
--- a/tools/json_schema_compiler/util.cc
+++ b/tools/json_schema_compiler/util.cc
@@ -100,29 +100,29 @@
   return true;
 }
 
-bool PopulateItem(const base::Value& from, scoped_ptr<base::Value>* out) {
-  *out = make_scoped_ptr(from.DeepCopy());
+bool PopulateItem(const base::Value& from, std::unique_ptr<base::Value>* out) {
+  *out = from.CreateDeepCopy();
   return true;
 }
 
 bool PopulateItem(const base::Value& from,
-                  scoped_ptr<base::Value>* out,
+                  std::unique_ptr<base::Value>* out,
                   base::string16* error) {
-  *out = make_scoped_ptr(from.DeepCopy());
+  *out = from.CreateDeepCopy();
   return true;
 }
 
 bool PopulateItem(const base::Value& from,
-                  scoped_ptr<base::DictionaryValue>* out) {
+                  std::unique_ptr<base::DictionaryValue>* out) {
   const base::DictionaryValue* dict = nullptr;
   if (!from.GetAsDictionary(&dict))
     return false;
-  *out = make_scoped_ptr(dict->DeepCopy());
+  *out = dict->CreateDeepCopy();
   return true;
 }
 
 bool PopulateItem(const base::Value& from,
-                  scoped_ptr<base::DictionaryValue>* out,
+                  std::unique_ptr<base::DictionaryValue>* out,
                   base::string16* error) {
   const base::DictionaryValue* dict = nullptr;
   if (!from.GetAsDictionary(&dict)) {
@@ -133,7 +133,7 @@
                                     ValueTypeToString(from.GetType())));
     return false;
   }
-  *out = make_scoped_ptr(dict->DeepCopy());
+  *out = dict->CreateDeepCopy();
   return true;
 }
 
@@ -158,11 +158,12 @@
       base::BinaryValue::CreateWithCopiedBuffer(from.data(), from.size()));
 }
 
-void AddItemToList(const scoped_ptr<base::Value>& from, base::ListValue* out) {
+void AddItemToList(const std::unique_ptr<base::Value>& from,
+                   base::ListValue* out) {
   out->Append(from->DeepCopy());
 }
 
-void AddItemToList(const scoped_ptr<base::DictionaryValue>& from,
+void AddItemToList(const std::unique_ptr<base::DictionaryValue>& from,
                    base::ListValue* out) {
   out->Append(static_cast<base::Value*>(from->DeepCopy()));
 }
diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h
index 3365a4f..220ba80c 100644
--- a/tools/json_schema_compiler/util.h
+++ b/tools/json_schema_compiler/util.h
@@ -2,13 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__
-#define TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__
+#ifndef TOOLS_JSON_SCHEMA_COMPILER_UTIL_H_
+#define TOOLS_JSON_SCHEMA_COMPILER_UTIL_H_
 
+#include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
-#include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 
 namespace json_schema_compiler {
@@ -17,7 +18,7 @@
 
 // Populates the item |out| from the value |from|. These are used by template
 // specializations of |Get(Optional)ArrayFromList|.
-bool PopulateItem(const base::Value& from, scoped_ptr<base::Value>* out);
+bool PopulateItem(const base::Value& from, std::unique_ptr<base::Value>* out);
 
 bool PopulateItem(const base::Value& from, int* out);
 bool PopulateItem(const base::Value& from, int* out, base::string16* error);
@@ -34,20 +35,20 @@
                   std::vector<char>* out,
                   base::string16* error);
 bool PopulateItem(const base::Value& from,
-                  scoped_ptr<base::Value>* out,
+                  std::unique_ptr<base::Value>* out,
                   base::string16* error);
-bool PopulateItem(const base::Value& from, scoped_ptr<base::Value>* out);
+bool PopulateItem(const base::Value& from, std::unique_ptr<base::Value>* out);
 
 // This template is used for types generated by tools/json_schema_compiler.
 template <class T>
-bool PopulateItem(const base::Value& from, scoped_ptr<T>* out) {
+bool PopulateItem(const base::Value& from, std::unique_ptr<T>* out) {
   const base::DictionaryValue* dict = nullptr;
   if (!from.GetAsDictionary(&dict))
     return false;
-  scoped_ptr<T> obj(new T());
+  std::unique_ptr<T> obj(new T());
   if (!T::Populate(*dict, obj.get()))
     return false;
-  *out = scoped_ptr<T>(obj.release());
+  *out = std::move(obj);
   return true;
 }
 
@@ -68,15 +69,15 @@
 // error generation enabled.
 template <class T>
 bool PopulateItem(const base::Value& from,
-                  scoped_ptr<T>* out,
+                  std::unique_ptr<T>* out,
                   base::string16* error) {
   const base::DictionaryValue* dict = nullptr;
   if (!from.GetAsDictionary(&dict))
     return false;
-  scoped_ptr<T> obj(new T());
+  std::unique_ptr<T> obj(new T());
   if (!T::Populate(*dict, obj.get(), error))
     return false;
-  *out = scoped_ptr<T>(obj.release());
+  *out = std::move(obj);
   return true;
 }
 
@@ -133,7 +134,7 @@
 // if anything other than a list of |T| is at the specified key.
 template <class T>
 bool PopulateOptionalArrayFromList(const base::ListValue& list,
-                                   scoped_ptr<std::vector<T>>* out) {
+                                   std::unique_ptr<std::vector<T>>* out) {
   out->reset(new std::vector<T>());
   if (!PopulateArrayFromList(list, out->get())) {
     out->reset();
@@ -144,7 +145,7 @@
 
 template <class T>
 bool PopulateOptionalArrayFromList(const base::ListValue& list,
-                                   scoped_ptr<std::vector<T>>* out,
+                                   std::unique_ptr<std::vector<T>>* out,
                                    base::string16* error) {
   out->reset(new std::vector<T>());
   if (!PopulateArrayFromList(list, out->get(), error)) {
@@ -161,13 +162,14 @@
 void AddItemToList(const double from, base::ListValue* out);
 void AddItemToList(const std::string& from, base::ListValue* out);
 void AddItemToList(const std::vector<char>& from, base::ListValue* out);
-void AddItemToList(const scoped_ptr<base::Value>& from, base::ListValue* out);
-void AddItemToList(const scoped_ptr<base::DictionaryValue>& from,
+void AddItemToList(const std::unique_ptr<base::Value>& from,
+                   base::ListValue* out);
+void AddItemToList(const std::unique_ptr<base::DictionaryValue>& from,
                    base::ListValue* out);
 
 // This template is used for types generated by tools/json_schema_compiler.
 template <class T>
-void AddItemToList(const scoped_ptr<T>& from, base::ListValue* out) {
+void AddItemToList(const std::unique_ptr<T>& from, base::ListValue* out) {
   out->Append(from->ToValue());
 }
 
@@ -189,25 +191,25 @@
 // Set |out| to the the contents of |from| if |from| is not null. Requires
 // PopulateItem to be implemented for |T|.
 template <class T>
-void PopulateListFromOptionalArray(const scoped_ptr<std::vector<T>>& from,
+void PopulateListFromOptionalArray(const std::unique_ptr<std::vector<T>>& from,
                                    base::ListValue* out) {
-  if (from.get())
+  if (from)
     PopulateListFromArray(*from, out);
 }
 
 template <class T>
-scoped_ptr<base::Value> CreateValueFromArray(const std::vector<T>& from) {
-  base::ListValue* list = new base::ListValue();
-  PopulateListFromArray(from, list);
-  return scoped_ptr<base::Value>(list);
+std::unique_ptr<base::Value> CreateValueFromArray(const std::vector<T>& from) {
+  std::unique_ptr<base::ListValue> list(new base::ListValue());
+  PopulateListFromArray(from, list.get());
+  return std::move(list);
 }
 
 template <class T>
-scoped_ptr<base::Value> CreateValueFromOptionalArray(
-    const scoped_ptr<std::vector<T>>& from) {
-  if (from.get())
+std::unique_ptr<base::Value> CreateValueFromOptionalArray(
+    const std::unique_ptr<std::vector<T>>& from) {
+  if (from)
     return CreateValueFromArray(*from);
-  return scoped_ptr<base::Value>();
+  return nullptr;
 }
 
 std::string ValueTypeToString(base::Value::Type type);
@@ -215,4 +217,4 @@
 }  // namespace util
 }  // namespace json_schema_compiler
 
-#endif  // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__
+#endif  // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H_
diff --git a/tools/json_schema_compiler/util_cc_helper.py b/tools/json_schema_compiler/util_cc_helper.py
index d69122d..e81c4e35 100644
--- a/tools/json_schema_compiler/util_cc_helper.py
+++ b/tools/json_schema_compiler/util_cc_helper.py
@@ -22,7 +22,7 @@
   def CreateValueFromArray(self, src, optional):
     """Generates code to create a scoped_pt<Value> from the array at src.
 
-    |src| The variable to convert, either a vector or scoped_ptr<vector>.
+    |src| The variable to convert, either a vector or std::unique_ptr<vector>.
     |optional| Whether |type_| was optional. Optional types are pointers so
         must be treated differently.
     """
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index abee02d..e2cfe335 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -498,9 +498,9 @@
       'Android Builder': 'gyp_release_bot_android',
       'WebKit Android (Nexus4)': 'gyp_release_bot_android',
       'WebKit Linux (dbg)': 'swarming_gn_debug_bot_x64',
-      'WebKit Linux ASAN': 'swarming_gyp_asan_lsan_release_bot_x64',
+      'WebKit Linux ASAN': 'swarming_gn_asan_lsan_release_bot_x64',
       'WebKit Linux Leak': 'swarming_gn_release_bot_x64',
-      'WebKit Linux MSAN': 'swarming_gyp_msan_release_bot_x64',
+      'WebKit Linux MSAN': 'swarming_gn_msan_release_bot_x64',
       'WebKit Linux Trusty': 'swarming_gn_release_bot_x64',
       'WebKit Linux': 'swarming_gn_release_bot_x64',
       'WebKit Mac Builder (dbg)': 'swarming_gyp_debug_bot_x64',
@@ -1268,6 +1268,14 @@
       'swarming', 'chromeos', 'msan', 'gyp', 'release_trybot',
     ],
 
+    'swarming_gn_asan_lsan_release_bot_x64': [
+      'swarming', 'gn', 'asan', 'lsan', 'release_bot', 'x64',
+    ],
+
+    'swarming_gn_msan_release_bot_x64': [
+      'swarming', 'gn', 'msan', 'release_bot', 'x64',
+    ],
+
     'swarming_gpu_fyi_tests_gn_debug_bot': [
       'swarming', 'gpu_tests', 'internal_gles2_conform_tests', 'gn',
       'debug_bot', 'angle_deqp_tests',
@@ -1381,10 +1389,6 @@
       'swarming', 'gn', 'release_trybot', 'minimal_symbols', 'x64',
     ],
 
-    'swarming_gyp_asan_lsan_release_bot_x64': [
-      'swarming', 'gyp', 'asan', 'lsan', 'release_bot', 'x64',
-    ],
-
     'swarming_gyp_clang_debug_bot_minimal_symbols_x86': [
       'swarming', 'gyp', 'clang', 'debug_bot', 'minimal_symbols', 'x86',
     ],
@@ -1429,10 +1433,6 @@
       'swarming', 'gyp', 'debug_trybot', 'x86',
     ],
 
-    'swarming_gyp_msan_release_bot_x64': [
-      'swarming', 'gyp', 'msan', 'release_bot', 'x64',
-    ],
-
     'swarming_gyp_release_bot': [
       'swarming', 'gyp', 'release_bot',
     ],
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index a66c0e6..9e2a2e1 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -33371,6 +33371,34 @@
   </summary>
 </histogram>
 
+<histogram name="OfflinePages.Wakeup.BatteryPercentage" units="%">
+  <owner>petewil@chromium.org</owner>
+  <owner>jianli@chromium.org</owner>
+  <summary>
+    Percentage of battery remaining when the offline page background loading
+    task wakes up to check for work.
+  </summary>
+</histogram>
+
+<histogram name="OfflinePages.Wakeup.ConnectedToPower" enum="BooleanConnected">
+  <owner>petewil@chromium.org</owner>
+  <owner>jianli@chromium.org</owner>
+  <summary>
+    Whether the device is plugged in when the offline page background load task
+    wakes up to check or work.
+  </summary>
+</histogram>
+
+<histogram name="OfflinePages.Wakeup.NetworkAvailable"
+    enum="NetworkConnectionType">
+  <owner>petewil@chromium.org</owner>
+  <owner>jianli@chromium.org</owner>
+  <summary>
+    Which network is available (if any) when the offling page background loading
+    task wakes up to check for work.
+  </summary>
+</histogram>
+
 <histogram name="OfflinePolicy.SuccessfulResourceLoadPercentage" units="%">
   <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
   <summary>
@@ -35516,6 +35544,45 @@
   </summary>
 </histogram>
 
+<histogram name="PhysicalWeb.State.Bluetooth" enum="BluetoothStatus">
+  <owner>cco3@chromium.org</owner>
+  <owner>mattreynolds@chromium.org</owner>
+  <owner>mmocny@chromium.org</owner>
+  <summary>Whether bluetooth is on, off, or unknown.</summary>
+</histogram>
+
+<histogram name="PhysicalWeb.State.DataConnectionActive" enum="BooleanActive">
+  <owner>cco3@chromium.org</owner>
+  <owner>mattreynolds@chromium.org</owner>
+  <owner>mmocny@chromium.org</owner>
+  <summary>Whether the data connection is active.</summary>
+</histogram>
+
+<histogram name="PhysicalWeb.State.LocationPermission" enum="BooleanAccepted">
+  <owner>cco3@chromium.org</owner>
+  <owner>mattreynolds@chromium.org</owner>
+  <owner>mmocny@chromium.org</owner>
+  <summary>Whether location permission has been accepted.</summary>
+</histogram>
+
+<histogram name="PhysicalWeb.State.LocationServices" enum="BooleanEnabled">
+  <owner>cco3@chromium.org</owner>
+  <owner>mattreynolds@chromium.org</owner>
+  <owner>mmocny@chromium.org</owner>
+  <summary>Whether location services are enabled.</summary>
+</histogram>
+
+<histogram name="PhysicalWeb.State.Preference"
+    enum="PhysicalWebPreferenceStatus">
+  <owner>cco3@chromium.org</owner>
+  <owner>mattreynolds@chromium.org</owner>
+  <owner>mmocny@chromium.org</owner>
+  <summary>
+    Whether the preference is on, off, or if the user is in an onboarding state
+    when Chrome first starts up.
+  </summary>
+</histogram>
+
 <histogram name="PhysicalWeb.TotalUrls.OnInitialDisplay" units="urls">
   <owner>cco3@chromium.org</owner>
   <owner>mattreynolds@chromium.org</owner>
@@ -46061,6 +46128,17 @@
   </summary>
 </histogram>
 
+<histogram name="Search.ContextualSearchBlacklistSeen"
+    enum="ContextualSearchBlacklistSeen">
+  <owner>donnd@chromium.org</owner>
+  <owner>pedrosimonetti@chromium.org</owner>
+  <owner>twellington@chromium.org</owner>
+  <summary>
+    The details (blacklist reason and whether the results were seen) of every
+    search term issued by a tap gesture. Implemented for Android.
+  </summary>
+</histogram>
+
 <histogram name="Search.ContextualSearchDurationNonPrefetched" units="ms">
   <owner>donnd@chromium.org</owner>
   <owner>twellington@chromium.org</owner>
@@ -61536,6 +61614,12 @@
   <int value="8" label="Unknown or unhandler error"/>
 </enum>
 
+<enum name="BluetoothStatus" type="int">
+  <int value="0" label="Disabled"/>
+  <int value="1" label="Enabled"/>
+  <int value="2" label="Unknown"/>
+</enum>
+
 <enum name="BookmarkLaunchLocation" type="int">
   <int value="0" label="Attached bookmark bar"/>
   <int value="1" label="Detached (floating) bookmark bar"/>
@@ -61584,6 +61668,11 @@
   <int value="1" label="Accepted"/>
 </enum>
 
+<enum name="BooleanActive" type="int">
+  <int value="0" label="Inactive"/>
+  <int value="1" label="Active"/>
+</enum>
+
 <enum name="BooleanAttempted" type="int">
   <int value="0" label="Not Attempted"/>
   <int value="1" label="Attempted"/>
@@ -61644,6 +61733,11 @@
   <int value="1" label="Completed"/>
 </enum>
 
+<enum name="BooleanConnected" type="int">
+  <int value="0" label="Not Connected"/>
+  <int value="1" label="Connected"/>
+</enum>
+
 <enum name="BooleanContainedMeCard" type="int">
   <int value="0" label="Did not contain me card."/>
   <int value="1" label="Contained me card."/>
@@ -63829,6 +63923,21 @@
   <int value="1" label="Not HTTP"/>
 </enum>
 
+<enum name="ContextualSearchBlacklistSeen" type="int">
+  <int value="0" label="None, Seen"/>
+  <int value="1" label="None, Not Seen"/>
+  <int value="2" label="Number, Seen"/>
+  <int value="3" label="Number, Not Seen"/>
+  <int value="4" label="Determiner, Seen"/>
+  <int value="5" label="Determiner, Not Seen"/>
+  <int value="6" label="Preposition, Seen"/>
+  <int value="7" label="Preposition, Not Seen"/>
+  <int value="8" label="Navigation, Seen"/>
+  <int value="9" label="Navigation, Not Seen"/>
+  <int value="10" label="Misc, Seen"/>
+  <int value="11" label="Misc, Not Seen"/>
+</enum>
+
 <enum name="ContextualSearchEnterClosedStateChange" type="int">
   <int value="0" label="From Other"/>
   <int value="1" label="From Peeked (back press)"/>
@@ -79288,6 +79397,12 @@
   <int value="4" label="REFERER_DIAGNOSTICS"/>
 </enum>
 
+<enum name="PhysicalWebPreferenceStatus" type="int">
+  <int value="0" label="OFF"/>
+  <int value="1" label="ON"/>
+  <int value="2" label="ONBOARDING"/>
+</enum>
+
 <enum name="PingResult" type="int">
   <int value="0" label="Success"/>
   <int value="1" label="Response started"/>
@@ -90684,6 +90799,21 @@
   <affected-histogram name="Permissions.Action.SecureOrigin"/>
 </histogram_suffixes>
 
+<histogram_suffixes name="PhysicalWebDebugActions" separator=".">
+  <suffix name="ChromeStart" label="when Chrome first starts up"/>
+  <suffix name="LaunchFromDiagnostics"
+      label="when the user launches the ListUrlActivity from the Physical Web
+             diagnostics page"/>
+  <suffix name="LaunchFromPreferences"
+      label="when the user launches the ListUrlActivity from the Physical Web
+             preferencs screen"/>
+  <affected-histogram name="PhysicalWeb.State.Bluetooth"/>
+  <affected-histogram name="PhysicalWeb.State.DataConnectionActive"/>
+  <affected-histogram name="PhysicalWeb.State.LocationPermission"/>
+  <affected-histogram name="PhysicalWeb.State.LocationServices"/>
+  <affected-histogram name="PhysicalWeb.State.Preference"/>
+</histogram_suffixes>
+
 <histogram_suffixes name="PNaClTranslatorTypes" separator=".">
   <suffix name="" label="All translator types"/>
   <suffix name="LLC" label="LLC-based translator"/>
diff --git a/tools/perf/benchmarks/page_cycler.py b/tools/perf/benchmarks/page_cycler.py
index a7d0866..8ee83f2c 100644
--- a/tools/perf/benchmarks/page_cycler.py
+++ b/tools/perf/benchmarks/page_cycler.py
@@ -188,8 +188,6 @@
     return 'page_cycler.tough_layout_cases'
 
 
-# crbug.com/273986: This test is flakey on Windows Chrome.
-@benchmark.Enabled('android', 'chromeos', 'linux', 'ios', 'mac')
 class PageCyclerTypical25(_PageCycler):
   """Page load time benchmark for a 25 typical web pages.
 
diff --git a/tools/perf/chrome_telemetry_build/BUILD.gn b/tools/perf/chrome_telemetry_build/BUILD.gn
index c0bb96b9..3597e54b 100644
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -18,10 +18,7 @@
   ]
 
   if (is_win) {
-    data_deps += [
-      "//chrome:reorder_imports",
-      "//chrome/tools/crash_service",
-    ]
+    data_deps += [ "//chrome:reorder_imports" ]
     data += [ "//components/crash/content/tools/generate_breakpad_symbols.py" ]
   }
 
diff --git a/ui/accessibility/ax_node_data.h b/ui/accessibility/ax_node_data.h
index f446181..067adaa 100644
--- a/ui/accessibility/ax_node_data.h
+++ b/ui/accessibility/ax_node_data.h
@@ -11,6 +11,7 @@
 #include <string>
 #include <vector>
 
+#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_split.h"
 #include "ui/accessibility/ax_enums.h"
diff --git a/ui/android/window_android_compositor.h b/ui/android/window_android_compositor.h
index a6ffb33..81106b7 100644
--- a/ui/android/window_android_compositor.h
+++ b/ui/android/window_android_compositor.h
@@ -5,6 +5,7 @@
 #ifndef UI_ANDROID_WINDOW_ANDROID_COMPOSITOR_H_
 #define UI_ANDROID_WINDOW_ANDROID_COMPOSITOR_H_
 
+#include "base/memory/scoped_ptr.h"
 #include "cc/output/copy_output_request.h"
 #include "ui/android/ui_android_export.h"
 
diff --git a/ui/app_list/shower/app_list_shower_delegate_factory.h b/ui/app_list/shower/app_list_shower_delegate_factory.h
index 2c3d09e..1926f34 100644
--- a/ui/app_list/shower/app_list_shower_delegate_factory.h
+++ b/ui/app_list/shower/app_list_shower_delegate_factory.h
@@ -5,7 +5,8 @@
 #ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
 #define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_FACTORY_H_
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
 #include "ui/app_list/shower/app_list_shower_export.h"
 
 namespace app_list {
@@ -17,7 +18,7 @@
  public:
   virtual ~AppListShowerDelegateFactory() {}
 
-  virtual scoped_ptr<AppListShowerDelegate> GetDelegate(
+  virtual std::unique_ptr<AppListShowerDelegate> GetDelegate(
       AppListShower* shower) = 0;
 };
 
diff --git a/ui/app_list/shower/app_list_shower_impl.h b/ui/app_list/shower/app_list_shower_impl.h
index 85cce85..95a4ae6a 100644
--- a/ui/app_list/shower/app_list_shower_impl.h
+++ b/ui/app_list/shower/app_list_shower_impl.h
@@ -5,6 +5,8 @@
 #ifndef UI_APP_LIST_SHOWER_APP_LIST_SHOWER_IMPL_H_
 #define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_IMPL_H_
 
+#include <memory>
+
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "ui/app_list/pagination_model_observer.h"
@@ -92,7 +94,7 @@
   AppListShowerDelegateFactory* const factory_;
 
   // Responsible for laying out the app list UI.
-  scoped_ptr<AppListShowerDelegate> shower_delegate_;
+  std::unique_ptr<AppListShowerDelegate> shower_delegate_;
 
   // Whether we should show or hide app list widget.
   bool is_visible_ = false;
diff --git a/ui/app_list/shower/app_list_shower_impl_unittest.cc b/ui/app_list/shower/app_list_shower_impl_unittest.cc
index c3a6c36..524a798 100644
--- a/ui/app_list/shower/app_list_shower_impl_unittest.cc
+++ b/ui/app_list/shower/app_list_shower_impl_unittest.cc
@@ -2,7 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
+#include "base/memory/ptr_util.h"
 #include "ui/app_list/shower/app_list_shower_delegate_factory.h"
 #include "ui/app_list/shower/app_list_shower_impl.h"
 #include "ui/app_list/shower/test/app_list_shower_impl_test_api.h"
@@ -72,11 +74,11 @@
   AppListShowerDelegateTest* current_delegate() { return current_delegate_; }
 
   // AppListShowerDelegateFactory:
-  scoped_ptr<AppListShowerDelegate> GetDelegate(
+  std::unique_ptr<AppListShowerDelegate> GetDelegate(
       AppListShower* shower) override {
     current_delegate_ =
         new AppListShowerDelegateTest(container_, &app_list_view_delegate_);
-    return make_scoped_ptr(current_delegate_);
+    return base::WrapUnique(current_delegate_);
   }
 
  private:
@@ -106,9 +108,9 @@
   void TearDown() override;
 
  private:
-  scoped_ptr<AppListShowerDelegateFactoryTest> factory_;
-  scoped_ptr<AppListShowerImpl> shower_;
-  scoped_ptr<aura::Window> container_;
+  std::unique_ptr<AppListShowerDelegateFactoryTest> factory_;
+  std::unique_ptr<AppListShowerImpl> shower_;
+  std::unique_ptr<aura::Window> container_;
 
   DISALLOW_COPY_AND_ASSIGN(AppListShowerImplTest);
 };
@@ -145,7 +147,7 @@
   focus_client->FocusWindow(shower()->GetWindow());
   EXPECT_TRUE(shower()->GetTargetVisibility());
 
-  scoped_ptr<aura::Window> window(
+  std::unique_ptr<aura::Window> window(
       CreateNormalWindow(1, root_window(), nullptr));
   focus_client->FocusWindow(window.get());
 
@@ -169,7 +171,8 @@
   EXPECT_FALSE(delegate()->update_bounds_called());
 
   // Create a sibling window.
-  scoped_ptr<aura::Window> window(CreateNormalWindow(1, container(), nullptr));
+  std::unique_ptr<aura::Window> window(
+      CreateNormalWindow(1, container(), nullptr));
   focus_client->FocusWindow(window.get());
 
   EXPECT_TRUE(shower()->GetTargetVisibility());
diff --git a/ui/base/ime/chromeos/component_extension_ime_manager.cc b/ui/base/ime/chromeos/component_extension_ime_manager.cc
index 60ae074..d77b6b1 100644
--- a/ui/base/ime/chromeos/component_extension_ime_manager.cc
+++ b/ui/base/ime/chromeos/component_extension_ime_manager.cc
@@ -93,12 +93,18 @@
 ComponentExtensionEngine::ComponentExtensionEngine() {
 }
 
+ComponentExtensionEngine::ComponentExtensionEngine(
+    const ComponentExtensionEngine& other) = default;
+
 ComponentExtensionEngine::~ComponentExtensionEngine() {
 }
 
 ComponentExtensionIME::ComponentExtensionIME() {
 }
 
+ComponentExtensionIME::ComponentExtensionIME(
+    const ComponentExtensionIME& other) = default;
+
 ComponentExtensionIME::~ComponentExtensionIME() {
 }
 
diff --git a/ui/base/ime/chromeos/component_extension_ime_manager.h b/ui/base/ime/chromeos/component_extension_ime_manager.h
index 33fe88e..d5d90d848 100644
--- a/ui/base/ime/chromeos/component_extension_ime_manager.h
+++ b/ui/base/ime/chromeos/component_extension_ime_manager.h
@@ -22,6 +22,7 @@
 // Represents an engine in component extension IME.
 struct UI_BASE_IME_EXPORT ComponentExtensionEngine {
   ComponentExtensionEngine();
+  ComponentExtensionEngine(const ComponentExtensionEngine& other);
   ~ComponentExtensionEngine();
   std::string engine_id;  // The engine id.
   std::string display_name;  // The display name.
@@ -36,6 +37,7 @@
 // Represents a component extension IME.
 struct UI_BASE_IME_EXPORT ComponentExtensionIME {
   ComponentExtensionIME();
+  ComponentExtensionIME(const ComponentExtensionIME& other);
   ~ComponentExtensionIME();
   std::string id;  // extension id.
   std::string manifest;  // the contents of manifest.json
diff --git a/ui/base/ime/chromeos/input_method_descriptor.cc b/ui/base/ime/chromeos/input_method_descriptor.cc
index eda8aa6..5846b1f14 100644
--- a/ui/base/ime/chromeos/input_method_descriptor.cc
+++ b/ui/base/ime/chromeos/input_method_descriptor.cc
@@ -34,6 +34,9 @@
       input_view_url_(input_view_url) {
 }
 
+InputMethodDescriptor::InputMethodDescriptor(
+    const InputMethodDescriptor& other) = default;
+
 std::string InputMethodDescriptor::GetPreferredKeyboardLayout() const {
   // TODO(nona): Investigate better way to guess the preferred layout
   //             http://crbug.com/170601.
diff --git a/ui/base/ime/chromeos/input_method_descriptor.h b/ui/base/ime/chromeos/input_method_descriptor.h
index 461b37c2..3a7590c 100644
--- a/ui/base/ime/chromeos/input_method_descriptor.h
+++ b/ui/base/ime/chromeos/input_method_descriptor.h
@@ -26,6 +26,7 @@
                         bool is_login_keyboard,
                         const GURL& options_page_url,
                         const GURL& input_view_url);
+  InputMethodDescriptor(const InputMethodDescriptor& other);
   ~InputMethodDescriptor();
 
   // Accessors
diff --git a/ui/base/ime/chromeos/input_method_manager.cc b/ui/base/ime/chromeos/input_method_manager.cc
index 07a71b8..87fd7796 100644
--- a/ui/base/ime/chromeos/input_method_manager.cc
+++ b/ui/base/ime/chromeos/input_method_manager.cc
@@ -18,6 +18,8 @@
 
 InputMethodManager::MenuItem::MenuItem() {}
 
+InputMethodManager::MenuItem::MenuItem(const MenuItem& other) = default;
+
 InputMethodManager::MenuItem::~MenuItem() {}
 
 // static
diff --git a/ui/base/ime/chromeos/input_method_manager.h b/ui/base/ime/chromeos/input_method_manager.h
index e43e482a..74d95c9 100644
--- a/ui/base/ime/chromeos/input_method_manager.h
+++ b/ui/base/ime/chromeos/input_method_manager.h
@@ -55,6 +55,7 @@
 
   struct MenuItem {
     MenuItem();
+    MenuItem(const MenuItem& other);
     virtual ~MenuItem();
 
     std::string id;
diff --git a/ui/base/models/dialog_model.h b/ui/base/models/dialog_model.h
index 94f85e98..5607a16 100644
--- a/ui/base/models/dialog_model.h
+++ b/ui/base/models/dialog_model.h
@@ -18,9 +18,6 @@
  public:
   virtual ~DialogModel();
 
-  // Returns the title of the dialog.
-  virtual base::string16 GetDialogTitle() const = 0;
-
   // Returns a mask specifying which of the available DialogButtons are visible
   // for the dialog. Note: Dialogs with just an OK button are frowned upon.
   virtual int GetDialogButtons() const = 0;
diff --git a/ui/compositor/callback_layer_animation_observer_unittest.cc b/ui/compositor/callback_layer_animation_observer_unittest.cc
index f42f561..bb14a0b6 100644
--- a/ui/compositor/callback_layer_animation_observer_unittest.cc
+++ b/ui/compositor/callback_layer_animation_observer_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/compositor/layer_animation_sequence.h"
diff --git a/ui/compositor/float_animation_curve_adapter.h b/ui/compositor/float_animation_curve_adapter.h
index dc665d4..7657c8a 100644
--- a/ui/compositor/float_animation_curve_adapter.h
+++ b/ui/compositor/float_animation_curve_adapter.h
@@ -5,6 +5,7 @@
 #ifndef UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
 #define UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
 
+#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_curve.h"
 #include "ui/gfx/animation/tween.h"
diff --git a/ui/compositor/transform_animation_curve_adapter.h b/ui/compositor/transform_animation_curve_adapter.h
index 6933241..f6389f0 100644
--- a/ui/compositor/transform_animation_curve_adapter.h
+++ b/ui/compositor/transform_animation_curve_adapter.h
@@ -6,6 +6,7 @@
 #define UI_COMPOSITOR_TRANSFORM_ANIMATION_CURVE_ADAPTER_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_curve.h"
 #include "ui/compositor/compositor_export.h"
diff --git a/ui/events/ozone/evdev/touch_evdev_types.cc b/ui/events/ozone/evdev/touch_evdev_types.cc
index 78807c18..87d0cffe 100644
--- a/ui/events/ozone/evdev/touch_evdev_types.cc
+++ b/ui/events/ozone/evdev/touch_evdev_types.cc
@@ -9,6 +9,9 @@
 InProgressTouchEvdev::InProgressTouchEvdev() {
 }
 
+InProgressTouchEvdev::InProgressTouchEvdev(const InProgressTouchEvdev& other) =
+    default;
+
 InProgressTouchEvdev::~InProgressTouchEvdev() {}
 
 }  // namespace ui
diff --git a/ui/events/ozone/evdev/touch_evdev_types.h b/ui/events/ozone/evdev/touch_evdev_types.h
index 70652c6..1efe0c6 100644
--- a/ui/events/ozone/evdev/touch_evdev_types.h
+++ b/ui/events/ozone/evdev/touch_evdev_types.h
@@ -19,6 +19,7 @@
 // Contains information about an in progress touch.
 struct EVENTS_OZONE_EVDEV_EXPORT InProgressTouchEvdev {
   InProgressTouchEvdev();
+  InProgressTouchEvdev(const InProgressTouchEvdev& other);
   ~InProgressTouchEvdev();
 
   // Whether there is new information for the touch.
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index 8cf1218..bdff3e3 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -539,6 +539,7 @@
     "vector_icons/tab_close_normal.icon",
     "vector_icons/tab_media_capturing.icon",
     "vector_icons/tab_media_recording.icon",
+    "vector_icons/tab_usb_connected.icon",
     "vector_icons/tablet.icon",
     "vector_icons/translate.icon",
     "vector_icons/upgrade_menu_item.icon",
diff --git a/ui/gfx/font_render_params.h b/ui/gfx/font_render_params.h
index b460c6d..7a294bd 100644
--- a/ui/gfx/font_render_params.h
+++ b/ui/gfx/font_render_params.h
@@ -108,9 +108,9 @@
 GFX_EXPORT void ClearFontRenderParamsCacheForTest();
 #endif
 
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
 // Gets the device scale factor to query the FontRenderParams.
-float GetFontRenderParamsDeviceScaleFactor();
+GFX_EXPORT float GetFontRenderParamsDeviceScaleFactor();
 
 // Sets the device scale factor for FontRenderParams to decide
 // if it should enable subpixel positioning.
diff --git a/ui/gfx/font_render_params_linux.cc b/ui/gfx/font_render_params_linux.cc
index 526c19d..b2e8d5e 100644
--- a/ui/gfx/font_render_params_linux.cc
+++ b/ui/gfx/font_render_params_linux.cc
@@ -19,21 +19,17 @@
 #include "base/strings/stringprintf.h"
 #include "base/synchronization/lock.h"
 #include "build/build_config.h"
-#include "ui/gfx/display.h"
 #include "ui/gfx/font.h"
 #include "ui/gfx/linux_font_delegate.h"
-#include "ui/gfx/screen.h"
 #include "ui/gfx/switches.h"
 
 namespace gfx {
 
 namespace {
 
-#if defined(OS_CHROMEOS)
-// A device scale factor for an internal display (if any)
-// that is used to determine if subpixel positioning should be used.
-float device_scale_factor_for_internal_display = 1.0f;
-#endif
+// A device scale factor used to determine if subpixel positioning
+// should be used.
+float device_scale_factor_ = 1.0f;
 
 // Number of recent GetFontRenderParams() results to cache.
 const size_t kCacheSize = 256;
@@ -204,19 +200,9 @@
 FontRenderParams GetFontRenderParams(const FontRenderParamsQuery& query,
                                      std::string* family_out) {
   FontRenderParamsQuery actual_query(query);
-  if (actual_query.device_scale_factor == 0) {
-#if defined(OS_CHROMEOS)
-    actual_query.device_scale_factor = device_scale_factor_for_internal_display;
-#else
-    // Linux does not support per-display DPI, so we use a slightly simpler
-    // code path than on Chrome OS to figure out the device scale factor.
-    gfx::Screen* screen = gfx::Screen::GetScreen();
-    if (screen) {
-      gfx::Display display = screen->GetPrimaryDisplay();
-      actual_query.device_scale_factor = display.device_scale_factor();
-    }
-#endif
-  }
+  if (actual_query.device_scale_factor == 0)
+    actual_query.device_scale_factor = device_scale_factor_;
+
   const uint32_t hash = HashFontRenderParamsQuery(actual_query);
   SynchronizedCache* synchronized_cache = g_synchronized_cache.Pointer();
 
@@ -279,14 +265,12 @@
   synchronized_cache->cache.Clear();
 }
 
-#if defined(OS_CHROMEOS)
 float GetFontRenderParamsDeviceScaleFactor() {
-  return device_scale_factor_for_internal_display;
+  return device_scale_factor_;
 }
 
 void SetFontRenderParamsDeviceScaleFactor(float device_scale_factor) {
-  device_scale_factor_for_internal_display = device_scale_factor;
+  device_scale_factor_ = device_scale_factor;
 }
-#endif
 
 }  // namespace gfx
diff --git a/ui/gfx/font_render_params_linux_unittest.cc b/ui/gfx/font_render_params_linux_unittest.cc
index 27d1ff3b..63601d1 100644
--- a/ui/gfx/font_render_params_linux_unittest.cc
+++ b/ui/gfx/font_render_params_linux_unittest.cc
@@ -279,7 +279,6 @@
   EXPECT_FALSE(params.subpixel_positioning);
 }
 
-#if defined(OS_CHROMEOS)
 TEST_F(FontRenderParamsTest, ForceSubpixelPositioning) {
   {
     FontRenderParams params =
@@ -299,7 +298,6 @@
     SetFontRenderParamsDeviceScaleFactor(1.0f);
   }
 }
-#endif
 
 TEST_F(FontRenderParamsTest, OnlySetConfiguredValues) {
   // Configure the LinuxFontDelegate (which queries GtkSettings on desktop
diff --git a/ui/gfx/geometry/cubic_bezier.cc b/ui/gfx/geometry/cubic_bezier.cc
index 55ad400..16acfc7c 100644
--- a/ui/gfx/geometry/cubic_bezier.cc
+++ b/ui/gfx/geometry/cubic_bezier.cc
@@ -19,6 +19,8 @@
   InitRange(p1y, p2y);
 }
 
+CubicBezier::CubicBezier(const CubicBezier& other) = default;
+
 void CubicBezier::InitCoefficients(double p1x,
                                    double p1y,
                                    double p2x,
diff --git a/ui/gfx/geometry/cubic_bezier.h b/ui/gfx/geometry/cubic_bezier.h
index 1bae2c41..f32776b 100644
--- a/ui/gfx/geometry/cubic_bezier.h
+++ b/ui/gfx/geometry/cubic_bezier.h
@@ -13,6 +13,7 @@
 class GFX_EXPORT CubicBezier {
  public:
   CubicBezier(double p1x, double p1y, double p2x, double p2y);
+  CubicBezier(const CubicBezier& other);
 
   double SampleCurveX(double t) const {
     // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.
diff --git a/ui/gfx/gpu_memory_buffer.cc b/ui/gfx/gpu_memory_buffer.cc
index 538611c..fe6d4d19 100644
--- a/ui/gfx/gpu_memory_buffer.cc
+++ b/ui/gfx/gpu_memory_buffer.cc
@@ -20,6 +20,9 @@
     : type(EMPTY_BUFFER), id(0), handle(base::SharedMemory::NULLHandle()) {
 }
 
+GpuMemoryBufferHandle::GpuMemoryBufferHandle(
+    const GpuMemoryBufferHandle& other) = default;
+
 GpuMemoryBufferHandle::~GpuMemoryBufferHandle() {}
 
 bool GpuMemoryBuffer::IsInUseByMacOSWindowServer() const {
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h
index da66aa9..423dcf6 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -39,6 +39,7 @@
 
 struct GFX_EXPORT GpuMemoryBufferHandle {
   GpuMemoryBufferHandle();
+  GpuMemoryBufferHandle(const GpuMemoryBufferHandle& other);
   ~GpuMemoryBufferHandle();
   bool is_null() const { return type == EMPTY_BUFFER; }
   GpuMemoryBufferType type;
diff --git a/ui/gfx/platform_font_linux.cc b/ui/gfx/platform_font_linux.cc
index 3c58ccb..dba65947 100644
--- a/ui/gfx/platform_font_linux.cc
+++ b/ui/gfx/platform_font_linux.cc
@@ -196,7 +196,6 @@
 }
 
 const FontRenderParams& PlatformFontLinux::GetFontRenderParams() {
-#if defined(OS_CHROMEOS)
   float current_scale_factor = GetFontRenderParamsDeviceScaleFactor();
   if (current_scale_factor != device_scale_factor_) {
     FontRenderParamsQuery query;
@@ -207,7 +206,6 @@
     font_render_params_ = gfx::GetFontRenderParams(query, nullptr);
     device_scale_factor_ = current_scale_factor;
   }
-#endif
   return font_render_params_;
 }
 
@@ -237,9 +235,7 @@
 
   font_size_pixels_ = font_size_pixels;
   style_ = style;
-#if defined(OS_CHROMEOS)
   device_scale_factor_ = GetFontRenderParamsDeviceScaleFactor();
-#endif
   font_render_params_ = render_params;
 
 }
@@ -249,9 +245,7 @@
   font_family_ = other->font_family_;
   font_size_pixels_ = other->font_size_pixels_;
   style_ = other->style_;
-#if defined(OS_CHROMEOS)
   device_scale_factor_ = other->device_scale_factor_;
-#endif
   font_render_params_ = other->font_render_params_;
 
   if (!other->metrics_need_computation_) {
diff --git a/ui/gfx/platform_font_linux.h b/ui/gfx/platform_font_linux.h
index 52c4bce..e990f33b 100644
--- a/ui/gfx/platform_font_linux.h
+++ b/ui/gfx/platform_font_linux.h
@@ -84,9 +84,7 @@
   std::string font_family_;
   int font_size_pixels_;
   int style_;
-#if defined(OS_CHROMEOS)
   float device_scale_factor_;
-#endif
 
   // Information describing how the font should be rendered.
   FontRenderParams font_render_params_;
diff --git a/ui/gfx/render_text_mac.h b/ui/gfx/render_text_mac.h
index 042029a..58c027a 100644
--- a/ui/gfx/render_text_mac.h
+++ b/ui/gfx/render_text_mac.h
@@ -75,6 +75,7 @@
     bool diagonal_strike;
 
     TextRun();
+    TextRun(const TextRun& other);
     ~TextRun();
   };
 
diff --git a/ui/gfx/render_text_mac.mm b/ui/gfx/render_text_mac.mm
index 3a6d01b..44fb17d 100644
--- a/ui/gfx/render_text_mac.mm
+++ b/ui/gfx/render_text_mac.mm
@@ -237,6 +237,8 @@
       strike(false),
       diagonal_strike(false) {}
 
+RenderTextMac::TextRun::TextRun(const TextRun& other) = default;
+
 RenderTextMac::TextRun::~TextRun() {}
 
 float RenderTextMac::GetLayoutTextWidth() {
diff --git a/ui/gfx/vector_icons/tab_usb_connected.icon b/ui/gfx/vector_icons/tab_usb_connected.icon
new file mode 100644
index 0000000..c383dca1
--- /dev/null
+++ b/ui/gfx/vector_icons/tab_usb_connected.icon
@@ -0,0 +1,39 @@
+// 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.
+
+CANVAS_DIMENSIONS, 24,
+MOVE_TO, 15, 7,
+R_V_LINE_TO, 4,
+R_H_LINE_TO, 1,
+R_V_LINE_TO, 2,
+R_H_LINE_TO, -3,
+V_LINE_TO, 5,
+R_H_LINE_TO, 2,
+R_LINE_TO, -3, -4,
+R_LINE_TO, -3, 4,
+R_H_LINE_TO, 2,
+R_V_LINE_TO, 8,
+H_LINE_TO, 8,
+R_V_LINE_TO, -2.07f,
+R_CUBIC_TO, 0.7f, -0.37f, 1.2f, -1.08f, 1.2f, -1.93f,
+R_CUBIC_TO, 0, -1.21f, -0.99f, -2.2f, -2.2f, -2.2f,
+R_CUBIC_TO, -1.21f, 0, -2.2f, 0.99f, -2.2f, 2.2f,
+R_CUBIC_TO, 0, 0.85f, 0.5f, 1.56f, 1.2f, 1.93f,
+V_LINE_TO, 13,
+R_CUBIC_TO, 0, 1.11f, 0.89f, 2, 2, 2,
+R_H_LINE_TO, 3,
+R_V_LINE_TO, 3.05f,
+R_CUBIC_TO, -0.71f, 0.37f, -1.2f, 1.1f, -1.2f, 1.95f,
+R_CUBIC_TO, 0, 1.22f, 0.99f, 2.2f, 2.2f, 2.2f,
+R_CUBIC_TO, 1.21f, 0, 2.2f, -0.98f, 2.2f, -2.2f,
+R_CUBIC_TO, 0, -0.85f, -0.49f, -1.58f, -1.2f, -1.95f,
+V_LINE_TO, 15,
+R_H_LINE_TO, 3,
+R_CUBIC_TO, 1.11f, 0, 2, -0.89f, 2, -2,
+R_V_LINE_TO, -2,
+R_H_LINE_TO, 1,
+V_LINE_TO, 7,
+R_H_LINE_TO, -4,
+CLOSE,
+END
diff --git a/ui/gl/gl_surface_overlay.cc b/ui/gl/gl_surface_overlay.cc
index e683c10..299e4a8 100644
--- a/ui/gl/gl_surface_overlay.cc
+++ b/ui/gl/gl_surface_overlay.cc
@@ -23,6 +23,8 @@
       bounds_rect_(bounds_rect),
       crop_rect_(crop_rect) {}
 
+GLSurfaceOverlay::GLSurfaceOverlay(const GLSurfaceOverlay& other) = default;
+
 GLSurfaceOverlay::~GLSurfaceOverlay() {}
 
 bool GLSurfaceOverlay::ScheduleOverlayPlane(AcceleratedWidget widget) const {
diff --git a/ui/gl/gl_surface_overlay.h b/ui/gl/gl_surface_overlay.h
index df6923ab..240d90b 100644
--- a/ui/gl/gl_surface_overlay.h
+++ b/ui/gl/gl_surface_overlay.h
@@ -23,6 +23,7 @@
                    gl::GLImage* image,
                    const Rect& bounds_rect,
                    const RectF& crop_rect);
+  GLSurfaceOverlay(const GLSurfaceOverlay& other);
   ~GLSurfaceOverlay();
 
   // Schedule the image as an overlay plane to be shown at swap time for
diff --git a/ui/ozone/common/gpu/ozone_gpu_message_params.cc b/ui/ozone/common/gpu/ozone_gpu_message_params.cc
index 20bb6ea..7924ee0 100644
--- a/ui/ozone/common/gpu/ozone_gpu_message_params.cc
+++ b/ui/ozone/common/gpu/ozone_gpu_message_params.cc
@@ -18,6 +18,9 @@
 DisplaySnapshot_Params::DisplaySnapshot_Params() {
 }
 
+DisplaySnapshot_Params::DisplaySnapshot_Params(
+    const DisplaySnapshot_Params& other) = default;
+
 DisplaySnapshot_Params::~DisplaySnapshot_Params() {}
 
 OverlayCheck_Params::OverlayCheck_Params() {}
@@ -31,6 +34,9 @@
       crop_rect(candidate.crop_rect),
       plane_z_order(candidate.plane_z_order) {}
 
+OverlayCheck_Params::OverlayCheck_Params(const OverlayCheck_Params& other) =
+    default;
+
 OverlayCheck_Params::~OverlayCheck_Params() {
 }
 
diff --git a/ui/ozone/common/gpu/ozone_gpu_message_params.h b/ui/ozone/common/gpu/ozone_gpu_message_params.h
index de9f1be..afb0b07 100644
--- a/ui/ozone/common/gpu/ozone_gpu_message_params.h
+++ b/ui/ozone/common/gpu/ozone_gpu_message_params.h
@@ -31,6 +31,7 @@
 
 struct DisplaySnapshot_Params {
   DisplaySnapshot_Params();
+  DisplaySnapshot_Params(const DisplaySnapshot_Params& other);
   ~DisplaySnapshot_Params();
 
   int64_t display_id = 0;
@@ -56,6 +57,7 @@
   OverlayCheck_Params();
   OverlayCheck_Params(
       const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate);
+  OverlayCheck_Params(const OverlayCheck_Params& other);
   ~OverlayCheck_Params();
 
   bool operator<(const OverlayCheck_Params& plane) const;
diff --git a/ui/ozone/platform/drm/gpu/fake_plane_info.cc b/ui/ozone/platform/drm/gpu/fake_plane_info.cc
index 3695383..2e9a2a7 100644
--- a/ui/ozone/platform/drm/gpu/fake_plane_info.cc
+++ b/ui/ozone/platform/drm/gpu/fake_plane_info.cc
@@ -18,6 +18,8 @@
                              const std::vector<uint32_t>& formats)
     : id(plane_id), allowed_crtc_mask(crtc_mask), allowed_formats(formats) {}
 
+FakePlaneInfo::FakePlaneInfo(const FakePlaneInfo& other) = default;
+
 FakePlaneInfo::~FakePlaneInfo() {}
 
 }  // namespace ui
diff --git a/ui/ozone/platform/drm/gpu/fake_plane_info.h b/ui/ozone/platform/drm/gpu/fake_plane_info.h
index d9c9ea8..79265ebe 100644
--- a/ui/ozone/platform/drm/gpu/fake_plane_info.h
+++ b/ui/ozone/platform/drm/gpu/fake_plane_info.h
@@ -18,6 +18,7 @@
   FakePlaneInfo(uint32_t plane_id,
                 uint32_t crtc_mask,
                 const std::vector<uint32_t>& formats);
+  FakePlaneInfo(const FakePlaneInfo& other);
   ~FakePlaneInfo();
 
   uint32_t id;
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
index ba915564..37ce6532 100644
--- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
@@ -36,6 +36,9 @@
     : crtc_id(crtc_id), framebuffer(framebuffer), crtc(crtc) {
 }
 
+HardwareDisplayPlaneList::PageFlipInfo::PageFlipInfo(
+    const PageFlipInfo& other) = default;
+
 HardwareDisplayPlaneList::PageFlipInfo::~PageFlipInfo() {
 }
 
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h
index 2a4fee2..3efdd8b 100644
--- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h
@@ -38,6 +38,7 @@
 
   struct PageFlipInfo {
     PageFlipInfo(uint32_t crtc_id, uint32_t framebuffer, CrtcController* crtc);
+    PageFlipInfo(const PageFlipInfo& other);
     ~PageFlipInfo();
 
     uint32_t crtc_id;
diff --git a/ui/ozone/platform/drm/gpu/overlay_plane.cc b/ui/ozone/platform/drm/gpu/overlay_plane.cc
index c883eb00..d701670 100644
--- a/ui/ozone/platform/drm/gpu/overlay_plane.cc
+++ b/ui/ozone/platform/drm/gpu/overlay_plane.cc
@@ -27,6 +27,8 @@
       display_bounds(display_bounds),
       crop_rect(crop_rect) {}
 
+OverlayPlane::OverlayPlane(const OverlayPlane& other) = default;
+
 OverlayPlane::~OverlayPlane() {
 }
 
diff --git a/ui/ozone/platform/drm/gpu/overlay_plane.h b/ui/ozone/platform/drm/gpu/overlay_plane.h
index f3d1f777b..1225049 100644
--- a/ui/ozone/platform/drm/gpu/overlay_plane.h
+++ b/ui/ozone/platform/drm/gpu/overlay_plane.h
@@ -29,6 +29,7 @@
                gfx::OverlayTransform plane_transform,
                const gfx::Rect& display_bounds,
                const gfx::RectF& crop_rect);
+  OverlayPlane(const OverlayPlane& other);
 
   // This represents a callback function which can handle post processing
   // operations like scaling, format conversion etc of the buffer bound to this
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
index 347b185..7863f80 100644
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -4,8 +4,11 @@
 
 #include "ui/ozone/platform/x11/ozone_platform_x11.h"
 
+#include <X11/Xlib.h>
+
 #include <utility>
 
+#include "base/command_line.h"
 #include "base/memory/scoped_ptr.h"
 #include "ui/events/platform/x11/x11_event_source_libevent.h"
 #include "ui/ozone/common/native_display_delegate_ozone.h"
@@ -25,10 +28,23 @@
 
 namespace {
 
+// Returns true if we should operate in Mus mode.
+bool RunningInsideMus() {
+  bool has_channel_handle = base::CommandLine::ForCurrentProcess()->HasSwitch(
+      "mojo-platform-channel-handle");
+  return has_channel_handle;
+}
+
 // Singleton OzonePlatform implementation for Linux X11 platform.
 class OzonePlatformX11 : public OzonePlatform {
  public:
-  OzonePlatformX11() {}
+  OzonePlatformX11() {
+    // If we're running in Mus mode both the UI and GPU components of Ozone will
+    // be running in the same process. Enable X11 concurrent thread support.
+    if (RunningInsideMus())
+      XInitThreads();
+  }
+
   ~OzonePlatformX11() override {}
 
   // OzonePlatform:
@@ -77,7 +93,6 @@
   void InitializeUI() override {
     window_manager_.reset(new X11WindowManagerOzone);
     event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay()));
-    surface_factory_ozone_.reset(new X11SurfaceFactory());
     overlay_manager_.reset(new StubOverlayManager());
     input_controller_ = CreateStubInputController();
     cursor_factory_ozone_.reset(new X11CursorFactoryOzone());
@@ -99,10 +114,8 @@
   scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
 
   // Objects in the GPU process.
-  scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
-
-  // Objects in both Browser and GPU process.
   scoped_ptr<X11SurfaceFactory> surface_factory_ozone_;
+  scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
 
   DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11);
 };
diff --git a/ui/ozone/public/overlay_candidates_ozone.cc b/ui/ozone/public/overlay_candidates_ozone.cc
index 89777b7..d6fdc00 100644
--- a/ui/ozone/public/overlay_candidates_ozone.cc
+++ b/ui/ozone/public/overlay_candidates_ozone.cc
@@ -11,6 +11,9 @@
 OverlayCandidatesOzone::OverlaySurfaceCandidate::OverlaySurfaceCandidate()
     : is_clipped(false) {}
 
+OverlayCandidatesOzone::OverlaySurfaceCandidate::OverlaySurfaceCandidate(
+    const OverlaySurfaceCandidate& other) = default;
+
 OverlayCandidatesOzone::OverlaySurfaceCandidate::~OverlaySurfaceCandidate() {
 }
 
diff --git a/ui/ozone/public/overlay_candidates_ozone.h b/ui/ozone/public/overlay_candidates_ozone.h
index cacf562..87e18ec9 100644
--- a/ui/ozone/public/overlay_candidates_ozone.h
+++ b/ui/ozone/public/overlay_candidates_ozone.h
@@ -20,6 +20,7 @@
  public:
   struct OverlaySurfaceCandidate {
     OverlaySurfaceCandidate();
+    OverlaySurfaceCandidate(const OverlaySurfaceCandidate& other);
     ~OverlaySurfaceCandidate();
 
     // Transformation to apply to layer during composition.
diff --git a/ui/ozone/public/surface_ozone_egl.cc b/ui/ozone/public/surface_ozone_egl.cc
index 3e1ac4a4..ba61f4f 100644
--- a/ui/ozone/public/surface_ozone_egl.cc
+++ b/ui/ozone/public/surface_ozone_egl.cc
@@ -8,6 +8,9 @@
 
 EglConfigCallbacks::EglConfigCallbacks() {}
 
+EglConfigCallbacks::EglConfigCallbacks(const EglConfigCallbacks& other) =
+    default;
+
 EglConfigCallbacks::~EglConfigCallbacks() {}
 
 bool SurfaceOzoneEGL::IsUniversalDisplayLinkDevice() {
diff --git a/ui/ozone/public/surface_ozone_egl.h b/ui/ozone/public/surface_ozone_egl.h
index b8970da9..67424a4b 100644
--- a/ui/ozone/public/surface_ozone_egl.h
+++ b/ui/ozone/public/surface_ozone_egl.h
@@ -24,6 +24,7 @@
 // Holds callbacks to functions for configuring EGL on platform.
 struct OZONE_BASE_EXPORT EglConfigCallbacks {
   EglConfigCallbacks();
+  EglConfigCallbacks(const EglConfigCallbacks& other);
   ~EglConfigCallbacks();
   base::Callback<bool(const int32_t* attribs,
                       void** /* EGLConfig* */ configs,
diff --git a/ui/shell_dialogs/select_file_dialog_mac.h b/ui/shell_dialogs/select_file_dialog_mac.h
index c8f983ee..b3765ef 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.h
+++ b/ui/shell_dialogs/select_file_dialog_mac.h
@@ -63,6 +63,7 @@
   struct DialogData {
     DialogData(void* params_,
                base::scoped_nsobject<ExtensionDropdownHandler> handler);
+    DialogData(const DialogData& other);
 
     // |params| user data associated with this file dialog.
     void* params;
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index 2a4167c..1ac8122 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -248,6 +248,8 @@
     base::scoped_nsobject<ExtensionDropdownHandler> handler)
     : params(params_), extension_dropdown_handler(handler) {}
 
+SelectFileDialogImpl::DialogData::DialogData(const DialogData& other) = default;
+
 SelectFileDialogImpl::DialogData::~DialogData() {}
 
 SelectFileDialogImpl::~SelectFileDialogImpl() {
diff --git a/ui/snapshot/snapshot_android.cc b/ui/snapshot/snapshot_android.cc
index fb7d40d..609d80c 100644
--- a/ui/snapshot/snapshot_android.cc
+++ b/ui/snapshot/snapshot_android.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
 #include "cc/output/copy_output_request.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/android/view_android.h"
diff --git a/ui/snapshot/snapshot_async.h b/ui/snapshot/snapshot_async.h
index 467bdcb..1c53db9 100644
--- a/ui/snapshot/snapshot_async.h
+++ b/ui/snapshot/snapshot_async.h
@@ -6,6 +6,7 @@
 #define UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
 #include "cc/output/copy_output_result.h"
 #include "ui/snapshot/snapshot.h"
 
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index a0a4c0b..70dd986 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -770,7 +770,8 @@
 }
 
 void NativeWidgetMus::SetOpacity(unsigned char opacity) {
-  // NOTIMPLEMENTED();
+  if (window_)
+    window_->SetOpacity(opacity / 255.0);
 }
 
 void NativeWidgetMus::FlashFrame(bool flash_frame) {
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
index e71ae6a..6ffd94a3 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
@@ -20,6 +20,7 @@
 #include "ui/display/util/x11/edid_parser_x11.h"
 #include "ui/events/platform/platform_event_source.h"
 #include "ui/gfx/display.h"
+#include "ui/gfx/font_render_params.h"
 #include "ui/gfx/geometry/point_conversions.h"
 #include "ui/gfx/geometry/size_conversions.h"
 #include "ui/gfx/native_widget_types.h"
@@ -107,9 +108,9 @@
                    RROutputChangeNotifyMask |
                    RRCrtcChangeNotifyMask);
 
-    displays_ = BuildDisplaysFromXRandRInfo();
+    SetDisplaysInternal(BuildDisplaysFromXRandRInfo());
   } else {
-    displays_ = GetFallbackDisplayList();
+    SetDisplaysInternal(GetFallbackDisplayList());
   }
 }
 
@@ -366,11 +367,17 @@
 
 void DesktopScreenX11::ConfigureTimerFired() {
   std::vector<gfx::Display> old_displays = displays_;
-  displays_ = BuildDisplaysFromXRandRInfo();
-
+  SetDisplaysInternal(BuildDisplaysFromXRandRInfo());
   change_notifier_.NotifyDisplaysChanged(old_displays, displays_);
 }
 
+void DesktopScreenX11::SetDisplaysInternal(
+    const std::vector<gfx::Display>& displays) {
+  displays_ = displays;
+  gfx::SetFontRenderParamsDeviceScaleFactor(
+      GetPrimaryDisplay().device_scale_factor());
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 gfx::Screen* CreateDesktopScreen() {
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.h b/ui/views/widget/desktop_aura/desktop_screen_x11.h
index 463c5fd..e96d983c 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.h
@@ -71,6 +71,9 @@
   // We delay updating the display so we can coalesce events.
   void ConfigureTimerFired();
 
+  // Updates |displays_| and sets FontRenderParams's scale factor.
+  void SetDisplaysInternal(const std::vector<gfx::Display>& displays);
+
   Display* xdisplay_;
   ::Window x_root_window_;
 
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
index c527545..a2e2d2a 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
@@ -16,6 +16,7 @@
 #include "ui/base/x/x11_util.h"
 #include "ui/events/test/event_generator.h"
 #include "ui/gfx/display_observer.h"
+#include "ui/gfx/font_render_params.h"
 #include "ui/gfx/x/x11_types.h"
 #include "ui/views/test/views_test_base.h"
 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
@@ -83,9 +84,10 @@
   DesktopScreenX11* screen() { return screen_.get(); }
 
   void NotifyDisplaysChanged(const std::vector<gfx::Display>& displays) {
-    DesktopScreenX11* screen = screen_.get();
-    screen->change_notifier_.NotifyDisplaysChanged(screen->displays_, displays);
-    screen->displays_ = displays;
+    std::vector<gfx::Display> old_displays = screen_->displays_;
+    screen_->SetDisplaysInternal(displays);
+    screen_->change_notifier_.NotifyDisplaysChanged(old_displays,
+                                                    screen_->displays_);
   }
 
   void ResetDisplayChanges() {
@@ -439,6 +441,7 @@
   displays[0].set_device_scale_factor(2.5f);
   NotifyDisplaysChanged(displays);
   EXPECT_EQ(1u, changed_display_.size());
+  EXPECT_EQ(2.5f, gfx::GetFontRenderParamsDeviceScaleFactor());
 
   displays[1].set_device_scale_factor(2.5f);
   NotifyDisplaysChanged(displays);
@@ -456,6 +459,7 @@
   displays[1].set_device_scale_factor(1.f);
   NotifyDisplaysChanged(displays);
   EXPECT_EQ(4u, changed_display_.size());
+  EXPECT_EQ(1.f, gfx::GetFontRenderParamsDeviceScaleFactor());
 }
 
 }  // namespace views
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc
index b5c4dd64e..84ed6b9 100644
--- a/ui/views/window/dialog_delegate.cc
+++ b/ui/views/window/dialog_delegate.cc
@@ -119,10 +119,6 @@
   button->SetIsDefault(type == GetDefaultDialogButton());
 }
 
-base::string16 DialogDelegate::GetDialogTitle() const {
-  return GetWindowTitle();
-}
-
 int DialogDelegate::GetDialogButtons() const {
   return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
 }
@@ -250,7 +246,7 @@
 }
 
 void DialogDelegateView::GetAccessibleState(ui::AXViewState* state) {
-  state->name = GetDialogTitle();
+  state->name = GetWindowTitle();
   state->role = ui::AX_ROLE_DIALOG;
 }
 
diff --git a/ui/views/window/dialog_delegate.h b/ui/views/window/dialog_delegate.h
index ca83c29..06c9bbe6 100644
--- a/ui/views/window/dialog_delegate.h
+++ b/ui/views/window/dialog_delegate.h
@@ -87,7 +87,6 @@
   virtual void UpdateButton(LabelButton* button, ui::DialogButton type);
 
   // Overridden from ui::DialogModel:
-  base::string16 GetDialogTitle() const override;
   int GetDialogButtons() const override;
   int GetDefaultDialogButton() const override;
   bool ShouldDefaultButtonBeBlue() const override;
diff --git a/ui/wm/core/cursor_manager.cc b/ui/wm/core/cursor_manager.cc
index 51a30ac6..607614b6 100644
--- a/ui/wm/core/cursor_manager.cc
+++ b/ui/wm/core/cursor_manager.cc
@@ -73,11 +73,16 @@
 
 }  // namespace internal
 
+bool CursorManager::last_cursor_visibility_state_ = true;
+
 CursorManager::CursorManager(scoped_ptr<NativeCursorManager> delegate)
     : delegate_(std::move(delegate)),
       cursor_lock_count_(0),
       current_state_(new internal::CursorState),
-      state_on_unlock_(new internal::CursorState) {}
+      state_on_unlock_(new internal::CursorState) {
+  // Restore the last cursor visibility state.
+  current_state_->SetVisible(last_cursor_visibility_state_);
+}
 
 CursorManager::~CursorManager() {
 }
@@ -95,6 +100,7 @@
 }
 
 void CursorManager::ShowCursor() {
+  last_cursor_visibility_state_ = true;
   state_on_unlock_->SetVisible(true);
   if (cursor_lock_count_ == 0 &&
       IsCursorVisible() != state_on_unlock_->visible()) {
@@ -105,6 +111,7 @@
 }
 
 void CursorManager::HideCursor() {
+  last_cursor_visibility_state_ = false;
   state_on_unlock_->SetVisible(false);
   if (cursor_lock_count_ == 0 &&
       IsCursorVisible() != state_on_unlock_->visible()) {
diff --git a/ui/wm/core/cursor_manager.h b/ui/wm/core/cursor_manager.h
index a3afdd3..3e2b86b21 100644
--- a/ui/wm/core/cursor_manager.h
+++ b/ui/wm/core/cursor_manager.h
@@ -82,6 +82,12 @@
 
   base::ObserverList<aura::client::CursorClientObserver> observers_;
 
+  // This flag holds the cursor visibility state for the duration of the
+  // process. Defaults to true. This flag helps ensure that when a
+  // CursorManager instance is created it gets populated with the correct
+  // cursor visibility state.
+  static bool last_cursor_visibility_state_;
+
   DISALLOW_COPY_AND_ASSIGN(CursorManager);
 };
 
diff --git a/ui/wm/core/cursor_manager_unittest.cc b/ui/wm/core/cursor_manager_unittest.cc
index 7add1069..e4f5429 100644
--- a/ui/wm/core/cursor_manager_unittest.cc
+++ b/ui/wm/core/cursor_manager_unittest.cc
@@ -325,3 +325,38 @@
   EXPECT_FALSE(observer_b.did_visibility_change());
   EXPECT_TRUE(observer_a.is_cursor_visible());
 }
+
+// This test validates that the cursor visiblity state is restored when a
+// CursorManager instance is destroyed and recreated.
+TEST(CursorManagerCreateDestroyTest, VisibilityTest) {
+  // This block ensures that the cursor is hidden when the CursorManager
+  // instance is destroyed.
+  {
+    wm::CursorManager cursor_manager1(
+        scoped_ptr<wm::NativeCursorManager>(new TestingCursorManager));
+    cursor_manager1.ShowCursor();
+    EXPECT_TRUE(cursor_manager1.IsCursorVisible());
+    cursor_manager1.HideCursor();
+    EXPECT_FALSE(cursor_manager1.IsCursorVisible());
+  }
+
+  // This block validates that the cursor is hidden initially. It ensures that
+  // the cursor is visible when the CursorManager instance is destroyed.
+  {
+    wm::CursorManager cursor_manager2(
+      scoped_ptr<wm::NativeCursorManager>(new TestingCursorManager));
+    EXPECT_FALSE(cursor_manager2.IsCursorVisible());
+    cursor_manager2.ShowCursor();
+    EXPECT_TRUE(cursor_manager2.IsCursorVisible());
+  }
+
+  // This block validates that the cursor is visible initially. It then
+  // performs normal cursor visibility operations.
+  {
+    wm::CursorManager cursor_manager3(
+      scoped_ptr<wm::NativeCursorManager>(new TestingCursorManager));
+    EXPECT_TRUE(cursor_manager3.IsCursorVisible());
+    cursor_manager3.HideCursor();
+    EXPECT_FALSE(cursor_manager3.IsCursorVisible());
+  }
+}