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

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

Issue 14625016: downloads: Make GetCrDownloadPath a static method on DownloadTargetDeterminer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 9
10 #include <string> 10 #include <string>
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // is only required for Mac OS X, elsewhere it can be NULL. 136 // is only required for Mac OS X, elsewhere it can be NULL.
137 void DragDownload(const content::DownloadItem* download, 137 void DragDownload(const content::DownloadItem* download,
138 gfx::Image* icon, 138 gfx::Image* icon,
139 gfx::NativeView view); 139 gfx::NativeView view);
140 140
141 // Helpers --------------------------------------------------------------------- 141 // Helpers ---------------------------------------------------------------------
142 142
143 // Get the localized status text for an in-progress download. 143 // Get the localized status text for an in-progress download.
144 string16 GetProgressStatusText(content::DownloadItem* download); 144 string16 GetProgressStatusText(content::DownloadItem* download);
145 145
146 // Returns a .crdownload intermediate path for the |suggested_path|.
147 base::FilePath GetCrDownloadPath(const base::FilePath& suggested_path);
148
149 // Check whether we can do the saving page operation for the specified URL. 146 // Check whether we can do the saving page operation for the specified URL.
150 bool IsSavableURL(const GURL& url); 147 bool IsSavableURL(const GURL& url);
151 148
152 // Record the total number of items and the number of in-progress items showing 149 // Record the total number of items and the number of in-progress items showing
153 // in the shelf when it closes. Set |autoclose| to true when the shelf is 150 // in the shelf when it closes. Set |autoclose| to true when the shelf is
154 // closing itself, false when the user explicitly closed it. 151 // closing itself, false when the user explicitly closed it.
155 void RecordShelfClose(int size, int in_progress, bool autoclose); 152 void RecordShelfClose(int size, int in_progress, bool autoclose);
156 153
157 // Used for counting UMA stats. Similar to content's 154 // Used for counting UMA stats. Similar to content's
158 // download_stats::DownloadCountTypes but from the chrome layer. 155 // download_stats::DownloadCountTypes but from the chrome layer.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 191
195 // Increment one of the above counts. 192 // Increment one of the above counts.
196 void RecordDownloadCount(ChromeDownloadCountTypes type); 193 void RecordDownloadCount(ChromeDownloadCountTypes type);
197 194
198 // Record initiation of a download from a specific source. 195 // Record initiation of a download from a specific source.
199 void RecordDownloadSource(ChromeDownloadSource source); 196 void RecordDownloadSource(ChromeDownloadSource source);
200 197
201 } // namespace download_util 198 } // namespace download_util
202 199
203 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 200 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_target_determiner_unittest.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698