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

Side by Side Diff: webrtc/system_wrappers/source/trace_impl.h

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 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/system_wrappers/source/file_impl.cc ('k') | webrtc/system_wrappers/source/trace_impl.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 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 23 matching lines...) Expand all
34 // 25.6 Mbyte 34 // 25.6 Mbyte
35 35
36 class TraceImpl : public Trace { 36 class TraceImpl : public Trace {
37 public: 37 public:
38 virtual ~TraceImpl(); 38 virtual ~TraceImpl();
39 39
40 static TraceImpl* CreateInstance(); 40 static TraceImpl* CreateInstance();
41 static TraceImpl* GetTrace(const TraceLevel level = kTraceAll); 41 static TraceImpl* GetTrace(const TraceLevel level = kTraceAll);
42 42
43 int32_t SetTraceFileImpl(const char* file_name, const bool add_file_counter); 43 int32_t SetTraceFileImpl(const char* file_name, const bool add_file_counter);
44 int32_t TraceFileImpl(char file_name[FileWrapper::kMaxFileNameSize]);
45
46 int32_t SetTraceCallbackImpl(TraceCallback* callback); 44 int32_t SetTraceCallbackImpl(TraceCallback* callback);
47 45
48 void AddImpl(const TraceLevel level, const TraceModule module, 46 void AddImpl(const TraceLevel level, const TraceModule module,
49 const int32_t id, const char* msg); 47 const int32_t id, const char* msg);
50 48
51 bool TraceCheck(const TraceLevel level) const; 49 bool TraceCheck(const TraceLevel level) const;
52 50
53 protected: 51 protected:
54 TraceImpl(); 52 TraceImpl();
55 53
(...skipping 19 matching lines...) Expand all
75 int32_t AddMessage(char* trace_message, 73 int32_t AddMessage(char* trace_message,
76 const char msg[WEBRTC_TRACE_MAX_MESSAGE_SIZE], 74 const char msg[WEBRTC_TRACE_MAX_MESSAGE_SIZE],
77 const uint16_t written_so_far) const; 75 const uint16_t written_so_far) const;
78 76
79 void AddMessageToList( 77 void AddMessageToList(
80 const char trace_message[WEBRTC_TRACE_MAX_MESSAGE_SIZE], 78 const char trace_message[WEBRTC_TRACE_MAX_MESSAGE_SIZE],
81 const uint16_t length, 79 const uint16_t length,
82 const TraceLevel level); 80 const TraceLevel level);
83 81
84 bool UpdateFileName( 82 bool UpdateFileName(
85 const char file_name_utf8[FileWrapper::kMaxFileNameSize], 83 char file_name_with_counter_utf8[FileWrapper::kMaxFileNameSize],
86 char file_name_with_counter_utf8[FileWrapper::kMaxFileNameSize], 84 const uint32_t new_count) const EXCLUSIVE_LOCKS_REQUIRED(crit_);
87 const uint32_t new_count) const;
88 85
89 bool CreateFileName( 86 bool CreateFileName(
90 const char file_name_utf8[FileWrapper::kMaxFileNameSize], 87 const char file_name_utf8[FileWrapper::kMaxFileNameSize],
91 char file_name_with_counter_utf8[FileWrapper::kMaxFileNameSize], 88 char file_name_with_counter_utf8[FileWrapper::kMaxFileNameSize],
92 const uint32_t new_count) const; 89 const uint32_t new_count) const;
93 90
94 void WriteToFile(const char* msg, uint16_t length) 91 void WriteToFile(const char* msg, uint16_t length)
95 EXCLUSIVE_LOCKS_REQUIRED(crit_); 92 EXCLUSIVE_LOCKS_REQUIRED(crit_);
96 93
97 TraceCallback* callback_ GUARDED_BY(crit_); 94 TraceCallback* callback_ GUARDED_BY(crit_);
98 uint32_t row_count_text_ GUARDED_BY(crit_); 95 uint32_t row_count_text_ GUARDED_BY(crit_);
99 uint32_t file_count_text_ GUARDED_BY(crit_); 96 uint32_t file_count_text_ GUARDED_BY(crit_);
100 97
101 const std::unique_ptr<FileWrapper> trace_file_ GUARDED_BY(crit_); 98 const std::unique_ptr<FileWrapper> trace_file_ GUARDED_BY(crit_);
99 std::string trace_file_path_ GUARDED_BY(crit_);
102 rtc::CriticalSection crit_; 100 rtc::CriticalSection crit_;
103 }; 101 };
104 102
105 } // namespace webrtc 103 } // namespace webrtc
106 104
107 #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_IMPL_H_ 105 #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_TRACE_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/file_impl.cc ('k') | webrtc/system_wrappers/source/trace_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698