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

Unified Diff: chromeos/dbus/auth_policy_client.cc

Issue 2644893002: Chromad: Increase D-Bus timeout for device policy fetch (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/auth_policy_client.cc
diff --git a/chromeos/dbus/auth_policy_client.cc b/chromeos/dbus/auth_policy_client.cc
index 43578e3f67470183c8f91813253e192220a804a6..6402d82ff8e3a839d63112d81722a7ef336f69a4 100644
--- a/chromeos/dbus/auth_policy_client.cc
+++ b/chromeos/dbus/auth_policy_client.cc
@@ -14,6 +14,10 @@ namespace chromeos {
namespace {
+// The first device policy fetch after joining Active Directory can be very slow
+// because machine credentials need to propagate through the AD deployment.
+const int kRefreshDevicePolicyTimeoutMilliseconds = 90000;
+
authpolicy::ErrorType GetErrorFromReader(dbus::MessageReader* reader) {
int32_t int_error;
if (!reader->PopInt32(&int_error)) {
@@ -64,7 +68,7 @@ class AuthPolicyClientImpl : public AuthPolicyClient {
dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
authpolicy::kAuthPolicyRefreshDevicePolicy);
proxy_->CallMethod(
- &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ &method_call, kRefreshDevicePolicyTimeoutMilliseconds,
base::Bind(&AuthPolicyClientImpl::HandleRefreshPolicyCallback,
weak_ptr_factory_.GetWeakPtr(), callback));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698