| 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 creation_flags |= Extension::FROM_BOOKMARK; | 577 creation_flags |= Extension::FROM_BOOKMARK; |
| 578 | 578 |
| 579 if (extension && extension->was_installed_by_default()) | 579 if (extension && extension->was_installed_by_default()) |
| 580 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT; | 580 creation_flags |= Extension::WAS_INSTALLED_BY_DEFAULT; |
| 581 | 581 |
| 582 if (extension && extension->was_installed_by_oem()) | 582 if (extension && extension->was_installed_by_oem()) |
| 583 creation_flags |= Extension::WAS_INSTALLED_BY_OEM; | 583 creation_flags |= Extension::WAS_INSTALLED_BY_OEM; |
| 584 | 584 |
| 585 if (extension) { | 585 if (extension) { |
| 586 installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id)); | 586 installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id)); |
| 587 installer->set_install_flag(extensions::kInstallFlagDoNotSync, | 587 installer->set_do_not_sync(extension_prefs_->DoNotSync(id)); |
| 588 extension_prefs_->DoNotSync(id)); | |
| 589 } | 588 } |
| 590 | 589 |
| 591 installer->set_creation_flags(creation_flags); | 590 installer->set_creation_flags(creation_flags); |
| 592 | 591 |
| 593 installer->set_delete_source(file_ownership_passed); | 592 installer->set_delete_source(file_ownership_passed); |
| 594 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); | 593 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); |
| 595 installer->InstallCrx(extension_path); | 594 installer->InstallCrx(extension_path); |
| 596 | 595 |
| 597 if (out_crx_installer) | 596 if (out_crx_installer) |
| 598 *out_crx_installer = installer.get(); | 597 *out_crx_installer = installer.get(); |
| (...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 } | 2534 } |
| 2536 | 2535 |
| 2537 void ExtensionService::OnProfileDestructionStarted() { | 2536 void ExtensionService::OnProfileDestructionStarted() { |
| 2538 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2537 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2539 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2538 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2540 it != ids_to_unload.end(); | 2539 it != ids_to_unload.end(); |
| 2541 ++it) { | 2540 ++it) { |
| 2542 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2541 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2543 } | 2542 } |
| 2544 } | 2543 } |
| OLD | NEW |