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

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

Issue 6410115: Adds navigator.registerProtocolHandler. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 10 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
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..ec7cbcf2bbf0ae6cd8a89d5e8fd9f224e35ebf95 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -11,6 +11,7 @@
#include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "base/scoped_ptr.h"
+#include "base/singleton.h"
tony 2011/02/07 20:51:45 Do you need this?
koz (OOO until 15th September) 2011/02/13 22:33:48 Nope, not anymore. Cheers. Done.
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "chrome/browser/appcache/chrome_appcache_service.h"
@@ -25,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"
@@ -486,6 +488,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 +1151,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;

Powered by Google App Engine
This is Rietveld 408576698