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

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

Issue 98463005: Enable/disable extensions upon changes in blacklist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move blacklist_state.h to extensions/. Created 6 years, 11 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/extension_service_unittest.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | 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 1fd9ecd4af8ee24738a363aac5966e8c31d889ae..42ab58de446b8c44155da6d23bc1354ff0ef5926 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -69,6 +69,7 @@
#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "extensions/browser/blacklist_state.h"
#include "extensions/browser/extension_error.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/lazy_background_task_queue.h"
@@ -242,6 +243,9 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
extension_data->SetBoolean("homepageProvided",
ManifestURL::GetHomepageURL(extension).is_valid());
+ BlacklistState blacklist_state =
+ extension_service_->extension_prefs()->GetExtensionBlacklistState(
+ extension->id());
base::string16 location_text;
if (Manifest::IsPolicyLocation(extension->location())) {
location_text = l10n_util::GetStringUTF16(
@@ -253,6 +257,26 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
} else if (extension->location() == Manifest::EXTERNAL_REGISTRY) {
location_text = l10n_util::GetStringUTF16(
IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY);
+ } else if (blacklist_state != NOT_BLACKLISTED) {
Finnur 2014/01/23 15:21:38 It is a bit weird that we'd categorize this label
Oleg Eterevsky 2014/01/23 16:33:06 I'll ask a PM working on this feature to find the
+ switch (blacklist_state) {
+ case BLACKLISTED_SECURITY_VULNERABILITY:
+ location_text = l10n_util::GetStringUTF16(
+ IDS_OPTIONS_BLACKLISTED_SECURITY_VULNERABILITY);
+ break;
+
+ case BLACKLISTED_CWS_POLICY_VIOLATION:
+ location_text = l10n_util::GetStringUTF16(
+ IDS_OPTIONS_BLACKLISTED_CWS_POLICY_VIOLATION);
+ break;
+
+ case BLACKLISTED_POTENTIALLY_UNWANTED:
+ location_text = l10n_util::GetStringUTF16(
+ IDS_OPTIONS_BLACKLISTED_POTENTIALLY_UNWANTED);
+ break;
Finnur 2014/01/23 15:21:38 Why is BLACKLISTED_MALWARE not handled?
Oleg Eterevsky 2014/01/23 16:33:06 Because malware extensions are not shown in the li
+
+ default:
+ break;
+ }
}
extension_data->SetString("locationText", location_text);
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698