Chromium Code Reviews| Index: chrome/browser/extensions/extension_util.h |
| diff --git a/chrome/browser/extensions/extension_util.h b/chrome/browser/extensions/extension_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c19f4533dabcf535ec5019d0042d592c7926084e |
| --- /dev/null |
| +++ b/chrome/browser/extensions/extension_util.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| + |
| +#include <string> |
| + |
| +namespace extensions { |
| +class Extension; |
| +} |
| + |
| +class ExtensionService; |
| + |
| +namespace extension_util { |
| + |
| +// Whether this extension can run in an incognito window. |
| +bool IsIncognitoEnabled(const std::string& extension_id, |
| + const ExtensionService* service); |
| +void SetIsIncognitoEnabled(const std::string& extension_id, |
|
Yoyo Zhou
2013/10/15 21:25:49
Add a comment that this will reload the extension
benwells
2013/10/17 06:56:55
Done.
|
| + ExtensionService* service, |
| + bool enabled); |
| + |
| +// Returns true if the given extension can see events and data from another |
| +// sub-profile (incognito to original profile, or vice versa). |
| +bool CanCrossIncognito(const extensions::Extension* extension, |
| + const ExtensionService* service); |
| + |
| +// Returns true if the given extension can be loaded in incognito. |
| +bool CanLoadInIncognito(const extensions::Extension* extension, |
| + const ExtensionService* service); |
| + |
| +// Whether this extension can inject scripts into pages with file URLs. |
| +bool AllowFileAccess(const extensions::Extension* extension, |
| + const ExtensionService* service); |
| + |
| +// Will reload the extension since this permission is applied at loading time |
| +// only. |
| +void SetAllowFileAccess(const extensions::Extension* extension, |
| + ExtensionService* service, |
| + bool allow); |
| + |
| +} // namespace extension_util |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |