Chromium Code Reviews| 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 <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | |
| 16 #include "base/prefs/pref_change_registrar.h" | 17 #include "base/prefs/pref_change_registrar.h" |
| 17 #include "base/timer.h" | 18 #include "base/timer.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_impl_io_data.h" | 20 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 20 #include "content/public/browser/content_browser_client.h" | 21 #include "content/public/browser/content_browser_client.h" |
| 21 #include "content/public/browser/host_zoom_map.h" | 22 #include "content/public/browser/host_zoom_map.h" |
| 22 | 23 |
| 23 class NetPrefObserver; | 24 class NetPrefObserver; |
| 24 class PrefService; | 25 class PrefService; |
| 25 class PrefServiceSyncable; | 26 class PrefServiceSyncable; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 void OnPrefsLoaded(bool success); | 168 void OnPrefsLoaded(bool success); |
| 168 | 169 |
| 169 base::FilePath GetPrefFilePath(); | 170 base::FilePath GetPrefFilePath(); |
| 170 | 171 |
| 171 #if defined(ENABLE_SESSION_SERVICE) | 172 #if defined(ENABLE_SESSION_SERVICE) |
| 172 void StopCreateSessionServiceTimer(); | 173 void StopCreateSessionServiceTimer(); |
| 173 | 174 |
| 174 void EnsureSessionServiceCreated(); | 175 void EnsureSessionServiceCreated(); |
| 175 #endif | 176 #endif |
| 176 | 177 |
| 178 // Updates the icon file for this profile if the icon version in the prefs is | |
| 179 // out of date. | |
| 180 void UpdateProfileIconIfNecessary(); | |
| 181 // Sets the icon version in the prefs on successful icon creation. | |
|
Alexei Svitkine (slow)
2013/06/10 17:44:52
Nit: Blank line before the coment.
calamity
2013/06/13 06:26:03
Done.
| |
| 182 void OnProfileIconCreateSuccess(); | |
| 177 | 183 |
| 178 void EnsureRequestContextCreated() { | 184 void EnsureRequestContextCreated() { |
| 179 GetRequestContext(); | 185 GetRequestContext(); |
| 180 } | 186 } |
| 181 | 187 |
| 182 void UpdateProfileUserNameCache(); | 188 void UpdateProfileUserNameCache(); |
| 183 | 189 |
| 184 // Updates the ProfileInfoCache with data from this profile. | 190 // Updates the ProfileInfoCache with data from this profile. |
| 185 void UpdateProfileNameCache(); | 191 void UpdateProfileNameCache(); |
| 186 void UpdateProfileAvatarCache(); | 192 void UpdateProfileAvatarCache(); |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 217 scoped_ptr<PrefServiceSyncable> prefs_; | 223 scoped_ptr<PrefServiceSyncable> prefs_; |
| 218 scoped_ptr<PrefServiceSyncable> otr_prefs_; | 224 scoped_ptr<PrefServiceSyncable> otr_prefs_; |
| 219 ProfileImplIOData::Handle io_data_; | 225 ProfileImplIOData::Handle io_data_; |
| 220 scoped_refptr<ExtensionSpecialStoragePolicy> | 226 scoped_refptr<ExtensionSpecialStoragePolicy> |
| 221 extension_special_storage_policy_; | 227 extension_special_storage_policy_; |
| 222 scoped_ptr<NetPrefObserver> net_pref_observer_; | 228 scoped_ptr<NetPrefObserver> net_pref_observer_; |
| 223 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; | 229 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
| 224 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 230 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 225 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; | 231 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; |
| 226 | 232 |
| 233 base::WeakPtrFactory<ProfileImpl> weak_ptr_factory_; | |
| 234 | |
| 227 // Exit type the last time the profile was opened. This is set only once from | 235 // Exit type the last time the profile was opened. This is set only once from |
| 228 // prefs. | 236 // prefs. |
| 229 ExitType last_session_exit_type_; | 237 ExitType last_session_exit_type_; |
| 230 | 238 |
| 231 #if defined(ENABLE_SESSION_SERVICE) | 239 #if defined(ENABLE_SESSION_SERVICE) |
| 232 base::OneShotTimer<ProfileImpl> create_session_service_timer_; | 240 base::OneShotTimer<ProfileImpl> create_session_service_timer_; |
| 233 #endif | 241 #endif |
| 234 | 242 |
| 235 scoped_ptr<Profile> off_the_record_profile_; | 243 scoped_ptr<Profile> off_the_record_profile_; |
| 236 | 244 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 265 // components/browser_context_keyed_service/browser_context_keyed_service_fa ctory.{h,cc} | 273 // components/browser_context_keyed_service/browser_context_keyed_service_fa ctory.{h,cc} |
| 266 | 274 |
| 267 Profile::Delegate* delegate_; | 275 Profile::Delegate* delegate_; |
| 268 | 276 |
| 269 chrome_browser_net::Predictor* predictor_; | 277 chrome_browser_net::Predictor* predictor_; |
| 270 | 278 |
| 271 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 279 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 272 }; | 280 }; |
| 273 | 281 |
| 274 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 282 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |