Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_ | |
| 6 #define REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_ | |
| 7 | |
| 8 #include "remoting/protocol/pairing_registry.h" | |
| 9 | |
| 10 #include "base/files/file_path.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 | |
| 13 namespace remoting { | |
| 14 namespace protocol { | |
| 15 | |
| 16 class PairingRegistryDelegateLinux : public PairingRegistry::Delegate { | |
| 17 public: | |
| 18 explicit PairingRegistryDelegateLinux( | |
| 19 scoped_refptr<base::TaskRunner> task_runner); | |
| 20 | |
| 21 // PairingRegistry::Delegate interface | |
| 22 virtual void Save( | |
| 23 const PairingRegistry::PairedClients& paired_clients) OVERRIDE; | |
| 24 virtual PairingRegistry::PairedClients LoadOnCurrentThread() OVERRIDE; | |
| 25 | |
| 26 private: | |
| 27 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, SaveAndLoad); | |
| 28 | |
| 29 void SaveOnCurrentThread( | |
| 30 const PairingRegistry::PairedClients& paired_clients); | |
| 31 bool GetRegistryFilePath(base::FilePath* path); | |
| 32 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.
| |
| 33 | |
| 34 scoped_refptr<base::TaskRunner> task_runner_; | |
| 35 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.
| |
| 36 | |
| 37 base::FilePath filename_for_testing_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux); | |
| 40 }; | |
| 41 | |
| 42 } // namespace protocol | |
| 43 } // namespace remoting | |
| 44 | |
| 45 #endif // REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_ | |
| OLD | NEW |