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

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

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 years, 8 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/fake_signin_manager.h ('k') | chrome/browser/signin/signin_global_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/fake_signin_manager.cc
diff --git a/chrome/browser/signin/fake_signin_manager.cc b/chrome/browser/signin/fake_signin_manager.cc
index 38a1b667385730dccb8648d6104002fd3043a0d4..fcb2dc0ae0752fa8b01342d90f47385f84f3ec50 100644
--- a/chrome/browser/signin/fake_signin_manager.cc
+++ b/chrome/browser/signin/fake_signin_manager.cc
@@ -14,17 +14,17 @@
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_service.h"
-FakeSigninManager::FakeSigninManager(Profile* profile) {
+FakeSigninManagerBase::FakeSigninManagerBase(Profile* profile) {
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)));
+ base::Bind(&SigninManagerBase::OnSigninAllowedPrefChanged,
+ base::Unretained(this)));
}
-FakeSigninManager::~FakeSigninManager() {
+FakeSigninManagerBase::~FakeSigninManagerBase() {
if (signin_global_error_.get()) {
GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveGlobalError(
signin_global_error_.get());
@@ -32,6 +32,31 @@ FakeSigninManager::~FakeSigninManager() {
}
}
+void FakeSigninManagerBase::SignOut() {
+ authenticated_username_.clear();
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
+ content::Source<Profile>(profile_),
+ content::NotificationService::NoDetails());
+}
+
+// static
+ProfileKeyedService* FakeSigninManagerBase::Build(Profile* profile) {
+ return new FakeSigninManagerBase(profile);
+}
+
+#if !defined (OS_CHROMEOS)
+
+FakeSigninManager::FakeSigninManager(Profile* profile) {
+ Initialize(profile);
+}
+
+FakeSigninManager::~FakeSigninManager() {
+}
+
+void FakeSigninManager::InitTokenService() {
+}
+
void FakeSigninManager::StartSignIn(const std::string& username,
const std::string& password,
const std::string& login_token,
@@ -61,13 +86,9 @@ void FakeSigninManager::SignOut() {
content::NotificationService::NoDetails());
}
-void FakeSigninManager::ForceSignOut() {
- // Allow signing out now.
- prohibit_signout_ = false;
- SignOut();
-}
-
// static
ProfileKeyedService* FakeSigninManager::Build(Profile* profile) {
return new FakeSigninManager(profile);
}
+
+#endif // !defined (OS_CHROMEOS)
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.h ('k') | chrome/browser/signin/signin_global_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698