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

Unified Diff: chrome/browser/extensions/extension_management.cc

Issue 536753003: Add recommended extension installation support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-3
Patch Set: add ui changes Created 6 years, 3 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/extensions/extension_management.cc
diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc
index be19b0936b82c1bf8bd9f0d8e2c3f39419311800..4bba3e9441393188925d7f5eac0edf2fed11ddbc 100644
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -163,18 +163,19 @@ bool ExtensionManagement::BlacklistedByDefault() {
return default_settings_.installation_mode == INSTALLATION_BLOCKED;
}
-scoped_ptr<base::DictionaryValue> ExtensionManagement::GetForceInstallList()
- const {
- scoped_ptr<base::DictionaryValue> forcelist(new base::DictionaryValue());
+scoped_ptr<base::DictionaryValue> ExtensionManagement::GetAutoInstallList(
+ bool forced) const {
+ scoped_ptr<base::DictionaryValue> install_list(new base::DictionaryValue());
for (SettingsIdMap::const_iterator it = settings_by_id_.begin();
it != settings_by_id_.end();
++it) {
- if (it->second.installation_mode == INSTALLATION_FORCED) {
+ if (it->second.installation_mode ==
+ (forced ? INSTALLATION_FORCED : INSTALLATION_RECOMMENDED)) {
ExternalPolicyLoader::AddExtension(
- forcelist.get(), it->first, it->second.update_url);
+ install_list.get(), it->first, it->second.update_url);
}
}
- return forcelist.Pass();
+ return install_list.Pass();
}
bool ExtensionManagement::IsInstallationAllowed(const ExtensionId& id) const {

Powered by Google App Engine
This is Rietveld 408576698