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

Issue 11761015: Make DBusStatistics only run on the main thread (Closed)

Created:
7 years, 11 months ago by stevenjb
Modified:
7 years, 11 months ago
CC:
chromium-reviews, davidjames
Visibility:
Public.

Description

Make DBusStatistics only run on the main thread and add additional CHECKs to ensure thread safety. Calls from other threads will be ignored. Currently the only DBus calls from other threads are for Geolocation. Supporting statistics gathering across multiple threads is unnecessary overhead that we don't currently need. BUG=168134 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175706

Patch Set 1 #

Patch Set 2 : Call AddStat on origin thread #

Patch Set 3 : Make origin_message)loop_proxy_ optional for tests #

Patch Set 4 : Rebase #

Patch Set 5 : Additional CHECK #

Total comments: 7

Patch Set 6 : Address nit #

Patch Set 7 : Simpler, test friendly version. #

Total comments: 8

Patch Set 8 : CHECK -> DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M dbus/dbus_statistics.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M dbus/dbus_statistics.cc View 1 2 3 4 5 6 7 5 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
stevenjb
It turns out that ObjectProxy methods might be called from threads other than the UI ...
7 years, 11 months ago (2013-01-03 22:59:27 UTC) #1
davidjames
LGTM. Also ran lots of trybot runs with this on Chrome OS through a few ...
7 years, 11 months ago (2013-01-04 02:21:46 UTC) #2
hashimoto
Please rewrite the change description. https://codereview.chromium.org/11761015/diff/3005/dbus/dbus_statistics.cc File dbus/dbus_statistics.cc (right): https://codereview.chromium.org/11761015/diff/3005/dbus/dbus_statistics.cc#newcode72 dbus/dbus_statistics.cc:72: // MessageLoop::current() might be ...
7 years, 11 months ago (2013-01-04 11:20:10 UTC) #3
stevenjb
https://codereview.chromium.org/11761015/diff/3005/dbus/dbus_statistics.cc File dbus/dbus_statistics.cc (right): https://codereview.chromium.org/11761015/diff/3005/dbus/dbus_statistics.cc#newcode72 dbus/dbus_statistics.cc:72: // MessageLoop::current() might be NULL in tests. On 2013/01/04 ...
7 years, 11 months ago (2013-01-04 20:30:37 UTC) #4
hashimoto
https://codereview.chromium.org/11761015/diff/3005/dbus/dbus_statistics.cc File dbus/dbus_statistics.cc (right): https://codereview.chromium.org/11761015/diff/3005/dbus/dbus_statistics.cc#newcode72 dbus/dbus_statistics.cc:72: // MessageLoop::current() might be NULL in tests. On 2013/01/04 ...
7 years, 11 months ago (2013-01-07 13:28:00 UTC) #5
satorux1
LGTM with nits. https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc File dbus/dbus_statistics.cc (right): https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc#newcode70 dbus/dbus_statistics.cc:70: CHECK_EQ(origin_thread_id_, base::PlatformThread::CurrentId()); DCHECK_EQ? https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc#newcode91 dbus/dbus_statistics.cc:91: CHECK(stat); ...
7 years, 11 months ago (2013-01-08 03:38:47 UTC) #6
hashimoto
lgtm with a nit https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc File dbus/dbus_statistics.cc (right): https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc#newcode87 dbus/dbus_statistics.cc:87: // This code is not ...
7 years, 11 months ago (2013-01-08 03:52:30 UTC) #7
stevenjb
https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc File dbus/dbus_statistics.cc (right): https://codereview.chromium.org/11761015/diff/18002/dbus/dbus_statistics.cc#newcode70 dbus/dbus_statistics.cc:70: CHECK_EQ(origin_thread_id_, base::PlatformThread::CurrentId()); On 2013/01/08 03:38:47, satorux1 wrote: > DCHECK_EQ? ...
7 years, 11 months ago (2013-01-09 00:03:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevenjb@chromium.org/11761015/19006
7 years, 11 months ago (2013-01-09 00:11:21 UTC) #9
commit-bot: I haz the power
7 years, 11 months ago (2013-01-09 04:41:09 UTC) #10
Message was sent while issue was closed.
Change committed as 175706

Powered by Google App Engine
This is Rietveld 408576698