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

Side by Side Diff: base/test/launcher/test_launcher.cc

Issue 611153004: replace OVERRIDE and FINAL with override and final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CC_ -> BASE_ Created 6 years, 2 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/test/gtest_xml_util.h ('k') | base/test/launcher/unit_test_launcher.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/test/launcher/test_launcher.h" 5 #include "base/test/launcher/test_launcher.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #endif 9 #endif
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 fflush(stdout); 135 fflush(stdout);
136 } 136 }
137 137
138 // I/O watcher for the reading end of the self-pipe above. 138 // I/O watcher for the reading end of the self-pipe above.
139 // Terminates any launched child processes and exits the process. 139 // Terminates any launched child processes and exits the process.
140 class SignalFDWatcher : public MessageLoopForIO::Watcher { 140 class SignalFDWatcher : public MessageLoopForIO::Watcher {
141 public: 141 public:
142 SignalFDWatcher() { 142 SignalFDWatcher() {
143 } 143 }
144 144
145 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE { 145 virtual void OnFileCanReadWithoutBlocking(int fd) override {
146 fprintf(stdout, "\nCaught signal. Killing spawned test processes...\n"); 146 fprintf(stdout, "\nCaught signal. Killing spawned test processes...\n");
147 fflush(stdout); 147 fflush(stdout);
148 148
149 KillSpawnedTestProcesses(); 149 KillSpawnedTestProcesses();
150 150
151 // The signal would normally kill the process, so exit now. 151 // The signal would normally kill the process, so exit now.
152 exit(1); 152 exit(1);
153 } 153 }
154 154
155 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE { 155 virtual void OnFileCanWriteWithoutBlocking(int fd) override {
156 NOTREACHED(); 156 NOTREACHED();
157 } 157 }
158 158
159 private: 159 private:
160 DISALLOW_COPY_AND_ASSIGN(SignalFDWatcher); 160 DISALLOW_COPY_AND_ASSIGN(SignalFDWatcher);
161 }; 161 };
162 #endif // defined(OS_POSIX) 162 #endif // defined(OS_POSIX)
163 163
164 // Parses the environment variable var as an Int32. If it is unset, returns 164 // Parses the environment variable var as an Int32. If it is unset, returns
165 // true. If it is set, unsets it then converts it to Int32 before 165 // true. If it is set, unsets it then converts it to Int32 before
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 } 1090 }
1091 1091
1092 std::string snippet(full_output.substr(run_pos)); 1092 std::string snippet(full_output.substr(run_pos));
1093 if (end_pos != std::string::npos) 1093 if (end_pos != std::string::npos)
1094 snippet = full_output.substr(run_pos, end_pos - run_pos); 1094 snippet = full_output.substr(run_pos, end_pos - run_pos);
1095 1095
1096 return snippet; 1096 return snippet;
1097 } 1097 }
1098 1098
1099 } // namespace base 1099 } // namespace base
OLDNEW
« no previous file with comments | « base/test/gtest_xml_util.h ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698