| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
| 8 #include "ash/desktop_background/desktop_background_controller_observer.h" | 8 #include "ash/desktop_background/desktop_background_controller_observer.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 void OnNetworkWaitTimedOut(const base::Closure& runner_quit_task) { | 191 void OnNetworkWaitTimedOut(const base::Closure& runner_quit_task) { |
| 192 runner_quit_task.Run(); | 192 runner_quit_task.Run(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 // Helper function for LockFileThread. | 195 // Helper function for LockFileThread. |
| 196 void LockAndUnlock(scoped_ptr<base::Lock> lock) { | 196 void LockAndUnlock(scoped_ptr<base::Lock> lock) { |
| 197 lock->Acquire(); | 197 lock->Acquire(); |
| 198 lock->Release(); | 198 lock->Release(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 bool IsAppInstalled(const std::string app_id) { | 201 bool IsAppInstalled(const std::string& app_id) { |
| 202 Profile* app_profile = ProfileManager::GetPrimaryUserProfile(); | 202 Profile* app_profile = ProfileManager::GetPrimaryUserProfile(); |
| 203 DCHECK(app_profile); | 203 DCHECK(app_profile); |
| 204 const extensions::Extension* app = | 204 const extensions::Extension* app = |
| 205 extensions::ExtensionSystem::Get(app_profile) | 205 extensions::ExtensionSystem::Get(app_profile) |
| 206 ->extension_service() | 206 ->extension_service() |
| 207 ->GetInstalledExtension(app_id); | 207 ->GetInstalledExtension(app_id); |
| 208 return app != nullptr; | 208 return app != nullptr; |
| 209 } | 209 } |
| 210 | 210 |
| 211 // Helper functions for CanConfigureNetwork mock. | 211 // Helper functions for CanConfigureNetwork mock. |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 KioskAppManager::Get()->UpdateExternalCache(); | 1346 KioskAppManager::Get()->UpdateExternalCache(); |
| 1347 waiter.Wait(); | 1347 waiter.Wait(); |
| 1348 EXPECT_TRUE(waiter.loaded()); | 1348 EXPECT_TRUE(waiter.loaded()); |
| 1349 std::string cached_version; | 1349 std::string cached_version; |
| 1350 base::FilePath file_path; | 1350 base::FilePath file_path; |
| 1351 EXPECT_TRUE( | 1351 EXPECT_TRUE( |
| 1352 manager->GetCachedCrx(test_app_id(), &file_path, &cached_version)); | 1352 manager->GetCachedCrx(test_app_id(), &file_path, &cached_version)); |
| 1353 EXPECT_EQ(version, cached_version); | 1353 EXPECT_EQ(version, cached_version); |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 void SetupFakeDiskMountManagerMountPath(const std::string mount_path) { | 1356 void SetupFakeDiskMountManagerMountPath(const std::string& mount_path) { |
| 1357 base::FilePath test_data_dir; | 1357 base::FilePath test_data_dir; |
| 1358 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); | 1358 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); |
| 1359 test_data_dir = test_data_dir.AppendASCII(mount_path); | 1359 test_data_dir = test_data_dir.AppendASCII(mount_path); |
| 1360 fake_disk_mount_manager_->set_usb_mount_path(test_data_dir.value()); | 1360 fake_disk_mount_manager_->set_usb_mount_path(test_data_dir.value()); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 void SimulateUpdateAppFromUsbStick(const std::string& usb_mount_path, | 1363 void SimulateUpdateAppFromUsbStick(const std::string& usb_mount_path, |
| 1364 bool* app_update_notified, | 1364 bool* app_update_notified, |
| 1365 bool* update_success) { | 1365 bool* update_success) { |
| 1366 SetupFakeDiskMountManagerMountPath(usb_mount_path); | 1366 SetupFakeDiskMountManagerMountPath(usb_mount_path); |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 content::WindowedNotificationObserver( | 2110 content::WindowedNotificationObserver( |
| 2111 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, | 2111 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, |
| 2112 content::NotificationService::AllSources()).Wait(); | 2112 content::NotificationService::AllSources()).Wait(); |
| 2113 | 2113 |
| 2114 // Wait for the wallpaper to load. | 2114 // Wait for the wallpaper to load. |
| 2115 WaitForWallpaper(); | 2115 WaitForWallpaper(); |
| 2116 EXPECT_TRUE(wallpaper_loaded()); | 2116 EXPECT_TRUE(wallpaper_loaded()); |
| 2117 } | 2117 } |
| 2118 | 2118 |
| 2119 } // namespace chromeos | 2119 } // namespace chromeos |
| OLD | NEW |