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

Side by Side Diff: runtime/vm/log.h

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 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 | « runtime/vm/lockers.cc ('k') | runtime/vm/log.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_LOG_H_ 5 #ifndef RUNTIME_VM_LOG_H_
6 #define RUNTIME_VM_LOG_H_ 6 #define RUNTIME_VM_LOG_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 static Log noop_log_; 60 static Log noop_log_;
61 LogPrinter printer_; 61 LogPrinter printer_;
62 intptr_t manual_flush_; 62 intptr_t manual_flush_;
63 MallocGrowableArray<char> buffer_; 63 MallocGrowableArray<char> buffer_;
64 64
65 friend class LogBlock; 65 friend class LogBlock;
66 friend class LogTestHelper; 66 friend class LogTestHelper;
67 DISALLOW_COPY_AND_ASSIGN(Log); 67 DISALLOW_COPY_AND_ASSIGN(Log);
68 }; 68 };
69 69
70
71 // Causes all log messages to be buffered until destructor is called. 70 // Causes all log messages to be buffered until destructor is called.
72 // Can be nested. 71 // Can be nested.
73 class LogBlock : public StackResource { 72 class LogBlock : public StackResource {
74 public: 73 public:
75 LogBlock(Thread* thread, Log* log) 74 LogBlock(Thread* thread, Log* log)
76 : StackResource(thread), log_(log), cursor_(log->cursor()) { 75 : StackResource(thread), log_(log), cursor_(log->cursor()) {
77 Initialize(); 76 Initialize();
78 } 77 }
79 78
80 LogBlock() 79 LogBlock()
81 : StackResource(Thread::Current()), 80 : StackResource(Thread::Current()),
82 log_(Log::Current()), 81 log_(Log::Current()),
83 cursor_(Log::Current()->cursor()) { 82 cursor_(Log::Current()->cursor()) {
84 Initialize(); 83 Initialize();
85 } 84 }
86 85
87 ~LogBlock(); 86 ~LogBlock();
88 87
89 private: 88 private:
90 void Initialize(); 89 void Initialize();
91 90
92 Log* const log_; 91 Log* const log_;
93 const intptr_t cursor_; 92 const intptr_t cursor_;
94 }; 93 };
95 94
96 } // namespace dart 95 } // namespace dart
97 96
98 #endif // RUNTIME_VM_LOG_H_ 97 #endif // RUNTIME_VM_LOG_H_
OLDNEW
« no previous file with comments | « runtime/vm/lockers.cc ('k') | runtime/vm/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698