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

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

Issue 11817045: Move auth-error reporting code out of SyncGlobalError and into SigninGlobalError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disabled ExtensionActionContextMenuTest.BrowserAction 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_manager_factory.cc ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b3068ea71da2713acab518c0eb0518b06cd7bcf6..20a8cb9fa4cc5b603d79eabb317a21c6a5db6860 100644
--- a/chrome/browser/signin/signin_manager_fake.cc
+++ b/chrome/browser/signin/signin_manager_fake.cc
@@ -4,14 +4,26 @@
#include "chrome/browser/signin/signin_manager_fake.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 "content/public/browser/notification_service.h"
FakeSigninManager::FakeSigninManager(Profile* profile) {
profile_ = profile;
+ signin_global_error_.reset(new SigninGlobalError(profile));
+ GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(
+ signin_global_error_.get());
}
-FakeSigninManager::~FakeSigninManager() {}
+FakeSigninManager::~FakeSigninManager() {
+ if (signin_global_error_.get()) {
+ GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveGlobalError(
+ signin_global_error_.get());
+ signin_global_error_.reset();
+ }
+}
void FakeSigninManager::StartSignIn(const std::string& username,
const std::string& password,
« no previous file with comments | « chrome/browser/signin/signin_manager_factory.cc ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698