Further cleanup around DBus interface classes.
* Removed the "Glib" part from the various DbusGlib class name and added
"Wrapper" instead: only part of the methods here declared have
anything to do with Glib; in essence, this is an interface containing
wrappers for various DBus functions.
* Changed "Dbus" to "DBus", to comply with the rest of the world.
* Renamed the actual implementation "RealDBusWrapper" (instead of
"Concrete").
* Separated out RealDBusWrapper into its own header file. Client code,
which often only cares about the abstract class, does not need to pull
it unless specifically requiring it.
* Cleaned up the includes in these headers.
Aside from all that, also renamed system_state.cc into
real_system_state.cc, as this is what this file contains.
BUG=None
TEST=Unit tests.
Change-Id: I015c407cbc159aba8b5925eb0e916ba604c829cd
Reviewed-on: https://chromium-review.googlesource.com/189373
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/chrome_browser_proxy_resolver.cc b/chrome_browser_proxy_resolver.cc
index 3841fe9..e5e2fff 100644
--- a/chrome_browser_proxy_resolver.cc
+++ b/chrome_browser_proxy_resolver.cc
@@ -50,7 +50,8 @@
} // namespace {}
-ChromeBrowserProxyResolver::ChromeBrowserProxyResolver(DbusGlibInterface* dbus)
+ChromeBrowserProxyResolver::ChromeBrowserProxyResolver(
+ DBusWrapperInterface* dbus)
: dbus_(dbus), proxy_(NULL), timeout_(kTimeout) {}
bool ChromeBrowserProxyResolver::Init() {
@@ -66,10 +67,10 @@
DBusError dbus_error;
dbus_error_init(&dbus_error);
- dbus_->DbusBusAddMatch(connection, kLibCrosProxyResolveSignalFilter,
+ dbus_->DBusBusAddMatch(connection, kLibCrosProxyResolveSignalFilter,
&dbus_error);
TEST_AND_RETURN_FALSE(!dbus_error_is_set(&dbus_error));
- TEST_AND_RETURN_FALSE(dbus_->DbusConnectionAddFilter(
+ TEST_AND_RETURN_FALSE(dbus_->DBusConnectionAddFilter(
connection,
&ChromeBrowserProxyResolver::StaticFilterMessage,
this,
@@ -78,7 +79,7 @@
proxy_ = dbus_->ProxyNewForName(bus, kLibCrosServiceName, kLibCrosServicePath,
kLibCrosServiceInterface);
if (!proxy_) {
- dbus_->DbusConnectionRemoveFilter(
+ dbus_->DBusConnectionRemoveFilter(
connection,
&ChromeBrowserProxyResolver::StaticFilterMessage,
this);
@@ -94,7 +95,7 @@
DBusGConnection* gbus = dbus_->BusGet(DBUS_BUS_SYSTEM, &gerror);
if (gbus) {
DBusConnection* connection = dbus_->ConnectionGetConnection(gbus);
- dbus_->DbusConnectionRemoveFilter(
+ dbus_->DBusConnectionRemoveFilter(
connection,
&ChromeBrowserProxyResolver::StaticFilterMessage,
this);
@@ -152,7 +153,7 @@
DBusConnection* connection,
DBusMessage* message) {
// Code lifted from libcros.
- if (!dbus_->DbusMessageIsSignal(message,
+ if (!dbus_->DBusMessageIsSignal(message,
kLibCrosProxyResolveSignalInterface,
kLibCrosProxyResolveName)) {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -163,7 +164,7 @@
char* error = NULL;
DBusError arg_error;
dbus_error_init(&arg_error);
- if (!dbus_->DbusMessageGetArgs_3(message, &arg_error,
+ if (!dbus_->DBusMessageGetArgs_3(message, &arg_error,
&source_url,
&proxy_list,
&error)) {