| 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/common/extensions/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 public: | 104 public: |
| 105 static ExtensionConfig* GetInstance() { | 105 static ExtensionConfig* GetInstance() { |
| 106 return Singleton<ExtensionConfig>::get(); | 106 return Singleton<ExtensionConfig>::get(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 Extension::ScriptingWhitelist* whitelist() { return &scripting_whitelist_; } | 109 Extension::ScriptingWhitelist* whitelist() { return &scripting_whitelist_; } |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 friend struct DefaultSingletonTraits<ExtensionConfig>; | 112 friend struct DefaultSingletonTraits<ExtensionConfig>; |
| 113 | 113 |
| 114 ExtensionConfig() { } | 114 ExtensionConfig() { |
| 115 // Whitelist ChromeVox, an accessibility extension from Google that needs |
| 116 // the ability to script webui pages. This is temporary and is not |
| 117 // meant to be a general solution. |
| 118 // TODO(dmazzoni): remove this once we have an extension API that |
| 119 // allows any extension to request read-only access to webui pages. |
| 120 scripting_whitelist_.push_back("kgejglhpjiefppelpmljglcjbhoiplfn"); |
| 121 } |
| 115 ~ExtensionConfig() { } | 122 ~ExtensionConfig() { } |
| 116 | 123 |
| 117 // A whitelist of extensions that can script anywhere. Do not add to this | 124 // A whitelist of extensions that can script anywhere. Do not add to this |
| 118 // list (except in tests) without consulting the Extensions team first. | 125 // list (except in tests) without consulting the Extensions team first. |
| 119 // Note: Component extensions have this right implicitly and do not need to be | 126 // Note: Component extensions have this right implicitly and do not need to be |
| 120 // added to this list. | 127 // added to this list. |
| 121 Extension::ScriptingWhitelist scripting_whitelist_; | 128 Extension::ScriptingWhitelist scripting_whitelist_; |
| 122 }; | 129 }; |
| 123 | 130 |
| 124 // Rank extension locations in a way that allows | 131 // Rank extension locations in a way that allows |
| (...skipping 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 already_disabled(false), | 2988 already_disabled(false), |
| 2982 extension(extension) {} | 2989 extension(extension) {} |
| 2983 | 2990 |
| 2984 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 2991 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 2985 const Extension* extension, | 2992 const Extension* extension, |
| 2986 const ExtensionPermissionSet* permissions, | 2993 const ExtensionPermissionSet* permissions, |
| 2987 Reason reason) | 2994 Reason reason) |
| 2988 : reason(reason), | 2995 : reason(reason), |
| 2989 extension(extension), | 2996 extension(extension), |
| 2990 permissions(permissions) {} | 2997 permissions(permissions) {} |
| OLD | NEW |