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

Side by Side Diff: net/nqe/network_quality_estimator_params.cc

Issue 2763853002: Use Android callback API to obtain cellular signal strength (Closed)
Patch Set: comments Created 3 years, 5 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/nqe/network_quality_estimator_params.h ('k') | net/nqe/network_quality_observation.h » ('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 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 "net/nqe/network_quality_estimator_params.h" 5 #include "net/nqe/network_quality_estimator_params.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } // namespace 381 } // namespace
382 382
383 NetworkQualityEstimatorParams::NetworkQualityEstimatorParams( 383 NetworkQualityEstimatorParams::NetworkQualityEstimatorParams(
384 const std::map<std::string, std::string>& params) 384 const std::map<std::string, std::string>& params)
385 : params_(params), 385 : params_(params),
386 throughput_min_requests_in_flight_( 386 throughput_min_requests_in_flight_(
387 GetValueForVariationParam(params_, 387 GetValueForVariationParam(params_,
388 "throughput_min_requests_in_flight", 388 "throughput_min_requests_in_flight",
389 1)), 389 1)),
390 weight_multiplier_per_second_(GetWeightMultiplierPerSecond(params_)), 390 weight_multiplier_per_second_(GetWeightMultiplierPerSecond(params_)),
391 weight_multiplier_per_dbm_( 391 weight_multiplier_per_signal_strength_level_(
392 GetDoubleValueForVariationParamWithDefaultValue(params_, 392 GetDoubleValueForVariationParamWithDefaultValue(
393 "rssi_weight_per_dbm", 393 params_,
394 1.0)), 394 "rssi_weight_per_signal_strength_level",
395 1.0)),
395 correlation_uma_logging_probability_( 396 correlation_uma_logging_probability_(
396 GetDoubleValueForVariationParamWithDefaultValue( 397 GetDoubleValueForVariationParamWithDefaultValue(
397 params_, 398 params_,
398 "correlation_logging_probability", 399 "correlation_logging_probability",
399 0.01)), 400 0.01)),
400 forced_effective_connection_type_( 401 forced_effective_connection_type_(
401 GetForcedEffectiveConnectionType(params_)), 402 GetForcedEffectiveConnectionType(params_)),
402 persistent_cache_reading_enabled_( 403 persistent_cache_reading_enabled_(
403 GetPersistentCacheReadingEnabled(params_)), 404 GetPersistentCacheReadingEnabled(params_)),
404 min_socket_watcher_notification_interval_( 405 min_socket_watcher_notification_interval_(
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 return connection_thresholds_[type]; 484 return connection_thresholds_[type];
484 } 485 }
485 486
486 NetworkQualityEstimatorParams::EffectiveConnectionTypeAlgorithm 487 NetworkQualityEstimatorParams::EffectiveConnectionTypeAlgorithm
487 NetworkQualityEstimatorParams::GetEffectiveConnectionTypeAlgorithm() const { 488 NetworkQualityEstimatorParams::GetEffectiveConnectionTypeAlgorithm() const {
488 DCHECK(thread_checker_.CalledOnValidThread()); 489 DCHECK(thread_checker_.CalledOnValidThread());
489 return effective_connection_type_algorithm_; 490 return effective_connection_type_algorithm_;
490 } 491 }
491 492
492 } // namespace net 493 } // namespace net
OLDNEW
« no previous file with comments | « net/nqe/network_quality_estimator_params.h ('k') | net/nqe/network_quality_observation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698