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

Side by Side Diff: chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/login/wallpaper_manager.h" 5 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
6 6
7 #include "ash/ash_resources/grit/ash_wallpaper_resources.h" 7 #include "ash/ash_resources/grit/ash_wallpaper_resources.h"
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/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 base::MessageLoop::current()->Quit(); 87 base::MessageLoop::current()->Quit();
88 } 88 }
89 89
90 protected: 90 protected:
91 // Return custom wallpaper path. Create directory if not exist. 91 // Return custom wallpaper path. Create directory if not exist.
92 base::FilePath GetCustomWallpaperPath(const char* sub_dir, 92 base::FilePath GetCustomWallpaperPath(const char* sub_dir,
93 const std::string& email, 93 const std::string& email,
94 const std::string& id) { 94 const std::string& id) {
95 base::FilePath wallpaper_path = 95 base::FilePath wallpaper_path =
96 WallpaperManager::Get()->GetCustomWallpaperPath(sub_dir, email, id); 96 WallpaperManager::Get()->GetCustomWallpaperPath(sub_dir, email, id);
97 if (!file_util::DirectoryExists(wallpaper_path.DirName())) 97 if (!base::DirectoryExists(wallpaper_path.DirName()))
98 file_util::CreateDirectory(wallpaper_path.DirName()); 98 file_util::CreateDirectory(wallpaper_path.DirName());
99 99
100 return wallpaper_path; 100 return wallpaper_path;
101 } 101 }
102 102
103 // Logs in |username|. 103 // Logs in |username|.
104 void LogIn(const std::string& username) { 104 void LogIn(const std::string& username) {
105 UserManager::Get()->UserLoggedIn(username, username, false); 105 UserManager::Get()->UserLoggedIn(username, username, false);
106 } 106 }
107 107
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation, 401 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTestNoAnimation,
402 UsePreMigrationWallpaperInfo) { 402 UsePreMigrationWallpaperInfo) {
403 LogIn(kTestUser1); 403 LogIn(kTestUser1);
404 WaitAsyncWallpaperLoad(); 404 WaitAsyncWallpaperLoad();
405 // This test should finish normally. If timeout, it is probably because chrome 405 // This test should finish normally. If timeout, it is probably because chrome
406 // can not handle pre migrated user profile (M21 profile or older). 406 // can not handle pre migrated user profile (M21 profile or older).
407 } 407 }
408 408
409 } // namespace chromeos 409 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wallpaper_manager.cc ('k') | chrome/browser/chromeos/policy/app_pack_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698