| 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;
|
|
|