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

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

Issue 2140033002: Out-of-line ResourceRequest/ResourceResponse ctors to save a few KB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't forget to call initialize() in moved code =( Created 4 years, 5 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 m_responseTime = data->m_responseTime; 157 m_responseTime = data->m_responseTime;
158 m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); 158 m_remoteIPAddress = AtomicString(data->m_remoteIPAddress);
159 m_remotePort = data->m_remotePort; 159 m_remotePort = data->m_remotePort;
160 m_downloadedFilePath = data->m_downloadedFilePath; 160 m_downloadedFilePath = data->m_downloadedFilePath;
161 m_downloadedFileHandle = data->m_downloadedFileHandle; 161 m_downloadedFileHandle = data->m_downloadedFileHandle;
162 162
163 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support 163 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support
164 // whatever values may be present in the opaque m_extraData structure. 164 // whatever values may be present in the opaque m_extraData structure.
165 } 165 }
166 166
167 ResourceResponse::ResourceResponse(const ResourceResponse&) = default;
168 ResourceResponse& ResourceResponse::operator=(const ResourceResponse&) = default ;
169
167 std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData() co nst 170 std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData() co nst
168 { 171 {
169 std::unique_ptr<CrossThreadResourceResponseData> data = wrapUnique(new Cross ThreadResourceResponseData); 172 std::unique_ptr<CrossThreadResourceResponseData> data = wrapUnique(new Cross ThreadResourceResponseData);
170 data->m_url = url().copy(); 173 data->m_url = url().copy();
171 data->m_mimeType = mimeType().getString().isolatedCopy(); 174 data->m_mimeType = mimeType().getString().isolatedCopy();
172 data->m_expectedContentLength = expectedContentLength(); 175 data->m_expectedContentLength = expectedContentLength();
173 data->m_textEncodingName = textEncodingName().getString().isolatedCopy(); 176 data->m_textEncodingName = textEncodingName().getString().isolatedCopy();
174 data->m_suggestedFilename = suggestedFilename().isolatedCopy(); 177 data->m_suggestedFilename = suggestedFilename().isolatedCopy();
175 data->m_httpStatusCode = httpStatusCode(); 178 data->m_httpStatusCode = httpStatusCode();
176 data->m_httpStatusText = httpStatusText().getString().isolatedCopy(); 179 data->m_httpStatusText = httpStatusText().getString().isolatedCopy();
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 if (a.httpHeaderFields() != b.httpHeaderFields()) 590 if (a.httpHeaderFields() != b.httpHeaderFields())
588 return false; 591 return false;
589 if (a.resourceLoadTiming() && b.resourceLoadTiming() && *a.resourceLoadTimin g() == *b.resourceLoadTiming()) 592 if (a.resourceLoadTiming() && b.resourceLoadTiming() && *a.resourceLoadTimin g() == *b.resourceLoadTiming())
590 return true; 593 return true;
591 if (a.resourceLoadTiming() != b.resourceLoadTiming()) 594 if (a.resourceLoadTiming() != b.resourceLoadTiming())
592 return false; 595 return false;
593 return true; 596 return true;
594 } 597 }
595 598
596 } // namespace blink 599 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698