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

Side by Side Diff: ppapi/proxy/ppb_broker_proxy.cc

Issue 14307011: ppapi: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_audio_proxy.cc ('k') | ppapi/proxy/ppb_file_ref_proxy.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 (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 "ppapi/proxy/ppb_broker_proxy.h" 5 #include "ppapi/proxy/ppb_broker_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/trusted/ppb_broker_trusted.h" 9 #include "ppapi/c/trusted/ppb_broker_trusted.h"
10 #include "ppapi/proxy/enter_proxy.h" 10 #include "ppapi/proxy/enter_proxy.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 if (!TrackedCallback::IsPending(current_connect_callback_)) { 106 if (!TrackedCallback::IsPending(current_connect_callback_)) {
107 // The handle might leak if the plugin never calls GetHandle(). 107 // The handle might leak if the plugin never calls GetHandle().
108 return; 108 return;
109 } 109 }
110 110
111 current_connect_callback_->Run(result); 111 current_connect_callback_->Run(result);
112 } 112 }
113 113
114 PPB_Broker_Proxy::PPB_Broker_Proxy(Dispatcher* dispatcher) 114 PPB_Broker_Proxy::PPB_Broker_Proxy(Dispatcher* dispatcher)
115 : InterfaceProxy(dispatcher), 115 : InterfaceProxy(dispatcher),
116 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)){ 116 callback_factory_(this){
117 } 117 }
118 118
119 PPB_Broker_Proxy::~PPB_Broker_Proxy() { 119 PPB_Broker_Proxy::~PPB_Broker_Proxy() {
120 } 120 }
121 121
122 // static 122 // static
123 PP_Resource PPB_Broker_Proxy::CreateProxyResource(PP_Instance instance) { 123 PP_Resource PPB_Broker_Proxy::CreateProxyResource(PP_Instance instance) {
124 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 124 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
125 if (!dispatcher) 125 if (!dispatcher)
126 return 0; 126 return 0;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // The easiest way to clean it up is to just put it in an object 226 // The easiest way to clean it up is to just put it in an object
227 // and then close it. This failure case is not performance critical. 227 // and then close it. This failure case is not performance critical.
228 // The handle could still leak if Send succeeded but the IPC later failed. 228 // The handle could still leak if Send succeeded but the IPC later failed.
229 base::SyncSocket temp_socket( 229 base::SyncSocket temp_socket(
230 IPC::PlatformFileForTransitToPlatformFile(foreign_socket_handle)); 230 IPC::PlatformFileForTransitToPlatformFile(foreign_socket_handle));
231 } 231 }
232 } 232 }
233 233
234 } // namespace proxy 234 } // namespace proxy
235 } // namespace ppapi 235 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_audio_proxy.cc ('k') | ppapi/proxy/ppb_file_ref_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698