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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 9317018: referrer_charset is a lie. It's really the user's default_charset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | content/browser/download/download_create_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
===================================================================
--- chrome/browser/profiles/profile_io_data.cc (revision 119865)
+++ chrome/browser/profiles/profile_io_data.cc (working copy)
@@ -202,21 +202,7 @@
pref_service->GetString(prefs::kGlobalDefaultCharset);
params->accept_charset =
net::HttpUtil::GenerateAcceptCharsetHeader(default_charset);
-
- // At this point, we don't know the charset of the referring page
- // where a url request originates from. This is used to get a suggested
- // filename from Content-Disposition header made of raw 8bit characters.
- // Down the road, it can be overriden if it becomes known (for instance,
- // when download request is made through the context menu in a web page).
- // At the moment, it'll remain 'undeterministic' when a user
- // types a URL in the omnibar or click on a download link in a page.
- // For the latter, we need a change on the webkit-side.
- // We initialize it to the default charset here and a user will
- // have an *arguably* better default charset for interpreting a raw 8bit
- // C-D header field. It means the native OS codepage fallback in
- // net_util::GetSuggestedFilename is unlikely to be taken.
- params->referrer_charset = default_charset;
-
+ params->default_charset = default_charset;
params->io_thread = g_browser_process->io_thread();
params->audio_manager = g_browser_process->audio_manager();
@@ -525,7 +511,7 @@
context->set_is_incognito(profile_params_->is_incognito);
context->set_accept_language(profile_params_->accept_language);
context->set_accept_charset(profile_params_->accept_charset);
- context->set_referrer_charset(profile_params_->referrer_charset);
+ context->set_default_charset(profile_params_->default_charset);
context->set_ssl_config_service(profile_params_->ssl_config_service);
}
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | content/browser/download/download_create_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698