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

Side by Side Diff: components/offline_pages/background/request_notifier.h

Issue 2378803003: [Offline Pages] Added OfflinePageEvaluationBridge for testing. (Closed)
Patch Set: Fixing build. Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « components/offline_pages/background/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_
7 7
8 namespace offline_pages { 8 namespace offline_pages {
9 9
10 class SavePageRequest; 10 class SavePageRequest;
11 11
12 class RequestNotifier { 12 class RequestNotifier {
13 public: 13 public:
14 // Status to return for failed notifications. 14 // Status to return for failed notifications.
15 // NOTE: for any changes to the enum, please also update related switch code 15 // NOTE: for any changes to the enum, please also update related switch code
16 // in RequestCoordinatorEventLogger. 16 // in RequestCoordinatorEventLogger.
17 // GENERATED_JAVA_ENUM_PACKAGE:org.chromium.components.offlinepages
17 enum class BackgroundSavePageResult { 18 enum class BackgroundSavePageResult {
18 SUCCESS, 19 SUCCESS,
19 PRERENDER_FAILURE, 20 PRERENDER_FAILURE,
20 PRERENDER_CANCELED, 21 PRERENDER_CANCELED,
21 FOREGROUND_CANCELED, 22 FOREGROUND_CANCELED,
22 SAVE_FAILED, 23 SAVE_FAILED,
23 EXPIRED, 24 EXPIRED,
24 RETRY_COUNT_EXCEEDED, 25 RETRY_COUNT_EXCEEDED,
25 START_COUNT_EXCEEDED, 26 START_COUNT_EXCEEDED,
26 REMOVED, 27 REMOVED,
27 }; 28 };
28 29
29 virtual ~RequestNotifier() = default; 30 virtual ~RequestNotifier() = default;
30 31
31 // Notifies observers that |request| has been added. 32 // Notifies observers that |request| has been added.
32 virtual void NotifyAdded(const SavePageRequest& request) = 0; 33 virtual void NotifyAdded(const SavePageRequest& request) = 0;
33 34
34 // Notifies observers that |request| has been completed with |status|. 35 // Notifies observers that |request| has been completed with |status|.
35 virtual void NotifyCompleted(const SavePageRequest& request, 36 virtual void NotifyCompleted(const SavePageRequest& request,
36 BackgroundSavePageResult status) = 0; 37 BackgroundSavePageResult status) = 0;
37 38
38 // Notifies observers that |request| has been changed. 39 // Notifies observers that |request| has been changed.
39 virtual void NotifyChanged(const SavePageRequest& request) = 0; 40 virtual void NotifyChanged(const SavePageRequest& request) = 0;
40 }; 41 };
41 42
42 } // namespace offline_pages 43 } // namespace offline_pages
43 44
44 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_ 45 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_NOTIFIER_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698