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

Unified 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, 7 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: 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);
+
+ scoped_refptr<base::TaskRunner> task_runner_;
+ base::WeakPtrFactory<PairingRegistryDelegateLinux> weak_factory_;
+
+ base::FilePath filename_for_testing_;
+
+ DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux);
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_
« 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