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

Unified Diff: chrome/browser/signin/signin_global_error.cc

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 11 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/signin/signin_global_error.h ('k') | chrome/browser/signin/signin_global_error_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_global_error.cc
diff --git a/chrome/browser/signin/signin_global_error.cc b/chrome/browser/signin/signin_global_error.cc
index fd68ac1d2bf62fe27cedaa848b58fbe1cd4343b7..7edb6533a98e0ad12adc8a03cd0b9b916bda1d75 100644
--- a/chrome/browser/signin/signin_global_error.cc
+++ b/chrome/browser/signin/signin_global_error.cc
@@ -7,7 +7,6 @@
#include "base/logging.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/signin/signin_manager.h"
-#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/global_error/global_error_service.h"
@@ -19,8 +18,9 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-SigninGlobalError::SigninGlobalError(Profile* profile)
+SigninGlobalError::SigninGlobalError(SigninManager* manager, Profile* profile)
: auth_error_(GoogleServiceAuthError::None()),
+ signin_manager_(manager),
profile_(profile) {
}
@@ -96,8 +96,7 @@ int SigninGlobalError::MenuItemCommandID() {
}
string16 SigninGlobalError::MenuItemLabel() {
- if (SigninManagerFactory::GetForProfile(profile_)->
- GetAuthenticatedUsername().empty() ||
+ if (signin_manager_->GetAuthenticatedUsername().empty() ||
auth_error_.state() == GoogleServiceAuthError::NONE ||
auth_error_.state() == GoogleServiceAuthError::CONNECTION_FAILED) {
// If the user isn't signed in, or there's no auth error worth elevating to
@@ -141,8 +140,7 @@ string16 SigninGlobalError::GetBubbleViewTitle() {
string16 SigninGlobalError::GetBubbleViewMessage() {
// If the user isn't signed in, no need to display an error bubble.
- if (SigninManagerFactory::GetForProfile(profile_)->
- GetAuthenticatedUsername().empty()) {
+ if (signin_manager_->GetAuthenticatedUsername().empty()) {
return string16();
}
« no previous file with comments | « chrome/browser/signin/signin_global_error.h ('k') | chrome/browser/signin/signin_global_error_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698