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

Unified Diff: extensions/browser/extension_function_dispatcher.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/browser/extension_function.cc ('k') | extensions/browser/extension_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_function_dispatcher.cc
diff --git a/extensions/browser/extension_function_dispatcher.cc b/extensions/browser/extension_function_dispatcher.cc
index 5978d8e7ed264d45030a1b08f21fd78cbbe3c59b..db94833e53bffd234b2edf74145e91801e6f6e6f 100644
--- a/extensions/browser/extension_function_dispatcher.cc
+++ b/extensions/browser/extension_function_dispatcher.cc
@@ -51,7 +51,7 @@ namespace {
// called. May be called from any thread.
void NotifyApiFunctionCalled(const std::string& extension_id,
const std::string& api_name,
- scoped_ptr<base::ListValue> args,
+ std::unique_ptr<base::ListValue> args,
content::BrowserContext* browser_context) {
// The ApiActivityMonitor can only be accessed from the main (UI) thread. If
// we're running on the wrong thread, re-dispatch from the main thread.
@@ -80,7 +80,7 @@ void NotifyApiFunctionCalled(const std::string& extension_id,
// this once all the extension APIs are updated to the feature system.
struct Static {
Static() : api(ExtensionAPI::CreateWithDefaultConfiguration()) {}
- scoped_ptr<ExtensionAPI> api;
+ std::unique_ptr<ExtensionAPI> api;
};
base::LazyInstance<Static> g_global_io_data = LAZY_INSTANCE_INITIALIZER;
@@ -284,7 +284,7 @@ void ExtensionFunctionDispatcher::DispatchOnIOThread(
&params.arguments,
base::TimeTicks::Now());
if (violation_error.empty()) {
- scoped_ptr<base::ListValue> args(params.arguments.DeepCopy());
+ std::unique_ptr<base::ListValue> args(params.arguments.DeepCopy());
NotifyApiFunctionCalled(extension->id(), params.name, std::move(args),
static_cast<content::BrowserContext*>(profile_id));
UMA_HISTOGRAM_SPARSE_SLOWLY("Extensions.FunctionCalls",
@@ -391,7 +391,7 @@ void ExtensionFunctionDispatcher::DispatchWithCallbackInternal(
base::TimeTicks::Now());
if (violation_error.empty()) {
- scoped_ptr<base::ListValue> args(params.arguments.DeepCopy());
+ std::unique_ptr<base::ListValue> args(params.arguments.DeepCopy());
// See crbug.com/39178.
ExtensionsBrowserClient::Get()->PermitExternalProtocolHandler();
« no previous file with comments | « extensions/browser/extension_function.cc ('k') | extensions/browser/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698