Fix clang-tidy warnings (see #3632)

This commit is contained in:
Marshall Greenblatt
2024-01-21 14:18:09 -05:00
parent a02d2ab3e6
commit a0446a3c8a
5 changed files with 8 additions and 3 deletions

View File

@@ -130,7 +130,9 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
friend class CefBrowserInfo;
friend class base::RefCounted<NavigationLock>;
// All usage is via friend declaration. NOLINTNEXTLINE
NavigationLock();
// All usage is via friend declaration. NOLINTNEXTLINE
~NavigationLock();
base::OnceClosure pending_action_;

View File

@@ -33,7 +33,7 @@ class CefContextMenuObserver : public RenderViewContextMenuObserver,
const_cast<content::ContextMenuParams*>(&context_menu_->params()));
model_ = new CefSimpleMenuModelImpl(
const_cast<ui::SimpleMenuModel*>(&context_menu_->menu_model()),
context_menu_, this, /*is_owned=*/false, /*is_popup=*/false);
context_menu_, this, /*is_owned=*/false, /*is_submenu=*/false);
handler_->OnBeforeContextMenu(browser_, GetFrame(), params_, model_);
}

View File

@@ -298,7 +298,8 @@ void SaveCookies(const CefBrowserContext::Getter& browser_context_getter,
net::CookieInclusionStatus returned_status;
std::unique_ptr<net::CanonicalCookie> cookie = net::CanonicalCookie::Create(
request.url, cookie_string, base::Time::Now(),
absl::make_optional(response_date), /*partition_key=*/absl::nullopt,
absl::make_optional(response_date),
/*cookie_partition_key=*/absl::nullopt,
/*block_truncated=*/true, &returned_status);
if (!returned_status.IsInclude()) {
continue;

View File

@@ -824,6 +824,7 @@ void InterceptedRequest::InterceptResponseReceived(
current_response_->encoded_data_length = headers->raw_headers().length();
current_response_->content_length = 0;
// Avoid incorrect replacement of 0 with nullptr. NOLINTNEXTLINE
current_response_->encoded_body_length = 0;
std::string origin;
@@ -981,6 +982,7 @@ net::RedirectInfo InterceptedRequest::MakeRedirectResponseAndInfo(
// Clear the Content-Length values.
current_response_->content_length = 0;
// Avoid incorrect replacement of 0 with nullptr. NOLINTNEXTLINE
current_response_->encoded_body_length = 0;
current_response_->headers->RemoveHeader(
net::HttpRequestHeaders::kContentLength);

View File

@@ -1694,7 +1694,7 @@ class ParentOrderMainTestHandler : public OrderMainTestHandler {
};
void RunOrderMainPopupTest(bool cross_origin) {
TestHandler::CompletionState completion_state(/*count=*/2);
TestHandler::CompletionState completion_state(/*total=*/2);
TestHandler::Collection collection(&completion_state);
CefRefPtr<PopupOrderMainTestHandler> popup_handler =