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

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: Adjusted predictor priorities. Created 4 years, 1 month 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698