summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/system/name_value_pairs_parser.h
diff options
context:
space:
mode:
authordubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 16:11:03 +0000
committerdubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 16:11:03 +0000
commit03394c7ce3612de7b5b6cb7cea95bc689abd2205 (patch)
treeb27f551a180897d9c1dbc8da5e521cdb6131524a /chrome/browser/chromeos/system/name_value_pairs_parser.h
parentc5e22aee57bd524acf0fb620192a05cdcfc4c1ab (diff)
downloadchromium_src-03394c7ce3612de7b5b6cb7cea95bc689abd2205.zip
chromium_src-03394c7ce3612de7b5b6cb7cea95bc689abd2205.tar.gz
chromium_src-03394c7ce3612de7b5b6cb7cea95bc689abd2205.tar.bz2
Add dev switch boot mode to device policy status reports.
Also modified NameValuePairsParser to support reading the output from /usr/bin/crossystem. BUG=chromium-os:22035 TEST=New unit test added to DeviceStatusCollectorTest & new unit_test added to NamesValuePairsParser unit test. Review URL: http://codereview.chromium.org/8961012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/system/name_value_pairs_parser.h')
-rw-r--r--chrome/browser/chromeos/system/name_value_pairs_parser.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/system/name_value_pairs_parser.h b/chrome/browser/chromeos/system/name_value_pairs_parser.h
index faf81b8..bcf4f43 100644
--- a/chrome/browser/chromeos/system/name_value_pairs_parser.h
+++ b/chrome/browser/chromeos/system/name_value_pairs_parser.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,7 +8,6 @@
#include <map>
#include <string>
-#include <vector>
#include "base/basictypes.h"
@@ -40,13 +39,29 @@ class NameValuePairsParser {
const std::string& eq,
const std::string& delim);
- // This will parse strings with output in the format:
+ // These will parse strings with output in the format:
// <key><EQ><value><DELIM>[<key><EQ><value>][...]
// e.g. ParseNameValuePairs("key1=value1 key2=value2", "=", " ")
bool ParseNameValuePairs(const std::string& in_string,
const std::string& eq,
const std::string& delim);
+ // This version allows for values which end with a comment
+ // beginning with comment_delim.
+ // e.g."key2=value2 # Explanation of value\n"
+ bool ParseNameValuePairsWithComments(const std::string& in_string,
+ const std::string& eq,
+ const std::string& delim,
+ const std::string& comment_delim);
+
+ bool ParseNameValuePairsFromTool(
+ int argc,
+ const char* argv[],
+ const std::string& eq,
+ const std::string& delim,
+ const std::string& comment_delim);
+
+ private:
NameValueMap* map_;
DISALLOW_COPY_AND_ASSIGN(NameValuePairsParser);