OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/html/parser/PreloadRequest.h" | 5 #include "core/html/parser/PreloadRequest.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/fetch/FetchInitiatorInfo.h" | |
9 #include "core/fetch/FetchRequest.h" | |
10 #include "core/fetch/ResourceFetcher.h" | |
11 #include "core/loader/DocumentLoader.h" | 8 #include "core/loader/DocumentLoader.h" |
12 #include "platform/CrossOriginAttributeValue.h" | 9 #include "platform/CrossOriginAttributeValue.h" |
| 10 #include "platform/loader/fetch/FetchInitiatorInfo.h" |
| 11 #include "platform/loader/fetch/FetchRequest.h" |
| 12 #include "platform/loader/fetch/ResourceFetcher.h" |
13 #include "platform/weborigin/SecurityPolicy.h" | 13 #include "platform/weborigin/SecurityPolicy.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 bool PreloadRequest::isSafeToSendToAnotherThread() const { | 17 bool PreloadRequest::isSafeToSendToAnotherThread() const { |
18 return m_initiatorName.isSafeToSendToAnotherThread() && | 18 return m_initiatorName.isSafeToSendToAnotherThread() && |
19 m_charset.isSafeToSendToAnotherThread() && | 19 m_charset.isSafeToSendToAnotherThread() && |
20 m_resourceURL.isSafeToSendToAnotherThread() && | 20 m_resourceURL.isSafeToSendToAnotherThread() && |
21 m_baseURL.isSafeToSendToAnotherThread(); | 21 m_baseURL.isSafeToSendToAnotherThread(); |
22 } | 22 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 m_resourceType == Resource::ImportResource) { | 73 m_resourceType == Resource::ImportResource) { |
74 request.setCharset( | 74 request.setCharset( |
75 m_charset.isEmpty() ? document->characterSet().getString() : m_charset); | 75 m_charset.isEmpty() ? document->characterSet().getString() : m_charset); |
76 } | 76 } |
77 request.setForPreload(true, m_discoveryTime); | 77 request.setForPreload(true, m_discoveryTime); |
78 | 78 |
79 return document->loader()->startPreload(m_resourceType, request); | 79 return document->loader()->startPreload(m_resourceType, request); |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |