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

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

Issue 15021020: content: Extract url utility functions into url_utils.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix content_unittests and content_browsertests 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
« 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) 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 // Check whether we can do the saving page operation for the specified URL.
147 bool IsSavableURL(const GURL& url);
148
149 // Record the total number of items and the number of in-progress items showing 146 // Record the total number of items and the number of in-progress items showing
150 // in the shelf when it closes. Set |autoclose| to true when the shelf is 147 // in the shelf when it closes. Set |autoclose| to true when the shelf is
151 // closing itself, false when the user explicitly closed it. 148 // closing itself, false when the user explicitly closed it.
152 void RecordShelfClose(int size, int in_progress, bool autoclose); 149 void RecordShelfClose(int size, int in_progress, bool autoclose);
153 150
154 // Used for counting UMA stats. Similar to content's 151 // Used for counting UMA stats. Similar to content's
155 // download_stats::DownloadCountTypes but from the chrome layer. 152 // download_stats::DownloadCountTypes but from the chrome layer.
156 enum ChromeDownloadCountTypes { 153 enum ChromeDownloadCountTypes {
157 // Stale enum values left around os that values passed to UMA don't 154 // Stale enum values left around os that values passed to UMA don't
158 // change. 155 // change.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 188
192 // Increment one of the above counts. 189 // Increment one of the above counts.
193 void RecordDownloadCount(ChromeDownloadCountTypes type); 190 void RecordDownloadCount(ChromeDownloadCountTypes type);
194 191
195 // Record initiation of a download from a specific source. 192 // Record initiation of a download from a specific source.
196 void RecordDownloadSource(ChromeDownloadSource source); 193 void RecordDownloadSource(ChromeDownloadSource source);
197 194
198 } // namespace download_util 195 } // namespace download_util
199 196
200 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 197 #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