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

Issue 966423003: Moving ScopedMockLog from net/test to base/test. (Closed)

Created:
5 years, 9 months ago by Łukasz Anforowicz
Modified:
5 years, 9 months ago
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@separate-port-range
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Moving ScopedMockLog from net/test to base/test. I want to reuse ScopedMockLog from unittests under src/remoting/host. To do that, I am moving this class from net/test to base/test. When doing the move, I also wanted to ensure thread-safety in the case when logging is happening on a thread different from where StartCapturingLogs or StopCapturingLogs are called. Having proper locks (and memory barriers implied by the locks) should ensure that 1) LogMessageHandler won't see a half-way executed StartCapturingLogs or StopCapturingLogs and 2) that a log write in-progress won't get a rug pulled from underneath by destroying of gMock's structures embedded in ScopedMockLog's Log mock method. BUG= TEST=net_unittests Committed: https://crrev.com/b4d01d31b4553b10aae55b66476e5ab9280b1c9d Cr-Commit-Position: refs/heads/master@{#319105}

Patch Set 1 : New unit tests for PolicyWatcher #

Patch Set 2 : Limiting the changes to moving ScopedMockLog to base/test #

Total comments: 15

Patch Set 3 : Addressed Ricardo's code review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -245 lines) Patch
M base/base.gyp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M base/test/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A + base/test/mock_log.h View 1 2 3 chunks +45 lines, -45 lines 0 comments Download
A + base/test/mock_log.cc View 1 2 2 chunks +29 lines, -19 lines 0 comments Download
M net/net.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M net/quic/congestion_control/rtt_stats_test.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M net/test/gtest_util.h View 1 2 2 chunks +20 lines, -21 lines 0 comments Download
D net/test/scoped_mock_log.h View 1 chunk +0 lines, -98 lines 0 comments Download
D net/test/scoped_mock_log.cc View 1 chunk +0 lines, -58 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
Łukasz Anforowicz
Ricardo, could you please take a look? My real goal is to be able to ...
5 years, 9 months ago (2015-03-02 23:39:33 UTC) #5
rvargas (doing something else)
https://codereview.chromium.org/966423003/diff/80001/base/base.gyp File base/base.gyp (right): https://codereview.chromium.org/966423003/diff/80001/base/base.gyp#newcode965 base/base.gyp:965: 'test/scoped_mock_log.h', build.gn has to be updated https://codereview.chromium.org/966423003/diff/80001/base/test/scoped_mock_log.h File base/test/scoped_mock_log.h ...
5 years, 9 months ago (2015-03-03 19:45:34 UTC) #6
Łukasz Anforowicz
Thanks for the feedback Ricardo. I tried addressing it in patchset #3. -Lukasz https://codereview.chromium.org/966423003/diff/80001/base/base.gyp File ...
5 years, 9 months ago (2015-03-04 00:23:01 UTC) #9
rvargas (doing something else)
LGTM
5 years, 9 months ago (2015-03-04 17:36:55 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/966423003/140001
5 years, 9 months ago (2015-03-04 17:39:03 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:140001)
5 years, 9 months ago (2015-03-04 19:47:25 UTC) #13
commit-bot: I haz the power
5 years, 9 months ago (2015-03-04 19:48:15 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b4d01d31b4553b10aae55b66476e5ab9280b1c9d
Cr-Commit-Position: refs/heads/master@{#319105}

Powered by Google App Engine
This is Rietveld 408576698