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

Unified Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 541133002: Add XDG_CURRENT_DESKTOP and GDMSESSION env to about:gpu on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_internals_ui.cc
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index d4e31524e279058e51377ddebb7322c1d816b2a5..f971266abae123473858934ba3fc2275eae0ef94 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
+#include "base/environment.h"
#include "base/i18n/time_formatting.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -168,6 +169,16 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
#if defined(OS_LINUX) && defined(USE_X11)
basic_info->Append(NewDescriptionValuePair("Window manager",
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
std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
basic_info->Append(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698