diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 23:31:41 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 23:31:41 +0000 |
commit | 7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2 (patch) | |
tree | e606471e20eb79fea7a05c9005869065bf865ca1 /chrome/browser/views/download_item_view.cc | |
parent | cab465ccf2a93d84e0f16987d8754ac2673eb118 (diff) | |
download | chromium_src-7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2.zip chromium_src-7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2.tar.gz chromium_src-7ae7c2cbd38f886f4056fa7434a6c1189d98ffd2.tar.bz2 |
Convert download manager to FilePath.
(Fixed up version of issue 17032. Now passes all unit tests.)
Review URL: http://codereview.chromium.org/16533
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/download_item_view.cc')
-rw-r--r-- | chrome/browser/views/download_item_view.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc index f3e4a2a..6579e55 100644 --- a/chrome/browser/views/download_item_view.cc +++ b/chrome/browser/views/download_item_view.cc @@ -201,7 +201,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download, 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 @@ void DownloadItemView::Paint(ChromeCanvas* canvas) { // 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 @@ void DownloadItemView::Paint(ChromeCanvas* canvas) { // 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 @@ bool DownloadItemView::OnMouseDragged(const views::MouseEvent& event) { 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::OnExtractIconComplete(IconManager::Handle handle, 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)); } |