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

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

Issue 1028123002: Supervised users: Include extension version in update requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests 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> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 11
12 namespace base {
13 class Version;
14 }
15
12 class GURL; 16 class GURL;
13 17
14 class PermissionRequestCreator { 18 class PermissionRequestCreator {
15 public: 19 public:
16 typedef base::Callback<void(bool)> SuccessCallback; 20 typedef base::Callback<void(bool)> SuccessCallback;
17 21
18 virtual ~PermissionRequestCreator() {} 22 virtual ~PermissionRequestCreator() {}
19 23
20 // Returns false if creating a permission request is expected to fail. 24 // Returns false if creating a permission request is expected to fail.
21 // If this method returns true, it doesn't necessary mean that creating the 25 // 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 26 // permission request will succeed, just that it's not known in advance
23 // to fail. 27 // to fail.
24 virtual bool IsEnabled() const = 0; 28 virtual bool IsEnabled() const = 0;
25 29
26 // Creates a permission request for |url_requested| and calls |callback| with 30 // Creates a permission request for |url_requested| and calls |callback| with
27 // the result (whether creating the permission request was successful). 31 // the result (whether creating the permission request was successful).
28 virtual void CreateURLAccessRequest(const GURL& url_requested, 32 virtual void CreateURLAccessRequest(const GURL& url_requested,
29 const SuccessCallback& callback) = 0; 33 const SuccessCallback& callback) = 0;
30 34
31 // Creates a request to re-enable the extension with the given |extension_id|, 35 // Creates a request to re-enable the extension with the given |extension_id|,
32 // which was disabled due to a permission increase. 36 // which was disabled due to a permission increase.
33 virtual void CreateExtensionUpdateRequest( 37 virtual void CreateExtensionUpdateRequest(
34 const std::string& extension_id, 38 const std::string& extension_id,
39 const base::Version& version,
35 const SuccessCallback& callback) = 0; 40 const SuccessCallback& callback) = 0;
36 }; 41 };
37 42
38 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ 43 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698