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

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: Fix comment. 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
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/ui/webui/voicesearch_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/ui/webui/voicesearch_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698