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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // time of |context| destruction it will be flushed. | 100 // time of |context| destruction it will be flushed. |
101 static ui::Clipboard::SourceTag GetMarkerForOffTheRecordContext( | 101 static ui::Clipboard::SourceTag GetMarkerForOffTheRecordContext( |
102 BrowserContext* context); | 102 BrowserContext* context); |
103 | 103 |
104 virtual ~BrowserContext(); | 104 virtual ~BrowserContext(); |
105 | 105 |
106 // Returns the path of the directory where this context's data is stored. | 106 // Returns the path of the directory where this context's data is stored. |
107 virtual base::FilePath GetPath() = 0; | 107 virtual base::FilePath GetPath() = 0; |
108 | 108 |
109 // Return whether this context is incognito. Default is false. | 109 // Return whether this context is incognito. Default is false. |
110 // This doesn't belong here; http://crbug.com/89628 | |
111 virtual bool IsOffTheRecord() const = 0; | 110 virtual bool IsOffTheRecord() const = 0; |
112 | 111 |
113 // Returns the request context information associated with this context. Call | 112 // Returns the request context information associated with this context. Call |
114 // this only on the UI thread, since it can send notifications that should | 113 // this only on the UI thread, since it can send notifications that should |
115 // happen on the UI thread. | 114 // happen on the UI thread. |
116 // TODO(creis): Remove this version in favor of the one below. | 115 // TODO(creis): Remove this version in favor of the one below. |
117 virtual net::URLRequestContextGetter* GetRequestContext() = 0; | 116 virtual net::URLRequestContextGetter* GetRequestContext() = 0; |
118 | 117 |
119 // Returns the request context appropriate for the given renderer. If the | 118 // Returns the request context appropriate for the given renderer. If the |
120 // renderer process doesn't have an associated installed app, or if the | 119 // renderer process doesn't have an associated installed app, or if the |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 struct hash<content::BrowserContext*> { | 166 struct hash<content::BrowserContext*> { |
168 std::size_t operator()(content::BrowserContext* const& p) const { | 167 std::size_t operator()(content::BrowserContext* const& p) const { |
169 return reinterpret_cast<std::size_t>(p); | 168 return reinterpret_cast<std::size_t>(p); |
170 } | 169 } |
171 }; | 170 }; |
172 | 171 |
173 } // namespace BASE_HASH_NAMESPACE | 172 } // namespace BASE_HASH_NAMESPACE |
174 #endif | 173 #endif |
175 | 174 |
176 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 175 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |