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

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

Issue 2932453002: PlzNavigate: Release StreamHandle. (Closed)
Patch Set: Add real urls in tests ( 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
« no previous file with comments | « content/child/web_url_loader_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 WebString::FromASCII(mac), WebString::FromUTF8(subject), web_san, 345 WebString::FromASCII(mac), WebString::FromUTF8(subject), web_san,
345 WebString::FromUTF8(issuer), valid_start.ToDoubleT(), 346 WebString::FromUTF8(issuer), valid_start.ToDoubleT(),
346 valid_expiry.ToDoubleT(), web_cert, sct_list); 347 valid_expiry.ToDoubleT(), web_cert, sct_list);
347 348
348 response->SetSecurityDetails(webSecurityDetails); 349 response->SetSecurityDetails(webSecurityDetails);
349 } 350 }
350 351
351 } // namespace 352 } // namespace
352 353
353 StreamOverrideParameters::StreamOverrideParameters() {} 354 StreamOverrideParameters::StreamOverrideParameters() {}
354 StreamOverrideParameters::~StreamOverrideParameters() {} 355 StreamOverrideParameters::~StreamOverrideParameters() {
356 if (on_delete)
357 std::move(on_delete).Run(stream_url);
358 }
355 359
356 // This inner class exists since the WebURLLoader may be deleted while inside a 360 // This inner class exists since the WebURLLoader may be deleted while inside a
357 // call to WebURLLoaderClient. Refcounting is to keep the context from being 361 // call to WebURLLoaderClient. Refcounting is to keep the context from being
358 // deleted if it may have work to do after calling into the client. 362 // deleted if it may have work to do after calling into the client.
359 class WebURLLoaderImpl::Context : public base::RefCounted<Context> { 363 class WebURLLoaderImpl::Context : public base::RefCounted<Context> {
360 public: 364 public:
361 using ReceivedData = RequestPeer::ReceivedData; 365 using ReceivedData = RequestPeer::ReceivedData;
362 366
363 Context(WebURLLoaderImpl* loader, 367 Context(WebURLLoaderImpl* loader,
364 ResourceDispatcher* resource_dispatcher, 368 ResourceDispatcher* resource_dispatcher,
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 int intra_priority_value) { 1284 int intra_priority_value) {
1281 context_->DidChangePriority(new_priority, intra_priority_value); 1285 context_->DidChangePriority(new_priority, intra_priority_value);
1282 } 1286 }
1283 1287
1284 void WebURLLoaderImpl::SetLoadingTaskRunner( 1288 void WebURLLoaderImpl::SetLoadingTaskRunner(
1285 base::SingleThreadTaskRunner* loading_task_runner) { 1289 base::SingleThreadTaskRunner* loading_task_runner) {
1286 context_->SetTaskRunner(loading_task_runner); 1290 context_->SetTaskRunner(loading_task_runner);
1287 } 1291 }
1288 1292
1289 } // namespace content 1293 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698