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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/chromeos/login/wallpaper_manager.h" 5 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 file_to_remove), 734 file_to_remove),
735 false); 735 false);
736 } 736 }
737 737
738 void WallpaperManager::EnsureCustomWallpaperDirectories( 738 void WallpaperManager::EnsureCustomWallpaperDirectories(
739 const std::string& user_id_hash) { 739 const std::string& user_id_hash) {
740 base::FilePath dir; 740 base::FilePath dir;
741 dir = GetCustomWallpaperDir(kSmallWallpaperSubDir); 741 dir = GetCustomWallpaperDir(kSmallWallpaperSubDir);
742 dir = dir.Append(user_id_hash); 742 dir = dir.Append(user_id_hash);
743 if (!base::PathExists(dir)) 743 if (!base::PathExists(dir))
744 file_util::CreateDirectory(dir); 744 base::CreateDirectory(dir);
745 dir = GetCustomWallpaperDir(kLargeWallpaperSubDir); 745 dir = GetCustomWallpaperDir(kLargeWallpaperSubDir);
746 dir = dir.Append(user_id_hash); 746 dir = dir.Append(user_id_hash);
747 if (!base::PathExists(dir)) 747 if (!base::PathExists(dir))
748 file_util::CreateDirectory(dir); 748 base::CreateDirectory(dir);
749 dir = GetCustomWallpaperDir(kOriginalWallpaperSubDir); 749 dir = GetCustomWallpaperDir(kOriginalWallpaperSubDir);
750 dir = dir.Append(user_id_hash); 750 dir = dir.Append(user_id_hash);
751 if (!base::PathExists(dir)) 751 if (!base::PathExists(dir))
752 file_util::CreateDirectory(dir); 752 base::CreateDirectory(dir);
753 dir = GetCustomWallpaperDir(kThumbnailWallpaperSubDir); 753 dir = GetCustomWallpaperDir(kThumbnailWallpaperSubDir);
754 dir = dir.Append(user_id_hash); 754 dir = dir.Append(user_id_hash);
755 if (!base::PathExists(dir)) 755 if (!base::PathExists(dir))
756 file_util::CreateDirectory(dir); 756 base::CreateDirectory(dir);
757 } 757 }
758 758
759 CommandLine* WallpaperManager::GetComandLine() { 759 CommandLine* WallpaperManager::GetComandLine() {
760 CommandLine* command_line = command_line_for_testing_ ? 760 CommandLine* command_line = command_line_for_testing_ ?
761 command_line_for_testing_ : CommandLine::ForCurrentProcess(); 761 command_line_for_testing_ : CommandLine::ForCurrentProcess();
762 return command_line; 762 return command_line;
763 } 763 }
764 764
765 void WallpaperManager::InitializeRegisteredDeviceWallpaper() { 765 void WallpaperManager::InitializeRegisteredDeviceWallpaper() {
766 if (UserManager::Get()->IsUserLoggedIn()) 766 if (UserManager::Get()->IsUserLoggedIn())
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1065
1066 wallpaper_loader_->Start(wallpaper_path.value(), 0, 1066 wallpaper_loader_->Start(wallpaper_path.value(), 0,
1067 base::Bind(&WallpaperManager::OnWallpaperDecoded, 1067 base::Bind(&WallpaperManager::OnWallpaperDecoded,
1068 base::Unretained(this), 1068 base::Unretained(this),
1069 email, 1069 email,
1070 info.layout, 1070 info.layout,
1071 update_wallpaper)); 1071 update_wallpaper));
1072 } 1072 }
1073 1073
1074 } // namespace chromeos 1074 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698