Skip to content

Commit

Permalink
pulseaudio: Register as Brave instead of Chromium
Browse files Browse the repository at this point in the history
When creating a new pulseaudio context, make the application name Brave
instead of Chromium.

Resolves brave/brave-browser#10919
  • Loading branch information
keur committed Jul 27, 2020
1 parent f17da73 commit ee22579
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions chromium_src/media/audio/pulse/pulse_util.cc
@@ -0,0 +1,16 @@
// Copyright (c) 2020 The Brave Authors
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// you can obtain one at http://mozilla.org/MPL/2.0/.

#include "build/branding_buildflags.h"

#if defined(OFFICIAL_BUILD)
#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING
#define BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING() (1)
#endif

constexpr char kBrowserDisplayName[] = "brave-browser";
#define PRODUCT_STRING "Brave"
#include "../../../../../media/audio/pulse/pulse_util.cc"
#undef PRODUCT_STRING
13 changes: 13 additions & 0 deletions patches/media-audio-pulse-pulse_util.cc.patch
@@ -0,0 +1,13 @@
diff --git a/media/audio/pulse/pulse_util.cc b/media/audio/pulse/pulse_util.cc
index 085036bb967c6f6f81e9351d8c8a081950b3910a..bdae4cb734ed40b5c37fdb38e438e35430c55efb 100644
--- a/media/audio/pulse/pulse_util.cc
+++ b/media/audio/pulse/pulse_util.cc
@@ -35,7 +35,7 @@ namespace {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
constexpr char kBrowserDisplayName[] = "google-chrome";
#define PRODUCT_STRING "Google Chrome"
-#else
+#elif 0
constexpr char kBrowserDisplayName[] = "chromium-browser";
#define PRODUCT_STRING "Chromium"
#endif

0 comments on commit ee22579

Please sign in to comment.