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 f2d19eba5434fd1949ab473d66c9b3b846b46eb0..e8a1c24feb0e83dda6ee3d8884ae146a9ab2becf 100644 |
--- a/chrome/browser/extensions/error_console/error_console.h |
+++ b/chrome/browser/extensions/error_console/error_console.h |
@@ -65,6 +65,15 @@ class ErrorConsole : public content::NotificationObserver, |
ExtensionError::Type type, |
bool enabled); |
+ // Set whether or not errors of all types are stored for the extension with |
+ // the given |extension_id|. |
+ void SetReportingAllForExtension(const std::string& extension_id, |
+ bool enabled); |
+ |
+ // Returns true if reporting for either manifest or runtime errors is enabled |
+ // for the extension with the given |extension_id|. |
+ bool IsReportingEnabledForExtension(const std::string& extension_id) const; |
+ |
// Restore default reporting to the given extension. |
void UseDefaultReportingForExtension(const std::string& extension_id); |
@@ -102,10 +111,6 @@ class ErrorConsole : public content::NotificationObserver, |
} |
private: |
- // A map which stores the reporting preferences for each Extension. If there |
- // is no entry in the map, it signals that the |default_mask_| should be used. |
- typedef std::map<std::string, int32> ErrorPreferenceMap; |
- |
// Checks whether or not the ErrorConsole should be enabled or disabled. If it |
// is in the wrong state, enables or disables it appropriately. |
void CheckEnabled(); |
@@ -138,6 +143,14 @@ class ErrorConsole : public content::NotificationObserver, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // Sets the extension preference for error reporting. |
+ void SetExtensionPref(const std::string& extension_id, int32 mask); |
+ |
+ // Returns true if we should report the error of the given type for the |
+ // extension. |
+ bool ShouldReportErrorForExtension(const std::string& extension_id, |
+ ExtensionError::Type type) const; |
+ |
// 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. |
@@ -154,9 +167,6 @@ class ErrorConsole : public content::NotificationObserver, |
// The errors which we have received so far. |
ErrorMap errors_; |
- // The mapping of Extension's error-reporting preferences. |
- ErrorPreferenceMap pref_map_; |
- |
// The default mask to use if an Extension does not have specific settings. |
int32 default_mask_; |