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

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

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_FILE_IMPL_H_ 11 #ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_FILE_IMPL_H_
12 #define WEBRTC_SYSTEM_WRAPPERS_SOURCE_FILE_IMPL_H_ 12 #define WEBRTC_SYSTEM_WRAPPERS_SOURCE_FILE_IMPL_H_
13 13
14 #include <stdio.h> 14 #include <stdio.h>
15 15
16 #include <memory>
17
16 #include "webrtc/base/scoped_ptr.h" 18 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/system_wrappers/include/file_wrapper.h" 19 #include "webrtc/system_wrappers/include/file_wrapper.h"
18 20
19 namespace webrtc { 21 namespace webrtc {
20 22
21 class RWLockWrapper; 23 class RWLockWrapper;
22 24
23 class FileWrapperImpl : public FileWrapper { 25 class FileWrapperImpl : public FileWrapper {
24 public: 26 public:
25 FileWrapperImpl(); 27 FileWrapperImpl();
(...skipping 19 matching lines...) Expand all
45 47
46 int Read(void* buf, size_t length) override; 48 int Read(void* buf, size_t length) override;
47 bool Write(const void* buf, size_t length) override; 49 bool Write(const void* buf, size_t length) override;
48 int WriteText(const char* format, ...) override; 50 int WriteText(const char* format, ...) override;
49 int Rewind() override; 51 int Rewind() override;
50 52
51 private: 53 private:
52 int CloseFileImpl(); 54 int CloseFileImpl();
53 int FlushImpl(); 55 int FlushImpl();
54 56
55 rtc::scoped_ptr<RWLockWrapper> rw_lock_; 57 std::unique_ptr<RWLockWrapper> rw_lock_;
56 58
57 FILE* id_; 59 FILE* id_;
58 bool managed_file_handle_; 60 bool managed_file_handle_;
59 bool open_; 61 bool open_;
60 bool looping_; 62 bool looping_;
61 bool read_only_; 63 bool read_only_;
62 size_t max_size_in_bytes_; // -1 indicates file size limitation is off 64 size_t max_size_in_bytes_; // -1 indicates file size limitation is off
63 size_t size_in_bytes_; 65 size_t size_in_bytes_;
64 char file_name_utf8_[kMaxFileNameSize]; 66 char file_name_utf8_[kMaxFileNameSize];
65 }; 67 };
66 68
67 } // namespace webrtc 69 } // namespace webrtc
68 70
69 #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_FILE_IMPL_H_ 71 #endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_FILE_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/condition_variable_unittest.cc ('k') | webrtc/system_wrappers/source/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698