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

Side by Side Diff: chrome/browser/ntp_suggestions/ntp_suggestions_service_factory.h

Issue 1438043008: Creating the NTP snippet service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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_SUGGESTIONS_NTP_SUGGESTIONS_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_NTP_SUGGESTIONS_NTP_SUGGESTIONS_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_suggestions {
18 class NTPSuggestionsService;
19 } // namespace ntp_suggestions
20
21 // A factory to create NTPSuggestionsService and associate them to its browser
22 // context.
23 class NTPSuggestionsServiceFactory : public BrowserContextKeyedServiceFactory {
24 public:
25 static NTPSuggestionsServiceFactory* GetInstance();
26 static ntp_suggestions::NTPSuggestionsService* GetForBrowserContext(
sdefresne 2015/11/17 13:57:29 Usually the BrowserContextKeyedServiceFactory do d
noyau (Ping after 24h) 2015/11/17 17:00:33 Done.
27 content::BrowserContext* context);
28
29 private:
30 friend struct base::DefaultSingletonTraits<NTPSuggestionsServiceFactory>;
31
32 NTPSuggestionsServiceFactory();
33 ~NTPSuggestionsServiceFactory() 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(NTPSuggestionsServiceFactory);
42 };
43
44 #endif // CHROME_BROWSER_NTP_SUGGESTIONS_NTP_SUGGESTIONS_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698