Index: chrome/browser/ui/app_list/app_list_view_delegate.cc |
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
index 8719b25f1946bda11069e1a482f4bc32ef3b4183..ac9bac4f097920eb7d6a20a97b0facb68d9d165e 100644 |
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc |
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
@@ -30,7 +30,6 @@ |
#include "chrome/browser/web_applications/web_app.h" |
#include "chrome/common/extensions/extension_constants.h" |
#include "chrome/common/url_constants.h" |
-#include "components/signin/core/browser/signin_manager.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/page_navigator.h" |
#include "content/public/browser/user_metrics.h" |
@@ -91,7 +90,6 @@ void PopulateUsers(const ProfileInfoCache& profile_info, |
user.name = profile_info.GetNameOfProfileAtIndex(i); |
user.email = profile_info.GetUserNameOfProfileAtIndex(i); |
user.profile_path = profile_info.GetPathOfProfileAtIndex(i); |
- user.signin_required = profile_info.ProfileIsSigninRequiredAtIndex(i); |
user.active = active_profile_path == user.profile_path; |
users->push_back(user); |
} |
@@ -101,27 +99,10 @@ void PopulateUsers(const ProfileInfoCache& profile_info, |
AppListViewDelegate::AppListViewDelegate(Profile* profile, |
AppListControllerDelegate* controller) |
- : controller_(controller), |
- profile_(profile), |
- model_(NULL), |
- scoped_observer_(this) { |
+ : controller_(controller), profile_(profile), model_(NULL) { |
CHECK(controller_); |
- SigninManagerFactory::GetInstance()->AddObserver(this); |
- // Start observing all already-created SigninManagers. |
ProfileManager* profile_manager = g_browser_process->profile_manager(); |
- std::vector<Profile*> profiles = profile_manager->GetLoadedProfiles(); |
- for (std::vector<Profile*>::iterator i = profiles.begin(); |
- i != profiles.end(); |
- ++i) { |
- SigninManagerBase* manager = |
- SigninManagerFactory::GetForProfileIfExists(*i); |
- if (manager) { |
- DCHECK(!scoped_observer_.IsObserving(manager)); |
- scoped_observer_.Add(manager); |
- } |
- } |
- |
profile_manager->GetProfileInfoCache().AddObserver(this); |
app_list::StartPageService* service = |
@@ -148,10 +129,6 @@ AppListViewDelegate::~AppListViewDelegate() { |
g_browser_process-> |
profile_manager()->GetProfileInfoCache().RemoveObserver(this); |
- SigninManagerFactory* factory = SigninManagerFactory::GetInstance(); |
- if (factory) |
- factory->RemoveObserver(this); |
- |
// Ensure search controller is released prior to speech_ui_. |
search_controller_.reset(); |
} |
@@ -174,29 +151,6 @@ void AppListViewDelegate::OnHotwordRecognized() { |
ToggleSpeechRecognition(); |
} |
-void AppListViewDelegate::SigninManagerCreated(SigninManagerBase* manager) { |
- scoped_observer_.Add(manager); |
-} |
- |
-void AppListViewDelegate::SigninManagerShutdown(SigninManagerBase* manager) { |
- if (scoped_observer_.IsObserving(manager)) |
- scoped_observer_.Remove(manager); |
-} |
- |
-void AppListViewDelegate::GoogleSigninFailed( |
- const GoogleServiceAuthError& error) { |
- OnProfileChanged(); |
-} |
- |
-void AppListViewDelegate::GoogleSigninSucceeded(const std::string& username, |
- const std::string& password) { |
- OnProfileChanged(); |
tapted
2014/06/03 08:41:02
Removing this will mean that the profile switching
|
-} |
- |
-void AppListViewDelegate::GoogleSignedOut(const std::string& username) { |
- OnProfileChanged(); |
-} |
- |
void AppListViewDelegate::OnProfileChanged() { |
model_ = app_list::AppListSyncableServiceFactory::GetForProfile( |
profile_)->model(); |
@@ -205,8 +159,6 @@ void AppListViewDelegate::OnProfileChanged() { |
profile_, model_->search_box(), model_->results(), |
speech_ui_.get(), controller_)); |
- signin_delegate_.SetProfile(profile_); |
- |
#if defined(USE_ASH) |
app_sync_ui_state_watcher_.reset(new AppSyncUIStateWatcher(profile_, model_)); |
#endif |
@@ -248,10 +200,6 @@ app_list::AppListModel* AppListViewDelegate::GetModel() { |
return model_; |
} |
-app_list::SigninDelegate* AppListViewDelegate::GetSigninDelegate() { |
- return &signin_delegate_; |
-} |
- |
app_list::SpeechUIModel* AppListViewDelegate::GetSpeechUI() { |
return speech_ui_.get(); |
} |