Durable Storage: Refactor browser test and test the basic "deny" flow.
[chromium-blink-merge.git] / extensions / browser / suggest_permission_util.h
blob512aaf270759f21f16e3bd00a7d1a36db64472b2
1 // Copyright (c) 2012 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 EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
6 #define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
8 #include "extensions/common/permissions/api_permission.h"
10 namespace content {
11 class RenderFrameHost;
14 namespace extensions {
16 class Extension;
18 // Checks that |extension| is not NULL and that it has |permission|. If
19 // |extension| is NULL, just returns false. If an extension without |permission|
20 // returns false and suggests |permision| in the developer tools console.
21 bool IsExtensionWithPermissionOrSuggestInConsole(
22 APIPermission::ID permission,
23 const Extension* extension,
24 content::RenderFrameHost* render_frame_host);
26 } // namespace extensions
28 #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_