diff options
-rw-r--r-- | src/core/content_client_qt.cpp | 5 | ||||
-rw-r--r-- | src/core/content_client_qt.h | 1 | ||||
-rw-r--r-- | src/core/url_request_context_getter_qt.cpp | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 2725ab9e4..0dac5e48b 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -292,6 +292,11 @@ base::StringPiece ContentClientQt::GetDataResource(int resource_id, ui::ScaleFac return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(resource_id, scale_factor); } +base::RefCountedMemory *ContentClientQt::GetDataResourceBytes(int resource_id) const +{ + return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); +} + base::string16 ContentClientQt::GetLocalizedString(int message_id) const { return l10n_util::GetStringUTF16(message_id); diff --git a/src/core/content_client_qt.h b/src/core/content_client_qt.h index 6a5584cc7..4fd539bf3 100644 --- a/src/core/content_client_qt.h +++ b/src/core/content_client_qt.h @@ -56,6 +56,7 @@ public: #endif virtual base::StringPiece GetDataResource(int, ui::ScaleFactor) const Q_DECL_OVERRIDE; + virtual base::RefCountedMemory* GetDataResourceBytes(int resource_id) const Q_DECL_OVERRIDE; virtual std::string GetUserAgent() const Q_DECL_OVERRIDE { return getUserAgent(); } virtual base::string16 GetLocalizedString(int message_id) const Q_DECL_OVERRIDE; virtual std::string GetProduct() const Q_DECL_OVERRIDE; diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp index 25f7e36e6..e5df27135 100644 --- a/src/core/url_request_context_getter_qt.cpp +++ b/src/core/url_request_context_getter_qt.cpp @@ -525,10 +525,13 @@ void URLRequestContextGetterQt::generateJobFactory() std::unique_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl()); { - // Chromium has a few protocol handlers ready for us, only pick blob: and throw away the rest. + // Chromium has transferred a few protocol handlers to us, only pick blob: and chrome: and ignore the rest. content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme); Q_ASSERT(it != m_protocolHandlers.end()); jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release())); + it = m_protocolHandlers.find(content::kChromeUIScheme); + Q_ASSERT(it != m_protocolHandlers.end()); + jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release())); m_protocolHandlers.clear(); } |