| Index: content/browser/storage_partition_impl_map.cc
|
| ===================================================================
|
| --- content/browser/storage_partition_impl_map.cc (revision 184663)
|
| +++ content/browser/storage_partition_impl_map.cc (working copy)
|
| @@ -16,13 +16,9 @@
|
| #include "content/browser/appcache/chrome_appcache_service.h"
|
| #include "content/browser/fileapi/browser_file_system_helper.h"
|
| #include "content/browser/fileapi/chrome_blob_storage_context.h"
|
| -#include "content/browser/histogram_internals_request_job.h"
|
| #include "content/browser/loader/resource_request_info_impl.h"
|
| -#include "content/browser/net/view_blob_internals_job_factory.h"
|
| -#include "content/browser/net/view_http_cache_job_factory.h"
|
| #include "content/browser/resource_context_impl.h"
|
| #include "content/browser/storage_partition_impl.h"
|
| -#include "content/browser/tcmalloc_internals_request_job.h"
|
| #include "content/browser/webui/url_data_manager_backend.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -33,7 +29,6 @@
|
| #include "crypto/sha2.h"
|
| #include "net/url_request/url_request_context.h"
|
| #include "net/url_request/url_request_context_getter.h"
|
| -#include "webkit/appcache/view_appcache_internals_job.h"
|
| #include "webkit/blob/blob_data.h"
|
| #include "webkit/blob/blob_url_request_job_factory.h"
|
| #include "webkit/fileapi/file_system_url_request_job_factory.h"
|
| @@ -107,62 +102,6 @@
|
| DISALLOW_COPY_AND_ASSIGN(BlobProtocolHandler);
|
| };
|
|
|
| -// Adds a bunch of debugging urls. We use an interceptor instead of a protocol
|
| -// handler because we want to reuse the chrome://scheme (everyone is familiar
|
| -// with it, and no need to expose the content/chrome separation through our UI).
|
| -class DeveloperProtocolHandler
|
| - : public net::URLRequestJobFactory::ProtocolHandler {
|
| - public:
|
| - DeveloperProtocolHandler(
|
| - AppCacheService* appcache_service,
|
| - ChromeBlobStorageContext* blob_storage_context)
|
| - : appcache_service_(appcache_service),
|
| - blob_storage_context_(blob_storage_context) {}
|
| - virtual ~DeveloperProtocolHandler() {}
|
| -
|
| - virtual net::URLRequestJob* MaybeCreateJob(
|
| - net::URLRequest* request,
|
| - net::NetworkDelegate* network_delegate) const OVERRIDE {
|
| - // Check for chrome://view-http-cache/*, which uses its own job type.
|
| - if (ViewHttpCacheJobFactory::IsSupportedURL(request->url()))
|
| - return ViewHttpCacheJobFactory::CreateJobForRequest(request,
|
| - network_delegate);
|
| -
|
| - // Next check for chrome://appcache-internals/, which uses its own job type.
|
| - if (request->url().SchemeIs(chrome::kChromeUIScheme) &&
|
| - request->url().host() == chrome::kChromeUIAppCacheInternalsHost) {
|
| - return appcache::ViewAppCacheInternalsJobFactory::CreateJobForRequest(
|
| - request, network_delegate, appcache_service_);
|
| - }
|
| -
|
| - // Next check for chrome://blob-internals/, which uses its own job type.
|
| - if (ViewBlobInternalsJobFactory::IsSupportedURL(request->url())) {
|
| - return ViewBlobInternalsJobFactory::CreateJobForRequest(
|
| - request, network_delegate, blob_storage_context_->controller());
|
| - }
|
| -
|
| -#if defined(USE_TCMALLOC)
|
| - // Next check for chrome://tcmalloc/, which uses its own job type.
|
| - if (request->url().SchemeIs(chrome::kChromeUIScheme) &&
|
| - request->url().host() == chrome::kChromeUITcmallocHost) {
|
| - return new TcmallocInternalsRequestJob(request, network_delegate);
|
| - }
|
| -#endif
|
| -
|
| - // Next check for chrome://histograms/, which uses its own job type.
|
| - if (request->url().SchemeIs(chrome::kChromeUIScheme) &&
|
| - request->url().host() == chrome::kChromeUIHistogramHost) {
|
| - return new HistogramInternalsRequestJob(request, network_delegate);
|
| - }
|
| -
|
| - return NULL;
|
| - }
|
| -
|
| - private:
|
| - AppCacheService* appcache_service_;
|
| - ChromeBlobStorageContext* blob_storage_context_;
|
| -};
|
| -
|
| // These constants are used to create the directory structure under the profile
|
| // where renderers with a non-default storage partition keep their persistent
|
| // state. This will contain a set of directories that partially mirror the
|
| @@ -454,14 +393,12 @@
|
| file_system_protocol_handler(
|
| CreateFileSystemProtocolHandler(partition->GetFileSystemContext()));
|
| scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| - developer_protocol_handler(
|
| - new DeveloperProtocolHandler(partition->GetAppCacheService(),
|
| - blob_storage_context));
|
| - scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| chrome_protocol_handler(
|
| URLDataManagerBackend::CreateProtocolHandler(
|
| browser_context_->GetResourceContext(),
|
| - browser_context_->IsOffTheRecord()));
|
| + browser_context_->IsOffTheRecord(),
|
| + partition->GetAppCacheService(),
|
| + blob_storage_context));
|
| scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| chrome_devtools_protocol_handler(
|
| CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(),
|
| @@ -472,14 +409,14 @@
|
| partition->SetURLRequestContext(
|
| GetContentClient()->browser()->CreateRequestContext(browser_context_,
|
| blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(),
|
| - developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
|
| + chrome_protocol_handler.Pass(),
|
| chrome_devtools_protocol_handler.Pass()));
|
| } else {
|
| partition->SetURLRequestContext(
|
| GetContentClient()->browser()->CreateRequestContextForStoragePartition(
|
| browser_context_, partition->GetPath(), in_memory,
|
| blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(),
|
| - developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
|
| + chrome_protocol_handler.Pass(),
|
| chrome_devtools_protocol_handler.Pass()));
|
| }
|
| partition->SetMediaURLRequestContext(
|
|
|