Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 27c51ca17e032af2e46d3785a4a278f1f61495b0..5210fc846122887f66c9a3403a18b40586486782 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -25,6 +25,7 @@ |
#include "chrome/browser/browser_thread.h" |
#include "chrome/browser/chrome_blob_storage_context.h" |
#include "chrome/browser/content_settings/host_content_settings_map.h" |
+#include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
#include "chrome/browser/defaults.h" |
#include "chrome/browser/dom_ui/ntp_resource_cache.h" |
#include "chrome/browser/download/download_manager.h" |
@@ -337,6 +338,8 @@ ProfileImpl::ProfileImpl(const FilePath& path) |
GetPolicyContext()->Initialize(); |
+ InitRegisteredProtocolHandlers(); |
+ |
clear_local_state_on_exit_ = prefs->GetBoolean(prefs::kClearSiteDataOnExit); |
// Log the profile size after a reasonable startup delay. |
@@ -486,6 +489,13 @@ void ProfileImpl::InitWebResources() { |
web_resource_service_->StartAfterDelay(); |
} |
+void ProfileImpl::InitRegisteredProtocolHandlers() { |
+ if (protocol_handler_registry_) |
+ return; |
+ protocol_handler_registry_ = new ProtocolHandlerRegistry(this); |
+ protocol_handler_registry_->Load(); |
+} |
+ |
NTPResourceCache* ProfileImpl::GetNTPResourceCache() { |
if (!ntp_resource_cache_.get()) |
ntp_resource_cache_.reset(new NTPResourceCache(this)); |
@@ -1142,6 +1152,10 @@ BookmarkModel* ProfileImpl::GetBookmarkModel() { |
return bookmark_bar_model_.get(); |
} |
+ProtocolHandlerRegistry* ProfileImpl::GetProtocolHandlerRegistry() { |
+ return protocol_handler_registry_.get(); |
+} |
+ |
bool ProfileImpl::IsSameProfile(Profile* profile) { |
if (profile == static_cast<Profile*>(this)) |
return true; |