From ee2a792f229333805f8f11c057c8f2030860d098 Mon Sep 17 00:00:00 2001 From: taoxueao Date: Sat, 12 Oct 2024 12:20:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4debug=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=B8=AD=E7=9A=84url=20=EF=BC=88cherry=20picked=20commit=20fro?= =?UTF-8?q?m=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcef/browser/browser_contents_delegate.cc | 5 +++-- .../browser/net_service/resource_request_handler_wrapper.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libcef/browser/browser_contents_delegate.cc b/libcef/browser/browser_contents_delegate.cc index 3f58f5483..c8b782edb 100644 --- a/libcef/browser/browser_contents_delegate.cc +++ b/libcef/browser/browser_contents_delegate.cc @@ -96,8 +96,9 @@ void MaybeSetUserAgentOverrideForMainFrame( std::string final_ua = nweb_ex::AlloyBrowserUAConfig::GetInstance()->GetUserAgentForHost(host); LOG(DEBUG) << "DidStartNavigation, host " << host << ", final_ua " << final_ua - << ", user_gesture " << navigation->HasUserGesture() << ", url " - << url.spec(); + << ", user_gesture " << navigation->HasUserGesture() + << ", is_main_frame " << navigation->IsInMainFrame() + << ", is_reload " << is_reload; navigation->SetRequestHeader(net::HttpRequestHeaders::kUserAgent, final_ua); if (!navigation->IsInMainFrame()) { diff --git a/libcef/browser/net_service/resource_request_handler_wrapper.cc b/libcef/browser/net_service/resource_request_handler_wrapper.cc index 193ae1e70..db3ca74de 100644 --- a/libcef/browser/net_service/resource_request_handler_wrapper.cc +++ b/libcef/browser/net_service/resource_request_handler_wrapper.cc @@ -1665,12 +1665,12 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler { void ReportITPResult(const network::ResourceRequest& request) { CEF_REQUIRE_IOT(); - LOG(DEBUG) << "ReportITPResult, url: " << request.url.spec(); if (!init_state_ || !request.request_initiator || !request.url.has_host()) { LOG(ERROR) << "ReportITPResult failed for param error"; return; } + LOG(DEBUG) << "ReportITPResult"; CEF_POST_TASK( CEF_UIT, base::BindOnce(&ReportITPResultInUiTask, init_state_->browser_, CefString(request.url.host()), -- Gitee