| Index: chrome/browser/file_system/entry_watcher_service_factory.cc
|
| diff --git a/chrome/browser/file_system/entry_watcher_service_factory.cc b/chrome/browser/file_system/entry_watcher_service_factory.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a92f6163bb94bd830de5606f77b90439b6a3da34
|
| --- /dev/null
|
| +++ b/chrome/browser/file_system/entry_watcher_service_factory.cc
|
| @@ -0,0 +1,33 @@
|
| +// 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/file_system/entry_watcher_service_factory.h"
|
| +
|
| +#include "chrome/browser/file_system/entry_watcher_service.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
| +#include "content/public/browser/browser_context.h"
|
| +
|
| +EntryWatcherServiceFactory* EntryWatcherServiceFactory::GetInstance() {
|
| + return Singleton<EntryWatcherServiceFactory>::get();
|
| +}
|
| +
|
| +EntryWatcherServiceFactory::EntryWatcherServiceFactory()
|
| + : BrowserContextKeyedServiceFactory(
|
| + "EntryWatcherService",
|
| + BrowserContextDependencyManager::GetInstance()) {
|
| +}
|
| +
|
| +EntryWatcherServiceFactory::~EntryWatcherServiceFactory() {
|
| +}
|
| +
|
| +KeyedService* EntryWatcherServiceFactory::BuildServiceInstanceFor(
|
| + content::BrowserContext* context) const {
|
| + return new EntryWatcherService(Profile::FromBrowserContext(context));
|
| +}
|
| +
|
| +bool EntryWatcherServiceFactory::ServiceIsCreatedWithBrowserContext() const {
|
| + // Required to restore persistent watchers as soon as the profile is loaded.
|
| + return true;
|
| +}
|
|
|