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

Side by Side Diff: chrome/browser/extensions/api/file_system/entry_watcher_service_factory.cc

Issue 452043003: [ew] Add basic classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing files. 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 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/extensions/api/file_system/entry_watcher_service_factor y.h"
6
7 #include "chrome/browser/extensions/api/file_system/entry_watcher_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "content/public/browser/browser_context.h"
11
12 namespace extensions {
13
14 EntryWatcherServiceFactory* EntryWatcherServiceFactory::GetInstance() {
15 return Singleton<EntryWatcherServiceFactory>::get();
16 }
17
18 EntryWatcherServiceFactory::EntryWatcherServiceFactory()
19 : BrowserContextKeyedServiceFactory(
20 "EntryWatcherService",
21 BrowserContextDependencyManager::GetInstance()) {
22 }
23
24 EntryWatcherServiceFactory::~EntryWatcherServiceFactory() {
25 }
26
27 KeyedService* EntryWatcherServiceFactory::BuildServiceInstanceFor(
28 content::BrowserContext* context) const {
29 return new EntryWatcherService(Profile::FromBrowserContext(context));
30 }
31
32 bool EntryWatcherServiceFactory::ServiceIsCreatedWithBrowserContext() const {
33 // Required to restore persistent watchers as soon as the profile is loaded.
34 return true;
35 }
36
37 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698