| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Collin Jackson <collinj@webkit.org> | 2 * Copyright (C) 2008 Collin Jackson <collinj@webkit.org> |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 24 matching lines...) Expand all Loading... |
| 35 void prefetchDNS(const String& hostname) | 35 void prefetchDNS(const String& hostname) |
| 36 { | 36 { |
| 37 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc
ientNetworking()) | 37 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc
ientNetworking()) |
| 38 prescientNetworking->prefetchDNS(hostname); | 38 prescientNetworking->prefetchDNS(hostname); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin) | 41 void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin) |
| 42 { | 42 { |
| 43 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc
ientNetworking()) { | 43 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc
ientNetworking()) { |
| 44 bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous); | 44 bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous); |
| 45 // TODO(yoav): Call only the crossorigin interface once everything is ho
oked up. | 45 prescientNetworking->preconnect(url, allowCredentials); |
| 46 if (crossOrigin == CrossOriginAttributeNotSet) | |
| 47 prescientNetworking->preconnect(url); | |
| 48 else | |
| 49 prescientNetworking->preconnect(url, allowCredentials); | |
| 50 } | 46 } |
| 51 } | 47 } |
| 52 | 48 |
| 53 } // namespace blink | 49 } // namespace blink |
| OLD | NEW |