summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-12 09:47:05 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-12 09:47:05 +0000
commitd778d6e82dafff6b141f30a7e741d73672450b6f (patch)
tree6b165d31e724abeeb91df621aa60fb5700697002 /chrome
parent9a0c6f5832bda3ccd4a113e46c812ea5f333dab5 (diff)
downloadchromium_src-d778d6e82dafff6b141f30a7e741d73672450b6f.zip
chromium_src-d778d6e82dafff6b141f30a7e741d73672450b6f.tar.gz
chromium_src-d778d6e82dafff6b141f30a7e741d73672450b6f.tar.bz2
Change kNotSignedInProfile to kInitialProfile to better reflect its usage.
Change ProfileManager::GetCurrentProfile to ProfileManager::GetInitialProfile as well. BUG=none TEST=no change in profile behavior Review URL: http://codereview.chromium.org/7619008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/diagnostics/diagnostics_test.cc4
-rw-r--r--chrome/browser/fast_shutdown_interactive_uitest.cc2
-rw-r--r--chrome/browser/profiles/profile_manager.cc12
-rw-r--r--chrome/browser/profiles/profile_manager.h6
-rw-r--r--chrome/browser/profiles/profile_manager_unittest.cc12
-rw-r--r--chrome/browser/shell_integration_unittest.cc2
-rw-r--r--chrome/browser/shell_integration_win.cc4
-rw-r--r--chrome/common/chrome_constants.cc2
-rw-r--r--chrome/common/chrome_constants.h2
-rw-r--r--chrome/test/ui/ui_test.cc2
10 files changed, 24 insertions, 24 deletions
diff --git a/chrome/browser/diagnostics/diagnostics_test.cc b/chrome/browser/diagnostics/diagnostics_test.cc
index dfdf18f..390b0e2 100644
--- a/chrome/browser/diagnostics/diagnostics_test.cc
+++ b/chrome/browser/diagnostics/diagnostics_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -49,5 +49,5 @@ FilePath DiagnosticTest::GetUserDefaultProfileDir() {
FilePath path;
if (!PathService::Get(chrome::DIR_USER_DATA, &path))
return FilePath();
- return path.AppendASCII(chrome::kNotSignedInProfile);
+ return path.AppendASCII(chrome::kInitialProfile);
}
diff --git a/chrome/browser/fast_shutdown_interactive_uitest.cc b/chrome/browser/fast_shutdown_interactive_uitest.cc
index 53093b6..cb222da 100644
--- a/chrome/browser/fast_shutdown_interactive_uitest.cc
+++ b/chrome/browser/fast_shutdown_interactive_uitest.cc
@@ -53,7 +53,7 @@ static void GetCookie(
const scoped_refptr<base::ThreadTestHelper>& thread_helper) {
scoped_refptr<SQLitePersistentCookieStore> cookie_store(
new SQLitePersistentCookieStore(
- user_data_dir.AppendASCII(chrome::kNotSignedInProfile)
+ user_data_dir.AppendASCII(chrome::kInitialProfile)
.Append(chrome::kCookieFilename)));
HERE(1);
std::vector<net::CookieMonster::CanonicalCookie*> cookies;
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 2bbc0c2..a4a0c1f 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -129,7 +129,7 @@ FilePath ProfileManager::GetDefaultProfileDir(
const FilePath& user_data_dir) {
FilePath default_profile_dir(user_data_dir);
default_profile_dir =
- default_profile_dir.AppendASCII(chrome::kNotSignedInProfile);
+ default_profile_dir.AppendASCII(chrome::kInitialProfile);
return default_profile_dir;
}
@@ -140,7 +140,7 @@ FilePath ProfileManager::GetProfilePrefsPath(
return default_prefs_path;
}
-FilePath ProfileManager::GetCurrentProfileDir() {
+FilePath ProfileManager::GetInitialProfileDir() {
FilePath relative_profile_dir;
#if defined(OS_CHROMEOS)
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -160,7 +160,7 @@ FilePath ProfileManager::GetCurrentProfileDir() {
#endif
// TODO(mirandac): should not automatically be default profile.
relative_profile_dir =
- relative_profile_dir.AppendASCII(chrome::kNotSignedInProfile);
+ relative_profile_dir.AppendASCII(chrome::kInitialProfile);
return relative_profile_dir;
}
@@ -173,7 +173,7 @@ Profile* ProfileManager::GetLastUsedProfile(const FilePath& user_data_dir) {
if (local_state->HasPrefPath(prefs::kProfileLastUsed))
last_profile_used = local_state->GetString(prefs::kProfileLastUsed);
last_used_profile_dir = last_profile_used.empty() ?
- last_used_profile_dir.AppendASCII(chrome::kNotSignedInProfile) :
+ last_used_profile_dir.AppendASCII(chrome::kInitialProfile) :
last_used_profile_dir.AppendASCII(last_profile_used);
return GetProfile(last_used_profile_dir);
}
@@ -192,7 +192,7 @@ void ProfileManager::RegisterProfileName(Profile* profile) {
Profile* ProfileManager::GetDefaultProfile(const FilePath& user_data_dir) {
FilePath default_profile_dir(user_data_dir);
- default_profile_dir = default_profile_dir.Append(GetCurrentProfileDir());
+ default_profile_dir = default_profile_dir.Append(GetInitialProfileDir());
#if defined(OS_CHROMEOS)
if (!logged_in_) {
Profile* profile;
@@ -293,7 +293,7 @@ void ProfileManager::CreateDefaultProfileAsync(
PathService::Get(chrome::DIR_USER_DATA, &default_profile_dir);
// TODO(mirandac): current directory will not always be default in the future
default_profile_dir = default_profile_dir.Append(
- profile_manager->GetCurrentProfileDir());
+ profile_manager->GetInitialProfileDir());
profile_manager->CreateProfileAsync(default_profile_dir,
observer);
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h
index 73bf74e..6d0ce41 100644
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -98,9 +98,9 @@ class ProfileManager : public base::NonThreadSafe,
// profile.
bool IsValidProfile(Profile* profile);
- // Returns the directory where the currently active profile is
- // stored, relative to the user data directory currently in use..
- FilePath GetCurrentProfileDir();
+ // Returns the directory where the first created profile is stored,
+ // relative to the user data directory currently in use..
+ FilePath GetInitialProfileDir();
// Get the Profile last used with this Chrome build. If no signed profile has
// been stored in Local State, hand back the Default profile.
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 9f80951..ab0073a 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -105,9 +105,9 @@ TEST_F(ProfileManagerTest, DefaultProfileDir) {
cl->AppendSwitch(switches::kTestType);
FilePath expected_default =
- FilePath().AppendASCII(chrome::kNotSignedInProfile);
+ FilePath().AppendASCII(chrome::kInitialProfile);
EXPECT_EQ(expected_default.value(),
- profile_manager_->GetCurrentProfileDir().value());
+ profile_manager_->GetInitialProfileDir().value());
}
#if defined(OS_CHROMEOS)
@@ -120,18 +120,18 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) {
cl->AppendSwitch(switches::kTestType);
FilePath expected_default =
- FilePath().AppendASCII(chrome::kNotSignedInProfile);
+ FilePath().AppendASCII(chrome::kInitialProfile);
EXPECT_EQ(expected_default.value(),
- profile_manager_->GetCurrentProfileDir().value());
+ profile_manager_->GetInitialProfileDir().value());
profile_manager_->Observe(chrome::NOTIFICATION_LOGIN_USER_CHANGED,
NotificationService::AllSources(),
NotificationService::NoDetails());
FilePath expected_logged_in(profile_dir);
EXPECT_EQ(expected_logged_in.value(),
- profile_manager_->GetCurrentProfileDir().value());
+ profile_manager_->GetInitialProfileDir().value());
VLOG(1) << temp_dir_.path().Append(
- profile_manager_->GetCurrentProfileDir()).value();
+ profile_manager_->GetInitialProfileDir()).value();
}
#endif
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc
index 7b450bb..f5c41cb 100644
--- a/chrome/browser/shell_integration_unittest.cc
+++ b/chrome/browser/shell_integration_unittest.cc
@@ -342,7 +342,7 @@ TEST(ShellIntegrationTest, GetChromiumAppIdTest) {
FilePath default_user_data_dir;
chrome::GetDefaultUserDataDirectory(&default_user_data_dir);
FilePath default_profile_path =
- default_user_data_dir.AppendASCII(chrome::kNotSignedInProfile);
+ default_user_data_dir.AppendASCII(chrome::kInitialProfile);
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 15da0cc..56fa562 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -50,7 +50,7 @@ std::wstring GetProfileIdFromPath(const FilePath& profile_path) {
if (chrome::GetDefaultUserDataDirectory(&default_user_data_dir) &&
profile_path.DirName() == default_user_data_dir &&
profile_path.BaseName().value() ==
- ASCIIToUTF16(chrome::kNotSignedInProfile)) {
+ ASCIIToUTF16(chrome::kInitialProfile)) {
return std::wstring();
}
@@ -223,7 +223,7 @@ bool MigrateChromiumShortcutsTask::GetExpectedAppId(
if (command_line.HasSwitch(switches::kUserDataDir)) {
profile_path =
command_line.GetSwitchValuePath(switches::kUserDataDir).AppendASCII(
- chrome::kNotSignedInProfile);
+ chrome::kInitialProfile);
}
std::wstring app_name;
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index c8a60ad..42bc248 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -111,7 +111,7 @@ const wchar_t kStatusTrayWindowClass[] = L"Chrome_StatusTrayWindow";
const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow";
const wchar_t kCrashReportLog[] = L"Reported Crashes.txt";
const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll";
-const char kNotSignedInProfile[] = "Default";
+const char kInitialProfile[] = "Default";
const char kMultiProfileDirPrefix[] = "profile_";
const wchar_t kBrowserResourcesDll[] = L"chrome.dll";
const FilePath::CharType kExtensionFileExtension[] = FPL(".crx");
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h
index de208c8..4e89208 100644
--- a/chrome/common/chrome_constants.h
+++ b/chrome/common/chrome_constants.h
@@ -34,7 +34,7 @@ extern const wchar_t kStatusTrayWindowClass[];
extern const wchar_t kMessageWindowClass[];
extern const wchar_t kCrashReportLog[];
extern const wchar_t kTestingInterfaceDLL[];
-extern const char kNotSignedInProfile[];
+extern const char kInitialProfile[];
extern const char kMultiProfileDirPrefix[];
extern const char kStatsFilename[];
extern const wchar_t kBrowserResourcesDll[];
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 60d6f3f..d02eb70 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -572,7 +572,7 @@ DictionaryValue* UITest::GetLocalState() {
DictionaryValue* UITest::GetDefaultProfilePreferences() {
FilePath path;
PathService::Get(chrome::DIR_USER_DATA, &path);
- path = path.AppendASCII(chrome::kNotSignedInProfile);
+ path = path.AppendASCII(chrome::kInitialProfile);
return LoadDictionaryValueFromPath(path.Append(chrome::kPreferencesFilename));
}