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

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

Issue 2598573003: Fix for crbug.com/675863 - don't clobber PAUSE state. (Closed)
Patch Set: CR feedback per DewittJ and DougArnett 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/core/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/core/background/save_page_request.cc
diff --git a/components/offline_pages/core/background/save_page_request.cc b/components/offline_pages/core/background/save_page_request.cc
index 6e3b36ab52ebca1d4b04ffe3d4d282f8ce3ff28b..02019dec5238914ed3bc00383b5476d2a2ab109b 100644
--- a/components/offline_pages/core/background/save_page_request.cc
+++ b/components/offline_pages/core/background/save_page_request.cc
@@ -82,7 +82,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/core/background/save_page_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698