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

Side by Side Diff: chrome/browser/history/top_sites_service_factory.h

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
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_HISTORY_TOP_SITES_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
sdefresne 2014/12/19 15:11:41 You can remove this include and instead forward-de
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
9 #include "chrome/browser/history/top_sites_service.h"
sdefresne 2014/12/19 15:11:41 TopSitesImpl is an implementation details and clie
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
10 #include "chrome/browser/profiles/profile.h"
11 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
12
13 // Used for creating and fetching a per-profile instance of the
14 // Topsites.
sdefresne 2014/12/19 15:11:42 s/Topsites/TopSites/ (or TopSitesProvider).
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
15 class TopSitesServiceFactory : public BrowserContextKeyedServiceFactory {
sdefresne 2014/12/19 15:11:42 Since TopSitesProvider is a base::RefCountedThread
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
16 public:
17 // Get the WebHistoryService for |profile|, creating one if needed.
18 static history::TopSitesService* GetForProfile(Profile* profile);
sdefresne 2014/12/19 15:11:41 s/TopSitesService/TopSitesProvider/
19
sdefresne 2014/12/19 15:11:42 You'll need another method GetForProfileIfExists()
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
20 // Get the singleton instance of the factory.
21 static TopSitesServiceFactory* GetInstance();
22
23 protected:
24 // Overridden from BrowserContextKeyedServiceFactory.
25 virtual KeyedService* BuildServiceInstanceFor(
26 content::BrowserContext* context) const override;
27
28 // virtual content::BrowserContext* GetBrowserContextToUse(
sdefresne 2014/12/19 15:11:41 Dead-code, remove.
Jitu( very slow this week) 2014/12/26 14:04:28 Done.
29 // content::BrowserContext* context) const override;
30
31 private:
32 friend struct DefaultSingletonTraits<TopSitesServiceFactory>;
33
34 TopSitesServiceFactory();
35 virtual ~TopSitesServiceFactory() override;
36
37 DISALLOW_COPY_AND_ASSIGN(TopSitesServiceFactory);
38 };
39
40 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698