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

Side by Side Diff: chromeos/network/onc/onc_utils.h

Issue 11469026: Extending ONC validator's logging. Completing toplevel validation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@add_error_handling_to_validator
Patch Set: Rebased. 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
« no previous file with comments | « chromeos/network/onc/onc_translator_unittest.cc ('k') | chromeos/network/onc/onc_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
6 #define CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ 6 #define CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "chromeos/chromeos_export.h" 11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/network/onc/onc_constants.h" 12 #include "chromeos/network/onc/onc_constants.h"
13 13
14 namespace base { 14 namespace base {
15 class DictionaryValue; 15 class DictionaryValue;
16 } 16 }
17 17
18 namespace chromeos { 18 namespace chromeos {
19 namespace onc { 19 namespace onc {
20 20
21 // A valid but empty (no networks and no certificates) and unencrypted
22 // configuration.
23 CHROMEOS_EXPORT extern const char kEmptyUnencryptedConfiguration[];
24
21 // Parses |json| according to the JSON format. If |json| is a JSON formatted 25 // Parses |json| according to the JSON format. If |json| is a JSON formatted
22 // dictionary, the function returns the dictionary as a DictionaryValue. 26 // dictionary, the function returns the dictionary as a DictionaryValue.
23 // Otherwise returns NULL. 27 // Otherwise returns NULL.
24 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson( 28 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
25 const std::string& json); 29 const std::string& json);
26 30
27 // Decrypt the given EncryptedConfiguration |onc| (see the ONC specification) 31 // Decrypt the given EncryptedConfiguration |onc| (see the ONC specification)
28 // using |passphrase|. The resulting UnencryptedConfiguration is returned. If an 32 // using |passphrase|. The resulting UnencryptedConfiguration is returned. If an
29 // error occurs, returns NULL. 33 // error occurs, returns NULL.
30 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> Decrypt( 34 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> Decrypt(
31 const std::string& passphrase, 35 const std::string& passphrase,
32 const base::DictionaryValue& onc); 36 const base::DictionaryValue& onc);
33 37
34 // For logging only: strings not user facing. 38 // For logging only: strings not user facing.
35 CHROMEOS_EXPORT std::string GetSourceAsString(ONCSource source); 39 CHROMEOS_EXPORT std::string GetSourceAsString(ONCSource source);
36 40
37 } // chromeos 41 } // chromeos
38 } // onc 42 } // onc
39 43
40 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ 44 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translator_unittest.cc ('k') | chromeos/network/onc/onc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698