| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 void ExtensionService::AddExtension(const Extension* extension) { | 1904 void ExtensionService::AddExtension(const Extension* extension) { |
| 1905 // Ensure extension is deleted unless we transfer ownership. | 1905 // Ensure extension is deleted unless we transfer ownership. |
| 1906 scoped_refptr<const Extension> scoped_extension(extension); | 1906 scoped_refptr<const Extension> scoped_extension(extension); |
| 1907 | 1907 |
| 1908 // TODO(jstritar): We may be able to get rid of this branch by overriding the | 1908 // TODO(jstritar): We may be able to get rid of this branch by overriding the |
| 1909 // default extension state to DISABLED when the --disable-extensions flag | 1909 // default extension state to DISABLED when the --disable-extensions flag |
| 1910 // is set (http://crbug.com/29067). | 1910 // is set (http://crbug.com/29067). |
| 1911 if (!extensions_enabled() && | 1911 if (!extensions_enabled() && |
| 1912 !extension->is_theme() && | 1912 !extension->is_theme() && |
| 1913 extension->location() != Extension::COMPONENT && | 1913 extension->location() != Extension::COMPONENT && |
| 1914 !Extension::IsExternalLocation(extension->location())) | 1914 !Extension::IsExternalLocation(extension->location())) { |
| 1915 return; | 1915 return; |
| 1916 } |
| 1916 | 1917 |
| 1917 SetBeingUpgraded(extension, false); | 1918 SetBeingUpgraded(extension, false); |
| 1918 | 1919 |
| 1919 // The extension is now loaded, remove its data from unloaded extension map. | 1920 // The extension is now loaded, remove its data from unloaded extension map. |
| 1920 unloaded_extension_paths_.erase(extension->id()); | 1921 unloaded_extension_paths_.erase(extension->id()); |
| 1921 | 1922 |
| 1922 // If a terminated extension is loaded, remove it from the terminated list. | 1923 // If a terminated extension is loaded, remove it from the terminated list. |
| 1923 UntrackTerminatedExtension(extension->id()); | 1924 UntrackTerminatedExtension(extension->id()); |
| 1924 | 1925 |
| 1925 // If the extension was disabled for a reload, then enable it. | 1926 // If the extension was disabled for a reload, then enable it. |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 | 2570 |
| 2570 ExtensionService::NaClModuleInfoList::iterator | 2571 ExtensionService::NaClModuleInfoList::iterator |
| 2571 ExtensionService::FindNaClModule(const GURL& url) { | 2572 ExtensionService::FindNaClModule(const GURL& url) { |
| 2572 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2573 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2573 iter != nacl_module_list_.end(); ++iter) { | 2574 iter != nacl_module_list_.end(); ++iter) { |
| 2574 if (iter->url == url) | 2575 if (iter->url == url) |
| 2575 return iter; | 2576 return iter; |
| 2576 } | 2577 } |
| 2577 return nacl_module_list_.end(); | 2578 return nacl_module_list_.end(); |
| 2578 } | 2579 } |
| OLD | NEW |