diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 21:55:32 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 21:55:32 +0000 |
commit | 22717d1e33abe98ff8f628a5f1c404115f70cdc6 (patch) | |
tree | 40b2d0f0b184cf80c7c12b9a241f1558cc552f66 /chrome/browser/safe_browsing/protocol_manager.cc | |
parent | bc2496aadbfd048e16807257f7278c5cf1472f43 (diff) | |
download | chromium_src-22717d1e33abe98ff8f628a5f1c404115f70cdc6.zip chromium_src-22717d1e33abe98ff8f628a5f1c404115f70cdc6.tar.gz chromium_src-22717d1e33abe98ff8f628a5f1c404115f70cdc6.tar.bz2 |
As agreed on by the SafeBrowsing server team:
1. Back off when we encounter a parse error.
2. Ignore commands we don't understand instead of returning an error.
3. Make redirect URL parsing in an update response more robust to changes in format.
Review URL: http://codereview.chromium.org/7329
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3425 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/protocol_manager.cc')
-rw-r--r-- | chrome/browser/safe_browsing/protocol_manager.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc index fa32b1a..caf2400 100644 --- a/chrome/browser/safe_browsing/protocol_manager.cc +++ b/chrome/browser/safe_browsing/protocol_manager.cc @@ -214,14 +214,12 @@ void SafeBrowsingProtocolManager::OnURLFetchComplete( if (!parsed_ok) { SB_DLOG(INFO) << "SafeBrowsing request for: " << source->url() << "failed parse."; + must_back_off = true; + chunk_request_urls_.clear(); } - if (request_type_ == CHUNK_REQUEST) { - if (parsed_ok) { - chunk_request_urls_.pop_front(); - } else { - chunk_request_urls_.clear(); - } + if (request_type_ == CHUNK_REQUEST && parsed_ok) { + chunk_request_urls_.pop_front(); } else if (request_type_ == GETKEY_REQUEST && initial_request_) { // This is the first request we've made this session. Now that we have // the keys, do the regular update request. |