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

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

Issue 2043083002: Speculatively launch Service Workers on mouse/touch events. [2/5] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert BUILD.gn Created 4 years, 5 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) 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 27 matching lines...) Expand all
38 } 38 }
39 39
40 void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin) 40 void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin)
41 { 41 {
42 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc ientNetworking()) { 42 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc ientNetworking()) {
43 bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous); 43 bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous);
44 prescientNetworking->preconnect(url, allowCredentials); 44 prescientNetworking->preconnect(url, allowCredentials);
45 } 45 }
46 } 46 }
47 47
48 void sendNavigationHint(const KURL& url, WebNavigationHintType type)
49 {
50 if (WebPrescientNetworking* prescientNetworking = Platform::current()->presc ientNetworking()) {
51 prescientNetworking->sendNavigationHint(url, type);
52 }
53 }
54
48 } // namespace blink 55 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/network/NetworkHints.h ('k') | third_party/WebKit/public/blink_headers.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698