| 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/file_path.h" | 12 #include "base/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/prefs/public/pref_change_registrar.h" | 16 #include "base/prefs/public/pref_change_registrar.h" |
| 17 #include "base/timer.h" | 17 #include "base/timer.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_impl_io_data.h" | 19 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 20 #include "content/public/browser/host_zoom_map.h" |
| 20 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 22 | 23 |
| 23 class NetPrefObserver; | 24 class NetPrefObserver; |
| 24 class PrefServiceSyncable; | 25 class PrefServiceSyncable; |
| 25 class PrefServiceBase; | 26 class PrefServiceBase; |
| 26 class SSLConfigServiceManager; | 27 class SSLConfigServiceManager; |
| 27 | 28 |
| 28 #if defined(OS_CHROMEOS) | 29 #if defined(OS_CHROMEOS) |
| 29 namespace chromeos { | 30 namespace chromeos { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 44 namespace extensions { | 45 namespace extensions { |
| 45 class ExtensionSystem; | 46 class ExtensionSystem; |
| 46 } | 47 } |
| 47 | 48 |
| 48 namespace policy { | 49 namespace policy { |
| 49 class UserCloudPolicyManager; | 50 class UserCloudPolicyManager; |
| 50 } | 51 } |
| 51 | 52 |
| 52 // The default profile implementation. | 53 // The default profile implementation. |
| 53 class ProfileImpl : public Profile, | 54 class ProfileImpl : public Profile, |
| 55 public content::HostZoomMap::Observer, |
| 54 public content::NotificationObserver { | 56 public content::NotificationObserver { |
| 55 public: | 57 public: |
| 56 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. | 58 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. |
| 57 static const char* const kPrefExitTypeNormal; | 59 static const char* const kPrefExitTypeNormal; |
| 58 | 60 |
| 59 virtual ~ProfileImpl(); | 61 virtual ~ProfileImpl(); |
| 60 | 62 |
| 61 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 63 static void RegisterUserPrefs(PrefServiceSyncable* prefs); |
| 62 | 64 |
| 63 // content::BrowserContext implementation: | 65 // content::BrowserContext implementation: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 #if defined(OS_CHROMEOS) | 125 #if defined(OS_CHROMEOS) |
| 124 virtual void ChangeAppLocale(const std::string& locale, | 126 virtual void ChangeAppLocale(const std::string& locale, |
| 125 AppLocaleChangedVia) OVERRIDE; | 127 AppLocaleChangedVia) OVERRIDE; |
| 126 virtual void OnLogin() OVERRIDE; | 128 virtual void OnLogin() OVERRIDE; |
| 127 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE; | 129 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE; |
| 128 virtual void InitChromeOSPreferences() OVERRIDE; | 130 virtual void InitChromeOSPreferences() OVERRIDE; |
| 129 #endif // defined(OS_CHROMEOS) | 131 #endif // defined(OS_CHROMEOS) |
| 130 | 132 |
| 131 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; | 133 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; |
| 132 | 134 |
| 135 // content::HostZoomMap::Observer implementation: |
| 136 virtual void OnZoomLevelChanged(const std::string& host) OVERRIDE; |
| 137 |
| 133 // content::NotificationObserver implementation. | 138 // content::NotificationObserver implementation. |
| 134 virtual void Observe(int type, | 139 virtual void Observe(int type, |
| 135 const content::NotificationSource& source, | 140 const content::NotificationSource& source, |
| 136 const content::NotificationDetails& details) OVERRIDE; | 141 const content::NotificationDetails& details) OVERRIDE; |
| 137 | 142 |
| 138 private: | 143 private: |
| 139 friend class Profile; | 144 friend class Profile; |
| 140 friend class BetterSessionRestoreCrashTest; | 145 friend class BetterSessionRestoreCrashTest; |
| 141 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, | 146 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, |
| 142 ProfilesLaunchedAfterCrash); | 147 ProfilesLaunchedAfterCrash); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} | 275 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} |
| 271 | 276 |
| 272 Profile::Delegate* delegate_; | 277 Profile::Delegate* delegate_; |
| 273 | 278 |
| 274 chrome_browser_net::Predictor* predictor_; | 279 chrome_browser_net::Predictor* predictor_; |
| 275 | 280 |
| 276 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 281 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
| 277 }; | 282 }; |
| 278 | 283 |
| 279 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 284 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
| OLD | NEW |