Merge pull request #12885 from nornagon/is-desktop-unity

Don't declare IsDesktopEnvironmentUnity on non-Linux
This commit is contained in:
Jeremy Apthorp 2018-05-10 14:41:29 -07:00 committed by GitHub
commit 9aa18d29a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,16 +15,14 @@
namespace {
bool IsDesktopEnvironmentUnity() {
#if defined(OS_LINUX)
bool IsDesktopEnvironmentUnity() {
std::unique_ptr<base::Environment> env(base::Environment::Create());
base::nix::DesktopEnvironment desktop_env =
base::nix::GetDesktopEnvironment(env.get());
return desktop_env == base::nix::DESKTOP_ENVIRONMENT_UNITY;
#else
return false;
#endif
}
#endif
} // namespace