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

Side by Side Diff: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc

Issue 393343002: Rename "managed (mode|user)" to "supervised user" (part 7) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more alphabetize (and rebase again) Created 6 years, 5 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 | Annotate | Revision Log
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 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" 5 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/desktop_background/user_wallpaper_delegate.h" 8 #include "ash/desktop_background/user_wallpaper_delegate.h"
9 #include "ash/wm/window_animations.h" 9 #include "ash/wm/window_animations.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const LoginState::LoggedInUserType user_type = 95 const LoginState::LoggedInUserType user_type =
96 login_state->GetLoggedInUserType(); 96 login_state->GetLoggedInUserType();
97 if (!login_state->IsUserLoggedIn()) 97 if (!login_state->IsUserLoggedIn())
98 return false; 98 return false;
99 99
100 // Whitelist user types that are allowed to change their wallpaper. (Guest 100 // Whitelist user types that are allowed to change their wallpaper. (Guest
101 // users are not, see crosbug 26900.) 101 // users are not, see crosbug 26900.)
102 if (user_type != LoginState::LOGGED_IN_USER_REGULAR && 102 if (user_type != LoginState::LOGGED_IN_USER_REGULAR &&
103 user_type != LoginState::LOGGED_IN_USER_OWNER && 103 user_type != LoginState::LOGGED_IN_USER_OWNER &&
104 user_type != LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT && 104 user_type != LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT &&
105 user_type != LoginState::LOGGED_IN_USER_LOCALLY_MANAGED) { 105 user_type != LoginState::LOGGED_IN_USER_SUPERVISED) {
106 return false; 106 return false;
107 } 107 }
108 const User* user = chromeos::UserManager::Get()->GetActiveUser(); 108 const User* user = chromeos::UserManager::Get()->GetActiveUser();
109 if (!user) 109 if (!user)
110 return false; 110 return false;
111 if (chromeos::WallpaperManager::Get()->IsPolicyControlled(user->email())) 111 if (chromeos::WallpaperManager::Get()->IsPolicyControlled(user->email()))
112 return false; 112 return false;
113 return true; 113 return true;
114 } 114 }
115 115
(...skipping 18 matching lines...) Expand all
134 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); 134 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
135 }; 135 };
136 136
137 } // namespace 137 } // namespace
138 138
139 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { 139 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() {
140 return new chromeos::UserWallpaperDelegate(); 140 return new chromeos::UserWallpaperDelegate();
141 } 141 }
142 142
143 } // namespace chromeos 143 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698