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

Side by Side Diff: remoting/host/it2me/it2me_native_messaging_host.h

Issue 2867223003: Send a message to the client if bad It2Me policies are read. (Closed)
Patch Set: Created 3 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 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_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_
6 #define REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ 6 #define REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void ProcessHello(std::unique_ptr<base::DictionaryValue> message, 65 void ProcessHello(std::unique_ptr<base::DictionaryValue> message,
66 std::unique_ptr<base::DictionaryValue> response) const; 66 std::unique_ptr<base::DictionaryValue> response) const;
67 void ProcessConnect(std::unique_ptr<base::DictionaryValue> message, 67 void ProcessConnect(std::unique_ptr<base::DictionaryValue> message,
68 std::unique_ptr<base::DictionaryValue> response); 68 std::unique_ptr<base::DictionaryValue> response);
69 void ProcessDisconnect(std::unique_ptr<base::DictionaryValue> message, 69 void ProcessDisconnect(std::unique_ptr<base::DictionaryValue> message,
70 std::unique_ptr<base::DictionaryValue> response); 70 std::unique_ptr<base::DictionaryValue> response);
71 void ProcessIncomingIq(std::unique_ptr<base::DictionaryValue> message, 71 void ProcessIncomingIq(std::unique_ptr<base::DictionaryValue> message,
72 std::unique_ptr<base::DictionaryValue> response); 72 std::unique_ptr<base::DictionaryValue> response);
73 void SendErrorAndExit(std::unique_ptr<base::DictionaryValue> response, 73 void SendErrorAndExit(std::unique_ptr<base::DictionaryValue> response,
74 const std::string& description) const; 74 const std::string& description) const;
75 void SendPolicyErrorAndExit() const;
75 void SendMessageToClient(std::unique_ptr<base::Value> message) const; 76 void SendMessageToClient(std::unique_ptr<base::Value> message) const;
76 77
77 // Callback for DelegatingSignalStrategy. 78 // Callback for DelegatingSignalStrategy.
78 void SendOutgoingIq(const std::string& iq); 79 void SendOutgoingIq(const std::string& iq);
79 80
80 // Called when initial policies are read and when they change. 81 // Called when initial policies are read and when they change.
81 void OnPolicyUpdate(std::unique_ptr<base::DictionaryValue> policies); 82 void OnPolicyUpdate(std::unique_ptr<base::DictionaryValue> policies);
82 83
84 // Called when malformed policies are detected.
85 void OnPolicyError();
86
83 // Returns whether the request was successfully sent to the elevated host. 87 // Returns whether the request was successfully sent to the elevated host.
84 bool DelegateToElevatedHost(std::unique_ptr<base::DictionaryValue> message); 88 bool DelegateToElevatedHost(std::unique_ptr<base::DictionaryValue> message);
85 89
86 // Used to determine whether to create and pass messages to an elevated host. 90 // Used to determine whether to create and pass messages to an elevated host.
87 bool needs_elevation_ = false; 91 bool needs_elevation_ = false;
88 92
89 #if defined(OS_WIN) 93 #if defined(OS_WIN)
90 // Controls the lifetime of the elevated native messaging host process. 94 // Controls the lifetime of the elevated native messaging host process.
91 // Note: 'elevated' in this instance means having the UiAccess privilege, not 95 // Note: 'elevated' in this instance means having the UiAccess privilege, not
92 // being run as a higher privilege user. 96 // being run as a higher privilege user.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 131
128 base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_; 132 base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_;
129 base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_; 133 base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_;
130 134
131 DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHost); 135 DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHost);
132 }; 136 };
133 137
134 } // namespace remoting 138 } // namespace remoting
135 139
136 #endif // REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ 140 #endif // REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_native_messaging_host.cc » ('j') | remoting/host/it2me/it2me_native_messaging_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698