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

Side by Side Diff: chrome/browser/chromeos/network_settings/onc_normalizer.h

Issue 11415148: Adding error handling to ONC validation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@extract_onc_certificate
Patch Set: Initial patch. Created 8 years 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
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_NETWORK_SETTINGS_ONC_NORMALIZER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_NORMALIZER_H_
6 #define CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_NORMALIZER_H_ 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_NORMALIZER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/network_settings/onc_mapper.h" 9 #include "chrome/browser/chromeos/network_settings/onc_mapper.h"
10 10
(...skipping 14 matching lines...) Expand all
25 // there). |object_signature| must point to one of the signatures in 25 // there). |object_signature| must point to one of the signatures in
26 // |onc_signature.h|. 26 // |onc_signature.h|.
27 scoped_ptr<base::DictionaryValue> NormalizeObject( 27 scoped_ptr<base::DictionaryValue> NormalizeObject(
28 const OncValueSignature* object_signature, 28 const OncValueSignature* object_signature,
29 const base::DictionaryValue& onc_object); 29 const base::DictionaryValue& onc_object);
30 30
31 private: 31 private:
32 // Dispatch to the right normalization function according to |signature|. 32 // Dispatch to the right normalization function according to |signature|.
33 virtual scoped_ptr<base::DictionaryValue> MapObject( 33 virtual scoped_ptr<base::DictionaryValue> MapObject(
34 const OncValueSignature& signature, 34 const OncValueSignature& signature,
35 const base::DictionaryValue& onc_object) OVERRIDE; 35 const base::DictionaryValue& onc_object,
36 bool* error) OVERRIDE;
36 37
37 void NormalizeIPsec(base::DictionaryValue* ipsec); 38 void NormalizeIPsec(base::DictionaryValue* ipsec);
38 void NormalizeVPN(base::DictionaryValue* vpn); 39 void NormalizeVPN(base::DictionaryValue* vpn);
39 void NormalizeNetworkConfiguration(base::DictionaryValue* network); 40 void NormalizeNetworkConfiguration(base::DictionaryValue* network);
40 41
41 const bool remove_recommended_fields_; 42 const bool remove_recommended_fields_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(Normalizer); 44 DISALLOW_COPY_AND_ASSIGN(Normalizer);
44 }; 45 };
45 46
46 } // namespace onc 47 } // namespace onc
47 } // namespace chromeos 48 } // namespace chromeos
48 49
49 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_NORMALIZER_H_ 50 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_NORMALIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698