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

Side by Side Diff: webrtc/base/proxydetect.cc

Issue 1644843003: Compile rtc_base_objc and rtc_api_objc for Mac (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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
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 #pragma clang diagnostic push
395 #pragma clang diagnostic ignored "-Wdeprecated"
394 FSRef fr; 396 FSRef fr;
395 if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType, 397 if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
396 kCreateFolder, &fr)) { 398 kCreateFolder, &fr)) {
397 LOG(LS_ERROR) << "FSFindFolder failed"; 399 LOG(LS_ERROR) << "FSFindFolder failed";
398 return false; 400 return false;
399 } 401 }
400 char buffer[NAME_MAX + 1]; 402 char buffer[NAME_MAX + 1];
401 if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer), 403 if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer),
402 arraysize(buffer))) { 404 arraysize(buffer))) {
403 LOG(LS_ERROR) << "FSRefMakePath failed"; 405 LOG(LS_ERROR) << "FSRefMakePath failed";
404 return false; 406 return false;
405 } 407 }
406 path->SetFolder(std::string(buffer)); 408 path->SetFolder(std::string(buffer));
407 path->AppendFolder("Firefox"); 409 path->AppendFolder("Firefox");
410 #pragma clang diagnostic pop
408 #else 411 #else
409 char* user_home = getenv("HOME"); 412 char* user_home = getenv("HOME");
410 if (user_home == NULL) { 413 if (user_home == NULL) {
411 return false; 414 return false;
412 } 415 }
413 path->SetFolder(std::string(user_home)); 416 path->SetFolder(std::string(user_home));
414 path->AppendFolder(".mozilla"); 417 path->AppendFolder(".mozilla");
415 path->AppendFolder("firefox"); 418 path->AppendFolder("firefox");
416 #endif // WEBRTC_WIN 419 #endif // WEBRTC_WIN
417 return true; 420 return true;
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 if (!result) { 1298 if (!result) {
1296 // Either auto detection is not supported or we simply didn't 1299 // Either auto detection is not supported or we simply didn't
1297 // find any proxy, reset type. 1300 // find any proxy, reset type.
1298 proxy->type = rtc::PROXY_NONE; 1301 proxy->type = rtc::PROXY_NONE;
1299 } 1302 }
1300 } 1303 }
1301 return result; 1304 return result;
1302 } 1305 }
1303 1306
1304 } // namespace rtc 1307 } // namespace rtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698