OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LOGIN_SIGNED_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/values.h" | |
Mattias Nissler (ping if slow)
2011/11/18 14:24:42
forward declaration should suffice?
pastarmovj
2011/11/22 12:13:58
Done.
| |
13 #include "chrome/browser/chromeos/login/owner_manager.h" | 14 #include "chrome/browser/chromeos/login/owner_manager.h" |
14 | 15 |
15 // There are two categories of operations that can be performed on the | 16 // There are two categories of operations that can be performed on the |
16 // Chrome OS owner-signed settings store: | 17 // Chrome OS owner-signed settings store: |
17 // 1) doing stuff to the whitelist (adding/removing/checking) | 18 // 1) doing stuff to the whitelist (adding/removing/checking) |
18 // 2) Storing/Retrieving arbitrary name=value pairs | 19 // 2) Storing/Retrieving arbitrary name=value pairs |
19 // | 20 // |
20 // Unfortunately, it is currently a limitation that only one of each | 21 // Unfortunately, it is currently a limitation that only one of each |
21 // category can be in-flight at a time. You can be doing exactly one thing | 22 // category can be in-flight at a time. You can be doing exactly one thing |
22 // to the whitelist, and exactly one thing to the property store at a time. | 23 // to the whitelist, and exactly one thing to the property store at a time. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 SignedSettings::Delegate<bool>* d); | 68 SignedSettings::Delegate<bool>* d); |
68 | 69 |
69 static SignedSettings* CreateWhitelistOp(const std::string& email, | 70 static SignedSettings* CreateWhitelistOp(const std::string& email, |
70 bool add_to_whitelist, | 71 bool add_to_whitelist, |
71 SignedSettings::Delegate<bool>* d); | 72 SignedSettings::Delegate<bool>* d); |
72 | 73 |
73 // These are both "property" operations, and only one instance of | 74 // These are both "property" operations, and only one instance of |
74 // one type can be in flight at a time. | 75 // one type can be in flight at a time. |
75 static SignedSettings* CreateStorePropertyOp( | 76 static SignedSettings* CreateStorePropertyOp( |
76 const std::string& name, | 77 const std::string& name, |
77 const std::string& value, | 78 const base::Value& value, |
78 SignedSettings::Delegate<bool>* d); | 79 SignedSettings::Delegate<bool>* d); |
79 | 80 |
80 static SignedSettings* CreateRetrievePropertyOp( | 81 static SignedSettings* CreateRetrievePropertyOp( |
81 const std::string& name, | 82 const std::string& name, |
82 SignedSettings::Delegate<std::string>* d); | 83 SignedSettings::Delegate<const base::Value*>* d); |
83 | 84 |
84 // These are both "policy" operations, and only one instance of | 85 // These are both "policy" operations, and only one instance of |
85 // one type can be in flight at a time. | 86 // one type can be in flight at a time. |
86 static SignedSettings* CreateStorePolicyOp( | 87 static SignedSettings* CreateStorePolicyOp( |
87 em::PolicyFetchResponse* policy, | 88 em::PolicyFetchResponse* policy, |
88 SignedSettings::Delegate<bool>* d); | 89 SignedSettings::Delegate<bool>* d); |
89 | 90 |
90 static SignedSettings* CreateRetrievePolicyOp( | 91 static SignedSettings* CreateRetrievePolicyOp( |
91 SignedSettings::Delegate<const em::PolicyFetchResponse&>* d); | 92 SignedSettings::Delegate<const em::PolicyFetchResponse&>* d); |
92 | 93 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 static const char kDevicePolicyType[]; | 135 static const char kDevicePolicyType[]; |
135 | 136 |
136 scoped_ptr<Relay> relay_; | 137 scoped_ptr<Relay> relay_; |
137 scoped_refptr<SignedSettings> polfetcher_; | 138 scoped_refptr<SignedSettings> polfetcher_; |
138 DISALLOW_COPY_AND_ASSIGN(SignedSettings); | 139 DISALLOW_COPY_AND_ASSIGN(SignedSettings); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace chromeos | 142 } // namespace chromeos |
142 | 143 |
143 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_H_ | 144 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_H_ |
OLD | NEW |