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

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

Issue 462533002: Make runtime.reload() work with component extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate the ENABLED_COMPONENT state. Created 6 years, 4 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 <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 extension_prefs_->GetVersionString(extension->id())); 1436 extension_prefs_->GetVersionString(extension->id()));
1437 const Version old_version(old_version_string); 1437 const Version old_version(old_version_string);
1438 1438
1439 VLOG(1) << "AddComponentExtension " << extension->name(); 1439 VLOG(1) << "AddComponentExtension " << extension->name();
1440 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) { 1440 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) {
1441 VLOG(1) << "Component extension " << extension->name() << " (" 1441 VLOG(1) << "Component extension " << extension->name() << " ("
1442 << extension->id() << ") installing/upgrading from '" 1442 << extension->id() << ") installing/upgrading from '"
1443 << old_version_string << "' to " << extension->version()->GetString(); 1443 << old_version_string << "' to " << extension->version()->GetString();
1444 1444
1445 AddNewOrUpdatedExtension(extension, 1445 AddNewOrUpdatedExtension(extension,
1446 Extension::ENABLED_COMPONENT, 1446 Extension::ENABLED,
1447 extensions::kInstallFlagNone, 1447 extensions::kInstallFlagNone,
1448 syncer::StringOrdinal(), 1448 syncer::StringOrdinal(),
1449 std::string()); 1449 std::string());
1450 return; 1450 return;
1451 } 1451 }
1452 1452
1453 AddExtension(extension); 1453 AddExtension(extension);
1454 } 1454 }
1455 1455
1456 void ExtensionService::CheckPermissionsIncrease(const Extension* extension, 1456 void ExtensionService::CheckPermissionsIncrease(const Extension* extension,
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 } 2344 }
2345 2345
2346 void ExtensionService::OnProfileDestructionStarted() { 2346 void ExtensionService::OnProfileDestructionStarted() {
2347 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2347 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2348 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2348 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2349 it != ids_to_unload.end(); 2349 it != ids_to_unload.end();
2350 ++it) { 2350 ++it) {
2351 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2351 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2352 } 2352 }
2353 } 2353 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698