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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 extension_prefs_->GetVersionString(extension->id())); | 1454 extension_prefs_->GetVersionString(extension->id())); |
1455 const Version old_version(old_version_string); | 1455 const Version old_version(old_version_string); |
1456 | 1456 |
1457 VLOG(1) << "AddComponentExtension " << extension->name(); | 1457 VLOG(1) << "AddComponentExtension " << extension->name(); |
1458 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) { | 1458 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) { |
1459 VLOG(1) << "Component extension " << extension->name() << " (" | 1459 VLOG(1) << "Component extension " << extension->name() << " (" |
1460 << extension->id() << ") installing/upgrading from '" | 1460 << extension->id() << ") installing/upgrading from '" |
1461 << old_version_string << "' to " << extension->version()->GetString(); | 1461 << old_version_string << "' to " << extension->version()->GetString(); |
1462 | 1462 |
1463 AddNewOrUpdatedExtension(extension, | 1463 AddNewOrUpdatedExtension(extension, |
1464 Extension::ENABLED_COMPONENT, | 1464 Extension::ENABLED, |
1465 extensions::kInstallFlagNone, | 1465 extensions::kInstallFlagNone, |
1466 syncer::StringOrdinal(), | 1466 syncer::StringOrdinal(), |
1467 std::string()); | 1467 std::string()); |
1468 return; | 1468 return; |
1469 } | 1469 } |
1470 | 1470 |
1471 AddExtension(extension); | 1471 AddExtension(extension); |
1472 } | 1472 } |
1473 | 1473 |
1474 void ExtensionService::CheckPermissionsIncrease(const Extension* extension, | 1474 void ExtensionService::CheckPermissionsIncrease(const Extension* extension, |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 } | 2362 } |
2363 | 2363 |
2364 void ExtensionService::OnProfileDestructionStarted() { | 2364 void ExtensionService::OnProfileDestructionStarted() { |
2365 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2365 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
2366 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2366 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
2367 it != ids_to_unload.end(); | 2367 it != ids_to_unload.end(); |
2368 ++it) { | 2368 ++it) { |
2369 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2369 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
2370 } | 2370 } |
2371 } | 2371 } |
OLD | NEW |