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

Side by Side Diff: webrtc/base/filerotatingstream.h

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 years, 3 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 | « webrtc/base/criticalsection.h ('k') | webrtc/base/fileutils.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 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 size_t max_file_size_; 116 size_t max_file_size_;
117 size_t current_file_index_; 117 size_t current_file_index_;
118 // The rotation index indicates the index of the file that will be 118 // The rotation index indicates the index of the file that will be
119 // deleted first on rotation. Indices lower than this index will be rotated. 119 // deleted first on rotation. Indices lower than this index will be rotated.
120 size_t rotation_index_; 120 size_t rotation_index_;
121 // Number of bytes written to current file. We need this because with 121 // Number of bytes written to current file. We need this because with
122 // buffering the file size read from disk might not be accurate. 122 // buffering the file size read from disk might not be accurate.
123 size_t current_bytes_written_; 123 size_t current_bytes_written_;
124 bool disable_buffering_; 124 bool disable_buffering_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(FileRotatingStream); 126 RTC_DISALLOW_COPY_AND_ASSIGN(FileRotatingStream);
127 }; 127 };
128 128
129 // CallSessionFileRotatingStream is meant to be used in situations where we will 129 // CallSessionFileRotatingStream is meant to be used in situations where we will
130 // have limited disk space. Its purpose is to read and write logs up to a 130 // have limited disk space. Its purpose is to read and write logs up to a
131 // maximum size. Once the maximum size is exceeded, logs from the middle are 131 // maximum size. Once the maximum size is exceeded, logs from the middle are
132 // deleted whereas logs from the beginning and end are preserved. The reason for 132 // deleted whereas logs from the beginning and end are preserved. The reason for
133 // this is because we anticipate that in WebRTC the beginning and end of the 133 // this is because we anticipate that in WebRTC the beginning and end of the
134 // logs are most useful for call diagnostics. 134 // logs are most useful for call diagnostics.
135 // 135 //
136 // This implementation simply writes to a single file until 136 // This implementation simply writes to a single file until
(...skipping 20 matching lines...) Expand all
157 157
158 private: 158 private:
159 static size_t GetRotatingLogSize(size_t max_total_log_size); 159 static size_t GetRotatingLogSize(size_t max_total_log_size);
160 static size_t GetNumRotatingLogFiles(size_t max_total_log_size); 160 static size_t GetNumRotatingLogFiles(size_t max_total_log_size);
161 static const char* kLogPrefix; 161 static const char* kLogPrefix;
162 static const size_t kRotatingLogFileDefaultSize; 162 static const size_t kRotatingLogFileDefaultSize;
163 163
164 const size_t max_total_log_size_; 164 const size_t max_total_log_size_;
165 size_t num_rotations_; 165 size_t num_rotations_;
166 166
167 DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream); 167 RTC_DISALLOW_COPY_AND_ASSIGN(CallSessionFileRotatingStream);
168 }; 168 };
169 169
170 } // namespace rtc 170 } // namespace rtc
171 171
172 #endif // WEBRTC_BASE_FILEROTATINGSTREAM_H_ 172 #endif // WEBRTC_BASE_FILEROTATINGSTREAM_H_
OLDNEW
« no previous file with comments | « webrtc/base/criticalsection.h ('k') | webrtc/base/fileutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698