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

Side by Side Diff: chrome/browser/file_system/entry_watcher_service_factory.h

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 #ifndef CHROME_BROWSER_FILE_SYSTEM_ENTRY_WATCHER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_FILE_SYSTEM_ENTRY_WATCHER_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10
11 namespace content {
12 class BrowserContext;
13 } // namespace content
14
15 class EntryWatcherService;
16
17 // Creates instances of the EntryWatcherService class.
18 class EntryWatcherServiceFactory : public BrowserContextKeyedServiceFactory {
19 public:
20 // Returns a service instance singleton per |context|, after creating it
21 // (if necessary).
22 static EntryWatcherService* Get(content::BrowserContext* context);
23
24 // Returns a service instance for the context if exists. Otherwise, returns
25 // NULL.
26 static EntryWatcherService* FindExisting(content::BrowserContext* context);
27
28 // Gets a singleton instance of the factory.
29 static EntryWatcherServiceFactory* GetInstance();
30
31 private:
32 friend struct DefaultSingletonTraits<EntryWatcherServiceFactory>;
33
34 EntryWatcherServiceFactory();
35 virtual ~EntryWatcherServiceFactory();
36
37 // BrowserContextKeyedServiceFactory overrides:
38 virtual KeyedService* BuildServiceInstanceFor(
39 content::BrowserContext* profile) const OVERRIDE;
40 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
41
42 DISALLOW_COPY_AND_ASSIGN(EntryWatcherServiceFactory);
43 };
44
45 #endif // CHROME_BROWSER_FILE_SYSTEM_ENTRY_WATCHER_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698