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

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

Issue 9854011: Normalize download file name on chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot tu upload patchset with added comment Created 8 years, 9 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 #pragma once 9 #pragma once
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Return true if the |download_path| is dangerous path. 45 // Return true if the |download_path| is dangerous path.
46 bool DownloadPathIsDangerous(const FilePath& download_path); 46 bool DownloadPathIsDangerous(const FilePath& download_path);
47 47
48 // Generate a filename based on the response from the server. Similar 48 // Generate a filename based on the response from the server. Similar
49 // in operation to net::GenerateFileName(), but uses a localized 49 // in operation to net::GenerateFileName(), but uses a localized
50 // default name. 50 // default name.
51 void GenerateFileNameFromRequest(const content::DownloadItem& download_item, 51 void GenerateFileNameFromRequest(const content::DownloadItem& download_item,
52 FilePath* generated_name); 52 FilePath* generated_name);
53 53
54 // If running on ChromeOS, normalizes file name.
55 void NormalizeFileNameOnChromeOS(FilePath* file_name);
asanka 2012/03/26 20:01:08 If this is a common thing that you'll need to do o
tbarzic 2012/03/26 20:45:06 I'm not sure if we'll need to do this anywhere els
tbarzic 2012/03/26 20:59:50 Done.
56
54 // Download progress animations ------------------------------------------------ 57 // Download progress animations ------------------------------------------------
55 58
56 // Arc sweep angle for use with downloads of unknown size 59 // Arc sweep angle for use with downloads of unknown size
57 const int kUnknownAngleDegrees = 50; 60 const int kUnknownAngleDegrees = 50;
58 61
59 // Rate of progress for use with downloads of unknown size 62 // Rate of progress for use with downloads of unknown size
60 const int kUnknownIncrementDegrees = 12; 63 const int kUnknownIncrementDegrees = 12;
61 64
62 // Start angle for downloads with known size (midnight position) 65 // Start angle for downloads with known size (midnight position)
63 const int kStartAngleDegrees = -90; 66 const int kStartAngleDegrees = -90;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 214
212 // Increment one of the above counts. 215 // Increment one of the above counts.
213 void RecordDownloadCount(ChromeDownloadCountTypes type); 216 void RecordDownloadCount(ChromeDownloadCountTypes type);
214 217
215 // Record initiation of a download from a specific source. 218 // Record initiation of a download from a specific source.
216 void RecordDownloadSource(ChromeDownloadSource source); 219 void RecordDownloadSource(ChromeDownloadSource source);
217 220
218 } // namespace download_util 221 } // namespace download_util
219 222
220 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 223 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698