Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/extensions/extension_util.h

Issue 25366003: Moved some functions off ExtensionService into a new file extension_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows compile Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
7
8 #include <string>
9
10 namespace extensions {
11 class Extension;
12 }
13
14 class ExtensionService;
15
16 namespace extension_util {
17
18 // Whether this extension can run in an incognito window.
19 bool IsIncognitoEnabled(const std::string& extension_id,
20 const ExtensionService* service);
21 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.
22 ExtensionService* service,
23 bool enabled);
24
25 // Returns true if the given extension can see events and data from another
26 // sub-profile (incognito to original profile, or vice versa).
27 bool CanCrossIncognito(const extensions::Extension* extension,
28 const ExtensionService* service);
29
30 // Returns true if the given extension can be loaded in incognito.
31 bool CanLoadInIncognito(const extensions::Extension* extension,
32 const ExtensionService* service);
33
34 // Whether this extension can inject scripts into pages with file URLs.
35 bool AllowFileAccess(const extensions::Extension* extension,
36 const ExtensionService* service);
37
38 // Will reload the extension since this permission is applied at loading time
39 // only.
40 void SetAllowFileAccess(const extensions::Extension* extension,
41 ExtensionService* service,
42 bool allow);
43
44 } // namespace extension_util
45
46 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698