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

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

Issue 2558693002: Add WriteIsolatedOutput() functions (Closed)
Patch Set: Resolve review comments Created 4 years 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_unittest.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // static 54 // static
55 File File::Create(Pathname&& path) { 55 File File::Create(Pathname&& path) {
56 return Create(NormalizePathname(std::move(path))); 56 return Create(NormalizePathname(std::move(path)));
57 } 57 }
58 58
59 // static 59 // static
60 File File::Create(const Pathname& path) { 60 File File::Create(const Pathname& path) {
61 return Create(Pathname(path)); 61 return Create(Pathname(path));
62 } 62 }
63 63
64 // static
65 bool File::Remove(const std::string& path) {
66 return RemoveFile(path);
67 }
68
69 // static
70 bool File::Remove(Pathname&& path) {
71 return Remove(NormalizePathname(std::move(path)));
72 }
73
74 // static
75 bool File::Remove(const Pathname& path) {
76 return Remove(Pathname(path));
77 }
78
64 File::File(File&& other) : file_(other.file_) { 79 File::File(File&& other) : file_(other.file_) {
65 other.file_ = kInvalidPlatformFileValue; 80 other.file_ = kInvalidPlatformFileValue;
66 } 81 }
67 82
68 File& File::operator=(File&& other) { 83 File& File::operator=(File&& other) {
69 Close(); 84 Close();
70 file_ = other.file_; 85 file_ = other.file_;
71 other.file_ = kInvalidPlatformFileValue; 86 other.file_ = kInvalidPlatformFileValue;
72 return *this; 87 return *this;
73 } 88 }
74 89
75 bool File::IsOpen() { 90 bool File::IsOpen() {
76 return file_ != kInvalidPlatformFileValue; 91 return file_ != kInvalidPlatformFileValue;
77 } 92 }
78 93
79 } // namespace rtc 94 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/file.h ('k') | webrtc/base/file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698