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

Unified Diff: remoting/host/setup/me2me_native_messaging_host.h

Issue 165363002: Fixing a few crashes in the me2me native messaging host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/me2me_native_messaging_host.h
diff --git a/remoting/host/setup/me2me_native_messaging_host.h b/remoting/host/setup/me2me_native_messaging_host.h
index c21b50ab07844788c457a45dad4cfd432f5048e5..8f242c24655183be56dfb2101bf1f9f98e143ac1 100644
--- a/remoting/host/setup/me2me_native_messaging_host.h
+++ b/remoting/host/setup/me2me_native_messaging_host.h
@@ -48,6 +48,8 @@ class Me2MeNativeMessagingHost {
void Start(const base::Closure& quit_closure);
private:
+ // Callback to process messages from the native messaging client through
+ // |channel_|.
void ProcessRequest(scoped_ptr<base::DictionaryValue> message);
// These "Process.." methods handle specific request types. The |response|
@@ -122,21 +124,29 @@ class Me2MeNativeMessagingHost {
void Stop();
- void DelegateToElevatedHost(scoped_ptr<base::DictionaryValue> message,
- scoped_ptr<base::DictionaryValue> response);
+ // Returns true if the request was successfully delegated to the elevated
+ // host and false otherwise.
+ bool DelegateToElevatedHost(scoped_ptr<base::DictionaryValue> message);
#if defined(OS_WIN)
+ // Create and connect to an elevated host process if necessary.
+ // |elevated_channel_| will contain the native messaging channel to the
+ // elevated host if the function succeeds.
void Me2MeNativeMessagingHost::EnsureElevatedHostCreated();
+
+ // Callback to process messages from the elevated host through
+ // |elevated_channel_|.
void ProcessDelegateResponse(scoped_ptr<base::DictionaryValue> message);
- // input/output handles for the channel to the elevated host.
- base::win::ScopedHandle delegate_write_handle_;
- base::win::ScopedHandle delegate_read_handle_;
+ // Native messaging channel used to communicate with the elevated host.
scoped_ptr<NativeMessagingChannel> elevated_channel_;
#endif // defined(OS_WIN)
bool needs_elevation_;
base::Closure quit_closure_;
+
+ // Native messaging channel used to communicate with the native message
+ // client.
scoped_ptr<NativeMessagingChannel> channel_;
scoped_refptr<DaemonController> daemon_controller_;
« no previous file with comments | « no previous file | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698