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

Unified Diff: net/http/http_network_transaction.cc

Issue 111005: Bypass the cache for the second or later HttpCache::Transaction... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « net/http/http_network_transaction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 17313)
+++ net/http/http_network_transaction.cc (working copy)
@@ -362,6 +362,8 @@
return LOAD_STATE_WAITING_FOR_RESPONSE;
case STATE_READ_BODY_COMPLETE:
return LOAD_STATE_READING_RESPONSE;
+ case STATE_WAITING_FOR_USER_ACTION:
+ return LOAD_STATE_WAITING_FOR_USER_ACTION;
default:
return LOAD_STATE_IDLE;
}
@@ -500,12 +502,20 @@
TRACE_EVENT_END("http.drain_body_for_auth_restart",
request_, request_->url.spec());
break;
+ case STATE_WAITING_FOR_USER_ACTION:
+ // When this transcation is suspended for some error such as invalid SSL
+ // certification, the state becomes STATE_WAITING_FOR_USER_ACTION. You
+ // can check if this transaction is in this state by calling
+ // GetLoadState() and compare with LOAD_STATE_WAITING_FOR_USER_ACTION.
+ break;
default:
NOTREACHED() << "bad state";
rv = ERR_FAILED;
break;
}
- } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE);
+ } while (rv != ERR_IO_PENDING &&
+ next_state_ != STATE_NONE &&
+ next_state_ != STATE_WAITING_FOR_USER_ACTION);
return rv;
}
@@ -662,6 +672,7 @@
if (result == OK) {
next_state_ = STATE_WRITE_HEADERS;
} else {
+ next_state_ = STATE_WAITING_FOR_USER_ACTION;
result = HandleSSLHandshakeError(result);
}
return result;
« no previous file with comments | « net/http/http_network_transaction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698