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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_LINUX_H_ 5 #ifndef REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_LINUX_H_
6 #define REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_LINUX_H_ 6 #define REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_LINUX_H_
7 7
8 #include "remoting/protocol/pairing_registry.h" 8 #include "remoting/protocol/pairing_registry.h"
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 13
14 namespace base { 14 namespace base {
15 class ListValue; 15 class ListValue;
16 } // namespace base 16 } // namespace base
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 class PairingRegistryDelegateLinux 20 class PairingRegistryDelegateLinux
21 : public protocol::PairingRegistry::Delegate { 21 : public protocol::PairingRegistry::Delegate {
22 public: 22 public:
23 PairingRegistryDelegateLinux(); 23 PairingRegistryDelegateLinux();
24 ~PairingRegistryDelegateLinux() override; 24 ~PairingRegistryDelegateLinux() override;
25 25
26 // PairingRegistry::Delegate interface 26 // PairingRegistry::Delegate interface
27 scoped_ptr<base::ListValue> LoadAll() override; 27 std::unique_ptr<base::ListValue> LoadAll() override;
28 bool DeleteAll() override; 28 bool DeleteAll() override;
29 protocol::PairingRegistry::Pairing Load( 29 protocol::PairingRegistry::Pairing Load(
30 const std::string& client_id) override; 30 const std::string& client_id) override;
31 bool Save(const protocol::PairingRegistry::Pairing& pairing) override; 31 bool Save(const protocol::PairingRegistry::Pairing& pairing) override;
32 bool Delete(const std::string& client_id) override; 32 bool Delete(const std::string& client_id) override;
33 33
34 private: 34 private:
35 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, SaveAndLoad); 35 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, SaveAndLoad);
36 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, Stateless); 36 FRIEND_TEST_ALL_PREFIXES(PairingRegistryDelegateLinuxTest, Stateless);
37 37
38 // Return the path to the directory to use for loading and saving paired 38 // Return the path to the directory to use for loading and saving paired
39 // clients. 39 // clients.
40 base::FilePath GetRegistryPath(); 40 base::FilePath GetRegistryPath();
41 41
42 // For testing purposes, set the path returned by |GetRegistryPath()|. 42 // For testing purposes, set the path returned by |GetRegistryPath()|.
43 void SetRegistryPathForTesting(const base::FilePath& registry_path); 43 void SetRegistryPathForTesting(const base::FilePath& registry_path);
44 44
45 base::FilePath registry_path_for_testing_; 45 base::FilePath registry_path_for_testing_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux); 47 DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateLinux);
48 }; 48 };
49 49
50 } // namespace remoting 50 } // namespace remoting
51 51
52 #endif // REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_LINUX_H_ 52 #endif // REMOTING_HOST_PAIRING_REGISTRY_DELEGATE_LINUX_H_
OLDNEW
« no previous file with comments | « remoting/host/pairing_registry_delegate.cc ('k') | remoting/host/pairing_registry_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698