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

Unified Diff: system_utils.cc

Issue 6815021: [login_manager] Code to add the owner to the whitelist in a device policy (Closed) Base URL: http://git.chromium.org/git/login_manager.git@master
Patch Set: address gauravsh comments Created 9 years, 8 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
« no previous file with comments | « system_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: system_utils.cc
diff --git a/system_utils.cc b/system_utils.cc
index eee0e14257e0bb6c534c7abde4d7306070f4cc64..181f4fdda63dd232afa49a743eadfed2bb2841da 100644
--- a/system_utils.cc
+++ b/system_utils.cc
@@ -148,4 +148,19 @@ void SystemUtils::AppendToClobberLog(const char* msg) const {
appender.Run();
}
+void SystemUtils::SetGError(GError** error,
+ ChromeOSLoginError code,
+ const char* message) {
+ g_set_error(error, CHROMEOS_LOGIN_ERROR, code, "Login error: %s", message);
+}
+
+void SystemUtils::SetAndSendGError(ChromeOSLoginError code,
+ DBusGMethodInvocation* context,
+ const char* msg) {
+ GError* error = NULL;
+ SetGError(&error, code, msg);
+ dbus_g_method_return_error(context, error);
+ g_error_free(error);
+}
+
} // namespace login_manager
« no previous file with comments | « system_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698