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

Unified Diff: chrome/browser/page_state.cc

Issue 31014: Port DictionaryValue to use string16 instead of wstring. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/metrics/metrics_service.cc ('k') | chrome/browser/profile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_state.cc
===================================================================
--- chrome/browser/page_state.cc (revision 10828)
+++ chrome/browser/page_state.cc (working copy)
@@ -28,7 +28,7 @@
// We know that the query string is UTF-8 since it's an internal URL.
std::wstring value = UTF8ToWide(
UnescapeURLComponent(escaped, UnescapeRule::REPLACE_PLUS_WITH_SPACE));
- state_->Set(UTF8ToWide(query_string.substr(keyComp.begin, keyComp.len)),
+ state_->Set(UTF8ToUTF16(query_string.substr(keyComp.begin, keyComp.len)),
new StringValue(value));
}
}
@@ -59,10 +59,12 @@
void PageState::SetProperty(const std::wstring& key,
const std::wstring& value) {
- state_->Set(key, new StringValue(value));
+ state_->Set(WideToUTF16Hack(key), new StringValue(value));
}
-bool PageState::GetProperty(const std::wstring& key, std::wstring* value) const {
+bool PageState::GetProperty(const std::wstring& wkey,
+ std::wstring* value) const {
+ string16 key(WideToUTF16(wkey));
if (state_->HasKey(key)) {
Value* v;
state_->Get(key, &v);
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698