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

Side by Side Diff: net/udp/udp_socket_win.cc

Issue 901773002: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 "net/udp/udp_socket_win.h" 5 #include "net/udp/udp_socket_win.h"
6 6
7 #include <mstcpip.h> 7 #include <mstcpip.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // We grab an extra reference because there is an IO operation in progress. 142 // We grab an extra reference because there is an IO operation in progress.
143 // Balanced in WriteDelegate::OnObjectSignaled(). 143 // Balanced in WriteDelegate::OnObjectSignaled().
144 AddRef(); 144 AddRef();
145 write_watcher_.StartWatching(write_overlapped_.hEvent, &writer_); 145 write_watcher_.StartWatching(write_overlapped_.hEvent, &writer_);
146 } 146 }
147 147
148 void UDPSocketWin::Core::ReadDelegate::OnObjectSignaled(HANDLE object) { 148 void UDPSocketWin::Core::ReadDelegate::OnObjectSignaled(HANDLE object) {
149 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 149 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
150 tracked_objects::ScopedTracker tracking_profile( 150 tracked_objects::ScopedTracker tracking_profile(
151 FROM_HERE_WITH_EXPLICIT_FUNCTION( 151 FROM_HERE_WITH_EXPLICIT_FUNCTION(
152 "UDPSocketWin_Core_ReadDelegate_OnObjectSignaled")); 152 "418183 UDPSocketWin::Core::ReadDelegate::OnObjectSignaled"));
153 153
154 DCHECK_EQ(object, core_->read_overlapped_.hEvent); 154 DCHECK_EQ(object, core_->read_overlapped_.hEvent);
155 if (core_->socket_) 155 if (core_->socket_)
156 core_->socket_->DidCompleteRead(); 156 core_->socket_->DidCompleteRead();
157 157
158 core_->Release(); 158 core_->Release();
159 } 159 }
160 160
161 void UDPSocketWin::Core::WriteDelegate::OnObjectSignaled(HANDLE object) { 161 void UDPSocketWin::Core::WriteDelegate::OnObjectSignaled(HANDLE object) {
162 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 162 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
163 tracked_objects::ScopedTracker tracking_profile( 163 tracked_objects::ScopedTracker tracking_profile(
164 FROM_HERE_WITH_EXPLICIT_FUNCTION( 164 FROM_HERE_WITH_EXPLICIT_FUNCTION(
165 "UDPSocketWin_Core_WriteDelegate_OnObjectSignaled")); 165 "418183 UDPSocketWin::Core::WriteDelegate::OnObjectSignaled"));
166 166
167 DCHECK_EQ(object, core_->write_overlapped_.hEvent); 167 DCHECK_EQ(object, core_->write_overlapped_.hEvent);
168 if (core_->socket_) 168 if (core_->socket_)
169 core_->socket_->DidCompleteWrite(); 169 core_->socket_->DidCompleteWrite();
170 170
171 core_->Release(); 171 core_->Release();
172 } 172 }
173 //----------------------------------------------------------------------------- 173 //-----------------------------------------------------------------------------
174 174
175 QwaveAPI::QwaveAPI() : qwave_supported_(false) { 175 QwaveAPI::QwaveAPI() : qwave_supported_(false) {
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 NULL); 1010 NULL);
1011 1011
1012 return OK; 1012 return OK;
1013 } 1013 }
1014 1014
1015 void UDPSocketWin::DetachFromThread() { 1015 void UDPSocketWin::DetachFromThread() {
1016 base::NonThreadSafe::DetachFromThread(); 1016 base::NonThreadSafe::DetachFromThread();
1017 } 1017 }
1018 1018
1019 } // namespace net 1019 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698