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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponse.cpp

Issue 2398053003: Compute ResourceResponse::suggestedFileName on the fly. (Closed)
Patch Set: clean up vestigial changes (trybots previous) Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/network/ResourceResponse.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
index 86ecc509c8296a0ece3b827f3ca1c284734be170..c000fbbba2ffc56ad16d2a817ce901e576ac92fa 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
@@ -110,7 +110,6 @@ ResourceResponse::ResourceResponse(const KURL& url,
m_mimeType(mimeType),
m_expectedContentLength(expectedLength),
m_textEncodingName(textEncodingName),
- m_suggestedFilename(filename),
m_httpStatusCode(0),
m_lastModifiedDate(0),
m_wasCached(false),
@@ -149,7 +148,6 @@ ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data)
setMimeType(AtomicString(data->m_mimeType));
setExpectedContentLength(data->m_expectedContentLength);
setTextEncodingName(AtomicString(data->m_textEncodingName));
- setSuggestedFilename(data->m_suggestedFilename);
setHTTPStatusCode(data->m_httpStatusCode);
setHTTPStatusText(AtomicString(data->m_httpStatusText));
@@ -212,7 +210,6 @@ std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData()
data->m_mimeType = mimeType().getString().isolatedCopy();
data->m_expectedContentLength = expectedContentLength();
data->m_textEncodingName = textEncodingName().getString().isolatedCopy();
- data->m_suggestedFilename = suggestedFilename().isolatedCopy();
data->m_httpStatusCode = httpStatusCode();
data->m_httpStatusText = httpStatusText().getString().isolatedCopy();
data->m_httpHeaders = httpHeaderFields().copyData();
@@ -319,19 +316,6 @@ void ResourceResponse::setTextEncodingName(const AtomicString& encodingName) {
m_textEncodingName = encodingName;
}
-// FIXME should compute this on the fly
-const String& ResourceResponse::suggestedFilename() const {
- return m_suggestedFilename;
-}
-
-void ResourceResponse::setSuggestedFilename(const String& suggestedName) {
- m_isNull = false;
-
- // FIXME: Suggested file name is calculated based on other headers. There
- // should not be a setter for it.
- m_suggestedFilename = suggestedName;
-}
-
int ResourceResponse::httpStatusCode() const {
return m_httpStatusCode;
}
@@ -640,8 +624,6 @@ bool ResourceResponse::compare(const ResourceResponse& a,
return false;
if (a.textEncodingName() != b.textEncodingName())
return false;
- if (a.suggestedFilename() != b.suggestedFilename())
- return false;
if (a.httpStatusCode() != b.httpStatusCode())
return false;
if (a.httpStatusText() != b.httpStatusText())
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceResponse.h ('k') | third_party/WebKit/public/platform/WebURLResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698