diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 22:59:43 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 22:59:43 +0000 |
commit | 8e50b600ed1e65789109022709cf5c349748fb4c (patch) | |
tree | d9d57344003604647e1a96a56ef4d21921ec44c0 /chrome/browser/importer | |
parent | 0c8a8f7aa683ae7d6c8ba176c1db704cc294defb (diff) | |
download | chromium_src-8e50b600ed1e65789109022709cf5c349748fb4c.zip chromium_src-8e50b600ed1e65789109022709cf5c349748fb4c.tar.gz chromium_src-8e50b600ed1e65789109022709cf5c349748fb4c.tar.bz2 |
revert broken change 10833
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/importer.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc index 306dcf6..2d3f924 100644 --- a/chrome/browser/importer/importer.cc +++ b/chrome/browser/importer/importer.cc @@ -658,24 +658,25 @@ void ImporterHost::DetectFirefoxProfiles() { std::wstring source_path; for (int i = 0; ; ++i) { - string16 current_profile = ASCIIToUTF16("Profile") + IntToString16(i); + std::wstring current_profile = L"Profile" + IntToWString(i); if (!root.HasKey(current_profile)) { // Profiles are continuously numbered. So we exit when we can't // find the i-th one. break; } - string16 is_relative, path, profile_path; - if (root.GetString(current_profile + ASCIIToUTF16(".IsRelative"), - &is_relative) && - root.GetString(current_profile + ASCIIToUTF16(".Path"), &path)) { + 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); ReplaceSubstringsAfterOffset( - &path, 0, ASCIIToUTF16("/"), ASCIIToUTF16("\\")); + &path16, 0, ASCIIToUTF16("/"), ASCIIToUTF16("\\")); + path.assign(UTF16ToWideHack(path16)); #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 == ASCIIToUTF16("1")) { + if (is_relative == L"1") { profile_path = file_util::GetDirectoryFromPath(ini_file); file_util::AppendToPath(&profile_path, path); } else { @@ -686,13 +687,12 @@ 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. - string16 is_default; - if ((root.GetString(current_profile + ASCIIToUTF16(".Default"), - &is_default) && - is_default == ASCIIToUTF16("1")) || i == 0) { - source_path = UTF16ToWideHack(profile_path); + std::wstring is_default; + if ((root.GetString(current_profile + L".Default", &is_default) && + is_default == L"1") || i == 0) { + source_path = profile_path; // We break out of the loop when we have found the default profile. - if (is_default == ASCIIToUTF16("1")) + if (is_default == L"1") break; } } |