OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef COMPONENTS_DOWNLOAD_PUBLIC_CLIENTS_H_ | 5 #ifndef COMPONENTS_DOWNLOAD_PUBLIC_CLIENTS_H_ |
6 #define COMPONENTS_DOWNLOAD_PUBLIC_CLIENTS_H_ | 6 #define COMPONENTS_DOWNLOAD_PUBLIC_CLIENTS_H_ |
7 | 7 |
8 namespace download { | 8 namespace download { |
9 | 9 |
10 // A list of all clients that are able to make download requests through the | 10 // A list of all clients that are able to make download requests through the |
11 // DownloadService. | 11 // DownloadService. |
12 // To add a new client, update the metric DownloadService.DownloadClients in | 12 // To add a new client, update the metric DownloadService.DownloadClients in |
13 // histograms.xml and make sure to keep this list in sync. Additions should be | 13 // histograms.xml and make sure to keep this list in sync. Additions should be |
14 // treated as APPEND ONLY to make sure to keep both UMA metric semantics correct | 14 // treated as APPEND ONLY to make sure to keep both UMA metric semantics correct |
15 // but also to make sure the underlying database properly associates each | 15 // but also to make sure the underlying database properly associates each |
16 // download with the right client. | 16 // download with the right client. |
17 enum class DownloadClient { | 17 enum class DownloadClient { |
18 // Represents an uninitialized DownloadClient variable. | 18 // Represents an uninitialized DownloadClient variable. |
19 DOWNLOAD_CLIENT_INVALID = 0, | 19 INVALID = 0, |
20 | 20 |
21 DOWNLOAD_CLIENT_OFFLINE_PAGE_PREFETCH = 1, | 21 // Test client values. Meant to be used by the testing framework and not |
22 // production code. Callers will be unable to access the DownloadService with | |
23 // these test APIs. | |
24 TEST_1 = 1, | |
25 TEST_2 = 2, | |
26 TEST_3 = 3, | |
xingliu
2017/05/09 06:11:41
optional nit: this is more like something in tests
David Trainor- moved to gerrit
2017/05/09 15:59:26
Me neither... I don't want to rely on a client alw
Peter Beverloo
2017/05/10 12:44:45
We'll have to reflect these in histograms.xml, so
David Trainor- moved to gerrit
2017/05/15 15:59:52
Good point r.e. UMA. I'll leave it at 1. If we e
| |
22 | 27 |
23 DOWNLOAD_CLIENT_BOUNDARY = 2, | 28 OFFLINE_PAGE_PREFETCH = 4, |
29 | |
30 BOUNDARY = 5, | |
24 }; | 31 }; |
25 | 32 |
26 } // namespace download | 33 } // namespace download |
27 | 34 |
28 #endif // COMPONENTS_DOWNLOAD_PUBLIC_CLIENTS_H_ | 35 #endif // COMPONENTS_DOWNLOAD_PUBLIC_CLIENTS_H_ |
OLD | NEW |