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

Side by Side Diff: base/debug/stack_trace_posix.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/bind_unittest.cc ('k') | base/debug/trace_event.h » ('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 "base/debug/stack_trace.h" 5 #include "base/debug/stack_trace.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <signal.h> 9 #include <signal.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 write(STDERR_FILENO, buf, std::min(len, sizeof(buf) - 1)); 395 write(STDERR_FILENO, buf, std::min(len, sizeof(buf) - 1));
396 #endif // ARCH_CPU_32_BITS 396 #endif // ARCH_CPU_32_BITS
397 #endif // defined(OS_MACOSX) 397 #endif // defined(OS_MACOSX)
398 _exit(1); 398 _exit(1);
399 } 399 }
400 400
401 class PrintBacktraceOutputHandler : public BacktraceOutputHandler { 401 class PrintBacktraceOutputHandler : public BacktraceOutputHandler {
402 public: 402 public:
403 PrintBacktraceOutputHandler() {} 403 PrintBacktraceOutputHandler() {}
404 404
405 virtual void HandleOutput(const char* output) OVERRIDE { 405 virtual void HandleOutput(const char* output) override {
406 // NOTE: This code MUST be async-signal safe (it's used by in-process 406 // NOTE: This code MUST be async-signal safe (it's used by in-process
407 // stack dumping signal handler). NO malloc or stdio is allowed here. 407 // stack dumping signal handler). NO malloc or stdio is allowed here.
408 PrintToStderr(output); 408 PrintToStderr(output);
409 } 409 }
410 410
411 private: 411 private:
412 DISALLOW_COPY_AND_ASSIGN(PrintBacktraceOutputHandler); 412 DISALLOW_COPY_AND_ASSIGN(PrintBacktraceOutputHandler);
413 }; 413 };
414 414
415 class StreamBacktraceOutputHandler : public BacktraceOutputHandler { 415 class StreamBacktraceOutputHandler : public BacktraceOutputHandler {
416 public: 416 public:
417 explicit StreamBacktraceOutputHandler(std::ostream* os) : os_(os) { 417 explicit StreamBacktraceOutputHandler(std::ostream* os) : os_(os) {
418 } 418 }
419 419
420 virtual void HandleOutput(const char* output) OVERRIDE { 420 virtual void HandleOutput(const char* output) override {
421 (*os_) << output; 421 (*os_) << output;
422 } 422 }
423 423
424 private: 424 private:
425 std::ostream* os_; 425 std::ostream* os_;
426 426
427 DISALLOW_COPY_AND_ASSIGN(StreamBacktraceOutputHandler); 427 DISALLOW_COPY_AND_ASSIGN(StreamBacktraceOutputHandler);
428 }; 428 };
429 429
430 void WarmUpBacktrace() { 430 void WarmUpBacktrace() {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 *ptr = *start; 826 *ptr = *start;
827 *start++ = ch; 827 *start++ = ch;
828 } 828 }
829 return buf; 829 return buf;
830 } 830 }
831 831
832 } // namespace internal 832 } // namespace internal
833 833
834 } // namespace debug 834 } // namespace debug
835 } // namespace base 835 } // namespace base
OLDNEW
« no previous file with comments | « base/bind_unittest.cc ('k') | base/debug/trace_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698