| 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> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // Typesafe upcast. | 147 // Typesafe upcast. |
| 148 virtual TestingProfile* AsTestingProfile(); | 148 virtual TestingProfile* AsTestingProfile(); |
| 149 | 149 |
| 150 // Returns sequenced task runner where browser context dependent I/O | 150 // Returns sequenced task runner where browser context dependent I/O |
| 151 // operations should be performed. | 151 // operations should be performed. |
| 152 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() = 0; | 152 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() = 0; |
| 153 | 153 |
| 154 // Returns the username associated with this profile, if any. In non-test | 154 // Returns the username associated with this profile, if any. In non-test |
| 155 // implementations, this is usually the Google-services email address. | 155 // implementations, this is usually the Google-services email address. |
| 156 virtual std::string GetProfileUserName() = 0; | 156 virtual std::string GetProfileUserName() const = 0; |
| 157 | 157 |
| 158 // Returns the profile type. | 158 // Returns the profile type. |
| 159 virtual ProfileType GetProfileType() const = 0; | 159 virtual ProfileType GetProfileType() const = 0; |
| 160 | 160 |
| 161 // Return the incognito version of this profile. The returned pointer | 161 // Return the incognito version of this profile. The returned pointer |
| 162 // is owned by the receiving profile. If the receiving profile is off the | 162 // is owned by the receiving profile. If the receiving profile is off the |
| 163 // record, the same profile is returned. | 163 // record, the same profile is returned. |
| 164 // | 164 // |
| 165 // WARNING: This will create the OffTheRecord profile if it doesn't already | 165 // WARNING: This will create the OffTheRecord profile if it doesn't already |
| 166 // exist. If this isn't what you want, you need to check | 166 // exist. If this isn't what you want, you need to check |
| (...skipping 18 matching lines...) Expand all Loading... |
| 185 // Returns whether the profile is a legacy supervised user profile. | 185 // Returns whether the profile is a legacy supervised user profile. |
| 186 virtual bool IsLegacySupervised() = 0; | 186 virtual bool IsLegacySupervised() = 0; |
| 187 | 187 |
| 188 // Accessor. The instance is created upon first access. | 188 // Accessor. The instance is created upon first access. |
| 189 virtual ExtensionSpecialStoragePolicy* | 189 virtual ExtensionSpecialStoragePolicy* |
| 190 GetExtensionSpecialStoragePolicy() = 0; | 190 GetExtensionSpecialStoragePolicy() = 0; |
| 191 | 191 |
| 192 // Retrieves a pointer to the PrefService that manages the | 192 // Retrieves a pointer to the PrefService that manages the |
| 193 // preferences for this user profile. | 193 // preferences for this user profile. |
| 194 virtual PrefService* GetPrefs() = 0; | 194 virtual PrefService* GetPrefs() = 0; |
| 195 virtual const PrefService* GetPrefs() const = 0; |
| 195 | 196 |
| 196 // Retrieves a pointer to the PrefService that manages the default zoom | 197 // Retrieves a pointer to the PrefService that manages the default zoom |
| 197 // level and the per-host zoom levels for this user profile. | 198 // level and the per-host zoom levels for this user profile. |
| 198 // TODO(wjmaclean): Remove this when HostZoomMap migrates to StoragePartition. | 199 // TODO(wjmaclean): Remove this when HostZoomMap migrates to StoragePartition. |
| 199 virtual chrome::ChromeZoomLevelPrefs* GetZoomLevelPrefs(); | 200 virtual chrome::ChromeZoomLevelPrefs* GetZoomLevelPrefs(); |
| 200 | 201 |
| 201 // Retrieves a pointer to the PrefService that manages the preferences | 202 // Retrieves a pointer to the PrefService that manages the preferences |
| 202 // for OffTheRecord Profiles. This PrefService is lazily created the first | 203 // for OffTheRecord Profiles. This PrefService is lazily created the first |
| 203 // time that this method is called. | 204 // time that this method is called. |
| 204 virtual PrefService* GetOffTheRecordPrefs() = 0; | 205 virtual PrefService* GetOffTheRecordPrefs() = 0; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 401 |
| 401 DISALLOW_COPY_AND_ASSIGN(Profile); | 402 DISALLOW_COPY_AND_ASSIGN(Profile); |
| 402 }; | 403 }; |
| 403 | 404 |
| 404 // The comparator for profile pointers as key in a map. | 405 // The comparator for profile pointers as key in a map. |
| 405 struct ProfileCompare { | 406 struct ProfileCompare { |
| 406 bool operator()(Profile* a, Profile* b) const; | 407 bool operator()(Profile* a, Profile* b) const; |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 410 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |