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"
14 namespace extensions
{
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::RenderViewHost
* host
);
26 } // namespace extensions
28 #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_