| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 63992d370a427e3bddabf573e40536408183c1b5..7eb1d32a4ef079dcae5bc000a9e6a5afe39ebe1c 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -26,6 +26,7 @@
|
| #include "chrome/browser/content_settings/cookie_settings.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
|
| +#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
|
| #include "chrome/browser/download/download_service.h"
|
| #include "chrome/browser/download/download_service_factory.h"
|
| #include "chrome/browser/extensions/extension_event_router.h"
|
| @@ -43,6 +44,8 @@
|
| #include "chrome/browser/history/shortcuts_backend.h"
|
| #include "chrome/browser/history/top_sites.h"
|
| #include "chrome/browser/instant/instant_controller.h"
|
| +#include "chrome/browser/intents/web_intents_registry.h"
|
| +#include "chrome/browser/intents/web_intents_registry_factory.h"
|
| #include "chrome/browser/metrics/metrics_service.h"
|
| #include "chrome/browser/net/chrome_url_request_context.h"
|
| #include "chrome/browser/net/net_pref_observer.h"
|
| @@ -442,31 +445,11 @@ void ProfileImpl::InitPromoResources() {
|
| #endif
|
| }
|
|
|
| +// TODO(smckay): Handle in profile_dependency_manager,
|
| +// then replace calls to GetProtocolHandlerRegistry
|
| +// with factory.
|
| void ProfileImpl::InitRegisteredProtocolHandlers() {
|
| - if (protocol_handler_registry_)
|
| - return;
|
| - protocol_handler_registry_ = new ProtocolHandlerRegistry(this,
|
| - new ProtocolHandlerRegistry::Delegate());
|
| -
|
| - // Install predefined protocol handlers.
|
| - InstallDefaultProtocolHandlers();
|
| -
|
| - protocol_handler_registry_->Load();
|
| -}
|
| -
|
| -void ProfileImpl::InstallDefaultProtocolHandlers() {
|
| -#if defined(OS_CHROMEOS)
|
| - protocol_handler_registry_->AddPredefinedHandler(
|
| - ProtocolHandler::CreateProtocolHandler(
|
| - "mailto",
|
| - GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_MAILTO_HANDLER_URL)),
|
| - l10n_util::GetStringUTF16(IDS_GOOGLE_MAILTO_HANDLER_NAME)));
|
| - protocol_handler_registry_->AddPredefinedHandler(
|
| - ProtocolHandler::CreateProtocolHandler(
|
| - "webcal",
|
| - GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_WEBCAL_HANDLER_URL)),
|
| - l10n_util::GetStringUTF16(IDS_GOOGLE_WEBCAL_HANDLER_NAME)));
|
| -#endif
|
| + // TODO(smckay): delete me
|
| }
|
|
|
| FilePath ProfileImpl::last_selected_directory() {
|
| @@ -545,9 +528,6 @@ ProfileImpl::~ProfileImpl() {
|
| if (pref_proxy_config_tracker_.get())
|
| pref_proxy_config_tracker_->DetachFromPrefService();
|
|
|
| - if (protocol_handler_registry_)
|
| - protocol_handler_registry_->Finalize();
|
| -
|
| if (host_content_settings_map_)
|
| host_content_settings_map_->ShutdownOnUIThread();
|
|
|
| @@ -851,7 +831,8 @@ BookmarkModel* ProfileImpl::GetBookmarkModel() {
|
| }
|
|
|
| ProtocolHandlerRegistry* ProfileImpl::GetProtocolHandlerRegistry() {
|
| - return protocol_handler_registry_.get();
|
| + // TODO(smckay): delete me
|
| + return ProtocolHandlerRegistryFactory::GetForProfile(this);
|
| }
|
|
|
| bool ProfileImpl::IsSameProfile(Profile* profile) {
|
|
|