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

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

Issue 1497973002: This CL replaces e-mail with AccountId in wallpaper manager code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years 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 | « no previous file | chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.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 #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/desktop_background/user_wallpaper_delegate.h" 7 #include "ash/desktop_background/user_wallpaper_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_SUPERVISED) { 105 user_type != LoginState::LOGGED_IN_USER_SUPERVISED) {
106 return false; 106 return false;
107 } 107 }
108 const user_manager::User* user = 108 const user_manager::User* user =
109 user_manager::UserManager::Get()->GetActiveUser(); 109 user_manager::UserManager::Get()->GetActiveUser();
110 if (!user) 110 if (!user)
111 return false; 111 return false;
112 if (chromeos::WallpaperManager::Get()->IsPolicyControlled(user->email())) 112 if (chromeos::WallpaperManager::Get()->IsPolicyControlled(
113 user->GetAccountId()))
113 return false; 114 return false;
114 return true; 115 return true;
115 } 116 }
116 117
117 void OnWallpaperAnimationFinished() override { 118 void OnWallpaperAnimationFinished() override {
118 content::NotificationService::current()->Notify( 119 content::NotificationService::current()->Notify(
119 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, 120 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED,
120 content::NotificationService::AllSources(), 121 content::NotificationService::AllSources(),
121 content::NotificationService::NoDetails()); 122 content::NotificationService::NoDetails());
122 } 123 }
(...skipping 12 matching lines...) Expand all
135 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); 136 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
136 }; 137 };
137 138
138 } // namespace 139 } // namespace
139 140
140 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { 141 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() {
141 return new chromeos::UserWallpaperDelegate(); 142 return new chromeos::UserWallpaperDelegate();
142 } 143 }
143 144
144 } // namespace chromeos 145 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698