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

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

Issue 9835080: Revert 128663 - Linux ChromiumOS Tester crashing in OnDesktopBackgroundChanged() from GetUserWallpa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 SaveUserDefaultImageIndex(username, image_id); 907 SaveUserDefaultImageIndex(username, image_id);
908 } 908 }
909 909
910 int UserManagerImpl::GetUserWallpaper(const std::string& username) { 910 int UserManagerImpl::GetUserWallpaper(const std::string& username) {
911 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 911 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
912 912
913 PrefService* local_state = g_browser_process->local_state(); 913 PrefService* local_state = g_browser_process->local_state();
914 const DictionaryValue* user_wallpapers = 914 const DictionaryValue* user_wallpapers =
915 local_state->GetDictionary(UserManager::kUserWallpapers); 915 local_state->GetDictionary(UserManager::kUserWallpapers);
916 int index = ash::GetDefaultWallpaperIndex(); 916 int index = ash::GetDefaultWallpaperIndex();
917 if (!user_wallpapers->GetIntegerWithoutPathExpansion(username, &index)) 917 user_wallpapers->GetIntegerWithoutPathExpansion(username,
918 SaveWallpaperDefaultIndex(username, index); 918 &index);
919 return index; 919 return index;
920 } 920 }
921 921
922 void UserManagerImpl::SaveWallpaperDefaultIndex(const std::string& username, 922 void UserManagerImpl::SaveWallpaperDefaultIndex(const std::string& username,
923 int wallpaper_index) { 923 int wallpaper_index) {
924 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 924 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
925 925
926 PrefService* local_state = g_browser_process->local_state(); 926 PrefService* local_state = g_browser_process->local_state();
927 DictionaryPrefUpdate wallpapers_update(local_state, 927 DictionaryPrefUpdate wallpapers_update(local_state,
928 UserManager::kUserWallpapers); 928 UserManager::kUserWallpapers);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 BrowserThread::PostTask( 1218 BrowserThread::PostTask(
1219 BrowserThread::FILE, 1219 BrowserThread::FILE,
1220 FROM_HERE, 1220 FROM_HERE,
1221 base::Bind(&UserManagerImpl::DeleteUserImage, 1221 base::Bind(&UserManagerImpl::DeleteUserImage,
1222 base::Unretained(this), 1222 base::Unretained(this),
1223 image_path)); 1223 image_path));
1224 } 1224 }
1225 } 1225 }
1226 1226
1227 } // namespace chromeos 1227 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698