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

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: update test Created 6 years, 6 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 // details. 574 // details.
575 if (extension && extension->from_bookmark()) 575 if (extension && extension->from_bookmark())
576 creation_flags |= Extension::FROM_BOOKMARK; 576 creation_flags |= Extension::FROM_BOOKMARK;
577 577
578 if (extension && extension->was_installed_by_default()) 578 if (extension && extension->was_installed_by_default())
579 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT; 579 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT;
580 580
581 if (extension && extension->was_installed_by_oem()) 581 if (extension && extension->was_installed_by_oem())
582 creation_flags |= Extension::WAS_INSTALLED_BY_OEM; 582 creation_flags |= Extension::WAS_INSTALLED_BY_OEM;
583 583
584 if (extension && extension->was_installed_by_custodian())
585 creation_flags |= Extension::WAS_INSTALLED_BY_CUSTODIAN;
586
584 if (extension) { 587 if (extension) {
585 installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id)); 588 installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id));
586 installer->set_do_not_sync(extension_prefs_->DoNotSync(id)); 589 installer->set_do_not_sync(extension_prefs_->DoNotSync(id));
587 } 590 }
588 591
589 installer->set_creation_flags(creation_flags); 592 installer->set_creation_flags(creation_flags);
590 593
591 installer->set_delete_source(file_ownership_passed); 594 installer->set_delete_source(file_ownership_passed);
592 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); 595 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE);
593 installer->InstallCrx(extension_path); 596 installer->InstallCrx(extension_path);
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2502 } 2505 }
2503 2506
2504 void ExtensionService::OnProfileDestructionStarted() { 2507 void ExtensionService::OnProfileDestructionStarted() {
2505 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2508 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2506 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2509 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2507 it != ids_to_unload.end(); 2510 it != ids_to_unload.end();
2508 ++it) { 2511 ++it) {
2509 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2512 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2510 } 2513 }
2511 } 2514 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698