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

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: New approach with a preference variable 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..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);
};

Powered by Google App Engine
This is Rietveld 408576698