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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 { 403 {
404 if (m_host == "localhost") 404 if (m_host == "localhost")
405 return true; 405 return true;
406 406
407 if (m_host == "[::1]") 407 if (m_host == "[::1]")
408 return true; 408 return true;
409 409
410 // Test if m_host matches 127.0.0.1/8 410 // Test if m_host matches 127.0.0.1/8
411 ASSERT(m_host.containsOnlyASCII()); 411 ASSERT(m_host.containsOnlyASCII());
412 CString hostAscii = m_host.ascii(); 412 CString hostAscii = m_host.ascii();
413 Vector<uint8, 4> ipNumber; 413 Vector<uint8_t, 4> ipNumber;
414 ipNumber.resize(4); 414 ipNumber.resize(4);
415 415
416 int numComponents; 416 int numComponents;
417 url::Component hostComponent(0, hostAscii.length()); 417 url::Component hostComponent(0, hostAscii.length());
418 url::CanonHostInfo::Family family = url::IPv4AddressToNumber( 418 url::CanonHostInfo::Family family = url::IPv4AddressToNumber(
419 hostAscii.data(), hostComponent, &(ipNumber)[0], &numComponents); 419 hostAscii.data(), hostComponent, &(ipNumber)[0], &numComponents);
420 if (family != url::CanonHostInfo::IPV4) 420 if (family != url::CanonHostInfo::IPV4)
421 return false; 421 return false;
422 return ipNumber[0] == 127; 422 return ipNumber[0] == 127;
423 } 423 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 } 548 }
549 549
550 void SecurityOrigin::transferPrivilegesFrom(PassOwnPtr<PrivilegeData> privilegeD ata) 550 void SecurityOrigin::transferPrivilegesFrom(PassOwnPtr<PrivilegeData> privilegeD ata)
551 { 551 {
552 m_universalAccess = privilegeData->m_universalAccess; 552 m_universalAccess = privilegeData->m_universalAccess;
553 m_canLoadLocalResources = privilegeData->m_canLoadLocalResources; 553 m_canLoadLocalResources = privilegeData->m_canLoadLocalResources;
554 m_blockLocalAccessFromLocalOrigin = privilegeData->m_blockLocalAccessFromLoc alOrigin; 554 m_blockLocalAccessFromLocalOrigin = privilegeData->m_blockLocalAccessFromLoc alOrigin;
555 } 555 }
556 556
557 } // namespace blink 557 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698