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

Side by Side Diff: chrome/browser/chromeos/login/owner_key_reloader_service_factory.cc

Issue 270663002: Implemented profile-aware owner key loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/owner_key_reloader_service_factory.h"
6
7 #include "chrome/browser/chromeos/login/owner_key_reloader_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10
11 namespace chromeos {
12
13 OwnerKeyReloaderServiceFactory::OwnerKeyReloaderServiceFactory()
14 : BrowserContextKeyedServiceFactory(
15 "OwnerKeyReloaderService",
16 BrowserContextDependencyManager::GetInstance()) {
17 }
18
19 OwnerKeyReloaderServiceFactory::~OwnerKeyReloaderServiceFactory() {
20 }
21
22 // static
23 OwnerKeyReloaderService* OwnerKeyReloaderServiceFactory::GetForProfile(
24 Profile* profile) {
25 return static_cast<OwnerKeyReloaderService*>(
26 GetInstance()->GetServiceForBrowserContext(profile, true));
27 }
28
29 // static
30 OwnerKeyReloaderServiceFactory* OwnerKeyReloaderServiceFactory::GetInstance() {
31 return Singleton<OwnerKeyReloaderServiceFactory>::get();
32 }
33
34 // static
35 KeyedService* OwnerKeyReloaderServiceFactory::BuildInstanceFor(
36 content::BrowserContext* context) {
37 Profile* profile = static_cast<Profile*>(context);
Mattias Nissler (ping if slow) 2014/05/14 12:18:10 This is the point where you'd grab your Profile-ke
ygorshenin1 2014/05/14 15:30:07 As I mentioned in the comment to the OwnerSettings
38 return new OwnerKeyReloaderService(profile);
39 }
40
41 KeyedService* OwnerKeyReloaderServiceFactory::BuildServiceInstanceFor(
42 content::BrowserContext* context) const {
43 return BuildInstanceFor(context);
44 }
45
46 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698