diff options
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__ - |