OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 wchar_t w_path[MAX_PATH]; | 384 wchar_t w_path[MAX_PATH]; |
385 if (SHGetFolderPath(0, CSIDL_APPDATA, 0, SHGFP_TYPE_CURRENT, w_path) != | 385 if (SHGetFolderPath(0, CSIDL_APPDATA, 0, SHGFP_TYPE_CURRENT, w_path) != |
386 S_OK) { | 386 S_OK) { |
387 LOG(LS_ERROR) << "SHGetFolderPath failed"; | 387 LOG(LS_ERROR) << "SHGetFolderPath failed"; |
388 return false; | 388 return false; |
389 } | 389 } |
390 path->SetFolder(ToUtf8(w_path, wcslen(w_path))); | 390 path->SetFolder(ToUtf8(w_path, wcslen(w_path))); |
391 path->AppendFolder("Mozilla"); | 391 path->AppendFolder("Mozilla"); |
392 path->AppendFolder("Firefox"); | 392 path->AppendFolder("Firefox"); |
393 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) | 393 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) |
| 394 // TODO(hjon): Update deprecated APIs (see webrtc:5478 for details). |
| 395 #pragma clang diagnostic push |
| 396 #pragma clang diagnostic ignored "-Wdeprecated" |
394 FSRef fr; | 397 FSRef fr; |
395 if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType, | 398 if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType, |
396 kCreateFolder, &fr)) { | 399 kCreateFolder, &fr)) { |
397 LOG(LS_ERROR) << "FSFindFolder failed"; | 400 LOG(LS_ERROR) << "FSFindFolder failed"; |
398 return false; | 401 return false; |
399 } | 402 } |
400 char buffer[NAME_MAX + 1]; | 403 char buffer[NAME_MAX + 1]; |
401 if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer), | 404 if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer), |
402 arraysize(buffer))) { | 405 arraysize(buffer))) { |
403 LOG(LS_ERROR) << "FSRefMakePath failed"; | 406 LOG(LS_ERROR) << "FSRefMakePath failed"; |
404 return false; | 407 return false; |
405 } | 408 } |
406 path->SetFolder(std::string(buffer)); | 409 path->SetFolder(std::string(buffer)); |
407 path->AppendFolder("Firefox"); | 410 path->AppendFolder("Firefox"); |
| 411 #pragma clang diagnostic pop |
408 #else | 412 #else |
409 char* user_home = getenv("HOME"); | 413 char* user_home = getenv("HOME"); |
410 if (user_home == NULL) { | 414 if (user_home == NULL) { |
411 return false; | 415 return false; |
412 } | 416 } |
413 path->SetFolder(std::string(user_home)); | 417 path->SetFolder(std::string(user_home)); |
414 path->AppendFolder(".mozilla"); | 418 path->AppendFolder(".mozilla"); |
415 path->AppendFolder("firefox"); | 419 path->AppendFolder("firefox"); |
416 #endif // WEBRTC_WIN | 420 #endif // WEBRTC_WIN |
417 return true; | 421 return true; |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 if (!result) { | 1299 if (!result) { |
1296 // Either auto detection is not supported or we simply didn't | 1300 // Either auto detection is not supported or we simply didn't |
1297 // find any proxy, reset type. | 1301 // find any proxy, reset type. |
1298 proxy->type = rtc::PROXY_NONE; | 1302 proxy->type = rtc::PROXY_NONE; |
1299 } | 1303 } |
1300 } | 1304 } |
1301 return result; | 1305 return result; |
1302 } | 1306 } |
1303 | 1307 |
1304 } // namespace rtc | 1308 } // namespace rtc |
OLD | NEW |