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

Issue 11784038: Add backup URL support for SafeBrowsing data requests. (Closed)

Created:
7 years, 11 months ago by cbentzel
Modified:
7 years, 10 months ago
Reviewers:
noé, noelutz, mattm
CC:
chromium-reviews
Visibility:
Public.

Description

Add backup URL support for SafeBrowsing data requests. If a request fails, an alternate URL is tried immediately. This is only done if the configuration provides backup URLs to try. Three cases of request failure are supported: - Issues with DNS resolution, TCP connection, or SSL handshake when the client is believed to be connected to the internet. - Issues with invalid HTTP responses from the server. - Issues with general network connectivity from the client. If the backup request fails as well, then the entire update is treated as a failure and no further backups are attempted. BUG=155753 TEST=unit_tests --gtest_filter=SafeBrowsingProtocolManagerTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=179412

Patch Set 1 #

Patch Set 2 : Differentiate backup requests #

Patch Set 3 : Unit tests #

Patch Set 4 : A few more tests #

Patch Set 5 : Backup timeout test #

Patch Set 6 : UMA #

Patch Set 7 : UMA fix #

Patch Set 8 : Move constants back to correct values #

Patch Set 9 : Fix bad response case #

Total comments: 9

Patch Set 10 : Reduce duplication in comments #

Total comments: 12

Patch Set 11 : More backup attempts #

Patch Set 12 : Extra safety check #

Total comments: 2

Patch Set 13 : Fix backup timeout test #

Total comments: 2

Patch Set 14 : Fix BackupTimeout test #

Total comments: 1

Patch Set 15 : Small return case refactor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -27 lines) Patch
M chrome/browser/safe_browsing/protocol_manager.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +31 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/protocol_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 18 chunks +145 lines, -17 lines 0 comments Download
M chrome/browser/safe_browsing/protocol_manager_helper.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/protocol_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +315 lines, -10 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
cbentzel
7 years, 11 months ago (2013-01-11 18:24:55 UTC) #1
mattm
a few nits. Change seems good but I didn't get to review the tests thoroughly. ...
7 years, 11 months ago (2013-01-12 02:24:49 UTC) #2
cbentzel
https://codereview.chromium.org/11784038/diff/28001/chrome/browser/safe_browsing/protocol_manager.cc File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/11784038/diff/28001/chrome/browser/safe_browsing/protocol_manager.cc#newcode681 chrome/browser/safe_browsing/protocol_manager.cc:681: bool update_success = success || request_type_ == CHUNK_REQUEST; On ...
7 years, 11 months ago (2013-01-14 11:33:35 UTC) #3
cbentzel
https://codereview.chromium.org/11784038/diff/28001/chrome/browser/safe_browsing/protocol_manager.cc File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/11784038/diff/28001/chrome/browser/safe_browsing/protocol_manager.cc#newcode681 chrome/browser/safe_browsing/protocol_manager.cc:681: bool update_success = success || request_type_ == CHUNK_REQUEST; On ...
7 years, 11 months ago (2013-01-14 11:39:42 UTC) #4
noelutz
Nice. Just some nits. thanks, noe. https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/protocol_manager.cc File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/protocol_manager.cc#newcode34 chrome/browser/safe_browsing/protocol_manager.cc:34: enum UpdateResult { ...
7 years, 11 months ago (2013-01-15 01:46:49 UTC) #5
cbentzel
Thanks for the review. https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/protocol_manager.cc File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/protocol_manager.cc#newcode34 chrome/browser/safe_browsing/protocol_manager.cc:34: enum UpdateResult { On 2013/01/15 ...
7 years, 11 months ago (2013-01-15 12:00:08 UTC) #6
noelutz
lgtm https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/safe_browsing_service.cc File chrome/browser/safe_browsing/safe_browsing_service.cc (right): https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/safe_browsing_service.cc#newcode73 chrome/browser/safe_browsing/safe_browsing_service.cc:73: "https://alt3-safebrowsing.google.com/safebrowsing"; On 2013/01/15 01:46:49, noelutz wrote: > Just ...
7 years, 11 months ago (2013-01-15 18:04:07 UTC) #7
cbentzel
https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/safe_browsing_service.cc File chrome/browser/safe_browsing/safe_browsing_service.cc (right): https://codereview.chromium.org/11784038/diff/40001/chrome/browser/safe_browsing/safe_browsing_service.cc#newcode73 chrome/browser/safe_browsing/safe_browsing_service.cc:73: "https://alt3-safebrowsing.google.com/safebrowsing"; On 2013/01/15 18:04:07, noelutz wrote: > On 2013/01/15 ...
7 years, 11 months ago (2013-01-22 20:04:30 UTC) #8
mattm
https://codereview.chromium.org/11784038/diff/48003/chrome/browser/safe_browsing/protocol_manager_unittest.cc File chrome/browser/safe_browsing/protocol_manager_unittest.cc (right): https://codereview.chromium.org/11784038/diff/48003/chrome/browser/safe_browsing/protocol_manager_unittest.cc#newcode569 chrome/browser/safe_browsing/protocol_manager_unittest.cc:569: // Respond to the backup unsuccessfully. Should respond successfully ...
7 years, 11 months ago (2013-01-22 23:09:05 UTC) #9
cbentzel
https://codereview.chromium.org/11784038/diff/48003/chrome/browser/safe_browsing/protocol_manager_unittest.cc File chrome/browser/safe_browsing/protocol_manager_unittest.cc (right): https://codereview.chromium.org/11784038/diff/48003/chrome/browser/safe_browsing/protocol_manager_unittest.cc#newcode569 chrome/browser/safe_browsing/protocol_manager_unittest.cc:569: // Respond to the backup unsuccessfully. On 2013/01/22 23:09:05, ...
7 years, 11 months ago (2013-01-23 13:18:28 UTC) #10
cbentzel
https://codereview.chromium.org/11784038/diff/63001/chrome/browser/safe_browsing/protocol_manager_unittest.cc File chrome/browser/safe_browsing/protocol_manager_unittest.cc (right): https://codereview.chromium.org/11784038/diff/63001/chrome/browser/safe_browsing/protocol_manager_unittest.cc#newcode566 chrome/browser/safe_browsing/protocol_manager_unittest.cc:566: // Two calls of RunPendingTask are required here. The ...
7 years, 11 months ago (2013-01-23 14:22:46 UTC) #11
cbentzel
https://codereview.chromium.org/11784038/diff/63001/chrome/browser/safe_browsing/protocol_manager_unittest.cc File chrome/browser/safe_browsing/protocol_manager_unittest.cc (right): https://codereview.chromium.org/11784038/diff/63001/chrome/browser/safe_browsing/protocol_manager_unittest.cc#newcode566 chrome/browser/safe_browsing/protocol_manager_unittest.cc:566: // Two calls of RunPendingTask are required here. The ...
7 years, 11 months ago (2013-01-23 20:13:23 UTC) #12
cbentzel
Latest patch fixes the backup timeout test. A little gnarly, but I could not think ...
7 years, 10 months ago (2013-01-28 17:10:09 UTC) #13
mattm
lgtm. w/ optional suggestion. https://codereview.chromium.org/11784038/diff/72001/chrome/browser/safe_browsing/protocol_manager_unittest.cc File chrome/browser/safe_browsing/protocol_manager_unittest.cc (right): https://codereview.chromium.org/11784038/diff/72001/chrome/browser/safe_browsing/protocol_manager_unittest.cc#newcode575 chrome/browser/safe_browsing/protocol_manager_unittest.cc:575: runner->RunPendingTasks(); Maybe clearer to write ...
7 years, 10 months ago (2013-01-28 23:55:16 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbentzel@chromium.org/11784038/78002
7 years, 10 months ago (2013-01-29 10:31:34 UTC) #15
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-01-29 11:41:47 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbentzel@chromium.org/11784038/78002
7 years, 10 months ago (2013-01-29 12:26:51 UTC) #17
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-01-29 13:04:33 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbentzel@chromium.org/11784038/78002
7 years, 10 months ago (2013-01-29 19:44:28 UTC) #19
commit-bot: I haz the power
7 years, 10 months ago (2013-01-29 21:23:56 UTC) #20
Message was sent while issue was closed.
Change committed as 179412

Powered by Google App Engine
This is Rietveld 408576698