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

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: rebaesd 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 set_allow_web_trust_from_policy(bool allow) {
66 allow_web_trust_from_policy_ = allow;
67 }
68
63 // Returns the number of networks in the "NetworkConfigs" list. 69 // Returns the number of networks in the "NetworkConfigs" list.
64 int GetNetworkConfigsSize() const; 70 int GetNetworkConfigsSize() const;
65 71
66 // Returns the network configuration dictionary for the nth network. CHECKs if 72 // Returns the network configuration dictionary for the nth network. CHECKs if
67 // |n| is out of range and returns NULL on parse errors. 73 // |n| is out of range and returns NULL on parse errors.
68 const base::DictionaryValue* GetNetworkConfig(int n); 74 const base::DictionaryValue* GetNetworkConfig(int n);
69 75
70 // Call to create the network by parsing network config in the nth position. 76 // 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. 77 // (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 78 // |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, 225 PropertyIndex index,
220 const base::Value& value, 226 const base::Value& value,
221 Network* network); 227 Network* network);
222 228
223 // Error message from the JSON parser, if applicable. 229 // Error message from the JSON parser, if applicable.
224 std::string parse_error_; 230 std::string parse_error_;
225 231
226 // Where the ONC blob comes from. 232 // Where the ONC blob comes from.
227 NetworkUIData::ONCSource onc_source_; 233 NetworkUIData::ONCSource onc_source_;
228 234
235 // Whether certificates with Web trust should be stored when pushed from a
236 // policy source.
237 bool allow_web_trust_from_policy_;
238
229 scoped_ptr<base::DictionaryValue> root_dict_; 239 scoped_ptr<base::DictionaryValue> root_dict_;
230 base::ListValue* network_configs_; 240 base::ListValue* network_configs_;
231 base::ListValue* certificates_; 241 base::ListValue* certificates_;
232 242
233 DISALLOW_COPY_AND_ASSIGN(OncNetworkParser); 243 DISALLOW_COPY_AND_ASSIGN(OncNetworkParser);
234 }; 244 };
235 245
236 // Class for parsing Ethernet networks. 246 // Class for parsing Ethernet networks.
237 class OncEthernetNetworkParser : public OncNetworkParser { 247 class OncEthernetNetworkParser : public OncNetworkParser {
238 public: 248 public:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 const base::Value& value, 331 const base::Value& value,
322 Network* network); 332 Network* network);
323 333
324 private: 334 private:
325 DISALLOW_COPY_AND_ASSIGN(OncVirtualNetworkParser); 335 DISALLOW_COPY_AND_ASSIGN(OncVirtualNetworkParser);
326 }; 336 };
327 337
328 } // namespace chromeos 338 } // namespace chromeos
329 339
330 #endif // CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_ 340 #endif // CHROME_BROWSER_CHROMEOS_CROS_ONC_NETWORK_PARSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_impl_base.cc ('k') | chrome/browser/chromeos/cros/onc_network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698