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

Unified 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: Compile failures 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b326acd131a788c5226fb4122a1ad1f8ad8b65ee
--- /dev/null
+++ b/chrome/browser/extensions/extension_util.h
@@ -0,0 +1,49 @@
+// 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);
+
+// Will reload the extension since this permission is applied at loading time
+// only.
+void SetIsIncognitoEnabled(const std::string& extension_id,
+ 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_
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698