Chromium Code Reviews| Index: remoting/host/pairing_registry_delegate_linux.h |
| diff --git a/remoting/host/pairing_registry_delegate_linux.h b/remoting/host/pairing_registry_delegate_linux.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..110594f918340d98fc5cc320938654b5b754b709 |
| --- /dev/null |
| +++ b/remoting/host/pairing_registry_delegate_linux.h |
| @@ -0,0 +1,45 @@ |
| +// 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 REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_ |
| +#define REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_ |
| + |
| +#include "remoting/protocol/pairing_registry.h" |
| + |
| +#include "base/files/file_path.h" |
| +#include "base/memory/weak_ptr.h" |
| + |
| +namespace remoting { |
| +namespace protocol { |
| + |
| +class PairingRegistryDelegateLinux : public PairingRegistry::Delegate { |
| + public: |
| + explicit PairingRegistryDelegateLinux( |
| + scoped_refptr<base::TaskRunner> task_runner); |
| + |
| + // PairingRegistry::Delegate interface |
| + virtual void Save( |
| + const PairingRegistry::PairedClients& paired_clients) OVERRIDE; |
| + virtual PairingRegistry::PairedClients LoadOnCurrentThread() OVERRIDE; |
| + |
| + private: |
| + FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, SaveAndLoad); |
| + |
| + void SaveOnCurrentThread( |
| + const PairingRegistry::PairedClients& paired_clients); |
| + bool GetRegistryFilePath(base::FilePath* path); |
| + void SetFilenameForTesting(const base::FilePath &filename); |
|
Wez
2013/06/01 01:34:41
nit: Add comments to explain these members, e.g. w
Jamie
2013/06/19 17:56:44
Done.
|
| + |
| + scoped_refptr<base::TaskRunner> task_runner_; |
| + base::WeakPtrFactory<PairingRegistryDelegateLinux> weak_factory_; |
|
Wez
2013/06/01 01:34:41
This member should be the last in the class.
Jamie
2013/06/19 17:56:44
Done.
|
| + |
| + base::FilePath filename_for_testing_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux); |
| +}; |
| + |
| +} // namespace protocol |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_ |