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

Side by Side Diff: base/win/scoped_handle_test_dll.cc

Issue 2173523002: base: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « base/trace_event/java_heap_dump_provider_android_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <windows.h> 5 #include <windows.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/win/base_features.h" 9 #include "base/win/base_features.h"
10 #include "base/win/current_module.h" 10 #include "base/win/current_module.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 reinterpret_cast<void*>(&thread_params), 0, nullptr); 59 reinterpret_cast<void*>(&thread_params), 0, nullptr);
60 if (!thread_handle) 60 if (!thread_handle)
61 break; 61 break;
62 ::WaitForSingleObject(ready_event, INFINITE); 62 ::WaitForSingleObject(ready_event, INFINITE);
63 threads_.push_back(thread_handle); 63 threads_.push_back(thread_handle);
64 } 64 }
65 65
66 ::CloseHandle(ready_event); 66 ::CloseHandle(ready_event);
67 67
68 if (threads_.size() != kNumThreads) { 68 if (threads_.size() != kNumThreads) {
69 for (const auto& thread : threads_) 69 for (auto* thread : threads_)
70 ::CloseHandle(thread); 70 ::CloseHandle(thread);
71 ::CloseHandle(start_event); 71 ::CloseHandle(start_event);
72 return false; 72 return false;
73 } 73 }
74 74
75 ::SetEvent(start_event); 75 ::SetEvent(start_event);
76 ::CloseHandle(start_event); 76 ::CloseHandle(start_event);
77 for (const auto& thread : threads_) { 77 for (auto* thread : threads_) {
78 ::WaitForSingleObject(thread, INFINITE); 78 ::WaitForSingleObject(thread, INFINITE);
79 ::CloseHandle(thread); 79 ::CloseHandle(thread);
80 } 80 }
81 81
82 return true; 82 return true;
83 } 83 }
84 84
85 bool InternalRunLocationTest() { 85 bool InternalRunLocationTest() {
86 // Create a new handle and then set LastError again. 86 // Create a new handle and then set LastError again.
87 HANDLE handle = ::CreateMutex(nullptr, false, nullptr); 87 HANDLE handle = ::CreateMutex(nullptr, false, nullptr);
(...skipping 28 matching lines...) Expand all
116 116
117 } // namespace 117 } // namespace
118 118
119 bool RunTest() { 119 bool RunTest() {
120 return InternalRunThreadTest() && InternalRunLocationTest(); 120 return InternalRunThreadTest() && InternalRunLocationTest();
121 } 121 }
122 122
123 } // testing 123 } // testing
124 } // win 124 } // win
125 } // base 125 } // base
OLDNEW
« no previous file with comments | « base/trace_event/java_heap_dump_provider_android_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698