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

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

Issue 10736066: Adding histograms showing fraction of page load times (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void CloseAllConnections(); 185 void CloseAllConnections();
186 186
187 // Close all idle connections. Will close all sockets not in active use. 187 // Close all idle connections. Will close all sockets not in active use.
188 void CloseIdleConnections(); 188 void CloseIdleConnections();
189 189
190 // Called whenever an external cache in the system reuses the resource 190 // Called whenever an external cache in the system reuses the resource
191 // referred to by |url| and |http_method|. 191 // referred to by |url| and |http_method|.
192 void OnExternalCacheHit(const GURL& url, const std::string& http_method); 192 void OnExternalCacheHit(const GURL& url, const std::string& http_method);
193 193
194 // HttpTransactionFactory implementation: 194 // HttpTransactionFactory implementation:
195 virtual int CreateTransaction(scoped_ptr<HttpTransaction>* trans) OVERRIDE; 195 virtual int CreateTransaction(scoped_ptr<HttpTransaction>* trans,
196 HttpTransactionDelegate* delegate) OVERRIDE;
196 virtual HttpCache* GetCache() OVERRIDE; 197 virtual HttpCache* GetCache() OVERRIDE;
197 virtual HttpNetworkSession* GetSession() OVERRIDE; 198 virtual HttpNetworkSession* GetSession() OVERRIDE;
198 199
199 protected: 200 protected:
200 // Disk cache entry data indices. 201 // Disk cache entry data indices.
201 enum { 202 enum {
202 kResponseInfoIndex = 0, 203 kResponseInfoIndex = 0,
203 kResponseContentIndex, 204 kResponseContentIndex,
204 kMetadataIndex, 205 kMetadataIndex,
205 206
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 PendingOpsMap pending_ops_; 393 PendingOpsMap pending_ops_;
393 394
394 scoped_ptr<PlaybackCacheMap> playback_cache_map_; 395 scoped_ptr<PlaybackCacheMap> playback_cache_map_;
395 396
396 DISALLOW_COPY_AND_ASSIGN(HttpCache); 397 DISALLOW_COPY_AND_ASSIGN(HttpCache);
397 }; 398 };
398 399
399 } // namespace net 400 } // namespace net
400 401
401 #endif // NET_HTTP_HTTP_CACHE_H_ 402 #endif // NET_HTTP_HTTP_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698