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

Unified Diff: webrtc/base/proxydetect.cc

Issue 2395593002: Remove deprecated FSRef-manipulation methods. (Closed)
Patch Set: comments from magjed Created 4 years, 2 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 | « no previous file | webrtc/base/unixfilesystem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/proxydetect.cc
diff --git a/webrtc/base/proxydetect.cc b/webrtc/base/proxydetect.cc
index 111cf4b020df642ed9386c592c7d7beb4799e312..7f298de790abaabe5ee8c6b3578309acc8a72215 100644
--- a/webrtc/base/proxydetect.cc
+++ b/webrtc/base/proxydetect.cc
@@ -21,6 +21,7 @@
#include <CoreServices/CoreServices.h>
#include <Security/Security.h>
#include "macconversion.h"
+#include "webrtc/base/unixfilesystem.h"
#endif
#ifdef WEBRTC_IOS
@@ -392,20 +393,10 @@ bool GetFirefoxProfilePath(Pathname* path) {
path->AppendFolder("Mozilla");
path->AppendFolder("Firefox");
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
- FSRef fr;
- if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
- kCreateFolder, &fr)) {
- LOG(LS_ERROR) << "FSFindFolder failed";
- return false;
- }
- char buffer[NAME_MAX + 1];
- if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer),
- arraysize(buffer))) {
- LOG(LS_ERROR) << "FSRefMakePath failed";
- return false;
- }
- path->SetFolder(std::string(buffer));
- path->AppendFolder("Firefox");
+ rtc::UnixFilesystem filesystem;
+ filesystem.SetApplicationName("Firefox");
+ bool result = filesystem.GetAppDataFolder(path, true);
+ return result;
#else
char* user_home = getenv("HOME");
if (user_home == NULL) {
« no previous file with comments | « no previous file | webrtc/base/unixfilesystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698