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

Side by Side Diff: chrome/browser/ntp_snippets/ntp_snippets_service_factory.h

Issue 1438043008: Creating the NTP snippet service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase fix: Don't trust git. 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_SNIPPETS_NTP_SNIPPETS_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_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 class Profile;
13
14 namespace base {
15 template <typename T>
16 struct DefaultSingletonTraits;
17 } // namespace base
18
19 namespace ntp_snippets {
20 class NTPSnippetsService;
21 } // namespace ntp_snippets
22
23 // A factory to create NTPSnippetsService and associate them to its browser
24 // context.
25 class NTPSnippetsServiceFactory : public BrowserContextKeyedServiceFactory {
26 public:
27 static NTPSnippetsServiceFactory* GetInstance();
28 static ntp_snippets::NTPSnippetsService* GetForProfile(Profile* profile);
29
30 private:
31 friend struct base::DefaultSingletonTraits<NTPSnippetsServiceFactory>;
32
33 NTPSnippetsServiceFactory();
34 ~NTPSnippetsServiceFactory() override;
35
36 // BrowserStateKeyedServiceFactory implementation.
37 KeyedService* BuildServiceInstanceFor(
38 content::BrowserContext* context) const override;
39
40 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsServiceFactory);
41 };
42
43 #endif // CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ntp_snippets/OWNERS ('k') | chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698