Skip to content

Commit

Permalink
Merge pull request #911 from brave/linux_default_browser
Browse files Browse the repository at this point in the history
Make brave browser set as a default browser in linux
  • Loading branch information
simonhong authored Nov 15, 2018
2 parents 9f558ce + 5389ab0 commit a5edaac
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions patches/chrome-browser-shell_integration_linux.cc.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index bfd0f1c16666ef8071b00e9a1f85e80b9806ed87..dcfff5e3b9fd84ad852fcb4de180f9631b9a4a28 100644
index bfd0f1c16666ef8071b00e9a1f85e80b9806ed87..031127a027327ce98355e7166b0d0633f4263519 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -431,7 +431,7 @@ std::string GetDesktopName(base::Environment* env) {
@@ -425,13 +425,24 @@ std::string GetDesktopName(base::Environment* env) {
return "google-chrome.desktop";
}
#else // CHROMIUM_BUILD
+#if defined(OFFICIAL_BUILD)
+ version_info::Channel product_channel(chrome::GetChannel());
+ switch (product_channel) {
+ case version_info::Channel::DEV:
+ return "brave-browser-dev.desktop";
+ case version_info::Channel::BETA:
+ return "brave-browser-beta.desktop";
+ default:
+ return "brave-browser.desktop";
+ }
+#endif // defined(OFFICIAL_BUILD)
// Allow $CHROME_DESKTOP to override the built-in value, so that development
// versions can set themselves as the default without interfering with
// non-official, packaged versions using the built-in value.
std::string name;
if (env->GetVar("CHROME_DESKTOP", &name) && !name.empty())
return name;
Expand All @@ -11,7 +28,7 @@ index bfd0f1c16666ef8071b00e9a1f85e80b9806ed87..dcfff5e3b9fd84ad852fcb4de180f963
#endif
}

@@ -439,7 +439,7 @@ std::string GetIconName() {
@@ -439,7 +450,7 @@ std::string GetIconName() {
#if defined(GOOGLE_CHROME_BUILD)
return "google-chrome";
#else // CHROMIUM_BUILD
Expand Down

0 comments on commit a5edaac

Please sign in to comment.