Index: components/offline_pages/core/prefetch/get_operation_request.cc |
diff --git a/components/offline_pages/core/prefetch/get_operation_request.cc b/components/offline_pages/core/prefetch/get_operation_request.cc |
index 59865ffcd8c647026fba82468534e6180af2b465..77d2cd21873e03ed64f590eb89959b7278ebeb2f 100644 |
--- a/components/offline_pages/core/prefetch/get_operation_request.cc |
+++ b/components/offline_pages/core/prefetch/get_operation_request.cc |
@@ -15,7 +15,7 @@ |
namespace offline_pages { |
namespace { |
-const char kGetOperationURLPath[] = "v1/operations/"; |
+const char kGetOperationURLPath[] = "v1/"; |
} // namespace |
GetOperationRequest::GetOperationRequest( |
@@ -38,18 +38,19 @@ GetOperationRequest::~GetOperationRequest() {} |
void GetOperationRequest::OnCompleted(PrefetchRequestStatus status, |
const std::string& data) { |
if (status != PrefetchRequestStatus::SUCCESS) { |
- callback_.Run(status, std::vector<RenderPageInfo>()); |
+ callback_.Run(status, std::string(), std::vector<RenderPageInfo>()); |
return; |
} |
std::vector<RenderPageInfo> pages; |
- if (!ParseOperationResponse(data, &pages)) { |
+ std::string operation_name = ParseOperationResponse(data, &pages); |
+ if (operation_name.empty()) { |
callback_.Run(PrefetchRequestStatus::SHOULD_RETRY_WITH_BACKOFF, |
- std::vector<RenderPageInfo>()); |
+ std::string(), std::vector<RenderPageInfo>()); |
return; |
} |
- callback_.Run(PrefetchRequestStatus::SUCCESS, pages); |
+ callback_.Run(PrefetchRequestStatus::SUCCESS, operation_name, pages); |
} |
} // offline_pages |