Index: chrome/app/client_util.cc |
diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc |
index ac6dbfc111bece74b0d214d6430157f94a3d2af1..efb79d57cf6534fb3d4db5ef56d20c0885c696c1 100644 |
--- a/chrome/app/client_util.cc |
+++ b/chrome/app/client_util.cc |
@@ -34,6 +34,7 @@ |
#include "chrome/installer/util/util_constants.h" |
#include "components/breakpad/app/breakpad_client.h" |
#include "components/breakpad/app/breakpad_win.h" |
+#include "components/metrics/client_info.h" |
#include "content/public/app/startup_helper_win.h" |
#include "sandbox/win/src/sandbox.h" |
@@ -75,14 +76,14 @@ bool PreReadExperimentIsActive() { |
void GetPreReadPopulationAndGroup(double* population, double* group) { |
// By default we use the metrics id for the user as stable pseudo-random |
// input to a hash. |
- std::string metrics_id; |
- GoogleUpdateSettings::LoadMetricsClientId(&metrics_id); |
+ scoped_ptr<metrics::ClientInfo> client_info = |
+ GoogleUpdateSettings::LoadMetricsClientInfo(); |
- // If this user has not metrics id, we fall back to a purely random value |
- // per browser session. |
+ // If this user has no metrics id, we fall back to a purely random value per |
+ // browser session. |
const size_t kLength = 16; |
- std::string random_value(metrics_id.empty() ? base::RandBytesAsString(kLength) |
- : metrics_id); |
+ std::string random_value(client_info ? client_info->client_id |
+ : base::RandBytesAsString(kLength)); |
// To interpret the value as a random number we hash it and read the first 8 |
// bytes of the hash as a unit-interval representing a die-toss for being in |