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

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

Issue 2146963004: Adding the creation flags back to pending extension info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comment Created 4 years, 5 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 | « no previous file | chrome/browser/extensions/extension_service_unittest.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 id, Extension::DISABLE_PERMISSIONS_INCREASE); 539 id, Extension::DISABLE_PERMISSIONS_INCREASE);
540 const base::Version& expected_version = pending_extension_info->version(); 540 const base::Version& expected_version = pending_extension_info->version();
541 if (has_permissions_increase || 541 if (has_permissions_increase ||
542 pending_extension_info->remote_install() || 542 pending_extension_info->remote_install() ||
543 !expected_version.IsValid()) { 543 !expected_version.IsValid()) {
544 installer->set_grant_permissions(false); 544 installer->set_grant_permissions(false);
545 } else { 545 } else {
546 installer->set_expected_version(expected_version, 546 installer->set_expected_version(expected_version,
547 false /* fail_install_if_unexpected */); 547 false /* fail_install_if_unexpected */);
548 } 548 }
549 creation_flags = pending_extension_info->creation_flags();
549 if (pending_extension_info->mark_acknowledged()) 550 if (pending_extension_info->mark_acknowledged())
550 external_install_manager_->AcknowledgeExternalExtension(id); 551 external_install_manager_->AcknowledgeExternalExtension(id);
551 } else if (extension) { 552 } else if (extension) {
552 installer->set_install_source(extension->location()); 553 installer->set_install_source(extension->location());
553 } 554 }
554 // If the extension was installed from or has migrated to the webstore, or 555 // If the extension was installed from or has migrated to the webstore, or
555 // its auto-update URL is from the webstore, treat it as a webstore install. 556 // its auto-update URL is from the webstore, treat it as a webstore install.
556 // Note that we ignore some older extensions with blank auto-update URLs 557 // Note that we ignore some older extensions with blank auto-update URLs
557 // because we are mostly concerned with restrictions on NaCl extensions, 558 // because we are mostly concerned with restrictions on NaCl extensions,
558 // which are newer. 559 // which are newer.
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
2466 } 2467 }
2467 2468
2468 void ExtensionService::OnProfileDestructionStarted() { 2469 void ExtensionService::OnProfileDestructionStarted() {
2469 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2470 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2470 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2471 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2471 it != ids_to_unload.end(); 2472 it != ids_to_unload.end();
2472 ++it) { 2473 ++it) {
2473 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2474 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2474 } 2475 }
2475 } 2476 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698