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

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

Issue 135373002: Added SSLHostInfo. Storing of server host info to our standard disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with TOT Created 6 years, 11 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 | Annotate | Revision Log
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 2616 (any exceptions are called out in the code). 7 // caching logic follows RFC 2616 (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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 // Must remain at the end of the enum. 205 // Must remain at the end of the enum.
206 kNumCacheEntryDataIndices 206 kNumCacheEntryDataIndices
207 }; 207 };
208 friend class ViewCacheHelper; 208 friend class ViewCacheHelper;
209 209
210 private: 210 private:
211 // Types -------------------------------------------------------------------- 211 // Types --------------------------------------------------------------------
212 212
213 class MetadataWriter; 213 class MetadataWriter;
214 class SSLHostInfoFactoryAdaptor;
214 class Transaction; 215 class Transaction;
215 class WorkItem; 216 class WorkItem;
216 friend class Transaction; 217 friend class Transaction;
217 struct PendingOp; // Info for an entry under construction. 218 struct PendingOp; // Info for an entry under construction.
218 219
219 typedef std::list<Transaction*> TransactionList; 220 typedef std::list<Transaction*> TransactionList;
220 typedef std::list<WorkItem*> WorkItemList; 221 typedef std::list<WorkItem*> WorkItemList;
221 222
222 struct ActiveEntry { 223 struct ActiveEntry {
223 explicit ActiveEntry(disk_cache::Entry* entry); 224 explicit ActiveEntry(disk_cache::Entry* entry);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // Variables ---------------------------------------------------------------- 375 // Variables ----------------------------------------------------------------
375 376
376 NetLog* net_log_; 377 NetLog* net_log_;
377 378
378 // Used when lazily constructing the disk_cache_. 379 // Used when lazily constructing the disk_cache_.
379 scoped_ptr<BackendFactory> backend_factory_; 380 scoped_ptr<BackendFactory> backend_factory_;
380 bool building_backend_; 381 bool building_backend_;
381 382
382 Mode mode_; 383 Mode mode_;
383 384
384 const scoped_ptr<HttpTransactionFactory> network_layer_; 385 // TODO(rtenneti): ssl_host_info_factory_ should be const.
386 scoped_ptr<SSLHostInfoFactoryAdaptor> ssl_host_info_factory_;
387
388 // TODO(rtenneti): network_layer_ should be const.
389 scoped_ptr<HttpTransactionFactory> network_layer_;
385 scoped_ptr<disk_cache::Backend> disk_cache_; 390 scoped_ptr<disk_cache::Backend> disk_cache_;
386 391
387 // The set of active entries indexed by cache key. 392 // The set of active entries indexed by cache key.
388 ActiveEntriesMap active_entries_; 393 ActiveEntriesMap active_entries_;
389 394
390 // The set of doomed entries. 395 // The set of doomed entries.
391 ActiveEntriesSet doomed_entries_; 396 ActiveEntriesSet doomed_entries_;
392 397
393 // The set of entries "under construction". 398 // The set of entries "under construction".
394 PendingOpsMap pending_ops_; 399 PendingOpsMap pending_ops_;
395 400
396 scoped_ptr<PlaybackCacheMap> playback_cache_map_; 401 scoped_ptr<PlaybackCacheMap> playback_cache_map_;
397 402
398 DISALLOW_COPY_AND_ASSIGN(HttpCache); 403 DISALLOW_COPY_AND_ASSIGN(HttpCache);
399 }; 404 };
400 405
401 } // namespace net 406 } // namespace net
402 407
403 #endif // NET_HTTP_HTTP_CACHE_H_ 408 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698