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

Unified Diff: components/offline_pages/background/save_page_request.cc

Issue 2599593002: Fix for crbug.com/675863 - don't clobber PAUSE state. (Closed)
Patch Set: Add unit test back in. Created 4 years 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 | « components/offline_pages/background/save_page_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/save_page_request.cc
diff --git a/components/offline_pages/background/save_page_request.cc b/components/offline_pages/background/save_page_request.cc
index f17b7268f03bd0d4961da0fc79d4b29d4f9d7dbe..e1efccb2ff5ab7011d14ae21651d209f0137f796 100644
--- a/components/offline_pages/background/save_page_request.cc
+++ b/components/offline_pages/background/save_page_request.cc
@@ -83,7 +83,8 @@ void SavePageRequest::MarkAttemptAborted() {
// We intentinally do not increment the completed_attempt_count_, since this
// was killed before it completed, so we could use the phone or browser for
// other things.
- state_ = RequestState::AVAILABLE;
+ if (state_ == RequestState::OFFLINING)
+ state_ = RequestState::AVAILABLE;
}
void SavePageRequest::MarkAttemptPaused() {
« no previous file with comments | « components/offline_pages/background/save_page_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698