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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 215623002: Enable Error Console for ADT and <= Dev Channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/extensions/error_console/error_console_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index bdb8b95b856fb00399c0a6b217eb9ae7a0823522..2247ba28f3c6fb458de88f1e44d774e8dc250e70 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -52,6 +52,7 @@
#include "chrome/browser/ui/webui/extensions/extension_basic_info.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/extensions/manifest_url_handler.h"
@@ -334,12 +335,14 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
}
}
- // If the ErrorConsole is enabled, get the errors for the extension and add
- // them to the list. Otherwise, use the install warnings (using both is
- // redundant).
+ // We display errors from the ErrorConsole if either the switch is enabled or
+ // we are in a development channel, and the error console itself is enabled
+ // (i.e., the user is in Developer Mode).
ErrorConsole* error_console =
ErrorConsole::Get(extension_service_->profile());
- if (error_console->enabled()) {
+ if ((FeatureSwitch::error_console()->IsEnabled() ||
+ chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_DEV) &&
+ error_console->enabled()) {
not at google - send to devlin 2014/03/27 23:41:11 It's a bit weird having the enabled checks only he
Devlin 2014/03/28 01:25:49 I don't know if we can pull it into ErrorConsole,
not at google - send to devlin 2014/03/28 15:07:40 Ok, thanks for the explanation. I still thing that
Devlin 2014/03/28 21:49:59 Done.
const ErrorList& errors =
error_console->GetErrorsForExtension(extension->id());
if (!errors.empty()) {
« no previous file with comments | « chrome/browser/extensions/error_console/error_console_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698