| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "ash/desktop_background/desktop_background_controller_observer.h" | 9 #include "ash/desktop_background/desktop_background_controller_observer.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 policy::UserPolicyBuilder* builder = | 237 policy::UserPolicyBuilder* builder = |
| 238 user_policy_builders_[user_number].get(); | 238 user_policy_builders_[user_number].get(); |
| 239 if (!filename.empty()) { | 239 if (!filename.empty()) { |
| 240 builder->payload(). | 240 builder->payload(). |
| 241 mutable_wallpaperimage()->set_value(ConstructPolicy(filename)); | 241 mutable_wallpaperimage()->set_value(ConstructPolicy(filename)); |
| 242 } else { | 242 } else { |
| 243 builder->payload().Clear(); | 243 builder->payload().Clear(); |
| 244 } | 244 } |
| 245 builder->Build(); | 245 builder->Build(); |
| 246 fake_session_manager_client_->set_user_policy(user_id, builder->GetBlob()); | 246 fake_session_manager_client_->set_user_policy(user_id, builder->GetBlob()); |
| 247 const user_manager::User* user = | 247 const user_manager::User* user = user_manager::UserManager::Get()->FindUser( |
| 248 user_manager::UserManager::Get()->FindUser(user_id); | 248 AccountId::FromUserEmail(user_id)); |
| 249 ASSERT_TRUE(user); | 249 ASSERT_TRUE(user); |
| 250 policy::CloudPolicyStore* store = GetStoreForUser(user); | 250 policy::CloudPolicyStore* store = GetStoreForUser(user); |
| 251 ASSERT_TRUE(store); | 251 ASSERT_TRUE(store); |
| 252 store->Load(); | 252 store->Load(); |
| 253 ASSERT_EQ(policy::CloudPolicyStore::STATUS_OK, store->status()); | 253 ASSERT_EQ(policy::CloudPolicyStore::STATUS_OK, store->status()); |
| 254 ASSERT_EQ(policy::CloudPolicyValidatorBase::VALIDATION_OK, | 254 ASSERT_EQ(policy::CloudPolicyValidatorBase::VALIDATION_OK, |
| 255 store->validation_status()); | 255 store->validation_status()); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // Obtain WallpaperInfo for |user_number| from WallpaperManager. | 258 // Obtain WallpaperInfo for |user_number| from WallpaperManager. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { | 400 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { |
| 401 LoginUser(testUsers_[0]); | 401 LoginUser(testUsers_[0]); |
| 402 | 402 |
| 403 // Wait until wallpaper has been loaded. | 403 // Wait until wallpaper has been loaded. |
| 404 RunUntilWallpaperChangeCount(1); | 404 RunUntilWallpaperChangeCount(1); |
| 405 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); | 405 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace chromeos | 408 } // namespace chromeos |
| OLD | NEW |