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

Unified Diff: extensions/renderer/script_injection.cc

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_injection.h ('k') | extensions/renderer/script_injection_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_injection.cc
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 70464b646c4090e6a217deebd3f6ff75db1c8b30..8933f664d20c16b01cd12ec0d8cc9bace1a7593a 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -115,10 +115,11 @@ void ScriptInjection::RemoveIsolatedWorld(const std::string& host_id) {
g_isolated_worlds.Get().erase(host_id);
}
-ScriptInjection::ScriptInjection(scoped_ptr<ScriptInjector> injector,
- content::RenderFrame* render_frame,
- scoped_ptr<const InjectionHost> injection_host,
- UserScript::RunLocation run_location)
+ScriptInjection::ScriptInjection(
+ std::unique_ptr<ScriptInjector> injector,
+ content::RenderFrame* render_frame,
+ std::unique_ptr<const InjectionHost> injection_host,
+ UserScript::RunLocation run_location)
: injector_(std::move(injector)),
render_frame_(render_frame),
injection_host_(std::move(injection_host)),
@@ -246,7 +247,7 @@ void ScriptInjection::InjectJs() {
web_frame);
bool is_user_gesture = injector_->IsUserGesture();
- scoped_ptr<blink::WebScriptExecutionCallback> callback(
+ std::unique_ptr<blink::WebScriptExecutionCallback> callback(
new ScriptInjectionCallback(
base::Bind(&ScriptInjection::OnJsInjectionCompleted,
weak_ptr_factory_.GetWeakPtr())));
@@ -283,7 +284,7 @@ void ScriptInjection::OnJsInjectionCompleted(
if (expects_results) {
if (!results.isEmpty() && !results[0].IsEmpty()) {
// Right now, we only support returning single results (per frame).
- scoped_ptr<content::V8ValueConverter> v8_converter(
+ std::unique_ptr<content::V8ValueConverter> v8_converter(
content::V8ValueConverter::create());
// It's safe to always use the main world context when converting
// here. V8ValueConverterImpl shouldn't actually care about the
« no previous file with comments | « extensions/renderer/script_injection.h ('k') | extensions/renderer/script_injection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698