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

Unified Diff: chrome/browser/chromeos/system/statistics_provider.cc

Issue 10127009: Make NameValuePairsParser support values that contain the 'equal' separator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/system/statistics_provider.cc
diff --git a/chrome/browser/chromeos/system/statistics_provider.cc b/chrome/browser/chromeos/system/statistics_provider.cc
index 0d6798f8f6890f4ac82208f2c60eca24ffe59bfe..82d7bef94cda707601a6c5ed5f34e5a8331d6229 100644
--- a/chrome/browser/chromeos/system/statistics_provider.cc
+++ b/chrome/browser/chromeos/system/statistics_provider.cc
@@ -139,9 +139,12 @@ void StatisticsProviderImpl::LoadMachineStatistics() {
NameValuePairsParser parser(&machine_info_);
// Parse all of the key/value pairs from the crossystem tool.
- parser.ParseNameValuePairsFromTool(
- arraysize(kCrosSystemTool), kCrosSystemTool, kCrosSystemEq,
- kCrosSystemDelim, kCrosSystemCommentDelim);
+ if (!parser.ParseNameValuePairsFromTool(
+ arraysize(kCrosSystemTool), kCrosSystemTool, kCrosSystemEq,
+ kCrosSystemDelim, kCrosSystemCommentDelim)) {
+ LOG(WARNING) << "There were errors parsing the output of "
+ << kCrosSystemTool << ".";
+ }
// Ensure that the hardware class key is present with the expected
// key name, and if it couldn't be retrieved, that the value is "unknown".

Powered by Google App Engine
This is Rietveld 408576698