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

Unified Diff: chrome/browser/views/download_item_view.cc

Issue 16533: Convert download manager to FilePath. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/history/history_unittest.cc ('k') | chrome/browser/views/download_tab_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_item_view.cc
===================================================================
--- chrome/browser/views/download_item_view.cc (revision 7599)
+++ chrome/browser/views/download_item_view.cc (working copy)
@@ -201,7 +201,7 @@
discard_button_->set_enforce_dlu_min_size(false);
AddChildView(save_button_);
AddChildView(discard_button_);
- std::wstring file_name = download->original_name();
+ std::wstring file_name = download->original_name().ToWStringHack();
// Ensure the file name is not too long.
@@ -457,7 +457,7 @@
// Note that in dangerous mode we use a label (as the text is multi-line).
if (!IsDangerousMode()) {
std::wstring filename =
- gfx::ElideFilename(download_->GetFileName(),
+ gfx::ElideFilename(download_->GetFileName().ToWStringHack(),
font_,
kTextWidth);
@@ -487,7 +487,7 @@
// Paint the icon.
IconManager* im = g_browser_process->icon_manager();
SkBitmap* icon = IsDangerousMode() ? warning_icon_ :
- im->LookupIcon(download_->full_path(), IconLoader::SMALL);
+ im->LookupIcon(download_->full_path().ToWStringHack(), IconLoader::SMALL);
// We count on the fact that the icon manager will cache the icons and if one
// is available, it will be cached here. We *don't* want to request the icon
@@ -716,7 +716,7 @@
if (dragging_) {
if (download_->state() == DownloadItem::COMPLETE) {
IconManager* im = g_browser_process->icon_manager();
- SkBitmap* icon = im->LookupIcon(download_->full_path(),
+ SkBitmap* icon = im->LookupIcon(download_->full_path().ToWStringHack(),
IconLoader::SMALL);
if (icon)
download_util::DragDownload(download_, icon);
@@ -750,7 +750,7 @@
void DownloadItemView::LoadIcon() {
IconManager* im = g_browser_process->icon_manager();
- im->LoadIcon(download_->full_path(), IconLoader::SMALL,
+ im->LoadIcon(download_->full_path().ToWStringHack(), IconLoader::SMALL,
&icon_consumer_,
NewCallback(this, &DownloadItemView::OnExtractIconComplete));
}
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/views/download_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698