summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/system_logs/lsb_release_log_source.cc
blob: 789673aa9aaeaea7093fdf98a36467e5769144c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/chromeos/system_logs/lsb_release_log_source.h"

#include "base/memory/scoped_ptr.h"
#include "base/sys_info.h"

namespace chromeos {

void LsbReleaseLogSource::Fetch(const SysLogsSourceCallback& callback) {
  DCHECK(!callback.is_null());
  scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse);
  const base::SysInfo::LsbReleaseMap& lsb_map =
      base::SysInfo::GetLsbReleaseMap();
  for (base::SysInfo::LsbReleaseMap::const_iterator iter = lsb_map.begin();
       iter != lsb_map.end(); ++iter) {
    (*response)[iter->first] = iter->second;
  }
  callback.Run(response.get());
}

}  // namespace chromeos