diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 20:21:01 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 20:21:01 +0000 |
commit | 32c147158f76e19aa22efa2a7b14d3f0e1e23a02 (patch) | |
tree | a84b94bc6c2e4e52d009db317ed49a343658634c /chrome/browser/page_state.cc | |
parent | 600a41fb05efe99eb2890e884a7af0541456c365 (diff) | |
download | chromium_src-32c147158f76e19aa22efa2a7b14d3f0e1e23a02.zip chromium_src-32c147158f76e19aa22efa2a7b14d3f0e1e23a02.tar.gz chromium_src-32c147158f76e19aa22efa2a7b14d3f0e1e23a02.tar.bz2 |
Port DictionaryValue to use string16 instead of wstring.
Review URL: http://codereview.chromium.org/31014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/page_state.cc')
-rw-r--r-- | chrome/browser/page_state.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/page_state.cc b/chrome/browser/page_state.cc index 827416c..3e013f2 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,11 @@ 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); |