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

Unified Diff: components/offline_pages/background/request_coordinator.h

Issue 2249303002: Simplify Observer callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/request_coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/request_coordinator.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index f548563f03a0675d7d2aeaad973932ae6da89b41..253cebf139e3d35d018cb049b6b48a75a02a28ac 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -42,7 +42,7 @@ class RequestCoordinator : public KeyedService {
SAVE_FAILED,
EXPIRED,
RETRY_COUNT_EXCEEDED,
- REMOVED_BY_CLIENT,
+ REMOVED,
};
// Nested observer class. To make sure that no events are missed, the client
@@ -52,12 +52,9 @@ class RequestCoordinator : public KeyedService {
class Observer {
public:
virtual void OnAdded(const SavePageRequest& request) = 0;
- virtual void OnSucceeded(const SavePageRequest& request) = 0;
- virtual void OnFailed(const SavePageRequest& request,
- SavePageStatus status) = 0;
+ virtual void OnCompleted(const SavePageRequest& request,
+ SavePageStatus status) = 0;
virtual void OnChanged(const SavePageRequest& request) = 0;
- virtual void OnRemoved(const SavePageRequest& request,
- SavePageStatus status) = 0;
// TODO(petewil): Merge OnSucceeded, OnFailed, and OnRemoved into a single
fgorski 2016/08/16 22:13:25 remove todo
Pete Williamson 2016/08/16 23:08:52 Done.
// call.
};
@@ -192,10 +189,8 @@ class RequestCoordinator : public KeyedService {
void TryNextRequest();
void NotifyAdded(const SavePageRequest& request);
- void NotifySucceeded(const SavePageRequest& request);
- void NotifyFailed(const SavePageRequest& request, SavePageStatus status);
+ void NotifyCompleted(const SavePageRequest& request, SavePageStatus status);
void NotifyChanged(const SavePageRequest& request);
- void NotifyRemoved(const SavePageRequest& request);
// Returns the appropriate offliner to use, getting a new one from the factory
// if needed.
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698