diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 03:08:50 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 03:08:50 +0000 |
commit | 309b764b38f67d23f8b12488e6d1f542ca19b13e (patch) | |
tree | b019a2748608482494160615527d50397f3514e5 /chrome | |
parent | 784cee8f1792d709d0063ab683860492e9e4332e (diff) | |
download | chromium_src-309b764b38f67d23f8b12488e6d1f542ca19b13e.zip chromium_src-309b764b38f67d23f8b12488e6d1f542ca19b13e.tar.gz chromium_src-309b764b38f67d23f8b12488e6d1f542ca19b13e.tar.bz2 |
Minor cleanup; remove deprecate file_util function and some obsolete TODOs.
Review URL: http://codereview.chromium.org/467030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/download/download_manager.cc | 7 | ||||
-rw-r--r-- | chrome/browser/gtk/download_item_gtk.cc | 8 | ||||
-rw-r--r-- | chrome/browser/gtk/find_bar_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/installer/util/lzma_util.cc | 4 |
4 files changed, 7 insertions, 18 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index af7c9d5..1dcd72d 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -500,15 +500,10 @@ bool DownloadManager::Init(Profile* profile) { download_path_.Init(prefs::kDownloadDefaultDirectory, prefs, NULL); - // This variable is needed to resolve which CreateDirectory we want to point - // to. Without it, the NewRunnableFunction cannot resolve the ambiguity. - // TODO(estade): when file_util::CreateDirectory(wstring) is removed, - // get rid of |CreateDirectoryPtr|. - bool (*CreateDirectoryPtr)(const FilePath&) = &file_util::CreateDirectory; // Ensure that the download directory specified in the preferences exists. ChromeThread::PostTask( ChromeThread::FILE, FROM_HERE, - NewRunnableFunction(CreateDirectoryPtr, download_path())); + NewRunnableFunction(&file_util::CreateDirectory, download_path())); // We use this to determine possibly dangerous downloads. download_util::InitializeExeTypes(&exe_types_); diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc index 813e86f..a507ec7 100644 --- a/chrome/browser/gtk/download_item_gtk.cc +++ b/chrome/browser/gtk/download_item_gtk.cc @@ -218,10 +218,6 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf, name_label_ = gtk_label_new(NULL); - // TODO(estade): This is at best an educated guess, since we don't actually - // use gfx::Font() to draw the text. This is why we need to add so - // much padding when we set the size request. We need to either use gfx::Font - // or somehow extend TextElider. UpdateNameLabel(); status_label_ = gtk_label_new(NULL); @@ -532,6 +528,10 @@ void DownloadItemGtk::LoadIcon() { } void DownloadItemGtk::UpdateNameLabel() { + // TODO(estade): This is at best an educated guess, since we don't actually + // use gfx::Font() to draw the text. This is why we need to add so + // much padding when we set the size request. We need to either use gfx::Font + // or somehow extend TextElider. std::wstring elided_filename = gfx::ElideFilename( get_download()->GetFileName(), gfx::Font(), kTextWidth); diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index 54b99aa..6cfbc51 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -391,12 +391,6 @@ void FindBarGtk::AudibleAlert() { } gfx::Rect FindBarGtk::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { - // TODO(estade): Logic for the positioning of the find bar might do better - // to share more code with Windows. Currently though they do some things we - // don't worry about, such as considering the state of the bookmark bar on - // the NTP. I've tried to stick as close to the windows function as possible - // here to make it easy to possibly unfork this down the road. - bool ltr = l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT; // 15 is the size of the scrollbar, copied from ScrollbarThemeChromium. // The height is not used. diff --git a/chrome/installer/util/lzma_util.cc b/chrome/installer/util/lzma_util.cc index de5f824..3c232c7 100644 --- a/chrome/installer/util/lzma_util.cc +++ b/chrome/installer/util/lzma_util.cc @@ -172,13 +172,13 @@ DWORD LzmaUtil::UnPack(const std::wstring& location, // If archive entry is directory create it and move on to the next entry. if (f->IsDirectory) { - file_util::CreateDirectory(wfileName); + file_util::CreateDirectory(FilePath(wfileName)); continue; } HANDLE hFile; std::wstring directory = file_util::GetDirectoryFromPath(wfileName); - file_util::CreateDirectory(directory); + file_util::CreateDirectory(FilePath(directory)); hFile = CreateFile(wfileName.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); |