0

Introduce an ObserverList<T>::Unchecked type alias.

This is a precursor to https://crrev.com/c/1053338 which introduces
base::CheckedObserver. Existing observers will be unchecked (as they
are already). There is no behavior change with this CL.

The CL is mechanical. The bulk was done with variations on a sed script:

git grep -l ' base::ObserverList<.*> .*;' -- '*.cc' '*.h' '*.mm' | \
  xargs -IX sed -i -r 's/(^[ ]*)base::ObserverList<([^>]*)> (.*);/'\
    '\1base::ObserverList<\2>::Unchecked \3;/' X

With some manual follow-ups to get special cases.

TBR=gab@chromium.org

Bug: 842987
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:ios-simulator-full-configs;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_mojo;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Idffe88e2b52f67f9226eb7b6d922070349dacc22
Reviewed-on: https://chromium-review.googlesource.com/1175511
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584330}
This commit is contained in:
Trent Apted
2018-08-19 08:52:19 +00:00
committed by Commit Bot
parent 19d33c77a4
commit a250ec3ab9
778 changed files with 1004 additions and 907 deletions
android_webview/browser
apps
ash
accessibility
app_list
assistant
cast_config_controller.h
detachable_base
display
drag_drop
highlighter
ime
keyboard
lock_screen_action
login
media_controller.h
message_center
pointer_watcher_adapter.h
public
rotator
session
shelf
shell.hshutdown_controller.h
system
tray_action
wallpaper
wm
base
cc/animation
chrome
browser
android
background
browsing_data
chrome_browser_application_mac.mm
chromeos
app_mode
arc
camera_presence_notifier.h
crostini
drive
file_manager
file_system_provider
first_run
input_method
lock_screen_apps
login
mobile
net
note_taking_helper.h
policy
power
printing
settings
system
command_updater_impl.cc
conflicts
content_settings
download
engagement
extensions
feature_engagement
font_pref_change_notifier.h
local_discovery
media
media_galleries
metrics
net
ntp_snippets
page_load_metrics
permissions
plugins
policy
prerender
profiles
resource_coordinator
safe_browsing
search
sessions
signin
spellchecker
status_icons
supervised_user
sync_file_system
task_manager
ui
upgrade_detector
webauthn
common
media_router
chromecast
chromeos
account_manager
audio
cert_loader.h
components
dbus
disks
login
network
services
settings
components
arc
autofill
bookmarks
browser_sync
bubble
cast_channel
certificate_transparency
content_settings
cryptauth
data_reduction_proxy
data_use_measurement
dom_distiller
download
internal
background_service
public
drive
exo
favicon
gcm_driver
history
infobars
invalidation
keep_alive_registry
net_log
ntp_snippets
offline_items_collection
offline_pages
omnibox
optimization_guide
ownership
pairing
password_manager
payments
policy
prefs
previews
proxy_config
reading_list
renderer_context_menu
search_engines
session_manager
sessions
signin
spellcheck
renderer
subresource_filter
sync
sync_preferences
sync_sessions
translate
ui_devtools
ukm
undo
unified_consent
update_client
user_manager
variations
viz
zoom
content
browser
public
renderer
shell
device
extensions
google_apis
gpu
headless/lib/browser
ios
ipc
jingle/notifier/listener
media/audio
net
ppapi/proxy
remoting
services
storage/browser
third_party/blink/renderer/platform
ui
accelerated_widget_mac
accessibility
android
aura
base
chromeos
compositor
display
events
gfx
gl
keyboard
message_center
native_theme
ozone
views
wm

@@ -74,7 +74,7 @@ class AwRenderThreadContextProvider
sk_sp<class GrContext> gr_context_; sk_sp<class GrContext> gr_context_;
std::unique_ptr<viz::ContextCacheController> cache_controller_; std::unique_ptr<viz::ContextCacheController> cache_controller_;
base::ObserverList<viz::ContextLostObserver> observers_; base::ObserverList<viz::ContextLostObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider);
}; };

@@ -77,7 +77,7 @@ class AppLifetimeMonitor : public KeyedService,
content::NotificationRegistrar registrar_; content::NotificationRegistrar registrar_;
content::BrowserContext* context_; content::BrowserContext* context_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AppLifetimeMonitor); DISALLOW_COPY_AND_ASSIGN(AppLifetimeMonitor);
}; };

@@ -240,7 +240,7 @@ class ASH_EXPORT AccessibilityController
// Used to force the backlights off to darken the screen. // Used to force the backlights off to darken the screen.
std::unique_ptr<ScopedBacklightsForcedOff> scoped_backlights_forced_off_; std::unique_ptr<ScopedBacklightsForcedOff> scoped_backlights_forced_off_;
base::ObserverList<AccessibilityObserver> observers_; base::ObserverList<AccessibilityObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AccessibilityController); DISALLOW_COPY_AND_ASSIGN(AccessibilityController);
}; };

@@ -139,7 +139,7 @@ class APP_LIST_MODEL_EXPORT AppListItem {
bool is_installing_; bool is_installing_;
int percent_downloaded_; int percent_downloaded_;
base::ObserverList<AppListItemObserver> observers_; base::ObserverList<AppListItemObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AppListItem); DISALLOW_COPY_AND_ASSIGN(AppListItem);
}; };

@@ -115,7 +115,7 @@ class APP_LIST_MODEL_EXPORT AppListItemList {
void FixItemPosition(size_t index); void FixItemPosition(size_t index);
std::vector<std::unique_ptr<AppListItem>> app_list_items_; std::vector<std::unique_ptr<AppListItem>> app_list_items_;
base::ObserverList<AppListItemListObserver, true> observers_; base::ObserverList<AppListItemListObserver, true>::Unchecked observers_;
std::string highlighted_id_; std::string highlighted_id_;
DISALLOW_COPY_AND_ASSIGN(AppListItemList); DISALLOW_COPY_AND_ASSIGN(AppListItemList);

@@ -164,7 +164,7 @@ class APP_LIST_MODEL_EXPORT AppListModel : public AppListItemListObserver {
ash::AppListState state_ = ash::AppListState::kInvalidState; ash::AppListState state_ = ash::AppListState::kInvalidState;
// The AppListView state. Controlled by the AppListView. // The AppListView state. Controlled by the AppListView.
AppListViewState state_fullscreen_ = AppListViewState::CLOSED; AppListViewState state_fullscreen_ = AppListViewState::CLOSED;
base::ObserverList<AppListModelObserver, true> observers_; base::ObserverList<AppListModelObserver, true>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AppListModel); DISALLOW_COPY_AND_ASSIGN(AppListModel);
}; };

@@ -107,7 +107,7 @@ class APP_LIST_MODEL_EXPORT FolderImage : public AppListItemListObserver,
// True if new style launcher feature is enabled. // True if new style launcher feature is enabled.
const bool is_new_style_launcher_enabled_; const bool is_new_style_launcher_enabled_;
base::ObserverList<FolderImageObserver> observers_; base::ObserverList<FolderImageObserver>::Unchecked observers_;
}; };
} // namespace app_list } // namespace app_list

@@ -78,7 +78,7 @@ class APP_LIST_MODEL_EXPORT SearchBoxModel {
bool is_tablet_mode_ = false; bool is_tablet_mode_ = false;
bool show_assistant_button_ = false; bool show_assistant_button_ = false;
base::ObserverList<SearchBoxModelObserver> observers_; base::ObserverList<SearchBoxModelObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(SearchBoxModel); DISALLOW_COPY_AND_ASSIGN(SearchBoxModel);
}; };

@@ -150,7 +150,7 @@ class APP_LIST_MODEL_EXPORT SearchResult {
ash::mojom::SearchResultMetadataPtr metadata_; ash::mojom::SearchResultMetadataPtr metadata_;
base::ObserverList<SearchResultObserver> observers_; base::ObserverList<SearchResultObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(SearchResult); DISALLOW_COPY_AND_ASSIGN(SearchResult);
}; };

@@ -144,7 +144,7 @@ class APP_LIST_EXPORT PaginationModel : public gfx::AnimationDelegate {
base::TimeTicks last_overscroll_animation_start_time_; base::TimeTicks last_overscroll_animation_start_time_;
base::ObserverList<PaginationModelObserver> observers_; base::ObserverList<PaginationModelObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(PaginationModel); DISALLOW_COPY_AND_ASSIGN(PaginationModel);
}; };

@@ -78,7 +78,7 @@ class TopIconAnimationView : public views::View,
bool item_in_folder_icon_; bool item_in_folder_icon_;
base::ObserverList<TopIconAnimationObserver> observers_; base::ObserverList<TopIconAnimationObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(TopIconAnimationView); DISALLOW_COPY_AND_ASSIGN(TopIconAnimationView);
}; };

@@ -170,7 +170,7 @@ class ASH_EXPORT AssistantController
// The observer list should be initialized early so that sub-controllers may // The observer list should be initialized early so that sub-controllers may
// register as observers during their construction. // register as observers during their construction.
base::ObserverList<AssistantControllerObserver> observers_; base::ObserverList<AssistantControllerObserver>::Unchecked observers_;
mojo::BindingSet<mojom::AssistantController> assistant_controller_bindings_; mojo::BindingSet<mojom::AssistantController> assistant_controller_bindings_;

@@ -139,7 +139,7 @@ class AssistantInteractionModel {
std::unique_ptr<AssistantResponse> pending_response_; std::unique_ptr<AssistantResponse> pending_response_;
std::unique_ptr<AssistantResponse> response_; std::unique_ptr<AssistantResponse> response_;
base::ObserverList<AssistantInteractionModelObserver> observers_; base::ObserverList<AssistantInteractionModelObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AssistantInteractionModel); DISALLOW_COPY_AND_ASSIGN(AssistantInteractionModel);
}; };

@@ -35,7 +35,7 @@ class AssistantScreenContextModel {
ScreenContextRequestState request_state_ = ScreenContextRequestState::kIdle; ScreenContextRequestState request_state_ = ScreenContextRequestState::kIdle;
base::ObserverList<AssistantScreenContextModelObserver> observers_; base::ObserverList<AssistantScreenContextModelObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AssistantScreenContextModel); DISALLOW_COPY_AND_ASSIGN(AssistantScreenContextModel);
}; };

@@ -60,7 +60,7 @@ class AssistantUiModel {
bool visible_ = false; bool visible_ = false;
base::ObserverList<AssistantUiModelObserver> observers_; base::ObserverList<AssistantUiModelObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AssistantUiModel); DISALLOW_COPY_AND_ASSIGN(AssistantUiModel);
}; };

@@ -110,7 +110,7 @@ class DialogPlate : public views::View,
std::unique_ptr<ui::CallbackLayerAnimationObserver> animation_observer_; std::unique_ptr<ui::CallbackLayerAnimationObserver> animation_observer_;
base::ObserverList<DialogPlateObserver> observers_; base::ObserverList<DialogPlateObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(DialogPlate); DISALLOW_COPY_AND_ASSIGN(DialogPlate);
}; };

@@ -73,7 +73,7 @@ class CastConfigController : public ash::mojom::CastConfig {
std::vector<mojom::SinkAndRoutePtr> sinks_and_routes_; std::vector<mojom::SinkAndRoutePtr> sinks_and_routes_;
base::ObserverList<CastConfigControllerObserver> observers_; base::ObserverList<CastConfigControllerObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(CastConfigController); DISALLOW_COPY_AND_ASSIGN(CastConfigController);
}; };

@@ -155,7 +155,7 @@ class ASH_EXPORT DetachableBaseHandler
// Used for ephemeral users. // Used for ephemeral users.
std::map<AccountId, DetachableBaseId> last_used_devices_; std::map<AccountId, DetachableBaseId> last_used_devices_;
base::ObserverList<DetachableBaseObserver> observers_; base::ObserverList<DetachableBaseObserver>::Unchecked observers_;
base::WeakPtrFactory<DetachableBaseHandler> weak_ptr_factory_; base::WeakPtrFactory<DetachableBaseHandler> weak_ptr_factory_;

@@ -241,7 +241,7 @@ class ASH_EXPORT ScreenOrientationController
display::Display::Rotation current_rotation_; display::Display::Rotation current_rotation_;
// Rotation Lock observers. // Rotation Lock observers.
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
// Tracks all windows that have requested a lock, as well as the requested // Tracks all windows that have requested a lock, as well as the requested
// orientation. // orientation.

@@ -199,7 +199,7 @@ class ASH_EXPORT WindowTreeHostManager
// The mapping from display ID to its window tree host. // The mapping from display ID to its window tree host.
WindowTreeHostMap window_tree_hosts_; WindowTreeHostMap window_tree_hosts_;
base::ObserverList<Observer, true> observers_; base::ObserverList<Observer, true>::Unchecked observers_;
// Store the primary window tree host temporarily while replacing // Store the primary window tree host temporarily while replacing
// display. // display.

@@ -138,7 +138,8 @@ class ASH_EXPORT DragDropController : public aura::client::DragDropClient,
// See comment in OnGestureEvent() on why we need this. // See comment in OnGestureEvent() on why we need this.
std::unique_ptr<ui::GestureEvent> pending_long_tap_; std::unique_ptr<ui::GestureEvent> pending_long_tap_;
base::ObserverList<aura::client::DragDropClientObserver> observers_; base::ObserverList<aura::client::DragDropClientObserver>::Unchecked
observers_;
base::WeakPtrFactory<DragDropController> weak_factory_; base::WeakPtrFactory<DragDropController> weak_factory_;

@@ -157,7 +157,7 @@ class ASH_EXPORT HighlighterController
// Interface to highlighter controller client (chrome). // Interface to highlighter controller client (chrome).
mojom::HighlighterControllerClientPtr client_; mojom::HighlighterControllerClientPtr client_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
base::WeakPtrFactory<HighlighterController> weak_factory_; base::WeakPtrFactory<HighlighterController> weak_factory_;

@@ -167,7 +167,7 @@ class ASH_EXPORT ImeController : public mojom::ImeController {
// True if voice input should be available from the IME menu. // True if voice input should be available from the IME menu.
bool is_voice_enabled_ = false; bool is_voice_enabled_ = false;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
std::unique_ptr<ModeIndicatorObserver> mode_indicator_observer_; std::unique_ptr<ModeIndicatorObserver> mode_indicator_observer_;

@@ -42,10 +42,12 @@ class ASH_EXPORT KeyboardUI {
protected: protected:
KeyboardUI(); KeyboardUI();
base::ObserverList<KeyboardUIObserver>* observers() { return &observers_; } base::ObserverList<KeyboardUIObserver>::Unchecked* observers() {
return &observers_;
}
private: private:
base::ObserverList<KeyboardUIObserver> observers_; base::ObserverList<KeyboardUIObserver>::Unchecked observers_;
}; };
} // namespace ash } // namespace ash

@@ -85,7 +85,7 @@ class ASH_EXPORT LockScreenActionBackgroundController {
LockScreenActionBackgroundState state_ = LockScreenActionBackgroundState state_ =
LockScreenActionBackgroundState::kHidden; LockScreenActionBackgroundState::kHidden;
base::ObserverList<LockScreenActionBackgroundObserver> observers_; base::ObserverList<LockScreenActionBackgroundObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(LockScreenActionBackgroundController); DISALLOW_COPY_AND_ASSIGN(LockScreenActionBackgroundController);
}; };

@@ -177,7 +177,7 @@ class ASH_EXPORT LoginScreenController : public mojom::LoginScreen {
AuthenticationStage authentication_stage_ = AuthenticationStage::kIdle; AuthenticationStage authentication_stage_ = AuthenticationStage::kIdle;
base::ObserverList<LoginScreenControllerObserver> observers_; base::ObserverList<LoginScreenControllerObserver>::Unchecked observers_;
// If set to false, all auth requests will forcibly fail. // If set to false, all auth requests will forcibly fail.
ForceFailAuth force_fail_auth_for_debug_overlay_ = ForceFailAuth::kOff; ForceFailAuth force_fail_auth_for_debug_overlay_ = ForceFailAuth::kOff;

@@ -153,7 +153,7 @@ class ASH_EXPORT LoginDataDispatcher {
mojom::FingerprintUnlockState state); mojom::FingerprintUnlockState state);
private: private:
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(LoginDataDispatcher); DISALLOW_COPY_AND_ASSIGN(LoginDataDispatcher);
}; };

@@ -57,7 +57,7 @@ class MediaController : public mojom::MediaController {
mojom::MediaClientAssociatedPtr client_; mojom::MediaClientAssociatedPtr client_;
base::ObserverList<MediaCaptureObserver> observers_; base::ObserverList<MediaCaptureObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(MediaController); DISALLOW_COPY_AND_ASSIGN(MediaController);
}; };

@@ -103,7 +103,8 @@ class ASH_EXPORT MessageCenterController
session_state_notification_blocker_; session_state_notification_blocker_;
std::unique_ptr<message_center::NotificationBlocker> all_popup_blocker_; std::unique_ptr<message_center::NotificationBlocker> all_popup_blocker_;
base::ObserverList<NotifierSettingsListener> notifier_settings_listeners_; base::ObserverList<NotifierSettingsListener>::Unchecked
notifier_settings_listeners_;
mojo::BindingSet<mojom::AshMessageCenterController> binding_set_; mojo::BindingSet<mojom::AshMessageCenterController> binding_set_;

@@ -134,7 +134,7 @@ class ASH_EXPORT MessageListView : public views::View,
void AnimateClearingOneNotification(); void AnimateClearingOneNotification();
// List of MessageListView::Observer // List of MessageListView::Observer
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
// The top position of the reposition target rectangle. // The top position of the reposition target rectangle.
int reposition_top_; int reposition_top_;

@@ -58,9 +58,9 @@ class ASH_EXPORT PointerWatcherAdapter : public ui::EventHandler {
// destruction. Two sets of observers are maintained, one for observers not // destruction. Two sets of observers are maintained, one for observers not
// needing moves |non_move_watchers_| and |move_watchers_| for those // needing moves |non_move_watchers_| and |move_watchers_| for those
// observers wanting moves too. // observers wanting moves too.
base::ObserverList<views::PointerWatcher, true> non_move_watchers_; base::ObserverList<views::PointerWatcher, true>::Unchecked non_move_watchers_;
base::ObserverList<views::PointerWatcher, true> move_watchers_; base::ObserverList<views::PointerWatcher, true>::Unchecked move_watchers_;
base::ObserverList<views::PointerWatcher, true> drag_watchers_; base::ObserverList<views::PointerWatcher, true>::Unchecked drag_watchers_;
DISALLOW_COPY_AND_ASSIGN(PointerWatcherAdapter); DISALLOW_COPY_AND_ASSIGN(PointerWatcherAdapter);
}; };

@@ -128,7 +128,7 @@ class ASH_PUBLIC_EXPORT ShelfModel {
// Maps one notification id to one app id. // Maps one notification id to one app id.
std::map<std::string, std::string> notification_id_to_app_id_; std::map<std::string, std::string> notification_id_to_app_id_;
base::ObserverList<ShelfModelObserver> observers_; base::ObserverList<ShelfModelObserver>::Unchecked observers_;
std::map<ShelfID, std::unique_ptr<ShelfItemDelegate>> std::map<ShelfID, std::unique_ptr<ShelfItemDelegate>>
id_to_item_delegate_map_; id_to_item_delegate_map_;

@@ -180,7 +180,7 @@ class ASH_EXPORT ScreenRotationAnimator {
std::unique_ptr<ui::AnimationMetricsReporter> metrics_reporter_; std::unique_ptr<ui::AnimationMetricsReporter> metrics_reporter_;
// Only set in unittest to disable animation timers. // Only set in unittest to disable animation timers.
bool disable_animation_timers_for_test_; bool disable_animation_timers_for_test_;
base::ObserverList<ScreenRotationAnimatorObserver> base::ObserverList<ScreenRotationAnimatorObserver>::Unchecked
screen_rotation_animator_observers_; screen_rotation_animator_observers_;
std::unique_ptr<ui::LayerTreeOwner> old_layer_tree_owner_; std::unique_ptr<ui::LayerTreeOwner> old_layer_tree_owner_;
std::unique_ptr<ui::LayerTreeOwner> new_layer_tree_owner_; std::unique_ptr<ui::LayerTreeOwner> new_layer_tree_owner_;

@@ -288,7 +288,7 @@ class ASH_EXPORT SessionController : public mojom::SessionController {
// OnSigninScreenPrefServiceInitialized(). // OnSigninScreenPrefServiceInitialized().
bool on_active_user_prefs_changed_notify_deferred_ = false; bool on_active_user_prefs_changed_notify_deferred_ = false;
base::ObserverList<ash::SessionObserver> observers_; base::ObserverList<ash::SessionObserver>::Unchecked observers_;
service_manager::Connector* const connector_; service_manager::Connector* const connector_;

@@ -178,7 +178,7 @@ class ASH_EXPORT Shelf : public ShelfLayoutManagerObserver {
// Sets shelf alignment to bottom during login and screen lock. // Sets shelf alignment to bottom during login and screen lock.
ShelfLockingManager shelf_locking_manager_; ShelfLockingManager shelf_locking_manager_;
base::ObserverList<ShelfObserver> observers_; base::ObserverList<ShelfObserver>::Unchecked observers_;
// Forwards mouse and gesture events to ShelfLayoutManager for auto-hide. // Forwards mouse and gesture events to ShelfLayoutManager for auto-hide.
std::unique_ptr<AutoHideEventHandler> auto_hide_event_handler_; std::unique_ptr<AutoHideEventHandler> auto_hide_event_handler_;

@@ -178,7 +178,7 @@ class ASH_EXPORT ShelfBackgroundAnimator : public ShelfObserver,
// Tracks the item background animation values. // Tracks the item background animation values.
AnimationValues item_background_values_; AnimationValues item_background_values_;
base::ObserverList<ShelfBackgroundAnimatorObserver> observers_; base::ObserverList<ShelfBackgroundAnimatorObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(ShelfBackgroundAnimator); DISALLOW_COPY_AND_ASSIGN(ShelfBackgroundAnimator);
}; };

@@ -125,7 +125,7 @@ class ShelfButtonAnimation : public gfx::AnimationDelegate {
} }
gfx::ThrobAnimation animation_; gfx::ThrobAnimation animation_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation); DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation);
}; };

@@ -362,7 +362,7 @@ class ASH_EXPORT ShelfLayoutManager
// False when neither the auto hide timer nor the timer task are running. // False when neither the auto hide timer nor the timer task are running.
bool mouse_over_shelf_when_auto_hide_timer_started_ = false; bool mouse_over_shelf_when_auto_hide_timer_started_ = false;
base::ObserverList<ShelfLayoutManagerObserver> observers_; base::ObserverList<ShelfLayoutManagerObserver>::Unchecked observers_;
// The shelf reacts to gesture-drags, and can be set to auto-hide for certain // The shelf reacts to gesture-drags, and can be set to auto-hide for certain
// gestures. Swiping up from the shelf in tablet mode can open the // gestures. Swiping up from the shelf in tablet mode can open the

@@ -900,7 +900,7 @@ class ASH_EXPORT Shell : public SessionObserver,
std::unique_ptr<MessageCenterController> message_center_controller_; std::unique_ptr<MessageCenterController> message_center_controller_;
base::ObserverList<ShellObserver> shell_observers_; base::ObserverList<ShellObserver>::Unchecked shell_observers_;
base::WeakPtrFactory<Shell> weak_factory_; base::WeakPtrFactory<Shell> weak_factory_;

@@ -54,7 +54,7 @@ class ASH_EXPORT ShutdownController : public mojom::ShutdownController {
// Cached copy of the DeviceRebootOnShutdown policy from chrome. // Cached copy of the DeviceRebootOnShutdown policy from chrome.
bool reboot_on_shutdown_ = false; bool reboot_on_shutdown_ = false;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
// Bindings for the ShutdownController interface. // Bindings for the ShutdownController interface.
mojo::BindingSet<mojom::ShutdownController> bindings_; mojo::BindingSet<mojom::ShutdownController> bindings_;

@@ -73,7 +73,7 @@ class ArcNotificationItemImpl : public ArcNotificationItem {
// The reference counter of the window. // The reference counter of the window.
int window_ref_count_ = 0; int window_ref_count_ = 0;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
const AccountId profile_id_; const AccountId profile_id_;
const std::string notification_key_; const std::string notification_key_;

@@ -43,7 +43,7 @@ class ArcNotificationSurfaceManagerImpl
std::unique_ptr<ArcNotificationSurfaceImpl>>; std::unique_ptr<ArcNotificationSurfaceImpl>>;
NotificationSurfaceMap notification_surface_map_; NotificationSurfaceMap notification_surface_map_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurfaceManagerImpl); DISALLOW_COPY_AND_ASSIGN(ArcNotificationSurfaceManagerImpl);
}; };

@@ -60,7 +60,7 @@ class MockArcNotificationItem : public ArcNotificationItem {
gfx::ImageSkia snapshot_; gfx::ImageSkia snapshot_;
size_t count_close_ = 0; size_t count_close_ = 0;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
base::OnceClosure close_callback_; base::OnceClosure close_callback_;
base::WeakPtrFactory<MockArcNotificationItem> weak_factory_; base::WeakPtrFactory<MockArcNotificationItem> weak_factory_;

@@ -62,7 +62,7 @@ class ClockModel : public chromeos::SystemClockClient::Observer,
// If system clock can be configured by user through SetTimeDialog. // If system clock can be configured by user through SetTimeDialog.
bool can_set_time_ = false; bool can_set_time_ = false;
base::ObserverList<ClockObserver> observers_; base::ObserverList<ClockObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(ClockModel); DISALLOW_COPY_AND_ASSIGN(ClockModel);
}; };

@@ -42,7 +42,7 @@ class ASH_EXPORT EnterpriseDomainModel {
// Whether this is an Active Directory managed enterprise device. // Whether this is an Active Directory managed enterprise device.
bool active_directory_managed_ = false; bool active_directory_managed_ = false;
base::ObserverList<EnterpriseDomainObserver> observers_; base::ObserverList<EnterpriseDomainObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(EnterpriseDomainModel); DISALLOW_COPY_AND_ASSIGN(EnterpriseDomainModel);
}; };

@@ -52,7 +52,7 @@ class SessionLengthLimitModel : public SessionObserver {
std::unique_ptr<base::RepeatingTimer> timer_; std::unique_ptr<base::RepeatingTimer> timer_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(SessionLengthLimitModel); DISALLOW_COPY_AND_ASSIGN(SessionLengthLimitModel);
}; };

@@ -40,7 +40,7 @@ class ASH_EXPORT TracingModel {
// True if performance tracing is enabled. // True if performance tracing is enabled.
bool is_tracing_ = false; bool is_tracing_ = false;
base::ObserverList<TracingObserver> observers_; base::ObserverList<TracingObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(TracingModel); DISALLOW_COPY_AND_ASSIGN(TracingModel);
}; };

@@ -62,7 +62,7 @@ class UpdateModel {
mojom::UpdateType update_type_ = mojom::UpdateType::SYSTEM; mojom::UpdateType update_type_ = mojom::UpdateType::SYSTEM;
bool update_over_cellular_available_ = false; bool update_over_cellular_available_ = false;
base::ObserverList<UpdateObserver> observers_; base::ObserverList<UpdateObserver>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(UpdateModel); DISALLOW_COPY_AND_ASSIGN(UpdateModel);
}; };

@@ -39,7 +39,7 @@ class ASH_EXPORT NetworkIconAnimation : public gfx::AnimationDelegate {
private: private:
gfx::ThrobAnimation animation_; gfx::ThrobAnimation animation_;
base::ObserverList<AnimationObserver> observers_; base::ObserverList<AnimationObserver>::Unchecked observers_;
}; };
} // namespace network_icon } // namespace network_icon

@@ -132,7 +132,7 @@ class ASH_EXPORT VpnList : public mojom::VpnList {
// creating vpn list view. // creating vpn list view.
std::vector<VPNProvider> arc_vpn_providers_; std::vector<VPNProvider> arc_vpn_providers_;
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
DISALLOW_COPY_AND_ASSIGN(VpnList); DISALLOW_COPY_AND_ASSIGN(VpnList);
}; };

@@ -230,7 +230,7 @@ class ASH_EXPORT NightLightController
// controlled by this class from the WebUI settings. // controlled by this class from the WebUI settings.
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
mojo::Binding<mojom::NightLightController> binding_; mojo::Binding<mojom::NightLightController> binding_;

@@ -112,7 +112,7 @@ class ASH_EXPORT BacklightsForcedOffSetter
// Number of active backlights forced off requests. // Number of active backlights forced off requests.
int active_backlights_forced_off_count_ = 0; int active_backlights_forced_off_count_ = 0;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
ScopedObserver<chromeos::PowerManagerClient, ScopedObserver<chromeos::PowerManagerClient,
chromeos::PowerManagerClient::Observer> chromeos::PowerManagerClient::Observer>

@@ -208,7 +208,7 @@ class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer {
// Overriden from PowerManagerClient::Observer. // Overriden from PowerManagerClient::Observer.
void PowerChanged(const power_manager::PowerSupplyProperties& proto) override; void PowerChanged(const power_manager::PowerSupplyProperties& proto) override;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
// Current state. // Current state.
power_manager::PowerSupplyProperties proto_; power_manager::PowerSupplyProperties proto_;

@@ -76,13 +76,16 @@ class ASH_EXPORT SystemTrayNotifier {
void NotifyVirtualKeyboardSuppressionChanged(bool suppressed); void NotifyVirtualKeyboardSuppressionChanged(bool suppressed);
private: private:
base::ObserverList<BluetoothObserver> bluetooth_observers_; base::ObserverList<BluetoothObserver>::Unchecked bluetooth_observers_;
base::ObserverList<IMEObserver> ime_observers_; base::ObserverList<IMEObserver>::Unchecked ime_observers_;
base::ObserverList<NetworkObserver> network_observers_; base::ObserverList<NetworkObserver>::Unchecked network_observers_;
base::ObserverList<ScreenCaptureObserver> screen_capture_observers_; base::ObserverList<ScreenCaptureObserver>::Unchecked
base::ObserverList<ScreenShareObserver> screen_share_observers_; screen_capture_observers_;
base::ObserverList<SystemTrayFocusObserver> system_tray_focus_observers_; base::ObserverList<ScreenShareObserver>::Unchecked screen_share_observers_;
base::ObserverList<VirtualKeyboardObserver> virtual_keyboard_observers_; base::ObserverList<SystemTrayFocusObserver>::Unchecked
system_tray_focus_observers_;
base::ObserverList<VirtualKeyboardObserver>::Unchecked
virtual_keyboard_observers_;
DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier); DISALLOW_COPY_AND_ASSIGN(SystemTrayNotifier);
}; };

@@ -58,7 +58,7 @@ class ASH_EXPORT UnifiedSystemTrayModel {
std::unique_ptr<DBusObserver> dbus_observer_; std::unique_ptr<DBusObserver> dbus_observer_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(UnifiedSystemTrayModel); DISALLOW_COPY_AND_ASSIGN(UnifiedSystemTrayModel);
}; };

@@ -90,7 +90,7 @@ class ASH_EXPORT TrayAction : public mojom::TrayAction,
std::unique_ptr<LockScreenNoteDisplayStateHandler> std::unique_ptr<LockScreenNoteDisplayStateHandler>
lock_screen_note_display_state_handler_; lock_screen_note_display_state_handler_;
base::ObserverList<TrayActionObserver> observers_; base::ObserverList<TrayActionObserver>::Unchecked observers_;
// Bindings for users of the mojo interface. // Bindings for users of the mojo interface.
mojo::BindingSet<mojom::TrayAction> bindings_; mojo::BindingSet<mojom::TrayAction> bindings_;

@@ -542,7 +542,7 @@ class ASH_EXPORT WallpaperController : public mojom::WallpaperController,
// Bindings for the WallpaperController interface. // Bindings for the WallpaperController interface.
mojo::BindingSet<mojom::WallpaperController> bindings_; mojo::BindingSet<mojom::WallpaperController> bindings_;
base::ObserverList<WallpaperControllerObserver> observers_; base::ObserverList<WallpaperControllerObserver>::Unchecked observers_;
mojo::AssociatedInterfacePtrSet<mojom::WallpaperObserver> mojo_observers_; mojo::AssociatedInterfacePtrSet<mojom::WallpaperObserver> mojo_observers_;

@@ -78,7 +78,7 @@ class ASH_EXPORT WallpaperColorCalculator {
// The task runner to run the calculation on. // The task runner to run the calculation on.
scoped_refptr<base::TaskRunner> task_runner_; scoped_refptr<base::TaskRunner> task_runner_;
base::ObserverList<WallpaperColorCalculatorObserver> observers_; base::ObserverList<WallpaperColorCalculatorObserver>::Unchecked observers_;
base::WeakPtrFactory<WallpaperColorCalculator> weak_ptr_factory_; base::WeakPtrFactory<WallpaperColorCalculator> weak_ptr_factory_;

@@ -61,7 +61,7 @@ class ASH_EXPORT WallpaperResizer {
// has finished running. // has finished running.
void OnResizeFinished(SkBitmap* resized_bitmap); void OnResizeFinished(SkBitmap* resized_bitmap);
base::ObserverList<WallpaperResizerObserver> observers_; base::ObserverList<WallpaperResizerObserver>::Unchecked observers_;
// Image that should currently be used for wallpaper. It initially // Image that should currently be used for wallpaper. It initially
// contains the original image and is updated to contain the resized // contains the original image and is updated to contain the resized

@@ -251,7 +251,7 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
ScopedSessionObserver scoped_session_observer_; ScopedSessionObserver scoped_session_observer_;
base::ObserverList<LockStateObserver> observers_; base::ObserverList<LockStateObserver>::Unchecked observers_;
base::WeakPtrFactory<LockStateController> weak_ptr_factory_; base::WeakPtrFactory<LockStateController> weak_ptr_factory_;

@@ -398,7 +398,7 @@ class ASH_EXPORT SplitViewController : public mojom::SplitViewController,
// window comes from the overview. // window comes from the overview.
base::flat_map<aura::Window*, gfx::Rect> overview_window_item_bounds_map_; base::flat_map<aura::Window*, gfx::Rect> overview_window_item_bounds_map_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
mojo::InterfacePtrSet<mojom::SplitViewObserver> mojo_observers_; mojo::InterfacePtrSet<mojom::SplitViewObserver> mojo_observers_;
DISALLOW_COPY_AND_ASSIGN(SplitViewController); DISALLOW_COPY_AND_ASSIGN(SplitViewController);

@@ -279,7 +279,7 @@ class ASH_EXPORT TabletModeController
ScopedSessionObserver scoped_session_observer_; ScopedSessionObserver scoped_session_observer_;
base::ObserverList<TabletModeObserver> tablet_mode_observers_; base::ObserverList<TabletModeObserver>::Unchecked tablet_mode_observers_;
base::WeakPtrFactory<TabletModeController> weak_factory_; base::WeakPtrFactory<TabletModeController> weak_factory_;

@@ -98,7 +98,7 @@ class ASH_EXPORT VideoDetector : public aura::EnvObserver,
// Currently-fullscreen root windows. // Currently-fullscreen root windows.
std::set<aura::Window*> fullscreen_root_windows_; std::set<aura::Window*> fullscreen_root_windows_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
ScopedObserver<aura::Window, aura::WindowObserver> window_observer_manager_; ScopedObserver<aura::Window, aura::WindowObserver> window_observer_manager_;
ScopedSessionObserver scoped_session_observer_; ScopedSessionObserver scoped_session_observer_;

@@ -438,7 +438,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
// displays are restored to their previous states. // displays are restored to their previous states.
base::Optional<PersistentWindowInfo> persistent_window_info_; base::Optional<PersistentWindowInfo> persistent_window_info_;
base::ObserverList<WindowStateObserver> observer_list_; base::ObserverList<WindowStateObserver>::Unchecked observer_list_;
// True to ignore a property change event to avoid reentrance in // True to ignore a property change event to avoid reentrance in
// UpdateWindowStateType() // UpdateWindowStateType()

@@ -44,7 +44,7 @@ class MemoryPressureObserver {
const scoped_refptr<ObserverListThreadSafe<MemoryPressureListener>> const scoped_refptr<ObserverListThreadSafe<MemoryPressureListener>>
async_observers_ = base::MakeRefCounted< async_observers_ = base::MakeRefCounted<
ObserverListThreadSafe<MemoryPressureListener>>(); ObserverListThreadSafe<MemoryPressureListener>>();
ObserverList<MemoryPressureListener> sync_observers_; ObserverList<MemoryPressureListener>::Unchecked sync_observers_;
Lock sync_observers_lock_; Lock sync_observers_lock_;
}; };

@@ -287,7 +287,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// A recent snapshot of Time::Now(), used to check delayed_work_queue_. // A recent snapshot of Time::Now(), used to check delayed_work_queue_.
TimeTicks recent_time_; TimeTicks recent_time_;
ObserverList<DestructionObserver> destruction_observers_; ObserverList<DestructionObserver>::Unchecked destruction_observers_;
// A boolean which prevents unintentional reentrant task execution (e.g. from // A boolean which prevents unintentional reentrant task execution (e.g. from
// induced nested message loops). As such, nested message loops will only // induced nested message loops). As such, nested message loops will only
@@ -303,7 +303,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// if type_ is TYPE_CUSTOM and pump_ is null. // if type_ is TYPE_CUSTOM and pump_ is null.
MessagePumpFactoryCallback pump_factory_; MessagePumpFactoryCallback pump_factory_;
ObserverList<TaskObserver> task_observers_; ObserverList<TaskObserver>::Unchecked task_observers_;
// Pointer to this MessageLoop's Controller, valid throughout this // Pointer to this MessageLoop's Controller, valid throughout this
// MessageLoop's lifetime (until |underlying_task_runner_| is released at the // MessageLoop's lifetime (until |underlying_task_runner_| is released at the

@@ -152,7 +152,7 @@ class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
// TODO(thestig): Remove when the Cloud Print Service goes away. // TODO(thestig): Remove when the Cloud Print Service goes away.
bool enable_wm_quit_ = false; bool enable_wm_quit_ = false;
ObserverList<Observer> observers_; ObserverList<Observer>::Unchecked observers_;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

@@ -99,6 +99,12 @@ class ObserverList
: public SupportsWeakPtr< : public SupportsWeakPtr<
ObserverList<ObserverType, check_empty, allow_reentrancy>> { ObserverList<ObserverType, check_empty, allow_reentrancy>> {
public: public:
// Temporary type alias for introducing base::CheckedObserver. Existing
// ObserverLists will be Unchecked during the migration.
// TODO(https://crbug.com/842987): Use the Unchecked storage type when that
// template param is added.
using Unchecked = ObserverList<ObserverType, check_empty, allow_reentrancy>;
// An iterator class that can be used to access the list of observers. // An iterator class that can be used to access the list of observers.
class Iter { class Iter {
public: public:

@@ -51,7 +51,7 @@ class BASE_EXPORT PortProvider {
// ObserverList is not thread-safe, so |lock_| ensures consistency of // ObserverList is not thread-safe, so |lock_| ensures consistency of
// |observer_list_|. // |observer_list_|.
base::Lock lock_; base::Lock lock_;
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
DISALLOW_COPY_AND_ASSIGN(PortProvider); DISALLOW_COPY_AND_ASSIGN(PortProvider);
}; };

@@ -194,7 +194,7 @@ class BASE_EXPORT RunLoop {
using RunLoopStack = base::stack<RunLoop*, std::vector<RunLoop*>>; using RunLoopStack = base::stack<RunLoop*, std::vector<RunLoop*>>;
RunLoopStack active_run_loops_; RunLoopStack active_run_loops_;
ObserverList<RunLoop::NestingObserver> nesting_observers_; ObserverList<RunLoop::NestingObserver>::Unchecked nesting_observers_;
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
bool allow_running_for_testing_ = true; bool allow_running_for_testing_ = true;

@@ -222,8 +222,8 @@ class BASE_EXPORT SequenceManagerImpl
std::uniform_real_distribution<double> uniform_distribution; std::uniform_real_distribution<double> uniform_distribution;
internal::TaskQueueSelector selector; internal::TaskQueueSelector selector;
ObserverList<MessageLoop::TaskObserver> task_observers; ObserverList<MessageLoop::TaskObserver>::Unchecked task_observers;
ObserverList<TaskTimeObserver> task_time_observers; ObserverList<TaskTimeObserver>::Unchecked task_time_observers;
std::set<TimeDomain*> time_domains; std::set<TimeDomain*> time_domains;
std::unique_ptr<internal::RealTimeDomain> real_time_domain; std::unique_ptr<internal::RealTimeDomain> real_time_domain;

@@ -355,7 +355,7 @@ class BASE_EXPORT TaskQueueImpl {
std::unique_ptr<WorkQueue> delayed_work_queue; std::unique_ptr<WorkQueue> delayed_work_queue;
std::unique_ptr<WorkQueue> immediate_work_queue; std::unique_ptr<WorkQueue> immediate_work_queue;
std::priority_queue<TaskQueueImpl::Task> delayed_incoming_queue; std::priority_queue<TaskQueueImpl::Task> delayed_incoming_queue;
ObserverList<MessageLoop::TaskObserver> task_observers; ObserverList<MessageLoop::TaskObserver>::Unchecked task_observers;
size_t set_index; size_t set_index;
HeapHandle heap_handle; HeapHandle heap_handle;
int is_enabled_refcount; int is_enabled_refcount;

@@ -64,7 +64,7 @@ class CC_ANIMATION_EXPORT ElementAnimations
void RemoveKeyframeEffect(KeyframeEffect* keyframe_effect); void RemoveKeyframeEffect(KeyframeEffect* keyframe_effect);
bool IsEmpty() const; bool IsEmpty() const;
typedef base::ObserverList<KeyframeEffect> KeyframeEffectsList; typedef base::ObserverList<KeyframeEffect>::Unchecked KeyframeEffectsList;
const KeyframeEffectsList& keyframe_effects_list() const { const KeyframeEffectsList& keyframe_effects_list() const {
return keyframe_effects_list_; return keyframe_effects_list_;
} }

@@ -140,7 +140,7 @@ class PartnerBookmarksShim : public base::SupportsUserData::Data {
NodeRenamingMap node_rename_remove_map_; NodeRenamingMap node_rename_remove_map_;
// The observers. // The observers.
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShim); DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShim);
}; };

@@ -159,7 +159,7 @@ class ThumbnailCache : ThumbnailDelegate {
ExpiringThumbnailCache cache_; ExpiringThumbnailCache cache_;
ExpiringThumbnailCache approximation_cache_; ExpiringThumbnailCache approximation_cache_;
base::ObserverList<ThumbnailCacheObserver> observers_; base::ObserverList<ThumbnailCacheObserver>::Unchecked observers_;
ThumbnailMetaDataMap thumbnail_meta_data_; ThumbnailMetaDataMap thumbnail_meta_data_;
TabIdList read_queue_; TabIdList read_queue_;
TabIdList visible_ids_; TabIdList visible_ids_;

@@ -159,7 +159,7 @@ class BackgroundApplicationListModel
std::map<std::string, std::unique_ptr<Application>> applications_; std::map<std::string, std::unique_ptr<Application>> applications_;
extensions::ExtensionList extensions_; extensions::ExtensionList extensions_;
base::ObserverList<Observer, true> observers_; base::ObserverList<Observer, true>::Unchecked observers_;
Profile* const profile_; Profile* const profile_;
content::NotificationRegistrar registrar_; content::NotificationRegistrar registrar_;
bool ready_; bool ready_;

@@ -115,7 +115,7 @@ class BackgroundContents : public extensions::DeferredStartRenderHost,
Profile* profile_; Profile* profile_;
std::unique_ptr<content::WebContents> web_contents_; std::unique_ptr<content::WebContents> web_contents_;
content::NotificationRegistrar registrar_; content::NotificationRegistrar registrar_;
base::ObserverList<extensions::DeferredStartRenderHostObserver> base::ObserverList<extensions::DeferredStartRenderHostObserver>::Unchecked
deferred_start_render_host_observer_list_; deferred_start_render_host_observer_list_;
// The initial URL to load. // The initial URL to load.

@@ -969,7 +969,7 @@ class CookiesTreeModel : public ui::TreeNodeModel<CookieTreeNode> {
// The CookiesTreeModel maintains a separate list of observers that are // The CookiesTreeModel maintains a separate list of observers that are
// specifically of the type CookiesTreeModel::Observer. // specifically of the type CookiesTreeModel::Observer.
base::ObserverList<Observer> cookies_observer_list_; base::ObserverList<Observer>::Unchecked cookies_observer_list_;
// Keeps track of how many batches the consumer of this class says it is going // Keeps track of how many batches the consumer of this class says it is going
// to send. // to send.

@@ -101,7 +101,8 @@ std::string DescriptionForNSEvent(NSEvent* event) {
@end @end
@interface BrowserCrApplication ()<NativeEventProcessor> { @interface BrowserCrApplication ()<NativeEventProcessor> {
base::ObserverList<content::NativeEventProcessorObserver> observers_; base::ObserverList<content::NativeEventProcessorObserver>::Unchecked
observers_;
} }
@end @end

@@ -87,7 +87,7 @@ class ArcKioskAppManager {
std::vector<std::unique_ptr<ArcKioskAppData>> apps_; std::vector<std::unique_ptr<ArcKioskAppData>> apps_;
AccountId auto_launch_account_id_; AccountId auto_launch_account_id_;
bool auto_launched_with_zero_delay_ = false; bool auto_launched_with_zero_delay_ = false;
base::ObserverList<ArcKioskAppManagerObserver, true> observers_; base::ObserverList<ArcKioskAppManagerObserver, true>::Unchecked observers_;
std::unique_ptr<CrosSettings::ObserverSubscription> std::unique_ptr<CrosSettings::ObserverSubscription>
local_accounts_subscription_; local_accounts_subscription_;

@@ -361,7 +361,7 @@ class KioskAppManager : public KioskAppDataDelegate,
std::vector<std::unique_ptr<KioskAppData>> apps_; std::vector<std::unique_ptr<KioskAppData>> apps_;
std::string auto_launch_app_id_; std::string auto_launch_app_id_;
std::string currently_auto_launched_with_zero_delay_app_; std::string currently_auto_launched_with_zero_delay_app_;
base::ObserverList<KioskAppManagerObserver, true> observers_; base::ObserverList<KioskAppManagerObserver, true>::Unchecked observers_;
std::unique_ptr<CrosSettings::ObserverSubscription> std::unique_ptr<CrosSettings::ObserverSubscription>
local_accounts_subscription_; local_accounts_subscription_;

@@ -111,7 +111,7 @@ class ArcAccessibilityHelperBridgeTest : public ChromeViewsTestBase {
private: private:
std::map<std::string, ArcNotificationSurface*> surfaces_; std::map<std::string, ArcNotificationSurface*> surfaces_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
}; };
ArcAccessibilityHelperBridgeTest() = default; ArcAccessibilityHelperBridgeTest() = default;

@@ -367,7 +367,7 @@ class ArcSessionManager : public ArcSessionRunner::Observer,
// Internal state machine. See also State enum class. // Internal state machine. See also State enum class.
State state_ = State::NOT_INITIALIZED; State state_ = State::NOT_INITIALIZED;
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
std::unique_ptr<ArcAppLauncher> playstore_launcher_; std::unique_ptr<ArcAppLauncher> playstore_launcher_;
bool reenable_arc_ = false; bool reenable_arc_ = false;
bool provisioning_reported_ = false; bool provisioning_reported_ = false;

@@ -1146,7 +1146,7 @@ class ArcSessionOobeOptInNegotiatorTest
void Bind(chromeos::ArcTermsOfServiceScreen* screen) override {} void Bind(chromeos::ArcTermsOfServiceScreen* screen) override {}
base::ObserverList<chromeos::ArcTermsOfServiceScreenViewObserver> base::ObserverList<chromeos::ArcTermsOfServiceScreenViewObserver>::Unchecked
observer_list_; observer_list_;
std::unique_ptr<chromeos::FakeLoginDisplayHost> fake_login_display_host_; std::unique_ptr<chromeos::FakeLoginDisplayHost> fake_login_display_host_;

@@ -137,7 +137,7 @@ class FakeArcSupport : public extensions::NativeMessageHost::Client {
bool tos_shown_ = false; bool tos_shown_ = false;
std::string active_directory_auth_federation_url_; std::string active_directory_auth_federation_url_;
std::string active_directory_auth_device_management_url_prefix_; std::string active_directory_auth_device_management_url_prefix_;
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
base::WeakPtrFactory<FakeArcSupport> weak_ptr_factory_; base::WeakPtrFactory<FakeArcSupport> weak_ptr_factory_;

@@ -105,7 +105,7 @@ class ArcFileSystemBridge : public KeyedService, public mojom::FileSystemHost {
Profile* const profile_; Profile* const profile_;
ArcBridgeService* const bridge_service_; // Owned by ArcServiceManager ArcBridgeService* const bridge_service_; // Owned by ArcServiceManager
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
// Map from file descriptor IDs to requested URLs. // Map from file descriptor IDs to requested URLs.
std::map<std::string, GURL> id_to_url_; std::map<std::string, GURL> id_to_url_;

@@ -191,7 +191,7 @@ class ArcFileSystemOperationRunner
// Map from a watcher ID to a watcher callback. // Map from a watcher ID to a watcher callback.
std::map<int64_t, WatcherCallback> watcher_callbacks_; std::map<int64_t, WatcherCallback> watcher_callbacks_;
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
base::WeakPtrFactory<ArcFileSystemOperationRunner> weak_ptr_factory_; base::WeakPtrFactory<ArcFileSystemOperationRunner> weak_ptr_factory_;

@@ -176,7 +176,7 @@ class ArcPolicyBridge : public KeyedService,
// since the most recent policy update notificaton was already reported. // since the most recent policy update notificaton was already reported.
bool compliance_since_update_timing_reported_ = false; bool compliance_since_update_timing_reported_ = false;
base::ObserverList<Observer, true /* check_empty */> observers_; base::ObserverList<Observer, true /* check_empty */>::Unchecked observers_;
// Called when the ARC connection is ready. // Called when the ARC connection is ready.
base::OnceClosure on_arc_instance_ready_callback_; base::OnceClosure on_arc_instance_ready_callback_;

@@ -87,7 +87,7 @@ class VoiceInteractionControllerClient
ash::mojom::VoiceInteractionState voice_interaction_state_ = ash::mojom::VoiceInteractionState voice_interaction_state_ =
ash::mojom::VoiceInteractionState::STOPPED; ash::mojom::VoiceInteractionState::STOPPED;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(VoiceInteractionControllerClient); DISALLOW_COPY_AND_ASSIGN(VoiceInteractionControllerClient);
}; };

@@ -43,7 +43,7 @@ class CameraPresenceNotifier {
// Timer for camera check cycle. // Timer for camera check cycle.
base::RepeatingTimer camera_check_timer_; base::RepeatingTimer camera_check_timer_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
base::WeakPtrFactory<CameraPresenceNotifier> weak_factory_; base::WeakPtrFactory<CameraPresenceNotifier> weak_factory_;

@@ -369,7 +369,8 @@ class CrostiniRestarter : public base::RefCountedThreadSafe<CrostiniRestarter>,
std::string container_username_; std::string container_username_;
std::string source_path_; std::string source_path_;
CrostiniManager::RestartCrostiniCallback callback_; CrostiniManager::RestartCrostiniCallback callback_;
base::ObserverList<CrostiniManager::RestartObserver> observer_list_; base::ObserverList<CrostiniManager::RestartObserver>::Unchecked
observer_list_;
CrostiniManager::RestartId restart_id_; CrostiniManager::RestartId restart_id_;
CrostiniRestarterService* restarter_service_; CrostiniRestarterService* restarter_service_;
bool is_aborted_ = false; bool is_aborted_ = false;

@@ -205,7 +205,7 @@ class CrostiniRegistryService : public KeyedService {
// stored. // stored.
base::FilePath base_icon_path_; base::FilePath base_icon_path_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
const base::Clock* clock_; const base::Clock* clock_;

@@ -227,7 +227,7 @@ class DriveIntegrationService : public KeyedService,
std::unique_ptr<DownloadHandler> download_handler_; std::unique_ptr<DownloadHandler> download_handler_;
std::unique_ptr<DebugInfoCollector> debug_info_collector_; std::unique_ptr<DebugInfoCollector> debug_info_collector_;
base::ObserverList<DriveIntegrationServiceObserver> observers_; base::ObserverList<DriveIntegrationServiceObserver>::Unchecked observers_;
std::unique_ptr<PreferenceWatcher> preference_watcher_; std::unique_ptr<PreferenceWatcher> preference_watcher_;
std::unique_ptr<content::NotificationRegistrar> std::unique_ptr<content::NotificationRegistrar>
profile_notification_registrar_; profile_notification_registrar_;

@@ -106,7 +106,7 @@ class FakeDiskMountManager : public chromeos::disks::DiskMountManager {
const chromeos::disks::Disk* disk); const chromeos::disks::Disk* disk);
private: private:
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
base::queue<UnmountPathCallback> pending_unmount_callbacks_; base::queue<UnmountPathCallback> pending_unmount_callbacks_;
DiskMap disks_; DiskMap disks_;

@@ -381,7 +381,7 @@ class VolumeManager : public KeyedService,
drive::DriveIntegrationService* drive_integration_service_; // Not owned. drive::DriveIntegrationService* drive_integration_service_; // Not owned.
chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned. chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned.
PrefChangeRegistrar pref_change_registrar_; PrefChangeRegistrar pref_change_registrar_;
base::ObserverList<VolumeManagerObserver> observers_; base::ObserverList<VolumeManagerObserver>::Unchecked observers_;
chromeos::file_system_provider::Service* chromeos::file_system_provider::Service*
file_system_provider_service_; // Not owned by this class. file_system_provider_service_; // Not owned by this class.
GetMtpStorageInfoCallback get_mtp_storage_info_callback_; GetMtpStorageInfoCallback get_mtp_storage_info_callback_;

@@ -183,7 +183,7 @@ class FakeProvidedFileSystem : public ProvidedFileSystemInterface {
OpenedFiles opened_files_; OpenedFiles opened_files_;
int last_file_handle_; int last_file_handle_;
base::CancelableTaskTracker tracker_; base::CancelableTaskTracker tracker_;
base::ObserverList<ProvidedFileSystemObserver> observers_; base::ObserverList<ProvidedFileSystemObserver>::Unchecked observers_;
Watchers watchers_; Watchers watchers_;
base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_;

@@ -249,7 +249,7 @@ class ProvidedFileSystem : public ProvidedFileSystemInterface {
Watchers watchers_; Watchers watchers_;
Queue watcher_queue_; Queue watcher_queue_;
OpenedFiles opened_files_; OpenedFiles opened_files_;
base::ObserverList<ProvidedFileSystemObserver> observers_; base::ObserverList<ProvidedFileSystemObserver>::Unchecked observers_;
base::WeakPtrFactory<ProvidedFileSystem> weak_ptr_factory_; base::WeakPtrFactory<ProvidedFileSystem> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ProvidedFileSystem); DISALLOW_COPY_AND_ASSIGN(ProvidedFileSystem);

@@ -185,7 +185,7 @@ class RequestManager {
NotificationManagerInterface* notification_manager_; // Not owned. NotificationManagerInterface* notification_manager_; // Not owned.
int next_id_; int next_id_;
base::TimeDelta timeout_; base::TimeDelta timeout_;
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
base::WeakPtrFactory<RequestManager> weak_ptr_factory_; base::WeakPtrFactory<RequestManager> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(RequestManager); DISALLOW_COPY_AND_ASSIGN(RequestManager);

@@ -203,7 +203,7 @@ class Service : public KeyedService,
Profile* profile_; Profile* profile_;
extensions::ExtensionRegistry* extension_registry_; // Not owned. extensions::ExtensionRegistry* extension_registry_; // Not owned.
base::ObserverList<Observer> observers_; base::ObserverList<Observer>::Unchecked observers_;
std::map<FileSystemKey, std::unique_ptr<ProvidedFileSystemInterface>> std::map<FileSystemKey, std::unique_ptr<ProvidedFileSystemInterface>>
file_system_map_; file_system_map_;
std::map<std::string, FileSystemKey> mount_point_name_to_key_map_; std::map<std::string, FileSystemKey> mount_point_name_to_key_map_;

@@ -82,7 +82,7 @@ class DriveFirstRunController {
base::OneShotTimer web_contents_timer_; base::OneShotTimer web_contents_timer_;
base::OneShotTimer initial_delay_timer_; base::OneShotTimer initial_delay_timer_;
bool started_; bool started_;
base::ObserverList<Observer> observer_list_; base::ObserverList<Observer>::Unchecked observer_list_;
int initial_delay_secs_; int initial_delay_secs_;
int web_contents_timeout_secs_; int web_contents_timeout_secs_;

Some files were not shown because too many files have changed in this diff Show More