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

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

Issue 2886483002: Adds a new class HttpCache::Writers for multiple cache transactions reading from the network. (Closed)
Patch Set: jkarlin feebdack addressed Created 3 years, 5 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 a HttpTransactionFactory implementation that can be 5 // This file declares a HttpTransactionFactory implementation that can be
6 // layered on top of another HttpTransactionFactory to add HTTP caching. The 6 // layered on top of another HttpTransactionFactory to add HTTP caching. The
7 // caching logic follows RFC 7234 (any exceptions are called out in the code). 7 // caching logic follows RFC 7234 (any exceptions are called out in the code).
8 // 8 //
9 // The HttpCache takes a disk_cache::Backend as a parameter, and uses that for 9 // The HttpCache takes a disk_cache::Backend as a parameter, and uses that for
10 // the cache storage. 10 // the cache storage.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 kMetadataIndex, 239 kMetadataIndex,
240 240
241 // Must remain at the end of the enum. 241 // Must remain at the end of the enum.
242 kNumCacheEntryDataIndices 242 kNumCacheEntryDataIndices
243 }; 243 };
244 244
245 class MetadataWriter; 245 class MetadataWriter;
246 class QuicServerInfoFactoryAdaptor; 246 class QuicServerInfoFactoryAdaptor;
247 class Transaction; 247 class Transaction;
248 class WorkItem; 248 class WorkItem;
249 class Writers;
250 friend class WritersTest; // To access ActiveEntry in the test class.
249 friend class Transaction; 251 friend class Transaction;
250 friend class ViewCacheHelper; 252 friend class ViewCacheHelper;
251 struct PendingOp; // Info for an entry under construction. 253 struct PendingOp; // Info for an entry under construction.
252 254
253 // To help with testing. 255 // To help with testing.
254 friend class MockHttpCache; 256 friend class MockHttpCache;
255 257
256 using TransactionList = std::list<Transaction*>; 258 using TransactionList = std::list<Transaction*>;
257 using TransactionSet = std::unordered_set<Transaction*>; 259 using TransactionSet = std::unordered_set<Transaction*>;
258 typedef std::list<std::unique_ptr<WorkItem>> WorkItemList; 260 typedef std::list<std::unique_ptr<WorkItem>> WorkItemList;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 THREAD_CHECKER(thread_checker_); 552 THREAD_CHECKER(thread_checker_);
551 553
552 base::WeakPtrFactory<HttpCache> weak_factory_; 554 base::WeakPtrFactory<HttpCache> weak_factory_;
553 555
554 DISALLOW_COPY_AND_ASSIGN(HttpCache); 556 DISALLOW_COPY_AND_ASSIGN(HttpCache);
555 }; 557 };
556 558
557 } // namespace net 559 } // namespace net
558 560
559 #endif // NET_HTTP_HTTP_CACHE_H_ 561 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698