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

Side by Side Diff: chrome/browser/extensions/extension_service.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // details. 569 // details.
570 if (extension && extension->from_bookmark()) 570 if (extension && extension->from_bookmark())
571 creation_flags |= Extension::FROM_BOOKMARK; 571 creation_flags |= Extension::FROM_BOOKMARK;
572 572
573 if (extension && extension->was_installed_by_default()) 573 if (extension && extension->was_installed_by_default())
574 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT; 574 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT;
575 575
576 if (extension && extension->was_installed_by_oem()) 576 if (extension && extension->was_installed_by_oem())
577 creation_flags |= Extension::WAS_INSTALLED_BY_OEM; 577 creation_flags |= Extension::WAS_INSTALLED_BY_OEM;
578 578
579 if (extension && extension->was_installed_by_custodian())
580 creation_flags |= Extension::WAS_INSTALLED_BY_CUSTODIAN;
581
579 if (extension) { 582 if (extension) {
580 installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id)); 583 installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id));
581 installer->set_do_not_sync(extension_prefs_->DoNotSync(id)); 584 installer->set_do_not_sync(extension_prefs_->DoNotSync(id));
582 } 585 }
583 586
584 installer->set_creation_flags(creation_flags); 587 installer->set_creation_flags(creation_flags);
585 588
586 installer->set_delete_source(file_ownership_passed); 589 installer->set_delete_source(file_ownership_passed);
587 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); 590 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE);
588 installer->InstallCrx(extension_path); 591 installer->InstallCrx(extension_path);
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 } 2349 }
2347 2350
2348 void ExtensionService::OnProfileDestructionStarted() { 2351 void ExtensionService::OnProfileDestructionStarted() {
2349 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2352 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2350 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2353 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2351 it != ids_to_unload.end(); 2354 it != ids_to_unload.end();
2352 ++it) { 2355 ++it) {
2353 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2356 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2354 } 2357 }
2355 } 2358 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_sync_data_unittest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698