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

Side by Side Diff: chrome/browser/resources/offline_pages/offline_internals_browser_proxy.js

Issue 2342603004: [Offline pages] Clean up unnecessary DeleteAll calls in offline internals (Closed)
Patch Set: Created 4 years, 3 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
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 /** 5 /**
6 * @typedef {{ 6 * @typedef {{
7 * onlineUrl: string, 7 * onlineUrl: string,
8 * creationTime: number, 8 * creationTime: number,
9 * id: string, 9 * id: string,
10 * namespace: string, 10 * namespace: string,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 getStoredPages: function() {}, 50 getStoredPages: function() {},
51 51
52 /** 52 /**
53 * Gets current offline queue requests. 53 * Gets current offline queue requests.
54 * @return {!Promise<!Array<SavePageRequest>>} A promise firing when the 54 * @return {!Promise<!Array<SavePageRequest>>} A promise firing when the
55 * request queue is fetched. 55 * request queue is fetched.
56 */ 56 */
57 getRequestQueue: function() {}, 57 getRequestQueue: function() {},
58 58
59 /** 59 /**
60 * Deletes all the pages in stored pages.
61 * @return {!Promise<!string>} A promise firing when the pages are deleted.
62 */
63 deleteAllPages: function() {},
64
65 /**
66 * Deletes a set of pages from stored pages 60 * Deletes a set of pages from stored pages
67 * @param {!Array<string>} ids A list of page IDs to delete. 61 * @param {!Array<string>} ids A list of page IDs to delete.
68 * @return {!Promise<!string>} A promise firing when the selected 62 * @return {!Promise<!string>} A promise firing when the selected
69 * pages are deleted. 63 * pages are deleted.
70 */ 64 */
71 deleteSelectedPages: function(ids) {}, 65 deleteSelectedPages: function(ids) {},
72 66
73 /** 67 /**
74 * Deletes all the requests from the request queue.
75 * @return {!Promise<!string>} A promise firing when the pages are deleted.
76 */
77 deleteAllRequests: function() {},
78
79 /**
80 * Deletes a set of requests from the request queue 68 * Deletes a set of requests from the request queue
81 * @param {!Array<string>} ids A list of request IDs to delete. 69 * @param {!Array<string>} ids A list of request IDs to delete.
82 * @return {!Promise<!string>} A promise firing when the selected 70 * @return {!Promise<!string>} A promise firing when the selected
83 * pages are deleted. 71 * pages are deleted.
84 */ 72 */
85 deleteSelectedRequests: function(ids) {}, 73 deleteSelectedRequests: function(ids) {},
86 74
87 /** 75 /**
88 * Sets whether to record logs for stored pages. 76 * Sets whether to record logs for stored pages.
89 * @param {boolean} shouldLog True if logging should be enabled. 77 * @param {boolean} shouldLog True if logging should be enabled.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 getStoredPages: function() { 126 getStoredPages: function() {
139 return cr.sendWithPromise('getStoredPages'); 127 return cr.sendWithPromise('getStoredPages');
140 }, 128 },
141 129
142 /** @override */ 130 /** @override */
143 getRequestQueue: function() { 131 getRequestQueue: function() {
144 return cr.sendWithPromise('getRequestQueue'); 132 return cr.sendWithPromise('getRequestQueue');
145 }, 133 },
146 134
147 /** @override */ 135 /** @override */
148 deleteAllPages: function() {
149 return cr.sendWithPromise('deleteAllPages');
150 },
151
152 /** @override */
153 deleteSelectedPages: function(ids) { 136 deleteSelectedPages: function(ids) {
154 return cr.sendWithPromise('deleteSelectedPages', ids); 137 return cr.sendWithPromise('deleteSelectedPages', ids);
155 }, 138 },
156 139
157 /** @override */ 140 /** @override */
158 deleteAllRequests: function() {
159 return cr.sendWithPromise('deleteAllRequests');
160 },
161
162 /** @override */
163 deleteSelectedRequests: function(ids) { 141 deleteSelectedRequests: function(ids) {
164 return cr.sendWithPromise('deleteSelectedRequests', ids); 142 return cr.sendWithPromise('deleteSelectedRequests', ids);
165 }, 143 },
166 144
167 /** @override */ 145 /** @override */
168 setRecordPageModel: function(shouldLog) { 146 setRecordPageModel: function(shouldLog) {
169 chrome.send('setRecordPageModel', [shouldLog]); 147 chrome.send('setRecordPageModel', [shouldLog]);
170 }, 148 },
171 149
172 /** @override */ 150 /** @override */
(...skipping 20 matching lines...) Expand all
193 getNetworkStatus: function() { 171 getNetworkStatus: function() {
194 return cr.sendWithPromise('getNetworkStatus'); 172 return cr.sendWithPromise('getNetworkStatus');
195 }, 173 },
196 }; 174 };
197 175
198 return { 176 return {
199 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy, 177 OfflineInternalsBrowserProxy: OfflineInternalsBrowserProxy,
200 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl 178 OfflineInternalsBrowserProxyImpl: OfflineInternalsBrowserProxyImpl
201 }; 179 };
202 }); 180 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698