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

Unified Diff: components/metrics/net/cellular_logic_helper.cc

Issue 2351873002: Clean up UMA 3g experiment and unify metrics enabled pref for Android (Closed)
Patch Set: remove optimization param 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/metrics_service_accessor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/net/cellular_logic_helper.cc
diff --git a/components/metrics/net/cellular_logic_helper.cc b/components/metrics/net/cellular_logic_helper.cc
index 3651e878cdcc903adae89b2ff968e1367ca8c155..33b351e0a4d49b964b00bc54338e5868edf5a76e 100644
--- a/components/metrics/net/cellular_logic_helper.cc
+++ b/components/metrics/net/cellular_logic_helper.cc
@@ -4,7 +4,6 @@
#include "components/metrics/net/cellular_logic_helper.h"
-#include "components/variations/variations_associated_data.h"
#include "net/base/network_change_notifier.h"
namespace metrics {
@@ -21,10 +20,8 @@ const int kStandardUploadIntervalSeconds = 30 * 60; // Thirty minutes.
#if defined(OS_ANDROID)
const bool kDefaultCellularLogicEnabled = true;
-const bool kDefaultCellularLogicOptimization = true;
#else
const bool kDefaultCellularLogicEnabled = false;
-const bool kDefaultCellularLogicOptimization = false;
#endif
} // namespace
@@ -37,22 +34,10 @@ base::TimeDelta GetUploadInterval() {
return base::TimeDelta::FromSeconds(kStandardUploadIntervalSeconds);
}
-// Returns true if current connection type is cellular and user is assigned to
-// experimental group for enabled cellular uploads.
+// Returns true if current connection type is cellular and cellular logic is
+// enabled.
bool IsCellularLogicEnabled() {
- std::string enabled = variations::GetVariationParamValue(
- "UMA_EnableCellularLogUpload", "Enabled");
- std::string optimized = variations::GetVariationParamValue(
- "UMA_EnableCellularLogUpload", "Optimize");
- bool is_enabled = kDefaultCellularLogicEnabled;
- if (!enabled.empty())
- is_enabled = (enabled == "true");
-
- bool is_optimized = kDefaultCellularLogicOptimization;
- if (!optimized.empty())
- is_optimized = (optimized == "true");
-
- if (!is_enabled || !is_optimized)
+ if (!kDefaultCellularLogicEnabled)
return false;
return net::NetworkChangeNotifier::IsConnectionCellular(
« no previous file with comments | « components/metrics/metrics_service_accessor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698