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

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

Issue 10399087: Converting BookmarkModel and HistoryService to ProfileKeyedServices. This just performs the initial… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months 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
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_service_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_HISTORY_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_
7 #pragma once
8
9 #include "base/memory/singleton.h"
10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h"
12
13 class HistoryService;
14
15 // Singleton that owns all HistoryService and associates them with
16 // Profiles.
17 class HistoryServiceFactory
18 : public RefcountedProfileKeyedServiceFactory {
19 public:
20 static scoped_refptr<HistoryService> GetForProfile(
21 Profile* profile, Profile::ServiceAccessType sat);
22
23 static scoped_refptr<HistoryService> GetForProfileIfExists(
24 Profile* profile);
25
26 static HistoryServiceFactory* GetInstance();
27
28 // In the testing profile, we often clear the history before making a new
29 // one. This takes care of that work. It should only be used in tests.
30 // Note: This does not do any cleanup; it only destroys the service. The
31 // calling test is expected to do the cleanup before calling this function.
32 static void ShutdownForProfile(Profile* profile);
33
34 private:
35 friend struct DefaultSingletonTraits<HistoryServiceFactory>;
36
37 HistoryServiceFactory();
38 virtual ~HistoryServiceFactory();
39
40 // ProfileKeyedServiceFactory:
41 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
42 Profile* profile) const OVERRIDE;
43 virtual bool ServiceRedirectedInIncognito() OVERRIDE;
44 virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
45 };
46
47 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698