Index: chromeos/dbus/modem_messaging_client.cc |
diff --git a/chromeos/dbus/modem_messaging_client.cc b/chromeos/dbus/modem_messaging_client.cc |
index b421b7cc338a5b9cdaf0e4bbc94f862ef01f809e..9919eb8713d4c04a997ab6e3ba847bbfe9d40b3f 100644 |
--- a/chromeos/dbus/modem_messaging_client.cc |
+++ b/chromeos/dbus/modem_messaging_client.cc |
@@ -197,67 +197,6 @@ class CHROMEOS_EXPORT ModemMessagingClientImpl : public ModemMessagingClient { |
DISALLOW_COPY_AND_ASSIGN(ModemMessagingClientImpl); |
}; |
-class CHROMEOS_EXPORT ModemMessagingClientStubImpl |
- : public ModemMessagingClient { |
- public: |
- ModemMessagingClientStubImpl() {} |
- virtual ~ModemMessagingClientStubImpl() {} |
- |
- // ModemMessagingClient override. |
- virtual void Init(dbus::Bus* bus) OVERRIDE {} |
- virtual void SetSmsReceivedHandler( |
- const std::string& service_name, |
- const dbus::ObjectPath& object_path, |
- const SmsReceivedHandler& handler) OVERRIDE { |
- DCHECK(sms_received_handler_.is_null()); |
- sms_received_handler_ = handler; |
- } |
- |
- // ModemMessagingClient override. |
- virtual void ResetSmsReceivedHandler( |
- const std::string& service_name, |
- const dbus::ObjectPath& object_path) OVERRIDE { |
- sms_received_handler_.Reset(); |
- } |
- |
- // ModemMessagingClient override. |
- virtual void Delete(const std::string& service_name, |
- const dbus::ObjectPath& object_path, |
- const dbus::ObjectPath& sms_path, |
- const DeleteCallback& callback) OVERRIDE { |
- std::vector<dbus::ObjectPath>::iterator it( |
- find(message_paths_.begin(), message_paths_.end(), sms_path)); |
- if (it != message_paths_.end()) |
- message_paths_.erase(it); |
- callback.Run(); |
- } |
- |
- // ModemMessagingClient override. |
- virtual void List(const std::string& service_name, |
- const dbus::ObjectPath& object_path, |
- const ListCallback& callback) OVERRIDE { |
- // This entire ModemMessagingClientStubImpl is for testing. |
- // Calling List with |service_name| equal to "AddSMS" allows unit |
- // tests to confirm that the sms_received_handler is functioning. |
- if (service_name == "AddSMS") { |
- std::vector<dbus::ObjectPath> no_paths; |
- const dbus::ObjectPath kSmsPath("/SMS/0"); |
- message_paths_.push_back(kSmsPath); |
- if (!sms_received_handler_.is_null()) |
- sms_received_handler_.Run(kSmsPath, true); |
- callback.Run(no_paths); |
- } else { |
- callback.Run(message_paths_); |
- } |
- } |
- |
- private: |
- SmsReceivedHandler sms_received_handler_; |
- std::vector<dbus::ObjectPath> message_paths_; |
- |
- DISALLOW_COPY_AND_ASSIGN(ModemMessagingClientStubImpl); |
-}; |
- |
} // namespace |
//////////////////////////////////////////////////////////////////////////////// |
@@ -269,13 +208,8 @@ ModemMessagingClient::~ModemMessagingClient() {} |
// static |
-ModemMessagingClient* ModemMessagingClient::Create( |
- DBusClientImplementationType type) { |
- if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) { |
- return new ModemMessagingClientImpl(); |
- } |
- DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
- return new ModemMessagingClientStubImpl(); |
+ModemMessagingClient* ModemMessagingClient::Create() { |
+ return new ModemMessagingClientImpl(); |
} |