Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 10786016: Moved all pipe functionality into a self-containing Communication::Pipe class (Closed)

Created:
May 31, 2013, 11:48 a.m. by Wladimir Palant
Modified:
June 19, 2013, 5:25 p.m.
Reviewers:
Felix Dahlke, Oleksandr
Visibility:
Public.

Description

This also uses googletest to test the pipe functionality properly and makes sure all Unicode Windows functions are spelled out explicityl (meaning CreatePipeW rather than CreatePipe).

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -119 lines) Patch
M src/shared/Communication.h View 1 2 chunks +1 line, -15 lines 0 comments Download
M src/shared/Communication.cpp View 1 1 chunk +121 lines, -104 lines 0 comments Download

Messages

Total messages: 4
Wladimir Palant
May 31, 2013, 11:48 a.m. (2013-05-31 11:48:32 UTC) #1
Felix Dahlke
http://codereview.adblockplus.org/10786016/diff/1/src/engine/main.cpp File src/engine/main.cpp (right): http://codereview.adblockplus.org/10786016/diff/1/src/engine/main.cpp#newcode88 src/engine/main.cpp:88: Shouldn't we delete pipe here? http://codereview.adblockplus.org/10786016/diff/1/src/shared/Communication.cpp File src/shared/Communication.cpp (right): ...
June 3, 2013, 12:18 p.m. (2013-06-03 12:18:47 UTC) #2
Wladimir Palant
Only addressed two of the comments, for the rest of them please see my responses. ...
June 3, 2013, 2 p.m. (2013-06-03 14:00:26 UTC) #3
Felix Dahlke
June 4, 2013, 6:39 a.m. (2013-06-04 06:39:39 UTC) #4
LGTM

http://codereview.adblockplus.org/10786016/diff/1/src/engine/main.cpp
File src/engine/main.cpp (right):

http://codereview.adblockplus.org/10786016/diff/1/src/engine/main.cpp#newcode88
src/engine/main.cpp:88: 
On 2013/06/03 14:00:26, Wladimir Palant wrote:
> On 2013/06/03 12:18:47, Felix H. Dahlke wrote:
> > Shouldn't we delete pipe here?
> 
> It's an auto_ptr.

Oops, then let's not delete it :)

http://codereview.adblockplus.org/10786016/diff/1/src/shared/Communication.cpp
File src/shared/Communication.cpp (right):

http://codereview.adblockplus.org/10786016/diff/1/src/shared/Communication.cp...
src/shared/Communication.cpp:21: if (!::GetUserNameW(buffer.get(), &length))
On 2013/06/03 14:00:26, Wladimir Palant wrote:
> On 2013/06/03 12:18:47, Felix H. Dahlke wrote:
> > Why GetUserNameW? We normally don't explicitly call the W functions.
> 
> We should however. We will fail if due to some macro misconfiguration we get
the
> ASCII function here - we want GetUserNameW and nothing else. In fact, the
tests
> don't set the UNICODE macro - so they will try to call the ASCII function and
> fail.

Agreed, we should do that with all the other calls in the future then.

Powered by Google App Engine
This is Rietveld