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

Side by Side Diff: components/dom_distiller/content/dom_distiller_service_factory.h

Issue 100623006: Move dom_distiller_service_factory to //chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after conflict with blundell@chromium.org (!) Created 7 years 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 2013 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 COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_SERVICE_FACTORY_H_
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
10 #include "components/dom_distiller/core/dom_distiller_service.h"
11
12 namespace content {
13 class BrowserContext;
14 } // namespace content
15
16 namespace dom_distiller {
17
18 // A simple wrapper for DomDistillerService to expose it as a
19 // BrowserContextKeyedService.
20 class DomDistillerContextKeyedService : public BrowserContextKeyedService,
21 public DomDistillerService {
22 public:
23 DomDistillerContextKeyedService(
24 scoped_ptr<DomDistillerStoreInterface> store,
25 scoped_ptr<DistillerFactory> distiller_factory);
26 virtual ~DomDistillerContextKeyedService() {}
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(DomDistillerContextKeyedService);
30 };
31
32 class DomDistillerServiceFactory : public BrowserContextKeyedServiceFactory {
33 public:
34 static DomDistillerServiceFactory* GetInstance();
35 static DomDistillerContextKeyedService* GetForBrowserContext(
36 content::BrowserContext* context);
37
38 private:
39 friend struct DefaultSingletonTraits<DomDistillerServiceFactory>;
40
41 DomDistillerServiceFactory();
42 virtual ~DomDistillerServiceFactory();
43
44 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
45 content::BrowserContext* context) const OVERRIDE;
46
47 virtual content::BrowserContext* GetBrowserContextToUse(
48 content::BrowserContext* context) const OVERRIDE;
49 };
50
51 } // namespace dom_distiller
52
53 #endif
OLDNEW
« no previous file with comments | « components/dom_distiller.gypi ('k') | components/dom_distiller/content/dom_distiller_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698