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

Issue 2412903002: Remove MessageLoop::current() from chrome_metrics_service_client.cc (Closed)

Created:
4 years, 2 months ago by fdoray
Modified:
4 years, 2 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove MessageLoop::current() from chrome_metrics_service_client.cc Whenever possible, use Thread/SequencedTaskRunnerHandle::Get() instead of MessageLoop::current(). Thread/SequencedTaskRunnerHandle::Get() work within TaskScheduler while MessageLoop::current() doesn't. Good reasons to use MessageLoop::current(): - Add destruction, nesting or task observers. - Run nested loops. Bad reasons to use MessageLoop::current(): - Post tasks. Use Thread/SequencedTaskRunnerHandle::Get() instead. - Watch a file descriptor. Use FileDescriptorWatcher instead. - Verify that it is possible to post tasks to the current thread. Use Thread/SequencedTaskRunnerHandle::IsSet() instead. - Verify that code runs on a specific thread. Use SingleThreadTaskRunner::BelongsToCurrentThread() instead. BUG=650723 Committed: https://crrev.com/0c755de5d020e417e439174144040713001f5c6b Cr-Commit-Position: refs/heads/master@{#426200}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -52 lines) Patch
M chrome/browser/metrics/chrome_metrics_service_client.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/histogram_synchronizer.h View 4 chunks +17 lines, -19 lines 0 comments Download
M content/browser/histogram_synchronizer.cc View 5 chunks +24 lines, -23 lines 0 comments Download
M content/public/browser/histogram_fetcher.h View 2 chunks +3 lines, -6 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
fdoray
PTAL
4 years, 2 months ago (2016-10-12 17:03:02 UTC) #6
rkaplow
lgtm
4 years, 2 months ago (2016-10-13 22:15:04 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2412903002/1
4 years, 2 months ago (2016-10-14 10:24:27 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/281194)
4 years, 2 months ago (2016-10-14 10:34:17 UTC) #11
fdoray
+jochen@: PTAL
4 years, 2 months ago (2016-10-14 12:03:34 UTC) #13
jochen (gone - plz use gerrit)
lgtm
4 years, 2 months ago (2016-10-19 14:37:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2412903002/1
4 years, 2 months ago (2016-10-19 14:38:20 UTC) #16
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-19 15:29:07 UTC) #17
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:08:42 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/0c755de5d020e417e439174144040713001f5c6b
Cr-Commit-Position: refs/heads/master@{#426200}

Powered by Google App Engine
This is Rietveld 408576698