diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-16 07:13:53 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-16 07:13:53 +0000 |
commit | dc9a67601b9d8c952bf399f0309519273f82bfd5 (patch) | |
tree | b618c9da1cef3fa99718897cf523cb8768d4a273 /chrome/browser/first_run | |
parent | a6dbaac4225f2fa5a170bdc657ab306390fdc439 (diff) | |
download | chromium_src-dc9a67601b9d8c952bf399f0309519273f82bfd5.zip chromium_src-dc9a67601b9d8c952bf399f0309519273f82bfd5.tar.gz chromium_src-dc9a67601b9d8c952bf399f0309519273f82bfd5.tar.bz2 |
Remove deprecated wstring Get(As)String() methods from Value, etc.
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3117017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r-- | chrome/browser/first_run/first_run_gtk.cc | 7 | ||||
-rw-r--r-- | chrome/browser/first_run/first_run_win.cc | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/first_run/first_run_gtk.cc b/chrome/browser/first_run/first_run_gtk.cc index 725cdd0..0f6e7db 100644 --- a/chrome/browser/first_run/first_run_gtk.cc +++ b/chrome/browser/first_run/first_run_gtk.cc @@ -9,7 +9,9 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/process_util.h" +#include "base/string_piece.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/gtk/first_run_dialog.h" #include "chrome/browser/profile_manager.h" @@ -103,14 +105,15 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, if (!FirstRun::CreateSentinel()) return false; - std::wstring import_bookmarks_path; + std::string import_bookmarks_path; installer_util::GetDistroStringPreference(prefs.get(), installer_util::master_preferences::kDistroImportBookmarksFromFilePref, &import_bookmarks_path); if (!import_bookmarks_path.empty()) { // There are bookmarks to import from a file. - FilePath path = FilePath::FromWStringHack(import_bookmarks_path); + FilePath path = FilePath::FromWStringHack( + UTF8ToWide(import_bookmarks_path)); if (!FirstRun::ImportBookmarks(path)) { LOG(WARNING) << "silent bookmark import failed"; } diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc index 6cfc233..57a15c2 100644 --- a/chrome/browser/first_run/first_run_win.cc +++ b/chrome/browser/first_run/first_run_win.cc @@ -391,7 +391,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, value) FirstRun::SetShowWelcomePagePref(); - std::wstring import_bookmarks_path; + std::string import_bookmarks_path; installer_util::GetDistroStringPreference(prefs.get(), installer_util::master_preferences::kDistroImportBookmarksFromFilePref, &import_bookmarks_path); @@ -401,8 +401,9 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, // the importer process and blocks until done or until it fails. scoped_refptr<ImporterHost> importer_host = new ImporterHost(); if (!FirstRun::ImportSettings(NULL, - importer_host->GetSourceProfileInfoAt(0).browser_type, - import_items, FilePath(import_bookmarks_path), true, NULL)) { + importer_host->GetSourceProfileInfoAt(0).browser_type, import_items, + FilePath::FromWStringHack(UTF8ToWide(import_bookmarks_path)), + true, NULL)) { LOG(WARNING) << "silent import failed"; } } |