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

Unified Diff: chrome/renderer/searchbox/searchbox_extension.cc

Issue 100823007: Stop doing unnecessary UTF-8 to UTF-16 conversions in JSONWriter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS page encodings Created 7 years 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/policy_ui.cc ('k') | chrome/test/chromedriver/capabilities.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index f34b1024b3e8fccbfdda43207a447343aad41ee8..19bc48bacdd7634675a74773dde33922f9c53275 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -460,8 +460,7 @@ void SearchBoxExtension::DispatchChromeIdentityCheckResult(
blink::WebFrame* frame,
const base::string16& identity,
bool identity_match) {
- std::string escaped_identity;
- base::JsonDoubleQuote(identity, true, &escaped_identity);
+ std::string escaped_identity = base::GetQuotedJSONString(identity);
blink::WebString script(UTF8ToUTF16(base::StringPrintf(
kDispatchChromeIdentityCheckResult,
escaped_identity.c_str(),
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | chrome/test/chromedriver/capabilities.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698