| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |