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

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: 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
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..ce517ea8ec0ac98cf267c43c47a7c478df06cac5 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 {
@@ -19,14 +18,6 @@ const int kStandardUploadIntervalCellularSeconds = 15 * 60; // Fifteen minutes.
const int kStandardUploadIntervalSeconds = 30 * 60; // Thirty minutes.
#endif
-#if defined(OS_ANDROID)
-const bool kDefaultCellularLogicEnabled = true;
-const bool kDefaultCellularLogicOptimization = true;
-#else
-const bool kDefaultCellularLogicEnabled = false;
-const bool kDefaultCellularLogicOptimization = false;
-#endif
Alexei Svitkine (slow) 2016/09/19 19:38:02 Shouldn't we keep this logic - given that we still
gayane -on leave until 09-2017 2016/09/19 20:05:58 Brought back the defaults but still removed the ex
Alexei Svitkine (slow) 2016/09/19 20:36:56 Given that in this file the extra boolean is not d
-
} // namespace
base::TimeDelta GetUploadInterval() {
@@ -37,24 +28,8 @@ 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.
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)
- return false;
-
return net::NetworkChangeNotifier::IsConnectionCellular(
net::NetworkChangeNotifier::GetConnectionType());
}

Powered by Google App Engine
This is Rietveld 408576698