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

Side by Side Diff: chrome/browser/download/download_file.cc

Issue 6043: Added dangerous download prompting. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <Windows.h> 5 #include <Windows.h>
6 #include <objbase.h> 6 #include <objbase.h>
7 7
8 #include "chrome/browser/download/download_file.h" 8 #include "chrome/browser/download/download_file.h"
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 if (downloads_.empty()) 572 if (downloads_.empty())
573 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod( 573 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod(
574 this, &DownloadFileManager::StopUpdateTimer)); 574 this, &DownloadFileManager::StopUpdateTimer));
575 } 575 }
576 576
577 void DownloadFileManager::CreateDirectory(const std::wstring& directory) { 577 void DownloadFileManager::CreateDirectory(const std::wstring& directory) {
578 if (!file_util::PathExists(directory)) 578 if (!file_util::PathExists(directory))
579 file_util::CreateDirectory(directory); 579 file_util::CreateDirectory(directory);
580 } 580 }
581
582 void DownloadFileManager::DeleteFile(const std::wstring& path) {
583 // Make sure we only delete files.
584 if (file_util::PathExists(path) && !file_util::DirectoryExists(path))
585 file_util::Delete(path, false);
586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698