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

Side by Side Diff: chrome/browser/chromeos/cros/onc_network_parser.h

Issue 10868076: Only import certificates with Web trust from ONC if the user is managed and matches the enterprise … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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_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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" // for OVERRIDE 10 #include "base/compiler_specific.h" // for OVERRIDE
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 PropertyIndex, 53 PropertyIndex,
54 const base::Value&, 54 const base::Value&,
55 Network*); 55 Network*);
56 56
57 OncNetworkParser(const std::string& onc_blob, 57 OncNetworkParser(const std::string& onc_blob,
58 const std::string& passphrase, 58 const std::string& passphrase,
59 NetworkUIData::ONCSource onc_source); 59 NetworkUIData::ONCSource onc_source);
60 virtual ~OncNetworkParser(); 60 virtual ~OncNetworkParser();
61 static const EnumMapper<PropertyIndex>* property_mapper(); 61 static const EnumMapper<PropertyIndex>* property_mapper();
62 62
63 // Certificates pushed from a policy source with Web trust are only imported
64 // with ParseCertificate() if this permission is granted.
65 void AllowWebTrustFromPolicy();
66
63 // Returns the number of networks in the "NetworkConfigs" list. 67 // Returns the number of networks in the "NetworkConfigs" list.
64 int GetNetworkConfigsSize() const; 68 int GetNetworkConfigsSize() const;
65 69
66 // Returns the network configuration dictionary for the nth network. CHECKs if 70 // Returns the network configuration dictionary for the nth network. CHECKs if
67 // |n| is out of range and returns NULL on parse errors. 71 // |n| is out of range and returns NULL on parse errors.
68 const base::DictionaryValue* GetNetworkConfig(int n); 72 const base::DictionaryValue* GetNetworkConfig(int n);
69 73
70 // Call to create the network by parsing network config in the nth position. 74 // Call to create the network by parsing network config in the nth position.
71 // (0-based). CHECKs if |n| is out of range and returns NULL on parse errors. 75 // (0-based). CHECKs if |n| is out of range and returns NULL on parse errors.
72 // |removed| is set to true if the network should be removed. |removed| may 76 // |removed| is set to true if the network should be removed. |removed| may
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 PropertyIndex index, 223 PropertyIndex index,
220 const base::Value& value, 224 const base::Value& value,
221 Network* network); 225 Network* network);
222 226
223 // Error message from the JSON parser, if applicable. 227 // Error message from the JSON parser, if applicable.
224 std::string parse_error_; 228 std::string parse_error_;
225 229
226 // Where the ONC blob comes from. 230 // Where the ONC blob comes from.
227 NetworkUIData::ONCSource onc_source_; 231 NetworkUIData::ONCSource onc_source_;
228 232
233 // Whether certificates with Web trust should be stored when pushed from a
234 // policy source.
235 bool allow_web_trust_from_policy_;
236
229 scoped_ptr<base::DictionaryValue> root_dict_; 237 scoped_ptr<base::DictionaryValue> root_dict_;
230 base::ListValue* network_configs_; 238 base::ListValue* network_configs_;
231 base::ListValue* certificates_; 239 base::ListValue* certificates_;
232 240
233 DISALLOW_COPY_AND_ASSIGN(OncNetworkParser); 241 DISALLOW_COPY_AND_ASSIGN(OncNetworkParser);
234 }; 242 };
235 243
236 // Class for parsing Ethernet networks. 244 // Class for parsing Ethernet networks.
237 class OncEthernetNetworkParser : public OncNetworkParser { 245 class OncEthernetNetworkParser : public OncNetworkParser {
238 public: 246 public:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 const base::Value& value, 329 const base::Value& value,
322 Network* network); 330 Network* network);
323 331
324 private: 332 private:
325 DISALLOW_COPY_AND_ASSIGN(OncVirtualNetworkParser); 333 DISALLOW_COPY_AND_ASSIGN(OncVirtualNetworkParser);
326 }; 334 };
327 335
328 } // namespace chromeos 336 } // namespace chromeos
329 337
330 #endif // CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ 338 #endif // CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698