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/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 // that the ResourceContext is ready. | 87 // that the ResourceContext is ready. |
88 static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 88 static void EnsureResourceContextInitialized(BrowserContext* browser_context); |
89 | 89 |
90 // Tells the HTML5 objects on this context to persist their session state | 90 // Tells the HTML5 objects on this context to persist their session state |
91 // across the next restart. | 91 // across the next restart. |
92 static void SaveSessionState(BrowserContext* browser_context); | 92 static void SaveSessionState(BrowserContext* browser_context); |
93 | 93 |
94 // Tells the HTML5 objects on this context to purge any uneeded memory. | 94 // Tells the HTML5 objects on this context to purge any uneeded memory. |
95 static void PurgeMemory(BrowserContext* browser_context); | 95 static void PurgeMemory(BrowserContext* browser_context); |
96 | 96 |
97 // Returns a Clipboard::SourceTag (pointer) if |context| is OffTheRecord | |
98 // context. Otherwise, NULL. If the clipboard contains that SourceTag at the | |
99 // time of |context| destruction it will be flushed. | |
100 static void* GetMarkerForOffTheRecordContext(BrowserContext* context); | |
Jói
2013/02/08 10:37:32
void* -> Clipboard::SourceTag (?)
vasilii
2013/02/08 12:37:12
This is my pending question to John. Introducing c
vasilii
2013/02/13 16:57:26
Done.
| |
101 | |
97 virtual ~BrowserContext(); | 102 virtual ~BrowserContext(); |
98 | 103 |
99 // Returns the path of the directory where this context's data is stored. | 104 // Returns the path of the directory where this context's data is stored. |
100 virtual base::FilePath GetPath() = 0; | 105 virtual base::FilePath GetPath() = 0; |
101 | 106 |
102 // Return whether this context is incognito. Default is false. | 107 // Return whether this context is incognito. Default is false. |
103 // This doesn't belong here; http://crbug.com/89628 | 108 // This doesn't belong here; http://crbug.com/89628 |
104 virtual bool IsOffTheRecord() const = 0; | 109 virtual bool IsOffTheRecord() const = 0; |
105 | 110 |
106 // Returns the request context information associated with this context. Call | 111 // Returns the request context information associated with this context. Call |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 struct hash<content::BrowserContext*> { | 169 struct hash<content::BrowserContext*> { |
165 std::size_t operator()(content::BrowserContext* const& p) const { | 170 std::size_t operator()(content::BrowserContext* const& p) const { |
166 return reinterpret_cast<std::size_t>(p); | 171 return reinterpret_cast<std::size_t>(p); |
167 } | 172 } |
168 }; | 173 }; |
169 | 174 |
170 } // namespace BASE_HASH_NAMESPACE | 175 } // namespace BASE_HASH_NAMESPACE |
171 #endif | 176 #endif |
172 | 177 |
173 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 178 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |