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

Side by Side Diff: remoting/host/pairing_registry_delegate_linux.h

Issue 15709005: Linux pairing registry delegate implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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);
33
34 scoped_refptr<base::TaskRunner> task_runner_;
35 base::WeakPtrFactory<PairingRegistryDelegateLinux> weak_factory_;
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_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/pairing_registry_delegate_linux.cc » ('j') | remoting/protocol/pairing_registry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698