From 4708bf5c82f6d1aed263b563c4487299403850fe Mon Sep 17 00:00:00 2001 From: Andrew Savage Date: Wed, 17 Apr 2024 10:34:48 -0700 Subject: [PATCH] Fix lint issues in feature branch (#2970) b/335357085 --- .../layout_tests/web_platform_test_parser.cc | 8 +++---- cobalt/network/dial/dial_http_server.h | 2 +- cobalt/network/disk_cache/impl.cc | 23 ------------------- cobalt/renderer/backend/graphics_context.cc | 4 ++-- cobalt/web/error_event_test.cc | 6 ++--- cobalt/webdriver/dispatcher.h | 1 + cobalt/webdriver/protocol/button.cc | 1 + cobalt/webdriver/protocol/element_id.cc | 1 + cobalt/webdriver/protocol/log_entry.cc | 1 + cobalt/webdriver/protocol/size.cc | 1 + cobalt/websocket/web_socket_impl.cc | 5 ++-- 11 files changed, 16 insertions(+), 37 deletions(-) delete mode 100644 cobalt/network/disk_cache/impl.cc diff --git a/cobalt/layout_tests/web_platform_test_parser.cc b/cobalt/layout_tests/web_platform_test_parser.cc index e26672ffd511..57be8d2005bb 100644 --- a/cobalt/layout_tests/web_platform_test_parser.cc +++ b/cobalt/layout_tests/web_platform_test_parser.cc @@ -119,12 +119,12 @@ std::vector EnumerateWebPlatformTests( &result); if (!success) { - DLOG(ERROR) << "Failed to evaluate precondition: " - << "\"" << precondition << "\""; + DLOG(ERROR) << "Failed to evaluate precondition: " << "\"" << precondition + << "\""; // Continue to enumerate tests like normal. } else if (result != "true") { - DLOG(WARNING) << "Skipping Web Platform Tests for " - << "\"" << top_level << "\""; + DLOG(WARNING) << "Skipping Web Platform Tests for " << "\"" << top_level + << "\""; return std::vector(); } } diff --git a/cobalt/network/dial/dial_http_server.h b/cobalt/network/dial/dial_http_server.h index d5487091326e..809f2a6ce56b 100644 --- a/cobalt/network/dial/dial_http_server.h +++ b/cobalt/network/dial/dial_http_server.h @@ -49,7 +49,7 @@ class NET_EXPORT DialHttpServer void Stop(); // HttpServer::Delegate implementation - void OnConnect(int /*conn_id*/) override{}; + void OnConnect(int /*conn_id*/) override {}; void OnHttpRequest(int conn_id, const net::HttpServerRequestInfo& info) override; diff --git a/cobalt/network/disk_cache/impl.cc b/cobalt/network/disk_cache/impl.cc deleted file mode 100644 index a57684dbd10d..000000000000 --- a/cobalt/network/disk_cache/impl.cc +++ /dev/null @@ -1,23 +0,0 @@ -#include "cobalt/network/disk_cache/cobalt_backend_impl.h" -#include "cobalt/network/disk_cache/resource_type.h" - -namespace cobalt { -namespace network { -namespace disk_cache { - -namespace defaults { -std::string GetSubdirectory(ResourceType resource_type) { return ""; } - -uint32_t GetQuota(ResourceType resource_type) { return 0; } -} // namespace defaults - -namespace settings { -uint32_t GetQuota(ResourceType resource_type) { return 0; } -void SetQuota(ResourceType resource_type, uint32_t value) {} -bool GetCacheEnabled() { return false; } -void SetCacheEnabled(bool value) {} -} // namespace settings - -} // namespace disk_cache -} // namespace network -} // namespace cobalt diff --git a/cobalt/renderer/backend/graphics_context.cc b/cobalt/renderer/backend/graphics_context.cc index dd52c0640bfe..013d9e208277 100644 --- a/cobalt/renderer/backend/graphics_context.cc +++ b/cobalt/renderer/backend/graphics_context.cc @@ -31,8 +31,8 @@ GraphicsContext::GraphicsContext(GraphicsSystem* system) : system_(system) { // Verify it's the extension needed. if (strcmp(graphics_extension_->name, kCobaltExtensionGraphicsName) != 0 || graphics_extension_->version < 1) { - LOG(WARNING) << "Not using supplied cobalt graphics extension: " - << "'" << graphics_extension_->name << "' (" + LOG(WARNING) << "Not using supplied cobalt graphics extension: " << "'" + << graphics_extension_->name << "' (" << graphics_extension_->version << ")"; graphics_extension_ = nullptr; } diff --git a/cobalt/web/error_event_test.cc b/cobalt/web/error_event_test.cc index 430569b0be54..79de3c4c87be 100644 --- a/cobalt/web/error_event_test.cc +++ b/cobalt/web/error_event_test.cc @@ -109,11 +109,9 @@ TEST_P(ErrorEventTestWithJavaScript, ConstructorWithEventTypeAndErrorInitDict) { EXPECT_EQ("rulez", result); if (!success) { - DLOG(ERROR) << "Failed to evaluate test: " - << "\"" << result << "\""; + DLOG(ERROR) << "Failed to evaluate test: " << "\"" << result << "\""; } else { - LOG(INFO) << "Test result : " - << "\"" << result << "\""; + LOG(INFO) << "Test result : " << "\"" << result << "\""; } } diff --git a/cobalt/webdriver/dispatcher.h b/cobalt/webdriver/dispatcher.h index 1418f78b82f4..383797c55f70 100644 --- a/cobalt/webdriver/dispatcher.h +++ b/cobalt/webdriver/dispatcher.h @@ -17,6 +17,7 @@ #include #include +#include #include #include "base/callback.h" diff --git a/cobalt/webdriver/protocol/button.cc b/cobalt/webdriver/protocol/button.cc index 96c299867577..e3132c53b2d3 100644 --- a/cobalt/webdriver/protocol/button.cc +++ b/cobalt/webdriver/protocol/button.cc @@ -15,6 +15,7 @@ #include "cobalt/webdriver/protocol/button.h" #include +#include namespace cobalt { namespace webdriver { diff --git a/cobalt/webdriver/protocol/element_id.cc b/cobalt/webdriver/protocol/element_id.cc index d82b1ac82bae..fc0399d18012 100644 --- a/cobalt/webdriver/protocol/element_id.cc +++ b/cobalt/webdriver/protocol/element_id.cc @@ -15,6 +15,7 @@ #include "cobalt/webdriver/protocol/element_id.h" #include +#include namespace cobalt { namespace webdriver { diff --git a/cobalt/webdriver/protocol/log_entry.cc b/cobalt/webdriver/protocol/log_entry.cc index 6df7439bb9cc..7abaad5d722d 100644 --- a/cobalt/webdriver/protocol/log_entry.cc +++ b/cobalt/webdriver/protocol/log_entry.cc @@ -15,6 +15,7 @@ #include "cobalt/webdriver/protocol/log_entry.h" #include +#include #include "base/logging.h" diff --git a/cobalt/webdriver/protocol/size.cc b/cobalt/webdriver/protocol/size.cc index 9cab2212bc37..433f49785b24 100644 --- a/cobalt/webdriver/protocol/size.cc +++ b/cobalt/webdriver/protocol/size.cc @@ -15,6 +15,7 @@ #include "cobalt/webdriver/protocol/size.h" #include +#include namespace cobalt { namespace webdriver { diff --git a/cobalt/websocket/web_socket_impl.cc b/cobalt/websocket/web_socket_impl.cc index 8b98da11abab..896726c33079 100644 --- a/cobalt/websocket/web_socket_impl.cc +++ b/cobalt/websocket/web_socket_impl.cc @@ -205,9 +205,8 @@ void WebSocketImpl::OnClose(bool was_clean, int error_code, std::uint16_t close_code = static_cast(error_code); - DLOG(INFO) << "WebSocket is closing." - << " code[" << close_code << "] reason[" << close_reason << "]" - << " was_clean: " << was_clean; + DLOG(INFO) << "WebSocket is closing." << " code[" << close_code << "] reason[" + << close_reason << "]" << " was_clean: " << was_clean; // Queue the deletion of |websocket_channel_|. We would do it here, but this // function may be called as a callback *by* |websocket_channel_|;