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

Unified Diff: net/http/http_cache_transaction.h

Issue 2767033003: [HttpCache::Transaction] Ensure each state only sets the next state once (Closed)
Patch Set: AutoReset Created 3 years, 9 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 | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.h
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 0998695962e19cf1b36f0221355487a21189af77..a8fca54228e8d8f6cadda6b947e90ab7bf24cd94 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -434,6 +434,10 @@ class HttpCache::Transaction : public HttpTransaction {
// Called to signal completion of asynchronous IO.
void OnIOComplete(int result);
+ // When in a DoLoop, use this to set the next state as it verifies that the
+ // state isn't set twice.
+ void TransitionToState(State state);
+
State next_state_;
const HttpRequestInfo* request_;
RequestPriority priority_;
@@ -508,6 +512,9 @@ class HttpCache::Transaction : public HttpTransaction {
BeforeNetworkStartCallback before_network_start_callback_;
BeforeHeadersSentCallback before_headers_sent_callback_;
+ // True if the Transaction is currently processing the DoLoop.
+ bool in_do_loop_;
+
base::WeakPtrFactory<Transaction> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(Transaction);
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698