OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CROS_ONC_NETWORK_PARSER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 virtual Network* CreateNewNetwork(ConnectionType type, | 57 virtual Network* CreateNewNetwork(ConnectionType type, |
58 const std::string& service_path) OVERRIDE; | 58 const std::string& service_path) OVERRIDE; |
59 virtual ConnectionType ParseType(const std::string& type) OVERRIDE; | 59 virtual ConnectionType ParseType(const std::string& type) OVERRIDE; |
60 virtual ConnectionType ParseTypeFromDictionary( | 60 virtual ConnectionType ParseTypeFromDictionary( |
61 const base::DictionaryValue& info) OVERRIDE; | 61 const base::DictionaryValue& info) OVERRIDE; |
62 | 62 |
63 // Returns the type string from the dictionary of network values. | 63 // Returns the type string from the dictionary of network values. |
64 std::string GetTypeFromDictionary(const base::DictionaryValue& info); | 64 std::string GetTypeFromDictionary(const base::DictionaryValue& info); |
65 | 65 |
| 66 // Returns the GUID string from the dictionary of network values. |
| 67 std::string GetGuidFromDictionary(const base::DictionaryValue& info); |
| 68 |
66 private: | 69 private: |
67 bool ParseServerOrCaCertificate( | 70 bool ParseServerOrCaCertificate( |
68 int cert_index, | 71 int cert_index, |
69 const std::string& cert_type, | 72 const std::string& cert_type, |
70 base::DictionaryValue* certificate); | 73 base::DictionaryValue* certificate); |
71 bool ParseClientCertificate( | 74 bool ParseClientCertificate( |
72 int cert_index, | 75 int cert_index, |
73 base::DictionaryValue* certificate); | 76 base::DictionaryValue* certificate); |
74 | 77 |
75 // Error message from the JSON parser, if applicable. | 78 // Error message from the JSON parser, if applicable. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 const base::Value& value, | 129 const base::Value& value, |
127 VirtualNetwork* network); | 130 VirtualNetwork* network); |
128 ProviderType ParseProviderType(const std::string& type); | 131 ProviderType ParseProviderType(const std::string& type); |
129 private: | 132 private: |
130 DISALLOW_COPY_AND_ASSIGN(OncVirtualNetworkParser); | 133 DISALLOW_COPY_AND_ASSIGN(OncVirtualNetworkParser); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace chromeos | 136 } // namespace chromeos |
134 | 137 |
135 #endif // CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ | 138 #endif // CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ |
OLD | NEW |