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

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: Review changes 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
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
13 namespace base {
14 class DictionaryValue;
15 }
16
17 namespace chromeos {
18 namespace onc {
19
20 // Parses |json| according to the JSON format. If |json| is a JSON formatted
21 // dictionary, the function returns the dictionary as a DictionaryValue.
22 // Otherwise returns NULL.
23 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
24 const std::string& json);
25
26 // Decrypt the given EncryptedConfiguration |onc| (see the ONC specification)
27 // using |passphrase|. The resulting UnencryptedConfiguration is returned. If an
28 // error occurs, returns NULL.
29 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> Decrypt(
30 const std::string& passphrase,
31 const base::DictionaryValue& onc);
32
33 } // chromeos
34 } // onc
35
36 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698