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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 312 |
313 // Returns the home page for this profile. | 313 // Returns the home page for this profile. |
314 virtual GURL GetHomePage() = 0; | 314 virtual GURL GetHomePage() = 0; |
315 | 315 |
316 // Returns whether or not the profile was created by a version of Chrome | 316 // Returns whether or not the profile was created by a version of Chrome |
317 // more recent (or equal to) the one specified. | 317 // more recent (or equal to) the one specified. |
318 virtual bool WasCreatedByVersionOrLater(const std::string& version) = 0; | 318 virtual bool WasCreatedByVersionOrLater(const std::string& version) = 0; |
319 | 319 |
320 std::string GetDebugName(); | 320 std::string GetDebugName(); |
321 | 321 |
322 // Returns whether it is a guest session. | 322 // Returns whether it is a guest session. |
noms (inactive)
2015/01/20 13:43:17
nit: Bleh, not a giant fan about how one is a gues
Mike Lerman
2015/01/20 16:18:11
Dy'arg, ok, I'll fix that in another CL. IsGuestSe
| |
323 virtual bool IsGuestSession() const; | 323 virtual bool IsGuestSession() const; |
324 | 324 |
325 // Returns whether it is a system profile. | |
326 virtual bool IsSystemProfile() const; | |
327 | |
325 // Did the user restore the last session? This is set by SessionRestore. | 328 // Did the user restore the last session? This is set by SessionRestore. |
326 void set_restored_last_session(bool restored_last_session) { | 329 void set_restored_last_session(bool restored_last_session) { |
327 restored_last_session_ = restored_last_session; | 330 restored_last_session_ = restored_last_session; |
328 } | 331 } |
329 bool restored_last_session() const { | 332 bool restored_last_session() const { |
330 return restored_last_session_; | 333 return restored_last_session_; |
331 } | 334 } |
332 | 335 |
333 // Sets the ExitType for the profile. This may be invoked multiple times | 336 // Sets the ExitType for the profile. This may be invoked multiple times |
334 // during shutdown; only the first such change (the transition from | 337 // during shutdown; only the first such change (the transition from |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 | 380 |
378 // Convenience method to retrieve the default zoom level for the default | 381 // Convenience method to retrieve the default zoom level for the default |
379 // storage partition. | 382 // storage partition. |
380 double GetDefaultZoomLevelForProfile(); | 383 double GetDefaultZoomLevelForProfile(); |
381 | 384 |
382 protected: | 385 protected: |
383 void set_is_guest_profile(bool is_guest_profile) { | 386 void set_is_guest_profile(bool is_guest_profile) { |
384 is_guest_profile_ = is_guest_profile; | 387 is_guest_profile_ = is_guest_profile; |
385 } | 388 } |
386 | 389 |
390 void set_is_system_profile(bool is_system_profile) { | |
391 is_system_profile_ = is_system_profile; | |
392 } | |
393 | |
387 private: | 394 private: |
388 bool restored_last_session_; | 395 bool restored_last_session_; |
389 | 396 |
390 // Used to prevent the notification that this Profile is destroyed from | 397 // Used to prevent the notification that this Profile is destroyed from |
391 // being sent twice. | 398 // being sent twice. |
392 bool sent_destroyed_notification_; | 399 bool sent_destroyed_notification_; |
393 | 400 |
394 // Accessibility events will only be propagated when the pause | 401 // Accessibility events will only be propagated when the pause |
395 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents | 402 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents |
396 // increment and decrement the level, respectively, rather than set it to | 403 // increment and decrement the level, respectively, rather than set it to |
397 // true or false, so that calls can be nested. | 404 // true or false, so that calls can be nested. |
398 int accessibility_pause_level_; | 405 int accessibility_pause_level_; |
399 | 406 |
400 bool is_guest_profile_; | 407 bool is_guest_profile_; |
401 | 408 |
409 bool is_system_profile_; | |
noms (inactive)
2015/01/20 13:43:17
Please document what a system profile means, and w
Mike Lerman
2015/01/20 16:18:11
Done.
| |
410 | |
402 DISALLOW_COPY_AND_ASSIGN(Profile); | 411 DISALLOW_COPY_AND_ASSIGN(Profile); |
403 }; | 412 }; |
404 | 413 |
405 // The comparator for profile pointers as key in a map. | 414 // The comparator for profile pointers as key in a map. |
406 struct ProfileCompare { | 415 struct ProfileCompare { |
407 bool operator()(Profile* a, Profile* b) const; | 416 bool operator()(Profile* a, Profile* b) const; |
408 }; | 417 }; |
409 | 418 |
410 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 419 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |