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

Unified Diff: chrome/browser/ui/webui/uber/uber_ui.cc

Issue 20071002: hoover up some CreateStringValues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/ntp/app_launcher_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/uber/uber_ui.cc
diff --git a/chrome/browser/ui/webui/uber/uber_ui.cc b/chrome/browser/ui/webui/uber/uber_ui.cc
index 2c68102033ff5277c2596cb033bed93209673989..a55842d66b65cf3c1f1fe72e0899342b8c409416 100644
--- a/chrome/browser/ui/webui/uber/uber_ui.cc
+++ b/chrome/browser/ui/webui/uber/uber_ui.cc
@@ -210,14 +210,12 @@ void UberFrameUI::Observe(int type, const content::NotificationSource& source,
case chrome::NOTIFICATION_EXTENSION_LOADED:
case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
Profile* profile = Profile::FromWebUI(web_ui());
- bool overridesHistory = HasExtensionType(profile,
- chrome::kChromeUIHistoryHost);
- scoped_ptr<Value> controlsValue(
- Value::CreateStringValue(chrome::kChromeUIHistoryHost));
- scoped_ptr<Value> overrideValue(
- Value::CreateStringValue(overridesHistory ? "yes" : "no"));
+ bool overrides_history =
+ HasExtensionType(profile, chrome::kChromeUIHistoryHost);
web_ui()->CallJavascriptFunction(
- "uber_frame.setNavigationOverride", *controlsValue, *overrideValue);
+ "uber_frame.setNavigationOverride",
+ base::StringValue(chrome::kChromeUIHistoryHost),
+ base::StringValue(overrides_history ? "yes" : "no"));
break;
}
default:
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698