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

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: build fix Created 9 years, 5 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 af42d4ab0fd593443c964e738a1a512d35421387..21d413440f01fed8704bccc891617557ab3a3877 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