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

Unified Diff: chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h

Issue 10546010: Implement support for the OOB Pairing APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 years, 6 months 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
Index: chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
diff --git a/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h b/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
index 2b5f7bce7b261395ec2a592b76251d7301cf9680..f690a9a7a04903020d960e63c0eacd5dcc2e6e12 100644
--- a/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
+++ b/chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h
@@ -6,7 +6,10 @@
#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
#pragma once
+#include <string>
+
#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
+#include "chromeos/dbus/bluetooth_out_of_band_client.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
@@ -18,8 +21,19 @@ class MockBluetoothAdapter : public BluetoothAdapter {
MOCK_CONST_METHOD0(IsPresent, bool());
MOCK_CONST_METHOD0(IsPowered, bool());
-
MOCK_CONST_METHOD0(GetDevices, ConstDeviceList());
+ MOCK_METHOD2(ClearOutOfBandPairingData, void(const std::string& address,
+ const ResultCallback& callback));
+
+ // Return whatever data was set with SetLocalOutOfBandPairingData.
+ virtual void ReadLocalOutOfBandPairingData(
+ const BluetoothOutOfBandClient::DataCallback& callback) const;
+
+ // Ownership of |data| remains with the caller.
+ void SetLocalOutOfBandPairingData(BluetoothOutOfBandPairingData* data);
satorux1 2012/06/14 16:07:55 Can you go with a regular MOCK_METHOD? I think it'
bryeung 2012/06/14 17:56:04 It's a pain to deal with returning data to callbac
+
+ private:
+ const BluetoothOutOfBandPairingData* local_oob_data_;
};
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698