Browse Source

Adapt to changes of Chrome 51 API changes (Part 2)

Cheng Zhao 9 years ago
parent
commit
a2bd55dd3c
48 changed files with 131 additions and 131 deletions
  1. 1 1
      atom/browser/api/atom_api_session.cc
  2. 3 2
      atom/browser/api/atom_api_web_contents.cc
  3. 2 1
      atom/browser/atom_browser_client.cc
  4. 1 1
      atom/browser/atom_javascript_dialog_manager.cc
  5. 5 4
      atom/browser/login_handler.cc
  6. 2 2
      atom/browser/web_contents_permission_helper.cc
  7. 4 3
      atom/common/api/event_emitter_caller.cc
  8. 4 3
      atom/common/node_bindings.cc
  9. 1 1
      chromium_src/chrome/browser/browser_process.h
  10. 1 1
      chromium_src/chrome/browser/certificate_manager_model.cc
  11. 1 1
      chromium_src/chrome/browser/certificate_manager_model.h
  12. 1 1
      chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h
  13. 10 10
      chromium_src/chrome/browser/media/native_desktop_media_list.cc
  14. 5 5
      chromium_src/chrome/browser/media/native_desktop_media_list.h
  15. 4 4
      chromium_src/chrome/browser/printing/pdf_to_emf_converter.cc
  16. 2 2
      chromium_src/chrome/browser/printing/pdf_to_emf_converter.h
  17. 4 4
      chromium_src/chrome/browser/printing/print_job.cc
  18. 3 3
      chromium_src/chrome/browser/printing/print_job.h
  19. 17 23
      chromium_src/chrome/browser/printing/print_job_worker.cc
  20. 4 4
      chromium_src/chrome/browser/printing/print_job_worker.h
  21. 1 1
      chromium_src/chrome/browser/printing/print_preview_message_handler.cc
  22. 1 1
      chromium_src/chrome/browser/printing/print_view_manager_base.cc
  23. 1 1
      chromium_src/chrome/browser/printing/printer_query.cc
  24. 2 2
      chromium_src/chrome/browser/printing/printer_query.h
  25. 1 1
      chromium_src/chrome/browser/printing/printing_message_filter.cc
  26. 9 9
      chromium_src/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc
  27. 2 2
      chromium_src/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h
  28. 1 1
      chromium_src/chrome/browser/speech/tts_controller.h
  29. 1 1
      chromium_src/chrome/browser/speech/tts_linux.cc
  30. 1 1
      chromium_src/chrome/browser/speech/tts_message_filter.cc
  31. 2 2
      chromium_src/chrome/common/chrome_paths_linux.cc
  32. 2 2
      chromium_src/chrome/common/chrome_paths_mac.mm
  33. 7 7
      chromium_src/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
  34. 2 1
      chromium_src/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h
  35. 2 2
      chromium_src/chrome/renderer/pepper/pepper_flash_renderer_host.cc
  36. 2 2
      chromium_src/chrome/renderer/pepper/pepper_helper.cc
  37. 1 1
      chromium_src/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
  38. 1 1
      chromium_src/chrome/renderer/printing/print_web_view_helper.cc
  39. 4 4
      chromium_src/chrome/renderer/printing/print_web_view_helper.h
  40. 1 1
      chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc
  41. 1 1
      chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm
  42. 1 1
      chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc
  43. 1 1
      chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc
  44. 1 1
      chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h
  45. 2 2
      chromium_src/net/test/embedded_test_server/stream_listen_socket.h
  46. 4 4
      chromium_src/net/test/embedded_test_server/tcp_listen_socket.cc
  47. 1 1
      chromium_src/net/test/embedded_test_server/tcp_listen_socket.h
  48. 1 1
      vendor/brightray

+ 1 - 1
atom/browser/api/atom_api_session.cc

@@ -190,7 +190,7 @@ class ResolveProxyHelper {
 
     // Start the request.
     int result = proxy_service->ResolveProxy(
-        url, net::LOAD_NORMAL, &proxy_info_, completion_callback,
+        url, "GET", net::LOAD_NORMAL, &proxy_info_, completion_callback,
         &pac_req_, nullptr, net::BoundNetLog());
 
     // Completed synchronously.

+ 3 - 2
atom/browser/api/atom_api_web_contents.cc

@@ -261,8 +261,9 @@ WebContents::WebContents(v8::Isolate* isolate,
 
   content::WebContents* web_contents;
   if (is_guest) {
-    content::SiteInstance* site_instance = content::SiteInstance::CreateForURL(
-        session->browser_context(), GURL("chrome-guest://fake-host"));
+    scoped_refptr<content::SiteInstance> site_instance =
+        content::SiteInstance::CreateForURL(
+            session->browser_context(), GURL("chrome-guest://fake-host"));
     content::WebContents::CreateParams params(
         session->browser_context(), site_instance);
     guest_delegate_.reset(new WebViewGuestDelegate);

+ 2 - 1
atom/browser/atom_browser_client.cc

@@ -129,7 +129,8 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
   if (url.SchemeIs(url::kJavaScriptScheme))
     return;
 
-  *new_instance = content::SiteInstance::CreateForURL(browser_context, url);
+  *new_instance =
+      content::SiteInstance::CreateForURL(browser_context, url).get();
 
   // Remember the original renderer process of the pending renderer process.
   auto current_process = current_instance->GetProcess();

+ 1 - 1
atom/browser/atom_javascript_dialog_manager.cc

@@ -26,7 +26,7 @@ void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
     bool is_reload,
     const DialogClosedCallback& callback) {
   // FIXME(zcbenz): the |message_text| is removed, figure out what should we do.
-  callback.Run(true);
+  callback.Run(true, base::ASCIIToUTF16("FIXME"));
 }
 
 }  // namespace atom

+ 5 - 4
atom/browser/login_handler.cc

@@ -37,10 +37,11 @@ LoginHandler::LoginHandler(net::AuthChallengeInfo* auth_info,
       render_frame_id_(0) {
   content::ResourceRequestInfo::ForRequest(request_)->GetAssociatedRenderFrame(
       &render_process_host_id_,  &render_frame_id_);
-  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-                          base::Bind(&Browser::RequestLogin,
-                                     base::Unretained(Browser::Get()),
-                                     make_scoped_refptr(this)));
+  BrowserThread::PostTask(
+      BrowserThread::UI, FROM_HERE,
+      base::Bind(&Browser::RequestLogin,
+                 base::Unretained(Browser::Get()),
+                 base::RetainedRef(make_scoped_refptr(this))));
 }
 
 LoginHandler::~LoginHandler() {

+ 2 - 2
atom/browser/web_contents_permission_helper.cc

@@ -34,8 +34,8 @@ void OnPointerLockResponse(content::WebContents* web_contents, bool allowed) {
 }
 
 void OnPermissionResponse(const base::Callback<void(bool)>& callback,
-                          content::PermissionStatus status) {
-  if (status == content::PermissionStatus::GRANTED)
+                          blink::mojom::PermissionStatus status) {
+  if (status == blink::mojom::PermissionStatus::GRANTED)
     callback.Run(true);
   else
     callback.Run(false);

+ 4 - 3
atom/common/api/event_emitter_caller.cc

@@ -7,7 +7,6 @@
 #include "atom/common/api/locker.h"
 #include "atom/common/node_includes.h"
 #include "base/memory/scoped_ptr.h"
-#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"
 
 namespace mate {
 
@@ -17,9 +16,11 @@ v8::Local<v8::Value> CallEmitWithArgs(v8::Isolate* isolate,
                                       v8::Local<v8::Object> obj,
                                       ValueVector* args) {
   // Perform microtask checkpoint after running JavaScript.
-  std::unique_ptr<blink::WebScopedRunV8Script> script_scope(
+  std::unique_ptr<v8::MicrotasksScope> script_scope(
       Locker::IsBrowserProcess() ?
-      nullptr : new blink::WebScopedRunV8Script);
+          nullptr :
+          new v8::MicrotasksScope(isolate,
+                                  v8::MicrotasksScope::kRunMicrotasks));
   // Use node::MakeCallback to call the callback, and it will also run pending
   // tasks in Node.js.
   return node::MakeCallback(

+ 4 - 3
atom/common/node_bindings.cc

@@ -21,7 +21,6 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/content_paths.h"
 #include "native_mate/dictionary.h"
-#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"
 
 using content::BrowserThread;
 
@@ -226,8 +225,10 @@ void NodeBindings::UvRunOnce() {
   v8::Context::Scope context_scope(env->context());
 
   // Perform microtask checkpoint after running JavaScript.
-  std::unique_ptr<blink::WebScopedRunV8Script> script_scope(
-      is_browser_ ? nullptr : new blink::WebScopedRunV8Script);
+  std::unique_ptr<v8::MicrotasksScope> script_scope(is_browser_ ?
+      nullptr :
+      new v8::MicrotasksScope(env->isolate(),
+                              v8::MicrotasksScope::kRunMicrotasks));
 
   // Deal with uv events.
   int r = uv_run(uv_loop_, UV_RUN_NOWAIT);

+ 1 - 1
chromium_src/chrome/browser/browser_process.h

@@ -31,7 +31,7 @@ class BrowserProcess {
   printing::PrintJobManager* print_job_manager();
 
  private:
-  scoped_ptr<printing::PrintJobManager> print_job_manager_;
+  std::unique_ptr<printing::PrintJobManager> print_job_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserProcess);
 };

+ 1 - 1
chromium_src/chrome/browser/certificate_manager_model.cc

@@ -138,7 +138,7 @@ void CertificateManagerModel::DidGetCertDBOnUIThread(
     const CreationCallback& callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
-  scoped_ptr<CertificateManagerModel> model(new CertificateManagerModel(
+  std::unique_ptr<CertificateManagerModel> model(new CertificateManagerModel(
       cert_db, is_user_db_available));
   callback.Run(std::move(model));
 }

+ 1 - 1
chromium_src/chrome/browser/certificate_manager_model.h

@@ -24,7 +24,7 @@ class ResourceContext;
 // manager dialog, and processes changes from the view.
 class CertificateManagerModel {
  public:
-  typedef base::Callback<void(scoped_ptr<CertificateManagerModel>)>
+  typedef base::Callback<void(std::unique_ptr<CertificateManagerModel>)>
       CreationCallback;
 
   // Creates a CertificateManagerModel. The model will be passed to the callback

+ 1 - 1
chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h

@@ -41,7 +41,7 @@ class GlobalShortcutListenerWin : public GlobalShortcutListener {
   typedef std::map<ui::Accelerator, int> HotkeyIdMap;
   HotkeyIdMap hotkey_ids_;
 
-  scoped_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_;
+  std::unique_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_;
 
   DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerWin);
 };

+ 10 - 10
chromium_src/chrome/browser/media/native_desktop_media_list.cc

@@ -39,7 +39,7 @@ uint32_t GetFrameHash(webrtc::DesktopFrame* frame) {
   return base::SuperFastHash(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()),
@@ -86,8 +86,8 @@ class NativeDesktopMediaList::Worker
     : 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 gfx::Size& thumbnail_size,
@@ -102,10 +102,10 @@ class NativeDesktopMediaList::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_;
 
-  scoped_ptr<webrtc::DesktopFrame> current_frame_;
+  std::unique_ptr<webrtc::DesktopFrame> current_frame_;
 
   ImageHashesMap image_hashes_;
 
@@ -114,8 +114,8 @@ class NativeDesktopMediaList::Worker
 
 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 @@ void NativeDesktopMediaList::Worker::OnCaptureCompleted(
 }
 
 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)
     : screen_capturer_(std::move(screen_capturer)),
       window_capturer_(std::move(window_capturer)),
       update_period_(base::TimeDelta::FromMilliseconds(kDefaultUpdatePeriod)),

+ 5 - 5
chromium_src/chrome/browser/media/native_desktop_media_list.h

@@ -25,8 +25,8 @@ class NativeDesktopMediaList : public DesktopMediaList {
   // 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;
 
   // DesktopMediaList interface.
@@ -66,8 +66,8 @@ class NativeDesktopMediaList : public DesktopMediaList {
   void OnRefreshFinished();
 
   // Capturers specified in SetCapturers() and passed to the |worker_| later.
-  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_;
 
   // Time interval between mode updates.
   base::TimeDelta update_period_;
@@ -87,7 +87,7 @@ class NativeDesktopMediaList : public DesktopMediaList {
   // 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_;
 
   // Current list of sources.
   std::vector<Source> sources_;

+ 4 - 4
chromium_src/chrome/browser/printing/pdf_to_emf_converter.cc

@@ -48,7 +48,7 @@ class RefCountedTempDir
   DISALLOW_COPY_AND_ASSIGN(RefCountedTempDir);
 };
 
-typedef scoped_ptr<base::File, BrowserThread::DeleteOnFileThread>
+typedef std::unique_ptr<base::File, BrowserThread::DeleteOnFileThread>
     ScopedTempFile;
 
 // Wrapper for Emf to keep only file handle in memory, and load actual data only
@@ -389,7 +389,7 @@ void PdfToEmfUtilityProcessHostClient::OnPageDone(bool success,
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (get_page_callbacks_.empty())
     return OnFailed();
-  scoped_ptr<MetafilePlayer> emf;
+  std::unique_ptr<MetafilePlayer> emf;
   GetPageCallbackData& data = get_page_callbacks_.front();
   if (success)
     emf.reset(new LazyEmf(temp_dir_, data.emf().Pass()));
@@ -487,8 +487,8 @@ PdfToEmfConverter::~PdfToEmfConverter() {
 }
 
 // static
-scoped_ptr<PdfToEmfConverter> PdfToEmfConverter::CreateDefault() {
-  return scoped_ptr<PdfToEmfConverter>(new PdfToEmfConverterImpl());
+std::unique_ptr<PdfToEmfConverter> PdfToEmfConverter::CreateDefault() {
+  return std::unique_ptr<PdfToEmfConverter>(new PdfToEmfConverterImpl());
 }
 
 }  // namespace printing

+ 2 - 2
chromium_src/chrome/browser/printing/pdf_to_emf_converter.h

@@ -23,11 +23,11 @@ class PdfToEmfConverter {
   typedef base::Callback<void(int page_count)> StartCallback;
   typedef base::Callback<void(int page_number,
                               float scale_factor,
-                              scoped_ptr<MetafilePlayer> emf)> GetPageCallback;
+                              std::unique_ptr<MetafilePlayer> emf)> GetPageCallback;
 
   virtual ~PdfToEmfConverter();
 
-  static scoped_ptr<PdfToEmfConverter> CreateDefault();
+  static std::unique_ptr<PdfToEmfConverter> CreateDefault();
 
   // Starts conversion of PDF provided as |data|. Calls |start_callback|
   // with positive |page_count|. |page_count| is 0 if initialization failed.

+ 4 - 4
chromium_src/chrome/browser/printing/print_job.cc

@@ -133,7 +133,7 @@ void PrintJob::StartPrinting() {
                                make_scoped_refptr(this),
                                base::Bind(&PrintJobWorker::StartPrinting,
                                           base::Unretained(worker_.get()),
-                                          document_)));
+                                          base::RetainedRef(document_))));
   // Set the flag right now.
   is_job_pending_ = true;
 
@@ -267,7 +267,7 @@ class PrintJob::PdfToEmfState {
   int pages_in_progress_;
   gfx::Size page_size_;
   gfx::Rect content_area_;
-  scoped_ptr<PdfToEmfConverter> converter_;
+  std::unique_ptr<PdfToEmfConverter> converter_;
 };
 
 void PrintJob::StartPdfToEmfConversion(
@@ -296,7 +296,7 @@ void PrintJob::OnPdfToEmfStarted(int page_count) {
 
 void PrintJob::OnPdfToEmfPageConverted(int page_number,
                                        float scale_factor,
-                                       scoped_ptr<MetafilePlayer> emf) {
+                                       std::unique_ptr<MetafilePlayer> emf) {
   DCHECK(ptd_to_emf_state_);
   if (!document_.get() || !emf) {
     ptd_to_emf_state_.reset();
@@ -335,7 +335,7 @@ void PrintJob::UpdatePrintedDocument(PrintedDocument* new_document) {
                                  make_scoped_refptr(this),
                                  base::Bind(&PrintJobWorker::OnDocumentChanged,
                                             base::Unretained(worker_.get()),
-                                            document_)));
+                                            base::RetainedRef(document_))));
   }
 }
 

+ 3 - 3
chromium_src/chrome/browser/printing/print_job.h

@@ -98,7 +98,7 @@ class PrintJob : public PrintJobWorkerOwner,
   void OnPdfToEmfStarted(int page_count);
   void OnPdfToEmfPageConverted(int page_number,
                                float scale_factor,
-                               scoped_ptr<MetafilePlayer> emf);
+                               std::unique_ptr<MetafilePlayer> emf);
 
 #endif  // OS_WIN
 
@@ -134,7 +134,7 @@ class PrintJob : public PrintJobWorkerOwner,
   // All the UI is done in a worker thread because many Win32 print functions
   // are blocking and enters a message loop without your consent. There is one
   // worker thread per print job.
-  scoped_ptr<PrintJobWorker> worker_;
+  std::unique_ptr<PrintJobWorker> worker_;
 
   // Cache of the print context settings for access in the UI thread.
   PrintSettings settings_;
@@ -151,7 +151,7 @@ class PrintJob : public PrintJobWorkerOwner,
 
 #if defined(OS_WIN)
   class PdfToEmfState;
-  scoped_ptr<PdfToEmfState> ptd_to_emf_state_;
+  std::unique_ptr<PdfToEmfState> ptd_to_emf_state_;
 #endif  // OS_WIN
 
   // Used at shutdown so that we can quit a nested message loop.

+ 17 - 23
chromium_src/chrome/browser/printing/print_job_worker.cc

@@ -146,7 +146,7 @@ void PrintJobWorker::GetSettings(
 }
 
 void PrintJobWorker::SetSettings(
-    scoped_ptr<base::DictionaryValue> new_settings) {
+    std::unique_ptr<base::DictionaryValue> new_settings) {
   DCHECK(task_runner_->RunsTasksOnCurrentThread());
 
   BrowserThread::PostTask(
@@ -160,7 +160,7 @@ void PrintJobWorker::SetSettings(
 }
 
 void PrintJobWorker::UpdatePrintSettings(
-    scoped_ptr<base::DictionaryValue> new_settings) {
+    std::unique_ptr<base::DictionaryValue> new_settings) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   PrintingContext::Result result =
       printing_context_->UpdatePrintSettings(*new_settings);
@@ -338,11 +338,9 @@ void PrintJobWorker::OnDocumentDone() {
   }
 
   owner_->PostTask(FROM_HERE,
-                   base::Bind(&NotificationCallback,
-                              make_scoped_refptr(owner_),
+                   base::Bind(&NotificationCallback, base::RetainedRef(owner_),
                               JobEventDetails::DOC_DONE,
-                              document_,
-                              scoped_refptr<PrintedPage>()));
+                              base::RetainedRef(document_), nullptr));
 
   // Makes sure the variables are reinitialized.
   document_ = NULL;
@@ -354,11 +352,9 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
 
   // Signal everyone that the page is about to be printed.
   owner_->PostTask(FROM_HERE,
-                   base::Bind(&NotificationCallback,
-                              make_scoped_refptr(owner_),
-                              JobEventDetails::NEW_PAGE,
-                              document_,
-                              make_scoped_refptr(page)));
+                   base::Bind(&NotificationCallback, base::RetainedRef(owner_),
+                              JobEventDetails::NEW_PAGE, base::RetainedRef(document_),
+                              base::RetainedRef(page)));
 
   // Preprocess.
   if (printing_context_->NewPage() != PrintingContext::OK) {
@@ -380,12 +376,11 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
   }
 
   // Signal everyone that the page is printed.
-  owner_->PostTask(FROM_HERE,
-                   base::Bind(&NotificationCallback,
-                              make_scoped_refptr(owner_),
-                              JobEventDetails::PAGE_DONE,
-                              document_,
-                              make_scoped_refptr(page)));
+  owner_->PostTask(
+      FROM_HERE,
+      base::Bind(&NotificationCallback, base::RetainedRef(owner_),
+                 JobEventDetails::PAGE_DONE, base::RetainedRef(document_),
+                 base::RetainedRef(page)));
 }
 
 void PrintJobWorker::OnFailure() {
@@ -394,12 +389,11 @@ void PrintJobWorker::OnFailure() {
   // We may loose our last reference by broadcasting the FAILED event.
   scoped_refptr<PrintJobWorkerOwner> handle(owner_);
 
-  owner_->PostTask(FROM_HERE,
-                   base::Bind(&NotificationCallback,
-                              make_scoped_refptr(owner_),
-                              JobEventDetails::FAILED,
-                              document_,
-                              scoped_refptr<PrintedPage>()));
+  owner_->PostTask(
+      FROM_HERE,
+      base::Bind(&NotificationCallback, base::RetainedRef(owner_),
+                 JobEventDetails::FAILED,
+                 base::RetainedRef(document_), nullptr));
   Cancel();
 
   // Makes sure the variables are reinitialized.

+ 4 - 4
chromium_src/chrome/browser/printing/print_job_worker.h

@@ -48,7 +48,7 @@ class PrintJobWorker {
       MarginType margin_type);
 
   // Set the new print settings.
-  void SetSettings(scoped_ptr<base::DictionaryValue> new_settings);
+  void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings);
 
   // Starts the printing loop. Every pages are printed as soon as the data is
   // available. Makes sure the new_document is the right one.
@@ -116,7 +116,7 @@ class PrintJobWorker {
   void GetSettingsWithUIDone(PrintingContext::Result result);
 
   // Called on the UI thread to update the print settings.
-  void UpdatePrintSettings(scoped_ptr<base::DictionaryValue> new_settings);
+  void UpdatePrintSettings(std::unique_ptr<base::DictionaryValue> new_settings);
 
   // Reports settings back to owner_.
   void GetSettingsDone(PrintingContext::Result result);
@@ -127,10 +127,10 @@ class PrintJobWorker {
   void UseDefaultSettings();
 
   // Printing context delegate.
-  scoped_ptr<PrintingContext::Delegate> printing_context_delegate_;
+  std::unique_ptr<PrintingContext::Delegate> printing_context_delegate_;
 
   // Information about the printer setting.
-  scoped_ptr<PrintingContext> printing_context_;
+  std::unique_ptr<PrintingContext> printing_context_;
 
   // The printed document. Only has read-only access.
   scoped_refptr<PrintedDocument> document_;

+ 1 - 1
chromium_src/chrome/browser/printing/print_preview_message_handler.cc

@@ -43,7 +43,7 @@ void StopWorker(int document_cookie) {
 char* CopyPDFDataOnIOThread(
     const PrintHostMsg_DidPreviewDocument_Params& params) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  scoped_ptr<base::SharedMemory> shared_buf(
+  std::unique_ptr<base::SharedMemory> shared_buf(
       new base::SharedMemory(params.metafile_data_handle, true));
   if (!shared_buf->Map(params.data_size))
     return nullptr;

+ 1 - 1
chromium_src/chrome/browser/printing/print_view_manager_base.cc

@@ -132,7 +132,7 @@ void PrintViewManagerBase::OnDidPrintPage(
     }
   }
 
-  scoped_ptr<PdfMetafileSkia> metafile(new PdfMetafileSkia);
+  std::unique_ptr<PdfMetafileSkia> metafile(new PdfMetafileSkia);
   if (metafile_must_be_valid) {
     if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) {
       NOTREACHED() << "Invalid metafile header";

+ 1 - 1
chromium_src/chrome/browser/printing/printer_query.cc

@@ -85,7 +85,7 @@ void PrinterQuery::GetSettings(
                                margin_type));
 }
 
-void PrinterQuery::SetSettings(scoped_ptr<base::DictionaryValue> new_settings,
+void PrinterQuery::SetSettings(std::unique_ptr<base::DictionaryValue> new_settings,
                                const base::Closure& callback) {
   StartWorker(callback);
 

+ 2 - 2
chromium_src/chrome/browser/printing/printer_query.h

@@ -50,7 +50,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
       const base::Closure& callback);
 
   // Updates the current settings with |new_settings| dictionary values.
-  void SetSettings(scoped_ptr<base::DictionaryValue> new_settings,
+  void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings,
                    const base::Closure& callback);
 
   // Stops the worker thread since the client is done with this object.
@@ -73,7 +73,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
   // All the UI is done in a worker thread because many Win32 print functions
   // are blocking and enters a message loop without your consent. There is one
   // worker thread per print job.
-  scoped_ptr<PrintJobWorker> worker_;
+  std::unique_ptr<PrintJobWorker> worker_;
 
   // Cache of the print context settings for access in the UI thread.
   PrintSettings settings_;

+ 1 - 1
chromium_src/chrome/browser/printing/printing_message_filter.cc

@@ -373,7 +373,7 @@ void PrintingMessageFilter::UpdateFileDescriptor(int render_view_id, int fd) {
 void PrintingMessageFilter::OnUpdatePrintSettings(
     int document_cookie, const base::DictionaryValue& job_settings,
     IPC::Message* reply_msg) {
-  scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
+  std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
 
   scoped_refptr<PrinterQuery> printer_query;
   printer_query = queue_->PopPrinterQuery(document_cookie);

+ 9 - 9
chromium_src/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc

@@ -29,7 +29,7 @@ ChromeBrowserPepperHostFactory::ChromeBrowserPepperHostFactory(
 
 ChromeBrowserPepperHostFactory::~ChromeBrowserPepperHostFactory() {}
 
-scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
+std::unique_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
     ppapi::host::PpapiHost* host,
     PP_Resource resource,
     PP_Instance instance,
@@ -38,7 +38,7 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
 
   // Make sure the plugin is giving us a valid instance for this resource.
   if (!host_->IsValidInstance(instance))
-    return scoped_ptr<ResourceHost>();
+    return std::unique_ptr<ResourceHost>();
 
   // Private interfaces.
   if (host_->GetPpapiHost()->permissions().HasPermission(
@@ -47,7 +47,7 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
       case PpapiHostMsg_Broker_Create::ID: {
         scoped_refptr<ResourceMessageFilter> broker_filter(
             new PepperBrokerMessageFilter(instance, host_));
-        return scoped_ptr<ResourceHost>(new MessageFilterHost(
+        return std::unique_ptr<ResourceHost>(new MessageFilterHost(
             host_->GetPpapiHost(), instance, resource, broker_filter));
       }
     }
@@ -58,16 +58,16 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
           ppapi::PERMISSION_FLASH)) {
     switch (message.type()) {
       case PpapiHostMsg_Flash_Create::ID:
-        return scoped_ptr<ResourceHost>(
+        return std::unique_ptr<ResourceHost>(
             new PepperFlashBrowserHost(host_, instance, resource));
       case PpapiHostMsg_FlashClipboard_Create::ID: {
         scoped_refptr<ResourceMessageFilter> clipboard_filter(
             new PepperFlashClipboardMessageFilter);
-        return scoped_ptr<ResourceHost>(new MessageFilterHost(
+        return std::unique_ptr<ResourceHost>(new MessageFilterHost(
             host_->GetPpapiHost(), instance, resource, clipboard_filter));
       }
       case PpapiHostMsg_FlashDRM_Create::ID:
-        return scoped_ptr<ResourceHost>(
+        return std::unique_ptr<ResourceHost>(
             new chrome::PepperFlashDRMHost(host_, instance, resource));
     }
   }
@@ -82,12 +82,12 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
     PepperIsolatedFileSystemMessageFilter* isolated_fs_filter =
         PepperIsolatedFileSystemMessageFilter::Create(instance, host_);
     if (!isolated_fs_filter)
-      return scoped_ptr<ResourceHost>();
-    return scoped_ptr<ResourceHost>(
+      return std::unique_ptr<ResourceHost>();
+    return std::unique_ptr<ResourceHost>(
         new MessageFilterHost(host, instance, resource, isolated_fs_filter));
   }
 
-  return scoped_ptr<ResourceHost>();
+  return std::unique_ptr<ResourceHost>();
 }
 
 }  // namespace chrome

+ 2 - 2
chromium_src/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h

@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_CHROME_BROWSER_PEPPER_HOST_FACTORY_H_
 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_CHROME_BROWSER_PEPPER_HOST_FACTORY_H_
 
-#include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ppapi/host/host_factory.h"
 
 namespace content {
@@ -20,7 +20,7 @@ class ChromeBrowserPepperHostFactory : public ppapi::host::HostFactory {
   explicit ChromeBrowserPepperHostFactory(content::BrowserPpapiHost* host);
   ~ChromeBrowserPepperHostFactory() override;
 
-  scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
+  std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
       ppapi::host::PpapiHost* host,
       PP_Resource resource,
       PP_Instance instance,

+ 1 - 1
chromium_src/chrome/browser/speech/tts_controller.h

@@ -240,7 +240,7 @@ class Utterance {
 
   // The full options arg passed to tts.speak, which may include fields
   // other than the ones we explicitly parse, below.
-  scoped_ptr<base::Value> options_;
+  std::unique_ptr<base::Value> options_;
 
   // The extension ID of the extension that called speak() and should
   // receive events.

+ 1 - 1
chromium_src/chrome/browser/speech/tts_linux.cc

@@ -81,7 +81,7 @@ class TtsPlatformImplLinux : public TtsPlatformImpl {
 
   // Map a string composed of a voicename and module to the voicename. Used to
   // uniquely identify a voice across all available modules.
-  scoped_ptr<std::map<std::string, SPDChromeVoice> > all_native_voices_;
+  std::unique_ptr<std::map<std::string, SPDChromeVoice> > all_native_voices_;
 
   friend struct base::DefaultSingletonTraits<TtsPlatformImplLinux>;
 

+ 1 - 1
chromium_src/chrome/browser/speech/tts_message_filter.cc

@@ -83,7 +83,7 @@ void TtsMessageFilter::OnInitializeVoiceList() {
 void TtsMessageFilter::OnSpeak(const TtsUtteranceRequest& request) {
   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
 
-  scoped_ptr<Utterance> utterance(new Utterance(browser_context_));
+  std::unique_ptr<Utterance> utterance(new Utterance(browser_context_));
   utterance->set_src_id(request.id);
   utterance->set_text(request.text);
   utterance->set_lang(request.lang);

+ 2 - 2
chromium_src/chrome/common/chrome_paths_linux.cc

@@ -60,7 +60,7 @@ bool GetUserMediaDirectory(const std::string& xdg_name,
 // ~/.config/google-chrome/ for official builds.
 // (This also helps us sidestep issues with other apps grabbing ~/.chromium .)
 bool GetDefaultUserDataDirectory(base::FilePath* result) {
-  scoped_ptr<base::Environment> env(base::Environment::Create());
+  std::unique_ptr<base::Environment> env(base::Environment::Create());
   base::FilePath config_dir(GetXDGDirectory(env.get(),
                                             kXdgConfigHomeEnvVar,
                                             kDotConfigDir));
@@ -85,7 +85,7 @@ void GetUserCacheDirectory(const base::FilePath& profile_dir,
   // Default value in cases where any of the following fails.
   *result = profile_dir;
 
-  scoped_ptr<base::Environment> env(base::Environment::Create());
+  std::unique_ptr<base::Environment> env(base::Environment::Create());
 
   base::FilePath cache_dir;
   if (!PathService::Get(base::DIR_CACHE, &cache_dir))

+ 2 - 2
chromium_src/chrome/common/chrome_paths_mac.mm

@@ -13,7 +13,7 @@
 #include "base/logging.h"
 #import "base/mac/foundation_util.h"
 #import "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/free_deleter.h"
 #include "base/path_service.h"
 #include "chrome/common/chrome_constants.h"
 
@@ -235,7 +235,7 @@ NSBundle* OuterAppBundle() {
 
 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle,
                                           base::FilePath* result) {
-  scoped_ptr<char, base::FreeDeleter>
+  std::unique_ptr<char, base::FreeDeleter>
       product_dir_name(ProductDirNameForBundle(bundle));
   return GetDefaultUserDataDirectoryForProduct(product_dir_name.get(), result);
 }

+ 7 - 7
chromium_src/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc

@@ -24,7 +24,7 @@ ChromeRendererPepperHostFactory::ChromeRendererPepperHostFactory(
 
 ChromeRendererPepperHostFactory::~ChromeRendererPepperHostFactory() {}
 
-scoped_ptr<ResourceHost> ChromeRendererPepperHostFactory::CreateResourceHost(
+std::unique_ptr<ResourceHost> ChromeRendererPepperHostFactory::CreateResourceHost(
     ppapi::host::PpapiHost* host,
     PP_Resource resource,
     PP_Instance instance,
@@ -33,24 +33,24 @@ scoped_ptr<ResourceHost> ChromeRendererPepperHostFactory::CreateResourceHost(
 
   // Make sure the plugin is giving us a valid instance for this resource.
   if (!host_->IsValidInstance(instance))
-    return scoped_ptr<ResourceHost>();
+    return std::unique_ptr<ResourceHost>();
 
   if (host_->GetPpapiHost()->permissions().HasPermission(
           ppapi::PERMISSION_FLASH)) {
     switch (message.type()) {
       case PpapiHostMsg_Flash_Create::ID: {
-        return scoped_ptr<ResourceHost>(
+        return std::unique_ptr<ResourceHost>(
             new PepperFlashRendererHost(host_, instance, resource));
       }
       case PpapiHostMsg_FlashFullscreen_Create::ID: {
-        return scoped_ptr<ResourceHost>(
+        return std::unique_ptr<ResourceHost>(
             new PepperFlashFullscreenHost(host_, instance, resource));
       }
       case PpapiHostMsg_FlashMenu_Create::ID: {
         ppapi::proxy::SerializedFlashMenu serialized_menu;
         if (ppapi::UnpackMessage<PpapiHostMsg_FlashMenu_Create>(
                 message, &serialized_menu)) {
-          return scoped_ptr<ResourceHost>(new PepperFlashMenuHost(
+          return std::unique_ptr<ResourceHost>(new PepperFlashMenuHost(
               host_, instance, resource, serialized_menu));
         }
         break;
@@ -71,7 +71,7 @@ scoped_ptr<ResourceHost> ChromeRendererPepperHostFactory::CreateResourceHost(
         PP_PrivateFontCharset charset;
         if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>(
                 message, &description, &charset)) {
-          return scoped_ptr<ResourceHost>(new PepperFlashFontFileHost(
+          return std::unique_ptr<ResourceHost>(new PepperFlashFontFileHost(
               host_, instance, resource, description, charset));
         }
         break;
@@ -79,5 +79,5 @@ scoped_ptr<ResourceHost> ChromeRendererPepperHostFactory::CreateResourceHost(
     }
   }
 
-  return scoped_ptr<ResourceHost>();
+  return std::unique_ptr<ResourceHost>();
 }

+ 2 - 1
chromium_src/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h

@@ -5,6 +5,7 @@
 #ifndef CHROME_RENDERER_PEPPER_CHROME_RENDERER_PEPPER_HOST_FACTORY_H_
 #define CHROME_RENDERER_PEPPER_CHROME_RENDERER_PEPPER_HOST_FACTORY_H_
 
+#include "base/macros.h"
 #include "ppapi/host/host_factory.h"
 
 namespace content {
@@ -17,7 +18,7 @@ class ChromeRendererPepperHostFactory : public ppapi::host::HostFactory {
   ~ChromeRendererPepperHostFactory() override;
 
   // HostFactory.
-  scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
+  std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
       ppapi::host::PpapiHost* host,
       PP_Resource resource,
       PP_Instance instance,

+ 2 - 2
chromium_src/chrome/renderer/pepper/pepper_flash_renderer_host.cc

@@ -205,7 +205,7 @@ int32_t PepperFlashRendererHost::OnDrawGlyphs(
     style |= SkTypeface::kBold;
   if (params.font_desc.italic)
     style |= SkTypeface::kItalic;
-  skia::RefPtr<SkTypeface> typeface = skia::AdoptRef(SkTypeface::CreateFromName(
+  sk_sp<SkTypeface> typeface(SkTypeface::CreateFromName(
       params.font_desc.face.c_str(), static_cast<SkTypeface::Style>(style)));
   if (!typeface)
     return PP_ERROR_FAILED;
@@ -255,7 +255,7 @@ int32_t PepperFlashRendererHost::OnDrawGlyphs(
   paint.setAntiAlias(true);
   paint.setHinting(SkPaint::kFull_Hinting);
   paint.setTextSize(SkIntToScalar(params.font_desc.size));
-  paint.setTypeface(typeface.get());  // Takes a ref and manages lifetime.
+  paint.setTypeface(std::move(typeface));
   if (params.allow_subpixel_aa) {
     paint.setSubpixelText(true);
     paint.setLCDRenderText(true);

+ 2 - 2
chromium_src/chrome/renderer/pepper/pepper_helper.cc

@@ -18,9 +18,9 @@ void PepperHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) {
   // TODO(brettw) figure out how to hook up the host factory. It needs some
   // kind of filter-like system to allow dynamic additions.
   host->GetPpapiHost()->AddHostFactoryFilter(
-      scoped_ptr<ppapi::host::HostFactory>(
+      std::unique_ptr<ppapi::host::HostFactory>(
           new ChromeRendererPepperHostFactory(host)));
   host->GetPpapiHost()->AddInstanceMessageFilter(
-      scoped_ptr<ppapi::host::InstanceMessageFilter>(
+      std::unique_ptr<ppapi::host::InstanceMessageFilter>(
           new PepperSharedMemoryMessageFilter(host)));
 }

+ 1 - 1
chromium_src/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc

@@ -43,7 +43,7 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
     ppapi::proxy::SerializedHandle* plugin_handle) {
   plugin_handle->set_null_shmem();
   *host_handle_id = -1;
-  scoped_ptr<base::SharedMemory> shm(
+  std::unique_ptr<base::SharedMemory> shm(
       content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(size));
   if (!shm.get())
     return;

+ 1 - 1
chromium_src/chrome/renderer/printing/print_web_view_helper.cc

@@ -1169,7 +1169,7 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
   if (buf_size == 0)
     return false;
 
-  scoped_ptr<base::SharedMemory> shared_buf(
+  std::unique_ptr<base::SharedMemory> shared_buf(
       content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(buf_size));
   if (!shared_buf)
     return false;

+ 4 - 4
chromium_src/chrome/renderer/printing/print_web_view_helper.h

@@ -244,10 +244,10 @@ class PrintWebViewHelper
   void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
 
   // WebView used only to print the selection.
-  scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
+  std::unique_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
   bool reset_prep_frame_view_;
 
-  scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_;
+  std::unique_ptr<PrintMsg_PrintPages_Params> print_pages_params_;
   bool is_print_ready_metafile_sent_;
   bool ignore_css_margins_;
 
@@ -343,8 +343,8 @@ class PrintWebViewHelper
     FrameReference source_frame_;
     blink::WebNode source_node_;
 
-    scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
-    scoped_ptr<PdfMetafileSkia> metafile_;
+    std::unique_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
+    std::unique_ptr<PdfMetafileSkia> metafile_;
 
     // Total page count in the renderer.
     int total_page_count_;

+ 1 - 1
chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc

@@ -29,7 +29,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
   PrintMsg_PrintPage_Params page_params;
   page_params.params = print_params;
   page_params.page_number = page_number;
-  scoped_ptr<PdfMetafileSkia> draft_metafile;
+  std::unique_ptr<PdfMetafileSkia> draft_metafile;
   PdfMetafileSkia* initial_render_metafile = print_preview_context_.metafile();
   if (print_preview_context_.IsModifiable() && is_print_ready_metafile_sent_) {
     draft_metafile.reset(new PdfMetafileSkia);

+ 1 - 1
chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm

@@ -54,7 +54,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
     int page_number,
     const PrintMsg_Print_Params& print_params) {
   PrintMsg_Print_Params printParams = print_params;
-  scoped_ptr<PdfMetafileSkia> draft_metafile;
+  std::unique_ptr<PdfMetafileSkia> draft_metafile;
   PdfMetafileSkia* initial_render_metafile = print_preview_context_.metafile();
 
   bool render_to_draft = print_preview_context_.IsModifiable() &&

+ 1 - 1
chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc

@@ -27,7 +27,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
   PrintMsg_PrintPage_Params page_params;
   page_params.params = print_params;
   page_params.page_number = page_number;
-  scoped_ptr<PdfMetafileSkia> draft_metafile;
+  std::unique_ptr<PdfMetafileSkia> draft_metafile;
   PdfMetafileSkia* initial_render_metafile = print_preview_context_.metafile();
   if (print_preview_context_.IsModifiable() && is_print_ready_metafile_sent_) {
     draft_metafile.reset(new PdfMetafileSkia);

+ 1 - 1
chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc

@@ -322,7 +322,7 @@ bool SpellcheckWordIterator::Initialize(
   if (rule.empty())
     return false;
 
-  scoped_ptr<base::i18n::BreakIterator> iterator(
+  std::unique_ptr<base::i18n::BreakIterator> iterator(
       new base::i18n::BreakIterator(base::string16(), rule));
   if (!iterator->Init()) {
     // Since we're not passing in any text, the only reason this could fail

+ 1 - 1
chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h

@@ -167,7 +167,7 @@ class SpellcheckWordIterator {
   const SpellcheckCharAttribute* attribute_;
 
   // The break iterator.
-  scoped_ptr<base::i18n::BreakIterator> iterator_;
+  std::unique_ptr<base::i18n::BreakIterator> iterator_;
 
   DISALLOW_COPY_AND_ASSIGN(SpellcheckWordIterator);
 };

+ 2 - 2
chromium_src/net/test/embedded_test_server/stream_listen_socket.h

@@ -58,7 +58,7 @@ class StreamListenSocket :
     // |server| is the original listening Socket, connection is the new
     // Socket that was created.
     virtual void DidAccept(StreamListenSocket* server,
-                           scoped_ptr<StreamListenSocket> connection) = 0;
+                           std::unique_ptr<StreamListenSocket> connection) = 0;
     virtual void DidRead(StreamListenSocket* connection,
                          const char* data,
                          int len) = 0;
@@ -140,7 +140,7 @@ class StreamListenSocketFactory {
   virtual ~StreamListenSocketFactory() {}
 
   // Returns a new instance of StreamListenSocket or NULL if an error occurred.
-  virtual scoped_ptr<StreamListenSocket> CreateAndListen(
+  virtual std::unique_ptr<StreamListenSocket> CreateAndListen(
       StreamListenSocket::Delegate* delegate) const = 0;
 };
 

+ 4 - 4
chromium_src/net/test/embedded_test_server/tcp_listen_socket.cc

@@ -33,14 +33,14 @@ namespace net {
 namespace test_server {
 
 // static
-scoped_ptr<TCPListenSocket> TCPListenSocket::CreateAndListen(
+std::unique_ptr<TCPListenSocket> TCPListenSocket::CreateAndListen(
     const string& ip,
     uint16_t port,
     StreamListenSocket::Delegate* del) {
   SocketDescriptor s = CreateAndBind(ip, port);
   if (s == kInvalidSocket)
-    return scoped_ptr<TCPListenSocket>();
-  scoped_ptr<TCPListenSocket> sock(new TCPListenSocket(s, del));
+    return std::unique_ptr<TCPListenSocket>();
+  std::unique_ptr<TCPListenSocket> sock(new TCPListenSocket(s, del));
   sock->Listen();
   return sock;
 }
@@ -108,7 +108,7 @@ void TCPListenSocket::Accept() {
   SocketDescriptor conn = AcceptSocket();
   if (conn == kInvalidSocket)
     return;
-  scoped_ptr<TCPListenSocket> sock(new TCPListenSocket(conn, socket_delegate_));
+  std::unique_ptr<TCPListenSocket> sock(new TCPListenSocket(conn, socket_delegate_));
 #if defined(OS_POSIX)
   sock->WatchSocket(WAITING_READ);
 #endif

+ 1 - 1
chromium_src/net/test/embedded_test_server/tcp_listen_socket.h

@@ -23,7 +23,7 @@ class TCPListenSocket : public StreamListenSocket {
 
   // Listen on port for the specified IP address.  Use 127.0.0.1 to only
   // accept local connections.
-  static scoped_ptr<TCPListenSocket> CreateAndListen(
+  static std::unique_ptr<TCPListenSocket> CreateAndListen(
       const std::string& ip,
       uint16_t port,
       StreamListenSocket::Delegate* del);

+ 1 - 1
vendor/brightray

@@ -1 +1 @@
-Subproject commit 3f18ef50c26a6cea42845292abe076fb627f5ef1
+Subproject commit 2f3fbc1594aae7a44498897c0d790f42b2a31e0a