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

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

Issue 2623033002: [Extensions] Enable sideloading prompt on mac on canary (Closed)
Patch Set: fix channel Created 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/external_install_manager.h » ('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 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 // remain disabled. 2251 // remain disabled.
2252 if (extension_prefs_->IsExtensionDisabled(extension->id())) { 2252 if (extension_prefs_->IsExtensionDisabled(extension->id())) {
2253 int disable_reasons = extension_prefs_->GetDisableReasons(extension->id()); 2253 int disable_reasons = extension_prefs_->GetDisableReasons(extension->id());
2254 // If an extension was disabled without specified reason, presume it's 2254 // If an extension was disabled without specified reason, presume it's
2255 // disabled by user. 2255 // disabled by user.
2256 return disable_reasons == Extension::DISABLE_NONE 2256 return disable_reasons == Extension::DISABLE_NONE
2257 ? Extension::DISABLE_USER_ACTION 2257 ? Extension::DISABLE_USER_ACTION
2258 : disable_reasons; 2258 : disable_reasons;
2259 } 2259 }
2260 2260
2261 if (FeatureSwitch::prompt_for_external_extensions()->IsEnabled()) { 2261 if (extensions::ExternalInstallManager::IsPromptingEnabled()) {
2262 // External extensions are initially disabled. We prompt the user before 2262 // External extensions are initially disabled. We prompt the user before
2263 // enabling them. Hosted apps are excepted because they are not dangerous 2263 // enabling them. Hosted apps are excepted because they are not dangerous
2264 // (they need to be launched by the user anyway). We also don't prompt for 2264 // (they need to be launched by the user anyway). We also don't prompt for
2265 // extensions updating; this is because the extension will be disabled from 2265 // extensions updating; this is because the extension will be disabled from
2266 // the initial install if it is supposed to be, and this allows us to turn 2266 // the initial install if it is supposed to be, and this allows us to turn
2267 // this on for other platforms without disabling already-installed 2267 // this on for other platforms without disabling already-installed
2268 // extensions. 2268 // extensions.
2269 if (extension->GetType() != Manifest::TYPE_HOSTED_APP && 2269 if (extension->GetType() != Manifest::TYPE_HOSTED_APP &&
2270 Manifest::IsExternalLocation(extension->location()) && 2270 Manifest::IsExternalLocation(extension->location()) &&
2271 !extension_prefs_->IsExternalExtensionAcknowledged(extension->id()) && 2271 !extension_prefs_->IsExternalExtensionAcknowledged(extension->id()) &&
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 } 2490 }
2491 2491
2492 void ExtensionService::OnProfileDestructionStarted() { 2492 void ExtensionService::OnProfileDestructionStarted() {
2493 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2493 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2494 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2494 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2495 it != ids_to_unload.end(); 2495 it != ids_to_unload.end();
2496 ++it) { 2496 ++it) {
2497 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2497 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2498 } 2498 }
2499 } 2499 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/external_install_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698