Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: chrome/browser/profiles/profile.h

Issue 847733005: Move User Manager onto a System profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
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
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 // A non-browsing profile not associated to a user. Sample use: User-Manager.
410 bool is_system_profile_;
411
402 DISALLOW_COPY_AND_ASSIGN(Profile); 412 DISALLOW_COPY_AND_ASSIGN(Profile);
403 }; 413 };
404 414
405 // The comparator for profile pointers as key in a map. 415 // The comparator for profile pointers as key in a map.
406 struct ProfileCompare { 416 struct ProfileCompare {
407 bool operator()(Profile* a, Profile* b) const; 417 bool operator()(Profile* a, Profile* b) const;
408 }; 418 };
409 419
410 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 420 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698