OLD | NEW |
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_PROTOCOL_PAIRING_REGISTRY_DELEGATE_WIN_H_ | 5 #ifndef REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_WIN_H_ |
6 #define REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_WIN_H_ | 6 #define REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_WIN_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/win/registry.h" | 13 #include "base/win/registry.h" |
14 #include "remoting/protocol/pairing_registry.h" | 14 #include "remoting/protocol/pairing_registry.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class ListValue; | 17 class ListValue; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace remoting { | 20 namespace remoting { |
21 | 21 |
22 #if defined(OFFICIAL_BUILD) | 22 #if defined(OFFICIAL_BUILD) |
(...skipping 22 matching lines...) Expand all Loading... |
45 public: | 45 public: |
46 PairingRegistryDelegateWin(); | 46 PairingRegistryDelegateWin(); |
47 ~PairingRegistryDelegateWin() override; | 47 ~PairingRegistryDelegateWin() override; |
48 | 48 |
49 // Passes the root keys to be used to access the pairing registry store. | 49 // Passes the root keys to be used to access the pairing registry store. |
50 // |privileged| is optional and may be nullptr. The caller retains ownership | 50 // |privileged| is optional and may be nullptr. The caller retains ownership |
51 // of the passed handles. | 51 // of the passed handles. |
52 bool SetRootKeys(HKEY privileged, HKEY unprivileged); | 52 bool SetRootKeys(HKEY privileged, HKEY unprivileged); |
53 | 53 |
54 // PairingRegistry::Delegate interface | 54 // PairingRegistry::Delegate interface |
55 scoped_ptr<base::ListValue> LoadAll() override; | 55 std::unique_ptr<base::ListValue> LoadAll() override; |
56 bool DeleteAll() override; | 56 bool DeleteAll() override; |
57 protocol::PairingRegistry::Pairing Load( | 57 protocol::PairingRegistry::Pairing Load( |
58 const std::string& client_id) override; | 58 const std::string& client_id) override; |
59 bool Save(const protocol::PairingRegistry::Pairing& pairing) override; | 59 bool Save(const protocol::PairingRegistry::Pairing& pairing) override; |
60 bool Delete(const std::string& client_id) override; | 60 bool Delete(const std::string& client_id) override; |
61 | 61 |
62 private: | 62 private: |
63 base::win::RegKey privileged_; | 63 base::win::RegKey privileged_; |
64 base::win::RegKey unprivileged_; | 64 base::win::RegKey unprivileged_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateWin); | 66 DISALLOW_COPY_AND_ASSIGN(PairingRegistryDelegateWin); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace remoting | 69 } // namespace remoting |
70 | 70 |
71 #endif // REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_WIN_H_ | 71 #endif // REMOTING_PROTOCOL_PAIRING_REGISTRY_DELEGATE_WIN_H_ |
OLD | NEW |