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

Side by Side Diff: content/browser/download/download_resource_handler.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, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/download_resource_handler.h" 5 #include "content/browser/download/download_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 if (!response->headers || 134 if (!response->headers ||
135 !response->headers->EnumerateHeader(NULL, 135 !response->headers->EnumerateHeader(NULL,
136 "Accept-Ranges", 136 "Accept-Ranges",
137 &accept_ranges_)) { 137 &accept_ranges_)) {
138 accept_ranges_ = ""; 138 accept_ranges_ = "";
139 } 139 }
140 140
141 info->prompt_user_for_save_location = 141 info->prompt_user_for_save_location =
142 save_info_.prompt_for_save_location && save_info_.file_path.empty(); 142 save_info_.prompt_for_save_location && save_info_.file_path.empty();
143 info->referrer_charset = request_->context()->referrer_charset(); 143 info->default_charset = request_->context()->default_charset();
144 info->save_info = save_info_; 144 info->save_info = save_info_;
145 145
146 146
147 BrowserThread::PostTask( 147 BrowserThread::PostTask(
148 BrowserThread::UI, FROM_HERE, 148 BrowserThread::UI, FROM_HERE,
149 base::Bind(&DownloadResourceHandler::StartOnUIThread, this, 149 base::Bind(&DownloadResourceHandler::StartOnUIThread, this,
150 base::Passed(&info), request_handle)); 150 base::Passed(&info), request_handle));
151 151
152 // We can't start saving the data before we create the file on disk and have a 152 // We can't start saving the data before we create the file on disk and have a
153 // download id. The request will be un-paused in 153 // download id. The request will be un-paused in
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 " render_view_id_ = " "%d" 375 " render_view_id_ = " "%d"
376 " save_info_.file_path = \"%" PRFilePath "\"" 376 " save_info_.file_path = \"%" PRFilePath "\""
377 " }", 377 " }",
378 request_->url().spec().c_str(), 378 request_->url().spec().c_str(),
379 download_id_.local(), 379 download_id_.local(),
380 global_id_.child_id, 380 global_id_.child_id,
381 global_id_.request_id, 381 global_id_.request_id,
382 render_view_id_, 382 render_view_id_,
383 save_info_.file_path.value().c_str()); 383 save_info_.file_path.value().c_str());
384 } 384 }
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/download/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698