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

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

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests 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 | Annotate | Revision Log
« 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
6 #define CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/network/onc/onc_constants.h"
13
14 namespace base {
15 class DictionaryValue;
16 }
17
18 namespace chromeos {
19 namespace onc {
20
21 // Parses |json| according to the JSON format. If |json| is a JSON formatted
22 // dictionary, the function returns the dictionary as a DictionaryValue.
23 // Otherwise returns NULL.
24 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
25 const std::string& json);
26
27 // Decrypt the given EncryptedConfiguration |onc| (see the ONC specification)
28 // using |passphrase|. The resulting UnencryptedConfiguration is returned. If an
29 // error occurs, returns NULL.
30 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> Decrypt(
31 const std::string& passphrase,
32 const base::DictionaryValue& onc);
33
34 // For logging only: strings not user facing.
35 CHROMEOS_EXPORT std::string GetSourceAsString(ONCSource source);
36
37 } // chromeos
38 } // onc
39
40 #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