extensionview: Update loadNextSrc comments.
[chromium-blink-merge.git] / remoting / host / pairing_registry_delegate_linux.h
blobad342ebf19531bc365a5b694f643b79c441a18d5
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.
5 #ifndef REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_
6 #define REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_
8 #include "remoting/protocol/pairing_registry.h"
10 #include "base/files/file_path.h"
12 namespace base {
13 class ListValue;
14 } // namespace base
16 namespace remoting {
18 class PairingRegistryDelegateLinux
19 : public protocol::PairingRegistry::Delegate {
20 public:
21 PairingRegistryDelegateLinux();
22 ~PairingRegistryDelegateLinux() override;
24 // PairingRegistry::Delegate interface
25 scoped_ptr<base::ListValue> LoadAll() override;
26 bool DeleteAll() override;
27 protocol::PairingRegistry::Pairing Load(
28 const std::string& client_id) override;
29 bool Save(const protocol::PairingRegistry::Pairing& pairing) override;
30 bool Delete(const std::string& client_id) override;
32 private:
33 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, SaveAndLoad);
34 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, Stateless);
36 // Return the path to the directory to use for loading and saving paired
37 // clients.
38 base::FilePath GetRegistryPath();
40 // For testing purposes, set the path returned by |GetRegistryPath()|.
41 void SetRegistryPathForTesting(const base::FilePath& registry_path);
43 base::FilePath registry_path_for_testing_;
45 DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux);
48 } // namespace remoting
50 #endif // REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_LINUX_H_