| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
| 9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // ref counted class, so callers should take a reference if needed. It's valid | 116 // ref counted class, so callers should take a reference if needed. It's valid |
| 117 // to return NULL. | 117 // to return NULL. |
| 118 virtual SpeechRecognitionPreferences* GetSpeechRecognitionPreferences() = 0; | 118 virtual SpeechRecognitionPreferences* GetSpeechRecognitionPreferences() = 0; |
| 119 | 119 |
| 120 // Returns true if the last time this context was open it was exited cleanly. | 120 // Returns true if the last time this context was open it was exited cleanly. |
| 121 // This doesn't belong here; http://crbug.com/90737 | 121 // This doesn't belong here; http://crbug.com/90737 |
| 122 virtual bool DidLastSessionExitCleanly() = 0; | 122 virtual bool DidLastSessionExitCleanly() = 0; |
| 123 | 123 |
| 124 // Returns a special storage policy implementation, or NULL. | 124 // Returns a special storage policy implementation, or NULL. |
| 125 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0; | 125 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0; |
| 126 |
| 127 // Returns true if sessionStorage should be saved on disk. If |IsOffTheRecord| |
| 128 // is true, it won't be saved even if this returns true. |
| 129 virtual bool ShouldSaveSessionStorageOnDisk() const; |
| 126 }; | 130 }; |
| 127 | 131 |
| 128 } // namespace content | 132 } // namespace content |
| 129 | 133 |
| 130 #if defined(COMPILER_GCC) | 134 #if defined(COMPILER_GCC) |
| 131 namespace BASE_HASH_NAMESPACE { | 135 namespace BASE_HASH_NAMESPACE { |
| 132 | 136 |
| 133 template<> | 137 template<> |
| 134 struct hash<content::BrowserContext*> { | 138 struct hash<content::BrowserContext*> { |
| 135 std::size_t operator()(content::BrowserContext* const& p) const { | 139 std::size_t operator()(content::BrowserContext* const& p) const { |
| 136 return reinterpret_cast<std::size_t>(p); | 140 return reinterpret_cast<std::size_t>(p); |
| 137 } | 141 } |
| 138 }; | 142 }; |
| 139 | 143 |
| 140 } // namespace BASE_HASH_NAMESPACE | 144 } // namespace BASE_HASH_NAMESPACE |
| 141 #endif | 145 #endif |
| 142 | 146 |
| 143 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 147 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |