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

Side by Side Diff: content/network/url_loader_impl.cc

Issue 2906543002: Add support for reading blobs when using the network service. (Closed)
Patch Set: fix threading issue with weakptr 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/network/net_adapters.cc ('k') | content/test/BUILD.gn » ('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 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/network/url_loader_impl.h" 5 #include "content/network/url_loader_impl.h"
6 6
7 #include "base/task_scheduler/post_task.h" 7 #include "base/task_scheduler/post_task.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/common/net_adapters.h"
10 #include "content/common/url_loader_factory.mojom.h" 11 #include "content/common/url_loader_factory.mojom.h"
11 #include "content/network/net_adapters.h"
12 #include "content/network/network_context.h" 12 #include "content/network/network_context.h"
13 #include "content/public/common/referrer.h" 13 #include "content/public/common/referrer.h"
14 #include "content/public/common/resource_response.h" 14 #include "content/public/common/resource_response.h"
15 #include "net/base/elements_upload_data_stream.h" 15 #include "net/base/elements_upload_data_stream.h"
16 #include "net/base/load_flags.h" 16 #include "net/base/load_flags.h"
17 #include "net/base/upload_bytes_element_reader.h" 17 #include "net/base/upload_bytes_element_reader.h"
18 #include "net/base/upload_file_element_reader.h" 18 #include "net/base/upload_file_element_reader.h"
19 #include "net/url_request/url_request_context.h" 19 #include "net/url_request/url_request_context.h"
20 20
21 namespace content { 21 namespace content {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 ReadMore(); 395 ReadMore();
396 } 396 }
397 397
398 void URLLoaderImpl::DeleteIfNeeded() { 398 void URLLoaderImpl::DeleteIfNeeded() {
399 bool has_data_pipe = pending_write_.get() || response_body_stream_.is_valid(); 399 bool has_data_pipe = pending_write_.get() || response_body_stream_.is_valid();
400 if (!connected_ && !has_data_pipe) 400 if (!connected_ && !has_data_pipe)
401 delete this; 401 delete this;
402 } 402 }
403 403
404 } // namespace content 404 } // namespace content
OLDNEW
« no previous file with comments | « content/network/net_adapters.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698