Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_LSBRELEASE_LOG_SOURCE_H_ | |
| 5 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_LSBRELEASE_LOG_SOURCE_H_ | |
| 6 | |
| 7 #include "chrome/browser/chromeos/system_logs/system_logs_fetcher.h" | |
| 8 | |
| 9 namespace chromeos { | |
| 10 | |
| 11 // Fetches release information form /etc/lsb-release file. | |
| 12 class LsbReleaseLogSource : public SystemLogsSource { | |
| 13 public: | |
| 14 LsbReleaseLogSource() {} | |
| 15 virtual ~LsbReleaseLogSource() {} | |
| 16 | |
| 17 // SystemLogsSource override. | |
| 18 virtual void Fetch(const SysLogsFetcherCallback& callback) OVERRIDE; | |
| 19 | |
| 20 // For testing. Parses a key=value string. | |
|
satorux1
2012/08/15 22:01:09
please describe more. this accepts multiple lines,
tudalex(Chromium)
2012/08/16 01:08:57
Done.
| |
| 21 static void ParseLSBRelease(const std::string lsb_data, | |
|
satorux1
2012/08/15 22:01:09
const std::string&
tudalex(Chromium)
2012/08/16 01:08:57
Done.
| |
| 22 SystemLogsResponse* response); | |
| 23 | |
| 24 private: | |
| 25 // Gets the info from the /etc/lsb-release and parses it | |
| 26 static void ReadLSBRelease(SystemLogsResponse* response); | |
| 27 | |
| 28 DISALLOW_COPY_AND_ASSIGN(LsbReleaseLogSource); | |
| 29 }; | |
| 30 | |
| 31 } // namespace chromeos | |
| 32 | |
| 33 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_LSBRELEASE_LOG_SOURCE_H_ | |
| OLD | NEW |