OLD | NEW |
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_EXTENSIONS_API_WEB_REQUEST_FORM_DATA_PARSER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_FORM_DATA_PARSER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_FORM_DATA_PARSER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_FORM_DATA_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class Result { | 24 class Result { |
25 public: | 25 public: |
26 Result(); | 26 Result(); |
27 ~Result(); | 27 ~Result(); |
28 const std::string& name() const { | 28 const std::string& name() const { |
29 return name_; | 29 return name_; |
30 } | 30 } |
31 const std::string& value() const { | 31 const std::string& value() const { |
32 return value_; | 32 return value_; |
33 } | 33 } |
34 void set_name(const base::StringPiece& str) { | |
35 str.CopyToString(&name_); | |
36 } | |
37 void set_value(const base::StringPiece& str) { | 34 void set_value(const base::StringPiece& str) { |
38 str.CopyToString(&value_); | 35 str.CopyToString(&value_); |
39 } | 36 } |
40 void set_name(const std::string& str) { | 37 void set_name(const std::string& str) { |
41 name_ = str; | 38 name_ = str; |
42 } | 39 } |
43 void set_value(const std::string& str) { | 40 void set_value(const std::string& str) { |
44 value_ = str; | 41 value_ = str; |
45 } | 42 } |
46 void Reset(); | |
47 | 43 |
48 private: | 44 private: |
49 std::string name_; | 45 std::string name_; |
50 std::string value_; | 46 std::string value_; |
51 | 47 |
52 DISALLOW_COPY_AND_ASSIGN(Result); | 48 DISALLOW_COPY_AND_ASSIGN(Result); |
53 }; | 49 }; |
54 | 50 |
55 virtual ~FormDataParser(); | 51 virtual ~FormDataParser(); |
56 | 52 |
(...skipping 23 matching lines...) Expand all Loading... |
80 protected: | 76 protected: |
81 FormDataParser(); | 77 FormDataParser(); |
82 | 78 |
83 private: | 79 private: |
84 DISALLOW_COPY_AND_ASSIGN(FormDataParser); | 80 DISALLOW_COPY_AND_ASSIGN(FormDataParser); |
85 }; | 81 }; |
86 | 82 |
87 } // namespace extensions | 83 } // namespace extensions |
88 | 84 |
89 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_FORM_DATA_PARSER_H_ | 85 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_FORM_DATA_PARSER_H_ |
OLD | NEW |