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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "components/domain_reliability/clear_mode.h" | 15 #include "components/domain_reliability/clear_mode.h" |
16 #include "content/public/browser/browser_context.h" | 16 #include "content/public/browser/browser_context.h" |
17 #include "content/public/browser/content_browser_client.h" | 17 #include "content/public/browser/content_browser_client.h" |
18 #include "net/url_request/url_request_job_factory.h" | |
19 | 18 |
20 class ChromeAppCacheService; | 19 class ChromeAppCacheService; |
21 class ExtensionService; | 20 class ExtensionService; |
22 class ExtensionSpecialStoragePolicy; | 21 class ExtensionSpecialStoragePolicy; |
23 class FaviconService; | 22 class FaviconService; |
24 class HostContentSettingsMap; | 23 class HostContentSettingsMap; |
25 class PrefProxyConfigTracker; | 24 class PrefProxyConfigTracker; |
26 class PrefService; | 25 class PrefService; |
27 class PromoCounter; | 26 class PromoCounter; |
28 class ProtocolHandlerRegistry; | 27 class ProtocolHandlerRegistry; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 257 |
259 // Creates the main net::URLRequestContextGetter that will be returned by | 258 // Creates the main net::URLRequestContextGetter that will be returned by |
260 // GetRequestContext(). Should only be called once per ContentBrowserClient | 259 // GetRequestContext(). Should only be called once per ContentBrowserClient |
261 // object. This function is exposed because of the circular dependency where | 260 // object. This function is exposed because of the circular dependency where |
262 // GetStoragePartition() is used to retrieve the request context, but creation | 261 // GetStoragePartition() is used to retrieve the request context, but creation |
263 // still has to happen in the Profile so the StoragePartition calls | 262 // still has to happen in the Profile so the StoragePartition calls |
264 // ContextBrowserClient to call this function. | 263 // ContextBrowserClient to call this function. |
265 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | 264 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
266 virtual net::URLRequestContextGetter* CreateRequestContext( | 265 virtual net::URLRequestContextGetter* CreateRequestContext( |
267 content::ProtocolHandlerMap* protocol_handlers, | 266 content::ProtocolHandlerMap* protocol_handlers, |
268 content::ProtocolHandlerScopedVector protocol_interceptors) = 0; | 267 content::URLRequestInterceptorScopedVector request_interceptors) = 0; |
269 | 268 |
270 // Creates the net::URLRequestContextGetter for a StoragePartition. Should | 269 // Creates the net::URLRequestContextGetter for a StoragePartition. Should |
271 // only be called once per partition_path per ContentBrowserClient object. | 270 // only be called once per partition_path per ContentBrowserClient object. |
272 // This function is exposed because the request context is retrieved from the | 271 // This function is exposed because the request context is retrieved from the |
273 // StoragePartition, but creation still has to happen in the Profile so the | 272 // StoragePartition, but creation still has to happen in the Profile so the |
274 // StoragePartition calls ContextBrowserClient to call this function. | 273 // StoragePartition calls ContextBrowserClient to call this function. |
275 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | 274 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
276 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 275 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
277 const base::FilePath& partition_path, | 276 const base::FilePath& partition_path, |
278 bool in_memory, | 277 bool in_memory, |
279 content::ProtocolHandlerMap* protocol_handlers, | 278 content::ProtocolHandlerMap* protocol_handlers, |
280 content::ProtocolHandlerScopedVector protocol_interceptors) = 0; | 279 content::URLRequestInterceptorScopedVector request_interceptors) = 0; |
281 | 280 |
282 // Returns the last directory that was chosen for uploading or opening a file. | 281 // Returns the last directory that was chosen for uploading or opening a file. |
283 virtual base::FilePath last_selected_directory() = 0; | 282 virtual base::FilePath last_selected_directory() = 0; |
284 virtual void set_last_selected_directory(const base::FilePath& path) = 0; | 283 virtual void set_last_selected_directory(const base::FilePath& path) = 0; |
285 | 284 |
286 #if defined(OS_CHROMEOS) | 285 #if defined(OS_CHROMEOS) |
287 enum AppLocaleChangedVia { | 286 enum AppLocaleChangedVia { |
288 // Caused by chrome://settings change. | 287 // Caused by chrome://settings change. |
289 APP_LOCALE_CHANGED_VIA_SETTINGS, | 288 APP_LOCALE_CHANGED_VIA_SETTINGS, |
290 // Locale has been reverted via LocaleChangeGuard. | 289 // Locale has been reverted via LocaleChangeGuard. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 struct hash<Profile*> { | 420 struct hash<Profile*> { |
422 std::size_t operator()(Profile* const& p) const { | 421 std::size_t operator()(Profile* const& p) const { |
423 return reinterpret_cast<std::size_t>(p); | 422 return reinterpret_cast<std::size_t>(p); |
424 } | 423 } |
425 }; | 424 }; |
426 | 425 |
427 } // namespace BASE_HASH_NAMESPACE | 426 } // namespace BASE_HASH_NAMESPACE |
428 #endif | 427 #endif |
429 | 428 |
430 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 429 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |