summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/profiles')
-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
3 files changed, 15 insertions, 15 deletions
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