Skip to content

Commit

Permalink
Merge pull request #16 from brave/windows_build
Browse files Browse the repository at this point in the history
Windows Branding Fix
  • Loading branch information
bbondy authored Jan 3, 2018
2 parents 7d0d0a5 + 65c2088 commit 0fab72b
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/brave_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ base::LazyInstance<BraveContentRendererClient>::DestructorAtExit
g_brave_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<BraveContentUtilityClient>::DestructorAtExit
g_brave_content_utility_client = LAZY_INSTANCE_INITIALIZER;
#endif
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
base::LazyInstance<BraveContentBrowserClient>::DestructorAtExit
g_brave_content_browser_client = LAZY_INSTANCE_INITIALIZER;
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/brave_shields/browser/dat_file_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace brave_shields {
base::FilePath GetDATFilePath(const std::string& file_name) {
base::FilePath app_data_path;
PathService::Get(chrome::DIR_USER_DATA, &app_data_path);
base::FilePath dat_file_path = app_data_path.Append(file_name);
base::FilePath dat_file_path = app_data_path.AppendASCII(file_name);
return dat_file_path;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ bool HTTPSEverywhereService::Init() {

leveldb::Options options;
leveldb::Status status = leveldb::DB::Open(options,
unzipped_level_db_path.value().c_str(),
unzipped_level_db_path.AsUTF8Unsafe(),
&level_db_);
if (!status.ok() || !level_db_) {
if (level_db_) {
Expand Down
95 changes: 94 additions & 1 deletion patches/chrome-common-chrome_constants.cc.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index d4e0823a55994118bacfe4fd7f8ec1881640e8ac..84788c9cc020c756c45e96fab8ab2119df1b18f8 100644
index d4e0823a55994118bacfe4fd7f8ec1881640e8ac..6d716dc5337dbd9b2af7935f8509e9a0c2181a59 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -10,11 +10,11 @@
Expand All @@ -16,3 +16,96 @@ index d4e0823a55994118bacfe4fd7f8ec1881640e8ac..84788c9cc020c756c45e96fab8ab2119
#else
#error Unknown branding
#endif
@@ -43,13 +43,13 @@ const char kChromeVersion[] = CHROME_VERSION_STRING;

#if defined(OS_WIN)
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kBrowserProcessExecutableName[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutableName[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
#elif defined(OS_MACOSX)
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
FPL(CHROMIUM_PRODUCT_STRING);
@@ -61,7 +61,7 @@ const base::FilePath::CharType kHelperProcessExecutableName[] =
FPL(PRODUCT_STRING " Helper");
#elif defined(OS_ANDROID)
// NOTE: Keep it synced with the process names defined in AndroidManifest.xml.
-const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
+const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("brave");
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
FPL("");
const base::FilePath::CharType kHelperProcessExecutableName[] =
@@ -69,8 +69,8 @@ const base::FilePath::CharType kHelperProcessExecutableName[] =
const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = FPL("");
#elif defined(OS_POSIX)
const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
- FPL("chrome");
-const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
+ FPL("brave");
+const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("brave");
// Helper processes end up with a name of "exe" due to execing via
// /proc/self/exe. See bug 22703.
const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
@@ -80,13 +80,13 @@ const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("exe");

#if defined(OS_WIN)
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kBrowserProcessExecutablePath[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
const base::FilePath::CharType kHelperProcessExecutablePath[] =
- FPL("chrome.exe");
+ FPL("brave.exe");
#elif defined(OS_MACOSX)
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
FPL(CHROMIUM_PRODUCT_STRING ".app/Contents/MacOS/" CHROMIUM_PRODUCT_STRING);
@@ -98,19 +98,19 @@ const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
const base::FilePath::CharType kHelperProcessExecutablePath[] =
FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper");
#elif defined(OS_ANDROID)
-const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
-const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
+const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("brave");
+const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("brave");
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
- FPL("chrome");
+ FPL("brave");
const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
- FPL("chrome");
+ FPL("brave");
#elif defined(OS_POSIX)
const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
- FPL("chrome");
-const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
+ FPL("brave");
+const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("brave");
const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
- FPL("chrome");
-const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
+ FPL("brave");
+const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("brave");
#endif // OS_*

#if defined(OS_MACOSX)
@@ -121,7 +121,7 @@ const base::FilePath::CharType kFrameworkExecutableName[] =
#endif // OS_MACOSX

#if defined(OS_WIN)
-const base::FilePath::CharType kBrowserResourcesDll[] = FPL("chrome.dll");
+const base::FilePath::CharType kBrowserResourcesDll[] = FPL("brave.dll");
const base::FilePath::CharType kStatusTrayWindowClass[] =
FPL("Chrome_StatusTrayWindow");
#endif // defined(OS_WIN)
13 changes: 13 additions & 0 deletions patches/chrome-installer-mini_installer-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn
index cc3782f4a91da503a743d38740210f8f8a973e8d..b82f855146f80e8ffa4ad3a3ba438dcc5a3c1623 100644
--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -130,7 +130,7 @@ template("generate_mini_installer") {

inputs = [
"$chrome_dll_file",
- "$root_out_dir/chrome.exe",
+ "$root_out_dir/brave.exe",
"$root_out_dir/locales/en-US.pak",
"$root_out_dir/setup.exe",
"$root_out_dir/v8_context_snapshot.bin",

0 comments on commit 0fab72b

Please sign in to comment.