Chromium Code Reviews| Index: components/offline_pages/background/offliner.h |
| diff --git a/components/offline_pages/background/offliner.h b/components/offline_pages/background/offliner.h |
| index 8bc6468af55a0f51565c935886665af2bb3cb7a0..5e11afb6946fc10f832d86fddd7c9a9c111bddb9 100644 |
| --- a/components/offline_pages/background/offliner.h |
| +++ b/components/offline_pages/background/offliner.h |
| @@ -39,6 +39,20 @@ class Offliner { |
| STATUS_COUNT |
| }; |
| + static std::string RequestStatusToString(RequestStatus request_status) { |
| + switch (request_status) { |
| + case UNKNOWN: return "Unknown"; |
| + case LOADED: return "LOADED"; |
| + case SAVED: return "SAVED"; |
| + case REQUEST_COORDINATOR_CANCELED: return "REQUEST_COORDINATOR_CANCELED"; |
| + case PRERENDERING_CANCELED: return "PRERENDERING_CANCELED"; |
| + case PRERENDERING_FAILED: return "PRERENDERING_FAILED"; |
| + case SAVE_FAILED: return "SAVE_FAILED"; |
| + case FOREGROUND_CANCELED: return "FOREGROUND_CANCELED"; |
| + case STATUS_COUNT: return "STATUS_COUNT"; |
|
Pete Williamson
2016/08/03 20:44:55
SHould we really be returning a string for the cou
dougarnett
2016/08/03 21:40:01
update to DCHECK and empty string for non-Debug?
Pete Williamson
2016/08/03 22:29:12
sounds good
dougarnett
2016/08/03 23:33:51
Done.
|
| + } |
| + } |
| + |
| // Reports the completion status of a request. |
| // TODO(dougarnett): consider passing back a request id instead of request. |
| typedef base::Callback<void(const SavePageRequest&, RequestStatus)> |