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

Side by Side Diff: net/nqe/network_quality_estimator.h

Issue 2265873002: Adjust callers and networking delegates in net/ to modified APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: rebased on top of URLRequest::Read CL Created 4 years, 3 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/cert_net/nss_ocsp.cc ('k') | net/nqe/network_quality_estimator.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Notifies NetworkQualityEstimator that the response header of |request| has 171 // Notifies NetworkQualityEstimator that the response header of |request| has
172 // been received. 172 // been received.
173 void NotifyHeadersReceived(const URLRequest& request); 173 void NotifyHeadersReceived(const URLRequest& request);
174 174
175 // Notifies NetworkQualityEstimator that the headers of |request| are about to 175 // Notifies NetworkQualityEstimator that the headers of |request| are about to
176 // be sent. 176 // be sent.
177 void NotifyStartTransaction(const URLRequest& request); 177 void NotifyStartTransaction(const URLRequest& request);
178 178
179 // Notifies NetworkQualityEstimator that the response body of |request| has 179 // Notifies NetworkQualityEstimator that the response body of |request| has
180 // been received. 180 // been received.
181 void NotifyRequestCompleted(const URLRequest& request); 181 void NotifyRequestCompleted(const URLRequest& request, int net_error);
182 182
183 // Notifies NetworkQualityEstimator that |request| will be destroyed. 183 // Notifies NetworkQualityEstimator that |request| will be destroyed.
184 void NotifyURLRequestDestroyed(const URLRequest& request); 184 void NotifyURLRequestDestroyed(const URLRequest& request);
185 185
186 // Adds |rtt_observer| to the list of round trip time observers. Must be 186 // Adds |rtt_observer| to the list of round trip time observers. Must be
187 // called on the IO thread. 187 // called on the IO thread.
188 void AddRTTObserver(RTTObserver* rtt_observer); 188 void AddRTTObserver(RTTObserver* rtt_observer);
189 189
190 // Removes |rtt_observer| from the list of round trip time observers if it 190 // Removes |rtt_observer| from the list of round trip time observers if it
191 // is on the list of observers. Must be called on the IO thread. 191 // is on the list of observers. Must be called on the IO thread.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // Records the metrics related to external estimate provider. 473 // Records the metrics related to external estimate provider.
474 void RecordExternalEstimateProviderMetrics( 474 void RecordExternalEstimateProviderMetrics(
475 NQEExternalEstimateProviderStatus status) const; 475 NQEExternalEstimateProviderStatus status) const;
476 476
477 // Returns true if the cached network quality estimate was successfully read. 477 // Returns true if the cached network quality estimate was successfully read.
478 bool ReadCachedNetworkQualityEstimate(); 478 bool ReadCachedNetworkQualityEstimate();
479 479
480 // Records a correlation metric that can be used for computing the correlation 480 // Records a correlation metric that can be used for computing the correlation
481 // between HTTP-layer RTT, transport-layer RTT, throughput and the time 481 // between HTTP-layer RTT, transport-layer RTT, throughput and the time
482 // taken to complete |request|. 482 // taken to complete |request|.
483 void RecordCorrelationMetric(const URLRequest& request) const; 483 void RecordCorrelationMetric(const URLRequest& request, int net_error) const;
484 484
485 // Returns true if transport RTT should be used for computing the effective 485 // Returns true if transport RTT should be used for computing the effective
486 // connection type. 486 // connection type.
487 bool UseTransportRTT() const; 487 bool UseTransportRTT() const;
488 488
489 // Determines if the requests to local host can be used in estimating the 489 // Determines if the requests to local host can be used in estimating the
490 // network quality. Set to true only for tests. 490 // network quality. Set to true only for tests.
491 bool use_localhost_requests_; 491 bool use_localhost_requests_;
492 492
493 // Determines if the responses smaller than |kMinTransferSizeInBytes| 493 // Determines if the responses smaller than |kMinTransferSizeInBytes|
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 base::ThreadChecker thread_checker_; 625 base::ThreadChecker thread_checker_;
626 626
627 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 627 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
628 628
629 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 629 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
630 }; 630 };
631 631
632 } // namespace net 632 } // namespace net
633 633
634 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 634 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « net/cert_net/nss_ocsp.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698