Add more checks to investigate SupervisedUserPrefStore crash at startup.
[chromium-blink-merge.git] / chrome / browser / supervised_user / permission_request_creator.h
blob6237431fd7cabe201a75d6dbc192f0d4011f172b
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 "base/callback_forward.h"
10 class GURL;
12 class PermissionRequestCreator {
13 public:
14 typedef base::Callback<void(bool)> SuccessCallback;
16 virtual ~PermissionRequestCreator() {}
18 // 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
20 // permission request will succeed, just that it's not known in advance
21 // to fail.
22 virtual bool IsEnabled() const = 0;
24 // Creates a permission request for |url_requested| and calls |callback| with
25 // the result (whether creating the permission request was successful).
26 virtual void CreatePermissionRequest(const GURL& url_requested,
27 const SuccessCallback& callback) = 0;
30 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_