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

Side by Side Diff: content/browser/net/network_quality_observer_impl.cc

Issue 2927453002: Make NQE a derived class of NetworkQualityProvider (Closed)
Patch Set: Fix tests Created 3 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "content/browser/net/network_quality_observer_impl.h" 5 #include "content/browser/net/network_quality_observer_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 last_notified_network_quality_ = net::nqe::internal::NetworkQuality( 206 last_notified_network_quality_ = net::nqe::internal::NetworkQuality(
207 http_rtt, transport_rtt, downstream_throughput_kbps); 207 http_rtt, transport_rtt, downstream_throughput_kbps);
208 208
209 BrowserThread::PostTask( 209 BrowserThread::PostTask(
210 BrowserThread::UI, FROM_HERE, 210 BrowserThread::UI, FROM_HERE,
211 base::BindOnce(&UiThreadObserver::OnRTTOrThroughputEstimatesComputed, 211 base::BindOnce(&UiThreadObserver::OnRTTOrThroughputEstimatesComputed,
212 base::Unretained(ui_thread_observer_.get()), 212 base::Unretained(ui_thread_observer_.get()),
213 last_notified_network_quality_)); 213 last_notified_network_quality_));
214 } 214 }
215 215
216 std::unique_ptr<net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver> 216 std::unique_ptr<net::RTTAndThroughputEstimatesObserver>
217 CreateNetworkQualityObserver( 217 CreateNetworkQualityObserver(
218 net::NetworkQualityEstimator* network_quality_estimator) { 218 net::NetworkQualityEstimator* network_quality_estimator) {
219 return base::MakeUnique<NetworkQualityObserverImpl>( 219 return base::MakeUnique<NetworkQualityObserverImpl>(
220 network_quality_estimator); 220 network_quality_estimator);
221 } 221 }
222 222
223 } // namespace content 223 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698