Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: chrome/browser/profiles/profile_info_cache.cc

Issue 171523004: Stop using the old-style profile names when using --new-profile-management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved new tests behind no-android/no-cros ifdef Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_cache.cc
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 6713d21f73f22c86397160cc5aa791f840dcc8d4..0ae399f5310c4395719e44bcea6adb0de3df6d3d 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/profile_management_switches.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
@@ -765,7 +766,10 @@ base::string16 ProfileInfoCache::ChooseNameForNewProfile(
size_t icon_index) const {
base::string16 name;
for (int name_index = 1; ; ++name_index) {
- if (icon_index < kGenericIconCount) {
+ if (switches::IsNewProfileManagement()) {
+ name = l10n_util::GetStringFUTF16Int(IDS_NEW_NUMBERED_PROFILE_NAME,
+ name_index);
+ } else if (icon_index < kGenericIconCount) {
name = l10n_util::GetStringFUTF16Int(IDS_NUMBERED_PROFILE_NAME,
name_index);
} else {
@@ -817,6 +821,10 @@ bool ProfileInfoCache::ChooseAvatarIconIndexForNewProfile(
bool allow_generic_icon,
bool must_be_unique,
size_t* out_icon_index) const {
+ // Always allow all icons for new profiles if using the
+ // --new-profile-management flag.
+ if (switches::IsNewProfileManagement())
+ allow_generic_icon = true;
size_t start = allow_generic_icon ? 0 : kGenericIconCount;
size_t end = GetDefaultAvatarIconCount();
size_t count = end - start;
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698