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

Unified Diff: webrtc/base/file.h

Issue 2533213005: Add File::Open / Create functions to take an rtc::Pathname (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/BUILD.gn ('k') | webrtc/base/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/file.h
diff --git a/webrtc/base/file.h b/webrtc/base/file.h
index 10fb69834b1e30f33f9707bd1a7b48e3378e224e..5e8449ccdf9fc84ecf130ebe11769b74f2987b3b 100644
--- a/webrtc/base/file.h
+++ b/webrtc/base/file.h
@@ -15,8 +15,9 @@
#include <string>
-#include "webrtc/base/platform_file.h"
#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/pathutils.h"
+#include "webrtc/base/platform_file.h"
namespace rtc {
@@ -39,8 +40,12 @@ class File {
// Open and Create give files with both reading and writing enabled.
static File Open(const std::string& path);
+ static File Open(Pathname&& path);
+ static File Open(const Pathname& path);
// If the file already exists it will be overwritten.
static File Create(const std::string& path);
+ static File Create(Pathname&& path);
+ static File Create(const Pathname& path);
size_t Write(const uint8_t* data, size_t length);
size_t Read(uint8_t* buffer, size_t length);
« no previous file with comments | « webrtc/base/BUILD.gn ('k') | webrtc/base/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698