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

Unified Diff: chrome/browser/local_discovery/privet_http_impl.cc

Issue 69393003: Add minimum timeout for transient errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/local_discovery/privet_http_impl.cc
diff --git a/chrome/browser/local_discovery/privet_http_impl.cc b/chrome/browser/local_discovery/privet_http_impl.cc
index bbc2786d067065c7212d575dbcc15b5f26df477b..0685cb274d00f8da831444c48efb7504c3f554ff 100644
--- a/chrome/browser/local_discovery/privet_http_impl.cc
+++ b/chrome/browser/local_discovery/privet_http_impl.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/local_discovery/privet_http_impl.h"
+#include <algorithm>
+
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/rand_util.h"
@@ -549,6 +551,8 @@ void PrivetLocalPrintOperationImpl::OnSubmitdocResponse(
timeout = static_cast<int>(timeout * random_scaling_factor);
+ timeout = std::max(timeout, kPrivetMinimumTimeout);
+
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE, base::Bind(&PrivetLocalPrintOperationImpl::DoCreatejob,
weak_factory_.GetWeakPtr()),
« no previous file with comments | « chrome/browser/local_discovery/privet_constants.h ('k') | chrome/browser/local_discovery/privet_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698