| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // being read back again. | 34 // being read back again. |
| 35 // | 35 // |
| 36 // This class should be kept notified of runtime changes to the set of | 36 // This class should be kept notified of runtime changes to the set of |
| 37 // extensions installed from the webstore. | 37 // extensions installed from the webstore. |
| 38 class InstallVerifier : public ManagementPolicy::Provider { | 38 class InstallVerifier : public ManagementPolicy::Provider { |
| 39 public: | 39 public: |
| 40 InstallVerifier(ExtensionPrefs* prefs, | 40 InstallVerifier(ExtensionPrefs* prefs, |
| 41 net::URLRequestContextGetter* context_getter); | 41 net::URLRequestContextGetter* context_getter); |
| 42 virtual ~InstallVerifier(); | 42 virtual ~InstallVerifier(); |
| 43 | 43 |
| 44 // Returns whether |extension| is of a type that needs verification. |
| 45 static bool NeedsVerification(const Extension& extension); |
| 46 |
| 44 // Initializes this object for use, including reading preferences and | 47 // Initializes this object for use, including reading preferences and |
| 45 // validating the stored signature. | 48 // validating the stored signature. |
| 46 void Init(); | 49 void Init(); |
| 47 | 50 |
| 48 // Do we need to be bootstrapped? (i.e. do we have a signature already). If | 51 // Do we need to be bootstrapped? (i.e. do we have a signature already). If |
| 49 // this is true, then consumers of this class should use Add/AddMany to get | 52 // this is true, then consumers of this class should use Add/AddMany to get |
| 50 // an initial one so that MustRemainDisabled can actually check against it. | 53 // an initial one so that MustRemainDisabled can actually check against it. |
| 51 bool NeedsBootstrap(); | 54 bool NeedsBootstrap(); |
| 52 | 55 |
| 53 // A callback for indicating success/failure of adding new ids. | 56 // A callback for indicating success/failure of adding new ids. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // A set of ids that have been provisionally added, which we're willing to | 134 // A set of ids that have been provisionally added, which we're willing to |
| 132 // consider allowed until we hear back from the server signature request. | 135 // consider allowed until we hear back from the server signature request. |
| 133 ExtensionIdSet provisional_; | 136 ExtensionIdSet provisional_; |
| 134 | 137 |
| 135 DISALLOW_COPY_AND_ASSIGN(InstallVerifier); | 138 DISALLOW_COPY_AND_ASSIGN(InstallVerifier); |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 } // namespace extensions | 141 } // namespace extensions |
| 139 | 142 |
| 140 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ | 143 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ |
| OLD | NEW |