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> |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 base::Time time, | 121 base::Time time, |
| 122 const base::Closure& completion) OVERRIDE; | 122 const base::Closure& completion) OVERRIDE; |
| 123 virtual GURL GetHomePage() OVERRIDE; | 123 virtual GURL GetHomePage() OVERRIDE; |
| 124 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; | 124 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; |
| 125 virtual void SetExitType(ExitType exit_type) OVERRIDE; | 125 virtual void SetExitType(ExitType exit_type) OVERRIDE; |
| 126 virtual ExitType GetLastSessionExitType() OVERRIDE; | 126 virtual ExitType GetLastSessionExitType() OVERRIDE; |
| 127 | 127 |
| 128 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
| 129 virtual void ChangeAppLocale(const std::string& locale, | 129 virtual void ChangeAppLocale(const std::string& locale, |
| 130 AppLocaleChangedVia) OVERRIDE; | 130 AppLocaleChangedVia) OVERRIDE; |
| 131 virtual void MarkCreated() OVERRIDE; | |
| 131 virtual void OnLogin() OVERRIDE; | 132 virtual void OnLogin() OVERRIDE; |
| 132 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE; | 133 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE; |
| 133 virtual void InitChromeOSPreferences() OVERRIDE; | 134 virtual void InitChromeOSPreferences() OVERRIDE; |
| 135 virtual void RespectLocalePreference() OVERRIDE; | |
| 136 virtual void SetGPlusProfileLocale(const std::string& gplus_locale) OVERRIDE; | |
| 134 #endif // defined(OS_CHROMEOS) | 137 #endif // defined(OS_CHROMEOS) |
| 135 | 138 |
| 136 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; | 139 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; |
| 137 | 140 |
| 138 private: | 141 private: |
| 139 friend class Profile; | 142 friend class Profile; |
| 140 friend class BetterSessionRestoreCrashTest; | 143 friend class BetterSessionRestoreCrashTest; |
| 141 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, | 144 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, |
| 142 ProfilesLaunchedAfterCrash); | 145 ProfilesLaunchedAfterCrash); |
| 143 FRIEND_TEST_ALL_PREFIXES(ProfileBrowserTest, ProfileReadmeCreated); | 146 FRIEND_TEST_ALL_PREFIXES(ProfileBrowserTest, ProfileReadmeCreated); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 | 186 |
| 184 void UpdateProfileUserNameCache(); | 187 void UpdateProfileUserNameCache(); |
| 185 | 188 |
| 186 // Updates the ProfileInfoCache with data from this profile. | 189 // Updates the ProfileInfoCache with data from this profile. |
| 187 void UpdateProfileNameCache(); | 190 void UpdateProfileNameCache(); |
| 188 void UpdateProfileAvatarCache(); | 191 void UpdateProfileAvatarCache(); |
| 189 | 192 |
| 190 void GetCacheParameters(bool is_media_context, | 193 void GetCacheParameters(bool is_media_context, |
| 191 base::FilePath* cache_path, | 194 base::FilePath* cache_path, |
| 192 int* max_size); | 195 int* max_size); |
| 196 #if defined(OS_CHROMEOS) | |
|
sail
2013/08/23 17:08:48
I really dislike adding new ifdefs to the code. Th
Alexander Alekseev
2013/09/06 19:52:08
Done.
| |
| 197 void ChangeAppLocaleWnenEmpty(const std::string& new_locale); | |
| 198 #endif | |
| 193 | 199 |
| 194 PrefProxyConfigTracker* CreateProxyConfigTracker(); | 200 PrefProxyConfigTracker* CreateProxyConfigTracker(); |
| 195 | 201 |
| 196 content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_; | 202 content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_; |
| 197 PrefChangeRegistrar pref_change_registrar_; | 203 PrefChangeRegistrar pref_change_registrar_; |
| 198 | 204 |
| 199 base::FilePath path_; | 205 base::FilePath path_; |
| 200 base::FilePath base_cache_path_; | 206 base::FilePath base_cache_path_; |
| 201 | 207 |
| 202 // !!! BIG HONKING WARNING !!! | 208 // !!! BIG HONKING WARNING !!! |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 | 249 |
| 244 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 250 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
| 245 | 251 |
| 246 #if defined(OS_CHROMEOS) | 252 #if defined(OS_CHROMEOS) |
| 247 scoped_ptr<chromeos::Preferences> chromeos_preferences_; | 253 scoped_ptr<chromeos::Preferences> chromeos_preferences_; |
| 248 | 254 |
| 249 scoped_ptr<chromeos::EnterpriseExtensionObserver> | 255 scoped_ptr<chromeos::EnterpriseExtensionObserver> |
| 250 chromeos_enterprise_extension_observer_; | 256 chromeos_enterprise_extension_observer_; |
| 251 | 257 |
| 252 scoped_ptr<chromeos::LocaleChangeGuard> locale_change_guard_; | 258 scoped_ptr<chromeos::LocaleChangeGuard> locale_change_guard_; |
| 259 | |
| 260 bool is_created_; | |
| 261 scoped_ptr<std::string> gplus_locale_; | |
| 253 #endif | 262 #endif |
| 254 | 263 |
| 255 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 264 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 256 | 265 |
| 257 // STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! | 266 // STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! |
| 258 // | 267 // |
| 259 // Instead, make your Service/Manager/whatever object you're hanging off the | 268 // Instead, make your Service/Manager/whatever object you're hanging off the |
| 260 // Profile use our new BrowserContextKeyedServiceFactory system instead. | 269 // Profile use our new BrowserContextKeyedServiceFactory system instead. |
| 261 // You can find the design document here: | 270 // You can find the design document here: |
| 262 // | 271 // |
| 263 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/p rofile-architecture | 272 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/p rofile-architecture |
| 264 // | 273 // |
| 265 // and you can read the raw headers here: | 274 // and you can read the raw headers here: |
| 266 // | 275 // |
| 267 // components/browser_context_keyed_service/browser_context_dependency_manag er.{h,cc} | 276 // components/browser_context_keyed_service/browser_context_dependency_manag er.{h,cc} |
| 268 // components/browser_context_keyed_service/browser_context_keyed_service.h | 277 // components/browser_context_keyed_service/browser_context_keyed_service.h |
| 269 // components/browser_context_keyed_service/browser_context_keyed_service_fa ctory.{h,cc} | 278 // components/browser_context_keyed_service/browser_context_keyed_service_fa ctory.{h,cc} |
| 270 | 279 |
| 271 Profile::Delegate* delegate_; | 280 Profile::Delegate* delegate_; |
| 272 | 281 |
| 273 chrome_browser_net::Predictor* predictor_; | 282 chrome_browser_net::Predictor* predictor_; |
| 274 | 283 |
| 275 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 284 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 276 }; | 285 }; |
| 277 | 286 |
| 278 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 287 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |