OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/renderer/fetchers/associated_resource_fetcher_impl.h" | 5 #include "content/renderer/fetchers/associated_resource_fetcher_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 AssociatedResourceFetcherImpl::~AssociatedResourceFetcherImpl() { | 120 AssociatedResourceFetcherImpl::~AssociatedResourceFetcherImpl() { |
121 if (!loader_) | 121 if (!loader_) |
122 return; | 122 return; |
123 | 123 |
124 DCHECK(client_); | 124 DCHECK(client_); |
125 | 125 |
126 if (!client_->completed()) | 126 if (!client_->completed()) |
127 loader_->cancel(); | 127 loader_->cancel(); |
128 } | 128 } |
129 | 129 |
130 void AssociatedResourceFetcherImpl::SetSkipServiceWorker( | 130 void AssociatedResourceFetcherImpl::SetServiceWorkerMode( |
131 blink::WebURLRequest::SkipServiceWorker skip_service_worker) { | 131 blink::WebURLRequest::ServiceWorkerMode service_worker_mode) { |
132 DCHECK(!request_.isNull()); | 132 DCHECK(!request_.isNull()); |
133 DCHECK(!loader_); | 133 DCHECK(!loader_); |
134 | 134 |
135 request_.setSkipServiceWorker(skip_service_worker); | 135 request_.setServiceWorkerMode(service_worker_mode); |
136 } | 136 } |
137 | 137 |
138 void AssociatedResourceFetcherImpl::SetCachePolicy( | 138 void AssociatedResourceFetcherImpl::SetCachePolicy( |
139 blink::WebCachePolicy policy) { | 139 blink::WebCachePolicy policy) { |
140 DCHECK(!request_.isNull()); | 140 DCHECK(!request_.isNull()); |
141 DCHECK(!loader_); | 141 DCHECK(!loader_); |
142 | 142 |
143 request_.setCachePolicy(policy); | 143 request_.setCachePolicy(policy); |
144 } | 144 } |
145 | 145 |
(...skipping 28 matching lines...) Expand all Loading... |
174 // No need to hold on to the request; reset it now. | 174 // No need to hold on to the request; reset it now. |
175 request_ = blink::WebURLRequest(); | 175 request_ = blink::WebURLRequest(); |
176 } | 176 } |
177 | 177 |
178 void AssociatedResourceFetcherImpl::Cancel() { | 178 void AssociatedResourceFetcherImpl::Cancel() { |
179 loader_->cancel(); | 179 loader_->cancel(); |
180 client_->Cancel(); | 180 client_->Cancel(); |
181 } | 181 } |
182 | 182 |
183 } // namespace content | 183 } // namespace content |
OLD | NEW |