summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 21:49:53 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 21:49:53 +0000
commit3a79b3cc8393d54d72c8c7e14615fe64d86fd039 (patch)
tree2730ef27672c8f9c9e1b6ef3f443434ac98bfd4f /chrome/browser/importer
parent1c9e90e17741f9c34f4cbe7f3e68a8300ed24e08 (diff)
downloadchromium_src-3a79b3cc8393d54d72c8c7e14615fe64d86fd039.zip
chromium_src-3a79b3cc8393d54d72c8c7e14615fe64d86fd039.tar.gz
chromium_src-3a79b3cc8393d54d72c8c7e14615fe64d86fd039.tar.bz2
Port DictionaryValue to use string16 instead of wstring.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10818 Review URL: http://codereview.chromium.org/31014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r--chrome/browser/importer/importer.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index 2d3f924..306dcf6 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -658,25 +658,24 @@ void ImporterHost::DetectFirefoxProfiles() {
std::wstring source_path;
for (int i = 0; ; ++i) {
- std::wstring current_profile = L"Profile" + IntToWString(i);
+ string16 current_profile = ASCIIToUTF16("Profile") + IntToString16(i);
if (!root.HasKey(current_profile)) {
// Profiles are continuously numbered. So we exit when we can't
// find the i-th one.
break;
}
- std::wstring is_relative, path, profile_path;
- if (root.GetString(current_profile + L".IsRelative", &is_relative) &&
- root.GetString(current_profile + L".Path", &path)) {
- string16 path16 = WideToUTF16Hack(path);
+ string16 is_relative, path, profile_path;
+ if (root.GetString(current_profile + ASCIIToUTF16(".IsRelative"),
+ &is_relative) &&
+ root.GetString(current_profile + ASCIIToUTF16(".Path"), &path)) {
ReplaceSubstringsAfterOffset(
- &path16, 0, ASCIIToUTF16("/"), ASCIIToUTF16("\\"));
- path.assign(UTF16ToWideHack(path16));
+ &path, 0, ASCIIToUTF16("/"), ASCIIToUTF16("\\"));
#if defined(OS_WIN)
// IsRelative=1 means the folder path would be relative to the
// path of profiles.ini. IsRelative=0 refers to a custom profile
// location.
- if (is_relative == L"1") {
+ if (is_relative == ASCIIToUTF16("1")) {
profile_path = file_util::GetDirectoryFromPath(ini_file);
file_util::AppendToPath(&profile_path, path);
} else {
@@ -687,12 +686,13 @@ void ImporterHost::DetectFirefoxProfiles() {
// We only import the default profile when multiple profiles exist,
// since the other profiles are used mostly by developers for testing.
// Otherwise, Profile0 will be imported.
- std::wstring is_default;
- if ((root.GetString(current_profile + L".Default", &is_default) &&
- is_default == L"1") || i == 0) {
- source_path = profile_path;
+ string16 is_default;
+ if ((root.GetString(current_profile + ASCIIToUTF16(".Default"),
+ &is_default) &&
+ is_default == ASCIIToUTF16("1")) || i == 0) {
+ source_path = UTF16ToWideHack(profile_path);
// We break out of the loop when we have found the default profile.
- if (is_default == L"1")
+ if (is_default == ASCIIToUTF16("1"))
break;
}
}