| 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 // details. | 575 // details. |
| 576 if (extension && extension->from_bookmark()) | 576 if (extension && extension->from_bookmark()) |
| 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, |
| 588 extension_prefs_->DoNotSync(id)); |
| 589 } |
| 587 | 590 |
| 588 installer->set_creation_flags(creation_flags); | 591 installer->set_creation_flags(creation_flags); |
| 589 | 592 |
| 590 installer->set_delete_source(file_ownership_passed); | 593 installer->set_delete_source(file_ownership_passed); |
| 591 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); | 594 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); |
| 592 installer->InstallCrx(extension_path); | 595 installer->InstallCrx(extension_path); |
| 593 | 596 |
| 594 if (out_crx_installer) | 597 if (out_crx_installer) |
| 595 *out_crx_installer = installer.get(); | 598 *out_crx_installer = installer.get(); |
| 596 | 599 |
| (...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 } | 2543 } |
| 2541 | 2544 |
| 2542 void ExtensionService::OnProfileDestructionStarted() { | 2545 void ExtensionService::OnProfileDestructionStarted() { |
| 2543 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2546 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2544 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2547 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2545 it != ids_to_unload.end(); | 2548 it != ids_to_unload.end(); |
| 2546 ++it) { | 2549 ++it) { |
| 2547 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2550 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2548 } | 2551 } |
| 2549 } | 2552 } |
| OLD | NEW |