Skip to content

Commit a5edaac

Browse files
authored
Merge pull request #911 from brave/linux_default_browser
Make brave browser set as a default browser in linux
2 parents 9f558ce + 5389ab0 commit a5edaac

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

patches/chrome-browser-shell_integration_linux.cc.patch

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
2-
index bfd0f1c16666ef8071b00e9a1f85e80b9806ed87..dcfff5e3b9fd84ad852fcb4de180f9631b9a4a28 100644
2+
index bfd0f1c16666ef8071b00e9a1f85e80b9806ed87..031127a027327ce98355e7166b0d0633f4263519 100644
33
--- a/chrome/browser/shell_integration_linux.cc
44
+++ b/chrome/browser/shell_integration_linux.cc
5-
@@ -431,7 +431,7 @@ std::string GetDesktopName(base::Environment* env) {
5+
@@ -425,13 +425,24 @@ std::string GetDesktopName(base::Environment* env) {
6+
return "google-chrome.desktop";
7+
}
8+
#else // CHROMIUM_BUILD
9+
+#if defined(OFFICIAL_BUILD)
10+
+ version_info::Channel product_channel(chrome::GetChannel());
11+
+ switch (product_channel) {
12+
+ case version_info::Channel::DEV:
13+
+ return "brave-browser-dev.desktop";
14+
+ case version_info::Channel::BETA:
15+
+ return "brave-browser-beta.desktop";
16+
+ default:
17+
+ return "brave-browser.desktop";
18+
+ }
19+
+#endif // defined(OFFICIAL_BUILD)
20+
// Allow $CHROME_DESKTOP to override the built-in value, so that development
21+
// versions can set themselves as the default without interfering with
22+
// non-official, packaged versions using the built-in value.
623
std::string name;
724
if (env->GetVar("CHROME_DESKTOP", &name) && !name.empty())
825
return name;
@@ -11,7 +28,7 @@ index bfd0f1c16666ef8071b00e9a1f85e80b9806ed87..dcfff5e3b9fd84ad852fcb4de180f963
1128
#endif
1229
}
1330

14-
@@ -439,7 +439,7 @@ std::string GetIconName() {
31+
@@ -439,7 +450,7 @@ std::string GetIconName() {
1532
#if defined(GOOGLE_CHROME_BUILD)
1633
return "google-chrome";
1734
#else // CHROMIUM_BUILD

0 commit comments

Comments
 (0)