| Index: chrome/browser/chromeos/policy/recommendation_restorer_factory.cc
|
| diff --git a/chrome/browser/chromeos/policy/recommendation_restorer_factory.cc b/chrome/browser/chromeos/policy/recommendation_restorer_factory.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..477ff616faa257e31812821557808734fbdd93e8
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/policy/recommendation_restorer_factory.cc
|
| @@ -0,0 +1,45 @@
|
| +// Copyright (c) 2013 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/policy/recommendation_restorer_factory.h"
|
| +
|
| +#include "chrome/browser/chromeos/policy/recommendation_restorer.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
|
| +#include "content/public/browser/browser_context.h"
|
| +
|
| +namespace policy {
|
| +
|
| +// static
|
| +RecommendationRestorerFactory* RecommendationRestorerFactory::GetInstance() {
|
| + return Singleton<RecommendationRestorerFactory>::get();
|
| +}
|
| +
|
| +// static
|
| +RecommendationRestorer* RecommendationRestorerFactory::GetForProfile(
|
| + Profile* profile) {
|
| + return reinterpret_cast<RecommendationRestorer*>(
|
| + GetInstance()->GetServiceForBrowserContext(profile, false));
|
| +}
|
| +
|
| +BrowserContextKeyedService*
|
| + RecommendationRestorerFactory::BuildServiceInstanceFor(
|
| + content::BrowserContext* context) const {
|
| + return new RecommendationRestorer(static_cast<Profile*>(context));
|
| +}
|
| +
|
| +bool RecommendationRestorerFactory::ServiceIsCreatedWithBrowserContext() const {
|
| + return true;
|
| +}
|
| +
|
| +RecommendationRestorerFactory::RecommendationRestorerFactory()
|
| + : BrowserContextKeyedServiceFactory(
|
| + "RecommendationRestorer",
|
| + BrowserContextDependencyManager::GetInstance()) {
|
| +}
|
| +
|
| +RecommendationRestorerFactory::~RecommendationRestorerFactory() {
|
| +}
|
| +
|
| +} // namespace policy
|
|
|