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

Side by Side Diff: chrome/browser/chromeos/system_logs/lsb_release_log_source.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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/system_logs/lsb_release_log_source.h" 5 #include "chrome/browser/chromeos/system_logs/lsb_release_log_source.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include <memory>
8
8 #include "base/sys_info.h" 9 #include "base/sys_info.h"
9 10
10 namespace system_logs { 11 namespace system_logs {
11 12
12 LsbReleaseLogSource::LsbReleaseLogSource() : SystemLogsSource("LsbRelease") { 13 LsbReleaseLogSource::LsbReleaseLogSource() : SystemLogsSource("LsbRelease") {
13 } 14 }
14 15
15 LsbReleaseLogSource::~LsbReleaseLogSource() { 16 LsbReleaseLogSource::~LsbReleaseLogSource() {
16 } 17 }
17 18
18 void LsbReleaseLogSource::Fetch(const SysLogsSourceCallback& callback) { 19 void LsbReleaseLogSource::Fetch(const SysLogsSourceCallback& callback) {
19 DCHECK(!callback.is_null()); 20 DCHECK(!callback.is_null());
20 scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse); 21 std::unique_ptr<SystemLogsResponse> response(new SystemLogsResponse);
21 const base::SysInfo::LsbReleaseMap& lsb_map = 22 const base::SysInfo::LsbReleaseMap& lsb_map =
22 base::SysInfo::GetLsbReleaseMap(); 23 base::SysInfo::GetLsbReleaseMap();
23 for (base::SysInfo::LsbReleaseMap::const_iterator iter = lsb_map.begin(); 24 for (base::SysInfo::LsbReleaseMap::const_iterator iter = lsb_map.begin();
24 iter != lsb_map.end(); ++iter) { 25 iter != lsb_map.end(); ++iter) {
25 (*response)[iter->first] = iter->second; 26 (*response)[iter->first] = iter->second;
26 } 27 }
27 callback.Run(response.get()); 28 callback.Run(response.get());
28 } 29 }
29 30
30 } // namespace system_logs 31 } // namespace system_logs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698