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

Unified Diff: extensions/renderer/programmatic_script_injector.cc

Issue 2250263004: [Extensions] Reduce string copy in renderer/ UserScript. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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/programmatic_script_injector.h ('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/programmatic_script_injector.cc
diff --git a/extensions/renderer/programmatic_script_injector.cc b/extensions/renderer/programmatic_script_injector.cc
index e52885eee742fe261107ff1040b6628d9e532a83..9cd4f9f3a37bb7ee05e8284ac84d278fdd191b64 100644
--- a/extensions/renderer/programmatic_script_injector.cc
+++ b/extensions/renderer/programmatic_script_injector.cc
@@ -104,12 +104,13 @@ std::vector<blink::WebScriptSource> ProgrammaticScriptInjector::GetJsSources(
blink::WebString::fromUTF8(params_->code), params_->file_url));
}
-std::vector<std::string> ProgrammaticScriptInjector::GetCssSources(
+std::vector<blink::WebString> ProgrammaticScriptInjector::GetCssSources(
UserScript::RunLocation run_location) const {
DCHECK_EQ(GetRunLocation(), run_location);
DCHECK(!params_->is_javascript);
- return std::vector<std::string>(1, params_->code);
+ return std::vector<blink::WebString>(
+ 1, blink::WebString::fromUTF8(params_->code));
}
void ProgrammaticScriptInjector::GetRunInfo(
« no previous file with comments | « extensions/renderer/programmatic_script_injector.h ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698