Commit 1bb25e0e authored by isherman@chromium.org's avatar isherman@chromium.org

[UMA] Add " (Metro)" to the OS name for UMA uploads from Chrome running under...

[UMA] Add " (Metro)" to the OS name for UMA uploads from Chrome running under Windows 8's Metro mode.

BUG=none


Review URL: https://chromiumcodereview.appspot.com/10834077

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149953 0039d316-1c4b-4281-b951-d872f2087c98
parent cf3b4f7d
...@@ -47,8 +47,10 @@ ...@@ -47,8 +47,10 @@
#define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name)
// http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
#if defined(OS_WIN) #if defined(OS_WIN)
#include "base/win/metro.h"
// http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
extern "C" IMAGE_DOS_HEADER __ImageBase; extern "C" IMAGE_DOS_HEADER __ImageBase;
#endif #endif
...@@ -756,7 +758,17 @@ void MetricsLog::RecordEnvironmentProto( ...@@ -756,7 +758,17 @@ void MetricsLog::RecordEnvironmentProto(
#endif #endif
SystemProfileProto::OS* os = system_profile->mutable_os(); SystemProfileProto::OS* os = system_profile->mutable_os();
os->set_name(base::SysInfo::OperatingSystemName()); std::string os_name = base::SysInfo::OperatingSystemName();
#if defined(OS_WIN)
// TODO(mad): This only checks whether the main process is a Metro process at
// upload time; not whether the collected metrics were all gathered from
// Metro. This is ok as an approximation for now, since users will rarely be
// switching from Metro to Desktop mode; but we should re-evaluate whether we
// can distinguish metrics more cleanly in the future: http://crbug.com/140568
if (base::win::IsMetroProcess())
os_name += " (Metro)";
#endif
os->set_name(os_name);
os->set_version(base::SysInfo::OperatingSystemVersion()); os->set_version(base::SysInfo::OperatingSystemVersion());
const content::GPUInfo& gpu_info = const content::GPUInfo& gpu_info =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment