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

Side by Side Diff: chrome/browser/devtools/devtools_network_transaction.cc

Issue 2519473002: Fixes the cache lock issue. (Closed)
Patch Set: Initial patch Created 4 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/devtools/devtools_network_transaction.h" 5 #include "chrome/browser/devtools/devtools_network_transaction.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "chrome/browser/devtools/devtools_network_controller.h" 10 #include "chrome/browser/devtools/devtools_network_controller.h"
(...skipping 27 matching lines...) Expand all
38 interceptor_->StopThrottle(throttle_callback_); 38 interceptor_->StopThrottle(throttle_callback_);
39 } 39 }
40 40
41 void DevToolsNetworkTransaction::IOCallback( 41 void DevToolsNetworkTransaction::IOCallback(
42 const net::CompletionCallback& callback, bool start, int result) { 42 const net::CompletionCallback& callback, bool start, int result) {
43 result = Throttle(callback, start, result); 43 result = Throttle(callback, start, result);
44 if (result != net::ERR_IO_PENDING) 44 if (result != net::ERR_IO_PENDING)
45 callback.Run(result); 45 callback.Run(result);
46 } 46 }
47 47
48 void DevToolsNetworkTransaction::Orphan(
49 std::unique_ptr<HttpTransaction> trans) {
50 NOTREACHED();
51 return;
52 }
53
48 int DevToolsNetworkTransaction::Throttle( 54 int DevToolsNetworkTransaction::Throttle(
49 const net::CompletionCallback& callback, bool start, int result) { 55 const net::CompletionCallback& callback, bool start, int result) {
50 if (failed_) 56 if (failed_)
51 return net::ERR_INTERNET_DISCONNECTED; 57 return net::ERR_INTERNET_DISCONNECTED;
52 if (!interceptor_ || result < 0) 58 if (!interceptor_ || result < 0)
53 return result; 59 return result;
54 60
55 base::TimeTicks send_end; 61 base::TimeTicks send_end;
56 if (start) { 62 if (start) {
57 throttled_byte_count_ += network_transaction_->GetTotalReceivedBytes(); 63 throttled_byte_count_ += network_transaction_->GetTotalReceivedBytes();
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (CheckFailed()) 297 if (CheckFailed())
292 return net::ERR_INTERNET_DISCONNECTED; 298 return net::ERR_INTERNET_DISCONNECTED;
293 return network_transaction_->ResumeNetworkStart(); 299 return network_transaction_->ResumeNetworkStart();
294 } 300 }
295 301
296 void 302 void
297 DevToolsNetworkTransaction::GetConnectionAttempts(net::ConnectionAttempts* out) 303 DevToolsNetworkTransaction::GetConnectionAttempts(net::ConnectionAttempts* out)
298 const { 304 const {
299 network_transaction_->GetConnectionAttempts(out); 305 network_transaction_->GetConnectionAttempts(out);
300 } 306 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698