Chromium Code Reviews| Index: chrome/browser/extensions/activity_log/activity_log.h |
| diff --git a/chrome/browser/extensions/activity_log/activity_log.h b/chrome/browser/extensions/activity_log/activity_log.h |
| index 2a4e491b266ffca100f0af4f15a748b460138e8e..7954997bb8cdb9ead55333fe603cfcbfe22e56ac 100644 |
| --- a/chrome/browser/extensions/activity_log/activity_log.h |
| +++ b/chrome/browser/extensions/activity_log/activity_log.h |
| @@ -29,6 +29,10 @@ |
| class Profile; |
| using content::BrowserThread; |
| +namespace user_prefs { |
| +class PrefRegistrySyncable; |
| +} |
| + |
| namespace extensions { |
| class Extension; |
| class ActivityLogPolicy; |
| @@ -145,6 +149,8 @@ class ActivityLog : public BrowserContextKeyedService, |
| // BrowserContextKeyedService |
| virtual void Shutdown() OVERRIDE; |
| + static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| + |
| private: |
| friend class ActivityLogFactory; |
| friend class ActivityLogTest; |
| @@ -153,9 +159,9 @@ class ActivityLog : public BrowserContextKeyedService, |
| explicit ActivityLog(Profile* profile); |
| virtual ~ActivityLog(); |
| - // Some setup needs to wait until after the ExtensionSystem/ExtensionService |
| - // are done with their own setup. |
| - void Init(); |
| + // Delayed initialization of Install Tracker which waits until after the |
| + // ExtensionSystem/ExtensionService are done with their own setup. |
| + void InitInstallTracker(); |
| // We log callbacks and API calls very similarly, so we handle them the same |
| // way internally. |
| @@ -198,7 +204,6 @@ class ActivityLog : public BrowserContextKeyedService, |
| Profile* profile_; |
| bool enabled_; // Whether logging is currently enabled. |
| - bool initialized_; // Whether Init() has already been called. |
| bool policy_chosen_; // Whether we've already set the default policy. |
| // testing_mode_ controls whether to log API call arguments. By default, we |
| // don't log most arguments to avoid saving too much data. In testing mode, |
| @@ -206,15 +211,14 @@ class ActivityLog : public BrowserContextKeyedService, |
| // collection regardless of whether this bool is true. |
| // When testing_mode_ is enabled, we also print to the console. |
| bool testing_mode_; |
| - // We need the DB, FILE, and IO threads to operate. In some cases (tests), |
| - // these threads might not exist, so we avoid dispatching anything to the |
| - // ActivityDatabase to prevent things from exploding. |
| - bool has_threads_; |
| // Used to track whether the whitelisted extension is installed. If it's |
| // added or removed, enabled_ may change. |
| InstallTracker* tracker_; |
| + // Set if the ActivityLog extension is present and enabled. |
| + bool activity_log_extension_enabled_; |
|
felt
2013/07/18 20:42:03
I'm finding this name confusingly similar to enabl
pmarch
2013/07/18 21:37:14
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ActivityLog); |
| }; |