| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_CONTEXT_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_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 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class WebKitContext; | 34 class WebKitContext; |
| 35 | 35 |
| 36 namespace content { | 36 namespace content { |
| 37 | 37 |
| 38 class ResourceContext; | 38 class ResourceContext; |
| 39 | 39 |
| 40 // This class holds the context needed for a browsing session. | 40 // This class holds the context needed for a browsing session. |
| 41 // It lives on the UI thread. | 41 // It lives on the UI thread. |
| 42 class BrowserContext { | 42 class BrowserContext { |
| 43 public: | 43 public: |
| 44 virtual ~BrowserContext() {}; |
| 45 |
| 44 // Returns the path of the directory where this context's data is stored. | 46 // Returns the path of the directory where this context's data is stored. |
| 45 virtual FilePath GetPath() = 0; | 47 virtual FilePath GetPath() = 0; |
| 46 | 48 |
| 47 // Return whether this context is incognito. Default is false. | 49 // Return whether this context is incognito. Default is false. |
| 48 // This doesn't belong here; http://crbug.com/89628 | 50 // This doesn't belong here; http://crbug.com/89628 |
| 49 virtual bool IsOffTheRecord() = 0; | 51 virtual bool IsOffTheRecord() = 0; |
| 50 | 52 |
| 51 // Retrieves a pointer to the SSLHostState associated with this context. | 53 // Retrieves a pointer to the SSLHostState associated with this context. |
| 52 // The SSLHostState is lazily created the first time that this method is | 54 // The SSLHostState is lazily created the first time that this method is |
| 53 // called. | 55 // called. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 struct hash<content::BrowserContext*> { | 109 struct hash<content::BrowserContext*> { |
| 108 std::size_t operator()(content::BrowserContext* const& p) const { | 110 std::size_t operator()(content::BrowserContext* const& p) const { |
| 109 return reinterpret_cast<std::size_t>(p); | 111 return reinterpret_cast<std::size_t>(p); |
| 110 } | 112 } |
| 111 }; | 113 }; |
| 112 | 114 |
| 113 } // namespace __gnu_cxx | 115 } // namespace __gnu_cxx |
| 114 #endif | 116 #endif |
| 115 | 117 |
| 116 #endif // CONTENT_BROWSER_BROWSER_CONTEXT_H_ | 118 #endif // CONTENT_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |