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

Unified Diff: chromeos/dbus/fake_modem_messaging_client.h

Issue 91373004: Move DBusClient stub implementations into separate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/fake_introspectable_client.cc ('k') | chromeos/dbus/fake_modem_messaging_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_modem_messaging_client.h
diff --git a/chromeos/dbus/fake_gsm_sms_client.h b/chromeos/dbus/fake_modem_messaging_client.h
similarity index 38%
copy from chromeos/dbus/fake_gsm_sms_client.h
copy to chromeos/dbus/fake_modem_messaging_client.h
index 2e26dd1b6be37e8635351a1fd39c50022475ff05..16dc4bfa0af6bd651306b1577bcac1647dd35f55 100644
--- a/chromeos/dbus/fake_gsm_sms_client.h
+++ b/chromeos/dbus/fake_modem_messaging_client.h
@@ -1,26 +1,22 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_
-#define CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_
+#ifndef CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_
+#define CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_
-#include <string>
-
-#include "base/memory/weak_ptr.h"
-#include "base/values.h"
-#include "chromeos/dbus/gsm_sms_client.h"
-#include "dbus/object_path.h"
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/modem_messaging_client.h"
namespace chromeos {
-// A fake implementation of GsmSMSClient used for tests.
-class CHROMEOS_EXPORT FakeGsmSMSClient : public GsmSMSClient {
+class CHROMEOS_EXPORT FakeModemMessagingClient : public ModemMessagingClient {
public:
- FakeGsmSMSClient();
- virtual ~FakeGsmSMSClient();
+ FakeModemMessagingClient();
+ virtual ~FakeModemMessagingClient();
- // GsmSMSClient overrides
virtual void Init(dbus::Bus* bus) OVERRIDE;
virtual void SetSmsReceivedHandler(const std::string& service_name,
const dbus::ObjectPath& object_path,
@@ -31,41 +27,19 @@ class CHROMEOS_EXPORT FakeGsmSMSClient : public GsmSMSClient {
OVERRIDE;
virtual void Delete(const std::string& service_name,
const dbus::ObjectPath& object_path,
- uint32 index,
+ const dbus::ObjectPath& sms_path,
const DeleteCallback& callback) OVERRIDE;
- virtual void Get(const std::string& service_name,
- const dbus::ObjectPath& object_path,
- uint32 index,
- const GetCallback& callback) OVERRIDE;
virtual void List(const std::string& service_name,
const dbus::ObjectPath& object_path,
const ListCallback& callback) OVERRIDE;
- virtual void RequestUpdate(const std::string& service_name,
- const dbus::ObjectPath& object_path) OVERRIDE;
-
- // Sets if the command line switch for test is present. RequestUpdate()
- // changes its behavior depending on the switch.
- void set_sms_test_message_switch_present(bool is_present) {
- sms_test_message_switch_present_ = is_present;
- }
private:
- void PushTestMessageChain();
- void PushTestMessageDelayed();
- bool PushTestMessage();
-
- int test_index_;
- std::vector<std::string> test_messages_;
- base::ListValue message_list_;
- SmsReceivedHandler handler_;
-
- bool sms_test_message_switch_present_;
-
- base::WeakPtrFactory<FakeGsmSMSClient> weak_ptr_factory_;
+ SmsReceivedHandler sms_received_handler_;
+ std::vector<dbus::ObjectPath> message_paths_;
- DISALLOW_COPY_AND_ASSIGN(FakeGsmSMSClient);
+ DISALLOW_COPY_AND_ASSIGN(FakeModemMessagingClient);
};
} // namespace chromeos
-#endif // CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_
+#endif // CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_
« no previous file with comments | « chromeos/dbus/fake_introspectable_client.cc ('k') | chromeos/dbus/fake_modem_messaging_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698