summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r--chrome/browser/profiles/profile.h8
-rw-r--r--chrome/browser/profiles/profile_impl.h2
-rw-r--r--chrome/browser/profiles/profile_manager.cc4
-rw-r--r--chrome/browser/profiles/profile_manager_browsertest.cc3
-rw-r--r--chrome/browser/profiles/profile_metrics.h1
5 files changed, 13 insertions, 5 deletions
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 5ba08c5..41b7c3d 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -95,12 +95,16 @@ class Profile : public content::BrowserContext {
};
enum CreateStatus {
- // Profile services were not created.
- CREATE_STATUS_FAIL,
+ // Profile services were not created due to a local error (e.g., disk full).
+ CREATE_STATUS_LOCAL_FAIL,
+ // Profile services were not created due to a remote error (e.g., network
+ // down during limited-user registration).
+ CREATE_STATUS_REMOTE_FAIL,
// Profile created but before initializing extensions and promo resources.
CREATE_STATUS_CREATED,
// Profile is created, extensions and promo resources are initialized.
CREATE_STATUS_INITIALIZED,
+ MAX_CREATE_STATUS // For histogram display.
};
enum CreateMode {
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h
index 6f4f415..4ac54a5 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -87,6 +87,8 @@ class ProfileImpl : public Profile {
// Profile implementation:
virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() OVERRIDE;
+ // Note that this implementation returns the Google-services username, if any,
+ // not the Chrome user's display name.
virtual std::string GetProfileName() OVERRIDE;
virtual bool IsOffTheRecord() const OVERRIDE;
virtual Profile* GetOffTheRecordProfile() OVERRIDE;
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 19f2279..4f5b1e8 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -501,7 +501,7 @@ void ProfileManager::CreateProfileAsync(
if (std::find(ProfilesToDelete().begin(), ProfilesToDelete().end(),
profile_path) != ProfilesToDelete().end()) {
if (!callback.is_null())
- callback.Run(NULL, Profile::CREATE_STATUS_FAIL);
+ callback.Run(NULL, Profile::CREATE_STATUS_LOCAL_FAIL);
return;
}
@@ -885,7 +885,7 @@ void ProfileManager::OnProfileCreated(Profile* profile,
// Invoke INITIALIZED or FAIL for all profiles.
RunCallbacks(callbacks, profile,
profile ? Profile::CREATE_STATUS_INITIALIZED :
- Profile::CREATE_STATUS_FAIL);
+ Profile::CREATE_STATUS_LOCAL_FAIL);
}
base::FilePath ProfileManager::GenerateNextProfileDirectoryPath() {
diff --git a/chrome/browser/profiles/profile_manager_browsertest.cc b/chrome/browser/profiles/profile_manager_browsertest.cc
index b0a3715..45bbb00 100644
--- a/chrome/browser/profiles/profile_manager_browsertest.cc
+++ b/chrome/browser/profiles/profile_manager_browsertest.cc
@@ -27,7 +27,8 @@ void OnUnblockOnProfileCreation(Profile* profile,
}
void ProfileCreationComplete(Profile* profile, Profile::CreateStatus status) {
- ASSERT_NE(status, Profile::CREATE_STATUS_FAIL);
+ ASSERT_NE(status, Profile::CREATE_STATUS_LOCAL_FAIL);
+ ASSERT_NE(status, Profile::CREATE_STATUS_REMOTE_FAIL);
// No browser should have been created for this profile yet.
EXPECT_EQ(chrome::GetTotalBrowserCountForProfile(profile), 0U);
EXPECT_EQ(chrome::GetTotalBrowserCount(), 1U);
diff --git a/chrome/browser/profiles/profile_metrics.h b/chrome/browser/profiles/profile_metrics.h
index 1e8071f..0c2c244 100644
--- a/chrome/browser/profiles/profile_metrics.h
+++ b/chrome/browser/profiles/profile_metrics.h
@@ -23,6 +23,7 @@ class ProfileMetrics {
enum ProfileAdd {
ADD_NEW_USER_ICON = 0, // User adds new user from icon menu
ADD_NEW_USER_MENU, // User adds new user from menu bar
+ ADD_NEW_USER_DIALOG, // User adds new user from create-profile dialog
NUM_PROFILE_ADD_METRICS
};