OLD | NEW |
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 <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" |
11 #include "base/logging.h" | |
12 #include "base/file_path.h" | 11 #include "base/file_path.h" |
13 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/logging.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/stringprintf.h" | 18 #include "base/stringprintf.h" |
19 #include "base/threading/worker_pool.h" | 19 #include "base/threading/worker_pool.h" |
20 #include "base/time.h" | 20 #include "base/time.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/chromeos/login/user.h" | 23 #include "chrome/browser/chromeos/login/user.h" |
24 #include "chrome/browser/chromeos/login/user_manager.h" | 24 #include "chrome/browser/chromeos/login/user_manager.h" |
25 #include "chrome/browser/chromeos/login/wizard_controller.h" | 25 #include "chrome/browser/chromeos/login/wizard_controller.h" |
26 #include "chrome/browser/chromeos/settings/cros_settings.h" | 26 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 27 #include "chrome/browser/prefs/pref_registry_simple.h" |
27 #include "chrome/browser/prefs/pref_service.h" | 28 #include "chrome/browser/prefs/pref_service.h" |
28 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 29 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
29 #include "chrome/common/chrome_notification_types.h" | 30 #include "chrome/common/chrome_notification_types.h" |
30 #include "chrome/common/chrome_paths.h" | 31 #include "chrome/common/chrome_paths.h" |
31 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
33 #include "chromeos/dbus/dbus_thread_manager.h" | 34 #include "chromeos/dbus/dbus_thread_manager.h" |
34 #include "content/public/browser/browser_thread.h" | 35 #include "content/public/browser/browser_thread.h" |
35 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
36 #include "ui/base/resource/resource_bundle.h" | 37 #include "ui/base/resource/resource_bundle.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 content::NotificationService::AllSources()); | 116 content::NotificationService::AllSources()); |
116 sequence_token_ = BrowserThread::GetBlockingPool()-> | 117 sequence_token_ = BrowserThread::GetBlockingPool()-> |
117 GetNamedSequenceToken(kWallpaperSequenceTokenName); | 118 GetNamedSequenceToken(kWallpaperSequenceTokenName); |
118 task_runner_ = BrowserThread::GetBlockingPool()-> | 119 task_runner_ = BrowserThread::GetBlockingPool()-> |
119 GetSequencedTaskRunnerWithShutdownBehavior( | 120 GetSequencedTaskRunnerWithShutdownBehavior( |
120 sequence_token_, | 121 sequence_token_, |
121 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); | 122 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); |
122 } | 123 } |
123 | 124 |
124 // static | 125 // static |
125 void WallpaperManager::RegisterPrefs(PrefServiceSimple* local_state) { | 126 void WallpaperManager::RegisterPrefs(PrefRegistrySimple* local_state) { |
126 local_state->RegisterDictionaryPref(prefs::kUsersWallpaperInfo); | 127 local_state->RegisterDictionaryPref(prefs::kUsersWallpaperInfo); |
127 local_state->RegisterDictionaryPref(kUserWallpapers); | 128 local_state->RegisterDictionaryPref(kUserWallpapers); |
128 local_state->RegisterDictionaryPref(kUserWallpapersProperties); | 129 local_state->RegisterDictionaryPref(kUserWallpapersProperties); |
129 } | 130 } |
130 | 131 |
131 void WallpaperManager::AddObservers() { | 132 void WallpaperManager::AddObservers() { |
132 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); | 133 DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); |
133 system::TimezoneSettings::GetInstance()->AddObserver(this); | 134 system::TimezoneSettings::GetInstance()->AddObserver(this); |
134 } | 135 } |
135 | 136 |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 FROM_HERE, | 914 FROM_HERE, |
914 base::Bind(&WallpaperManager::StartLoad, | 915 base::Bind(&WallpaperManager::StartLoad, |
915 base::Unretained(this), | 916 base::Unretained(this), |
916 email, | 917 email, |
917 info, | 918 info, |
918 update_wallpaper, | 919 update_wallpaper, |
919 valid_path)); | 920 valid_path)); |
920 } | 921 } |
921 | 922 |
922 } // chromeos | 923 } // chromeos |
OLD | NEW |