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

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

Issue 9316116: Isolate initiation counts for downloads to their own histograms and improve (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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) 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Check whether we can do the saving page operation for the specified URL. 166 // Check whether we can do the saving page operation for the specified URL.
167 bool IsSavableURL(const GURL& url); 167 bool IsSavableURL(const GURL& url);
168 168
169 // Record the total number of items and the number of in-progress items showing 169 // Record the total number of items and the number of in-progress items showing
170 // in the shelf when it closes. Set |autoclose| to true when the shelf is 170 // in the shelf when it closes. Set |autoclose| to true when the shelf is
171 // closing itself, false when the user explicitly closed it. 171 // closing itself, false when the user explicitly closed it.
172 void RecordShelfClose(int size, int in_progress, bool autoclose); 172 void RecordShelfClose(int size, int in_progress, bool autoclose);
173 173
174 // Used for counting UMA stats. Similar to content's 174 // Used for counting UMA stats. Similar to content's
175 // download_stats::DownloadCountTypes but from the chrome layer. 175 // download_stats::DownloadCountTypes but from the chrome layer.
176 enum ChromeDownloadCountTypes { 176 enum ChromeDownloadInitiationSources {
177 // The download was initiated by navigating to a URL (e.g. by user click). 177 // The download was initiated by navigating to a URL (e.g. by user click).
178 INITIATED_BY_NAVIGATION_COUNT = 0, 178 INITIATED_BY_NAVIGATION = 0,
179 179
180 // The download was initiated by invoking a context menu within a page. 180 // The download was initiated by invoking a context menu within a page.
181 INITIATED_BY_CONTEXT_MENU_COUNT, 181 INITIATED_BY_CONTEXT_MENU,
182 182
183 // The download was initiated by the WebStore installer. 183 // The download was initiated by the WebStore installer.
184 INITIATED_BY_WEBSTORE_INSTALLER_COUNT, 184 INITIATED_BY_WEBSTORE_INSTALLER,
185 185
186 // The download was initiated by the ImageBurner (cros). 186 // The download was initiated by the ImageBurner (cros).
187 INITIATED_BY_IMAGE_BURNER_COUNT, 187 INITIATED_BY_IMAGE_BURNER,
188 188
189 DOWNLOAD_COUNT_TYPES_LAST_ENTRY, 189 DOWNLOAD_INITIATION_SOURCES_LAST_ENTRY,
190 }; 190 };
191 191
192 void RecordDownloadCount(ChromeDownloadCountTypes type); 192 void RecordDownloadSource(ChromeDownloadInitiationSources source);
193 193
194 } // namespace download_util 194 } // namespace download_util
195 195
196 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_ 196 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698