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

Side by Side Diff: components/user_manager/user.cc

Issue 865973003: Update {virtual,override,final} to follow C++11 style in components, round 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix format 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 | « components/timers/rtc_alarm.h ('k') | components/user_manager/user_manager_base.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/user_manager/user.h" 5 #include "components/user_manager/user.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 20 matching lines...) Expand all
31 // static 31 // static
32 bool User::TypeHasGaiaAccount(UserType user_type) { 32 bool User::TypeHasGaiaAccount(UserType user_type) {
33 return user_type == USER_TYPE_REGULAR || 33 return user_type == USER_TYPE_REGULAR ||
34 user_type == USER_TYPE_CHILD; 34 user_type == USER_TYPE_CHILD;
35 } 35 }
36 36
37 // Also used for regular supervised users. 37 // Also used for regular supervised users.
38 class RegularUser : public User { 38 class RegularUser : public User {
39 public: 39 public:
40 explicit RegularUser(const std::string& email); 40 explicit RegularUser(const std::string& email);
41 virtual ~RegularUser(); 41 ~RegularUser() override;
42 42
43 // Overridden from User: 43 // Overridden from User:
44 virtual UserType GetType() const override; 44 UserType GetType() const override;
45 virtual bool CanSyncImage() const override; 45 bool CanSyncImage() const override;
46 virtual void SetIsChild(bool is_child) override; 46 void SetIsChild(bool is_child) override;
47 47
48 private: 48 private:
49 bool is_child_; 49 bool is_child_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(RegularUser); 51 DISALLOW_COPY_AND_ASSIGN(RegularUser);
52 }; 52 };
53 53
54 class GuestUser : public User { 54 class GuestUser : public User {
55 public: 55 public:
56 GuestUser(); 56 GuestUser();
57 virtual ~GuestUser(); 57 ~GuestUser() override;
58 58
59 // Overridden from User: 59 // Overridden from User:
60 virtual UserType GetType() const override; 60 UserType GetType() const override;
61 61
62 private: 62 private:
63 DISALLOW_COPY_AND_ASSIGN(GuestUser); 63 DISALLOW_COPY_AND_ASSIGN(GuestUser);
64 }; 64 };
65 65
66 class KioskAppUser : public User { 66 class KioskAppUser : public User {
67 public: 67 public:
68 explicit KioskAppUser(const std::string& app_id); 68 explicit KioskAppUser(const std::string& app_id);
69 virtual ~KioskAppUser(); 69 ~KioskAppUser() override;
70 70
71 // Overridden from User: 71 // Overridden from User:
72 virtual UserType GetType() const override; 72 UserType GetType() const override;
73 73
74 private: 74 private:
75 DISALLOW_COPY_AND_ASSIGN(KioskAppUser); 75 DISALLOW_COPY_AND_ASSIGN(KioskAppUser);
76 }; 76 };
77 77
78 class SupervisedUser : public User { 78 class SupervisedUser : public User {
79 public: 79 public:
80 explicit SupervisedUser(const std::string& username); 80 explicit SupervisedUser(const std::string& username);
81 virtual ~SupervisedUser(); 81 ~SupervisedUser() override;
82 82
83 // Overridden from User: 83 // Overridden from User:
84 virtual UserType GetType() const override; 84 UserType GetType() const override;
85 virtual std::string display_email() const override; 85 std::string display_email() const override;
86 86
87 private: 87 private:
88 DISALLOW_COPY_AND_ASSIGN(SupervisedUser); 88 DISALLOW_COPY_AND_ASSIGN(SupervisedUser);
89 }; 89 };
90 90
91 class PublicAccountUser : public User { 91 class PublicAccountUser : public User {
92 public: 92 public:
93 explicit PublicAccountUser(const std::string& email); 93 explicit PublicAccountUser(const std::string& email);
94 virtual ~PublicAccountUser(); 94 ~PublicAccountUser() override;
95 95
96 // Overridden from User: 96 // Overridden from User:
97 virtual UserType GetType() const override; 97 UserType GetType() const override;
98 98
99 private: 99 private:
100 DISALLOW_COPY_AND_ASSIGN(PublicAccountUser); 100 DISALLOW_COPY_AND_ASSIGN(PublicAccountUser);
101 }; 101 };
102 102
103 std::string User::GetEmail() const { 103 std::string User::GetEmail() const {
104 return display_email(); 104 return display_email();
105 } 105 }
106 106
107 base::string16 User::GetDisplayName() const { 107 base::string16 User::GetDisplayName() const {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 case user_manager::USER_TYPE_SUPERVISED: 319 case user_manager::USER_TYPE_SUPERVISED:
320 case user_manager::USER_TYPE_KIOSK_APP: 320 case user_manager::USER_TYPE_KIOSK_APP:
321 return false; 321 return false;
322 default: 322 default:
323 NOTREACHED(); 323 NOTREACHED();
324 } 324 }
325 return false; 325 return false;
326 } 326 }
327 327
328 } // namespace user_manager 328 } // namespace user_manager
OLDNEW
« no previous file with comments | « components/timers/rtc_alarm.h ('k') | components/user_manager/user_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698