Commit ead6b552 authored by zmo's avatar zmo Committed by Commit bot

Add XDG_CURRENT_DESKTOP and GDMSESSION env to about:gpu on Linux.

BUG=410560
TEST=about:gpu page on Linux
R=piman@chromium.org,kbr@chromium.org

Review URL: https://codereview.chromium.org/541133002

Cr-Commit-Position: refs/heads/master@{#293425}
parent de4a7591
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/environment.h"
#include "base/i18n/time_formatting.h" #include "base/i18n/time_formatting.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
...@@ -168,6 +169,16 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() { ...@@ -168,6 +169,16 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
#if defined(OS_LINUX) && defined(USE_X11) #if defined(OS_LINUX) && defined(USE_X11)
basic_info->Append(NewDescriptionValuePair("Window manager", basic_info->Append(NewDescriptionValuePair("Window manager",
ui::GuessWindowManagerName())); ui::GuessWindowManagerName()));
{
scoped_ptr<base::Environment> env(base::Environment::Create());
std::string value;
const char kXDGCurrentDesktop[] = "XDG_CURRENT_DESKTOP";
if (env->GetVar(kXDGCurrentDesktop, &value))
basic_info->Append(NewDescriptionValuePair(kXDGCurrentDesktop, value));
const char kGDMSession[] = "GDMSESSION";
if (env->GetVar(kGDMSession, &value))
basic_info->Append(NewDescriptionValuePair(kGDMSession, value));
}
#endif #endif
std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No"; std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
basic_info->Append( basic_info->Append(
......
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