Fix patched chrome build with enable_cef=false

This commit is contained in:
Marshall Greenblatt
2023-01-23 14:12:47 -05:00
parent 2ad6ced9f0
commit 4d32741e1b
2 changed files with 25 additions and 7 deletions

View File

@@ -102,7 +102,7 @@ index 49993fbc333f8..c39e8743e281e 100644
// content::ContentMainDelegate: // content::ContentMainDelegate:
absl::optional<int> BasicStartupComplete() override; absl::optional<int> BasicStartupComplete() override;
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index 2893df3488d8f..8828270f624cb 100644 index 2893df3488d8f..f754fc076932f 100644
--- chrome/browser/chrome_browser_main.cc --- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc
@@ -51,6 +51,7 @@ @@ -51,6 +51,7 @@
@@ -131,6 +131,24 @@ index 2893df3488d8f..8828270f624cb 100644
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
// We must call DoUpgradeTasks now that we own the browser singleton to // We must call DoUpgradeTasks now that we own the browser singleton to
@@ -1475,7 +1476,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
-#if BUILDFLAG(ENABLE_PROCESS_SINGLETON)
+#if BUILDFLAG(ENABLE_PROCESS_SINGLETON) && !BUILDFLAG(ENABLE_CEF)
// Handle special early return paths (which couldn't be processed even earlier
// as they require the process singleton to be held) first.
@@ -1522,7 +1523,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return content::RESULT_CODE_NORMAL_EXIT;
#endif // BUILDFLAG(IS_WIN)
}
-#endif // BUILDFLAG(ENABLE_PROCESS_SINGLETON)
+#endif // BUILDFLAG(ENABLE_PROCESS_SINGLETON) && !BUILDFLAG(ENABLE_CEF)
#if BUILDFLAG(IS_WIN)
// Check if there is any machine level Chrome installed on the current
@@ -1575,12 +1576,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1575,12 +1576,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state()); browser_process_->local_state());
} }

View File

@@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index 40148eeaef7d1..bd4e5d62efc97 100644 index 40148eeaef7d1..9e2fae7232653 100644
--- components/embedder_support/user_agent_utils.cc --- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
@@ -10,17 +10,17 @@ index 40148eeaef7d1..bd4e5d62efc97 100644
#include "components/embedder_support/pref_names.h" #include "components/embedder_support/pref_names.h"
#include "components/embedder_support/switches.h" #include "components/embedder_support/switches.h"
#include "components/policy/core/common/policy_pref_names.h" #include "components/policy/core/common/policy_pref_names.h"
@@ -28,6 +29,10 @@ @@ -35,6 +36,10 @@
#include "third_party/blink/public/common/features.h" #include "base/win/windows_version.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h" #endif // BUILDFLAG(IS_WIN)
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)
+#include "cef/libcef/common/cef_switches.h" +#include "cef/libcef/common/cef_switches.h"
+#endif +#endif
+ +
#if BUILDFLAG(IS_WIN) namespace embedder_support {
#include <windows.h>
namespace {
@@ -382,6 +387,14 @@ std::string GetMajorVersionForUserAgentString( @@ -382,6 +387,14 @@ std::string GetMajorVersionForUserAgentString(
std::string GetProductAndVersion( std::string GetProductAndVersion(
ForceMajorVersionToMinorPosition force_major_to_minor, ForceMajorVersionToMinorPosition force_major_to_minor,