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

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed)

Created:
4 years, 6 months ago by gab
Modified:
4 years, 6 months ago
Reviewers:
Nico
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, rginda+watch_chromium.org, ben+mojo_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, samuong+watch_chromium.org, abarth-chromium, rlp+watch_chromium.org, groby+spellwatch_chromium.org, chromium-apps-reviews_chromium.org, vabr+watchlistpasswordmanager_chromium.org, media-router+watch_chromium.org, rouslan+spell_chromium.org, asvitkine+watch_chromium.org, gcasto+watchlist_chromium.org, sync-reviews_chromium.org, mkwst+watchlist-passwords_chromium.org, tfarina, Aaron Boodman, darin (slow to review)
Base URL:
https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrate WaitableEvent to enum-based constructor in chrome/ Change automated with clang-tidy (details @ https://crbug.com/612843#c13) BUG=612843 Committed: https://crrev.com/d955d78dcaa5815b958f3baf078c7da16006d896 Cr-Commit-Position: refs/heads/master@{#397920}

Patch Set 1 #

Patch Set 2 : Split out custom changes to thread_watcher_unittest.cc #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -73 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/socket/socket_apitest.cc View 1 3 chunks +7 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_messages_apitest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/net/predictor.cc View 1 chunk +3 lines, -1 line 4 comments Download
M chrome/browser/password_manager/native_backend_gnome_x.cc View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/password_manager/native_backend_kwallet_x.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/process_singleton_browsertest.cc View 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/process_singleton_posix_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sessions/session_service_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/spellchecker/spellcheck_service_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ssl/ssl_client_certificate_selector_test.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/autofill_helper.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/bookmarks_helper.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/extension_settings_helper.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/passwords_helper.cc View 3 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_directory_sync_test.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/typed_urls_helper.cc View 5 chunks +15 lines, -5 lines 0 comments Download
M chrome/browser/ui/crypto_module_delegate_nss.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/common/service_process_util_posix.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/service/service_ipc_server_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/service/service_process.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/base/mojo_test_connector.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/base/ui_test_utils.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome/adb_impl.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/chromedriver/net/net_util.cc View 1 chunk +5 lines, -1 line 0 comments Download
M chrome/test/chromedriver/net/net_util_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/net/port_server_unittest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/chromedriver/net/sync_websocket_impl.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/chromedriver/net/test_http_server.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/test/media_router/media_router_base_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 20 (8 generated)
gab
4 years, 6 months ago (2016-06-01 18:23:24 UTC) #1
gab
@Nico when you have a chance, this is the last component pending review :-)
4 years, 6 months ago (2016-06-02 13:33:34 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2021393004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2021393004/20001
4 years, 6 months ago (2016-06-02 16:10:05 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-02 16:14:04 UTC) #9
gab
Just did a manual pass of every automated change in this CL and it lgtm, ...
4 years, 6 months ago (2016-06-02 17:28:13 UTC) #10
Nico
lgtm https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/predictor.cc#newcode798 chrome/browser/net/predictor.cc:798: base::WaitableEvent::ResetPolicy::MANUAL, if this must be an enum class ...
4 years, 6 months ago (2016-06-04 01:48:18 UTC) #11
gab
Thanks, reply below https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/predictor.cc#newcode798 chrome/browser/net/predictor.cc:798: base::WaitableEvent::ResetPolicy::MANUAL, On 2016/06/04 01:48:18, Nico wrote: ...
4 years, 6 months ago (2016-06-04 11:45:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2021393004/20001
4 years, 6 months ago (2016-06-04 11:46:10 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-04 13:15:54 UTC) #16
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/d955d78dcaa5815b958f3baf078c7da16006d896 Cr-Commit-Position: refs/heads/master@{#397920}
4 years, 6 months ago (2016-06-04 13:17:11 UTC) #18
Nico
https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/predictor.cc#newcode798 chrome/browser/net/predictor.cc:798: base::WaitableEvent::ResetPolicy::MANUAL, On 2016/06/04 11:45:20, gab wrote: > On 2016/06/04 ...
4 years, 6 months ago (2016-06-04 16:33:56 UTC) #19
gab
4 years, 6 months ago (2016-06-04 19:03:23 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/pred...
File chrome/browser/net/predictor.cc (right):

https://codereview.chromium.org/2021393004/diff/20001/chrome/browser/net/pred...
chrome/browser/net/predictor.cc:798: base::WaitableEvent::ResetPolicy::MANUAL,
On 2016/06/04 16:33:56, Nico wrote:
> On 2016/06/04 11:45:20, gab wrote:
> > On 2016/06/04 01:48:18, Nico wrote:
> > > if this must be an enum class i feel it shouldn't have been a nested one.
> then
> > > these would be half as verbose.
> > 
> > We thought about that [1] but decided to go this route because every
namespace
> > you remove you have to makeup for with a more specific enum name, i.e.
> > base::ResetPolicy is too generic and say base::WaitableEventResetPolicy is
> > merely saving a ::.
> 
> I submit that if every step along the way seems to have made sense but the end
> state is base::WaitableEvent::InitialState::NOT_SIGNALED, then one of the
steps
> along the way wasn't the right step, even if it felt right at the time ;-)

Hmm, do you have a specific counterproposal? I'm happy to change it if you have
something we all agree is better.

Powered by Google App Engine
This is Rietveld 408576698