Chromium Code Reviews| 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 // Returns a consistent unqiue Id hash for |context|. | |
|
Daniel Erat
2015/01/23 23:24:29
nit: s/unqiue/unique/ (super-nit: s/Id/ID/)
| |
| 92 virtual std::string GetUserIdHashFromContext( | |
| 93 content::BrowserContext* context) = 0; | |
| 94 | |
| 91 // Returns true if |context| corresponds to a guest session. | 95 // Returns true if |context| corresponds to a guest session. |
| 92 virtual bool IsGuestSession(content::BrowserContext* context) const = 0; | 96 virtual bool IsGuestSession(content::BrowserContext* context) const = 0; |
| 93 | 97 |
| 94 // Returns true if |extension_id| can run in an incognito window. | 98 // Returns true if |extension_id| can run in an incognito window. |
| 95 virtual bool IsExtensionIncognitoEnabled( | 99 virtual bool IsExtensionIncognitoEnabled( |
| 96 const std::string& extension_id, | 100 const std::string& extension_id, |
| 97 content::BrowserContext* context) const = 0; | 101 content::BrowserContext* context) const = 0; |
| 98 | 102 |
| 99 // Returns true if |extension| can see events and data from another | 103 // Returns true if |extension| can see events and data from another |
| 100 // sub-profile (incognito to original profile, or vice versa). | 104 // 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|. | 207 // Returns the single instance of |this|. |
| 204 static ExtensionsBrowserClient* Get(); | 208 static ExtensionsBrowserClient* Get(); |
| 205 | 209 |
| 206 // Initialize the single instance. | 210 // Initialize the single instance. |
| 207 static void Set(ExtensionsBrowserClient* client); | 211 static void Set(ExtensionsBrowserClient* client); |
| 208 }; | 212 }; |
| 209 | 213 |
| 210 } // namespace extensions | 214 } // namespace extensions |
| 211 | 215 |
| 212 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 216 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |