Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1259)

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 2932453002: PlzNavigate: Release StreamHandle. (Closed)
Patch Set: Addressed comments (+Rebase) Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/files/file_path.h" 17 #include "base/files/file_path.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
19 #include "base/optional.h" 20 #include "base/optional.h"
20 #include "base/single_thread_task_runner.h" 21 #include "base/single_thread_task_runner.h"
21 #include "base/strings/string_number_conversions.h" 22 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
23 #include "base/threading/thread_task_runner_handle.h" 24 #include "base/threading/thread_task_runner_handle.h"
24 #include "base/time/time.h" 25 #include "base/time/time.h"
25 #include "build/build_config.h" 26 #include "build/build_config.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 WebString::FromASCII(mac), WebString::FromUTF8(subject), web_san, 341 WebString::FromASCII(mac), WebString::FromUTF8(subject), web_san,
341 WebString::FromUTF8(issuer), valid_start.ToDoubleT(), 342 WebString::FromUTF8(issuer), valid_start.ToDoubleT(),
342 valid_expiry.ToDoubleT(), web_cert, sct_list); 343 valid_expiry.ToDoubleT(), web_cert, sct_list);
343 344
344 response->SetSecurityDetails(webSecurityDetails); 345 response->SetSecurityDetails(webSecurityDetails);
345 } 346 }
346 347
347 } // namespace 348 } // namespace
348 349
349 StreamOverrideParameters::StreamOverrideParameters() {} 350 StreamOverrideParameters::StreamOverrideParameters() {}
350 StreamOverrideParameters::~StreamOverrideParameters() {} 351 StreamOverrideParameters::~StreamOverrideParameters() {
352 if (on_delete)
353 std::move(on_delete).Run(stream_url);
354 }
351 355
352 // This inner class exists since the WebURLLoader may be deleted while inside a 356 // This inner class exists since the WebURLLoader may be deleted while inside a
353 // call to WebURLLoaderClient. Refcounting is to keep the context from being 357 // call to WebURLLoaderClient. Refcounting is to keep the context from being
354 // deleted if it may have work to do after calling into the client. 358 // deleted if it may have work to do after calling into the client.
355 class WebURLLoaderImpl::Context : public base::RefCounted<Context> { 359 class WebURLLoaderImpl::Context : public base::RefCounted<Context> {
356 public: 360 public:
357 using ReceivedData = RequestPeer::ReceivedData; 361 using ReceivedData = RequestPeer::ReceivedData;
358 362
359 Context(WebURLLoaderImpl* loader, 363 Context(WebURLLoaderImpl* loader,
360 ResourceDispatcher* resource_dispatcher, 364 ResourceDispatcher* resource_dispatcher,
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 int intra_priority_value) { 1280 int intra_priority_value) {
1277 context_->DidChangePriority(new_priority, intra_priority_value); 1281 context_->DidChangePriority(new_priority, intra_priority_value);
1278 } 1282 }
1279 1283
1280 void WebURLLoaderImpl::SetLoadingTaskRunner( 1284 void WebURLLoaderImpl::SetLoadingTaskRunner(
1281 base::SingleThreadTaskRunner* loading_task_runner) { 1285 base::SingleThreadTaskRunner* loading_task_runner) {
1282 context_->SetTaskRunner(loading_task_runner); 1286 context_->SetTaskRunner(loading_task_runner);
1283 } 1287 }
1284 1288
1285 } // namespace content 1289 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698