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

Side by Side Diff: Source/platform/network/NetworkHints.cpp

Issue 1135203002: Add <link rel=preconnect> crossorigin attribute (take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Todo Created 5 years, 7 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
« no previous file with comments | « Source/platform/network/NetworkHints.h ('k') | public/platform/WebCrossOriginAttribute.h » ('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 (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 20 matching lines...) Expand all
31 #include "public/platform/WebPrescientNetworking.h" 31 #include "public/platform/WebPrescientNetworking.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
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) 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 prescientNetworking->preconnect(url); 44 // TODO(yoav): Call only the crossorigin interface once everything is ho oked up.
45 if (crossOrigin == CrossOriginAttributeNotSet)
46 prescientNetworking->preconnect(url);
47 else
48 prescientNetworking->preconnect(url, crossOrigin);
49 }
45 } 50 }
46 51
47 } // namespace blink 52 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/network/NetworkHints.h ('k') | public/platform/WebCrossOriginAttribute.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698