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

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

Issue 8380021: Make all drag sources not depend on download_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: header path Created 9 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
« no previous file with comments | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // Return true if the |download_path| is dangerous path. 55 // Return true if the |download_path| is dangerous path.
56 bool DownloadPathIsDangerous(const FilePath& download_path); 56 bool DownloadPathIsDangerous(const FilePath& download_path);
57 57
58 // Generate a filename based on the response from the server. Similar 58 // Generate a filename based on the response from the server. Similar
59 // in operation to net::GenerateFileName(), but uses a localized 59 // in operation to net::GenerateFileName(), but uses a localized
60 // default name. 60 // default name.
61 void GenerateFileNameFromRequest(const DownloadItem& download_item, 61 void GenerateFileNameFromRequest(const DownloadItem& download_item,
62 FilePath* generated_name); 62 FilePath* generated_name);
63 63
64 // Generate a filename based on the URL, a suggested name and a MIME
65 // type. Similar in operation to net::GenerateFileName(), but uses a
66 // localized default name.
67 void GenerateFileNameFromSuggestedName(const GURL& url,
68 const std::string& suggested_name,
69 const std::string& mime_type,
70 FilePath* generated_name);
71
72 // Download progress animations ------------------------------------------------ 64 // Download progress animations ------------------------------------------------
73 65
74 // Arc sweep angle for use with downloads of unknown size 66 // Arc sweep angle for use with downloads of unknown size
75 const int kUnknownAngleDegrees = 50; 67 const int kUnknownAngleDegrees = 50;
76 68
77 // Rate of progress for use with downloads of unknown size 69 // Rate of progress for use with downloads of unknown size
78 const int kUnknownIncrementDegrees = 12; 70 const int kUnknownIncrementDegrees = 12;
79 71
80 // Start angle for downloads with known size (midnight position) 72 // Start angle for downloads with known size (midnight position)
81 const int kStartAngleDegrees = -90; 73 const int kStartAngleDegrees = -90;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // If |path| does not exist, 0 is returned. If it fails to find such 168 // If |path| does not exist, 0 is returned. If it fails to find such
177 // a number, -1 is returned. 169 // a number, -1 is returned.
178 int GetUniquePathNumberWithCrDownload(const FilePath& path); 170 int GetUniquePathNumberWithCrDownload(const FilePath& path);
179 171
180 // Returns a .crdownload intermediate path for the |suggested_path|. 172 // Returns a .crdownload intermediate path for the |suggested_path|.
181 FilePath GetCrDownloadPath(const FilePath& suggested_path); 173 FilePath GetCrDownloadPath(const FilePath& suggested_path);
182 174
183 } // namespace download_util 175 } // namespace download_util
184 176
185 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 177 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698