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

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

Issue 403593002: Improve messaging for shared modules on chrome://extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: show the list always Created 6 years, 5 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/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 49b259f57c41cf5ae64682042972db64963ae4be..b1480c7cbc7addf7ee97e7df11e9e4afaa3b3cf3 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -41,6 +41,7 @@
#include "chrome/browser/extensions/extension_warning_set.h"
#include "chrome/browser/extensions/install_verifier.h"
#include "chrome/browser/extensions/path_util.h"
+#include "chrome/browser/extensions/shared_module_service.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
@@ -228,6 +229,10 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
!management_policy_->UserMayModifySettings(extension, NULL);
extension_data->SetBoolean("managedInstall", managed_install);
+ bool managed_shared_module =
+ extension->is_shared_module() && extension->from_webstore();
not at google - send to devlin 2014/07/17 20:44:52 why does being from the webstore make a difference
elijahtaylor1 2014/07/17 21:45:30 based on your other comment, I'm getting rid of th
+ extension_data->SetBoolean("managedSharedModule", managed_shared_module);
+
// We should not get into a state where both are true.
DCHECK(!managed_install || !suspicious_install);
@@ -261,9 +266,24 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
Manifest::IsUnpackedLocation(extension->location()));
extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app());
extension_data->SetBoolean("is_platform_app", extension->is_platform_app());
+ extension_data->SetBoolean("is_shared_module", extension->is_shared_module());
extension_data->SetBoolean("homepageProvided",
ManifestURL::GetHomepageURL(extension).is_valid());
+ // Add dependent extensions.
+ if (extension->is_shared_module()) {
+ base::ListValue* dependents_list = new base::ListValue;
+ scoped_ptr<ExtensionSet> dependents =
not at google - send to devlin 2014/07/17 20:44:52 nit: can we call this 'dependentExtensions' not 'd
elijahtaylor1 2014/07/17 21:45:30 Done.
+ extension_service_->shared_module_service()->GetDependentExtensions(
+ extension);
+ for (ExtensionSet::const_iterator i = dependents->begin();
+ i != dependents->end();
+ i++) {
+ dependents_list->Append(new base::StringValue((*i)->id()));
+ }
+ extension_data->Set("dependents", dependents_list);
+ }
+
// Extensions only want all URL access if:
// - The feature is enabled.
// - The extension has access to enough urls that we can't just let it run
@@ -288,6 +308,9 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
} else if (extension->location() == Manifest::EXTERNAL_REGISTRY) {
location_text = l10n_util::GetStringUTF16(
IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY);
+ } else if (managed_shared_module) {
+ location_text = l10n_util::GetStringUTF16(
+ IDS_OPTIONS_INSTALL_LOCATION_SHARED_MODULE);
}
extension_data->SetString("locationText", location_text);
@@ -491,6 +514,8 @@ void ExtensionSettingsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_EXTENSIONS_VISIT_WEBSTORE));
source->AddString("extensionSettingsPolicyControlled",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED));
+ source->AddString("extensionSettingsSharedModule",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHARED_MODULE));
source->AddString("extensionSettingsManagedMode",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOCKED_SUPERVISED_USER));
source->AddString("extensionSettingsCorruptInstall",

Powered by Google App Engine
This is Rietveld 408576698