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 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 // content::BrowserContext implementation ------------------------------------ | 182 // content::BrowserContext implementation ------------------------------------ |
183 | 183 |
184 // Typesafe upcast. | 184 // Typesafe upcast. |
185 virtual TestingProfile* AsTestingProfile(); | 185 virtual TestingProfile* AsTestingProfile(); |
186 | 186 |
187 // Returns the name associated with this profile. This name is displayed in | 187 // Returns the name associated with this profile. This name is displayed in |
188 // the browser frame. | 188 // the browser frame. |
189 virtual std::string GetProfileName() = 0; | 189 virtual std::string GetProfileName() = 0; |
190 | 190 |
191 // Return whether this profile is incognito. Default is false. | |
192 virtual bool IsOffTheRecord() = 0; | |
193 | |
194 // Return the incognito version of this profile. The returned pointer | 191 // Return the incognito version of this profile. The returned pointer |
195 // is owned by the receiving profile. If the receiving profile is off the | 192 // is owned by the receiving profile. If the receiving profile is off the |
196 // record, the same profile is returned. | 193 // record, the same profile is returned. |
197 // | 194 // |
198 // WARNING: This will create the OffTheRecord profile if it doesn't already | 195 // WARNING: This will create the OffTheRecord profile if it doesn't already |
199 // exist. If this isn't what you want, you need to check | 196 // exist. If this isn't what you want, you need to check |
200 // HasOffTheRecordProfile() first. | 197 // HasOffTheRecordProfile() first. |
201 virtual Profile* GetOffTheRecordProfile() = 0; | 198 virtual Profile* GetOffTheRecordProfile() = 0; |
202 | 199 |
203 // Destroys the incognito profile. | 200 // Destroys the incognito profile. |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 struct hash<Profile*> { | 522 struct hash<Profile*> { |
526 std::size_t operator()(Profile* const& p) const { | 523 std::size_t operator()(Profile* const& p) const { |
527 return reinterpret_cast<std::size_t>(p); | 524 return reinterpret_cast<std::size_t>(p); |
528 } | 525 } |
529 }; | 526 }; |
530 | 527 |
531 } // namespace BASE_HASH_NAMESPACE | 528 } // namespace BASE_HASH_NAMESPACE |
532 #endif | 529 #endif |
533 | 530 |
534 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 531 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |