Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 } 1523 }
1524 system_->runtime_data()->SetBeingUpgraded(extension->id(), false); 1524 system_->runtime_data()->SetBeingUpgraded(extension->id(), false);
1525 } 1525 }
1526 1526
1527 void ExtensionService::AddComponentExtension(const Extension* extension) { 1527 void ExtensionService::AddComponentExtension(const Extension* extension) {
1528 const std::string old_version_string( 1528 const std::string old_version_string(
1529 extension_prefs_->GetVersionString(extension->id())); 1529 extension_prefs_->GetVersionString(extension->id()));
1530 const Version old_version(old_version_string); 1530 const Version old_version(old_version_string);
1531 1531
1532 VLOG(1) << "AddComponentExtension " << extension->name(); 1532 VLOG(1) << "AddComponentExtension " << extension->name();
1533 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) { 1533 if (!old_version.IsValid() || old_version != *extension->version()) {
1534 VLOG(1) << "Component extension " << extension->name() << " (" 1534 VLOG(1) << "Component extension " << extension->name() << " ("
1535 << extension->id() << ") installing/upgrading from '" 1535 << extension->id() << ") installing/upgrading from '"
1536 << old_version_string << "' to " << extension->version()->GetString(); 1536 << old_version_string << "' to " << extension->version()->GetString();
1537 1537
1538 AddNewOrUpdatedExtension(extension, 1538 AddNewOrUpdatedExtension(extension,
1539 Extension::ENABLED, 1539 Extension::ENABLED,
1540 extensions::kInstallFlagNone, 1540 extensions::kInstallFlagNone,
1541 syncer::StringOrdinal(), 1541 syncer::StringOrdinal(),
1542 std::string()); 1542 std::string());
1543 return; 1543 return;
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2467 } 2467 }
2468 2468
2469 void ExtensionService::OnProfileDestructionStarted() { 2469 void ExtensionService::OnProfileDestructionStarted() {
2470 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2470 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2471 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2471 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2472 it != ids_to_unload.end(); 2472 it != ids_to_unload.end();
2473 ++it) { 2473 ++it) {
2474 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2474 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2475 } 2475 }
2476 } 2476 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698