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

Unified Diff: chrome/browser/chromeos/cros/login_library.cc

Issue 7233006: Store/Retrieve CrOS user policy in session_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback. Created 9 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/login_library.cc
diff --git a/chrome/browser/chromeos/cros/login_library.cc b/chrome/browser/chromeos/cros/login_library.cc
index d9f3734a365e60c57e47b12f20b2cbfeca465f9e..6a981e2004b1b45f8be51a36d17dba87adc38430 100644
--- a/chrome/browser/chromeos/cros/login_library.cc
+++ b/chrome/browser/chromeos/cros/login_library.cc
@@ -40,17 +40,31 @@ class LoginLibraryImpl : public LoginLibrary {
}
void RequestRetrievePolicy(RetrievePolicyCallback callback, void* delegate) {
- DCHECK(callback) << "must provide a callback to RequestRetrievePolicy()";
+ DCHECK(callback) << "must provide a callback!";
chromeos::RetrievePolicy(callback, delegate);
}
void RequestStorePolicy(const std::string& policy,
StorePolicyCallback callback,
void* delegate) {
- DCHECK(callback) << "must provide a callback to StorePolicy()";
+ DCHECK(callback) << "must provide a callback!";
chromeos::StorePolicy(policy.c_str(), policy.length(), callback, delegate);
}
+ void RequestRetrieveUserPolicy(RetrievePolicyCallback callback,
+ void* delegate) {
+ DCHECK(callback) << "must provide a callback!";
+ chromeos::RetrieveUserPolicy(callback, delegate);
+ }
+
+ void RequestStoreUserPolicy(const std::string& policy,
+ StorePolicyCallback callback,
+ void* delegate) {
+ DCHECK(callback) << "must provide a callback!";
+ chromeos::StoreUserPolicy(policy.c_str(), policy.length(),
+ callback, delegate);
+ }
+
bool StartSession(const std::string& user_email,
const std::string& unique_id /* unused */) {
// only pass unique_id through once we use it for something.
@@ -222,6 +236,15 @@ class LoginLibraryStubImpl : public LoginLibrary {
void* delegate) {
callback(delegate, true);
}
+ void RequestRetrieveUserPolicy(RetrievePolicyCallback callback,
+ void* delegate) {
+ callback(delegate, "", 0);
+ }
+ void RequestStoreUserPolicy(const std::string& policy,
+ StorePolicyCallback callback,
+ void* delegate) {
+ callback(delegate, true);
+ }
bool StartSession(const std::string& user_email,
const std::string& unique_id /* unused */) { return true; }
bool StopSession(const std::string& unique_id /* unused */) { return true; }

Powered by Google App Engine
This is Rietveld 408576698