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 EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // WARNING: This may create a new off-the-record context. To avoid creating | 81 // WARNING: This may create a new off-the-record context. To avoid creating |
82 // another context, check HasOffTheRecordContext() first. | 82 // another context, check HasOffTheRecordContext() first. |
83 virtual content::BrowserContext* GetOffTheRecordContext( | 83 virtual content::BrowserContext* GetOffTheRecordContext( |
84 content::BrowserContext* context) = 0; | 84 content::BrowserContext* context) = 0; |
85 | 85 |
86 // Returns the original "recording" context. This method returns |context| if | 86 // Returns the original "recording" context. This method returns |context| if |
87 // |context| is not incognito. | 87 // |context| is not incognito. |
88 virtual content::BrowserContext* GetOriginalContext( | 88 virtual content::BrowserContext* GetOriginalContext( |
89 content::BrowserContext* context) = 0; | 89 content::BrowserContext* context) = 0; |
90 | 90 |
| 91 #if defined(OS_CHROMEOS) |
| 92 // Returns a user id hash from |context| or an empty string if no hash could |
| 93 // be extracted. |
| 94 virtual std::string GetUserIdHashFromContext( |
| 95 content::BrowserContext* context) = 0; |
| 96 #endif |
| 97 |
91 // Returns true if |context| corresponds to a guest session. | 98 // Returns true if |context| corresponds to a guest session. |
92 virtual bool IsGuestSession(content::BrowserContext* context) const = 0; | 99 virtual bool IsGuestSession(content::BrowserContext* context) const = 0; |
93 | 100 |
94 // Returns true if |extension_id| can run in an incognito window. | 101 // Returns true if |extension_id| can run in an incognito window. |
95 virtual bool IsExtensionIncognitoEnabled( | 102 virtual bool IsExtensionIncognitoEnabled( |
96 const std::string& extension_id, | 103 const std::string& extension_id, |
97 content::BrowserContext* context) const = 0; | 104 content::BrowserContext* context) const = 0; |
98 | 105 |
99 // Returns true if |extension| can see events and data from another | 106 // Returns true if |extension| can see events and data from another |
100 // sub-profile (incognito to original profile, or vice versa). | 107 // sub-profile (incognito to original profile, or vice versa). |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // Returns the single instance of |this|. | 210 // Returns the single instance of |this|. |
204 static ExtensionsBrowserClient* Get(); | 211 static ExtensionsBrowserClient* Get(); |
205 | 212 |
206 // Initialize the single instance. | 213 // Initialize the single instance. |
207 static void Set(ExtensionsBrowserClient* client); | 214 static void Set(ExtensionsBrowserClient* client); |
208 }; | 215 }; |
209 | 216 |
210 } // namespace extensions | 217 } // namespace extensions |
211 | 218 |
212 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 219 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |