| Index: content/browser/storage_partition_impl_map.cc
|
| diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
|
| index 0e85d8a6238f7fab568733139fc376d4fcbf04a0..1ab960991f634826904d5794ba38f669ddb10263 100644
|
| --- a/content/browser/storage_partition_impl_map.cc
|
| +++ b/content/browser/storage_partition_impl_map.cc
|
| @@ -169,6 +169,14 @@ base::FilePath GetStoragePartitionDomainPath(
|
| .Append(base::FilePath::FromUTF8Unsafe(partition_domain));
|
| }
|
|
|
| +#if DCHECK_IS_ON()
|
| +bool IsBuiltInProtocol(const std::string& scheme) {
|
| + GURL scheme_as_gurl(scheme + url::kStandardSchemeSeparator);
|
| + DCHECK(scheme_as_gurl.is_valid()) << scheme;
|
| + return GetContentClient()->browser()->IsHandledURL(scheme_as_gurl);
|
| +}
|
| +#endif
|
| +
|
| // Helper function for doing a depth-first deletion of the data on disk.
|
| // Examines paths directly in |current_dir| (no recursion) and tries to
|
| // delete from disk anything that is in, or isn't a parent of something in
|
| @@ -436,11 +444,19 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
|
| browser_context_->IsOffTheRecord(),
|
| blob_storage_context).release());
|
| }
|
| +
|
| protocol_handlers[kChromeDevToolsScheme] =
|
| linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
| CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(),
|
| browser_context_->IsOffTheRecord()));
|
|
|
| +#if DCHECK_IS_ON()
|
| + // The ContentBrowserClient's implementation of IsHandledURL must know about
|
| + // all protocols handled by the content layer.
|
| + for (const auto& handler : protocol_handlers)
|
| + DCHECK(IsBuiltInProtocol(handler.first)) << handler.first;
|
| +#endif // DCHECK_IS_ON()
|
| +
|
| URLRequestInterceptorScopedVector request_interceptors;
|
| request_interceptors.push_back(
|
| ServiceWorkerRequestHandler::CreateInterceptor(
|
|
|