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(const unsigned short port, bool isFtp) const | |
|
eroman
2015/03/30 19:40:02
is_ftp. also not typical to mark plain old data li
Paritosh Kumar
2015/04/01 13:38:05
Done.
| |
| 508 { | |
| 509 if (isFtp) | |
| 510 return net::IsPortAllowedByFtp(port) || net::IsPortAllowedByOverride(port); | |
| 511 return net::IsPortAllowedByDefault(port) || net::IsPortAllowedByOverride(port) ; | |
|
eroman
2015/03/30 19:40:02
> 80 characters
Paritosh Kumar
2015/04/01 13:38:05
Done.
| |
| 512 } | |
| 513 | |
| 507 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { | 514 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { |
| 508 WebThreadImpl* thread = new WebThreadImpl(name); | 515 WebThreadImpl* thread = new WebThreadImpl(name); |
| 509 thread->TaskRunner()->PostTask( | 516 thread->TaskRunner()->PostTask( |
| 510 FROM_HERE, base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, | 517 FROM_HERE, base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, |
| 511 base::Unretained(this), thread)); | 518 base::Unretained(this), thread)); |
| 512 return thread; | 519 return thread; |
| 513 } | 520 } |
| 514 | 521 |
| 515 blink::WebThread* BlinkPlatformImpl::currentThread() { | 522 blink::WebThread* BlinkPlatformImpl::currentThread() { |
| 516 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); | 523 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( | 1262 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1256 static_cast<ui::DomCode>(dom_code))); | 1263 static_cast<ui::DomCode>(dom_code))); |
| 1257 } | 1264 } |
| 1258 | 1265 |
| 1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1266 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1267 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1261 code.utf8().data())); | 1268 code.utf8().data())); |
| 1262 } | 1269 } |
| 1263 | 1270 |
| 1264 } // namespace content | 1271 } // namespace content |
| OLD | NEW |