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

Unified Diff: chrome/browser/history/shortcuts_backend_factory.cc

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/shortcuts_backend_factory.cc
diff --git a/chrome/browser/history/shortcuts_backend_factory.cc b/chrome/browser/history/shortcuts_backend_factory.cc
index 566dbaed9491e543c669a81631667dc55cfbff9b..dbfdf53e27fda9855a19b68e1d0afd8c6db5adb5 100644
--- a/chrome/browser/history/shortcuts_backend_factory.cc
+++ b/chrome/browser/history/shortcuts_backend_factory.cc
@@ -6,6 +6,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/history/shortcuts_backend.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/common/pref_names.h"
@@ -32,18 +33,21 @@ ShortcutsBackendFactory* ShortcutsBackendFactory::GetInstance() {
// static
scoped_refptr<RefcountedProfileKeyedService>
-ShortcutsBackendFactory::BuildProfileForTesting(Profile* profile) {
+ShortcutsBackendFactory::BuildProfileForTesting(
+ content::BrowserContext* profile) {
scoped_refptr<history::ShortcutsBackend> backend(
- new ShortcutsBackend(profile, false));
+ new ShortcutsBackend(static_cast<Profile*>(profile), false));
if (backend->Init())
return backend;
return NULL;
}
+// static
scoped_refptr<RefcountedProfileKeyedService>
-ShortcutsBackendFactory::BuildProfileNoDatabaseForTesting(Profile* profile) {
+ShortcutsBackendFactory::BuildProfileNoDatabaseForTesting(
+ content::BrowserContext* profile) {
scoped_refptr<history::ShortcutsBackend> backend(
- new ShortcutsBackend(profile, true));
+ new ShortcutsBackend(static_cast<Profile*>(profile), true));
if (backend->Init())
return backend;
return NULL;
@@ -58,9 +62,10 @@ ShortcutsBackendFactory::ShortcutsBackendFactory()
ShortcutsBackendFactory::~ShortcutsBackendFactory() {}
scoped_refptr<RefcountedProfileKeyedService>
-ShortcutsBackendFactory::BuildServiceInstanceFor(Profile* profile) const {
+ShortcutsBackendFactory::BuildServiceInstanceFor(
+ content::BrowserContext* profile) const {
scoped_refptr<history::ShortcutsBackend> backend(
- new ShortcutsBackend(profile, false));
+ new ShortcutsBackend(static_cast<Profile*>(profile), false));
if (backend->Init())
return backend;
return NULL;
« no previous file with comments | « chrome/browser/history/shortcuts_backend_factory.h ('k') | chrome/browser/history/web_history_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698