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

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

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_ 5 #ifndef CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_
6 #define CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_ 6 #define CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h" 10 #include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h"
(...skipping 11 matching lines...) Expand all
22 static scoped_refptr<history::ShortcutsBackend> GetForProfile( 22 static scoped_refptr<history::ShortcutsBackend> GetForProfile(
23 Profile* profile); 23 Profile* profile);
24 24
25 static scoped_refptr<history::ShortcutsBackend> GetForProfileIfExists( 25 static scoped_refptr<history::ShortcutsBackend> GetForProfileIfExists(
26 Profile* profile); 26 Profile* profile);
27 27
28 static ShortcutsBackendFactory* GetInstance(); 28 static ShortcutsBackendFactory* GetInstance();
29 29
30 // Creates and returns a backend for testing purposes. 30 // Creates and returns a backend for testing purposes.
31 static scoped_refptr<RefcountedProfileKeyedService> 31 static scoped_refptr<RefcountedProfileKeyedService>
32 BuildProfileForTesting(Profile* profile); 32 BuildProfileForTesting(content::BrowserContext* profile);
33 33
34 // Creates and returns a backend but without creating its persistent database 34 // Creates and returns a backend but without creating its persistent database
35 // for testing purposes. 35 // for testing purposes.
36 static scoped_refptr<RefcountedProfileKeyedService> 36 static scoped_refptr<RefcountedProfileKeyedService>
37 BuildProfileNoDatabaseForTesting(Profile* profile); 37 BuildProfileNoDatabaseForTesting(content::BrowserContext* profile);
38 38
39 private: 39 private:
40 friend struct DefaultSingletonTraits<ShortcutsBackendFactory>; 40 friend struct DefaultSingletonTraits<ShortcutsBackendFactory>;
41 41
42 ShortcutsBackendFactory(); 42 ShortcutsBackendFactory();
43 virtual ~ShortcutsBackendFactory(); 43 virtual ~ShortcutsBackendFactory();
44 44
45 // ProfileKeyedServiceFactory: 45 // ProfileKeyedServiceFactory:
46 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( 46 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
47 Profile* profile) const OVERRIDE; 47 content::BrowserContext* profile) const OVERRIDE;
48 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; 48 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
49 }; 49 };
50 50
51 #endif // CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_ 51 #endif // CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698