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

Side by Side Diff: chrome/browser/ntp_content/ntp_content_service_factory.h

Issue 1438043008: Creating the NTP snippet service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing compile on non-ios platforms (ooops!) Created 5 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2015 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_NTP_CONTENT_NTP_CONTENT_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_NTP_CONTENT_NTP_CONTENT_SERVICE_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
11
12 namespace base {
13 template <typename T>
14 struct DefaultSingletonTraits;
15 } // namespace base
16
17 namespace ntp_content {
blundell 2015/11/16 16:00:53 nit: Don't use a namespace in //chrome.
noyau (Ping after 24h) 2015/11/17 10:36:10 Done.
18
19 class NTPContentService;
20
21 // A factory to create NTPContentService and associate them to its browser
22 // context.
23 class NTPContentServiceFactory : public BrowserContextKeyedServiceFactory {
24 public:
25 static NTPContentServiceFactory* GetInstance();
26 static NTPContentService* GetForBrowserContext(
27 content::BrowserContext* context);
28
29 private:
30 friend struct base::DefaultSingletonTraits<NTPContentServiceFactory>;
31
32 NTPContentServiceFactory();
33 ~NTPContentServiceFactory() override;
34
35 // BrowserStateKeyedServiceFactory implementation.
36 KeyedService* BuildServiceInstanceFor(
37 content::BrowserContext* context) const override;
38 content::BrowserContext* GetBrowserContextToUse(
39 content::BrowserContext* context) const override;
40
41 DISALLOW_COPY_AND_ASSIGN(NTPContentServiceFactory);
42 };
43
44 } // namespace ntp_content
45
46 #endif // CHROME_BROWSER_NTP_CONTENT_NTP_CONTENT_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698