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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 9117038: Convert all remaining explicit LeakyLazyInstanceTraits users to ::Leaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.cc ('k') | remoting/host/local_input_monitor_mac.mm » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "remoting/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 29 matching lines...) Expand all
40 // This flag blocks LOGs to the UI if we're already in the middle of logging 40 // This flag blocks LOGs to the UI if we're already in the middle of logging
41 // to the UI. This prevents a potential infinite loop if we encounter an error 41 // to the UI. This prevents a potential infinite loop if we encounter an error
42 // while sending the log message to the UI. 42 // while sending the log message to the UI.
43 static bool g_logging_to_plugin = false; 43 static bool g_logging_to_plugin = false;
44 static bool g_has_logging_instance = false; 44 static bool g_has_logging_instance = false;
45 static ChromotingInstance* g_logging_instance = NULL; 45 static ChromotingInstance* g_logging_instance = NULL;
46 static logging::LogMessageHandlerFunction g_logging_old_handler = NULL; 46 static logging::LogMessageHandlerFunction g_logging_old_handler = NULL;
47 47
48 const char ChromotingInstance::kMimeType[] = "pepper-application/x-chromoting"; 48 const char ChromotingInstance::kMimeType[] = "pepper-application/x-chromoting";
49 49
50 static base::LazyInstance<base::Lock, 50 static base::LazyInstance<base::Lock>::Leaky
51 base::LeakyLazyInstanceTraits<base::Lock> >
52 g_logging_lock = LAZY_INSTANCE_INITIALIZER; 51 g_logging_lock = LAZY_INSTANCE_INITIALIZER;
53 52
54 ChromotingInstance::ChromotingInstance(PP_Instance pp_instance) 53 ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
55 : pp::InstancePrivate(pp_instance), 54 : pp::InstancePrivate(pp_instance),
56 initialized_(false), 55 initialized_(false),
57 plugin_message_loop_( 56 plugin_message_loop_(
58 new PluginMessageLoopProxy(&plugin_thread_delegate_)), 57 new PluginMessageLoopProxy(&plugin_thread_delegate_)),
59 context_(plugin_message_loop_), 58 context_(plugin_message_loop_),
60 scale_to_fit_(false), 59 scale_to_fit_(false),
61 thread_proxy_(new ScopedThreadProxy(plugin_message_loop_)) { 60 thread_proxy_(new ScopedThreadProxy(plugin_message_loop_)) {
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 return client_->GetStats(); 352 return client_->GetStats();
354 } 353 }
355 354
356 void ChromotingInstance::ReleaseAllKeys() { 355 void ChromotingInstance::ReleaseAllKeys() {
357 if (key_event_tracker_.get()) { 356 if (key_event_tracker_.get()) {
358 key_event_tracker_->ReleaseAllKeys(); 357 key_event_tracker_->ReleaseAllKeys();
359 } 358 }
360 } 359 }
361 360
362 } // namespace remoting 361 } // namespace remoting
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.cc ('k') | remoting/host/local_input_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698