Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: headless/lib/browser/headless_browser_impl.cc

Issue 1854043002: convert //headless to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/lib/browser/headless_browser_impl.h ('k') | headless/lib/browser/headless_browser_main_parts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_browser_impl.cc
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
index 90730bbb3a78a52dd1a3a87d574eb22a6dee37af..77f463d8caa04484e52b22f22375fbad7943bfed 100644
--- a/headless/lib/browser/headless_browser_impl.cc
+++ b/headless/lib/browser/headless_browser_impl.cc
@@ -4,6 +4,7 @@
#include "headless/lib/browser/headless_browser_impl.h"
+#include "base/memory/ptr_util.h"
#include "base/thread_task_runner_handle.h"
#include "content/public/app/content_main.h"
#include "content/public/browser/browser_thread.h"
@@ -29,10 +30,10 @@ HeadlessBrowserImpl::HeadlessBrowserImpl(
HeadlessBrowserImpl::~HeadlessBrowserImpl() {}
-scoped_ptr<HeadlessWebContents> HeadlessBrowserImpl::CreateWebContents(
+std::unique_ptr<HeadlessWebContents> HeadlessBrowserImpl::CreateWebContents(
const gfx::Size& size) {
DCHECK(BrowserMainThread()->BelongsToCurrentThread());
- return make_scoped_ptr(new HeadlessWebContentsImpl(
+ return base::WrapUnique(new HeadlessWebContentsImpl(
browser_context(), window_tree_host_->window(), size));
}
@@ -83,7 +84,7 @@ void HeadlessBrowserImpl::SetOptionsForTesting(
int HeadlessBrowserMain(
const HeadlessBrowser::Options& options,
const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback) {
- scoped_ptr<HeadlessBrowserImpl> browser(
+ std::unique_ptr<HeadlessBrowserImpl> browser(
new HeadlessBrowserImpl(on_browser_start_callback, options));
// TODO(skyostil): Implement custom message pumps.
« no previous file with comments | « headless/lib/browser/headless_browser_impl.h ('k') | headless/lib/browser/headless_browser_main_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698