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 "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <numeric> | 9 #include <numeric> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "ash/ash_constants.h" | 12 #include "ash/ash_constants.h" |
11 #include "ash/ash_switches.h" | 13 #include "ash/ash_switches.h" |
12 #include "ash/shell.h" | 14 #include "ash/shell.h" |
13 #include "base/bind.h" | 15 #include "base/bind.h" |
14 #include "base/command_line.h" | 16 #include "base/command_line.h" |
15 #include "base/files/file_enumerator.h" | 17 #include "base/files/file_enumerator.h" |
16 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
17 #include "base/files/file_util.h" | 19 #include "base/files/file_util.h" |
18 #include "base/logging.h" | 20 #include "base/logging.h" |
| 21 #include "base/macros.h" |
19 #include "base/metrics/histogram.h" | 22 #include "base/metrics/histogram.h" |
20 #include "base/path_service.h" | 23 #include "base/path_service.h" |
21 #include "base/prefs/pref_registry_simple.h" | 24 #include "base/prefs/pref_registry_simple.h" |
22 #include "base/prefs/pref_service.h" | 25 #include "base/prefs/pref_service.h" |
23 #include "base/prefs/scoped_user_pref_update.h" | 26 #include "base/prefs/scoped_user_pref_update.h" |
24 #include "base/strings/string_number_conversions.h" | 27 #include "base/strings/string_number_conversions.h" |
25 #include "base/strings/string_util.h" | 28 #include "base/strings/string_util.h" |
26 #include "base/strings/stringprintf.h" | 29 #include "base/strings/stringprintf.h" |
27 #include "base/sys_info.h" | 30 #include "base/sys_info.h" |
28 #include "base/threading/worker_pool.h" | 31 #include "base/threading/worker_pool.h" |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 return false; | 888 return false; |
886 int layout; | 889 int layout; |
887 if (!info_dict->GetInteger(kNewWallpaperLayoutNodeName, &layout)) | 890 if (!info_dict->GetInteger(kNewWallpaperLayoutNodeName, &layout)) |
888 return false; | 891 return false; |
889 int type; | 892 int type; |
890 if (!info_dict->GetInteger(kNewWallpaperTypeNodeName, &type)) | 893 if (!info_dict->GetInteger(kNewWallpaperTypeNodeName, &type)) |
891 return false; | 894 return false; |
892 std::string date_string; | 895 std::string date_string; |
893 if (!info_dict->GetString(kNewWallpaperDateNodeName, &date_string)) | 896 if (!info_dict->GetString(kNewWallpaperDateNodeName, &date_string)) |
894 return false; | 897 return false; |
895 int64 date_val; | 898 int64_t date_val; |
896 if (!base::StringToInt64(date_string, &date_val)) | 899 if (!base::StringToInt64(date_string, &date_val)) |
897 return false; | 900 return false; |
898 | 901 |
899 info->location = location; | 902 info->location = location; |
900 info->layout = static_cast<wallpaper::WallpaperLayout>(layout); | 903 info->layout = static_cast<wallpaper::WallpaperLayout>(layout); |
901 info->type = static_cast<user_manager::User::WallpaperType>(type); | 904 info->type = static_cast<user_manager::User::WallpaperType>(type); |
902 info->date = base::Time::FromInternalValue(date_val); | 905 info->date = base::Time::FromInternalValue(date_val); |
903 return true; | 906 return true; |
904 } | 907 } |
905 | 908 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 } | 1103 } |
1101 } | 1104 } |
1102 | 1105 |
1103 if (need_update_screen) { | 1106 if (need_update_screen) { |
1104 DoSetDefaultWallpaper(EmptyAccountId(), | 1107 DoSetDefaultWallpaper(EmptyAccountId(), |
1105 MovableOnDestroyCallbackHolder().Pass()); | 1108 MovableOnDestroyCallbackHolder().Pass()); |
1106 } | 1109 } |
1107 } | 1110 } |
1108 | 1111 |
1109 } // namespace chromeos | 1112 } // namespace chromeos |
OLD | NEW |