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

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

Issue 3195017: Http cache: Make sure that the memory used to receive the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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
« no previous file with comments | « no previous file | net/http/http_cache.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 void OnIOComplete(int result, PendingOp* entry); 340 void OnIOComplete(int result, PendingOp* entry);
341 341
342 // Processes the backend creation notification. 342 // Processes the backend creation notification.
343 void OnBackendCreated(int result, PendingOp* pending_op); 343 void OnBackendCreated(int result, PendingOp* pending_op);
344 344
345 345
346 // Variables ---------------------------------------------------------------- 346 // Variables ----------------------------------------------------------------
347 347
348 // Used when lazily constructing the disk_cache_. 348 // Used when lazily constructing the disk_cache_.
349 scoped_ptr<BackendFactory> backend_factory_; 349 scoped_ptr<BackendFactory> backend_factory_;
350 disk_cache::Backend* temp_backend_;
351 bool building_backend_; 350 bool building_backend_;
352 351
353 Mode mode_; 352 Mode mode_;
354 353
355 scoped_ptr<HttpTransactionFactory> network_layer_; 354 scoped_ptr<HttpTransactionFactory> network_layer_;
356 scoped_ptr<disk_cache::Backend> disk_cache_; 355 scoped_ptr<disk_cache::Backend> disk_cache_;
357 356
358 // The set of active entries indexed by cache key. 357 // The set of active entries indexed by cache key.
359 ActiveEntriesMap active_entries_; 358 ActiveEntriesMap active_entries_;
360 359
361 // The set of doomed entries. 360 // The set of doomed entries.
362 ActiveEntriesSet doomed_entries_; 361 ActiveEntriesSet doomed_entries_;
363 362
364 // The set of entries "under construction". 363 // The set of entries "under construction".
365 PendingOpsMap pending_ops_; 364 PendingOpsMap pending_ops_;
366 365
367 ScopedRunnableMethodFactory<HttpCache> task_factory_; 366 ScopedRunnableMethodFactory<HttpCache> task_factory_;
368 367
369 bool enable_range_support_; 368 bool enable_range_support_;
370 369
371 typedef base::hash_map<std::string, int> PlaybackCacheMap; 370 typedef base::hash_map<std::string, int> PlaybackCacheMap;
372 scoped_ptr<PlaybackCacheMap> playback_cache_map_; 371 scoped_ptr<PlaybackCacheMap> playback_cache_map_;
373 372
374 DISALLOW_COPY_AND_ASSIGN(HttpCache); 373 DISALLOW_COPY_AND_ASSIGN(HttpCache);
375 }; 374 };
376 375
377 } // namespace net 376 } // namespace net
378 377
379 #endif // NET_HTTP_HTTP_CACHE_H_ 378 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698