commit | 646e096e030a047e98ca0f593f654e1efa8f6e10 | [log] [tgz] |
---|---|---|
author | Niels Möller <nisse@webrtc.org> | Mon Jun 10 11:55:59 2019 +0200 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jun 10 14:09:19 2019 +0000 |
tree | 2848e0d65ecd13ee13ed6aaac9bf39e5f53fcd1d | |
parent | 8169db6df2689d4f13c63462ce906b4ea317ca44 [diff] [blame] |
Allow null FILE* to AecDumpFactory::Create Also add Create method with a FileWrapper argument, extracted from cl https://webrtc-review.googlesource.com/c/src/+/140283 Bug: webrtc:6463 Change-Id: If86f17d5fda964df0b5874bd5a15fcaed899dd4e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140946 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Alex Loiko <aleloi@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28211}
diff --git a/rtc_base/system/file_wrapper.h b/rtc_base/system/file_wrapper.h index 4f5d511..9062abd 100644 --- a/rtc_base/system/file_wrapper.h +++ b/rtc_base/system/file_wrapper.h
@@ -44,7 +44,8 @@ FileWrapper() = default; - // Takes over ownership of |file|, closing it on destruction. + // Takes over ownership of |file|, closing it on destruction. Calling with + // null |file| is allowed, and results in a FileWrapper with is_open() false. explicit FileWrapper(FILE* file) : file_(file) {} ~FileWrapper() { Close(); }