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

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

Issue 11267028: Http cache: Measure back navigations on the infinite cache simulation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « net/http/http_cache_transaction.cc ('k') | net/http/infinite_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) 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 is the interface of a simulated infinite cache. The purpose of this 5 // This is the interface of a simulated infinite cache. The purpose of this
6 // code is to evaluate the performance of an HTTP cache that is not constrained 6 // code is to evaluate the performance of an HTTP cache that is not constrained
7 // to evict resources. 7 // to evict resources.
8 8
9 #ifndef NET_HTTP_INFINITE_CACHE_H_ 9 #ifndef NET_HTTP_INFINITE_CACHE_H_
10 #define NET_HTTP_INFINITE_CACHE_H_ 10 #define NET_HTTP_INFINITE_CACHE_H_
(...skipping 25 matching lines...) Expand all
36 // every request that goes through the HttpCache. This object is notified when 36 // every request that goes through the HttpCache. This object is notified when
37 // relevant steps are reached while processing the request. 37 // relevant steps are reached while processing the request.
38 class NET_EXPORT_PRIVATE InfiniteCacheTransaction { 38 class NET_EXPORT_PRIVATE InfiniteCacheTransaction {
39 public: 39 public:
40 explicit InfiniteCacheTransaction(InfiniteCache* cache); 40 explicit InfiniteCacheTransaction(InfiniteCache* cache);
41 ~InfiniteCacheTransaction(); 41 ~InfiniteCacheTransaction();
42 42
43 // Called when a new HttpTransaction is started. 43 // Called when a new HttpTransaction is started.
44 void OnRequestStart(const HttpRequestInfo* request); 44 void OnRequestStart(const HttpRequestInfo* request);
45 45
46 // Called when the transaction corresponds to a back navigation.
47 void OnBackForwardNavigation();
48
46 // Called when the response headers are available. 49 // Called when the response headers are available.
47 void OnResponseReceived(const HttpResponseInfo* response); 50 void OnResponseReceived(const HttpResponseInfo* response);
48 51
49 // Called when the response data is received from the network. 52 // Called when the response data is received from the network.
50 void OnDataRead(const char* data, int data_len); 53 void OnDataRead(const char* data, int data_len);
51 54
52 // Called when the resource is marked as truncated by the HttpCache. 55 // Called when the resource is marked as truncated by the HttpCache.
53 void OnTruncatedResponse(); 56 void OnTruncatedResponse();
54 57
55 // Called when the resource is served from the cache, so OnDataRead will not 58 // Called when the resource is served from the cache, so OnDataRead will not
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 scoped_refptr<base::SequencedWorkerPool> worker_pool_; 113 scoped_refptr<base::SequencedWorkerPool> worker_pool_;
111 scoped_refptr<base::SequencedTaskRunner> task_runner_; 114 scoped_refptr<base::SequencedTaskRunner> task_runner_;
112 base::RepeatingTimer<InfiniteCache> timer_; 115 base::RepeatingTimer<InfiniteCache> timer_;
113 116
114 DISALLOW_COPY_AND_ASSIGN(InfiniteCache); 117 DISALLOW_COPY_AND_ASSIGN(InfiniteCache);
115 }; 118 };
116 119
117 } // namespace net 120 } // namespace net
118 121
119 #endif // NET_HTTP_INFINITE_CACHE_H_ 122 #endif // NET_HTTP_INFINITE_CACHE_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/http/infinite_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698