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 "content/browser/loader/async_revalidation_manager.h" | 5 #include "content/browser/loader/async_revalidation_manager.h" |
6 | 6 |
7 #include <tuple> | 7 #include <tuple> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // A matching async revalidation is already in progress for this cache; we | 102 // A matching async revalidation is already in progress for this cache; we |
103 // don't need another one. | 103 // don't need another one. |
104 return; | 104 return; |
105 } | 105 } |
106 | 106 |
107 net::HttpRequestHeaders headers; | 107 net::HttpRequestHeaders headers; |
108 headers.AddHeadersFromString(info->original_headers()); | 108 headers.AddHeadersFromString(info->original_headers()); |
109 | 109 |
110 // Construct the request. | 110 // Construct the request. |
111 std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest( | 111 std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest( |
112 for_request.url(), net::MINIMUM_PRIORITY, nullptr); | 112 for_request.url(), net::IDLE, nullptr); |
113 | 113 |
114 new_request->set_method(for_request.method()); | 114 new_request->set_method(for_request.method()); |
115 new_request->set_first_party_for_cookies( | 115 new_request->set_first_party_for_cookies( |
116 for_request.first_party_for_cookies()); | 116 for_request.first_party_for_cookies()); |
117 new_request->set_initiator(for_request.initiator()); | 117 new_request->set_initiator(for_request.initiator()); |
118 new_request->set_first_party_url_policy(for_request.first_party_url_policy()); | 118 new_request->set_first_party_url_policy(for_request.first_party_url_policy()); |
119 | 119 |
120 new_request->SetReferrer(for_request.referrer()); | 120 new_request->SetReferrer(for_request.referrer()); |
121 new_request->set_referrer_policy(for_request.referrer_policy()); | 121 new_request->set_referrer_policy(for_request.referrer_policy()); |
122 | 122 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 return true; | 185 return true; |
186 } | 186 } |
187 | 187 |
188 void AsyncRevalidationManager::OnAsyncRevalidationComplete( | 188 void AsyncRevalidationManager::OnAsyncRevalidationComplete( |
189 AsyncRevalidationMap::iterator it) { | 189 AsyncRevalidationMap::iterator it) { |
190 in_progress_.erase(it); | 190 in_progress_.erase(it); |
191 } | 191 } |
192 | 192 |
193 } // namespace content | 193 } // namespace content |
OLD | NEW |