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

Side by Side Diff: content/browser/loader/async_revalidation_manager.cc

Issue 1866483002: Add a new priority level, THROTTLED, below IDLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated comments. Created 4 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
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // A matching async revalidation is already in progress for this cache; we 101 // A matching async revalidation is already in progress for this cache; we
102 // don't need another one. 102 // don't need another one.
103 return; 103 return;
104 } 104 }
105 105
106 net::HttpRequestHeaders headers; 106 net::HttpRequestHeaders headers;
107 headers.AddHeadersFromString(info->original_headers()); 107 headers.AddHeadersFromString(info->original_headers());
108 108
109 // Construct the request. 109 // Construct the request.
110 std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest( 110 std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest(
111 for_request.url(), net::MINIMUM_PRIORITY, nullptr); 111 for_request.url(), net::IDLE, nullptr);
112 112
113 new_request->set_method(for_request.method()); 113 new_request->set_method(for_request.method());
114 new_request->set_first_party_for_cookies( 114 new_request->set_first_party_for_cookies(
115 for_request.first_party_for_cookies()); 115 for_request.first_party_for_cookies());
116 new_request->set_initiator(for_request.initiator()); 116 new_request->set_initiator(for_request.initiator());
117 new_request->set_first_party_url_policy(for_request.first_party_url_policy()); 117 new_request->set_first_party_url_policy(for_request.first_party_url_policy());
118 118
119 new_request->SetReferrer(for_request.referrer()); 119 new_request->SetReferrer(for_request.referrer());
120 new_request->set_referrer_policy(for_request.referrer_policy()); 120 new_request->set_referrer_policy(for_request.referrer_policy());
121 121
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 return true; 183 return true;
184 } 184 }
185 185
186 void AsyncRevalidationManager::OnAsyncRevalidationComplete( 186 void AsyncRevalidationManager::OnAsyncRevalidationComplete(
187 AsyncRevalidationMap::iterator it) { 187 AsyncRevalidationMap::iterator it) {
188 in_progress_.erase(it); 188 in_progress_.erase(it);
189 } 189 }
190 190
191 } // namespace content 191 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | net/base/prioritized_dispatcher_unittest.cc » ('j') | net/quic/quic_http_utils_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698