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

Unified Diff: chrome/browser/profiles/profile_keyed_base_factory.cc

Issue 14967003: Drop more dependencies of ProfileKeyedService infrastructure on chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 7 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/profiles/profile_keyed_base_factory.cc
diff --git a/chrome/browser/profiles/profile_keyed_base_factory.cc b/chrome/browser/profiles/profile_keyed_base_factory.cc
index 5343e167852777981bb814c07988544b1308f25b..cf98c94afd00fd0d0a0979125d3f75cc256564a2 100644
--- a/chrome/browser/profiles/profile_keyed_base_factory.cc
+++ b/chrome/browser/profiles/profile_keyed_base_factory.cc
@@ -5,10 +5,10 @@
#include "chrome/browser/profiles/profile_keyed_base_factory.h"
#include "base/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "components/user_prefs/user_prefs.h"
+#include "content/public/browser/browser_context.h"
ProfileKeyedBaseFactory::ProfileKeyedBaseFactory(
const char* name, ProfileDependencyManager* manager)
@@ -32,17 +32,15 @@ content::BrowserContext* ProfileKeyedBaseFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
DCHECK(CalledOnValidThread());
- Profile* profile = static_cast<Profile*>(context);
-
#ifndef NDEBUG
- dependency_manager_->AssertProfileWasntDestroyed(profile);
+ dependency_manager_->AssertProfileWasntDestroyed(context);
#endif
// Safe default for the Incognito mode: no service.
- if (profile->IsOffTheRecord())
+ if (context->IsOffTheRecord())
return NULL;
- return profile;
+ return context;
}
void ProfileKeyedBaseFactory::RegisterUserPrefsOnProfile(
« no previous file with comments | « chrome/browser/profiles/profile_keyed_base_factory.h ('k') | chrome/browser/profiles/profile_keyed_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698