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) { |