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

Side by Side Diff: chrome/browser/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: Uploaded. Created 6 years, 4 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/file_system/entry_watcher_service_factory.h"
6
7 #include "chrome/browser/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 EntryWatcherServiceFactory* EntryWatcherServiceFactory::GetInstance() {
13 return Singleton<EntryWatcherServiceFactory>::get();
14 }
15
16 EntryWatcherServiceFactory::EntryWatcherServiceFactory()
17 : BrowserContextKeyedServiceFactory(
18 "EntryWatcherService",
19 BrowserContextDependencyManager::GetInstance()) {
20 }
21
22 EntryWatcherServiceFactory::~EntryWatcherServiceFactory() {
23 }
24
25 KeyedService* EntryWatcherServiceFactory::BuildServiceInstanceFor(
26 content::BrowserContext* context) const {
27 return new EntryWatcherService(Profile::FromBrowserContext(context));
28 }
29
30 bool EntryWatcherServiceFactory::ServiceIsCreatedWithBrowserContext() const {
31 // Required to restore persistent watchers as soon as the profile is loaded.
32 return true;
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698