diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-29 16:16:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-09 10:04:06 +0000 |
commit | a95a7417ad456115a1ef2da4bb8320531c0821f1 (patch) | |
tree | edcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/net/http/http_transaction_test_util.cc | |
parent | 33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff) | |
download | qtwebengine-chromium-a95a7417ad456115a1ef2da4bb8320531c0821f1.tar.gz |
BASELINE: Update Chromium to 106.0.5249.126
Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/http/http_transaction_test_util.cc')
-rw-r--r-- | chromium/net/http/http_transaction_test_util.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/chromium/net/http/http_transaction_test_util.cc b/chromium/net/http/http_transaction_test_util.cc index 254263aba71..865099933cd 100644 --- a/chromium/net/http/http_transaction_test_util.cc +++ b/chromium/net/http/http_transaction_test_util.cc @@ -179,9 +179,9 @@ const MockTransaction* FindMockTransaction(const GURL& url) { return it->second; // look for builtins: - for (size_t i = 0; i < std::size(kBuiltinMockTransactions); ++i) { - if (url == GURL(kBuiltinMockTransactions[i]->url)) - return kBuiltinMockTransactions[i]; + for (const auto* transaction : kBuiltinMockTransactions) { + if (url == GURL(transaction->url)) + return transaction; } return nullptr; } @@ -204,7 +204,7 @@ MockHttpRequest::MockHttpRequest(const MockTransaction& t) { } std::string MockHttpRequest::CacheKey() { - return HttpCache::GenerateCacheKeyForTest(this); + return *HttpCache::GenerateCacheKeyForRequest(this); } //----------------------------------------------------------------------------- @@ -506,8 +506,7 @@ int MockNetworkTransaction::StartInternal(const HttpRequestInfo* request, if (!t->response_time.is_null()) response_.response_time = t->response_time; - response_.headers = new HttpResponseHeaders(header_data); - response_.vary_data.Init(*request, *response_.headers.get()); + response_.headers = base::MakeRefCounted<HttpResponseHeaders>(header_data); response_.ssl_info.cert = t->cert; response_.ssl_info.cert_status = t->cert_status; response_.ssl_info.connection_status = t->ssl_connection_status; @@ -608,8 +607,8 @@ int MockNetworkLayer::CreateTransaction( std::unique_ptr<HttpTransaction>* trans) { transaction_count_++; last_create_transaction_priority_ = priority; - std::unique_ptr<MockNetworkTransaction> mock_transaction( - new MockNetworkTransaction(priority, this)); + auto mock_transaction = + std::make_unique<MockNetworkTransaction>(priority, this); last_transaction_ = mock_transaction->AsWeakPtr(); *trans = std::move(mock_transaction); return OK; |