Index: chrome/browser/extensions/error_console/error_console.h |
diff --git a/chrome/browser/extensions/error_console/error_console.h b/chrome/browser/extensions/error_console/error_console.h |
index 06c375a9eee2108384264ae93c3cae202874496c..4658f842cbf763d0508b31d2942b3127daa0f442 100644 |
--- a/chrome/browser/extensions/error_console/error_console.h |
+++ b/chrome/browser/extensions/error_console/error_console.h |
@@ -78,7 +78,13 @@ class ErrorConsole : public content::NotificationObserver { |
void AddObserver(Observer* observer); |
void RemoveObserver(Observer* observer); |
- bool enabled() const { return enabled_; } |
+ // Returns whether or not the ErrorConsole is enabled for the |
+ // chrome:extensions page or the Chrome Apps Developer Tools. |
+ // TODO(rdevlin.cronin): These have different answers - ErrorConsole is |
+ // enabled by default in ADT, but only Dev Channel for chrome:extensoins (or |
not at google - send to devlin
2014/03/28 22:05:32
chrome://extensions
you misspelled extensions.
Devlin
2014/03/31 18:39:31
Done.
|
+ // with the commandline switch). Once we do a full launch, clean all this up. |
+ bool IsEnabledForChromeExtensionsPage() const; |
+ bool IsEnabledForAppsDeveloperTools() const; |
// Return the number of entries (extensions) in the error map. |
size_t get_num_entries_for_test() const { return errors_.size(); } |
@@ -115,10 +121,12 @@ class ErrorConsole : public content::NotificationObserver { |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
- // Whether or not the error console is enabled; it is enabled if the |
- // FeatureSwitch (FeatureSwitch::error_console) is enabled and the user is |
- // in Developer Mode. |
- bool enabled_; |
+ // Whether or not the error console should record errors. This is true if |
+ // the user is in developer mode, and at least one of the following is true: |
+ // - The Chrome Apps Developer Tools are installed. |
+ // - FeatureSwitch::error_console() is enabled. |
+ // - This is a Dev Channel release. |
+ bool should_record_; |
// Needed because ObserverList is not thread-safe. |
base::ThreadChecker thread_checker_; |