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

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

Issue 353493002: Apps&Extensions for supervised users: Add Extension::WAS_INSTALLED_BY_CUSTODIAN flag and proto entry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/extensions/pending_extension_manager.cc
diff --git a/chrome/browser/extensions/pending_extension_manager.cc b/chrome/browser/extensions/pending_extension_manager.cc
index 199cb97f118f20644cbfab893570549d2956d060..ee8e2511ffda696231df1d95e6cd2369658b5274 100644
--- a/chrome/browser/extensions/pending_extension_manager.cc
+++ b/chrome/browser/extensions/pending_extension_manager.cc
@@ -90,7 +90,8 @@ bool PendingExtensionManager::AddFromSync(
const GURL& update_url,
PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
bool install_silently,
- bool remote_install) {
+ bool remote_install,
+ bool installed_by_custodian) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (ExtensionRegistry::Get(context_)->GetExtensionById(
@@ -108,6 +109,11 @@ bool PendingExtensionManager::AddFromSync(
return false;
}
+ int creation_flags = Extension::NO_FLAGS;
+ if (installed_by_custodian) {
+ creation_flags |= Extension::WAS_INSTALLED_BY_CUSTODIAN;
+ }
+
static const bool kIsFromSync = true;
static const Manifest::Location kSyncLocation = Manifest::INTERNAL;
static const bool kMarkAcknowledged = false;
@@ -120,7 +126,7 @@ bool PendingExtensionManager::AddFromSync(
kIsFromSync,
install_silently,
kSyncLocation,
- Extension::NO_FLAGS,
+ creation_flags,
kMarkAcknowledged,
remote_install);
}
« no previous file with comments | « chrome/browser/extensions/pending_extension_manager.h ('k') | chrome/browser/supervised_user/supervised_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698