summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-07-30 01:05:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-30 08:06:36 +0000
commit6e883e40d456dd422ac08ced1c25e7403f78bada (patch)
tree615f0986f2edb95b679d1598eaaff335e29283f1 /chrome/app
parent0289a621d385a5fa87f3635bedaae2daabc6f4b9 (diff)
downloadchromium_src-6e883e40d456dd422ac08ced1c25e7403f78bada.zip
chromium_src-6e883e40d456dd422ac08ced1c25e7403f78bada.tar.gz
chromium_src-6e883e40d456dd422ac08ced1c25e7403f78bada.tar.bz2
Componentize VersionInfo.
Create a new component version_info that allows to get information about the current version of Chrome running, except for the channel (which has to be provided by the embedder). The method to get the channel is not moved to the component because on Windows it depends on //chrome/installer which would be non-trivial to componentize. Since the method is embedder-specific (though it have no bad dependencies on the other platform) it makes sense to not move it into the component. Fixes VersionInfo API to only expose static method (since the class did not have any state and the API was a mix of "const" and "static" methods) and to delegate the job to version_info component in order to limit the API changes. Mass rename (chrome::)VersionInfo::(Channel|CHANNEL) after the enum was moved to the version_info namespace in the corresponding component using tools/git/mffr.py. Change Channel enumeration to be a "class enum" and add static_cast<int> where needed (as class enum do not implicitly convert to int). BUG=511912 Review URL: https://codereview.chromium.org/1257633002 Cr-Commit-Position: refs/heads/master@{#341085}
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/DEPS1
-rw-r--r--chrome/app/chrome_crash_reporter_client.cc4
-rw-r--r--chrome/app/chrome_main_delegate.cc10
-rw-r--r--chrome/app/close_handle_hook_win.cc8
-rw-r--r--chrome/app/generated_resources.grd5
5 files changed, 13 insertions, 15 deletions
diff --git a/chrome/app/DEPS b/chrome/app/DEPS
index bf832e5..3e5cb01 100644
--- a/chrome/app/DEPS
+++ b/chrome/app/DEPS
@@ -19,6 +19,7 @@ include_rules = [
"+components/nacl/renderer/plugin/ppapi_entrypoints.h",
"+components/nacl/zygote",
"+components/startup_metric_utils",
+ "+components/version_info",
"+content/public/app",
"+content/public/browser/browser_main_runner.h",
"+extensions/common/constants.h",
diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc
index 067ab53..b0eba46 100644
--- a/chrome/app/chrome_crash_reporter_client.cc
+++ b/chrome/app/chrome_crash_reporter_client.cc
@@ -33,7 +33,7 @@
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
#include "chrome/browser/crash_upload_list.h"
-#include "chrome/common/chrome_version_info_values.h"
+#include "components/version_info/version_info_values.h"
#endif
#if defined(OS_POSIX)
@@ -322,7 +322,7 @@ bool ChromeCrashReporterClient::GetCollectStatsConsent() {
bool is_guest_session = base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kGuestSession);
bool is_stable_channel =
- chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_STABLE;
+ chrome::VersionInfo::GetChannel() == version_info::Channel::STABLE;
if (is_guest_session && is_stable_channel)
return false;
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 5189e6b..3121d64 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -981,12 +981,12 @@ ChromeMainDelegate::CreateContentUtilityClient() {
bool ChromeMainDelegate::ShouldEnableProfilerRecording() {
switch (chrome::VersionInfo::GetChannel()) {
- case chrome::VersionInfo::CHANNEL_UNKNOWN:
- case chrome::VersionInfo::CHANNEL_CANARY:
+ case version_info::Channel::UNKNOWN:
+ case version_info::Channel::CANARY:
return true;
- case chrome::VersionInfo::CHANNEL_DEV:
- case chrome::VersionInfo::CHANNEL_BETA:
- case chrome::VersionInfo::CHANNEL_STABLE:
+ case version_info::Channel::DEV:
+ case version_info::Channel::BETA:
+ case version_info::Channel::STABLE:
default:
// Don't enable instrumentation.
return false;
diff --git a/chrome/app/close_handle_hook_win.cc b/chrome/app/close_handle_hook_win.cc
index 9398187..fca2e2f 100644
--- a/chrome/app/close_handle_hook_win.cc
+++ b/chrome/app/close_handle_hook_win.cc
@@ -184,10 +184,10 @@ bool UseHooks() {
#if defined(ARCH_CPU_X86_64)
return false;
#elif defined(NDEBUG)
- chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
- if (channel == chrome::VersionInfo::CHANNEL_CANARY ||
- channel == chrome::VersionInfo::CHANNEL_DEV ||
- channel == chrome::VersionInfo::CHANNEL_UNKNOWN) {
+ version_info::Channel channel = chrome::VersionInfo::GetChannel();
+ if (channel == version_info::Channel::CANARY ||
+ channel == version_info::Channel::DEV ||
+ channel == version_info::Channel::UNKNOWN) {
return true;
}
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index f87c8dd..62eb307 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7043,7 +7043,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
Enable the new task manager.
</message>
<message name="IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_DESCRIPTION" desc="Description of the flag to enable the new implementation of the task manager.">
- Enables the use of the new and optimized implementation of the chrome task manager.
+ Enables the use of the new and optimized implementation of the chrome task manager.
</message>
</if>
@@ -7490,9 +7490,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_ABOUT_VERSION_OFFICIAL" desc="official build on the about:version page">
Official Build
</message>
- <message name="IDS_ABOUT_VERSION_UNOFFICIAL" desc="unofficial build on the about:version page">
- Developer Build
- </message>
<message name="IDS_ABOUT_VERSION_32BIT" desc="32-bit on the chrome://version page">
(32-bit)
</message>