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

Side by Side Diff: remoting/host/setup/native_messaging_host.h

Issue 23461030: Made sure NativeMessagingHostTest.All can handle out of order responses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more feedback Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/setup/native_messaging_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SETUP_NATIVE_MESSAGING_HOST_H_ 5 #ifndef REMOTING_HOST_SETUP_NATIVE_MESSAGING_HOST_H_
6 #define REMOTING_HOST_SETUP_NATIVE_MESSAGING_HOST_H_ 6 #define REMOTING_HOST_SETUP_NATIVE_MESSAGING_HOST_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // not afterwards), so it needs to be destroyed before other members of this 131 // not afterwards), so it needs to be destroyed before other members of this
132 // class (except for |weak_factory_|). 132 // class (except for |weak_factory_|).
133 scoped_ptr<remoting::DaemonController> daemon_controller_; 133 scoped_ptr<remoting::DaemonController> daemon_controller_;
134 134
135 // Used to load and update the paired clients for this host. 135 // Used to load and update the paired clients for this host.
136 scoped_refptr<protocol::PairingRegistry> pairing_registry_; 136 scoped_refptr<protocol::PairingRegistry> pairing_registry_;
137 137
138 // Used to exchange the service account authorization code for credentials. 138 // Used to exchange the service account authorization code for credentials.
139 scoped_ptr<OAuthClient> oauth_client_; 139 scoped_ptr<OAuthClient> oauth_client_;
140 140
141 // Keeps track of pending requests. Used to delay shutdown until all responses
142 // have been sent.
143 int pending_requests_;
144
145 // True if Shutdown() has been called.
146 bool shutdown_;
147
141 base::WeakPtrFactory<NativeMessagingHost> weak_factory_; 148 base::WeakPtrFactory<NativeMessagingHost> weak_factory_;
142 149
143 DISALLOW_COPY_AND_ASSIGN(NativeMessagingHost); 150 DISALLOW_COPY_AND_ASSIGN(NativeMessagingHost);
144 }; 151 };
145 152
146 // Creates a NativeMessagingHost instance, attaches it to stdin/stdout and runs 153 // Creates a NativeMessagingHost instance, attaches it to stdin/stdout and runs
147 // the message loop until NativeMessagingHost signals shutdown. 154 // the message loop until NativeMessagingHost signals shutdown.
148 int NativeMessagingHostMain(); 155 int NativeMessagingHostMain();
149 156
150 } // namespace remoting 157 } // namespace remoting
151 158
152 #endif // REMOTING_HOST_SETUP_NATIVE_MESSAGING_HOST_H_ 159 #endif // REMOTING_HOST_SETUP_NATIVE_MESSAGING_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/setup/native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698