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/profile_manager.h | |
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/profile_manager.h')
-rw-r--r-- | chrome/browser/profile_manager.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/profile_manager.h b/chrome/browser/profile_manager.h index 3735492..ba8581d 100644 --- a/chrome/browser/profile_manager.h +++ b/chrome/browser/profile_manager.h @@ -15,6 +15,7 @@ #include "base/file_path.h" #include "base/message_loop.h" #include "base/non_thread_safe.h" +#include "base/string_util.h" #include "base/system_monitor.h" #include "base/values.h" #include "chrome/browser/profile.h" @@ -33,20 +34,21 @@ class AvailableProfile { // Decodes a DictionaryValue into an AvailableProfile static AvailableProfile* FromValue(DictionaryValue* value) { DCHECK(value); - std::wstring name, id; + string16 name, id; FilePath::StringType directory; - value->GetString(L"name", &name); - value->GetString(L"id", &id); - value->GetString(L"directory", &directory); - return new AvailableProfile(name, id, FilePath(directory)); + value->GetString(LIT16("name"), &name); + value->GetString(LIT16("id"), &id); + value->GetString(LIT16("directory"), &directory); + return new AvailableProfile(UTF16ToWideHack(name), UTF16ToWideHack(id), + FilePath(directory)); } // Encodes this AvailableProfile into a new DictionaryValue DictionaryValue* ToValue() { DictionaryValue* value = new DictionaryValue; - value->SetString(L"name", name_); - value->SetString(L"id", id_); - value->SetString(L"directory", directory_.value()); + value->SetString(LIT16("name"), WideToUTF16Hack(name_)); + value->SetString(LIT16("id"), WideToUTF16Hack(id_)); + value->SetString(LIT16("directory"), directory_.value()); return value; } @@ -183,4 +185,3 @@ class ProfileManager : public NonThreadSafe, }; #endif // CHROME_BROWSER_PROFILE_MANAGER_H__ - |