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 3 // found in the LICENSE file. 4 5 #include "chrome/browser/chromeos/system_logs/lsb_release_log_source.h" 6 7 #include "base/memory/scoped_ptr.h" 8 #include "base/sys_info.h" 9 10 namespace system_logs { 11 12 void LsbReleaseLogSource::Fetch(const SysLogsSourceCallback& callback) { 13 DCHECK(!callback.is_null()); 14 scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse); 15 const base::SysInfo::LsbReleaseMap& lsb_map = 16 base::SysInfo::GetLsbReleaseMap(); 17 for (base::SysInfo::LsbReleaseMap::const_iterator iter = lsb_map.begin(); 18 iter != lsb_map.end(); ++iter) { 19 (*response)[iter->first] = iter->second; 20 } 21 callback.Run(response.get()); 22 } 23 24 } // namespace system_logs 25