OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_NTP_SNIPPETS_REMOTE_JSON_REQUEST_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_JSON_REQUEST_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_JSON_REQUEST_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_JSON_REQUEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 24 matching lines...) Expand all Loading... | |
35 // histograms, so do not change existing values. Insert new values at the end, | 35 // histograms, so do not change existing values. Insert new values at the end, |
36 // and update the histogram definition. | 36 // and update the histogram definition. |
37 enum class FetchResult { | 37 enum class FetchResult { |
38 SUCCESS, | 38 SUCCESS, |
39 DEPRECATED_EMPTY_HOSTS, | 39 DEPRECATED_EMPTY_HOSTS, |
40 URL_REQUEST_STATUS_ERROR, | 40 URL_REQUEST_STATUS_ERROR, |
41 HTTP_ERROR, | 41 HTTP_ERROR, |
42 JSON_PARSE_ERROR, | 42 JSON_PARSE_ERROR, |
43 INVALID_SNIPPET_CONTENT_ERROR, | 43 INVALID_SNIPPET_CONTENT_ERROR, |
44 OAUTH_TOKEN_ERROR, | 44 OAUTH_TOKEN_ERROR, |
45 INTERACTIVE_QUOTA_ERROR, | 45 INTERACTIVE_QUOTA_ERROR_OBSOLETE, |
tschumann
2017/02/24 10:18:08
If it's nothing widely adopted, I'd prefer prefixi
Marc Treib
2017/02/24 15:50:35
+1 to making a prefix. In fact, why not use "DEPRE
tschumann
2017/02/25 17:02:20
The numbers have the advantage that it's much easi
Marc Treib
2017/02/27 09:18:43
The MAX is there for the UMA macros, they need a "
jkrcal
2017/02/27 10:26:23
Added numeric values which allowed removing the de
| |
46 NON_INTERACTIVE_QUOTA_ERROR, | 46 NON_INTERACTIVE_QUOTA_ERROR_OBSOLETE, |
47 RESULT_MAX | 47 RESULT_MAX |
48 }; | 48 }; |
49 | 49 |
50 enum FetchAPI { | 50 enum FetchAPI { |
51 CHROME_READER_API, | 51 CHROME_READER_API, |
52 CHROME_CONTENT_SUGGESTIONS_API, | 52 CHROME_CONTENT_SUGGESTIONS_API, |
53 }; | 53 }; |
54 | 54 |
55 // A single request to query remote suggestions. On success, the suggestions are | 55 // A single request to query remote suggestions. On success, the suggestions are |
56 // returned in parsed JSON form (base::Value). | 56 // returned in parsed JSON form (base::Value). |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 base::WeakPtrFactory<JsonRequest> weak_ptr_factory_; | 177 base::WeakPtrFactory<JsonRequest> weak_ptr_factory_; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(JsonRequest); | 179 DISALLOW_COPY_AND_ASSIGN(JsonRequest); |
180 }; | 180 }; |
181 | 181 |
182 } // namespace internal | 182 } // namespace internal |
183 | 183 |
184 } // namespace ntp_snippets | 184 } // namespace ntp_snippets |
185 | 185 |
186 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_JSON_REQUEST_H_ | 186 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_JSON_REQUEST_H_ |
OLD | NEW |