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

Unified Diff: chrome/browser/metrics/variations/variations_service.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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: chrome/browser/metrics/variations/variations_service.cc
diff --git a/chrome/browser/metrics/variations/variations_service.cc b/chrome/browser/metrics/variations/variations_service.cc
index e1f9003b4949d1fc44a9a0ab4176ebaaecc7b2f3..0f6e3235df06c306507a926332d1eee8d4b72385 100644
--- a/chrome/browser/metrics/variations/variations_service.cc
+++ b/chrome/browser/metrics/variations/variations_service.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/variations/generated_resources_map.h"
#include "chrome/browser/metrics/variations/variations_url_constants.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/metrics/metrics_state_manager.h"
@@ -28,6 +29,7 @@
#include "components/variations/proto/variations_seed.pb.h"
#include "components/variations/variations_seed_processor.h"
#include "components/variations/variations_seed_simulator.h"
+#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
@@ -66,7 +68,7 @@ const int64 kServerTimeResolutionMs = 1000;
// will return the fake channel. Failing that, this will return the UNKNOWN
// channel.
variations::Study_Channel GetChannelForVariations() {
- switch (chrome::VersionInfo::GetChannel()) {
+ switch (chrome::GetChannel()) {
case version_info::Channel::CANARY:
return variations::Study_Channel_CANARY;
case version_info::Channel::DEV:
@@ -127,7 +129,7 @@ base::Version GetVersionForSimulation() {
// TODO(asvitkine): Get the version that will be used on restart instead of
// the current version on Android, iOS and ChromeOS.
- return base::Version(chrome::VersionInfo().Version());
+ return base::Version(version_info::GetVersionNumber());
}
// Gets the restrict parameter from |policy_pref_service| or from Chrome OS
@@ -259,8 +261,7 @@ bool VariationsService::CreateTrialsFromSeed() {
if (!seed_store_.LoadSeed(&seed))
return false;
- const chrome::VersionInfo current_version_info;
- const base::Version current_version(current_version_info.Version());
+ const base::Version current_version(version_info::GetVersionNumber());
if (!current_version.IsValid())
return false;
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.h ('k') | chrome/browser/nacl_host/nacl_browser_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698