refactor: move media/net from brightray to atom (#15288)

This commit is contained in:
Milan Burda 2018-10-19 20:51:43 +02:00 committed by John Kleinschmidt
parent 6f3c46cc7e
commit 6d844a0b67
32 changed files with 108 additions and 152 deletions

View file

@ -12,6 +12,7 @@
#include "base/nix/xdg_util.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "chrome/browser/ui/libgtkui/gtk_util.h"
#include "url/gurl.h"
#define ELECTRON_TRASH "ELECTRON_TRASH"
@ -145,4 +146,18 @@ void Beep() {
fclose(console);
}
bool GetDesktopName(std::string* setme) {
bool found = false;
std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string desktop_id = libgtkui::GetDesktopName(env.get());
constexpr char const* libcc_default_id = "chromium-browser.desktop";
if (!desktop_id.empty() && (desktop_id != libcc_default_id)) {
*setme = desktop_id;
found = true;
}
return found;
}
} // namespace platform_util