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

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

Issue 577683002: Introduce EasyUnlockService class for signin profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/easy_unlock_service_factory.cc
diff --git a/chrome/browser/signin/easy_unlock_service_factory.cc b/chrome/browser/signin/easy_unlock_service_factory.cc
index 4e90429c3732d0537ce0523a1e28513cc726b95c..c050ffe85f8be8d725f9507e250194abe760e5e8 100644
--- a/chrome/browser/signin/easy_unlock_service_factory.cc
+++ b/chrome/browser/signin/easy_unlock_service_factory.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/easy_unlock_service.h"
+#include "chrome/browser/signin/easy_unlock_service_regular.h"
+#include "chrome/browser/signin/easy_unlock_service_signin_chromeos.h"
xiyuan 2014/09/16 21:59:59 Move this into #if defined(OS_CHROMEOS) around lin
tbarzic 2014/09/16 22:30:58 d'oh forgot to move it when I made the file cros-o
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "extensions/browser/extension_system_provider.h"
#include "extensions/browser/extensions_browser_client.h"
@@ -41,17 +43,17 @@ EasyUnlockServiceFactory::~EasyUnlockServiceFactory() {
KeyedService* EasyUnlockServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new EasyUnlockService(Profile::FromBrowserContext(context));
-}
-
-content::BrowserContext* EasyUnlockServiceFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
#if defined(OS_CHROMEOS)
if (chromeos::ProfileHelper::IsSigninProfile(
Profile::FromBrowserContext(context))) {
- return NULL;
+ return new EasyUnlockServiceSignin(Profile::FromBrowserContext(context));
}
#endif
+ return new EasyUnlockServiceRegular(Profile::FromBrowserContext(context));
+}
+
+content::BrowserContext* EasyUnlockServiceFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
return chrome::GetBrowserContextRedirectedInIncognito(context);
}

Powered by Google App Engine
This is Rietveld 408576698