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

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

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 | « no previous file | net/http/infinite_cache.h » ('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 #include "net/http/http_cache_transaction.h" 5 #include "net/http/http_cache_transaction.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return ERR_UNEXPECTED; 257 return ERR_UNEXPECTED;
258 258
259 SetRequest(net_log, request); 259 SetRequest(net_log, request);
260 if (infinite_cache_transaction_.get()) { 260 if (infinite_cache_transaction_.get()) {
261 if ((effective_load_flags_ & LOAD_BYPASS_CACHE) || 261 if ((effective_load_flags_ & LOAD_BYPASS_CACHE) ||
262 (effective_load_flags_ & LOAD_ONLY_FROM_CACHE) || 262 (effective_load_flags_ & LOAD_ONLY_FROM_CACHE) ||
263 (effective_load_flags_ & LOAD_DISABLE_CACHE) || 263 (effective_load_flags_ & LOAD_DISABLE_CACHE) ||
264 (effective_load_flags_ & LOAD_VALIDATE_CACHE) || 264 (effective_load_flags_ & LOAD_VALIDATE_CACHE) ||
265 (effective_load_flags_ & LOAD_PREFERRING_CACHE) || 265 (effective_load_flags_ & LOAD_PREFERRING_CACHE) ||
266 partial_.get()) { 266 partial_.get()) {
267 if (effective_load_flags_ & LOAD_PREFERRING_CACHE)
268 infinite_cache_transaction_->OnBackForwardNavigation();
gavinp 2012/10/26 22:06:14 Oops: I made this comment on an earlier version bu
rvargas (doing something else) 2012/10/26 22:36:12 Kind of. I considered passing effective_load_flags
267 infinite_cache_transaction_.reset(); 269 infinite_cache_transaction_.reset();
268 } else { 270 } else {
269 infinite_cache_transaction_->OnRequestStart(request); 271 infinite_cache_transaction_->OnRequestStart(request);
270 } 272 }
271 } 273 }
272 274
273 // We have to wait until the backend is initialized so we start the SM. 275 // We have to wait until the backend is initialized so we start the SM.
274 next_state_ = STATE_GET_BACKEND; 276 next_state_ = STATE_GET_BACKEND;
275 int rv = DoLoop(OK); 277 int rv = DoLoop(OK);
276 278
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 } 2486 }
2485 2487
2486 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { 2488 int HttpCache::Transaction::ResetCacheIOStart(int return_value) {
2487 DCHECK(cache_io_start_.is_null()); 2489 DCHECK(cache_io_start_.is_null());
2488 if (return_value == ERR_IO_PENDING) 2490 if (return_value == ERR_IO_PENDING)
2489 cache_io_start_ = base::TimeTicks::Now(); 2491 cache_io_start_ = base::TimeTicks::Now();
2490 return return_value; 2492 return return_value;
2491 } 2493 }
2492 2494
2493 } // namespace net 2495 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/infinite_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698