Index: chrome/browser/profile_manager.h |
=================================================================== |
--- chrome/browser/profile_manager.h (revision 10828) |
+++ chrome/browser/profile_manager.h (working copy) |
@@ -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 @@ |
// 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(ASCIIToUTF16("name"), &name); |
+ value->GetString(ASCIIToUTF16("id"), &id); |
+ value->GetString(ASCIIToUTF16("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(ASCIIToUTF16("name"), WideToUTF16Hack(name_)); |
+ value->SetString(ASCIIToUTF16("id"), WideToUTF16Hack(id_)); |
+ value->SetString(ASCIIToUTF16("directory"), directory_.value()); |
return value; |
} |
@@ -183,4 +185,3 @@ |
}; |
#endif // CHROME_BROWSER_PROFILE_MANAGER_H__ |
- |