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

Unified Diff: content/browser/download/download_stats.cc

Issue 1107913003: Remove support for "name" parameter from Content-Disposition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust comment for clarity Created 5 years, 8 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
« no previous file with comments | « no previous file | net/base/filename_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_stats.cc
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index d88eef2c4e2c039e61add7820cc94b88b562cfbe..f8b92bead6171925de57c6ba6c704693270ba252 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -31,7 +31,7 @@ enum ContentDispositionCountTypes {
// number of downloads is measured by UNTHROTTLED_COUNT.
CONTENT_DISPOSITION_HEADER_PRESENT = 0,
- // At least one of 'name', 'filename' or 'filenae*' attributes were valid and
+ // Either 'filename' or 'filename*' attributes were valid and
// yielded a non-empty filename.
CONTENT_DISPOSITION_IS_VALID,
@@ -39,15 +39,16 @@ enum ContentDispositionCountTypes {
// net::HttpContentDisposition::ParseResult.
CONTENT_DISPOSITION_HAS_DISPOSITION_TYPE,
CONTENT_DISPOSITION_HAS_UNKNOWN_TYPE,
- CONTENT_DISPOSITION_HAS_NAME,
+
+ CONTENT_DISPOSITION_HAS_NAME, // Obsolete; kept for UMA compatiblity.
+
CONTENT_DISPOSITION_HAS_FILENAME,
CONTENT_DISPOSITION_HAS_EXT_FILENAME,
CONTENT_DISPOSITION_HAS_NON_ASCII_STRINGS,
CONTENT_DISPOSITION_HAS_PERCENT_ENCODED_STRINGS,
CONTENT_DISPOSITION_HAS_RFC2047_ENCODED_STRINGS,
- // Only have the 'name' attribute is present.
- CONTENT_DISPOSITION_HAS_NAME_ONLY,
+ CONTENT_DISPOSITION_HAS_NAME_ONLY, // Obsolete; kept for UMA compatiblity.
CONTENT_DISPOSITION_LAST_ENTRY
};
@@ -505,9 +506,6 @@ void RecordDownloadContentDisposition(
CONTENT_DISPOSITION_HAS_UNKNOWN_TYPE, result,
net::HttpContentDisposition::HAS_UNKNOWN_DISPOSITION_TYPE);
RecordContentDispositionCountFlag(
- CONTENT_DISPOSITION_HAS_NAME, result,
- net::HttpContentDisposition::HAS_NAME);
- RecordContentDispositionCountFlag(
CONTENT_DISPOSITION_HAS_FILENAME, result,
net::HttpContentDisposition::HAS_FILENAME);
RecordContentDispositionCountFlag(
@@ -522,13 +520,6 @@ void RecordDownloadContentDisposition(
RecordContentDispositionCountFlag(
CONTENT_DISPOSITION_HAS_RFC2047_ENCODED_STRINGS, result,
net::HttpContentDisposition::HAS_RFC2047_ENCODED_STRINGS);
-
- RecordContentDispositionCount(
- CONTENT_DISPOSITION_HAS_NAME_ONLY,
- (result & (net::HttpContentDisposition::HAS_NAME |
- net::HttpContentDisposition::HAS_FILENAME |
- net::HttpContentDisposition::HAS_EXT_FILENAME)) ==
- net::HttpContentDisposition::HAS_NAME);
}
void RecordFileThreadReceiveBuffers(size_t num_buffers) {
« no previous file with comments | « no previous file | net/base/filename_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698