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

Side by Side Diff: components/offline_pages/core/background/offliner.h

Issue 2883413002: [Offline pages] Reporting completed attempt when Chrome is killed (Closed)
Patch Set: Udpating the histogram enum definition: Created 3 years, 7 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 | « no previous file | components/offline_pages/core/background/request_coordinator.cc » ('j') | 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_CORE_BACKGROUND_OFFLINER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // The RequestCoordinator tried to start loading the request but the 50 // The RequestCoordinator tried to start loading the request but the
51 // loading request was not accepted. 51 // loading request was not accepted.
52 LOADING_NOT_ACCEPTED = 12, 52 LOADING_NOT_ACCEPTED = 12,
53 // The RequestCoordinator did not start loading the request because 53 // The RequestCoordinator did not start loading the request because
54 // updating the status in the request queue failed. 54 // updating the status in the request queue failed.
55 QUEUE_UPDATE_FAILED = 13, 55 QUEUE_UPDATE_FAILED = 13,
56 // Scheduler canceled processing of requests. 56 // Scheduler canceled processing of requests.
57 BACKGROUND_SCHEDULER_CANCELED = 14, 57 BACKGROUND_SCHEDULER_CANCELED = 14,
58 // We saved a snapshot on the last retry, after timeout. 58 // We saved a snapshot on the last retry, after timeout.
59 SAVED_ON_LAST_RETRY = 15, 59 SAVED_ON_LAST_RETRY = 15,
60 // Indicates that attempt failed due to browser being killed.
61 // There are 3 ways that might happen:
62 // * System was running out of memory, while browser was running in the
63 // background.
64 // * User swiped away the browser as it was offlining content.
65 // * Offliner crashed.
66 // We detect the situation in ReconcileTask after starting
67 // RequestCoordinator.
68 BROWSER_KILLED = 16,
60 // NOTE: insert new values above this line and update histogram enum too. 69 // NOTE: insert new values above this line and update histogram enum too.
61 STATUS_COUNT 70 STATUS_COUNT
62 }; 71 };
63 72
64 // Reports the load progress of a request. 73 // Reports the load progress of a request.
65 typedef base::Callback<void(const SavePageRequest&, int64_t received_bytes)> 74 typedef base::Callback<void(const SavePageRequest&, int64_t received_bytes)>
66 ProgressCallback; 75 ProgressCallback;
67 // Reports the completion status of a request. 76 // Reports the completion status of a request.
68 typedef base::Callback<void(const SavePageRequest&, RequestStatus)> 77 typedef base::Callback<void(const SavePageRequest&, RequestStatus)>
69 CompletionCallback; 78 CompletionCallback;
(...skipping 22 matching lines...) Expand all
92 // snapshot of the current webcontents. If that is the case, the result of 101 // snapshot of the current webcontents. If that is the case, the result of
93 // offlining will be provided by |completion_callback|. 102 // offlining will be provided by |completion_callback|.
94 virtual bool HandleTimeout(int64_t request_id) = 0; 103 virtual bool HandleTimeout(int64_t request_id) = 0;
95 104
96 // TODO(dougarnett): add policy support methods. 105 // TODO(dougarnett): add policy support methods.
97 }; 106 };
98 107
99 } // namespace offline_pages 108 } // namespace offline_pages
100 109
101 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_ 110 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/core/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698