|
@@ -8,13 +8,13 @@
|
|
|
#include <string>
|
|
|
#include <vector>
|
|
|
|
|
|
-#include "base/environment.h"
|
|
|
#include "base/files/file_enumerator.h"
|
|
|
#include "base/logging.h"
|
|
|
#include "base/strings/string_util.h"
|
|
|
#include "base/strings/utf_string_conversions.h"
|
|
|
#include "brightray/browser/notification_delegate.h"
|
|
|
#include "brightray/common/application_info.h"
|
|
|
+#include "brightray/common/platform_util.h"
|
|
|
#include "chrome/browser/ui/libgtkui/gtk_util.h"
|
|
|
#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
|
|
|
#include "third_party/skia/include/core/SkBitmap.h"
|
|
@@ -130,9 +130,8 @@ void LibnotifyNotification::Show(const NotificationOptions& options) {
|
|
|
|
|
|
// Send the desktop name to identify the application
|
|
|
// The desktop-entry is the part before the .desktop
|
|
|
- std::unique_ptr<base::Environment> env(base::Environment::Create());
|
|
|
- std::string desktop_id = libgtkui::GetDesktopName(env.get());
|
|
|
- if (!desktop_id.empty()) {
|
|
|
+ std::string desktop_id;
|
|
|
+ if (platform_util::GetDesktopName(&desktop_id)) {
|
|
|
const std::string suffix{".desktop"};
|
|
|
if (base::EndsWith(desktop_id, suffix,
|
|
|
base::CompareCase::INSENSITIVE_ASCII)) {
|