summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main.cc4
-rw-r--r--chrome/browser/browser_process_impl.cc2
-rw-r--r--chrome/browser/download/download_manager.cc4
-rw-r--r--chrome/browser/download/save_package.cc4
-rw-r--r--chrome/browser/metrics/metrics_service_uitest.cc4
-rw-r--r--chrome/browser/profile.cc2
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc7
7 files changed, 13 insertions, 14 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index fc4513c..28d52b5 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -293,8 +293,8 @@ int BrowserMain(const MainFunctionParams& parameters) {
// inherit and reset the user's setting.
if (!local_state_file_exists &&
parsed_command_line.HasSwitch(switches::kParentProfile)) {
- std::wstring parent_profile =
- parsed_command_line.GetSwitchValue(switches::kParentProfile);
+ FilePath parent_profile = FilePath::FromWStringHack(
+ parsed_command_line.GetSwitchValue(switches::kParentProfile));
PrefService parent_local_state(parent_profile);
parent_local_state.RegisterStringPref(prefs::kApplicationLocale,
std::wstring());
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index c272d75..4afa27b 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -339,7 +339,7 @@ void BrowserProcessImpl::CreateLocalState() {
DCHECK(!created_local_state_ && local_state_.get() == NULL);
created_local_state_ = true;
- std::wstring local_state_path;
+ FilePath local_state_path;
PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
local_state_.reset(new PrefService(local_state_path));
}
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index f46cac5..50f2910 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -302,8 +302,8 @@ void DownloadManager::RegisterUserPrefs(PrefService* prefs) {
&default_download_path)) {
NOTREACHED();
}
- prefs->RegisterStringPref(prefs::kDownloadDefaultDirectory,
- default_download_path.ToWStringHack());
+ prefs->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
+ default_download_path);
// If the download path is dangerous we forcefully reset it. But if we do
// so we set a flag to make sure we only do it once, to avoid fighting
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 6af6c05..9f01bd8 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -966,8 +966,8 @@ FilePath SavePackage::GetSuggestNameForSaveAs(PrefService* prefs,
if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
&default_save_path))
NOTREACHED();
- prefs->RegisterStringPref(prefs::kSaveFileDefaultDirectory,
- default_save_path.ToWStringHack());
+ prefs->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
+ default_save_path);
}
// Get the directory from preference.
diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc
index e782128..b8dde62 100644
--- a/chrome/browser/metrics/metrics_service_uitest.cc
+++ b/chrome/browser/metrics/metrics_service_uitest.cc
@@ -47,8 +47,8 @@ class MetricsServiceTest : public UITest {
// that was saved by the app as it closed. The caller takes ownership of the
// returned PrefService object.
PrefService* GetLocalState() {
- std::wstring local_state_path = user_data_dir();
- file_util::AppendToPath(&local_state_path, chrome::kLocalStateFilename);
+ FilePath local_state_path = FilePath::FromWStringHack(user_data_dir())
+ .Append(chrome::kLocalStateFilename);
PrefService* local_state(new PrefService(local_state_path));
return local_state;
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 710949f..979c263 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -542,7 +542,7 @@ SSLHostState* ProfileImpl::GetSSLHostState() {
PrefService* ProfileImpl::GetPrefs() {
if (!prefs_.get()) {
- prefs_.reset(new PrefService(GetPrefFilePath().ToWStringHack()));
+ prefs_.reset(new PrefService(GetPrefFilePath()));
// The Profile class and ProfileManager class may read some prefs so
// register known prefs as soon as possible.
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 9e595af0..a25c589 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -42,11 +42,10 @@ class WebContentsTestingProfile : public TestingProfile {
virtual PrefService* GetPrefs() {
if (!prefs_.get()) {
- std::wstring source_path;
+ FilePath source_path;
PathService::Get(chrome::DIR_TEST_DATA, &source_path);
- file_util::AppendToPath(&source_path, L"profiles");
- file_util::AppendToPath(&source_path, L"chrome_prefs");
- file_util::AppendToPath(&source_path, L"Preferences");
+ source_path = source_path.AppendASCII("profiles")
+ .AppendASCII("chrome_prefs").AppendASCII("Preferences");
prefs_.reset(new PrefService(source_path));
Profile::RegisterUserPrefs(prefs_.get());