| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/appcache/appcache_subresource_url_factory.h" | 5 #include "content/browser/appcache/appcache_subresource_url_factory.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/browser/appcache/appcache_request_handler.h" | 9 #include "content/browser/appcache/appcache_request_handler.h" |
| 10 #include "content/browser/appcache/appcache_url_loader_job.h" | 10 #include "content/browser/appcache/appcache_url_loader_job.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 mojom::URLLoaderFactoryRequest request = mojo::MakeRequest(&loader_factory); | 41 mojom::URLLoaderFactoryRequest request = mojo::MakeRequest(&loader_factory); |
| 42 | 42 |
| 43 // This instance will get deleted when the client drops the connection. | 43 // This instance will get deleted when the client drops the connection. |
| 44 // Please see OnConnectionError() for details. | 44 // Please see OnConnectionError() for details. |
| 45 new AppCacheSubresourceURLFactory(std::move(request), | 45 new AppCacheSubresourceURLFactory(std::move(request), |
| 46 default_url_loader_factory_getter); | 46 default_url_loader_factory_getter); |
| 47 return loader_factory; | 47 return loader_factory; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void AppCacheSubresourceURLFactory::CreateLoaderAndStart( | 50 void AppCacheSubresourceURLFactory::CreateLoaderAndStart( |
| 51 mojom::URLLoaderAssociatedRequest url_loader_request, | 51 mojom::URLLoaderRequest url_loader_request, |
| 52 int32_t routing_id, | 52 int32_t routing_id, |
| 53 int32_t request_id, | 53 int32_t request_id, |
| 54 uint32_t options, | 54 uint32_t options, |
| 55 const ResourceRequest& request, | 55 const ResourceRequest& request, |
| 56 mojom::URLLoaderClientPtr client, | 56 mojom::URLLoaderClientPtr client, |
| 57 const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) { | 57 const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) { |
| 58 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 58 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 59 DLOG(WARNING) << "Received request for loading : " << request.url.spec(); | 59 DLOG(WARNING) << "Received request for loading : " << request.url.spec(); |
| 60 default_url_loader_factory_getter_->GetNetworkFactory() | 60 default_url_loader_factory_getter_->GetNetworkFactory() |
| 61 ->get() | 61 ->get() |
| 62 ->CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest(), routing_id, | 62 ->CreateLoaderAndStart(mojom::URLLoaderRequest(), routing_id, request_id, |
| 63 request_id, options, request, std::move(client), | 63 options, request, std::move(client), |
| 64 traffic_annotation); | 64 traffic_annotation); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void AppCacheSubresourceURLFactory::SyncLoad(int32_t routing_id, | 67 void AppCacheSubresourceURLFactory::SyncLoad(int32_t routing_id, |
| 68 int32_t request_id, | 68 int32_t request_id, |
| 69 const ResourceRequest& request, | 69 const ResourceRequest& request, |
| 70 SyncLoadCallback callback) { | 70 SyncLoadCallback callback) { |
| 71 NOTREACHED(); | 71 NOTREACHED(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void AppCacheSubresourceURLFactory::OnConnectionError() { | 74 void AppCacheSubresourceURLFactory::OnConnectionError() { |
| 75 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); | 75 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace content | 78 } // namespace content |
| OLD | NEW |