From daff413b412ad5039a5af4e65d2fd84610f06d26 Mon Sep 17 00:00:00 2001 From: mkarolin Date: Wed, 13 May 2020 11:43:50 -0400 Subject: [PATCH] Lint fixes --- .../brave_spelling_menu_observer_browsertest.cc | 5 +++-- .../ui/views/tabs/brave_browser_tab_strip_controller.cc | 2 ++ .../browser/permissions/permission_manager_factory.cc | 3 ++- chromium_src/chrome/browser/profiles/profile_manager.h | 5 +++++ .../install_static/brave_install_details_unittest.cc | 4 ++-- .../chrome/install_static/chromium_install_modes.h | 9 +++++---- chromium_src/chrome/installer/setup/install_worker.cc | 2 +- .../core/browser/content_settings_registry.cc | 4 ++-- .../weblayer/renderer/content_renderer_client_impl.cc | 7 ++++--- test/base/brave_test_launcher_delegate.cc | 3 ++- 10 files changed, 28 insertions(+), 16 deletions(-) diff --git a/browser/renderer_context_menu/brave_spelling_menu_observer_browsertest.cc b/browser/renderer_context_menu/brave_spelling_menu_observer_browsertest.cc index 52de431bc92..2bc680cf9c6 100644 --- a/browser/renderer_context_menu/brave_spelling_menu_observer_browsertest.cc +++ b/browser/renderer_context_menu/brave_spelling_menu_observer_browsertest.cc @@ -1,4 +1,5 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public +/* Copyright 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -40,7 +41,7 @@ class BraveSpellingMenuObserverTest : public InProcessBrowserTest { observer_.reset(new SpellingMenuObserver(menu_.get())); menu_->SetObserver(observer_.get()); // Uncomment to print the menu to standard output for each test. - //menu_->EnablePrintMenu(); + // menu_->EnablePrintMenu(); } void InitMenu(const char* word, const char* suggestion) { diff --git a/browser/ui/views/tabs/brave_browser_tab_strip_controller.cc b/browser/ui/views/tabs/brave_browser_tab_strip_controller.cc index c2c18b34a5c..48f3d8ee388 100644 --- a/browser/ui/views/tabs/brave_browser_tab_strip_controller.cc +++ b/browser/ui/views/tabs/brave_browser_tab_strip_controller.cc @@ -5,6 +5,8 @@ #include "brave/browser/ui/views/tabs/brave_browser_tab_strip_controller.h" +#include + #include "brave/browser/ui/views/tabs/brave_tab_context_menu_contents.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/tabs/tab_strip.h" diff --git a/chromium_src/chrome/browser/permissions/permission_manager_factory.cc b/chromium_src/chrome/browser/permissions/permission_manager_factory.cc index f9e8b48651c..4913e9292e7 100644 --- a/chromium_src/chrome/browser/permissions/permission_manager_factory.cc +++ b/chromium_src/chrome/browser/permissions/permission_manager_factory.cc @@ -30,7 +30,8 @@ BraveCreatePermissionContexts(Profile* profile) { } // namespace #define BuildServiceInstanceFor BuildServiceInstanceFor_ChromiumImpl -#define GeolocationPermissionContextDelegate BraveGeolocationPermissionContextDelegate +#define GeolocationPermissionContextDelegate \ + BraveGeolocationPermissionContextDelegate #include "../../../../../chrome/browser/permissions/permission_manager_factory.cc" #undef GeolocationPermissionContextDelegate #undef BuildServiceInstanceFor diff --git a/chromium_src/chrome/browser/profiles/profile_manager.h b/chromium_src/chrome/browser/profiles/profile_manager.h index 9f243297c16..36022fae60f 100644 --- a/chromium_src/chrome/browser/profiles/profile_manager.h +++ b/chromium_src/chrome/browser/profiles/profile_manager.h @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ + #define GetLastUsedProfileName virtual GetLastUsedProfileName #define InitProfileUserPrefs virtual InitProfileUserPrefs #define DoFinalInitForServices virtual DoFinalInitForServices @@ -21,3 +24,5 @@ #undef DoFinalInitForServices #undef InitProfileUserPrefs #undef GetLastUsedProfileName + +#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ diff --git a/chromium_src/chrome/install_static/brave_install_details_unittest.cc b/chromium_src/chrome/install_static/brave_install_details_unittest.cc index ce540c75a63..51067c9e540 100644 --- a/chromium_src/chrome/install_static/brave_install_details_unittest.cc +++ b/chromium_src/chrome/install_static/brave_install_details_unittest.cc @@ -57,8 +57,8 @@ class FakeInstallDetails : public InstallDetails { TEST(InstallDetailsTest, GetClientStateKeyPath) { FakeInstallDetails details; #if defined(OFFICIAL_BUILD) - EXPECT_THAT(details.GetClientStateKeyPath(), - StrEq(L"Software\\BraveSoftware\\Update\\ClientState\\testguid")); + EXPECT_THAT(details.GetClientStateKeyPath(), + StrEq(L"Software\\BraveSoftware\\Update\\ClientState\\testguid")); #else EXPECT_THAT(details.GetClientStateKeyPath(), StrEq(std::wstring(L"Software\\").append(kProductPathName))); diff --git a/chromium_src/chrome/install_static/chromium_install_modes.h b/chromium_src/chrome/install_static/chromium_install_modes.h index 8c717f9560c..65dd61465e8 100644 --- a/chromium_src/chrome/install_static/chromium_install_modes.h +++ b/chromium_src/chrome/install_static/chromium_install_modes.h @@ -1,11 +1,12 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public +/* Copyright 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ // Brand-specific types and constants for Google Chrome. -#ifndef CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ -#define CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ +#ifndef BRAVE_CHROMIUM_SRC_CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ namespace install_static { @@ -25,4 +26,4 @@ enum InstallConstantIndex { } // namespace install_static -#endif // CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ +#endif // BRAVE_CHROMIUM_SRC_CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ diff --git a/chromium_src/chrome/installer/setup/install_worker.cc b/chromium_src/chrome/installer/setup/install_worker.cc index 219be55c6dd..590018eb923 100644 --- a/chromium_src/chrome/installer/setup/install_worker.cc +++ b/chromium_src/chrome/installer/setup/install_worker.cc @@ -14,4 +14,4 @@ #if defined(OFFICIAL_BUILD) #undef BUILDFLAG_INTERNAL_USE_GOOGLE_UPDATE_INTEGRATION -#endif \ No newline at end of file +#endif diff --git a/chromium_src/components/content_settings/core/browser/content_settings_registry.cc b/chromium_src/components/content_settings/core/browser/content_settings_registry.cc index a8720b092ba..0eafedd2373 100644 --- a/chromium_src/components/content_settings/core/browser/content_settings_registry.cc +++ b/chromium_src/components/content_settings/core/browser/content_settings_registry.cc @@ -66,8 +66,8 @@ ContentSettingsInfo::INHERIT_IN_INCOGNITO, \ ContentSettingsInfo::PERSISTENT, \ ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); \ - /* We need 62, 63, 64 for ContentSettingsTypes for Android tabs \ - * migration*/ \ + /* We need 62, 63, 64 for ContentSettingsTypes for Android tabs */ \ + /* migration*/ \ /* We read only from these settings*/ \ Register( \ static_cast(62), "desktop-view", \ diff --git a/chromium_src/weblayer/renderer/content_renderer_client_impl.cc b/chromium_src/weblayer/renderer/content_renderer_client_impl.cc index cc41b446676..fe4323aef0e 100644 --- a/chromium_src/weblayer/renderer/content_renderer_client_impl.cc +++ b/chromium_src/weblayer/renderer/content_renderer_client_impl.cc @@ -10,9 +10,10 @@ #include "third_party/widevine/cdm/buildflags.h" // In components/cdm/renderer/android_key_systems.h the declaration of -// AddAndroidWidevine is guarded by ENABLE_WIDEVINE, but in content_renderer_client_impl below -// it is used without a guard. Instead of patching we can add an empty -// definition of the same function here for when ENABLE_WIDEVINE is not true. +// AddAndroidWidevine is guarded by ENABLE_WIDEVINE, but in +// content_renderer_client_impl below it is used without a guard. Instead of +// patching we can add an empty definition of the same function here for when +// ENABLE_WIDEVINE is not true. #if !BUILDFLAG(ENABLE_WIDEVINE) namespace cdm { diff --git a/test/base/brave_test_launcher_delegate.cc b/test/base/brave_test_launcher_delegate.cc index 0005abf93aa..56fac1c800e 100644 --- a/test/base/brave_test_launcher_delegate.cc +++ b/test/base/brave_test_launcher_delegate.cc @@ -1,4 +1,5 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public +/* Copyright 2019 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */