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

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: rebase, more fix Created 6 years, 2 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_management.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_management.cc
diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc
index 33b066b7b7fed98337ca32c3b634ae8b5e8d6ada..85c69841f75e2d99f91ce94e3fc18f6d9f9654b6 100644
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -78,16 +78,30 @@ ExtensionManagement::InstallationMode ExtensionManagement::GetInstallationMode(
scoped_ptr<base::DictionaryValue> ExtensionManagement::GetForceInstallList()
const {
- scoped_ptr<base::DictionaryValue> forcelist(new base::DictionaryValue());
+ 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) {
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();
+}
+
+scoped_ptr<base::DictionaryValue>
+ExtensionManagement::GetRecommendedInstallList() 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_RECOMMENDED) {
+ ExternalPolicyLoader::AddExtension(
+ install_list.get(), it->first, it->second->update_url);
+ }
+ }
+ return install_list.Pass();
}
bool ExtensionManagement::IsInstallationAllowed(const ExtensionId& id) const {
« no previous file with comments | « chrome/browser/extensions/extension_management.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698