Commit 5758e195 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Remove ActivityLogState

All activity logging is done on the UI thread now, so there's no
need for a thread-safe cache of extension whitelists or ActivityLog
active state.

Bug: 268984
Change-Id: I3c35017cb8413be59a270a96e587f3c401e80b88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849419Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704850}
parent 30c4010d
......@@ -19,8 +19,6 @@
#include "base/threading/thread.h"
#include "chrome/browser/extensions/activity_log/activity_actions.h"
#include "chrome/browser/extensions/activity_log/activity_log_policy.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_observer.h"
......@@ -47,8 +45,7 @@ class ExtensionSystem;
// each profile.
//
class ActivityLog : public BrowserContextKeyedAPI,
public ExtensionRegistryObserver,
public content::NotificationObserver {
public ExtensionRegistryObserver {
public:
// Observers can listen for activity events. There is probably only one
// observer: the activityLogPrivate API.
......@@ -174,11 +171,6 @@ class ActivityLog : public BrowserContextKeyedAPI,
// whether or not a consumer is active. Otherwise, checks active_consumers_.
void CheckActive(bool use_cached);
// content::NotificationObserver:
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
// Called once the ExtensionSystem is ready.
void OnExtensionSystemReady();
......@@ -240,8 +232,6 @@ class ActivityLog : public BrowserContextKeyedAPI,
// reasons.
bool is_active_;
content::NotificationRegistrar registrar_;
base::WeakPtrFactory<ActivityLog> weak_factory_{this};
FRIEND_TEST_ALL_PREFIXES(ActivityLogApiTest, TriggerEvent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment