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

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

Issue 2233493003: [Offline Pages] Remove expired requests from the queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing build. 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
Index: components/offline_pages/background/request_notifier.h
diff --git a/components/offline_pages/background/request_notifier.h b/components/offline_pages/background/request_notifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..dfdc76e1074f740be022592f4c0a24852fb28557
--- /dev/null
+++ b/components/offline_pages/background/request_notifier.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_
+#define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_
+
+namespace offline_pages {
+
+class SavePageRequest;
+
+class RequestNotifier {
+ public:
+ // Status to return for failed notifications.
+ // TODO(petewil): Can we find a better name for this enum?
+ enum class SavePageStatus {
+ SUCCESS,
+ PRERENDER_FAILURE,
+ FOREGROUND_CANCELED,
+ SAVE_FAILED,
+ EXPIRED,
+ RETRY_COUNT_EXCEEDED,
+ REMOVED,
+ };
+
+ // Notifies observers that |request| has been added.
+ virtual void NotifyAdded(const SavePageRequest& request) = 0;
+
+ // Notifies observers that |request| has been completed with |status|.
+ virtual void NotifyCompleted(const SavePageRequest& request,
+ SavePageStatus status) = 0;
+
+ // Notifies observers that |request| has been changed.
+ virtual void NotifyChanged(const SavePageRequest& request) = 0;
+};
+
+} // namespace offline_pages
+
+#endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | components/offline_pages/background/request_picker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698