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

Side by Side Diff: remoting/host/plugin/host_script_object.h

Issue 8468015: The host sends simple log entries to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PLUGIN_HOST_SCRIPT_OBJECT_H_ 5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/synchronization/cancellation_flag.h" 14 #include "base/synchronization/cancellation_flag.h"
15 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
16 #include "base/synchronization/waitable_event.h" 16 #include "base/synchronization/waitable_event.h"
17 #include "base/string16.h" 17 #include "base/string16.h"
18 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
19 #include "base/time.h" 19 #include "base/time.h"
20 #include "remoting/base/plugin_message_loop_proxy.h" 20 #include "remoting/base/plugin_message_loop_proxy.h"
21 #include "remoting/host/chromoting_host_context.h" 21 #include "remoting/host/chromoting_host_context.h"
22 #include "remoting/host/host_status_observer.h" 22 #include "remoting/host/host_status_observer.h"
23 #include "remoting/host/log_to_server.h"
23 #include "remoting/host/plugin/host_plugin_utils.h" 24 #include "remoting/host/plugin/host_plugin_utils.h"
24 #include "remoting/host/ui_strings.h" 25 #include "remoting/host/ui_strings.h"
25 #include "third_party/npapi/bindings/npapi.h" 26 #include "third_party/npapi/bindings/npapi.h"
26 #include "third_party/npapi/bindings/npfunctions.h" 27 #include "third_party/npapi/bindings/npfunctions.h"
27 #include "third_party/npapi/bindings/npruntime.h" 28 #include "third_party/npapi/bindings/npruntime.h"
28 29
29 namespace remoting { 30 namespace remoting {
30 31
31 class ChromotingHost; 32 class ChromotingHost;
32 class DesktopEnvironment; 33 class DesktopEnvironment;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 base::TimeDelta access_code_lifetime_; 171 base::TimeDelta access_code_lifetime_;
171 172
172 std::string client_username_; 173 std::string client_username_;
173 ScopedRefNPObject log_debug_info_func_; 174 ScopedRefNPObject log_debug_info_func_;
174 ScopedRefNPObject on_nat_traversal_policy_changed_func_; 175 ScopedRefNPObject on_nat_traversal_policy_changed_func_;
175 ScopedRefNPObject on_state_changed_func_; 176 ScopedRefNPObject on_state_changed_func_;
176 base::PlatformThreadId np_thread_id_; 177 base::PlatformThreadId np_thread_id_;
177 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_proxy_; 178 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_proxy_;
178 179
179 scoped_ptr<RegisterSupportHostRequest> register_request_; 180 scoped_ptr<RegisterSupportHostRequest> register_request_;
181 scoped_ptr<LogToServer> log_to_server_;
180 scoped_refptr<MutableHostConfig> host_config_; 182 scoped_refptr<MutableHostConfig> host_config_;
181 ChromotingHostContext host_context_; 183 ChromotingHostContext host_context_;
182 scoped_ptr<DesktopEnvironment> desktop_environment_; 184 scoped_ptr<DesktopEnvironment> desktop_environment_;
183 185
184 scoped_refptr<ChromotingHost> host_; 186 scoped_refptr<ChromotingHost> host_;
185 int failed_login_attempts_; 187 int failed_login_attempts_;
186 188
187 UiStrings ui_strings_; 189 UiStrings ui_strings_;
188 base::Lock ui_strings_lock_; 190 base::Lock ui_strings_lock_;
189 191
190 base::WaitableEvent disconnected_event_; 192 base::WaitableEvent disconnected_event_;
191 193
192 // True if we're in the middle of handling a log message. 194 // True if we're in the middle of handling a log message.
193 bool am_currently_logging_; 195 bool am_currently_logging_;
194 196
195 base::Lock nat_policy_lock_; 197 base::Lock nat_policy_lock_;
196 198
197 scoped_ptr<policy_hack::NatPolicy> nat_policy_; 199 scoped_ptr<policy_hack::NatPolicy> nat_policy_;
198 200
199 // Host the current nat traversal policy setting. 201 // Host the current nat traversal policy setting.
200 bool nat_traversal_enabled_; 202 bool nat_traversal_enabled_;
201 203
202 // Indiciates whether or not a policy has ever been read. This is to ensure 204 // Indicates whether or not a policy has ever been read. This is to ensure
203 // that on startup, we do not accidentally start a connection before we have 205 // that on startup, we do not accidentally start a connection before we have
204 // queried our policy restrictions. 206 // queried our policy restrictions.
205 bool policy_received_; 207 bool policy_received_;
206 208
209 // Whether logging to a server is enabled.
210 bool enable_log_to_server_;
211
207 // On startup, it is possible to have Connect() called before the policy read 212 // On startup, it is possible to have Connect() called before the policy read
208 // is completed. Rather than just failing, we thunk the connection call so 213 // is completed. Rather than just failing, we thunk the connection call so
209 // it can be executed after at least one successful policy read. This 214 // it can be executed after at least one successful policy read. This
210 // variable contains the thunk if it is necessary. 215 // variable contains the thunk if it is necessary.
211 base::Closure pending_connect_; 216 base::Closure pending_connect_;
212 }; 217 };
213 218
214 } // namespace remoting 219 } // namespace remoting
215 220
216 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject); 221 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject);
217 222
218 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 223 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698