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

Side by Side Diff: extensions/renderer/programmatic_script_injector.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/renderer/programmatic_script_injector.h" 5 #include "extensions/renderer/programmatic_script_injector.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 return std::vector<std::string>(1, params_->code); 112 return std::vector<std::string>(1, params_->code);
113 } 113 }
114 114
115 void ProgrammaticScriptInjector::GetRunInfo( 115 void ProgrammaticScriptInjector::GetRunInfo(
116 ScriptsRunInfo* scripts_run_info, 116 ScriptsRunInfo* scripts_run_info,
117 UserScript::RunLocation run_location) const { 117 UserScript::RunLocation run_location) const {
118 } 118 }
119 119
120 void ProgrammaticScriptInjector::OnInjectionComplete( 120 void ProgrammaticScriptInjector::OnInjectionComplete(
121 scoped_ptr<base::Value> execution_result, 121 std::unique_ptr<base::Value> execution_result,
122 UserScript::RunLocation run_location, 122 UserScript::RunLocation run_location,
123 content::RenderFrame* render_frame) { 123 content::RenderFrame* render_frame) {
124 DCHECK(results_.empty()); 124 DCHECK(results_.empty());
125 if (execution_result) 125 if (execution_result)
126 results_.Append(std::move(execution_result)); 126 results_.Append(std::move(execution_result));
127 Finish(std::string(), render_frame); 127 Finish(std::string(), render_frame);
128 } 128 }
129 129
130 void ProgrammaticScriptInjector::OnWillNotInject( 130 void ProgrammaticScriptInjector::OnWillNotInject(
131 InjectFailureReason reason, 131 InjectFailureReason reason,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // frame deletions so nothing is left hanging). 176 // frame deletions so nothing is left hanging).
177 if (render_frame) { 177 if (render_frame) {
178 render_frame->Send( 178 render_frame->Send(
179 new ExtensionHostMsg_ExecuteCodeFinished( 179 new ExtensionHostMsg_ExecuteCodeFinished(
180 render_frame->GetRoutingID(), params_->request_id, 180 render_frame->GetRoutingID(), params_->request_id,
181 error, url_, results_)); 181 error, url_, results_));
182 } 182 }
183 } 183 }
184 184
185 } // namespace extensions 185 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/programmatic_script_injector.h ('k') | extensions/renderer/runtime_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698