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 |