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

Side by Side Diff: webrtc/base/file.cc

Issue 2214763002: Initial version of new file wrapper (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 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/file.h ('k') | webrtc/base/file_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/base/file.h"
12
13 namespace rtc {
14
15 File::File(PlatformFile file) : file_(file) {}
16
17 File::~File() {
18 Close();
19 }
20
21 File::File(File&& other) : file_(other.file_) {
22 other.file_ = kInvalidPlatformFileValue;
23 }
24
25 File& File::operator=(File&& other) {
26 Close();
27 file_ = other.file_;
28 other.file_ = kInvalidPlatformFileValue;
29 return *this;
30 }
31
32 bool File::IsOpen() {
33 return file_ != kInvalidPlatformFileValue;
34 }
35
36 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/file.h ('k') | webrtc/base/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698