Chromium Code Reviews| Index: chrome/browser/chromeos/login/owner_key_reloader_service_factory.cc |
| diff --git a/chrome/browser/chromeos/login/owner_key_reloader_service_factory.cc b/chrome/browser/chromeos/login/owner_key_reloader_service_factory.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..50e77263f021589a850b718ed1d7fb1eaf3f5d32 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/login/owner_key_reloader_service_factory.cc |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/chromeos/login/owner_key_reloader_service_factory.h" |
| + |
| +#include "chrome/browser/chromeos/login/owner_key_reloader_service.h" |
| +#include "chrome/browser/profiles/profile.h" |
| +#include "components/keyed_service/content/browser_context_dependency_manager.h" |
| + |
| +namespace chromeos { |
| + |
| +OwnerKeyReloaderServiceFactory::OwnerKeyReloaderServiceFactory() |
| + : BrowserContextKeyedServiceFactory( |
| + "OwnerKeyReloaderService", |
| + BrowserContextDependencyManager::GetInstance()) { |
| +} |
| + |
| +OwnerKeyReloaderServiceFactory::~OwnerKeyReloaderServiceFactory() { |
| +} |
| + |
| +// static |
| +OwnerKeyReloaderService* OwnerKeyReloaderServiceFactory::GetForProfile( |
| + Profile* profile) { |
| + return static_cast<OwnerKeyReloaderService*>( |
| + GetInstance()->GetServiceForBrowserContext(profile, true)); |
| +} |
| + |
| +// static |
| +OwnerKeyReloaderServiceFactory* OwnerKeyReloaderServiceFactory::GetInstance() { |
| + return Singleton<OwnerKeyReloaderServiceFactory>::get(); |
| +} |
| + |
| +// static |
| +KeyedService* OwnerKeyReloaderServiceFactory::BuildInstanceFor( |
| + content::BrowserContext* context) { |
| + 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
|
| + return new OwnerKeyReloaderService(profile); |
| +} |
| + |
| +KeyedService* OwnerKeyReloaderServiceFactory::BuildServiceInstanceFor( |
| + content::BrowserContext* context) const { |
| + return BuildInstanceFor(context); |
| +} |
| + |
| +} // namespace chromeos |