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

Issue 7550002: Clean up SSL false start blacklist code. Numerous changes, including: (Closed)

Created:
9 years, 4 months ago by Peter Kasting
Modified:
9 years, 4 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Clean up SSL false start blacklist code. Numerous changes, including: * Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome. * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them. * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety. * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation). * Avoid #define and "using". * Use standard algorithms for similar reasons as using string ops. * Use file_util functions to significantly abbreviate file reading/writing code. * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue). * Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate. * Convert non-error uses of stderr to the chrome-standard VLOG(1). * Correctly handle hostnames with trailing dots in the input file. * In general, shorten code where possible. Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95907

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 7

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -311 lines) Patch
M base/base.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 3 chunks +3 lines, -0 lines 0 comments Download
M base/third_party/dynamic_annotations/dynamic_annotations.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M build/linux/system.gyp View 1 2 3 4 5 12 chunks +56 lines, -16 lines 0 comments Download
M build/util/build_util.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M net/base/ssl_config_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/base/ssl_false_start_blacklist.h View 2 chunks +31 lines, -51 lines 0 comments Download
M net/base/ssl_false_start_blacklist.cc View 2 chunks +11 lines, -14 lines 0 comments Download
M net/base/ssl_false_start_blacklist_process.cc View 1 2 3 4 5 2 chunks +157 lines, -214 lines 0 comments Download
M net/base/ssl_false_start_blacklist_unittest.cc View 1 1 chunk +10 lines, -11 lines 0 comments Download
M net/net.gyp View 1 5 chunks +10 lines, -4 lines 0 comments Download
M third_party/libevent/libevent.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/modp_b64/modp_b64.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Peter Kasting
I got a bit carried away with this, but the end result was so much ...
9 years, 4 months ago (2011-08-02 21:12:09 UTC) #1
agl
LGTM. The original code was designed to avoid depending on Chromium code (and to be ...
9 years, 4 months ago (2011-08-02 21:39:16 UTC) #2
agl
On Tue, Aug 2, 2011 at 5:39 PM, <agl@chromium.org> wrote: > I agree that the ...
9 years, 4 months ago (2011-08-02 21:44:25 UTC) #3
Peter Kasting
I'll upload a new patch once bradnelson and I have nailed down exactly how to ...
9 years, 4 months ago (2011-08-02 23:37:03 UTC) #4
Peter Kasting
Brad, it looks as if this latest set of changes compiles on Linux. Can you ...
9 years, 4 months ago (2011-08-08 21:13:04 UTC) #5
bradn
LGTM, sigh
9 years, 4 months ago (2011-08-08 22:24:41 UTC) #6
Peter Kasting
+willchan: Can you OWNERS r+ for base and net?
9 years, 4 months ago (2011-08-08 23:09:39 UTC) #7
willchan no longer on Chromium
9 years, 4 months ago (2011-08-08 23:14:09 UTC) #8
On 2011/08/08 23:09:39, Peter Kasting wrote:
> +willchan: Can you OWNERS r+ for base and net?

LGTM

Powered by Google App Engine
This is Rietveld 408576698