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

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

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Made ChromeURLDataManager's destructor virtual Created 8 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
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 57503472ba4a4c2d77806c26977ac1ebe454dbdd..b5b74f412f9aae27f93ee96d7fa3c6a48b8833f0 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -34,7 +34,7 @@
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/transport_security_persister.h"
-#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager_factory.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
@@ -102,7 +102,7 @@ void OffTheRecordProfileImpl::Init() {
// Make the chrome//extension-icon/ resource available.
ExtensionIconSource* icon_source = new ExtensionIconSource(profile_);
- GetChromeURLDataManager()->AddDataSource(icon_source);
+ ChromeURLDataManager::AddDataSource(this, icon_source);
ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
PluginPrefs::GetForProfile(this), io_data_.GetResourceContextNoInit());
@@ -410,13 +410,6 @@ void OffTheRecordProfileImpl::InitChromeOSPreferences() {
}
#endif // defined(OS_CHROMEOS)
-ChromeURLDataManager* OffTheRecordProfileImpl::GetChromeURLDataManager() {
- if (!chrome_url_data_manager_.get())
- chrome_url_data_manager_.reset(new ChromeURLDataManager(
- io_data_.GetChromeURLDataManagerBackendGetter()));
- return chrome_url_data_manager_.get();
-}
-
#if defined(OS_CHROMEOS)
void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale,
AppLocaleChangedVia) {
@@ -496,3 +489,8 @@ Profile* Profile::CreateOffTheRecordProfile() {
profile->Init();
return profile;
}
+
+base::Callback<ChromeURLDataManagerBackend*(void)>
+ OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const {
+ return io_data_.GetChromeURLDataManagerBackendGetter();
+}
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698