Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4966)

Unified Diff: chrome/browser/extensions/activity_log/activity_log.h

Issue 18430004: Sets correct ActivityLog enabled status to the first renderer process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9f3e7bcdcdcb8678bb1aa5ad870f68647f0828d8 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,
@@ -215,6 +220,10 @@ class ActivityLog : public BrowserContextKeyedService,
// added or removed, enabled_ may change.
InstallTracker* tracker_;
+ // Set if the ActivityLog extension is present and active. Maintained by
+ // kActivityLogExtensionActive pref variable.
+ bool activity_log_extension_active_;
+
DISALLOW_COPY_AND_ASSIGN(ActivityLog);
};

Powered by Google App Engine
This is Rietveld 408576698