Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make brave browser set as a default browser in linux #911

Merged
merged 1 commit into from
Nov 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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