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

Unified Diff: chrome/renderer/extensions/app_window_custom_bindings.cc

Issue 372103006: Stamp out CreateStringValue in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « chrome/browser/ui/webui/version_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/app_window_custom_bindings.cc
diff --git a/chrome/renderer/extensions/app_window_custom_bindings.cc b/chrome/renderer/extensions/app_window_custom_bindings.cc
index d9df7b469008646cad78a229bb12a05c3baaafc2..53cef266f1ca4b931b0da74a870befa3c43f169d 100644
--- a/chrome/renderer/extensions/app_window_custom_bindings.cc
+++ b/chrome/renderer/extensions/app_window_custom_bindings.cc
@@ -117,12 +117,13 @@ void AppWindowCustomBindings::GetWindowControlsHtmlTemplate(
v8::Handle<v8::Value> result = v8::String::Empty(args.GetIsolate());
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableAppWindowControls)) {
- base::Value* value = base::Value::CreateStringValue(
Evan Stade 2014/07/08 01:22:33 this was leaking
- ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_WINDOW_CONTROLS_TEMPLATE_HTML).as_string());
+ base::StringValue value(
+ ResourceBundle::GetSharedInstance()
+ .GetRawDataResource(IDR_WINDOW_CONTROLS_TEMPLATE_HTML)
+ .as_string());
scoped_ptr<content::V8ValueConverter> converter(
content::V8ValueConverter::create());
- result = converter->ToV8Value(value, context()->v8_context());
+ result = converter->ToV8Value(&value, context()->v8_context());
}
args.GetReturnValue().Set(result);
}
« no previous file with comments | « chrome/browser/ui/webui/version_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698