Fix Linux CFI bot by fixing ExtensionStorageMonitorTest.
Reland 37bd8dbf991d69ecf3bc3804 with changes:
1. Destroy the NotificationDisplayServiceTester before the profile goes
down (to fix the error).
2. Make the extension storage monitor depend on the notification service
(for correctness --- doesn't help fix this error).
3. Don't explicitly remove notifications when the profile goes down. The
NotificationDisplayService should remove all transient notifications
for its profile when it's destroyed, which happens when the profile
is destroyed. This part is necessary because when you remove a testing
factory it doesn't reinstate the normal, non-testing factory, so we
get a null deref. See KeyedServiceFactory::testing_factories_
[email protected]
Bug: 793548
Change-Id: I834091ad6c53aaf923756e723a234013f92b1cd9
Reviewed-on: https://chromium-review.googlesource.com/817657
Commit-Queue: Evan Stade <[email protected]>
Reviewed-by: Evan Stade <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#523138}
diff --git a/chrome/browser/notifications/notification_display_service_tester.h b/chrome/browser/notifications/notification_display_service_tester.h
index 88960c64..a2039d0 100644
--- a/chrome/browser/notifications/notification_display_service_tester.h
+++ b/chrome/browser/notifications/notification_display_service_tester.h
@@ -46,7 +46,7 @@
const message_center::Notification& notification);
base::Optional<message_center::Notification> GetNotification(
- const std::string& notification_id);
+ const std::string& notification_id) const;
// Simulates the notification identified by |notification_id| being clicked
// on, optionally with the given |action_index| and |reply|.