OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/callback.h" |
16 #include "base/debug/dump_without_crashing.h" | 17 #include "base/debug/dump_without_crashing.h" |
17 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
18 #include "base/logging.h" | 19 #include "base/logging.h" |
19 #include "base/memory/ptr_util.h" | 20 #include "base/memory/ptr_util.h" |
20 #include "base/optional.h" | 21 #include "base/optional.h" |
21 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
22 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
23 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
24 #include "base/threading/thread_task_runner_handle.h" | 25 #include "base/threading/thread_task_runner_handle.h" |
25 #include "base/time/time.h" | 26 #include "base/time/time.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 WebString::FromASCII(mac), WebString::FromUTF8(subject), web_san, | 342 WebString::FromASCII(mac), WebString::FromUTF8(subject), web_san, |
342 WebString::FromUTF8(issuer), valid_start.ToDoubleT(), | 343 WebString::FromUTF8(issuer), valid_start.ToDoubleT(), |
343 valid_expiry.ToDoubleT(), web_cert, sct_list); | 344 valid_expiry.ToDoubleT(), web_cert, sct_list); |
344 | 345 |
345 response->SetSecurityDetails(webSecurityDetails); | 346 response->SetSecurityDetails(webSecurityDetails); |
346 } | 347 } |
347 | 348 |
348 } // namespace | 349 } // namespace |
349 | 350 |
350 StreamOverrideParameters::StreamOverrideParameters() {} | 351 StreamOverrideParameters::StreamOverrideParameters() {} |
351 StreamOverrideParameters::~StreamOverrideParameters() {} | 352 StreamOverrideParameters::~StreamOverrideParameters() { |
| 353 if (on_delete) |
| 354 std::move(on_delete).Run(stream_url); |
| 355 } |
352 | 356 |
353 // This inner class exists since the WebURLLoader may be deleted while inside a | 357 // This inner class exists since the WebURLLoader may be deleted while inside a |
354 // call to WebURLLoaderClient. Refcounting is to keep the context from being | 358 // call to WebURLLoaderClient. Refcounting is to keep the context from being |
355 // deleted if it may have work to do after calling into the client. | 359 // deleted if it may have work to do after calling into the client. |
356 class WebURLLoaderImpl::Context : public base::RefCounted<Context> { | 360 class WebURLLoaderImpl::Context : public base::RefCounted<Context> { |
357 public: | 361 public: |
358 using ReceivedData = RequestPeer::ReceivedData; | 362 using ReceivedData = RequestPeer::ReceivedData; |
359 | 363 |
360 Context(WebURLLoaderImpl* loader, | 364 Context(WebURLLoaderImpl* loader, |
361 ResourceDispatcher* resource_dispatcher, | 365 ResourceDispatcher* resource_dispatcher, |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 int intra_priority_value) { | 1292 int intra_priority_value) { |
1289 context_->DidChangePriority(new_priority, intra_priority_value); | 1293 context_->DidChangePriority(new_priority, intra_priority_value); |
1290 } | 1294 } |
1291 | 1295 |
1292 void WebURLLoaderImpl::SetLoadingTaskRunner( | 1296 void WebURLLoaderImpl::SetLoadingTaskRunner( |
1293 base::SingleThreadTaskRunner* loading_task_runner) { | 1297 base::SingleThreadTaskRunner* loading_task_runner) { |
1294 context_->SetTaskRunner(loading_task_runner); | 1298 context_->SetTaskRunner(loading_task_runner); |
1295 } | 1299 } |
1296 | 1300 |
1297 } // namespace content | 1301 } // namespace content |
OLD | NEW |