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

Unified Diff: components/gcm_driver/instance_id/instance_id_driver.cc

Issue 1854093002: Enable InstanceID field trial by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid3test
Patch Set: Rebase Created 4 years, 8 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/gcm_driver/gcm_driver_desktop_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/instance_id/instance_id_driver.cc
diff --git a/components/gcm_driver/instance_id/instance_id_driver.cc b/components/gcm_driver/instance_id/instance_id_driver.cc
index c4c89ae5931d67d10ef20ac4db68f6f15d87ce59..1e3ee9e79edb703c0e03c6baa1b08dc2784ad3a6 100644
--- a/components/gcm_driver/instance_id/instance_id_driver.cc
+++ b/components/gcm_driver/instance_id/instance_id_driver.cc
@@ -5,6 +5,7 @@
#include "components/gcm_driver/instance_id/instance_id_driver.h"
#include "base/metrics/field_trial.h"
+#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "components/gcm_driver/gcm_driver.h"
#include "components/gcm_driver/instance_id/instance_id.h"
@@ -13,14 +14,15 @@ namespace instance_id {
namespace {
const char kInstanceIDFieldTrialName[] = "InstanceID";
-const char kInstanceIDFieldTrialEnabledGroupName[] = "Enabled";
+const char kInstanceIDFieldTrialDisabledGroupPrefix[] = "Disabled";
} // namespace
// static
bool InstanceIDDriver::IsInstanceIDEnabled() {
std::string group_name =
base::FieldTrialList::FindFullName(kInstanceIDFieldTrialName);
- return group_name == kInstanceIDFieldTrialEnabledGroupName;
+ return !base::StartsWith(group_name, kInstanceIDFieldTrialDisabledGroupPrefix,
+ base::CompareCase::INSENSITIVE_ASCII);
}
InstanceIDDriver::InstanceIDDriver(gcm::GCMDriver* gcm_driver)
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698