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

Issue 2620006: Yeat another test web server. Supports speed throttle and dump of the traffic... (Closed)

Created:
10 years, 6 months ago by stoyan
Modified:
9 years, 7 months ago
Reviewers:
amit, kkania
CC:
chromium-reviews
Visibility:
Public.

Description

Yet another test web server. Supports speed throttle and dump of the traffic. Allows binding on 0.0.0.0 to allow connections from a VM (for example). Simple GMock class and Actions. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49266

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 33

Patch Set 4 : '' #

Total comments: 22

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -0 lines) Patch
M chrome_frame/test/test_server.h View 1 2 3 4 5 1 chunk +77 lines, -0 lines 0 comments Download
M chrome_frame/test/test_server.cc View 1 2 3 4 5 1 chunk +114 lines, -0 lines 0 comments Download
M chrome_frame/test/test_with_web_server.h View 1 2 3 4 5 6 2 chunks +54 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
stoyan
10 years, 6 months ago (2010-06-07 20:54:00 UTC) #1
kkania
http://codereview.chromium.org/2620006/diff/9001/10002 File chrome_frame/test/test_server.h (right): http://codereview.chromium.org/2620006/diff/9001/10002#newcode324 chrome_frame/test/test_server.h:324: class Connection2 : public base::RefCounted<Connection2> { I can't really ...
10 years, 6 months ago (2010-06-08 00:24:09 UTC) #2
amit
drive by lgtm, with ken's concerns addressed. http://codereview.chromium.org/2620006/diff/9001/10001 File chrome_frame/test/test_server.cc (right): http://codereview.chromium.org/2620006/diff/9001/10001#newcode271 chrome_frame/test/test_server.cc:271: s->r_.OnDataReceived(data); if ...
10 years, 6 months ago (2010-06-08 03:10:37 UTC) #3
stoyan
http://codereview.chromium.org/2620006/diff/9001/10001 File chrome_frame/test/test_server.cc (right): http://codereview.chromium.org/2620006/diff/9001/10001#newcode271 chrome_frame/test/test_server.cc:271: s->r_.OnDataReceived(data); On 2010/06/08 03:10:37, amit wrote: > if (s)? ...
10 years, 6 months ago (2010-06-08 17:03:28 UTC) #4
kkania
LGTM after fixes... http://codereview.chromium.org/2620006/diff/15001/16001 File chrome_frame/test/test_server.cc (right): http://codereview.chromium.org/2620006/diff/15001/16001#newcode226 chrome_frame/test/test_server.cc:226: std::list<scoped_refptr<SimpleConnection>>::iterator does this compile? I thought ...
10 years, 6 months ago (2010-06-08 18:35:07 UTC) #5
stoyan
10 years, 6 months ago (2010-06-09 16:50:42 UTC) #6
http://codereview.chromium.org/2620006/diff/15001/16001
File chrome_frame/test/test_server.cc (right):

http://codereview.chromium.org/2620006/diff/15001/16001#newcode226
chrome_frame/test/test_server.cc:226:
std::list<scoped_refptr<SimpleConnection>>::iterator
On 2010/06/08 18:35:07, kkania wrote:
> does this compile?  I thought you need to put a space between the two >>. 
> Although if you typedef the list you don't have to worry about it

Done.

http://codereview.chromium.org/2620006/diff/15001/16001#newcode231
chrome_frame/test/test_server.cc:231: return it;
On 2010/06/08 18:35:07, kkania wrote:
> if you are going to "return it" in both cases, how about just break here...

Done.

http://codereview.chromium.org/2620006/diff/15001/16001#newcode252
chrome_frame/test/test_server.cc:252: scoped_refptr<SimpleConnection> s =
ConnectionFromSocket(socket);
On 2010/06/08 18:35:07, kkania wrote:
> why is this variable named 's'? how about connection

Done.

http://codereview.chromium.org/2620006/diff/15001/16001#newcode273
chrome_frame/test/test_server.cc:273: const char* p = data.c_str() + cur_pos_;
On 2010/06/08 18:35:07, kkania wrote:
> p? how about a better name

Done.

http://codereview.chromium.org/2620006/diff/15001/16002
File chrome_frame/test/test_server.h (right):

http://codereview.chromium.org/2620006/diff/15001/16002#newcode324
chrome_frame/test/test_server.h:324: class SimpleConnection : public
base::RefCounted<SimpleConnection> {
On 2010/06/08 18:35:07, kkania wrote:
> SimpleConnection? this doesn't seem to be any better than Connection2. How
about
> ConfigurableConnection? Can you add a comment too?

Done.

http://codereview.chromium.org/2620006/diff/15001/16002#newcode341
chrome_frame/test/test_server.h:341: // Send HTTP response with provided
|headers| and |content|. Appends
On 2010/06/08 18:35:07, kkania wrote:
> can you add newlines, here and elsewhere, for these cases:
> 1) between constructor/destructor section and methods section
> 2) between methods section and variables section
> 3) between variables section and DISALLOW_COPY... section
> 4) before accessor level declaration (eg private:)

Done.

http://codereview.chromium.org/2620006/diff/15001/16002#newcode345
chrome_frame/test/test_server.h:345: const SendOptions& options =
DefaultSendOptions);
On 2010/06/08 18:35:07, kkania wrote:
> according to the style guide, only case where default args is allowed is to
> simulate variable-length args. Break this into two funcs.

Done.

http://codereview.chromium.org/2620006/diff/15001/16002#newcode349
chrome_frame/test/test_server.h:349: void SendChunk();
On 2010/06/08 18:35:07, kkania wrote:
> comment this

Done.

http://codereview.chromium.org/2620006/diff/15001/16002#newcode353
chrome_frame/test/test_server.h:353: std::string data;
On 2010/06/08 18:35:07, kkania wrote:
> data_

Done.

http://codereview.chromium.org/2620006/diff/15001/16002#newcode358
chrome_frame/test/test_server.h:358: class HTTPTestServer : public
ListenSocket::ListenSocketDelegate {
On 2010/06/08 18:35:07, kkania wrote:
> comment for this class

Done.

http://codereview.chromium.org/2620006/diff/15001/16002#newcode382
chrome_frame/test/test_server.h:382: std::list<scoped_refptr<SimpleConnection>>
connection_list_;
On 2010/06/08 18:35:07, kkania wrote:
> How about typedef this list similar to what SimpleWebServer does?

Done.

Powered by Google App Engine
This is Rietveld 408576698