Commit c0ca7387 authored by miu's avatar miu Committed by Commit bot

Revert of Linux: Sync GetDesktopName in gtk2_util.cc (patchset #2 id:20001 of...

Revert of Linux: Sync GetDesktopName in gtk2_util.cc (patchset #2 id:20001 of https://codereview.chromium.org/2195063003/ )

Reason for revert:
Broke Linux GN build on my desktop (linker error):

obj/chrome/browser/ui/libgtk2ui/libgtk2ui/gtk2_util.o:../../chrome/browser/ui/libgtk2ui/gtk2_util.cc:function libgtk2ui::GetDesktopName(base::Environment*): error: undefined reference to 'chrome::GetChannel()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Contents of my out/Release/args.gn:

  is_component_build = true
  is_debug = false
  is_chrome_branded = true
  dcheck_always_on = true
  use_goma = true

Original issue's description:
> Linux: Sync GetDesktopName in gtk2_util.cc
>
> BUG=632841
>
> Committed: https://crrev.com/12d7c7f1f6a38f067803c676e5cac9cccc11dab2
> Cr-Commit-Position: refs/heads/master@{#408846}

TBR=thestig@chromium.org,thomasanderson@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=632841

Review-Url: https://codereview.chromium.org/2196073002
Cr-Commit-Position: refs/heads/master@{#408880}
parent 885d035c
...@@ -635,7 +635,6 @@ std::string GetProgramClassClass() { ...@@ -635,7 +635,6 @@ std::string GetProgramClassClass() {
GetDesktopName(env.get())); GetDesktopName(env.get()));
} }
// This function should be kept in sync with the copy in gtk2_util.cc.
std::string GetDesktopName(base::Environment* env) { std::string GetDesktopName(base::Environment* env) {
#if defined(GOOGLE_CHROME_BUILD) #if defined(GOOGLE_CHROME_BUILD)
version_info::Channel product_channel(chrome::GetChannel()); version_info::Channel product_channel(chrome::GetChannel());
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/debug/leak_annotations.h" #include "base/debug/leak_annotations.h"
#include "base/environment.h" #include "base/environment.h"
#include "chrome/common/channel_info.h"
#include "components/version_info/version_info.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host.h"
#include "ui/base/accelerators/accelerator.h" #include "ui/base/accelerators/accelerator.h"
...@@ -58,22 +56,12 @@ void GtkInitFromCommandLine(const base::CommandLine& command_line) { ...@@ -58,22 +56,12 @@ void GtkInitFromCommandLine(const base::CommandLine& command_line) {
CommonInitFromCommandLine(command_line, gtk_init); CommonInitFromCommandLine(command_line, gtk_init);
} }
// This function should be kept in sync with the copy in // TODO(erg): This method was copied out of shell_integration_linux.cc. Because
// shell_integration_linux.cc. // of how this library is structured as a stand alone .so, we can't call code
// // from browser and above.
// Because of how libgtk2ui.so is structured as a stand alone .so, we can't call
// code from browser and above.
std::string GetDesktopName(base::Environment* env) { std::string GetDesktopName(base::Environment* env) {
#if defined(GOOGLE_CHROME_BUILD) #if defined(GOOGLE_CHROME_BUILD)
version_info::Channel product_channel(chrome::GetChannel()); return "google-chrome.desktop";
switch (product_channel) {
case version_info::Channel::DEV:
return "google-chrome-unstable.desktop";
case version_info::Channel::BETA:
return "google-chrome-beta.desktop";
default:
return "google-chrome.desktop";
}
#else // CHROMIUM_BUILD #else // CHROMIUM_BUILD
// Allow $CHROME_DESKTOP to override the built-in value, so that development // Allow $CHROME_DESKTOP to override the built-in value, so that development
// versions can set themselves as the default without interfering with // versions can set themselves as the default without interfering with
......
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