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

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

Issue 1304393002: Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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_global_error_factory.cc
diff --git a/chrome/browser/signin/signin_error_notifier_factory_ash.cc b/chrome/browser/signin/signin_global_error_factory.cc
similarity index 54%
copy from chrome/browser/signin/signin_error_notifier_factory_ash.cc
copy to chrome/browser/signin/signin_global_error_factory.cc
index 75c975f4306e2e3a2997e12ef69c9679226df1ca..a1900a7dbef1c8e34bc8b0ec55a046665e30ed8d 100644
--- a/chrome/browser/signin/signin_error_notifier_factory_ash.cc
+++ b/chrome/browser/signin/signin_global_error_factory.cc
@@ -2,44 +2,51 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/signin/signin_error_notifier_factory_ash.h"
+#include "chrome/browser/signin/signin_global_error_factory.h"
-#include "ash/shell.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_error_controller_factory.h"
-#include "chrome/browser/signin/signin_error_notifier_ash.h"
+#include "chrome/browser/signin/signin_global_error.h"
+#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
-SigninErrorNotifierFactory::SigninErrorNotifierFactory()
+#if defined(USE_ASH)
+#include "ash/shell.h"
+#endif
+
+SigninGlobalErrorFactory::SigninGlobalErrorFactory()
: BrowserContextKeyedServiceFactory(
- "SigninErrorNotifier",
+ "SigninGlobalError",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(SigninErrorControllerFactory::GetInstance());
+ DependsOn(GlobalErrorServiceFactory::GetInstance());
}
-SigninErrorNotifierFactory::~SigninErrorNotifierFactory() {}
+SigninGlobalErrorFactory::~SigninGlobalErrorFactory() {}
// static
-SigninErrorNotifier* SigninErrorNotifierFactory::GetForProfile(
+SigninGlobalError* SigninGlobalErrorFactory::GetForProfile(
Profile* profile) {
- return static_cast<SigninErrorNotifier*>(
+ return static_cast<SigninGlobalError*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
-SigninErrorNotifierFactory* SigninErrorNotifierFactory::GetInstance() {
- return Singleton<SigninErrorNotifierFactory>::get();
+SigninGlobalErrorFactory* SigninGlobalErrorFactory::GetInstance() {
+ return Singleton<SigninGlobalErrorFactory>::get();
}
-KeyedService* SigninErrorNotifierFactory::BuildServiceInstanceFor(
+KeyedService* SigninGlobalErrorFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- if (!ash::Shell::HasInstance())
+#if defined(USE_ASH)
+ if (ash::Shell::HasInstance())
return NULL;
+#endif
Profile* profile = static_cast<Profile*>(context);
- return new SigninErrorNotifier(
+ return new SigninGlobalError(
SigninErrorControllerFactory::GetForProfile(profile), profile);
}

Powered by Google App Engine
This is Rietveld 408576698