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

Side by Side Diff: chrome/browser/net/nqe/ui_network_quality_estimator_service.cc

Issue 2166363003: Offline pages using NQE 2G Slow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig comments Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/net/nqe/ui_network_quality_estimator_service.h" 5 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/io_thread.h" 9 #include "chrome/browser/io_thread.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 89 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
90 weak_factory_.InvalidateWeakPtrs(); 90 weak_factory_.InvalidateWeakPtrs();
91 } 91 }
92 92
93 void UINetworkQualityEstimatorService::EffectiveConnectionTypeChanged( 93 void UINetworkQualityEstimatorService::EffectiveConnectionTypeChanged(
94 net::NetworkQualityEstimator::EffectiveConnectionType type) { 94 net::NetworkQualityEstimator::EffectiveConnectionType type) {
95 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 95 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
96 type_ = type; 96 type_ = type;
97 } 97 }
98 98
99 void UINetworkQualityEstimatorService::SetEffectiveConnectionTypeForTesting(
100 net::NetworkQualityEstimator::EffectiveConnectionType type) {
101 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
102 type_ = type;
103 }
104
99 net::NetworkQualityEstimator::EffectiveConnectionType 105 net::NetworkQualityEstimator::EffectiveConnectionType
100 UINetworkQualityEstimatorService::GetEffectiveConnectionType() const { 106 UINetworkQualityEstimatorService::GetEffectiveConnectionType() const {
101 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 107 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
102 return type_; 108 return type_;
103 } 109 }
OLDNEW
« no previous file with comments | « chrome/browser/net/nqe/ui_network_quality_estimator_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698