| 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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 | 1512 |
| 1513 registry_->AddEnabled(extension); | 1513 registry_->AddEnabled(extension); |
| 1514 NotifyExtensionLoaded(extension); | 1514 NotifyExtensionLoaded(extension); |
| 1515 } | 1515 } |
| 1516 system_->runtime_data()->SetBeingUpgraded(extension->id(), false); | 1516 system_->runtime_data()->SetBeingUpgraded(extension->id(), false); |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 void ExtensionService::AddComponentExtension(const Extension* extension) { | 1519 void ExtensionService::AddComponentExtension(const Extension* extension) { |
| 1520 const std::string old_version_string( | 1520 const std::string old_version_string( |
| 1521 extension_prefs_->GetVersionString(extension->id())); | 1521 extension_prefs_->GetVersionString(extension->id())); |
| 1522 const Version old_version(old_version_string); | 1522 const base::Version old_version(old_version_string); |
| 1523 | 1523 |
| 1524 VLOG(1) << "AddComponentExtension " << extension->name(); | 1524 VLOG(1) << "AddComponentExtension " << extension->name(); |
| 1525 if (!old_version.IsValid() || old_version != *extension->version()) { | 1525 if (!old_version.IsValid() || old_version != *extension->version()) { |
| 1526 VLOG(1) << "Component extension " << extension->name() << " (" | 1526 VLOG(1) << "Component extension " << extension->name() << " (" |
| 1527 << extension->id() << ") installing/upgrading from '" | 1527 << extension->id() << ") installing/upgrading from '" |
| 1528 << old_version_string << "' to " << extension->version()->GetString(); | 1528 << old_version_string << "' to " << extension->version()->GetString(); |
| 1529 | 1529 |
| 1530 AddNewOrUpdatedExtension(extension, | 1530 AddNewOrUpdatedExtension(extension, |
| 1531 Extension::ENABLED, | 1531 Extension::ENABLED, |
| 1532 extensions::kInstallFlagNone, | 1532 extensions::kInstallFlagNone, |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 } | 2444 } |
| 2445 | 2445 |
| 2446 void ExtensionService::OnProfileDestructionStarted() { | 2446 void ExtensionService::OnProfileDestructionStarted() { |
| 2447 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2447 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2448 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2448 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2449 it != ids_to_unload.end(); | 2449 it != ids_to_unload.end(); |
| 2450 ++it) { | 2450 ++it) { |
| 2451 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2451 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2452 } | 2452 } |
| 2453 } | 2453 } |
| OLD | NEW |