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

Issue 9378039: dbus: add ObjectPath type (Closed)

Created:
8 years, 10 months ago by keybuk
Modified:
8 years, 10 months ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://git.chromium.org/git/chromium/src@master
Visibility:
Public.

Description

dbus: add ObjectPath type Rather than use std::string for object paths, add a dbus::ObjectPath type that wraps one while allowing more type-safety. This solves all sorts of issues with confusing object paths for strings, and allows us to do Properties code using templates disambiguating them from strings. BUG=chromium:109194 TEST=built and run tests Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121920 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=121941

Patch Set 1 #

Patch Set 2 : added inequality operator #

Total comments: 16

Patch Set 3 : remote c_str() method, comment that value() should not be used #

Patch Set 4 : Eliminate use of .value() in tests #

Patch Set 5 : make dbus::ObjectPath harder to use :) #

Total comments: 2

Patch Set 6 : Drop c_str initializer #

Patch Set 7 : needed more cowbell #

Patch Set 8 : I'm just not hearing the cowbell #

Patch Set 9 : add patch for cryptohome_client #

Unified diffs Side-by-side diffs Delta from patch set Stats (+474 lines, -335 lines) Patch
M chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc View 1 2 3 4 2 chunks +17 lines, -17 lines 0 comments Download
M chrome/browser/chromeos/bluetooth/bluetooth_manager.cc View 1 2 3 4 6 chunks +15 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/dbus/bluetooth_adapter_client.h View 3 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/dbus/bluetooth_adapter_client.cc View 1 2 3 4 9 chunks +81 lines, -73 lines 0 comments Download
M chrome/browser/chromeos/dbus/bluetooth_device_client.cc View 1 2 3 4 4 chunks +13 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/dbus/bluetooth_manager_client.h View 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/dbus/bluetooth_manager_client.cc View 1 2 3 4 6 chunks +16 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/dbus/cros_dbus_service.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/cros_dbus_service_unittest.cc View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/dbus/cros_disks_client.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/cryptohome_client.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/image_burner_client.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/mock_bluetooth_adapter_client.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/power_manager_client.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc View 1 2 3 4 5 6 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/dbus/sensors_client.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/session_manager_client.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/dbus/speech_synthesizer_client.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/dbus/update_engine_client.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/native_backend_kwallet_x.cc View 1 2 3 4 5 6 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -4 lines 0 comments Download
M content/browser/geolocation/wifi_data_provider_linux.cc View 1 2 3 4 15 chunks +31 lines, -28 lines 0 comments Download
M content/browser/geolocation/wifi_data_provider_linux_unittest.cc View 1 2 3 4 5 6 8 chunks +20 lines, -15 lines 0 comments Download
M content/browser/power_save_blocker_linux.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M dbus/bus.h View 7 chunks +8 lines, -7 lines 0 comments Download
M dbus/bus.cc View 1 2 3 4 6 chunks +13 lines, -11 lines 0 comments Download
M dbus/bus_unittest.cc View 1 2 3 4 6 chunks +14 lines, -11 lines 0 comments Download
M dbus/dbus.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M dbus/end_to_end_async_unittest.cc View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M dbus/end_to_end_sync_unittest.cc View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M dbus/exported_object.h View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M dbus/exported_object.cc View 1 2 3 4 4 chunks +5 lines, -4 lines 0 comments Download
M dbus/message.h View 9 chunks +9 lines, -8 lines 0 comments Download
M dbus/message.cc View 1 2 3 4 11 chunks +19 lines, -18 lines 0 comments Download
M dbus/message_unittest.cc View 1 2 3 4 13 chunks +20 lines, -19 lines 0 comments Download
M dbus/mock_bus.h View 3 chunks +6 lines, -5 lines 0 comments Download
M dbus/mock_exported_object.h View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M dbus/mock_exported_object.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M dbus/mock_object_proxy.h View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M dbus/mock_object_proxy.cc View 1 chunk +1 line, -1 line 0 comments Download
M dbus/mock_unittest.cc View 1 2 3 4 6 chunks +11 lines, -8 lines 0 comments Download
A dbus/object_path.h View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download
A dbus/object_path.cc View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M dbus/object_proxy.h View 3 chunks +3 lines, -2 lines 0 comments Download
M dbus/object_proxy.cc View 2 chunks +2 lines, -1 line 0 comments Download
M dbus/test_service.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M net/base/network_change_notifier_linux.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M net/base/network_change_notifier_linux_unittest.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
keybuk
8 years, 10 months ago (2012-02-12 09:46:07 UTC) #1
satorux1
Thank you for doing this. Some style comments: http://codereview.chromium.org/9378039/diff/3001/dbus/object_path.h File dbus/object_path.h (right): http://codereview.chromium.org/9378039/diff/3001/dbus/object_path.h#newcode34 dbus/object_path.h:34: ObjectPath(const ...
8 years, 10 months ago (2012-02-12 20:16:30 UTC) #2
keybuk
http://codereview.chromium.org/9378039/diff/3001/dbus/object_path.h File dbus/object_path.h (right): http://codereview.chromium.org/9378039/diff/3001/dbus/object_path.h#newcode34 dbus/object_path.h:34: ObjectPath(const std::string& value) : value_(value) {} see the comment ...
8 years, 10 months ago (2012-02-12 22:09:28 UTC) #3
satorux1
Believe me, I'm generally not a nit-picky reviewer, but for this case, I insist. :) ...
8 years, 10 months ago (2012-02-13 19:07:36 UTC) #4
keybuk
ok, one harder to use class coming right up ;-)
8 years, 10 months ago (2012-02-13 19:18:25 UTC) #5
keybuk
http://codereview.chromium.org/9378039/diff/3001/dbus/object_path.h File dbus/object_path.h (right): http://codereview.chromium.org/9378039/diff/3001/dbus/object_path.h#newcode51 dbus/object_path.h:51: bool operator!=(const ObjectPath&, const ObjectPath&); yup, I missed out ...
8 years, 10 months ago (2012-02-13 20:04:41 UTC) #6
keybuk
ok, now all explicit and boring ;-)
8 years, 10 months ago (2012-02-13 20:19:32 UTC) #7
satorux1
LGTM. Boring code is good! :) BTW, since this patch touches many files, it's desirable ...
8 years, 10 months ago (2012-02-13 20:27:39 UTC) #8
satorux1
+willchan for one-line change under 'net'.
8 years, 10 months ago (2012-02-13 20:28:32 UTC) #9
keybuk
http://codereview.chromium.org/9378039/diff/10001/dbus/object_path.h File dbus/object_path.h (right): http://codereview.chromium.org/9378039/diff/10001/dbus/object_path.h#newcode27 dbus/object_path.h:27: explicit ObjectPath(const char* c_str) : value_(c_str) {} nope, now ...
8 years, 10 months ago (2012-02-13 20:41:12 UTC) #10
keybuk
I don't have committer access, provision or otherwise - so if you can trybot this ...
8 years, 10 months ago (2012-02-13 20:41:52 UTC) #11
satorux1
Started try bots. I'll be nominating you as a provisional committer. trychange.py -R http://codereview.chromium.org/9378039/ --email=satorux@chromium.org,keybuk@chromium.org ...
8 years, 10 months ago (2012-02-13 21:12:28 UTC) #12
satorux1
On 2012/02/13 21:12:28, satorux1 wrote: > Started try bots. I'll be nominating you as a ...
8 years, 10 months ago (2012-02-13 21:14:39 UTC) #13
satorux1
On 2012/02/13 21:14:39, satorux1 wrote: > On 2012/02/13 21:12:28, satorux1 wrote: > > Started try ...
8 years, 10 months ago (2012-02-13 21:20:50 UTC) #14
keybuk
From the trybot failures there were a few more places that needed changing that for ...
8 years, 10 months ago (2012-02-13 23:43:55 UTC) #15
satorux1
Sure. Just restarted the try bots.
8 years, 10 months ago (2012-02-13 23:57:30 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/keybuk@chromium.org/9378039/12019
8 years, 10 months ago (2012-02-14 04:50:07 UTC) #17
keybuk
marking for commit, the linux_chromeos_gtk looks more related to DiRT than the patch
8 years, 10 months ago (2012-02-14 04:50:16 UTC) #18
commit-bot: I haz the power
Presubmit check for 9378039-12019 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 10 months ago (2012-02-14 04:50:26 UTC) #19
willchan no longer on Chromium
net/ changes LGTM On 2012/02/14 04:50:26, I haz the power (commit-bot) wrote: > Presubmit check ...
8 years, 10 months ago (2012-02-14 08:52:10 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/keybuk@chromium.org/9378039/12019
8 years, 10 months ago (2012-02-14 15:16:49 UTC) #21
commit-bot: I haz the power
Presubmit check for 9378039-12019 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 10 months ago (2012-02-14 15:17:06 UTC) #22
keybuk
Hi, owners of: chrome/browser/password_manager, content/browser/, content/browser/geolocation I'd appreciate if it you could take the time ...
8 years, 10 months ago (2012-02-14 15:29:31 UTC) #23
jam
rubberstamp lgtm for content
8 years, 10 months ago (2012-02-14 15:42:42 UTC) #24
John Knottenbelt
lgtm
8 years, 10 months ago (2012-02-14 15:56:14 UTC) #25
bulach
rubberstamp lgtm for geolocation
8 years, 10 months ago (2012-02-14 17:51:24 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/keybuk@chromium.org/9378039/12019
8 years, 10 months ago (2012-02-14 18:28:34 UTC) #27
Mike Mammarella
LGTM
8 years, 10 months ago (2012-02-14 19:37:33 UTC) #28
commit-bot: I haz the power
8 years, 10 months ago (2012-02-14 20:08:10 UTC) #29
Change committed as 121920

Powered by Google App Engine
This is Rietveld 408576698