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

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

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extract managed user specific stuff into another changelist. Created 7 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
Index: chrome/browser/signin/signin_manager_fake.cc
diff --git a/chrome/browser/signin/signin_manager_fake.cc b/chrome/browser/signin/signin_manager_fake.cc
index 6b377c15431a515d4e4df4be372cb9d5faeebb2c..7f6df1d2fa539c90fbe643e56cf46e84907e3dd7 100644
--- a/chrome/browser/signin/signin_manager_fake.cc
+++ b/chrome/browser/signin/signin_manager_fake.cc
@@ -4,10 +4,14 @@
#include "chrome/browser/signin/signin_manager_fake.h"
+#include "base/callback_helpers.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_global_error.h"
#include "chrome/browser/ui/global_error/global_error_service.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_service.h"
FakeSigninManager::FakeSigninManager(Profile* profile)
@@ -16,6 +20,9 @@ FakeSigninManager::FakeSigninManager(Profile* profile)
signin_global_error_.reset(new SigninGlobalError(this, profile));
GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(
signin_global_error_.get());
+ signin_allowed_.Init(prefs::kSigninAllowed, profile_->GetPrefs(),
+ base::Bind(&SigninManager::OnSigninAllowedPrefChanged,
+ base::Unretained(this)));
}
FakeSigninManager::~FakeSigninManager() {

Powered by Google App Engine
This is Rietveld 408576698