diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 12:12:05 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 12:12:05 +0000 |
commit | df5189fff1265af62b9f4820b05706cc7515838a (patch) | |
tree | b35d6ddadb26383a6156d5b9cd36d8c390713568 /remoting/protocol/protocol_mock_objects.cc | |
parent | 42afafedacdb7f002be5788105c9a20c2abe27b3 (diff) | |
download | chromium_src-df5189fff1265af62b9f4820b05706cc7515838a.zip chromium_src-df5189fff1265af62b9f4820b05706cc7515838a.tar.gz chromium_src-df5189fff1265af62b9f4820b05706cc7515838a.tar.bz2 |
Changes to PairingRegistry to facilitate per-platform implementions.
Implementing the Linux pairing registry delegate required some changes to the cross-platform code. I've isolated them in this CL for clarity:
* Added a timestamp to the Pairing struct and made it a class with a Create method to generate the random information and timestamp.
* Added a callback to AddPairing. For now, this is only used in the unit test.
I also fixed a couple of unrelated linter errors in protocol_mock_objects.
BUG=156182
Review URL: https://chromiumcodereview.appspot.com/17063003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/protocol_mock_objects.cc')
-rw-r--r-- | remoting/protocol/protocol_mock_objects.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/remoting/protocol/protocol_mock_objects.cc b/remoting/protocol/protocol_mock_objects.cc index eb4022a..1902d83 100644 --- a/remoting/protocol/protocol_mock_objects.cc +++ b/remoting/protocol/protocol_mock_objects.cc @@ -55,8 +55,12 @@ MockPairingRegistryDelegate::~MockPairingRegistryDelegate() { } void MockPairingRegistryDelegate::AddPairing( - const PairingRegistry::Pairing& new_paired_client) { - paired_clients_[new_paired_client.client_id] = new_paired_client; + const PairingRegistry::Pairing& new_paired_client, + const PairingRegistry::AddPairingCallback& callback) { + paired_clients_[new_paired_client.client_id()] = new_paired_client; + if (!callback.is_null()) { + callback.Run(true); + } } void MockPairingRegistryDelegate::GetPairing( |