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

Unified Diff: chrome/browser/dom_ui/dom_ui.cc

Issue 3033050: Rename DictionaryValue's SetStringFromUTF16() to SetString() (and overload). (Closed)
Patch Set: There shouldn't be wstrings in platform-ind. code. Created 10 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/bookmarks/bookmark_codec.cc ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/dom_ui.cc
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 82dcb4bdbc7adbf4d9e5e70c25cdfe40999f58c0..f3000f39cd543582a33f4924a03a373957222ee4 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -117,13 +117,12 @@ DOMMessageHandler* DOMMessageHandler::Attach(DOMUI* dom_ui) {
void DOMMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
string16 title,
const GURL& gurl) {
- string16 url16 = UTF8ToUTF16(gurl.spec());
- dictionary->SetStringFromUTF16(L"url", url16);
+ dictionary->SetString("url", gurl.spec());
bool using_url_as_the_title = false;
if (title.empty()) {
using_url_as_the_title = true;
- title = url16;
+ title = UTF8ToUTF16(gurl.spec());
}
// Since the title can contain BiDi text, we need to mark the text as either
@@ -140,7 +139,7 @@ void DOMMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
DCHECK(success ? (title != title_to_set) : (title == title_to_set));
}
}
- dictionary->SetStringFromUTF16(L"title", title_to_set);
+ dictionary->SetString("title", title_to_set);
}
bool DOMMessageHandler::ExtractIntegerValue(const Value* value, int* out_int) {
« no previous file with comments | « chrome/browser/bookmarks/bookmark_codec.cc ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698