Compare commits

...

12 Commits
5735 ... 5060

Author SHA1 Message Date
Marshall Greenblatt
8eb56c7914 Update to Chromium version 103.0.5060.134 2022-07-20 15:35:40 +00:00
Marshall Greenblatt
b1e93e1fd8 alloy: win: Focus the browser after dismissal of a modal dialog (fixes issue #3361) 2022-07-15 14:08:59 +03:00
Marshall Greenblatt
a5c79bb989 Increase frame reconnect timeout to 10 seconds (see issue #3260) 2022-07-13 12:19:32 +03:00
Marshall Greenblatt
d0bbcbb6bc Update to Chromium version 103.0.5060.114 2022-07-05 07:20:56 +00:00
Marshall Greenblatt
444ebe74e5 Update to Chromium version 103.0.5060.66 2022-06-29 10:39:34 +00:00
Marshall Greenblatt
8963d1e62c Windows: Fix AssertBlockingAllowed failure in GetAzureADJoinStateStorage (fixes issue #3342) 2022-06-23 14:03:48 +03:00
Marshall Greenblatt
e38efd51d1 Update to Chromium version 103.0.5060.53 2022-06-16 07:29:04 +00:00
Marshall Greenblatt
9e8dba7e03 Update to Chromium version 103.0.5060.42 2022-06-15 21:20:24 +03:00
Marshall Greenblatt
3ae256f4ba Update to Chromium version 103.0.5060.24 2022-05-27 07:39:38 +00:00
Marshall Greenblatt
4a6a16d4ef Call OnResourceRedirect for internal network service redirects (fixes issue #3336) 2022-05-25 16:46:59 +03:00
Marshall Greenblatt
6c10101ae4 ceftests: Minor code cleanup 2022-05-25 16:46:53 +03:00
Marshall Greenblatt
5788b1a1eb Update to Chromium version 103.0.5060.13 2022-05-23 13:05:05 +03:00
24 changed files with 109 additions and 88 deletions

View File

@@ -7,5 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/103.0.5060.0'
'chromium_checkout': 'refs/tags/103.0.5060.134',
'depot_tools_checkout': '964f8124b6'
}

View File

@@ -53,6 +53,7 @@
#include "ui/wm/core/wm_state.h"
#if BUILDFLAG(IS_WIN)
#include "base/enterprise_util.h"
#include "chrome/browser/chrome_browser_main_win.h"
#include "chrome/browser/win/parental_controls.h"
#endif
@@ -295,7 +296,13 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() {
// Windows parental controls calls can be slow, so we do an early init here
// that calculates this value off of the UI thread.
InitializeWinParentalControls();
#endif
// These methods may call LoadLibrary and could trigger
// AssertBlockingAllowed() failures if executed at a later time on the UI
// thread.
base::IsManagedDevice();
base::IsEnterpriseDevice();
#endif // BUILDFLAG(IS_WIN)
// Triggers initialization of the singleton instance on UI thread.
PluginFinder::GetInstance();

View File

@@ -630,6 +630,15 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
rect->bottom - rect->top, SWP_NOZORDER | SWP_NOACTIVATE);
}
break;
case WM_ENABLE:
if (wParam == TRUE && browser) {
// Give focus to the browser after EnableWindow enables this window
// (e.g. after a modal dialog is dismissed).
browser->SetFocus(true);
return 0;
}
break;
}
return DefWindowProc(hwnd, message, wParam, lParam);

View File

@@ -315,6 +315,7 @@ class InterceptedRequest : public network::mojom::URLLoader,
bool input_stream_previously_failed_ = false;
bool request_was_redirected_ = false;
int redirect_limit_ = net::URLRequest::kMaxRedirects;
bool redirect_in_progress_ = false;
// To avoid sending multiple OnReceivedError callbacks.
bool sent_error_callback_ = false;
@@ -581,7 +582,10 @@ void InterceptedRequest::OnReceiveResponse(
void InterceptedRequest::OnReceiveRedirect(
const net::RedirectInfo& redirect_info,
network::mojom::URLResponseHeadPtr head) {
bool needs_callback = false;
// Whether to notify the client. True by default so that we always notify for
// internal redirects that originate from the network process (for HSTS, etc).
// False while a redirect is in-progress to avoid duplicate notifications.
bool notify_client = !redirect_in_progress_;
current_response_ = std::move(head);
current_body_.reset();
@@ -593,8 +597,6 @@ void InterceptedRequest::OnReceiveRedirect(
current_response_->headers = current_headers_;
current_headers_ = nullptr;
}
} else {
needs_callback = true;
}
if (--redirect_limit_ == 0) {
@@ -606,18 +608,18 @@ void InterceptedRequest::OnReceiveRedirect(
// When we redirect via ContinueToHandleOverrideHeaders the |redirect_info|
// value is sometimes nonsense (HTTP_OK). Also, we won't get another call to
// OnHeadersReceived for the new URL so we need to execute the callback here.
// OnHeadersReceived for the new URL so we need to notify the client here.
if (header_client_redirect_url_.is_valid() &&
redirect_info.status_code == net::HTTP_OK) {
DCHECK(current_request_uses_header_client_);
needs_callback = true;
notify_client = true;
new_redirect_info =
MakeRedirectResponseAndInfo(header_client_redirect_url_);
} else {
new_redirect_info = redirect_info;
}
if (needs_callback) {
if (notify_client) {
HandleResponseOrRedirectHeaders(
new_redirect_info,
base::BindOnce(&InterceptedRequest::ContinueToBeforeRedirect,
@@ -831,6 +833,9 @@ void InterceptedRequest::HandleResponseOrRedirectHeaders(
redirect_url_ = redirect_info.has_value() ? redirect_info->new_url : GURL();
original_url_ = request_.url;
if (!redirect_url_.is_empty())
redirect_in_progress_ = true;
// |current_response_| may be nullptr when called from OnHeadersReceived.
auto headers =
current_response_ ? current_response_->headers : current_headers_;
@@ -930,6 +935,7 @@ void InterceptedRequest::ContinueToBeforeRedirect(
}
request_was_redirected_ = true;
redirect_in_progress_ = false;
if (header_client_redirect_url_.is_valid())
header_client_redirect_url_ = GURL();

View File

@@ -59,7 +59,7 @@ constexpr size_t kConnectionRetryMaxCt = 3U;
constexpr auto kConnectionRetryDelay = base::Seconds(1);
// Length of time to wait for the browser connection ACK before timing out.
constexpr auto kConnectionTimeout = base::Seconds(4);
constexpr auto kConnectionTimeout = base::Seconds(10);
} // namespace

View File

@@ -47,11 +47,13 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
uint64_t total_bytes_to_be_sent) override;
void DidReceiveResponse(const WebURLResponse& response) override;
void DidReceiveData(const char* data, int dataLength) override;
void DidFinishLoading(base::TimeTicks finish_time,
int64_t total_encoded_data_length,
int64_t total_encoded_body_length,
int64_t total_decoded_body_length,
bool should_report_corb_blocking) override;
void DidFinishLoading(
base::TimeTicks finish_time,
int64_t total_encoded_data_length,
int64_t total_encoded_body_length,
int64_t total_decoded_body_length,
bool should_report_corb_blocking,
absl::optional<bool> pervasive_payload_requested) override;
void DidFail(const WebURLError&,
base::TimeTicks finish_time,
int64_t total_encoded_data_length,
@@ -370,11 +372,13 @@ void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) {
context_->OnDownloadData(data, dataLength);
}
void CefWebURLLoaderClient::DidFinishLoading(base::TimeTicks finish_time,
int64_t total_encoded_data_length,
int64_t total_encoded_body_length,
int64_t total_decoded_body_length,
bool should_report_corb_blocking) {
void CefWebURLLoaderClient::DidFinishLoading(
base::TimeTicks finish_time,
int64_t total_encoded_data_length,
int64_t total_encoded_body_length,
int64_t total_decoded_body_length,
bool should_report_corb_blocking,
absl::optional<bool> pervasive_payload_requested) {
context_->OnComplete();
}

View File

@@ -20,10 +20,10 @@ index bbc7c3ece4123..fe2b35d70f1f3 100644
// TODO(wjmaclean): We should update the ProcessLock comparison API
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index 94fc328a7b8f1..e1de50ac9d589 100644
index 5417bc7894ad4..43ad329e38962 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -6208,6 +6208,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
@@ -6259,6 +6259,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
network::mojom::WebSandboxFlags sandbox_flags) {
// Calculate an approximation of the origin. The sandbox/csp are ignored.
url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this);
@@ -36,7 +36,7 @@ index 94fc328a7b8f1..e1de50ac9d589 100644
// Apply sandbox flags.
// See https://html.spec.whatwg.org/#sandboxed-origin-browsing-context-flag
@@ -6241,6 +6247,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
@@ -6292,6 +6298,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
if (IsSameDocument() || IsPageActivation())
return GetRenderFrameHost()->GetLastCommittedOrigin();

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 4618d52dd4aa7..e5eace1043ed5 100644
index 817539af42794..57c9def28ff59 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@@ -10,7 +10,7 @@ index 4618d52dd4aa7..e5eace1043ed5 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1953,6 +1954,7 @@ static_library("browser") {
@@ -1955,6 +1956,7 @@ static_library("browser") {
"//build:chromeos_buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@@ -18,7 +18,7 @@ index 4618d52dd4aa7..e5eace1043ed5 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2629,6 +2631,10 @@ static_library("browser") {
@@ -2631,6 +2633,10 @@ static_library("browser") {
deps += [ "//chrome/browser/ui/webui/connectors_internals:mojo_bindings" ]
}

View File

@@ -13,7 +13,7 @@ index 9e534ff1683f1..de406f5879be0 100644
return false;
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 87a0e51cf2dca..e13acd86314ae 100644
index 19d419331ef0e..cc4186b8fad91 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@@ -43,7 +43,7 @@ index 87a0e51cf2dca..e13acd86314ae 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -5410,6 +5416,7 @@ static_library("ui") {
@@ -5414,6 +5420,7 @@ static_library("ui") {
if (enable_basic_printing) {
deps += [
"//components/printing/browser",

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index fdad390f46a98..6554eea8bc247 100644
index 531e5d18284b6..227e649af0b58 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -300,6 +300,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -299,6 +299,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@@ -16,7 +16,7 @@ index fdad390f46a98..6554eea8bc247 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -528,6 +535,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -527,6 +534,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1;
@@ -27,7 +27,7 @@ index fdad390f46a98..6554eea8bc247 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -713,6 +724,14 @@ RenderViewContextMenu::RenderViewContextMenu(
@@ -712,6 +723,14 @@ RenderViewContextMenu::RenderViewContextMenu(
system_app_ = GetBrowser() && GetBrowser()->app_controller()
? GetBrowser()->app_controller()->system_app()
: nullptr;
@@ -42,7 +42,7 @@ index fdad390f46a98..6554eea8bc247 100644
}
RenderViewContextMenu::~RenderViewContextMenu() = default;
@@ -1094,6 +1113,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1093,6 +1112,12 @@ void RenderViewContextMenu::InitMenu() {
// menu, meaning that each menu item added/removed in this function will cause
// it to visibly jump on the screen (see b/173569669).
AppendQuickAnswersItems();
@@ -55,7 +55,7 @@ index fdad390f46a98..6554eea8bc247 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -2868,6 +2893,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
@@ -2861,6 +2886,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb);
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index d759fbfcd4215..156ac3dcbdda1 100644
index 5d2c348a99b76..bfa0c77ff1aa1 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -31,6 +31,7 @@

View File

@@ -78,7 +78,7 @@ index 51d73c9eaf521..2bede66d3bbb2 100644
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index aa1d901eab06e..d3a9b826150f4 100644
index f8610a34cd252..1194483b12561 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@@ -89,7 +89,7 @@ index aa1d901eab06e..d3a9b826150f4 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -1588,12 +1589,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1595,12 +1596,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state());
}
@@ -104,7 +104,7 @@ index aa1d901eab06e..d3a9b826150f4 100644
#if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1741,12 +1744,15 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1748,12 +1751,15 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@@ -121,7 +121,7 @@ index aa1d901eab06e..d3a9b826150f4 100644
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
@@ -1774,8 +1780,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1781,8 +1787,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@@ -172,7 +172,7 @@ index 0cb701b8772f5..ba6c84a530b64 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 4b3f602b9ee5a..2da7f9c2e029e 100644
index 20f93edf5e294..ee4defc8aa8c9 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -29,6 +29,7 @@
@@ -204,7 +204,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -3789,9 +3797,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -3791,9 +3799,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@@ -216,7 +216,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -5433,7 +5443,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -5435,7 +5445,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
network_service);
}
@@ -225,7 +225,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -5451,6 +5461,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -5453,6 +5463,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@@ -234,7 +234,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
}
std::vector<base::FilePath>
@@ -6322,10 +6334,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -6332,10 +6344,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@@ -247,7 +247,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -6344,7 +6356,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -6354,7 +6366,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@@ -257,7 +257,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -6452,7 +6465,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -6462,7 +6475,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@@ -267,7 +267,7 @@ index 4b3f602b9ee5a..2da7f9c2e029e 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index d9b8140ee7d94..b6c403c23f5d1 100644
index 42e7995cb0bf3..a8cb70d420960 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -117,6 +117,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -288,7 +288,7 @@ index d9b8140ee7d94..b6c403c23f5d1 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -922,7 +924,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -910,7 +912,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;

View File

@@ -180,7 +180,7 @@ index 9bd586697dece..80ef1f08cb463 100644
BrowserFrame(const BrowserFrame&) = delete;
BrowserFrame& operator=(const BrowserFrame&) = delete;
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 01615eb5b92ed..c96ffe8bb0283 100644
index dadd1e5ac9dcd..db1f1f6bb30b8 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -303,11 +303,10 @@ using content::WebContents;
@@ -337,7 +337,7 @@ index 01615eb5b92ed..c96ffe8bb0283 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 70f50e6752091..b8be336cee0fa 100644
index ddfe2de1b7cd5..eb776e91a2a2b 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow,

View File

@@ -12,7 +12,7 @@ index b75e19e7946b0..a92a7da426081 100644
GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING);
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index a1da50db3adf3..30ceb9ff65325 100644
index 1231f95cbef8e..92a715ebea1ec 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -682,6 +682,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(

View File

@@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index 6e905c33c688c..2716d2943f1a9 100644
index acd60381a6294..f9be70d2da75f 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -15,6 +15,7 @@
@@ -10,10 +10,10 @@ index 6e905c33c688c..2716d2943f1a9 100644
#include "components/embedder_support/pref_names.h"
#include "components/embedder_support/switches.h"
#include "components/policy/core/common/policy_pref_names.h"
@@ -330,6 +331,12 @@ std::string GetMajorVersionForUserAgentString(
@@ -344,6 +345,12 @@ std::string GetMajorVersionForUserAgentString(
std::string GetProductAndVersion(
ForceMajorVersionToMinorPosition force_major_to_minor) {
ForceMajorVersionToMinorPosition force_major_to_minor,
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) {
+ return command_line->GetSwitchValueASCII(
@@ -22,4 +22,4 @@ index 6e905c33c688c..2716d2943f1a9 100644
+
if (ShouldForceMajorVersionToMinorPosition(force_major_to_minor)) {
// Force major version to 99 and major version to minor version position.
if (base::FeatureList::IsEnabled(
if (ShouldReduceUserAgentMinorVersion(user_agent_reduction)) {

View File

@@ -12,7 +12,7 @@ index 7d538f812d72e..9eec79395aeec 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 3fb396df0a458..2e9dbe0a18a1b 100644
index 09b4c938cdec9..caf6994378898 100644
--- BUILD.gn
+++ BUILD.gn
@@ -17,6 +17,7 @@ import("//build/config/sanitizers/sanitizers.gni")

View File

@@ -1,19 +1,19 @@
diff --git net/base/load_flags_list.h net/base/load_flags_list.h
index 96d1a51ec1078..e8120a818b1f2 100644
index 6466deac2671e..a1748d666e3a3 100644
--- net/base/load_flags_list.h
+++ net/base/load_flags_list.h
@@ -101,3 +101,6 @@ LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 15)
// is considered privileged, and therefore this flag must only be set from a
// trusted process.
LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 16)
@@ -110,3 +110,6 @@ LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 16)
//
// Cannot be used together with BYPASS_CACHE, ONLY_FROM_CACHE, or DISABLE_CACHE.
LOAD_FLAG(USE_SINGLE_KEYED_CACHE, 1 << 17)
+
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 18)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 2db8e1bc9e5bb..680db4669dfe7 100644
index 619573fefdf9d..a35cac7867d06 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -1771,7 +1771,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
@@ -1781,7 +1781,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode
// is being overridden by NetworkDelegate and will eventually block them, as
// blocked cookies still need to be logged in that case.

View File

@@ -41,7 +41,7 @@ index cc4b13a7b9c67..84f3b9ed7cf49 100644
} // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index 730ac0aaf36da..97e7e096f2473 100644
index f03c0433ac7df..7b6bd0b3e9769 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3120,6 +3120,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
@@ -57,7 +57,7 @@ index 730ac0aaf36da..97e7e096f2473 100644
const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index 2ae96b8164271..139bc55b0f3db 100644
index 65297e78ee11f..589fbdae61bb5 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -779,6 +779,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl

View File

@@ -658,7 +658,7 @@ diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/me
index 4ac619cfdb725..8c6979e80d2dc 100644
--- ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -533,7 +533,8 @@ - (void)controllerWillAddMenu:(NSMenu*)menu fromModel:(ui::MenuModel*)model {
@@ -533,7 +533,8 @@ void MenuRunnerImplCocoa::RunMenuAt(Widget* parent,
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,

View File

@@ -1,5 +1,5 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index b94e87b6f90c9..297280d7f52ca 100644
index 452062e8b570e..83fbdb1175ec2 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -3026,6 +3026,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -33,7 +33,7 @@ index b94e87b6f90c9..297280d7f52ca 100644
}
void WebContentsImpl::RenderWidgetDeleted(
@@ -3902,6 +3912,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -3912,6 +3922,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// objects.
create_params.renderer_initiated_creation = !is_new_browsing_instance;
@@ -49,7 +49,7 @@ index b94e87b6f90c9..297280d7f52ca 100644
std::unique_ptr<WebContentsImpl> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -7763,6 +7782,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -7773,6 +7792,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// frames).
SetFocusedFrameTree(node->frame_tree());
}
@@ -88,7 +88,7 @@ index e82a5b71eb8a6..34a2f19d8ddca 100644
// the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 04aa4d993b331..59ed45848f201 100644
index 348dcde05d71e..871f0e0e22eb6 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -57,9 +57,11 @@ class EyeDropperListener;

View File

@@ -539,6 +539,15 @@ LRESULT CALLBACK RootWindowWin::RootWndProc(HWND hWnd,
self->OnFocus();
return 0;
case WM_ENABLE:
if (wParam == TRUE) {
// Give focus to the browser after EnableWindow enables this window
// (e.g. after a modal dialog is dismissed).
self->OnFocus();
return 0;
}
break;
case WM_SIZE:
self->OnSize(wParam == SIZE_MINIMIZED);
break;

View File

@@ -299,8 +299,7 @@ class TestServerObserver : public test_server::ObserverHelper {
base::OnceClosure done_callback)
: setup_(setup),
ready_callback_(std::move(ready_callback)),
done_callback_(std::move(done_callback)),
weak_ptr_factory_(this) {
done_callback_(std::move(done_callback)) {
DCHECK(setup);
Initialize();
}
@@ -343,8 +342,6 @@ class TestServerObserver : public test_server::ObserverHelper {
base::OnceClosure ready_callback_;
base::OnceClosure done_callback_;
base::WeakPtrFactory<TestServerObserver> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(TestServerObserver);
};

View File

@@ -385,14 +385,6 @@ void TestHandler::CloseBrowser(CefRefPtr<CefBrowser> browser,
browser->GetHost()->CloseBrowser(force_close);
}
void TestHandler::AddResource(const std::string& url,
const std::string& content,
const std::string& mime_type) {
ResourceContent::HeaderMap headerMap = ResourceContent::HeaderMap();
ResourceContent rc = ResourceContent(content, mime_type, headerMap);
AddResourceEx(url, rc);
}
void TestHandler::AddResource(const std::string& url,
const std::string& content,
const std::string& mime_type,

View File

@@ -233,14 +233,10 @@ class TestHandler : public CefClient,
CefRefPtr<CefDictionaryValue> extra_info = nullptr);
static void CloseBrowser(CefRefPtr<CefBrowser> browser, bool force_close);
void AddResource(const std::string& url,
const std::string& content,
const std::string& mime_type);
void AddResource(const std::string& url,
const std::string& content,
const std::string& mime_type,
const ResourceContent::HeaderMap& header_map);
const ResourceContent::HeaderMap& header_map = {});
void AddResourceEx(const std::string& url, const ResourceContent& content);