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

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

Issue 18615010: Refactor utility methods out of the ProfileManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unbreak rebase and added new static fn from trunk Created 7 years, 5 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/browser/prefs/browser_prefs.cc ('k') | chrome/browser/profiles/avatar_menu_model_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu_model.cc
diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
index 4a86e7f85acb2e873a37e1d0d0f2a8548a054049..55e2b89489d401327091d033111cb1e82fa2edde 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -18,6 +18,8 @@
#include "chrome/browser/profiles/profile_info_util.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_metrics.h"
+#include "chrome/browser/profiles/profile_window.h"
+#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
@@ -51,7 +53,7 @@ void OnProfileCreated(bool always_create,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (status == Profile::CREATE_STATUS_INITIALIZED) {
- ProfileManager::FindOrCreateNewWindowForProfile(
+ profiles::FindOrCreateNewWindowForProfile(
profile,
chrome::startup::IS_NOT_PROCESS_STARTUP,
chrome::startup::IS_NOT_FIRST_RUN,
@@ -140,7 +142,7 @@ AvatarMenuModel::Item::~Item() {
}
void AvatarMenuModel::SwitchToProfile(size_t index, bool always_create) {
- DCHECK(ProfileManager::IsMultipleProfilesEnabled() ||
+ DCHECK(profiles::IsMultipleProfilesEnabled() ||
index == GetActiveProfileIndex());
const Item& item = GetItemAt(index);
base::FilePath path =
@@ -281,11 +283,11 @@ bool AvatarMenuModel::ShouldShowAvatarMenu() {
if (base::FieldTrialList::FindFullName(kShowProfileSwitcherFieldTrialName) ==
kAlwaysShowSwitcherGroupName) {
// We should only be in this group when multi-profiles is enabled.
- DCHECK(ProfileManager::IsMultipleProfilesEnabled());
+ DCHECK(profiles::IsMultipleProfilesEnabled());
return true;
}
- if (ProfileManager::IsMultipleProfilesEnabled()) {
- return ProfileManager::IsNewProfileManagementEnabled() ||
+ if (profiles::IsMultipleProfilesEnabled()) {
+ return profiles::IsNewProfileManagementEnabled() ||
(g_browser_process->profile_manager() &&
g_browser_process->profile_manager()->GetNumberOfProfiles() > 1);
}
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/profiles/avatar_menu_model_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698