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

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

Issue 2642783002: Set that Active Directory users can't sync images (Closed)
Patch Set: comment Created 3 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/chromeos/login/session/user_session_manager.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 DISALLOW_COPY_AND_ASSIGN(RegularUser); 53 DISALLOW_COPY_AND_ASSIGN(RegularUser);
54 }; 54 };
55 55
56 class ActiveDirectoryUser : public RegularUser { 56 class ActiveDirectoryUser : public RegularUser {
57 public: 57 public:
58 explicit ActiveDirectoryUser(const AccountId& account_id); 58 explicit ActiveDirectoryUser(const AccountId& account_id);
59 ~ActiveDirectoryUser() override; 59 ~ActiveDirectoryUser() override;
60 // Overridden from User: 60 // Overridden from User:
61 UserType GetType() const override; 61 UserType GetType() const override;
62 bool CanSyncImage() const override;
62 }; 63 };
63 64
64 class GuestUser : public User { 65 class GuestUser : public User {
65 public: 66 public:
66 explicit GuestUser(const AccountId& guest_account_id); 67 explicit GuestUser(const AccountId& guest_account_id);
67 ~GuestUser() override; 68 ~GuestUser() override;
68 69
69 // Overridden from User: 70 // Overridden from User:
70 UserType GetType() const override; 71 UserType GetType() const override;
71 72
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 user_image_ = std::move(stub_user_image); 283 user_image_ = std::move(stub_user_image);
283 image_index_ = image_index; 284 image_index_ = image_index;
284 image_is_stub_ = true; 285 image_is_stub_ = true;
285 image_is_loading_ = is_loading; 286 image_is_loading_ = is_loading;
286 } 287 }
287 288
288 UserType ActiveDirectoryUser::GetType() const { 289 UserType ActiveDirectoryUser::GetType() const {
289 return user_manager::USER_TYPE_ACTIVE_DIRECTORY; 290 return user_manager::USER_TYPE_ACTIVE_DIRECTORY;
290 } 291 }
291 292
293 bool ActiveDirectoryUser::CanSyncImage() const {
294 return false;
295 }
296
292 RegularUser::RegularUser(const AccountId& account_id) : User(account_id) { 297 RegularUser::RegularUser(const AccountId& account_id) : User(account_id) {
293 set_can_lock(true); 298 set_can_lock(true);
294 set_display_email(account_id.GetUserEmail()); 299 set_display_email(account_id.GetUserEmail());
295 } 300 }
296 301
297 ActiveDirectoryUser::ActiveDirectoryUser(const AccountId& account_id) 302 ActiveDirectoryUser::ActiveDirectoryUser(const AccountId& account_id)
298 : RegularUser(account_id) {} 303 : RegularUser(account_id) {}
299 304
300 RegularUser::~RegularUser() { 305 RegularUser::~RegularUser() {
301 } 306 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 case user_manager::USER_TYPE_ARC_KIOSK_APP: 417 case user_manager::USER_TYPE_ARC_KIOSK_APP:
413 case user_manager::USER_TYPE_ACTIVE_DIRECTORY: 418 case user_manager::USER_TYPE_ACTIVE_DIRECTORY:
414 return false; 419 return false;
415 default: 420 default:
416 NOTREACHED(); 421 NOTREACHED();
417 } 422 }
418 return false; 423 return false;
419 } 424 }
420 425
421 } // namespace user_manager 426 } // namespace user_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/session/user_session_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698