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

Unified Diff: webrtc/rtc_base/win32filesystem.cc

Issue 2995413002: Delete Filesystem::GetTemporaryFolder. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/rtc_base/win32filesystem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/win32filesystem.cc
diff --git a/webrtc/rtc_base/win32filesystem.cc b/webrtc/rtc_base/win32filesystem.cc
index 973280ebe9df0f5818d804798f2f7cd302bfe7f0..45441855e9a1db1c722ee9ccfdca15fae516460f 100644
--- a/webrtc/rtc_base/win32filesystem.cc
+++ b/webrtc/rtc_base/win32filesystem.cc
@@ -72,29 +72,6 @@ bool Win32Filesystem::DeleteFile(const Pathname &filename) {
return ::DeleteFile(ToUtf16(filename.pathname()).c_str()) != 0;
}
-bool Win32Filesystem::GetTemporaryFolder(Pathname &pathname, bool create,
- const std::string *append) {
- wchar_t buffer[MAX_PATH + 1];
- if (!::GetTempPath(arraysize(buffer), buffer))
- return false;
- if (!IsCurrentProcessLowIntegrity() &&
- !::GetLongPathName(buffer, buffer, arraysize(buffer)))
- return false;
- size_t len = strlen(buffer);
- if ((len > 0) && (buffer[len-1] != '\\')) {
- len += strcpyn(buffer + len, arraysize(buffer) - len, L"\\");
- }
- if (len >= arraysize(buffer) - 1)
- return false;
- pathname.clear();
- pathname.SetFolder(ToUtf8(buffer));
- if (append != nullptr) {
- RTC_DCHECK(!append->empty());
- pathname.AppendFolder(*append);
- }
- return !create || CreateFolder(pathname);
-}
-
std::string Win32Filesystem::TempFilename(const Pathname &dir,
const std::string &prefix) {
wchar_t filename[MAX_PATH];
« no previous file with comments | « webrtc/rtc_base/win32filesystem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698