| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2616 from_webstore, | 2616 from_webstore, |
| 2617 page_index); | 2617 page_index); |
| 2618 | 2618 |
| 2619 // Unpacked extensions default to allowing file access, but if that has been | 2619 // Unpacked extensions default to allowing file access, but if that has been |
| 2620 // overridden, don't reset the value. | 2620 // overridden, don't reset the value. |
| 2621 if (Extension::ShouldAlwaysAllowFileAccess(extension->location()) && | 2621 if (Extension::ShouldAlwaysAllowFileAccess(extension->location()) && |
| 2622 !extension_prefs_->HasAllowFileAccessSetting(id)) { | 2622 !extension_prefs_->HasAllowFileAccessSetting(id)) { |
| 2623 extension_prefs_->SetAllowFileAccess(id, true); | 2623 extension_prefs_->SetAllowFileAccess(id, true); |
| 2624 } | 2624 } |
| 2625 | 2625 |
| 2626 // If the extension should automatically block network startup (e.g., it uses |
| 2627 // the webRequest API), set the preference. Otherwise clear it, in case the |
| 2628 // extension stopped using a relevant API. |
| 2629 extension_prefs_->SetDelaysNetworkRequests( |
| 2630 extension->id(), extension->ImplicitlyDelaysNetworkStartup()); |
| 2631 |
| 2626 NotificationService::current()->Notify( | 2632 NotificationService::current()->Notify( |
| 2627 chrome::NOTIFICATION_EXTENSION_INSTALLED, | 2633 chrome::NOTIFICATION_EXTENSION_INSTALLED, |
| 2628 Source<Profile>(profile_), | 2634 Source<Profile>(profile_), |
| 2629 Details<const Extension>(extension)); | 2635 Details<const Extension>(extension)); |
| 2630 | 2636 |
| 2631 // Transfer ownership of |extension| to AddExtension. | 2637 // Transfer ownership of |extension| to AddExtension. |
| 2632 AddExtension(scoped_extension); | 2638 AddExtension(scoped_extension); |
| 2633 } | 2639 } |
| 2634 | 2640 |
| 2635 const Extension* ExtensionService::GetExtensionByIdInternal( | 2641 const Extension* ExtensionService::GetExtensionByIdInternal( |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3016 | 3022 |
| 3017 ExtensionService::NaClModuleInfoList::iterator | 3023 ExtensionService::NaClModuleInfoList::iterator |
| 3018 ExtensionService::FindNaClModule(const GURL& url) { | 3024 ExtensionService::FindNaClModule(const GURL& url) { |
| 3019 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 3025 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 3020 iter != nacl_module_list_.end(); ++iter) { | 3026 iter != nacl_module_list_.end(); ++iter) { |
| 3021 if (iter->url == url) | 3027 if (iter->url == url) |
| 3022 return iter; | 3028 return iter; |
| 3023 } | 3029 } |
| 3024 return nacl_module_list_.end(); | 3030 return nacl_module_list_.end(); |
| 3025 } | 3031 } |
| OLD | NEW |