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

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

Issue 2886483002: Adds a new class HttpCache::Writers for multiple cache transactions reading from the network. (Closed)
Patch Set: Feedback addressed 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 (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
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void SetBeforeNetworkStartCallback( 160 void SetBeforeNetworkStartCallback(
161 const BeforeNetworkStartCallback& callback) override; 161 const BeforeNetworkStartCallback& callback) override;
162 void SetBeforeHeadersSentCallback( 162 void SetBeforeHeadersSentCallback(
163 const BeforeHeadersSentCallback& callback) override; 163 const BeforeHeadersSentCallback& callback) override;
164 int ResumeNetworkStart() override; 164 int ResumeNetworkStart() override;
165 void GetConnectionAttempts(ConnectionAttempts* out) const override; 165 void GetConnectionAttempts(ConnectionAttempts* out) const override;
166 166
167 // Returns the estimate of dynamically allocated memory in bytes. 167 // Returns the estimate of dynamically allocated memory in bytes.
168 size_t EstimateMemoryUsage() const; 168 size_t EstimateMemoryUsage() const;
169 169
170 RequestPriority priority() { return priority_; }
jkarlin 2017/06/12 18:30:32 this should be a const function
shivanisha 2017/06/14 02:33:16 done
171 PartialData* partial() { return partial_.get(); }
172
170 private: 173 private:
171 static const size_t kNumValidationHeaders = 2; 174 static const size_t kNumValidationHeaders = 2;
172 // Helper struct to pair a header name with its value, for 175 // Helper struct to pair a header name with its value, for
173 // headers used to validate cache entries. 176 // headers used to validate cache entries.
174 struct ValidationHeaders { 177 struct ValidationHeaders {
175 ValidationHeaders() : initialized(false) {} 178 ValidationHeaders() : initialized(false) {}
176 179
177 std::string values[kNumValidationHeaders]; 180 std::string values[kNumValidationHeaders];
178 bool initialized; 181 bool initialized;
179 }; 182 };
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 bool in_do_loop_; 518 bool in_do_loop_;
516 519
517 base::WeakPtrFactory<Transaction> weak_factory_; 520 base::WeakPtrFactory<Transaction> weak_factory_;
518 521
519 DISALLOW_COPY_AND_ASSIGN(Transaction); 522 DISALLOW_COPY_AND_ASSIGN(Transaction);
520 }; 523 };
521 524
522 } // namespace net 525 } // namespace net
523 526
524 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 527 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698