| 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_IMPL_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/profiles/profile_impl_io_data.h" | 20 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" | 21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
| 22 #include "chrome/common/features.h" | 22 #include "chrome/common/features.h" |
| 23 #include "components/prefs/pref_change_registrar.h" | 23 #include "components/prefs/pref_change_registrar.h" |
| 24 #include "content/public/browser/content_browser_client.h" | 24 #include "content/public/browser/content_browser_client.h" |
| 25 #include "content/public/browser/host_zoom_map.h" | 25 #include "content/public/browser/host_zoom_map.h" |
| 26 #include "extensions/features/features.h" | 26 #include "extensions/features/features.h" |
| 27 | 27 |
| 28 class MediaDeviceIDSalt; |
| 28 class PrefService; | 29 class PrefService; |
| 29 | 30 |
| 30 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
| 31 namespace chromeos { | 32 namespace chromeos { |
| 32 class KioskTest; | 33 class KioskTest; |
| 33 class LocaleChangeGuard; | 34 class LocaleChangeGuard; |
| 34 class Preferences; | 35 class Preferences; |
| 35 class SupervisedUserTestBase; | 36 class SupervisedUserTestBase; |
| 36 } | 37 } |
| 37 #endif | 38 #endif |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 91 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 91 const base::FilePath& partition_path, | 92 const base::FilePath& partition_path, |
| 92 bool in_memory, | 93 bool in_memory, |
| 93 content::ProtocolHandlerMap* protocol_handlers, | 94 content::ProtocolHandlerMap* protocol_handlers, |
| 94 content::URLRequestInterceptorScopedVector request_interceptors) override; | 95 content::URLRequestInterceptorScopedVector request_interceptors) override; |
| 95 net::URLRequestContextGetter* CreateMediaRequestContext() override; | 96 net::URLRequestContextGetter* CreateMediaRequestContext() override; |
| 96 net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition( | 97 net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition( |
| 97 const base::FilePath& partition_path, | 98 const base::FilePath& partition_path, |
| 98 bool in_memory) override; | 99 bool in_memory) override; |
| 99 void RegisterInProcessServices(StaticServiceMap* services) override; | 100 void RegisterInProcessServices(StaticServiceMap* services) override; |
| 101 std::string GetMediaDeviceIDSalt() override; |
| 100 | 102 |
| 101 // Profile implementation: | 103 // Profile implementation: |
| 102 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; | 104 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; |
| 103 // Note that this implementation returns the Google-services username, if any, | 105 // Note that this implementation returns the Google-services username, if any, |
| 104 // not the Chrome user's display name. | 106 // not the Chrome user's display name. |
| 105 std::string GetProfileUserName() const override; | 107 std::string GetProfileUserName() const override; |
| 106 ProfileType GetProfileType() const override; | 108 ProfileType GetProfileType() const override; |
| 107 bool IsOffTheRecord() const override; | 109 bool IsOffTheRecord() const override; |
| 108 Profile* GetOffTheRecordProfile() override; | 110 Profile* GetOffTheRecordProfile() override; |
| 109 void DestroyOffTheRecordProfile() override; | 111 void DestroyOffTheRecordProfile() override; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 base::Time start_time_; | 246 base::Time start_time_; |
| 245 | 247 |
| 246 #if defined(OS_CHROMEOS) | 248 #if defined(OS_CHROMEOS) |
| 247 std::unique_ptr<chromeos::Preferences> chromeos_preferences_; | 249 std::unique_ptr<chromeos::Preferences> chromeos_preferences_; |
| 248 | 250 |
| 249 std::unique_ptr<chromeos::LocaleChangeGuard> locale_change_guard_; | 251 std::unique_ptr<chromeos::LocaleChangeGuard> locale_change_guard_; |
| 250 #endif | 252 #endif |
| 251 | 253 |
| 252 std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 254 std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 253 | 255 |
| 256 // TODO(mmenke): This should be removed from the Profile, and use a |
| 257 // BrowserContextKeyedService instead. |
| 258 // See https://crbug.com/713733 |
| 259 scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_; |
| 260 |
| 254 // STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! | 261 // STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! |
| 255 // | 262 // |
| 256 // Instead, make your Service/Manager/whatever object you're hanging off the | 263 // Instead, make your Service/Manager/whatever object you're hanging off the |
| 257 // Profile use our new BrowserContextKeyedServiceFactory system instead. | 264 // Profile use our new BrowserContextKeyedServiceFactory system instead. |
| 258 // You can find the design document here: | 265 // You can find the design document here: |
| 259 // | 266 // |
| 260 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/p
rofile-architecture | 267 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/p
rofile-architecture |
| 261 // | 268 // |
| 262 // and you can read the raw headers here: | 269 // and you can read the raw headers here: |
| 263 // | 270 // |
| 264 // components/keyed_service/content/browser_context_dependency_manager.* | 271 // components/keyed_service/content/browser_context_dependency_manager.* |
| 265 // components/keyed_service/core/keyed_service.h | 272 // components/keyed_service/core/keyed_service.h |
| 266 // components/keyed_service/content/browser_context_keyed_service_factory.* | 273 // components/keyed_service/content/browser_context_keyed_service_factory.* |
| 267 | 274 |
| 268 Profile::Delegate* delegate_; | 275 Profile::Delegate* delegate_; |
| 269 | 276 |
| 270 chrome_browser_net::Predictor* predictor_; | 277 chrome_browser_net::Predictor* predictor_; |
| 271 | 278 |
| 272 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 279 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 273 }; | 280 }; |
| 274 | 281 |
| 275 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 282 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |