| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 class Profile; | 25 class Profile; |
| 26 | 26 |
| 27 namespace extensions { | 27 namespace extensions { |
| 28 | 28 |
| 29 class Extension; | 29 class Extension; |
| 30 | 30 |
| 31 namespace util { | 31 namespace util { |
| 32 | 32 |
| 33 // Returns true if |extension_id| can run in an incognito window. | |
| 34 bool IsIncognitoEnabled(const std::string& extension_id, | |
| 35 content::BrowserContext* context); | |
| 36 | |
| 37 // Sets whether |extension_id| can run in an incognito window. Reloads the | 33 // Sets whether |extension_id| can run in an incognito window. Reloads the |
| 38 // extension if it's enabled since this permission is applied at loading time | 34 // extension if it's enabled since this permission is applied at loading time |
| 39 // only. Note that an ExtensionService must exist. | 35 // only. Note that an ExtensionService must exist. |
| 40 void SetIsIncognitoEnabled(const std::string& extension_id, | 36 void SetIsIncognitoEnabled(const std::string& extension_id, |
| 41 content::BrowserContext* context, | 37 content::BrowserContext* context, |
| 42 bool enabled); | 38 bool enabled); |
| 43 | 39 |
| 44 // Returns true if |extension| can see events and data from another sub-profile | 40 // Returns true if |extension| can see events and data from another sub-profile |
| 45 // (incognito to original profile, or vice versa). | 41 // (incognito to original profile, or vice versa). |
| 46 bool CanCrossIncognito(const extensions::Extension* extension, | 42 bool CanCrossIncognito(const extensions::Extension* extension, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // open in window is stable on Mac. | 113 // open in window is stable on Mac. |
| 118 bool CanHostedAppsOpenInWindows(); | 114 bool CanHostedAppsOpenInWindows(); |
| 119 | 115 |
| 120 // Returns true for custodian-installed extensions in a supervised profile. | 116 // Returns true for custodian-installed extensions in a supervised profile. |
| 121 bool IsExtensionSupervised(const Extension* extension, Profile* profile); | 117 bool IsExtensionSupervised(const Extension* extension, Profile* profile); |
| 122 | 118 |
| 123 } // namespace util | 119 } // namespace util |
| 124 } // namespace extensions | 120 } // namespace extensions |
| 125 | 121 |
| 126 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 122 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| OLD | NEW |