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

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

Issue 1405023016: Convert usage of ARRAY_SIZE to arraysize. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: static_cast<int> Created 5 years, 1 month 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
« no previous file with comments | « webrtc/base/physicalsocketserver.cc ('k') | webrtc/base/socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 #include "macconversion.h" 27 #include "macconversion.h"
28 #endif 28 #endif
29 29
30 #ifdef WEBRTC_IOS 30 #ifdef WEBRTC_IOS
31 #include <CFNetwork/CFNetwork.h> 31 #include <CFNetwork/CFNetwork.h>
32 #include "macconversion.h" 32 #include "macconversion.h"
33 #endif 33 #endif
34 34
35 #include <map> 35 #include <map>
36 36
37 #include "webrtc/base/arraysize.h"
37 #include "webrtc/base/fileutils.h" 38 #include "webrtc/base/fileutils.h"
38 #include "webrtc/base/httpcommon.h" 39 #include "webrtc/base/httpcommon.h"
39 #include "webrtc/base/httpcommon-inl.h" 40 #include "webrtc/base/httpcommon-inl.h"
40 #include "webrtc/base/pathutils.h" 41 #include "webrtc/base/pathutils.h"
41 #include "webrtc/base/stringutils.h" 42 #include "webrtc/base/stringutils.h"
42 43
43 #if defined(WEBRTC_WIN) 44 #if defined(WEBRTC_WIN)
44 #define _TRY_WINHTTP 1 45 #define _TRY_WINHTTP 1
45 #define _TRY_JSPROXY 0 46 #define _TRY_JSPROXY 0
46 #define _TRY_WM_FINDPROXY 0 47 #define _TRY_WM_FINDPROXY 0
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 path->AppendFolder("Firefox"); 392 path->AppendFolder("Firefox");
392 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 393 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
393 FSRef fr; 394 FSRef fr;
394 if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType, 395 if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
395 kCreateFolder, &fr)) { 396 kCreateFolder, &fr)) {
396 LOG(LS_ERROR) << "FSFindFolder failed"; 397 LOG(LS_ERROR) << "FSFindFolder failed";
397 return false; 398 return false;
398 } 399 }
399 char buffer[NAME_MAX + 1]; 400 char buffer[NAME_MAX + 1];
400 if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer), 401 if (0 != FSRefMakePath(&fr, reinterpret_cast<uint8_t*>(buffer),
401 ARRAY_SIZE(buffer))) { 402 arraysize(buffer))) {
402 LOG(LS_ERROR) << "FSRefMakePath failed"; 403 LOG(LS_ERROR) << "FSRefMakePath failed";
403 return false; 404 return false;
404 } 405 }
405 path->SetFolder(std::string(buffer)); 406 path->SetFolder(std::string(buffer));
406 path->AppendFolder("Firefox"); 407 path->AppendFolder("Firefox");
407 #else 408 #else
408 char* user_home = getenv("HOME"); 409 char* user_home = getenv("HOME");
409 if (user_home == NULL) { 410 if (user_home == NULL) {
410 return false; 411 return false;
411 } 412 }
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 if (!result) { 1295 if (!result) {
1295 // Either auto detection is not supported or we simply didn't 1296 // Either auto detection is not supported or we simply didn't
1296 // find any proxy, reset type. 1297 // find any proxy, reset type.
1297 proxy->type = rtc::PROXY_NONE; 1298 proxy->type = rtc::PROXY_NONE;
1298 } 1299 }
1299 } 1300 }
1300 return result; 1301 return result;
1301 } 1302 }
1302 1303
1303 } // namespace rtc 1304 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/physicalsocketserver.cc ('k') | webrtc/base/socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698