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 "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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 PrefService* prefs = g_browser_process->local_state(); | 664 PrefService* prefs = g_browser_process->local_state(); |
665 DictionaryPrefUpdate wallpaper_properties_pref(prefs, | 665 DictionaryPrefUpdate wallpaper_properties_pref(prefs, |
666 kUserWallpapersProperties); | 666 kUserWallpapersProperties); |
667 wallpaper_properties_pref->Clear(); | 667 wallpaper_properties_pref->Clear(); |
668 DictionaryPrefUpdate wallpapers_pref(prefs, kUserWallpapers); | 668 DictionaryPrefUpdate wallpapers_pref(prefs, kUserWallpapers); |
669 wallpapers_pref->Clear(); | 669 wallpapers_pref->Clear(); |
670 } | 670 } |
671 | 671 |
672 void WallpaperManager::DeleteAllExcept(const base::FilePath& path) { | 672 void WallpaperManager::DeleteAllExcept(const base::FilePath& path) { |
673 base::FilePath dir = path.DirName(); | 673 base::FilePath dir = path.DirName(); |
674 if (file_util::DirectoryExists(dir)) { | 674 if (base::DirectoryExists(dir)) { |
675 base::FileEnumerator files(dir, false, base::FileEnumerator::FILES); | 675 base::FileEnumerator files(dir, false, base::FileEnumerator::FILES); |
676 for (base::FilePath current = files.Next(); !current.empty(); | 676 for (base::FilePath current = files.Next(); !current.empty(); |
677 current = files.Next()) { | 677 current = files.Next()) { |
678 if (current != path) | 678 if (current != path) |
679 base::Delete(current, false); | 679 base::Delete(current, false); |
680 } | 680 } |
681 } | 681 } |
682 } | 682 } |
683 | 683 |
684 void WallpaperManager::DeleteWallpaperInList( | 684 void WallpaperManager::DeleteWallpaperInList( |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 | 1098 |
1099 void WallpaperManager::SystemResumed(const base::TimeDelta& sleep_duration) { | 1099 void WallpaperManager::SystemResumed(const base::TimeDelta& sleep_duration) { |
1100 BatchUpdateWallpaper(); | 1100 BatchUpdateWallpaper(); |
1101 } | 1101 } |
1102 | 1102 |
1103 void WallpaperManager::TimezoneChanged(const icu::TimeZone& timezone) { | 1103 void WallpaperManager::TimezoneChanged(const icu::TimeZone& timezone) { |
1104 RestartTimer(); | 1104 RestartTimer(); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace chromeos | 1107 } // namespace chromeos |
OLD | NEW |