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

Unified Diff: extensions/shell/browser/shell_extensions_browser_client.cc

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 | « extensions/shell/browser/shell_extensions_browser_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/shell_extensions_browser_client.cc
diff --git a/extensions/shell/browser/shell_extensions_browser_client.cc b/extensions/shell/browser/shell_extensions_browser_client.cc
index fd6bfd4c0b2fb4fc56f92b6a52e0211f3e82be70..85204a351857e46cc311dcfec1255424465429df 100644
--- a/extensions/shell/browser/shell_extensions_browser_client.cc
+++ b/extensions/shell/browser/shell_extensions_browser_client.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -145,9 +146,9 @@ ShellExtensionsBrowserClient::GetProcessManagerDelegate() const {
return NULL;
}
-scoped_ptr<ExtensionHostDelegate>
+std::unique_ptr<ExtensionHostDelegate>
ShellExtensionsBrowserClient::CreateExtensionHostDelegate() {
- return scoped_ptr<ExtensionHostDelegate>(new ShellExtensionHostDelegate);
+ return base::WrapUnique(new ShellExtensionHostDelegate);
}
bool ShellExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) {
@@ -192,10 +193,10 @@ void ShellExtensionsBrowserClient::RegisterMojoServices(
RegisterServicesForFrame(render_frame_host, extension);
}
-scoped_ptr<RuntimeAPIDelegate>
+std::unique_ptr<RuntimeAPIDelegate>
ShellExtensionsBrowserClient::CreateRuntimeAPIDelegate(
content::BrowserContext* context) const {
- return scoped_ptr<RuntimeAPIDelegate>(new ShellRuntimeAPIDelegate());
+ return base::WrapUnique(new ShellRuntimeAPIDelegate());
}
const ComponentExtensionResourceManager*
@@ -206,7 +207,7 @@ ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() {
void ShellExtensionsBrowserClient::BroadcastEventToRenderers(
events::HistogramValue histogram_value,
const std::string& event_name,
- scoped_ptr<base::ListValue> args) {
+ std::unique_ptr<base::ListValue> args) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
@@ -216,7 +217,7 @@ void ShellExtensionsBrowserClient::BroadcastEventToRenderers(
return;
}
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(histogram_value, event_name, std::move(args)));
EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event));
}
« no previous file with comments | « extensions/shell/browser/shell_extensions_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698