diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 19:40:48 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 19:40:48 +0000 |
commit | 162b5998f0e5caa333d9f348207b7f5a649f8eac (patch) | |
tree | 7dfa4be96d7f361e6185c1430f49b919afc08805 /chrome/browser | |
parent | e36fd81da9e64f3c373cdf45d195d6d402d4b2c0 (diff) | |
download | chromium_src-162b5998f0e5caa333d9f348207b7f5a649f8eac.zip chromium_src-162b5998f0e5caa333d9f348207b7f5a649f8eac.tar.gz chromium_src-162b5998f0e5caa333d9f348207b7f5a649f8eac.tar.bz2 |
wstring: remove a needless wchar_t that is ASCII
While I'm at it, remove kNotSignedInID. This was added in 2007 (!)
and appears to be unused.
BUG=76112
Review URL: http://codereview.chromium.org/6695004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/diagnostics/diagnostics_test.cc | 2 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_manager.cc | 8 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_manager_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/shell_integration_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/shell_integration_win.cc | 6 |
5 files changed, 12 insertions, 10 deletions
diff --git a/chrome/browser/diagnostics/diagnostics_test.cc b/chrome/browser/diagnostics/diagnostics_test.cc index cd36c92..dfdf18f 100644 --- a/chrome/browser/diagnostics/diagnostics_test.cc +++ b/chrome/browser/diagnostics/diagnostics_test.cc @@ -49,5 +49,5 @@ FilePath DiagnosticTest::GetUserDefaultProfileDir() { FilePath path; if (!PathService::Get(chrome::DIR_USER_DATA, &path)) return FilePath(); - return path.Append(FilePath::FromWStringHack(chrome::kNotSignedInProfile)); + return path.AppendASCII(chrome::kNotSignedInProfile); } diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index e81b0e5..743fafb 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -73,8 +73,8 @@ ProfileManager::~ProfileManager() { FilePath ProfileManager::GetDefaultProfileDir( const FilePath& user_data_dir) { FilePath default_profile_dir(user_data_dir); - default_profile_dir = default_profile_dir.Append( - FilePath::FromWStringHack(chrome::kNotSignedInProfile)); + default_profile_dir = + default_profile_dir.AppendASCII(chrome::kNotSignedInProfile); return default_profile_dir; } @@ -103,8 +103,8 @@ FilePath ProfileManager::GetCurrentProfileDir() { return relative_profile_dir; } #endif - relative_profile_dir = relative_profile_dir.Append( - FilePath::FromWStringHack(chrome::kNotSignedInProfile)); + relative_profile_dir = + relative_profile_dir.AppendASCII(chrome::kNotSignedInProfile); return relative_profile_dir; } diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index 81c99bb..42cd9c2 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc @@ -84,7 +84,7 @@ TEST_F(ProfileManagerTest, DefaultProfileDir) { cl->AppendSwitch(switches::kTestType); FilePath expected_default = - FilePath::FromWStringHack(chrome::kNotSignedInProfile); + FilePath().AppendASCII(chrome::kNotSignedInProfile); EXPECT_EQ(expected_default.value(), profile_manager.GetCurrentProfileDir().value()); } @@ -101,7 +101,7 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) { cl->AppendSwitch(switches::kTestType); FilePath expected_default = - FilePath::FromWStringHack(chrome::kNotSignedInProfile); + FilePath().AppendASCII(chrome::kNotSignedInProfile); EXPECT_EQ(expected_default.value(), profile_manager.GetCurrentProfileDir().value()); diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index 1a6b9795..fa56fc5 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -307,7 +307,7 @@ TEST(ShellIntegrationTest, GetChromiumAppIdTest) { FilePath default_user_data_dir; chrome::GetDefaultUserDataDirectory(&default_user_data_dir); FilePath default_profile_path = - default_user_data_dir.Append(chrome::kNotSignedInProfile); + default_user_data_dir.AppendASCII(chrome::kNotSignedInProfile); EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), ShellIntegration::GetChromiumAppId(default_profile_path)); diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc index ddfa8dd..0b9c32e 100644 --- a/chrome/browser/shell_integration_win.cc +++ b/chrome/browser/shell_integration_win.cc @@ -48,8 +48,10 @@ std::wstring GetProfileIdFromPath(const FilePath& profile_path) { // dir and is the default profile. if (chrome::GetDefaultUserDataDirectory(&default_user_data_dir) && profile_path.DirName() == default_user_data_dir && - profile_path.BaseName().value() == chrome::kNotSignedInProfile) + profile_path.BaseName().value() == + ASCIIToUTF16(chrome::kNotSignedInProfile)) { return std::wstring(); + } // Get joined basenames of user data dir and profile. std::wstring basenames = profile_path.DirName().BaseName().value() + @@ -219,7 +221,7 @@ bool MigrateChromiumShortcutsTask::GetExpectedAppId( FilePath profile_path; if (command_line.HasSwitch(switches::kUserDataDir)) { profile_path = - command_line.GetSwitchValuePath(switches::kUserDataDir).Append( + command_line.GetSwitchValuePath(switches::kUserDataDir).AppendASCII( chrome::kNotSignedInProfile); } |