| 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/hash_tables.h" | 13 #include "base/hash_tables.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 15 #include "chrome/browser/net/pref_proxy_config_tracker.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 "net/url_request/url_request_job_factory.h" | 18 #include "net/url_request/url_request_job_factory.h" |
| 18 | 19 |
| 19 class ChromeAppCacheService; | 20 class ChromeAppCacheService; |
| 20 class ExtensionService; | 21 class ExtensionService; |
| 21 class ExtensionSpecialStoragePolicy; | 22 class ExtensionSpecialStoragePolicy; |
| 22 class FaviconService; | 23 class FaviconService; |
| 23 class HostContentSettingsMap; | 24 class HostContentSettingsMap; |
| 24 class PasswordStore; | 25 class PasswordStore; |
| 25 class PrefRegistrySyncable; | 26 class PrefRegistrySyncable; |
| 26 class PromoCounter; | 27 class PromoCounter; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 virtual base::Time GetStartTime() const = 0; | 249 virtual base::Time GetStartTime() const = 0; |
| 249 | 250 |
| 250 // Creates the main net::URLRequestContextGetter that will be returned by | 251 // Creates the main net::URLRequestContextGetter that will be returned by |
| 251 // GetRequestContext(). Should only be called once per ContentBrowserClient | 252 // GetRequestContext(). Should only be called once per ContentBrowserClient |
| 252 // object. This function is exposed because of the circular dependency where | 253 // object. This function is exposed because of the circular dependency where |
| 253 // GetStoragePartition() is used to retrieve the request context, but creation | 254 // GetStoragePartition() is used to retrieve the request context, but creation |
| 254 // still has to happen in the Profile so the StoragePartition calls | 255 // still has to happen in the Profile so the StoragePartition calls |
| 255 // ContextBrowserClient to call this function. | 256 // ContextBrowserClient to call this function. |
| 256 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | 257 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
| 257 virtual net::URLRequestContextGetter* CreateRequestContext( | 258 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 258 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 259 content::ProtocolHandlerMap* protocol_handlers) = 0; |
| 259 blob_protocol_handler, | |
| 260 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 261 file_system_protocol_handler, | |
| 262 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 263 developer_protocol_handler, | |
| 264 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 265 chrome_protocol_handler, | |
| 266 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 267 chrome_devtools_protocol_handler) = 0; | |
| 268 | 260 |
| 269 // Creates the net::URLRequestContextGetter for a StoragePartition. Should | 261 // Creates the net::URLRequestContextGetter for a StoragePartition. Should |
| 270 // only be called once per partition_path per ContentBrowserClient object. | 262 // only be called once per partition_path per ContentBrowserClient object. |
| 271 // This function is exposed because the request context is retrieved from the | 263 // This function is exposed because the request context is retrieved from the |
| 272 // StoragePartition, but creation still has to happen in the Profile so the | 264 // StoragePartition, but creation still has to happen in the Profile so the |
| 273 // StoragePartition calls ContextBrowserClient to call this function. | 265 // StoragePartition calls ContextBrowserClient to call this function. |
| 274 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | 266 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
| 275 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 267 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 276 const base::FilePath& partition_path, | 268 const base::FilePath& partition_path, |
| 277 bool in_memory, | 269 bool in_memory, |
| 278 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 270 content::ProtocolHandlerMap* protocol_handlers) = 0; |
| 279 blob_protocol_handler, | |
| 280 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 281 file_system_protocol_handler, | |
| 282 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 283 developer_protocol_handler, | |
| 284 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 285 chrome_protocol_handler, | |
| 286 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 287 chrome_devtools_protocol_handler) = 0; | |
| 288 | 271 |
| 289 // Returns the last directory that was chosen for uploading or opening a file. | 272 // Returns the last directory that was chosen for uploading or opening a file. |
| 290 virtual base::FilePath last_selected_directory() = 0; | 273 virtual base::FilePath last_selected_directory() = 0; |
| 291 virtual void set_last_selected_directory(const base::FilePath& path) = 0; | 274 virtual void set_last_selected_directory(const base::FilePath& path) = 0; |
| 292 | 275 |
| 293 #if defined(OS_CHROMEOS) | 276 #if defined(OS_CHROMEOS) |
| 294 enum AppLocaleChangedVia { | 277 enum AppLocaleChangedVia { |
| 295 // Caused by chrome://settings change. | 278 // Caused by chrome://settings change. |
| 296 APP_LOCALE_CHANGED_VIA_SETTINGS, | 279 APP_LOCALE_CHANGED_VIA_SETTINGS, |
| 297 // Locale has been reverted via LocaleChangeGuard. | 280 // Locale has been reverted via LocaleChangeGuard. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 struct hash<Profile*> { | 402 struct hash<Profile*> { |
| 420 std::size_t operator()(Profile* const& p) const { | 403 std::size_t operator()(Profile* const& p) const { |
| 421 return reinterpret_cast<std::size_t>(p); | 404 return reinterpret_cast<std::size_t>(p); |
| 422 } | 405 } |
| 423 }; | 406 }; |
| 424 | 407 |
| 425 } // namespace BASE_HASH_NAMESPACE | 408 } // namespace BASE_HASH_NAMESPACE |
| 426 #endif | 409 #endif |
| 427 | 410 |
| 428 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 411 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |