Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1134)

Unified Diff: chrome/browser/ui/webui/offline_internals_ui.cc

Issue 2209993002: Remove the GetStatus() call from SavePageRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo the fix for closure since we put status back. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/offline_pages/background/save_page_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/offline_internals_ui.cc
diff --git a/chrome/browser/ui/webui/offline_internals_ui.cc b/chrome/browser/ui/webui/offline_internals_ui.cc
index 5ba90f013fcb7401e320b15727ee1fa995b7e107..08c49c4420b82efe1dfb2f57ccfc46cc09f9b6d7 100644
--- a/chrome/browser/ui/webui/offline_internals_ui.cc
+++ b/chrome/browser/ui/webui/offline_internals_ui.cc
@@ -92,8 +92,7 @@ class OfflineInternalsUIMessageHandler : public content::WebUIMessageHandler {
offline_pages::DeletePageResult value);
// Turns a SavePageRequest::Status into logical string.
- std::string GetStringFromSavePageStatus(
- offline_pages::SavePageRequest::Status status);
+ std::string GetStringFromSavePageStatus();
// Offline page model to call methods on.
offline_pages::OfflinePageModel* offline_page_model_;
@@ -134,22 +133,8 @@ std::string OfflineInternalsUIMessageHandler::GetStringFromDeletePageResult(
return "Unknown";
}
-std::string OfflineInternalsUIMessageHandler::GetStringFromSavePageStatus(
- offline_pages::SavePageRequest::Status status) {
- switch (status) {
- case offline_pages::SavePageRequest::Status::NOT_READY:
- return "Not ready";
- case offline_pages::SavePageRequest::Status::PENDING:
- return "Pending";
- case offline_pages::SavePageRequest::Status::STARTED:
- return "Started";
- case offline_pages::SavePageRequest::Status::FAILED:
- return "Failed";
- case offline_pages::SavePageRequest::Status::EXPIRED:
- return "Expired";
- }
- NOTREACHED();
- return "Unknown";
+std::string OfflineInternalsUIMessageHandler::GetStringFromSavePageStatus() {
+ return "Available";
}
void OfflineInternalsUIMessageHandler::HandleDeleteAllPages(
@@ -231,7 +216,7 @@ void OfflineInternalsUIMessageHandler::HandleRequestQueueCallback(
request.creation_time().ToJsTime());
save_page_request->SetString(
"status",
- GetStringFromSavePageStatus(request.GetStatus(base::Time::Now())));
+ GetStringFromSavePageStatus());
save_page_request->SetString("namespace", request.client_id().name_space);
save_page_request->SetDouble("lastAttempt",
request.last_attempt_time().ToJsTime());
« no previous file with comments | « no previous file | components/offline_pages/background/save_page_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698