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 | 4 |
5 #ifndef CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // If this method returns true, it doesn't necessary mean that creating the | 21 // If this method returns true, it doesn't necessary mean that creating the |
22 // permission request will succeed, just that it's not known in advance | 22 // permission request will succeed, just that it's not known in advance |
23 // to fail. | 23 // to fail. |
24 virtual bool IsEnabled() const = 0; | 24 virtual bool IsEnabled() const = 0; |
25 | 25 |
26 // Creates a permission request for |url_requested| and calls |callback| with | 26 // Creates a permission request for |url_requested| and calls |callback| with |
27 // the result (whether creating the permission request was successful). | 27 // the result (whether creating the permission request was successful). |
28 virtual void CreateURLAccessRequest(const GURL& url_requested, | 28 virtual void CreateURLAccessRequest(const GURL& url_requested, |
29 const SuccessCallback& callback) = 0; | 29 const SuccessCallback& callback) = 0; |
30 | 30 |
| 31 // Creates a request to enable the extension with the given |id| (composed |
| 32 // of extension_id:version), which was disabled after an SU initiated install. |
| 33 virtual void CreateExtensionInstallRequest( |
| 34 const std::string& id, |
| 35 const SuccessCallback& callback) = 0; |
| 36 |
31 // Creates a request to re-enable the extension with the given |id| (composed | 37 // Creates a request to re-enable the extension with the given |id| (composed |
32 // of extension_id:version), which was disabled due to a permission increase. | 38 // of extension_id:version), which was disabled due to a permission increase. |
33 virtual void CreateExtensionUpdateRequest( | 39 virtual void CreateExtensionUpdateRequest( |
34 const std::string& id, | 40 const std::string& id, |
35 const SuccessCallback& callback) = 0; | 41 const SuccessCallback& callback) = 0; |
36 }; | 42 }; |
37 | 43 |
38 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ | 44 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ |
OLD | NEW |