summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorpauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 19:59:54 +0000
committerpauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 19:59:54 +0000
commita7799617d37530bc94e689c10798677c3cbad5c2 (patch)
tree1a3b3d4e5607b3fb68d0661334cf2a796a3e1c40 /content
parenta9f94f399a5925ef801b2856bd4ad79f2d823e77 (diff)
downloadchromium_src-a7799617d37530bc94e689c10798677c3cbad5c2.zip
chromium_src-a7799617d37530bc94e689c10798677c3cbad5c2.tar.gz
chromium_src-a7799617d37530bc94e689c10798677c3cbad5c2.tar.bz2
Non-functional change to simply have Downloads query Prefs for the charset when we need it rather than have ChromeURLRequestContext track it on the network thread and pass it through three different classes.
BUG=146596 Review URL: https://chromiumcodereview.appspot.com/11092088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163652 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/download/download_create_info.h4
-rw-r--r--content/browser/download/download_item_impl.cc5
-rw-r--r--content/browser/download/download_item_impl.h5
-rw-r--r--content/browser/download/download_resource_handler.cc1
-rw-r--r--content/public/browser/download_item.h1
-rw-r--r--content/shell/shell_download_manager_delegate.cc2
6 files changed, 1 insertions, 17 deletions
diff --git a/content/browser/download/download_create_info.h b/content/browser/download/download_create_info.h
index fbe71fd..2eef90c 100644
--- a/content/browser/download/download_create_info.h
+++ b/content/browser/download/download_create_info.h
@@ -93,10 +93,6 @@ struct CONTENT_EXPORT DownloadCreateInfo {
// default location.
bool prompt_user_for_save_location;
- // The charset of the referring page where the download request comes from.
- // It's used to construct a suggested filename.
- std::string referrer_charset;
-
// The download file save info.
scoped_ptr<content::DownloadSaveInfo> save_info;
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index bea70fe..5017ffa 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -205,7 +205,6 @@ DownloadItemImpl::DownloadItemImpl(
content_disposition_(info.content_disposition),
mime_type_(info.mime_type),
original_mime_type_(info.original_mime_type),
- referrer_charset_(info.referrer_charset),
remote_address_(info.remote_address),
total_bytes_(info.total_bytes),
received_bytes_(0),
@@ -554,10 +553,6 @@ std::string DownloadItemImpl::GetOriginalMimeType() const {
return original_mime_type_;
}
-std::string DownloadItemImpl::GetReferrerCharset() const {
- return referrer_charset_;
-}
-
std::string DownloadItemImpl::GetRemoteAddress() const {
return remote_address_;
}
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index fe851f3..4324289 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -96,7 +96,6 @@ class CONTENT_EXPORT DownloadItemImpl
virtual std::string GetContentDisposition() const OVERRIDE;
virtual std::string GetMimeType() const OVERRIDE;
virtual std::string GetOriginalMimeType() const OVERRIDE;
- virtual std::string GetReferrerCharset() const OVERRIDE;
virtual std::string GetRemoteAddress() const OVERRIDE;
virtual bool HasUserGesture() const OVERRIDE;
virtual content::PageTransition GetTransitionType() const OVERRIDE;
@@ -384,10 +383,6 @@ class CONTENT_EXPORT DownloadItemImpl
// which may look at the file extension and first few bytes of the file.
std::string original_mime_type_;
- // The charset of the referring page where the download request comes from.
- // It's used to construct a suggested filename.
- std::string referrer_charset_;
-
// The remote IP address where the download was fetched from. Copied from
// DownloadCreateInfo::remote_address.
std::string remote_address_;
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 1cdd685..209617a 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -196,7 +196,6 @@ bool DownloadResourceHandler::OnResponseStarted(
info->prompt_user_for_save_location =
save_info_->prompt_for_save_location && save_info_->file_path.empty();
- info->referrer_charset = request_->context()->referrer_charset();
info->save_info = save_info_.Pass();
BrowserThread::PostTask(
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index 67b4172..337ddba 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -194,7 +194,6 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
virtual std::string GetContentDisposition() const = 0;
virtual std::string GetMimeType() const = 0;
virtual std::string GetOriginalMimeType() const = 0;
- virtual std::string GetReferrerCharset() const = 0;
virtual std::string GetRemoteAddress() const = 0;
virtual bool HasUserGesture() const = 0;
virtual PageTransition GetTransitionType() const = 0;
diff --git a/content/shell/shell_download_manager_delegate.cc b/content/shell/shell_download_manager_delegate.cc
index 953f3f4..544ad95 100644
--- a/content/shell/shell_download_manager_delegate.cc
+++ b/content/shell/shell_download_manager_delegate.cc
@@ -70,7 +70,7 @@ bool ShellDownloadManagerDelegate::DetermineDownloadTarget(
FilePath generated_name = net::GenerateFileName(
download->GetURL(),
download->GetContentDisposition(),
- download->GetReferrerCharset(),
+ EmptyString(),
download->GetSuggestedFilename(),
download->GetMimeType(),
"download");