Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / supervised_user / permission_request_creator.h
blobde31ebd3547521418319ec74ac409a374196c3e2
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_
6 #define CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_
8 #include <string>
10 #include "base/callback_forward.h"
12 class GURL;
14 class PermissionRequestCreator {
15 public:
16 typedef base::Callback<void(bool)> SuccessCallback;
18 virtual ~PermissionRequestCreator() {}
20 // 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
22 // permission request will succeed, just that it's not known in advance
23 // to fail.
24 virtual bool IsEnabled() const = 0;
26 // Creates a permission request for |url_requested| and calls |callback| with
27 // the result (whether creating the permission request was successful).
28 virtual void CreateURLAccessRequest(const GURL& url_requested,
29 const SuccessCallback& callback) = 0;
31 // 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.
33 virtual void CreateExtensionUpdateRequest(
34 const std::string& id,
35 const SuccessCallback& callback) = 0;
38 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_