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

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

Issue 231523002: Enable Error Console only for Unpacked extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/api/developer_private/developer_private_api.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 12db280069cc55d7065231bbf95fd28037a0026f..bce514598a8ae7d8576c3e46aa935116ca6450f1 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -82,6 +82,7 @@
#include "extensions/common/extension_icon_set.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/feature_switch.h"
+#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/background_info.h"
#include "extensions/common/manifest_handlers/incognito_info.h"
#include "grit/browser_resources.h"
@@ -334,12 +335,13 @@ 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).
+ // If the ErrorConsole is enabled and the extension is unpacked, use the more
+ // detailed errors from the ErrorConsole. Otherwise, use the install warnings
+ // (using both is redundant).
ErrorConsole* error_console =
ErrorConsole::Get(extension_service_->profile());
- if (error_console->IsEnabledForChromeExtensionsPage()) {
+ if (error_console->IsEnabledForChromeExtensionsPage() &&
+ extension->location() == Manifest::UNPACKED) {
const ErrorList& errors =
error_console->GetErrorsForExtension(extension->id());
if (!errors.empty()) {
« no previous file with comments | « chrome/browser/extensions/api/developer_private/developer_private_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698