Skip to content

Commit

Permalink
Enable 'gn check' in //chrome/browser/updates
Browse files Browse the repository at this point in the history
This adds missing dependencies and adds nogncheck comments to any
includes in //chrome/browser/updates to files that live in
//chrome/browser:browser.

Bug: 949535
Change-Id: Icdac512e2dc1d4df7620713ae7f912829e214892
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585665
Reviewed-by: Erik Staab <estaab@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840639}
  • Loading branch information
robbiemc authored and Chromium LUCI CQ committed Jan 6, 2021
1 parent db01bd3 commit a64364b
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ no_check_targets = [
"//chrome/browser/safety_check/android:*", # 3 errors
"//chrome/browser/storage_access_api:*", # 2 errors
"//chrome/browser/touch_to_fill/android:*", # 8 errors
"//chrome/browser/updates/announcement_notification:*", # 15 errors
"//chrome/browser/updates/internal:*", # 8 errors
"//chrome/browser/updates:*", # 21 errors
"//chrome/notification_helper:*", # 4 errors
"//chrome/services/cups_proxy/public/cpp:*", # 2 errors
"//chrome/services/cups_proxy:*", # 6 errors
Expand Down
10 changes: 9 additions & 1 deletion chrome/browser/updates/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ source_set("updates") {
"update_notification_service_bridge.h",
]

deps = [ ":factory" ]
deps = [
":factory",
"//base",
"//components/keyed_service/core",
]
}

source_set("factory") {
Expand Down Expand Up @@ -41,6 +45,10 @@ source_set("unit_tests") {
"update_notification_config_unittest.cc",
]
deps = [
":updates",
"//chrome/browser/notifications/scheduler/public",
"//chrome/browser/notifications/scheduler/test:test_support",
"//chrome/browser/updates/internal:lib",
"//chrome/test:test_support",
"//skia",
"//testing/gmock",
Expand Down
10 changes: 9 additions & 1 deletion chrome/browser/updates/announcement_notification/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ source_set("announcement_notification") {
deps = [
"//base",
"//chrome/app:generated_resources",
"//chrome/browser:browser_process",
"//components/keyed_service/content",
"//components/pref_registry",
"//components/prefs:prefs",
"//skia",
"//ui/base",
Expand All @@ -32,6 +34,8 @@ source_set("announcement_notification") {
"announcement_notification_delegate_android.cc",
"announcement_notification_delegate_android.h",
]

deps += [ "//chrome/android:chrome_jni_headers" ]
} else {
sources += [
"announcement_notification_delegate.cc",
Expand All @@ -40,7 +44,10 @@ source_set("announcement_notification") {
"announcement_notification_handler.h",
]

deps += [ "//chrome/browser/ui" ]
deps += [
"//chrome/browser/ui",
"//ui/message_center/public/cpp",
]
}
}

Expand All @@ -52,6 +59,7 @@ source_set("unit_tests") {
":announcement_notification",
"//build:chromeos_buildflags",
"//chrome/test:test_support",
"//components/sync_preferences",
"//skia",
"//testing/gmock",
"//testing/gtest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <string>

#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/notifications/notification_display_service.h"
#include "chrome/browser/first_run/first_run.h" // nogncheck
#include "chrome/browser/notifications/notification_display_service.h" // nogncheck
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/message_center/public/cpp/notification.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "chrome/android/chrome_jni_headers/AnnouncementNotificationManager_jni.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_android.h"
#include "chrome/browser/profiles/profile.h" // nogncheck
#include "chrome/browser/profiles/profile_android.h" // nogncheck
#include "chrome/browser/updates/announcement_notification/announcement_notification_service_factory.h"

AnnouncementNotificationDelegateAndroid::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "chrome/browser/updates/announcement_notification/announcement_notification_handler.h"

#include "base/metrics/field_trial_params.h"
#include "chrome/browser/notifications/notification_display_service.h"
#include "chrome/browser/notifications/notification_display_service_factory.h"
#include "chrome/browser/notifications/notification_display_service.h" // nogncheck
#include "chrome/browser/notifications/notification_display_service_factory.h" // nogncheck
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/optional.h"
#include "chrome/browser/notifications/notification_handler.h"
#include "chrome/browser/notifications/notification_handler.h" // nogncheck

class Profile;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/clock.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_attributes_entry.h" // nogncheck
#include "chrome/browser/profiles/profile_attributes_storage.h" // nogncheck
#include "chrome/browser/profiles/profile_manager.h" // nogncheck
#include "chrome/grit/generated_resources.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include "base/time/default_clock.h"
#include "build/build_config.h"
#include "chrome/browser/notifications/notification_display_service_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/notifications/notification_display_service_factory.h" // nogncheck
#include "chrome/browser/profiles/incognito_helpers.h" // nogncheck
#include "chrome/browser/profiles/profile.h" // nogncheck
#include "chrome/browser/updates/announcement_notification/announcement_notification_delegate.h"
#include "chrome/browser/updates/announcement_notification/announcement_notification_service.h"
#include "chrome/browser/updates/announcement_notification/empty_announcement_notification_service.h"
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/updates/internal/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# found in the LICENSE file.

source_set("lib") {
visibility = [ "//chrome/browser/updates:factory" ]
visibility = [ "//chrome/browser/updates:*" ]

sources = [
"update_notification_service_impl.cc",
Expand All @@ -12,6 +12,7 @@ source_set("lib") {

deps = [
"//base",
"//chrome/browser/notifications/scheduler/public",
"//components/keyed_service/core",
"//skia",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include "chrome/browser/notifications/scheduler/public/notification_schedule_service.h"
#include "chrome/browser/notifications/scheduler/public/schedule_service_utils.h"
#include "chrome/browser/notifications/scheduler/public/throttle_config.h"
#include "chrome/browser/updates/update_notification_config.h"
#include "chrome/browser/updates/update_notification_info.h"
#include "chrome/browser/updates/update_notification_service_bridge.h"
#include "chrome/browser/updates/update_notification_config.h" // nogncheck
#include "chrome/browser/updates/update_notification_info.h" // nogncheck
#include "chrome/browser/updates/update_notification_service_bridge.h" // nogncheck

namespace updates {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UPDATES_INTERNAL_UPDATE_NOTIFICATION_SERVICE_IMPL_H_
#define CHROME_BROWSER_UPDATES_INTERNAL_UPDATE_NOTIFICATION_SERVICE_IMPL_H_

#include "chrome/browser/updates/update_notification_service.h"
#include "chrome/browser/updates/update_notification_service.h" // nogncheck

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/updates/update_notification_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chrome/browser/updates/update_notification_config.h"

#include "base/metrics/field_trial_params.h"
#include "chrome/browser/flags/android/chrome_feature_list.h"
#include "chrome/browser/flags/android/chrome_feature_list.h" // nogncheck

namespace updates {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/updates/update_notification_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "base/callback.h"
#include "base/macros.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/keyed_service/core/keyed_service.h" // nognservice

namespace notifications {
struct ThrottleConfig;
Expand Down
12 changes: 6 additions & 6 deletions chrome/browser/updates/update_notification_service_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

#include "base/memory/singleton.h"
#include "base/time/default_clock.h"
#include "chrome/browser/notifications/scheduler/notification_schedule_service_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile_key.h"
#include "chrome/browser/notifications/scheduler/notification_schedule_service_factory.h" // nogncheck
#include "chrome/browser/profiles/incognito_helpers.h" // nogncheck
#include "chrome/browser/profiles/profile_key.h" // nogncheck
#include "chrome/browser/updates/internal/update_notification_service_impl.h"
#include "chrome/browser/updates/update_notification_config.h"
#include "chrome/browser/updates/update_notification_service_bridge.h"
#include "chrome/browser/updates/update_notification_service_bridge_android.h"
#include "chrome/browser/updates/update_notification_config.h" // nogncheck
#include "chrome/browser/updates/update_notification_service_bridge.h" // nogncheck
#include "chrome/browser/updates/update_notification_service_bridge_android.h" // nogncheck
#include "components/keyed_service/core/simple_dependency_manager.h"

// static
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <memory>

#include "base/macros.h"
#include "components/keyed_service/core/simple_keyed_service_factory.h"
#include "components/keyed_service/core/simple_keyed_service_factory.h" // nogncheck

namespace base {
template <typename T>
Expand Down

0 comments on commit a64364b

Please sign in to comment.