Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 497 } | 497 } |
| 498 | 498 |
| 499 bool BlinkPlatformImpl::isReservedIPAddress( | 499 bool BlinkPlatformImpl::isReservedIPAddress( |
| 500 const blink::WebString& host) const { | 500 const blink::WebString& host) const { |
| 501 net::IPAddressNumber address; | 501 net::IPAddressNumber address; |
| 502 if (!net::ParseURLHostnameToNumber(host.utf8(), &address)) | 502 if (!net::ParseURLHostnameToNumber(host.utf8(), &address)) |
| 503 return false; | 503 return false; |
| 504 return net::IsIPAddressReserved(address); | 504 return net::IsIPAddressReserved(address); |
| 505 } | 505 } |
| 506 | 506 |
| 507 bool BlinkPlatformImpl::portAllowed(unsigned short port, | |
| 508 bool is_ftp) const { | |
| 509 if (is_ftp) | |
|
eroman
2015/04/10 01:32:17
{curly braces around this }
Paritosh Kumar
2015/04/10 12:34:32
Thanks.
BTW, removing this if condition.
| |
| 510 return net::IsPortAllowedByFtp(port) | |
| 511 || net::IsPortAllowedByOverride(port); | |
| 512 return net::IsPortAllowedByDefault(port) | |
| 513 || net::IsPortAllowedByOverride(port); | |
| 514 } | |
| 515 | |
| 507 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { | 516 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { |
| 508 WebThreadImpl* thread = new WebThreadImpl(name); | 517 WebThreadImpl* thread = new WebThreadImpl(name); |
| 509 thread->TaskRunner()->PostTask( | 518 thread->TaskRunner()->PostTask( |
| 510 FROM_HERE, base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, | 519 FROM_HERE, base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, |
| 511 base::Unretained(this), thread)); | 520 base::Unretained(this), thread)); |
| 512 return thread; | 521 return thread; |
| 513 } | 522 } |
| 514 | 523 |
| 515 blink::WebThread* BlinkPlatformImpl::currentThread() { | 524 blink::WebThread* BlinkPlatformImpl::currentThread() { |
| 516 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); | 525 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1255 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1264 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1256 static_cast<ui::DomCode>(dom_code))); | 1265 static_cast<ui::DomCode>(dom_code))); |
| 1257 } | 1266 } |
| 1258 | 1267 |
| 1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1268 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1269 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1261 code.utf8().data())); | 1270 code.utf8().data())); |
| 1262 } | 1271 } |
| 1263 | 1272 |
| 1264 } // namespace content | 1273 } // namespace content |
| OLD | NEW |