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

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

Issue 215623002: Enable Error Console for ADT and <= Dev Channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restructure Created 6 years, 9 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/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_;

Powered by Google App Engine
This is Rietveld 408576698