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

Unified Diff: extensions/renderer/script_injection.h

Issue 1899083003: Convert //extensions/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/renderer/script_context.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_injection.h
diff --git a/extensions/renderer/script_injection.h b/extensions/renderer/script_injection.h
index 6b3679573c377a4fa433be33249360bae3f134cb..a7a44b6272148dac7aa064e0807d1ca20a452f63 100644
--- a/extensions/renderer/script_injection.h
+++ b/extensions/renderer/script_injection.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/weak_ptr.h"
#include "extensions/common/user_script.h"
#include "extensions/renderer/injection_host.h"
@@ -51,9 +52,9 @@ class ScriptInjection {
// Remove the isolated world associated with the given injection host.
static void RemoveIsolatedWorld(const std::string& host_id);
- ScriptInjection(scoped_ptr<ScriptInjector> injector,
+ ScriptInjection(std::unique_ptr<ScriptInjector> injector,
content::RenderFrame* render_frame,
- scoped_ptr<const InjectionHost> injection_host,
+ std::unique_ptr<const InjectionHost> injection_host,
UserScript::RunLocation run_location);
~ScriptInjection();
@@ -109,13 +110,13 @@ class ScriptInjection {
void NotifyWillNotInject(ScriptInjector::InjectFailureReason reason);
// The injector for this injection.
- scoped_ptr<ScriptInjector> injector_;
+ std::unique_ptr<ScriptInjector> injector_;
// The RenderFrame into which this should inject the script.
content::RenderFrame* render_frame_;
// The associated injection host.
- scoped_ptr<const InjectionHost> injection_host_;
+ std::unique_ptr<const InjectionHost> injection_host_;
// The location in the document load at which we inject the script.
UserScript::RunLocation run_location_;
@@ -132,13 +133,13 @@ class ScriptInjection {
bool did_inject_js_;
// Results storage.
- scoped_ptr<base::Value> execution_result_;
+ std::unique_ptr<base::Value> execution_result_;
// The callback to run upon completing asynchronously.
CompletionCallback async_completion_callback_;
// A helper class to hold the render frame and watch for its deletion.
- scoped_ptr<FrameWatcher> frame_watcher_;
+ std::unique_ptr<FrameWatcher> frame_watcher_;
base::WeakPtrFactory<ScriptInjection> weak_ptr_factory_;
« no previous file with comments | « extensions/renderer/script_context.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698