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

Side by Side Diff: chromeos/system/name_value_pairs_parser.h

Issue 14643006: [chromeos] Remove dependencies of StatisticsProvider on chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_NAME_VALUE_PAIRS_PARSER_H_ 5 #ifndef CHROMEOS_SYSTEM_NAME_VALUE_PAIRS_PARSER_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_NAME_VALUE_PAIRS_PARSER_H_ 6 #define CHROMEOS_SYSTEM_NAME_VALUE_PAIRS_PARSER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chromeos/chromeos_export.h"
12 13
13 namespace base { 14 namespace base {
14 class FilePath; 15 class FilePath;
15 } 16 }
16 17
17 namespace chromeos { 18 namespace chromeos {
18 namespace system { 19 namespace system {
19 20
20 // The parser is used to get machine info as name-value pairs. Defined 21 // The parser is used to get machine info as name-value pairs. Defined
21 // here to be accessible by tests. 22 // here to be accessible by tests.
22 class NameValuePairsParser { 23 class CHROMEOS_EXPORT NameValuePairsParser {
23 public: 24 public:
24 typedef std::map<std::string, std::string> NameValueMap; 25 typedef std::map<std::string, std::string> NameValueMap;
25 26
26 // The obtained info will be written into the given map. 27 // The obtained info will be written into the given map.
27 explicit NameValuePairsParser(NameValueMap* map); 28 explicit NameValuePairsParser(NameValueMap* map);
28 29
29 void AddNameValuePair(const std::string& key, const std::string& value); 30 void AddNameValuePair(const std::string& key, const std::string& value);
30 31
31 // Executes tool and inserts (key, <output>) into map_. 32 // Executes tool and inserts (key, <output>) into map_.
32 // The program name (argv[0]) should be an absolute path. The function 33 // The program name (argv[0]) should be an absolute path. The function
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 73
73 private: 74 private:
74 NameValueMap* map_; 75 NameValueMap* map_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(NameValuePairsParser); 77 DISALLOW_COPY_AND_ASSIGN(NameValuePairsParser);
77 }; 78 };
78 79
79 } // namespace system 80 } // namespace system
80 } // namespace chromeos 81 } // namespace chromeos
81 82
82 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_NAME_VALUE_PAIRS_PARSER_H_ 83 #endif // CHROMEOS_SYSTEM_NAME_VALUE_PAIRS_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698