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

Side by Side Diff: device/hid/hid_connection_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: Fix compile + remove some tracking 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
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | net/base/network_change_notifier_win.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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "device/hid/hid_connection_win.h" 5 #include "device/hid/hid_connection_win.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 watcher_.StartWatching(event_.Get(), this); 84 watcher_.StartWatching(event_.Get(), this);
85 } else { 85 } else {
86 VPLOG(1) << "HID transfer failed"; 86 VPLOG(1) << "HID transfer failed";
87 callback_.Run(this, false); 87 callback_.Run(this, false);
88 } 88 }
89 } 89 }
90 90
91 void PendingHidTransfer::OnObjectSignaled(HANDLE event_handle) { 91 void PendingHidTransfer::OnObjectSignaled(HANDLE event_handle) {
92 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 92 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
93 tracked_objects::ScopedTracker tracking_profile( 93 tracked_objects::ScopedTracker tracking_profile(
94 FROM_HERE_WITH_EXPLICIT_FUNCTION("PendingHidTransfer_OnObjectSignaled")); 94 FROM_HERE_WITH_EXPLICIT_FUNCTION(
95 "418183 PendingHidTransfer::OnObjectSignaled"));
95 96
96 callback_.Run(this, true); 97 callback_.Run(this, true);
97 Release(); 98 Release();
98 } 99 }
99 100
100 void PendingHidTransfer::WillDestroyCurrentMessageLoop() { 101 void PendingHidTransfer::WillDestroyCurrentMessageLoop() {
101 watcher_.StopWatching(); 102 watcher_.StopWatching();
102 callback_.Run(this, false); 103 callback_.Run(this, false);
103 } 104 }
104 105
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 if (GetOverlappedResult( 242 if (GetOverlappedResult(
242 file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) { 243 file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) {
243 callback.Run(true); 244 callback.Run(true);
244 } else { 245 } else {
245 VPLOG(1) << "HID write failed"; 246 VPLOG(1) << "HID write failed";
246 callback.Run(false); 247 callback.Run(false);
247 } 248 }
248 } 249 }
249 250
250 } // namespace device 251 } // namespace device
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | net/base/network_change_notifier_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698