Change the HttpStreamFactory::JobController to mark alternative service broken until default network changes.
Change the HttpStreamFactory::JobController to mark alternative service broken until default network changes iff TCP succeeds, QUIC fails on the defaut network but succeeds on the alternate network. The HttpServerProperties will clear the brokenness until default network changes.
Bug: 790547
Change-Id: Ib33def42b474898879bf9e39567632ed273c5ca2
Reviewed-on: https://chromium-review.googlesource.com/1212142
Commit-Queue: Zhongyi Shi <[email protected]>
Reviewed-by: Ryan Hamilton <[email protected]>
Cr-Commit-Position: refs/heads/master@{#593486}
diff --git a/net/quic/test_task_runner.h b/net/quic/test_task_runner.h
index ab2948a..bffabed 100644
--- a/net/quic/test_task_runner.h
+++ b/net/quic/test_task_runner.h
@@ -14,6 +14,7 @@
#include "base/sequenced_task_runner.h"
#include "base/task_runner.h"
#include "base/test/test_pending_task.h"
+#include "net/third_party/quic/core/quic_time.h"
namespace quic {
class MockClock;
@@ -40,10 +41,19 @@
const std::vector<PostedTask>& GetPostedTasks() const;
+ // Returns the delay for next task to run. If there is no pending task,
+ // return QuicTime::Delta::Infinite().
+ quic::QuicTime::Delta NextPendingTaskDelay();
+
// Finds the next task to run, advances the time to the correct time
// and then runs the task.
void RunNextTask();
+ // Fast forwards virtual time by |delta|, causing all tasks with a remaining
+ // delay less than or equal to |delta| to be executed. |delta| must be
+ // non-negative.
+ void FastForwardBy(quic::QuicTime::Delta delta);
+
// While there are posted tasks, finds the next task to run, advances the
// time to the correct time and then runs the task.
void RunUntilIdle();