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

Side by Side Diff: net/http/http_cache_transaction.h

Issue 2330983002: Removes get upload progress plumbing. URLRequest queries the UploadDataStream directly. (Closed)
Patch Set: Feedback incorporated. Created 4 years, 3 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 | « net/http/http_basic_stream.cc ('k') | net/http/http_cache_transaction.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file declares HttpCache::Transaction, a private class of HttpCache so 5 // This file declares HttpCache::Transaction, a private class of HttpCache so
6 // it should only be included by http_cache.cc 6 // it should only be included by http_cache.cc
7 7
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_
10 10
11 #include <stddef.h> 11 #include <stddef.h>
12 #include <stdint.h> 12 #include <stdint.h>
13 13
14 #include <memory> 14 #include <memory>
15 #include <string> 15 #include <string>
16 16
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/time/time.h" 20 #include "base/time/time.h"
21 #include "net/base/completion_callback.h" 21 #include "net/base/completion_callback.h"
22 #include "net/base/io_buffer.h" 22 #include "net/base/io_buffer.h"
23 #include "net/base/ip_endpoint.h" 23 #include "net/base/ip_endpoint.h"
24 #include "net/base/load_states.h" 24 #include "net/base/load_states.h"
25 #include "net/base/net_error_details.h" 25 #include "net/base/net_error_details.h"
26 #include "net/base/request_priority.h" 26 #include "net/base/request_priority.h"
27 #include "net/base/upload_progress.h"
28 #include "net/http/http_cache.h" 27 #include "net/http/http_cache.h"
29 #include "net/http/http_request_headers.h" 28 #include "net/http/http_request_headers.h"
30 #include "net/http/http_response_headers.h" 29 #include "net/http/http_response_headers.h"
31 #include "net/http/http_response_info.h" 30 #include "net/http/http_response_info.h"
32 #include "net/http/http_transaction.h" 31 #include "net/http/http_transaction.h"
33 #include "net/http/partial_data.h" 32 #include "net/http/partial_data.h"
34 #include "net/log/net_log.h" 33 #include "net/log/net_log.h"
35 #include "net/socket/connection_attempts.h" 34 #include "net/socket/connection_attempts.h"
36 #include "net/websockets/websocket_handshake_stream_base.h" 35 #include "net/websockets/websocket_handshake_stream_base.h"
37 36
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int Read(IOBuffer* buf, 143 int Read(IOBuffer* buf,
145 int buf_len, 144 int buf_len,
146 const CompletionCallback& callback) override; 145 const CompletionCallback& callback) override;
147 void StopCaching() override; 146 void StopCaching() override;
148 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; 147 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
149 int64_t GetTotalReceivedBytes() const override; 148 int64_t GetTotalReceivedBytes() const override;
150 int64_t GetTotalSentBytes() const override; 149 int64_t GetTotalSentBytes() const override;
151 void DoneReading() override; 150 void DoneReading() override;
152 const HttpResponseInfo* GetResponseInfo() const override; 151 const HttpResponseInfo* GetResponseInfo() const override;
153 LoadState GetLoadState() const override; 152 LoadState GetLoadState() const override;
154 UploadProgress GetUploadProgress(void) const override;
155 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; 153 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override;
156 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 154 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
157 bool GetRemoteEndpoint(IPEndPoint* endpoint) const override; 155 bool GetRemoteEndpoint(IPEndPoint* endpoint) const override;
158 void PopulateNetErrorDetails(NetErrorDetails* details) const override; 156 void PopulateNetErrorDetails(NetErrorDetails* details) const override;
159 void SetPriority(RequestPriority priority) override; 157 void SetPriority(RequestPriority priority) override;
160 void SetWebSocketHandshakeStreamCreateHelper( 158 void SetWebSocketHandshakeStreamCreateHelper(
161 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; 159 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
162 void SetBeforeNetworkStartCallback( 160 void SetBeforeNetworkStartCallback(
163 const BeforeNetworkStartCallback& callback) override; 161 const BeforeNetworkStartCallback& callback) override;
164 void SetBeforeHeadersSentCallback( 162 void SetBeforeHeadersSentCallback(
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 bool vary_mismatch_; // The request doesn't match the stored vary data. 458 bool vary_mismatch_; // The request doesn't match the stored vary data.
461 bool couldnt_conditionalize_request_; 459 bool couldnt_conditionalize_request_;
462 bool bypass_lock_for_test_; // A test is exercising the cache lock. 460 bool bypass_lock_for_test_; // A test is exercising the cache lock.
463 bool fail_conditionalization_for_test_; // Fail ConditionalizeRequest. 461 bool fail_conditionalization_for_test_; // Fail ConditionalizeRequest.
464 scoped_refptr<IOBuffer> read_buf_; 462 scoped_refptr<IOBuffer> read_buf_;
465 int io_buf_len_; 463 int io_buf_len_;
466 int read_offset_; 464 int read_offset_;
467 int effective_load_flags_; 465 int effective_load_flags_;
468 int write_len_; 466 int write_len_;
469 std::unique_ptr<PartialData> partial_; // We are dealing with range requests. 467 std::unique_ptr<PartialData> partial_; // We are dealing with range requests.
470 UploadProgress final_upload_progress_;
471 CompletionCallback io_callback_; 468 CompletionCallback io_callback_;
472 469
473 // Members used to track data for histograms. 470 // Members used to track data for histograms.
474 // This cache_entry_status_ takes precedence over 471 // This cache_entry_status_ takes precedence over
475 // response_.cache_entry_status. In fact, response_.cache_entry_status must be 472 // response_.cache_entry_status. In fact, response_.cache_entry_status must be
476 // kept in sync with cache_entry_status_ (via SetResponse and 473 // kept in sync with cache_entry_status_ (via SetResponse and
477 // UpdateCacheEntryStatus). 474 // UpdateCacheEntryStatus).
478 HttpResponseInfo::CacheEntryStatus cache_entry_status_; 475 HttpResponseInfo::CacheEntryStatus cache_entry_status_;
479 ValidationCause validation_cause_; 476 ValidationCause validation_cause_;
480 base::TimeTicks entry_lock_waiting_since_; 477 base::TimeTicks entry_lock_waiting_since_;
(...skipping 25 matching lines...) Expand all
506 BeforeHeadersSentCallback before_headers_sent_callback_; 503 BeforeHeadersSentCallback before_headers_sent_callback_;
507 504
508 base::WeakPtrFactory<Transaction> weak_factory_; 505 base::WeakPtrFactory<Transaction> weak_factory_;
509 506
510 DISALLOW_COPY_AND_ASSIGN(Transaction); 507 DISALLOW_COPY_AND_ASSIGN(Transaction);
511 }; 508 };
512 509
513 } // namespace net 510 } // namespace net
514 511
515 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 512 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/http/http_basic_stream.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698