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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Tells the HTML5 objects on this context to purge any uneeded memory. | 74 // Tells the HTML5 objects on this context to purge any uneeded memory. |
75 static void PurgeMemory(BrowserContext* browser_context); | 75 static void PurgeMemory(BrowserContext* browser_context); |
76 | 76 |
77 virtual ~BrowserContext(); | 77 virtual ~BrowserContext(); |
78 | 78 |
79 // Returns the path of the directory where this context's data is stored. | 79 // Returns the path of the directory where this context's data is stored. |
80 virtual FilePath GetPath() = 0; | 80 virtual FilePath GetPath() = 0; |
81 | 81 |
82 // Return whether this context is incognito. Default is false. | 82 // Return whether this context is incognito. Default is false. |
83 // This doesn't belong here; http://crbug.com/89628 | 83 // This doesn't belong here; http://crbug.com/89628 |
84 virtual bool IsOffTheRecord() = 0; | 84 virtual bool IsOffTheRecord() const = 0; |
85 | 85 |
86 // Returns the DownloadManager associated with this context. | 86 // Returns the DownloadManager associated with this context. |
87 virtual content::DownloadManager* GetDownloadManager() = 0; | 87 virtual content::DownloadManager* GetDownloadManager() = 0; |
88 | 88 |
89 // Returns the request context information associated with this context. Call | 89 // Returns the request context information associated with this context. Call |
90 // this only on the UI thread, since it can send notifications that should | 90 // this only on the UI thread, since it can send notifications that should |
91 // happen on the UI thread. | 91 // happen on the UI thread. |
92 virtual net::URLRequestContextGetter* GetRequestContext() = 0; | 92 virtual net::URLRequestContextGetter* GetRequestContext() = 0; |
93 | 93 |
94 // Returns the request context appropriate for the given renderer. If the | 94 // Returns the request context appropriate for the given renderer. If the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 struct hash<content::BrowserContext*> { | 131 struct hash<content::BrowserContext*> { |
132 std::size_t operator()(content::BrowserContext* const& p) const { | 132 std::size_t operator()(content::BrowserContext* const& p) const { |
133 return reinterpret_cast<std::size_t>(p); | 133 return reinterpret_cast<std::size_t>(p); |
134 } | 134 } |
135 }; | 135 }; |
136 | 136 |
137 } // namespace BASE_HASH_NAMESPACE | 137 } // namespace BASE_HASH_NAMESPACE |
138 #endif | 138 #endif |
139 | 139 |
140 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 140 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |