Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 5c7e003eb75dda013aa1206e3083b2028a489608..8cf89d5437b88ad662659901964d95ca121c1e4c 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -26,6 +26,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" |
@@ -313,6 +314,8 @@ ProfileImpl::ProfileImpl(const FilePath& path) |
extension_io_event_router_ = new ExtensionIOEventRouter(this); |
extension_info_map_ = new ExtensionInfoMap(); |
+ InitRegisteredProtocolHandlers(); |
+ |
clear_local_state_on_exit_ = prefs->GetBoolean(prefs::kClearSiteDataOnExit); |
// Log the profile size after a reasonable startup delay. |
@@ -489,6 +492,13 @@ void ProfileImpl::InitPromoResources() { |
promo_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)); |
@@ -1145,6 +1155,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; |