| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_INTERNAL_H_ | 4 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_INTERNAL_H_ |
| 5 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_INTERNAL_H_ | 5 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_INTERNAL_H_ |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/browser/extensions/extension_management.h" | 11 #include "chrome/browser/extensions/extension_management.h" |
| 12 #include "extensions/common/manifest.h" | 12 #include "extensions/common/manifest.h" |
| 13 #include "extensions/common/permissions/api_permission_set.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class DictionaryValue; | 16 class DictionaryValue; |
| 16 } // namespace base | 17 } // namespace base |
| 17 | 18 |
| 18 namespace extensions { | 19 namespace extensions { |
| 19 | 20 |
| 20 class URLPatternSet; | 21 class URLPatternSet; |
| 21 | 22 |
| 22 namespace internal { | 23 namespace internal { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 // INSTALLATION_RECOMMENDED will enable extension auto-loading (only | 49 // INSTALLATION_RECOMMENDED will enable extension auto-loading (only |
| 49 // applicable to single extension), and in this case the |update_url| must | 50 // applicable to single extension), and in this case the |update_url| must |
| 50 // be specified, containing the update URL for this extension. | 51 // be specified, containing the update URL for this extension. |
| 51 // Note that |update_url| will be ignored for INSTALLATION_ALLOWED and | 52 // Note that |update_url| will be ignored for INSTALLATION_ALLOWED and |
| 52 // INSTALLATION_BLOCKED installation mode. | 53 // INSTALLATION_BLOCKED installation mode. |
| 53 // These settings will override the default settings, and unspecified | 54 // These settings will override the default settings, and unspecified |
| 54 // settings will take value from default settings. | 55 // settings will take value from default settings. |
| 55 ExtensionManagement::InstallationMode installation_mode; | 56 ExtensionManagement::InstallationMode installation_mode; |
| 56 std::string update_url; | 57 std::string update_url; |
| 57 | 58 |
| 59 // Permissions settings for extensions. These settings won't give granted |
| 60 // permissions to extensions automatically. Instead, these settings will |
| 61 // provide a list of blocked permissions for each extension. That is, if |
| 62 // an extension requires a permission which is on the blocklist for it, |
| 63 // this extension will not be allowed to be loaded. And if it contains a |
| 64 // blocked permission as optional requirement, it will be allowed to |
| 65 // be loaded (of course, with permission granted from other part of |
| 66 // extension system), but conflicting permissions will not be usable. |
| 67 // These settings will merge from the default settings, and unspecified |
| 68 // settings will take value from default settings. |
| 69 APIPermissionSet blocked_permissions; |
| 70 |
| 58 private: | 71 private: |
| 59 DISALLOW_ASSIGN(IndividualSettings); | 72 DISALLOW_ASSIGN(IndividualSettings); |
| 60 }; | 73 }; |
| 61 | 74 |
| 62 // Global extension management settings, applicable to all extensions. | 75 // Global extension management settings, applicable to all extensions. |
| 63 struct GlobalSettings { | 76 struct GlobalSettings { |
| 64 GlobalSettings(); | 77 GlobalSettings(); |
| 65 ~GlobalSettings(); | 78 ~GlobalSettings(); |
| 66 | 79 |
| 67 void Reset(); | 80 void Reset(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 78 | 91 |
| 79 private: | 92 private: |
| 80 DISALLOW_COPY_AND_ASSIGN(GlobalSettings); | 93 DISALLOW_COPY_AND_ASSIGN(GlobalSettings); |
| 81 }; | 94 }; |
| 82 | 95 |
| 83 } // namespace internal | 96 } // namespace internal |
| 84 | 97 |
| 85 } // namespace extensions | 98 } // namespace extensions |
| 86 | 99 |
| 87 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_INTERNAL_H_ | 100 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_INTERNAL_H_ |
| OLD | NEW |