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

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

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 const wchar_t kPairingRegistrySecretsKeyName[] = L"secrets"; 31 const wchar_t kPairingRegistrySecretsKeyName[] = L"secrets";
32 32
33 // Stores client pairing information in Windows registry. Two separate registry 33 // Stores client pairing information in Windows registry. Two separate registry
34 // keys are used: 34 // keys are used:
35 // - |privileged| - contains the shared secrets of all pairings. This key must 35 // - |privileged| - contains the shared secrets of all pairings. This key must
36 // be protected by a strong ACL denying access to unprivileged 36 // be protected by a strong ACL denying access to unprivileged
37 // code. 37 // code.
38 // - |unprivileged| - contains the rest of pairing state. 38 // - |unprivileged| - contains the rest of pairing state.
39 // 39 //
40 // Creator of this object is responsible for passing the registry key handles 40 // Creator of this object is responsible for passing the registry key handles
41 // with appropriate access. |privileged| may be NULL if read-only access is 41 // with appropriate access. |privileged| may be nullptr if read-only access is
42 // sufficient. Shared secrets will not be returned in such a case. 42 // sufficient. Shared secrets will not be returned in such a case.
43 class PairingRegistryDelegateWin 43 class PairingRegistryDelegateWin
44 : public protocol::PairingRegistry::Delegate { 44 : public protocol::PairingRegistry::Delegate {
45 public: 45 public:
46 PairingRegistryDelegateWin(); 46 PairingRegistryDelegateWin();
47 virtual ~PairingRegistryDelegateWin(); 47 virtual ~PairingRegistryDelegateWin();
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 NULL. The caller retains ownership of 50 // |privileged| is optional and may be nullptr. The caller retains ownership
51 // 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 virtual scoped_ptr<base::ListValue> LoadAll() override; 55 virtual scoped_ptr<base::ListValue> LoadAll() override;
56 virtual bool DeleteAll() override; 56 virtual bool DeleteAll() override;
57 virtual protocol::PairingRegistry::Pairing Load( 57 virtual protocol::PairingRegistry::Pairing Load(
58 const std::string& client_id) override; 58 const std::string& client_id) override;
59 virtual bool Save(const protocol::PairingRegistry::Pairing& pairing) override; 59 virtual bool Save(const protocol::PairingRegistry::Pairing& pairing) override;
60 virtual bool Delete(const std::string& client_id) override; 60 virtual 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_
OLDNEW
« no previous file with comments | « remoting/host/pairing_registry_delegate.h ('k') | remoting/host/pairing_registry_delegate_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698