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

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

Issue 14625012: net: Return LoadTiming information in the case of a cache hit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix tests, add tests Created 7 years, 7 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_transaction.cc » ('j') | net/url_request/url_request.cc » ('J')
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 file declares HttpCache::Transaction, a private class of HttpCache so 5 // This file declares HttpCache::Transaction, a private class of HttpCache so
6 // it should only be included by http_cache.cc 6 // it should only be included by http_cache.cc
7 7
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_
10 10
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 // Resets cache_io_start_ to the current time, if |return_value| is 379 // Resets cache_io_start_ to the current time, if |return_value| is
380 // ERR_IO_PENDING. 380 // ERR_IO_PENDING.
381 // Returns |return_value|. 381 // Returns |return_value|.
382 int ResetCacheIOStart(int return_value); 382 int ResetCacheIOStart(int return_value);
383 383
384 void ScheduleDelayedLoop(base::TimeDelta delay, int result); 384 void ScheduleDelayedLoop(base::TimeDelta delay, int result);
385 void RunDelayedLoop(base::TimeTicks delay_start_time, 385 void RunDelayedLoop(base::TimeTicks delay_start_time,
386 base::TimeDelta intended_delay, int result); 386 base::TimeDelta intended_delay, int result);
387 387
388 // Updates |last_network_trans_load_timing_| from |network_trans_|, which must
389 // be non-NULL. Only called before deleting the old transaction.
390 void CacheLoadTimingInformation();
391
388 State next_state_; 392 State next_state_;
389 const HttpRequestInfo* request_; 393 const HttpRequestInfo* request_;
390 RequestPriority priority_; 394 RequestPriority priority_;
391 BoundNetLog net_log_; 395 BoundNetLog net_log_;
392 scoped_ptr<HttpRequestInfo> custom_request_; 396 scoped_ptr<HttpRequestInfo> custom_request_;
393 HttpRequestHeaders request_headers_copy_; 397 HttpRequestHeaders request_headers_copy_;
394 // If extra_headers specified a "if-modified-since" or "if-none-match", 398 // If extra_headers specified a "if-modified-since" or "if-none-match",
395 // |external_validation_| contains the value of those headers. 399 // |external_validation_| contains the value of those headers.
396 ValidationHeaders external_validation_; 400 ValidationHeaders external_validation_;
397 base::WeakPtr<HttpCache> cache_; 401 base::WeakPtr<HttpCache> cache_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // a delay on return, we must defer that delay until AddToEntry has been 444 // a delay on return, we must defer that delay until AddToEntry has been
441 // called, to avoid a race condition on the address returned. 445 // called, to avoid a race condition on the address returned.
442 base::TimeDelta deferred_cache_sensitivity_delay_; 446 base::TimeDelta deferred_cache_sensitivity_delay_;
443 bool defer_cache_sensitivity_delay_; 447 bool defer_cache_sensitivity_delay_;
444 448
445 // For sensitivity analysis, the simulated increase in cache service times, 449 // For sensitivity analysis, the simulated increase in cache service times,
446 // in percent. 450 // in percent.
447 int sensitivity_analysis_percent_increase_; 451 int sensitivity_analysis_percent_increase_;
448 452
449 HttpTransactionDelegate* transaction_delegate_; 453 HttpTransactionDelegate* transaction_delegate_;
454
455 // Load timing information for the last network request, if any. Set in the
456 // 304 and 206 response cases, as the network transaction may be destroyed
457 // before the caller requests load timing information.
458 scoped_ptr<LoadTimingInfo> last_network_trans_load_timing_;
450 }; 459 };
451 460
452 } // namespace net 461 } // namespace net
453 462
454 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 463 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/url_request/url_request.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698