| Index: chrome/browser/chromeos/cros/onc_network_parser.h
|
| diff --git a/chrome/browser/chromeos/cros/onc_network_parser.h b/chrome/browser/chromeos/cros/onc_network_parser.h
|
| index 66d382e41af2bef99548c60694cf9ee4f0f953ad..155dd758572ff56ab8e38c030c5389741636f2d9 100644
|
| --- a/chrome/browser/chromeos/cros/onc_network_parser.h
|
| +++ b/chrome/browser/chromeos/cros/onc_network_parser.h
|
| @@ -18,6 +18,10 @@ class ListValue;
|
| class Value;
|
| }
|
|
|
| +namespace net {
|
| +class X509Certificate;
|
| +}
|
| +
|
| namespace chromeos {
|
|
|
| // This is the network parser that parses the data from an Open Network
|
| @@ -35,16 +39,17 @@ class OncNetworkParser : public NetworkParser {
|
| // Returns the number of networks in the "NetworkConfigs" list.
|
| int GetNetworkConfigsSize() const;
|
|
|
| - // Returns the number of certificates in the "Certificates" list.
|
| - int GetCertificatesSize() const;
|
| -
|
| // Call to create the network by parsing network config in the nth position.
|
| // (0-based). Returns NULL if there's a parse error or if n is out of range.
|
| Network* ParseNetwork(int n);
|
|
|
| + // Returns the number of certificates in the "Certificates" list.
|
| + int GetCertificatesSize() const;
|
| +
|
| // Call to parse and import the nth certificate in the certificate
|
| - // list. Returns false on failure.
|
| - bool ParseCertificate(int n);
|
| + // list into the certificate store. Returns a NULL refptr if
|
| + // there's a parse error or if n is out of range.
|
| + scoped_refptr<net::X509Certificate> ParseCertificate(int n);
|
|
|
| virtual Network* CreateNetworkFromInfo(const std::string& service_path,
|
| const base::DictionaryValue& info) OVERRIDE;
|
| @@ -64,12 +69,14 @@ class OncNetworkParser : public NetworkParser {
|
| std::string GetTypeFromDictionary(const base::DictionaryValue& info);
|
|
|
| private:
|
| - bool ParseServerOrCaCertificate(
|
| + scoped_refptr<net::X509Certificate> ParseServerOrCaCertificate(
|
| int cert_index,
|
| const std::string& cert_type,
|
| + const std::string& guid,
|
| base::DictionaryValue* certificate);
|
| - bool ParseClientCertificate(
|
| + scoped_refptr<net::X509Certificate> ParseClientCertificate(
|
| int cert_index,
|
| + const std::string& guid,
|
| base::DictionaryValue* certificate);
|
|
|
| // Error message from the JSON parser, if applicable.
|
|
|