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

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

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more tests Created 7 years, 9 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
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_cache_transaction_unittest.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 #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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 458
459 bool HttpCache::Transaction::GetLoadTimingInfo( 459 bool HttpCache::Transaction::GetLoadTimingInfo(
460 LoadTimingInfo* load_timing_info) const { 460 LoadTimingInfo* load_timing_info) const {
461 if (network_trans_) 461 if (network_trans_)
462 return network_trans_->GetLoadTimingInfo(load_timing_info); 462 return network_trans_->GetLoadTimingInfo(load_timing_info);
463 // Don't modify |load_timing_info| when reading from the cache instead of the 463 // Don't modify |load_timing_info| when reading from the cache instead of the
464 // network. 464 // network.
465 return false; 465 return false;
466 } 466 }
467 467
468 void HttpCache::Transaction::SetPriority(RequestPriority priority) {
469 if (network_trans_)
470 network_trans_->SetPriority(priority);
akalin 2013/03/13 18:53:04 One question: can HttpCache::Transaction have mult
mmenke 2013/03/13 19:01:23 RestartNetworkRequest() does this. There may be o
471 }
472
468 //----------------------------------------------------------------------------- 473 //-----------------------------------------------------------------------------
469 474
470 void HttpCache::Transaction::DoCallback(int rv) { 475 void HttpCache::Transaction::DoCallback(int rv) {
471 DCHECK(rv != ERR_IO_PENDING); 476 DCHECK(rv != ERR_IO_PENDING);
472 DCHECK(!callback_.is_null()); 477 DCHECK(!callback_.is_null());
473 478
474 read_buf_ = NULL; // Release the buffer before invoking the callback. 479 read_buf_ = NULL; // Release the buffer before invoking the callback.
475 480
476 // Since Run may result in Read being called, clear callback_ up front. 481 // Since Run may result in Read being called, clear callback_ up front.
477 CompletionCallback c = callback_; 482 CompletionCallback c = callback_;
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 } 2508 }
2504 2509
2505 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { 2510 int HttpCache::Transaction::ResetCacheIOStart(int return_value) {
2506 DCHECK(cache_io_start_.is_null()); 2511 DCHECK(cache_io_start_.is_null());
2507 if (return_value == ERR_IO_PENDING) 2512 if (return_value == ERR_IO_PENDING)
2508 cache_io_start_ = base::TimeTicks::Now(); 2513 cache_io_start_ = base::TimeTicks::Now();
2509 return return_value; 2514 return return_value;
2510 } 2515 }
2511 2516
2512 } // namespace net 2517 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_cache_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698