OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 class GURL; | 10 class GURL; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Returns true if the url request of |fetcher| was succesful. | 46 // Returns true if the url request of |fetcher| was succesful. |
47 bool FetchSuccess(const net::URLFetcher& fetcher); | 47 bool FetchSuccess(const net::URLFetcher& fetcher); |
48 | 48 |
49 // Returns the error code which occured during the fetch. The function returns 0 | 49 // Returns the error code which occured during the fetch. The function returns 0 |
50 // if the fetch was successful. If errors happen, the function could return a | 50 // if the fetch was successful. If errors happen, the function could return a |
51 // network error, an http response code, or the status of the fetch, if the | 51 // network error, an http response code, or the status of the fetch, if the |
52 // fetch is pending or canceled. | 52 // fetch is pending or canceled. |
53 int GetFetchError(const net::URLFetcher& fetcher); | 53 int GetFetchError(const net::URLFetcher& fetcher); |
54 | 54 |
| 55 // Returns true if the |status_code| represents a server error 5xx. |
| 56 bool IsHttpServerError(int status_code); |
| 57 |
55 } // namespace component_updater | 58 } // namespace component_updater |
56 | 59 |
57 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ | 60 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_ |
58 | 61 |
OLD | NEW |