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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 2092563002: Set up field trials for SSL read/write buffer sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 if (request_creation_time_.is_null()) { 1508 if (request_creation_time_.is_null()) {
1509 NOTREACHED() 1509 NOTREACHED()
1510 << "The same transaction shouldn't start twice without new timing."; 1510 << "The same transaction shouldn't start twice without new timing.";
1511 return; 1511 return;
1512 } 1512 }
1513 1513
1514 base::TimeDelta to_start = base::Time::Now() - request_creation_time_; 1514 base::TimeDelta to_start = base::Time::Now() - request_creation_time_;
1515 request_creation_time_ = base::Time(); 1515 request_creation_time_ = base::Time();
1516 1516
1517 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start); 1517 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte", to_start);
1518 if (request_info_.upload_data_stream &&
1519 request_info_.upload_data_stream->size() > 1024 * 1024) {
1520 UMA_HISTOGRAM_MEDIUM_TIMES("Net.HttpTimeToFirstByte.LargeUpload", to_start);
1521 }
1518 } 1522 }
1519 1523
1520 void URLRequestHttpJob::ResetTimer() { 1524 void URLRequestHttpJob::ResetTimer() {
1521 if (!request_creation_time_.is_null()) { 1525 if (!request_creation_time_.is_null()) {
1522 NOTREACHED() 1526 NOTREACHED()
1523 << "The timer was reset before it was recorded."; 1527 << "The timer was reset before it was recorded.";
1524 return; 1528 return;
1525 } 1529 }
1526 request_creation_time_ = base::Time::Now(); 1530 request_creation_time_ = base::Time::Now();
1527 } 1531 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 return override_response_headers_.get() ? 1668 return override_response_headers_.get() ?
1665 override_response_headers_.get() : 1669 override_response_headers_.get() :
1666 transaction_->GetResponseInfo()->headers.get(); 1670 transaction_->GetResponseInfo()->headers.get();
1667 } 1671 }
1668 1672
1669 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1673 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1670 awaiting_callback_ = false; 1674 awaiting_callback_ = false;
1671 } 1675 }
1672 1676
1673 } // namespace net 1677 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698