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

Unified Diff: chrome/browser/web_resource/promo_resource_service.cc

Issue 7249003: Move GetVersionStringModifier() and GetChannel() from platform_util_* to chrome_version_info_* (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: correct nits Created 9 years, 6 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/web_resource/promo_resource_service.cc
diff --git a/chrome/browser/web_resource/promo_resource_service.cc b/chrome/browser/web_resource/promo_resource_service.cc
index c35d0af9e733fdd1b639eaeeb7e6ad2d8570d40e..3f88463a65f0b9557653f2ee73ac0fe527decffe 100644
--- a/chrome/browser/web_resource/promo_resource_service.cc
+++ b/chrome/browser/web_resource/promo_resource_service.cc
@@ -10,10 +10,10 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/apps_promo.h"
-#include "chrome/browser/platform_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/sync_ui_util.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
@@ -93,18 +93,18 @@ void PromoResourceService::RegisterUserPrefs(PrefService* prefs) {
}
// static
-bool PromoResourceService::IsBuildTargeted(platform_util::Channel channel,
+bool PromoResourceService::IsBuildTargeted(chrome::VersionInfo::Channel channel,
int builds_allowed) {
if (builds_allowed == NO_BUILD)
return false;
switch (channel) {
- case platform_util::CHANNEL_CANARY:
+ case chrome::VersionInfo::CHANNEL_CANARY:
return (CANARY_BUILD & builds_allowed) != 0;
- case platform_util::CHANNEL_DEV:
+ case chrome::VersionInfo::CHANNEL_DEV:
return (DEV_BUILD & builds_allowed) != 0;
- case platform_util::CHANNEL_BETA:
+ case chrome::VersionInfo::CHANNEL_BETA:
return (BETA_BUILD & builds_allowed) != 0;
- case platform_util::CHANNEL_STABLE:
+ case chrome::VersionInfo::CHANNEL_STABLE:
return (STABLE_BUILD & builds_allowed) != 0;
default:
return false;
@@ -121,7 +121,7 @@ PromoResourceService::PromoResourceService(Profile* profile)
kStartResourceFetchDelay,
kCacheUpdateDelay),
web_resource_cache_(NULL),
- channel_(platform_util::CHANNEL_UNKNOWN) {
+ channel_(chrome::VersionInfo::CHANNEL_UNKNOWN) {
Init();
}
@@ -132,10 +132,10 @@ void PromoResourceService::Init() {
}
bool PromoResourceService::IsThisBuildTargeted(int builds_targeted) {
- if (channel_ == platform_util::CHANNEL_UNKNOWN) {
+ if (channel_ == chrome::VersionInfo::CHANNEL_UNKNOWN) {
// GetChannel hits the registry on Windows. See http://crbug.com/70898.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- channel_ = platform_util::GetChannel();
+ channel_ = chrome::VersionInfo::GetChannel();
}
return IsBuildTargeted(channel_, builds_targeted);
@@ -475,7 +475,7 @@ bool CanShowPromo(Profile* profile) {
if (prefs->HasPrefPath(prefs::kNTPPromoBuild)) {
// GetChannel hits the registry on Windows. See http://crbug.com/70898.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- platform_util::Channel channel = platform_util::GetChannel();
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
is_promo_build = PromoResourceService::IsBuildTargeted(
channel, prefs->GetInteger(prefs::kNTPPromoBuild));
}
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service.h ('k') | chrome/browser/web_resource/promo_resource_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698