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

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

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
OLDNEW
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 <numeric> 7 #include <numeric>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 } 1314 }
1315 1315
1316 void WallpaperManager::RecordUma(User::WallpaperType type, int index) { 1316 void WallpaperManager::RecordUma(User::WallpaperType type, int index) {
1317 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Type", type, 1317 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Type", type,
1318 User::WALLPAPER_TYPE_COUNT); 1318 User::WALLPAPER_TYPE_COUNT);
1319 } 1319 }
1320 1320
1321 void WallpaperManager::SaveWallpaperInternal(const base::FilePath& path, 1321 void WallpaperManager::SaveWallpaperInternal(const base::FilePath& path,
1322 const char* data, 1322 const char* data,
1323 int size) { 1323 int size) {
1324 int written_bytes = file_util::WriteFile(path, data, size); 1324 int written_bytes = base::WriteFile(path, data, size);
1325 DCHECK(written_bytes == size); 1325 DCHECK(written_bytes == size);
1326 } 1326 }
1327 1327
1328 void WallpaperManager::StartLoad(const std::string& user_id, 1328 void WallpaperManager::StartLoad(const std::string& user_id,
1329 const WallpaperInfo& info, 1329 const WallpaperInfo& info,
1330 bool update_wallpaper, 1330 bool update_wallpaper,
1331 const base::FilePath& wallpaper_path, 1331 const base::FilePath& wallpaper_path,
1332 MovableOnDestroyCallbackHolder on_finish) { 1332 MovableOnDestroyCallbackHolder on_finish) {
1333 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1333 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1334 TRACE_EVENT_ASYNC_BEGIN0("ui", "LoadAndDecodeWallpaper", this); 1334 TRACE_EVENT_ASYNC_BEGIN0("ui", "LoadAndDecodeWallpaper", this);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 loading_.push_back(new WallpaperManager::PendingWallpaper( 1389 loading_.push_back(new WallpaperManager::PendingWallpaper(
1390 (delayed ? GetWallpaperLoadDelay() 1390 (delayed ? GetWallpaperLoadDelay()
1391 : base::TimeDelta::FromMilliseconds(0)), 1391 : base::TimeDelta::FromMilliseconds(0)),
1392 user_id)); 1392 user_id));
1393 pending_inactive_ = loading_.back(); 1393 pending_inactive_ = loading_.back();
1394 } 1394 }
1395 return pending_inactive_; 1395 return pending_inactive_;
1396 } 1396 }
1397 1397
1398 } // namespace chromeos 1398 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698