summaryrefslogtreecommitdiffstats
path: root/chrome/browser/page_state.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/page_state.cc')
-rw-r--r--chrome/browser/page_state.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/page_state.cc b/chrome/browser/page_state.cc
index 827416c..c970bbe 100644
--- a/chrome/browser/page_state.cc
+++ b/chrome/browser/page_state.cc
@@ -28,7 +28,7 @@ void PageState::InitWithURL(const GURL& url) {
// 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::GetByteRepresentation(std::string* out) const {
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);