Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: chrome/browser/supervised_user/permission_request_creator.h

Issue 971733003: Supervised users: When an extension requires new permissions, send request to custodian (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test_ext_install_disable
Patch Set: test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 11
10 class GURL; 12 class GURL;
11 13
12 class PermissionRequestCreator { 14 class PermissionRequestCreator {
13 public: 15 public:
14 typedef base::Callback<void(bool)> SuccessCallback; 16 typedef base::Callback<void(bool)> SuccessCallback;
15 17
16 virtual ~PermissionRequestCreator() {} 18 virtual ~PermissionRequestCreator() {}
17 19
18 // Returns false if creating a permission request is expected to fail. 20 // Returns false if creating a permission request is expected to fail.
19 // 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
20 // 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
21 // to fail. 23 // to fail.
22 virtual bool IsEnabled() const = 0; 24 virtual bool IsEnabled() const = 0;
23 25
24 // Creates a permission request for |url_requested| and calls |callback| with 26 // Creates a permission request for |url_requested| and calls |callback| with
25 // the result (whether creating the permission request was successful). 27 // the result (whether creating the permission request was successful).
26 virtual void CreatePermissionRequest(const GURL& url_requested, 28 virtual void CreateURLAccessRequest(const GURL& url_requested,
27 const SuccessCallback& callback) = 0; 29 const SuccessCallback& callback) = 0;
30
31 // Creates a request to re-enable the extension with the given |extension_id|,
32 // which was disabled due to a permission increase.
33 virtual void CreateExtensionUpdateRequest(
34 const std::string& extension_id,
35 const SuccessCallback& callback) = 0;
28 }; 36 };
29 37
30 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ 38 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698