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

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

Issue 1310253004: Have VariationsService get version for simulation callback from client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@variations_service_browser_thread
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 300763e16c7675cd88f1b3fda08d97f1655883a5..36b73a4dabd17fcf9d0d94b82ac19f6f3771752c 100644
--- a/chrome/browser/metrics/variations/variations_service.cc
+++ b/chrome/browser/metrics/variations/variations_service.cc
@@ -40,10 +40,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
-#if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
-#include "chrome/browser/upgrade_detector_impl.h"
-#endif
-
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/settings/cros_settings.h"
#endif
@@ -113,21 +109,6 @@ std::string GetPlatformString() {
#endif
}
-// Gets the version number to use for variations seed simulation. Must be called
-// on a thread where IO is allowed.
-base::Version GetVersionForSimulation() {
-#if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
- const base::Version installed_version =
- UpgradeDetectorImpl::GetCurrentlyInstalledVersion();
- if (installed_version.IsValid())
- return installed_version;
-#endif // !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
-
- // TODO(asvitkine): Get the version that will be used on restart instead of
- // the current version on Android, iOS and ChromeOS.
- return base::Version(version_info::GetVersionNumber());
-}
-
// Gets the restrict parameter from |policy_pref_service| or from Chrome OS
// settings in the case of that platform.
std::string GetRestrictParameterPref(PrefService* policy_pref_service) {
@@ -532,9 +513,8 @@ bool VariationsService::StoreSeed(const std::string& seed_data,
return true;
base::PostTaskAndReplyWithResult(
- client_->GetBlockingPool(),
- FROM_HERE,
- base::Bind(&GetVersionForSimulation),
+ client_->GetBlockingPool(), FROM_HERE,
+ client_->GetVersionForSimulationCallback(),
base::Bind(&VariationsService::PerformSimulationWithVersion,
weak_ptr_factory_.GetWeakPtr(), base::Passed(&seed)));
return true;

Powered by Google App Engine
This is Rietveld 408576698