| Index: chrome/browser/chromeos/system/name_value_pairs_parser.cc
|
| diff --git a/chrome/browser/chromeos/system/name_value_pairs_parser.cc b/chrome/browser/chromeos/system/name_value_pairs_parser.cc
|
| index 4b326592546f6015e631f16a4855e420621fffca..51ee327d20a1b562f15f58c45138c68cf7c4b405 100644
|
| --- a/chrome/browser/chromeos/system/name_value_pairs_parser.cc
|
| +++ b/chrome/browser/chromeos/system/name_value_pairs_parser.cc
|
| @@ -72,14 +72,14 @@ bool NameValuePairsParser::GetSingleValueFromTool(int argc,
|
| DCHECK_GE(argc, 1);
|
|
|
| if (!file_util::PathExists(FilePath(argv[0]))) {
|
| - LOG(ERROR) << argv[0] << " not found";
|
| + LOG(WARNING) << "Tool for statistics not found: " << argv[0];
|
| return false;
|
| }
|
|
|
| CommandLine command_line(argc, argv);
|
| std::string output_string;
|
| if (!base::GetAppOutput(command_line, &output_string)) {
|
| - LOG(ERROR) << "Error executing: " << command_line.GetCommandLineString();
|
| + LOG(WARNING) << "Error executing: " << command_line.GetCommandLineString();
|
| return false;
|
| }
|
| TrimWhitespaceASCII(output_string, TRIM_ALL, &output_string);
|
| @@ -87,5 +87,16 @@ bool NameValuePairsParser::GetSingleValueFromTool(int argc,
|
| return true;
|
| }
|
|
|
| +void NameValuePairsParser::GetNameValuePairsFromFile(const FilePath& file_path,
|
| + const std::string& eq,
|
| + const std::string& delim) {
|
| + std::string contents;
|
| + if (file_util::ReadFileToString(file_path, &contents)) {
|
| + ParseNameValuePairs(contents, eq, delim);
|
| + } else {
|
| + LOG(WARNING) << "Unable to read statistics file: " << file_path.value();
|
| + }
|
| +}
|
| +
|
| } // namespace system
|
| } // namespace chromeos
|
|
|