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 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2008 for (size_t i = 0; i < extensions_.size(); ++i) { | 2008 for (size_t i = 0; i < extensions_.size(); ++i) { |
2009 if (!extensions_[i]->is_theme() && | 2009 if (!extensions_[i]->is_theme() && |
2010 extensions_[i]->location() != Extension::COMPONENT) | 2010 extensions_[i]->location() != Extension::COMPONENT) |
2011 extension_ids.insert(extensions_[i]->id()); | 2011 extension_ids.insert(extensions_[i]->id()); |
2012 } | 2012 } |
2013 | 2013 |
2014 child_process_logging::SetActiveExtensions(extension_ids); | 2014 child_process_logging::SetActiveExtensions(extension_ids); |
2015 } | 2015 } |
2016 | 2016 |
2017 void ExtensionService::OnExtensionInstalled( | 2017 void ExtensionService::OnExtensionInstalled( |
2018 const Extension* extension, bool from_webstore, int page_index) { | 2018 const Extension* extension, bool from_webstore, StringOrdinal page_index) { |
2019 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2019 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
2020 | 2020 |
2021 // Ensure extension is deleted unless we transfer ownership. | 2021 // Ensure extension is deleted unless we transfer ownership. |
2022 scoped_refptr<const Extension> scoped_extension(extension); | 2022 scoped_refptr<const Extension> scoped_extension(extension); |
2023 const std::string& id = extension->id(); | 2023 const std::string& id = extension->id(); |
2024 // Extensions installed by policy can't be disabled. So even if a previous | 2024 // Extensions installed by policy can't be disabled. So even if a previous |
2025 // installation disabled the extension, make sure it is now enabled. | 2025 // installation disabled the extension, make sure it is now enabled. |
2026 bool initial_enable = | 2026 bool initial_enable = |
2027 !extension_prefs_->IsExtensionDisabled(id) || | 2027 !extension_prefs_->IsExtensionDisabled(id) || |
2028 !Extension::UserMayDisable(extension->location()); | 2028 !Extension::UserMayDisable(extension->location()); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 | 2502 |
2503 ExtensionService::NaClModuleInfoList::iterator | 2503 ExtensionService::NaClModuleInfoList::iterator |
2504 ExtensionService::FindNaClModule(const GURL& url) { | 2504 ExtensionService::FindNaClModule(const GURL& url) { |
2505 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2505 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2506 iter != nacl_module_list_.end(); ++iter) { | 2506 iter != nacl_module_list_.end(); ++iter) { |
2507 if (iter->url == url) | 2507 if (iter->url == url) |
2508 return iter; | 2508 return iter; |
2509 } | 2509 } |
2510 return nacl_module_list_.end(); | 2510 return nacl_module_list_.end(); |
2511 } | 2511 } |
OLD | NEW |