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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 <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"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 content::NotificationService::AllSources()); 116 content::NotificationService::AllSources());
117 sequence_token_ = BrowserThread::GetBlockingPool()-> 117 sequence_token_ = BrowserThread::GetBlockingPool()->
118 GetNamedSequenceToken(kWallpaperSequenceTokenName); 118 GetNamedSequenceToken(kWallpaperSequenceTokenName);
119 task_runner_ = BrowserThread::GetBlockingPool()-> 119 task_runner_ = BrowserThread::GetBlockingPool()->
120 GetSequencedTaskRunnerWithShutdownBehavior( 120 GetSequencedTaskRunnerWithShutdownBehavior(
121 sequence_token_, 121 sequence_token_,
122 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); 122 base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
123 } 123 }
124 124
125 // static 125 // static
126 void WallpaperManager::RegisterPrefs(PrefServiceSimple* local_state) { 126 void WallpaperManager::RegisterPrefs(PrefRegistrarSimple* local_state) {
127 local_state->RegisterDictionaryPref(prefs::kUsersWallpaperInfo); 127 local_state->RegisterDictionaryPref(prefs::kUsersWallpaperInfo);
128 local_state->RegisterDictionaryPref(kUserWallpapers); 128 local_state->RegisterDictionaryPref(kUserWallpapers);
129 local_state->RegisterDictionaryPref(kUserWallpapersProperties); 129 local_state->RegisterDictionaryPref(kUserWallpapersProperties);
130 } 130 }
131 131
132 void WallpaperManager::AddObservers() { 132 void WallpaperManager::AddObservers() {
133 if (!DBusThreadManager::Get()->GetRootPowerManagerClient()->HasObserver(this)) 133 if (!DBusThreadManager::Get()->GetRootPowerManagerClient()->HasObserver(this))
134 DBusThreadManager::Get()->GetRootPowerManagerClient()->AddObserver(this); 134 DBusThreadManager::Get()->GetRootPowerManagerClient()->AddObserver(this);
135 system::TimezoneSettings::GetInstance()->AddObserver(this); 135 system::TimezoneSettings::GetInstance()->AddObserver(this);
136 } 136 }
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 FROM_HERE, 909 FROM_HERE,
910 base::Bind(&WallpaperManager::StartLoad, 910 base::Bind(&WallpaperManager::StartLoad,
911 base::Unretained(this), 911 base::Unretained(this),
912 email, 912 email,
913 info, 913 info,
914 update_wallpaper, 914 update_wallpaper,
915 valid_path)); 915 valid_path));
916 } 916 }
917 917
918 } // chromeos 918 } // chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698