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

Side by Side Diff: content/shell/shell_download_manager_delegate.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
« no previous file with comments | « content/public/browser/download_item.h ('k') | net/base/net_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/shell/shell_download_manager_delegate.h" 5 #include "content/shell/shell_download_manager_delegate.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #endif 10 #endif
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 DownloadItem* download = 45 DownloadItem* download =
46 download_manager_->GetActiveDownloadItem(download_id); 46 download_manager_->GetActiveDownloadItem(download_id);
47 DownloadStateInfo state = download->GetStateInfo(); 47 DownloadStateInfo state = download->GetStateInfo();
48 48
49 if (!state.force_file_name.empty()) 49 if (!state.force_file_name.empty())
50 return true; 50 return true;
51 51
52 FilePath generated_name = net::GenerateFileName( 52 FilePath generated_name = net::GenerateFileName(
53 download->GetURL(), 53 download->GetURL(),
54 download->GetContentDisposition(), 54 download->GetContentDisposition(),
55 download->GetReferrerCharset(), 55 download->GetDefaultCharset(),
56 download->GetSuggestedFilename(), 56 download->GetSuggestedFilename(),
57 download->GetMimeType(), 57 download->GetMimeType(),
58 "download"); 58 "download");
59 59
60 // Since we have no download UI, show the user a dialog always. 60 // Since we have no download UI, show the user a dialog always.
61 state.prompt_user_for_save_location = true; 61 state.prompt_user_for_save_location = true;
62 62
63 BrowserThread::PostTask( 63 BrowserThread::PostTask(
64 BrowserThread::FILE, 64 BrowserThread::FILE,
65 FROM_HERE, 65 FROM_HERE,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 #endif 132 #endif
133 133
134 if (result.empty()) { 134 if (result.empty()) {
135 download_manager_->FileSelectionCanceled(data); 135 download_manager_->FileSelectionCanceled(data);
136 } else { 136 } else {
137 download_manager_->FileSelected(result, data); 137 download_manager_->FileSelected(result, data);
138 } 138 }
139 } 139 }
140 140
141 } // namespace content 141 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/download_item.h ('k') | net/base/net_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698