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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceResponse.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 22 matching lines...) Expand all
33 33
34 namespace blink { 34 namespace blink {
35 35
36 namespace { 36 namespace {
37 37
38 template <typename Interface> 38 template <typename Interface>
39 Vector<Interface> isolatedCopy(const Vector<Interface>& src) { 39 Vector<Interface> isolatedCopy(const Vector<Interface>& src) {
40 Vector<Interface> result; 40 Vector<Interface> result;
41 result.reserveCapacity(src.size()); 41 result.reserveCapacity(src.size());
42 for (const auto& timestamp : src) { 42 for (const auto& timestamp : src) {
43 result.append(timestamp.isolatedCopy()); 43 result.push_back(timestamp.isolatedCopy());
44 } 44 }
45 return result; 45 return result;
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 ResourceResponse::SignedCertificateTimestamp::SignedCertificateTimestamp( 50 ResourceResponse::SignedCertificateTimestamp::SignedCertificateTimestamp(
51 const blink::WebURLResponse::SignedCertificateTimestamp& sct) 51 const blink::WebURLResponse::SignedCertificateTimestamp& sct)
52 : m_status(sct.status), 52 : m_status(sct.status),
53 m_origin(sct.origin), 53 m_origin(sct.origin),
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 m_securityDetails.cipher = data->m_securityDetails.cipher; 163 m_securityDetails.cipher = data->m_securityDetails.cipher;
164 m_securityDetails.keyExchange = data->m_securityDetails.keyExchange; 164 m_securityDetails.keyExchange = data->m_securityDetails.keyExchange;
165 m_securityDetails.keyExchangeGroup = data->m_securityDetails.keyExchangeGroup; 165 m_securityDetails.keyExchangeGroup = data->m_securityDetails.keyExchangeGroup;
166 m_securityDetails.mac = data->m_securityDetails.mac; 166 m_securityDetails.mac = data->m_securityDetails.mac;
167 m_securityDetails.subjectName = data->m_securityDetails.subjectName; 167 m_securityDetails.subjectName = data->m_securityDetails.subjectName;
168 m_securityDetails.sanList = data->m_securityDetails.sanList; 168 m_securityDetails.sanList = data->m_securityDetails.sanList;
169 m_securityDetails.issuer = data->m_securityDetails.issuer; 169 m_securityDetails.issuer = data->m_securityDetails.issuer;
170 m_securityDetails.validFrom = data->m_securityDetails.validFrom; 170 m_securityDetails.validFrom = data->m_securityDetails.validFrom;
171 m_securityDetails.validTo = data->m_securityDetails.validTo; 171 m_securityDetails.validTo = data->m_securityDetails.validTo;
172 for (auto& cert : data->m_certificate) 172 for (auto& cert : data->m_certificate)
173 m_securityDetails.certificate.append(AtomicString(cert)); 173 m_securityDetails.certificate.push_back(AtomicString(cert));
174 m_securityDetails.sctList = data->m_securityDetails.sctList; 174 m_securityDetails.sctList = data->m_securityDetails.sctList;
175 m_httpVersion = data->m_httpVersion; 175 m_httpVersion = data->m_httpVersion;
176 m_appCacheID = data->m_appCacheID; 176 m_appCacheID = data->m_appCacheID;
177 m_appCacheManifestURL = data->m_appCacheManifestURL.copy(); 177 m_appCacheManifestURL = data->m_appCacheManifestURL.copy();
178 m_multipartBoundary = data->m_multipartBoundary; 178 m_multipartBoundary = data->m_multipartBoundary;
179 m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY; 179 m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY;
180 m_wasNpnNegotiated = data->m_wasNpnNegotiated; 180 m_wasNpnNegotiated = data->m_wasNpnNegotiated;
181 m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable; 181 m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable;
182 m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; 182 m_wasFetchedViaProxy = data->m_wasFetchedViaProxy;
183 m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; 183 m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 data->m_securityDetails.keyExchangeGroup = 228 data->m_securityDetails.keyExchangeGroup =
229 m_securityDetails.keyExchangeGroup.isolatedCopy(); 229 m_securityDetails.keyExchangeGroup.isolatedCopy();
230 data->m_securityDetails.mac = m_securityDetails.mac.isolatedCopy(); 230 data->m_securityDetails.mac = m_securityDetails.mac.isolatedCopy();
231 data->m_securityDetails.subjectName = 231 data->m_securityDetails.subjectName =
232 m_securityDetails.subjectName.isolatedCopy(); 232 m_securityDetails.subjectName.isolatedCopy();
233 data->m_securityDetails.sanList = isolatedCopy(m_securityDetails.sanList); 233 data->m_securityDetails.sanList = isolatedCopy(m_securityDetails.sanList);
234 data->m_securityDetails.issuer = m_securityDetails.issuer.isolatedCopy(); 234 data->m_securityDetails.issuer = m_securityDetails.issuer.isolatedCopy();
235 data->m_securityDetails.validFrom = m_securityDetails.validFrom; 235 data->m_securityDetails.validFrom = m_securityDetails.validFrom;
236 data->m_securityDetails.validTo = m_securityDetails.validTo; 236 data->m_securityDetails.validTo = m_securityDetails.validTo;
237 for (auto& cert : m_securityDetails.certificate) 237 for (auto& cert : m_securityDetails.certificate)
238 data->m_certificate.append(cert.getString().isolatedCopy()); 238 data->m_certificate.push_back(cert.getString().isolatedCopy());
239 data->m_securityDetails.sctList = isolatedCopy(m_securityDetails.sctList); 239 data->m_securityDetails.sctList = isolatedCopy(m_securityDetails.sctList);
240 data->m_httpVersion = m_httpVersion; 240 data->m_httpVersion = m_httpVersion;
241 data->m_appCacheID = m_appCacheID; 241 data->m_appCacheID = m_appCacheID;
242 data->m_appCacheManifestURL = m_appCacheManifestURL.copy(); 242 data->m_appCacheManifestURL = m_appCacheManifestURL.copy();
243 data->m_multipartBoundary = m_multipartBoundary; 243 data->m_multipartBoundary = m_multipartBoundary;
244 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY; 244 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY;
245 data->m_wasNpnNegotiated = m_wasNpnNegotiated; 245 data->m_wasNpnNegotiated = m_wasNpnNegotiated;
246 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable; 246 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable;
247 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy; 247 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy;
248 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker; 248 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 } 629 }
630 // TODO(dmurph): Investigate whether we need the mimeType on this blob. 630 // TODO(dmurph): Investigate whether we need the mimeType on this blob.
631 std::unique_ptr<BlobData> blobData = 631 std::unique_ptr<BlobData> blobData =
632 BlobData::createForFileWithUnknownSize(m_downloadedFilePath); 632 BlobData::createForFileWithUnknownSize(m_downloadedFilePath);
633 blobData->detachFromCurrentThread(); 633 blobData->detachFromCurrentThread();
634 m_downloadedFileHandle = BlobDataHandle::create(std::move(blobData), -1); 634 m_downloadedFileHandle = BlobDataHandle::create(std::move(blobData), -1);
635 } 635 }
636 636
637 void ResourceResponse::appendRedirectResponse( 637 void ResourceResponse::appendRedirectResponse(
638 const ResourceResponse& response) { 638 const ResourceResponse& response) {
639 m_redirectResponses.append(response); 639 m_redirectResponses.push_back(response);
640 } 640 }
641 641
642 bool ResourceResponse::compare(const ResourceResponse& a, 642 bool ResourceResponse::compare(const ResourceResponse& a,
643 const ResourceResponse& b) { 643 const ResourceResponse& b) {
644 if (a.isNull() != b.isNull()) 644 if (a.isNull() != b.isNull())
645 return false; 645 return false;
646 if (a.url() != b.url()) 646 if (a.url() != b.url())
647 return false; 647 return false;
648 if (a.mimeType() != b.mimeType()) 648 if (a.mimeType() != b.mimeType())
649 return false; 649 return false;
(...skipping 15 matching lines...) Expand all
665 if (a.resourceLoadTiming() != b.resourceLoadTiming()) 665 if (a.resourceLoadTiming() != b.resourceLoadTiming())
666 return false; 666 return false;
667 if (a.encodedBodyLength() != b.encodedBodyLength()) 667 if (a.encodedBodyLength() != b.encodedBodyLength())
668 return false; 668 return false;
669 if (a.decodedBodyLength() != b.decodedBodyLength()) 669 if (a.decodedBodyLength() != b.decodedBodyLength())
670 return false; 670 return false;
671 return true; 671 return true;
672 } 672 }
673 673
674 } // namespace blink 674 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698