Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index 7e89356c589e0ef9c207b4caadf9f95d8ad1e065..c6f422b494bfcc0164777170bf1a2b2bba5491d2 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -83,6 +83,7 @@ |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/user_metrics.h" |
| #include "grit/chromium_strings.h" |
| +#include "grit/generated_resources.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #if defined(OS_WIN) |
| @@ -442,9 +443,28 @@ void ProfileImpl::InitRegisteredProtocolHandlers() { |
| 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_->AddDefaultHandler( |
| + ProtocolHandler::CreateProtocolHandler( |
| + "mailto", |
| + GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_MAILTO_HANDLER_URL)), |
|
tony
2012/04/27 22:17:15
Why do the URLs have / repeated in the grd file?
|
| + l10n_util::GetStringUTF16(IDS_GOOGLE_MAILTO_HANDLER_NAME))); |
| + protocol_handler_registry_->AddDefaultHandler( |
| + ProtocolHandler::CreateProtocolHandler( |
| + "webcal", |
| + GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_WEBCAL_HANDLER_URL)), |
| + l10n_util::GetStringUTF16(IDS_GOOGLE_WEBCAL_HANDLER_NAME))); |
| +#endif |
| +} |
| + |
| FilePath ProfileImpl::last_selected_directory() { |
| return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); |
| } |