Don't cache non-redirect HTTP responses when a redirect is forced
by a NetworkDelegate in OnHeadersReceived.  This regressed in
https://chromiumcodereview.appspot.com/23710059.

Fortunately, no NetworkDelegate currently does this, but that is
going to change.

BUG=354508

Review URL: https://codereview.chromium.org/208683002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258983 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/http/http_transaction_unittest.h b/net/http/http_transaction_unittest.h
index 2572b1f..5116f65 100644
--- a/net/http/http_transaction_unittest.h
+++ b/net/http/http_transaction_unittest.h
@@ -256,7 +256,9 @@
 
   int transaction_count() const { return transaction_count_; }
   bool done_reading_called() const { return done_reading_called_; }
+  bool stop_caching_called() const { return stop_caching_called_; }
   void TransactionDoneReading();
+  void TransactionStopCaching();
 
   // Returns the last priority passed to CreateTransaction, or
   // DEFAULT_PRIORITY if it hasn't been called yet.
@@ -289,6 +291,7 @@
  private:
   int transaction_count_;
   bool done_reading_called_;
+  bool stop_caching_called_;
   net::RequestPriority last_create_transaction_priority_;
   base::WeakPtr<MockNetworkTransaction> last_transaction_;
 };