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

Side by Side Diff: chrome/browser/download/download_util.h

Issue 3029025: Download code cleanup: (Closed)
Patch Set: rebase'n'final Created 10 years, 5 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
« no previous file with comments | « chrome/browser/download/download_shelf.cc ('k') | chrome/browser/download/download_util.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Download utilities. 5 // Download utilities.
6 6
7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 17 matching lines...) Expand all
28 class FilePath; 28 class FilePath;
29 class GURL; 29 class GURL;
30 class ResourceDispatcherHost; 30 class ResourceDispatcherHost;
31 class SkBitmap; 31 class SkBitmap;
32 class URLRequestContextGetter; 32 class URLRequestContextGetter;
33 33
34 struct DownloadSaveInfo; 34 struct DownloadSaveInfo;
35 35
36 namespace download_util { 36 namespace download_util {
37 37
38 // Download opening ------------------------------------------------------------
39
40 // Whether it is OK to open this download.
41 bool CanOpenDownload(DownloadItem* download);
42
43 // Open the file associated with this download (wait for the download to
44 // complete if it is in progress).
45 void OpenDownload(DownloadItem* download);
46
47 // Download temporary file creation -------------------------------------------- 38 // Download temporary file creation --------------------------------------------
48 39
49 // Return the default download directory. 40 // Return the default download directory.
50 const FilePath& GetDefaultDownloadDirectory(); 41 const FilePath& GetDefaultDownloadDirectory();
51 42
52 // Create a temporary file for a download in the user's default download 43 // Create a temporary file for a download in the user's default download
53 // directory and return true if was successful in creating the file. 44 // directory and return true if was successful in creating the file.
54 bool CreateTemporaryFileForDownload(FilePath* path); 45 bool CreateTemporaryFileForDownload(FilePath* path);
55 46
56 // Return true if the |download_path| is dangerous path. 47 // Return true if the |download_path| is dangerous path.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // If |path| does not exist, 0 is returned. If it fails to find such 175 // If |path| does not exist, 0 is returned. If it fails to find such
185 // a number, -1 is returned. 176 // a number, -1 is returned.
186 int GetUniquePathNumberWithCrDownload(const FilePath& path); 177 int GetUniquePathNumberWithCrDownload(const FilePath& path);
187 178
188 // Returns a .crdownload intermediate path for the |suggested_path|. 179 // Returns a .crdownload intermediate path for the |suggested_path|.
189 FilePath GetCrDownloadPath(const FilePath& suggested_path); 180 FilePath GetCrDownloadPath(const FilePath& suggested_path);
190 181
191 } // namespace download_util 182 } // namespace download_util
192 183
193 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 184 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_shelf.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698