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

Side by Side Diff: chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.h

Issue 25242002: Support policies referencing external data for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 2013 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 CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_TEST_UTI L_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_TEST_UTI L_H_
7
8 #include <string>
9
10 #include "base/callback_forward.h"
11 #include "base/memory/scoped_ptr.h"
12
13 namespace base {
14 class DictionaryValue;
15 }
16
17 namespace policy {
18
19 class CloudPolicyCore;
20
21 namespace test {
22
23 // Passes |data| to |destination| and invokes |done_callback| to indicate that
24 // the |data| has been retrieved.
25 void ExternalDataFetchCallback(scoped_ptr<std::string>* destination,
26 const base::Closure& done_callback,
27 scoped_ptr<std::string> data);
28
29 // Constructs a value that points a policy referencing external data at |url|
30 // and sets the expected hash of the external data to that of |data|.
31 scoped_ptr<base::DictionaryValue> ConstructExternalDataReference(
32 const std::string& url,
33 const std::string& data);
34
35 // TODO(bartfab): Makes an arbitrary |policy| in |core| reference external data
36 // as specified in |metadata|. This is only done because there are no policies
37 // that reference external data yet. Once the first such policy is added, it
38 // will be sufficient to set its value to |metadata| and this method should be
39 // removed.
40 void SetExternalDataReference(CloudPolicyCore* core,
41 const std::string& policy,
42 scoped_ptr<base::DictionaryValue> metadata);
43
44 } // namespace test
45 } // namespace policy
46
47 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CLOUD_EXTERNAL_DATA_MANAGER_BASE_TEST_ UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698