| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 } | 1521 } |
| 1522 system_->runtime_data()->SetBeingUpgraded(extension->id(), false); | 1522 system_->runtime_data()->SetBeingUpgraded(extension->id(), false); |
| 1523 } | 1523 } |
| 1524 | 1524 |
| 1525 void ExtensionService::AddComponentExtension(const Extension* extension) { | 1525 void ExtensionService::AddComponentExtension(const Extension* extension) { |
| 1526 const std::string old_version_string( | 1526 const std::string old_version_string( |
| 1527 extension_prefs_->GetVersionString(extension->id())); | 1527 extension_prefs_->GetVersionString(extension->id())); |
| 1528 const Version old_version(old_version_string); | 1528 const Version old_version(old_version_string); |
| 1529 | 1529 |
| 1530 VLOG(1) << "AddComponentExtension " << extension->name(); | 1530 VLOG(1) << "AddComponentExtension " << extension->name(); |
| 1531 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) { | 1531 if (!old_version.IsValid() || old_version != *extension->version()) { |
| 1532 VLOG(1) << "Component extension " << extension->name() << " (" | 1532 VLOG(1) << "Component extension " << extension->name() << " (" |
| 1533 << extension->id() << ") installing/upgrading from '" | 1533 << extension->id() << ") installing/upgrading from '" |
| 1534 << old_version_string << "' to " << extension->version()->GetString(); | 1534 << old_version_string << "' to " << extension->version()->GetString(); |
| 1535 | 1535 |
| 1536 AddNewOrUpdatedExtension(extension, | 1536 AddNewOrUpdatedExtension(extension, |
| 1537 Extension::ENABLED, | 1537 Extension::ENABLED, |
| 1538 extensions::kInstallFlagNone, | 1538 extensions::kInstallFlagNone, |
| 1539 syncer::StringOrdinal(), | 1539 syncer::StringOrdinal(), |
| 1540 std::string()); | 1540 std::string()); |
| 1541 return; | 1541 return; |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2465 } | 2465 } |
| 2466 | 2466 |
| 2467 void ExtensionService::OnProfileDestructionStarted() { | 2467 void ExtensionService::OnProfileDestructionStarted() { |
| 2468 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2468 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2469 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2469 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2470 it != ids_to_unload.end(); | 2470 it != ids_to_unload.end(); |
| 2471 ++it) { | 2471 ++it) { |
| 2472 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2472 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2473 } | 2473 } |
| 2474 } | 2474 } |
| OLD | NEW |