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

Side by Side Diff: chrome/browser/resources/md_history/browser_service.js

Issue 2355233002: Revert "MD History: promote menu button to show clear browsing data in narrow mode" (Closed)
Patch Set: 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
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 * @fileoverview Defines a singleton object, md_history.BrowserService, which 6 * @fileoverview Defines a singleton object, md_history.BrowserService, which
7 * provides access to chrome.send APIs. 7 * provides access to chrome.send APIs.
8 */ 8 */
9 9
10 cr.define('md_history', function() { 10 cr.define('md_history', function() {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 if (successful) 112 if (successful)
113 this.pendingDeletePromise_.resolve(this.pendingDeleteItems_); 113 this.pendingDeletePromise_.resolve(this.pendingDeleteItems_);
114 else 114 else
115 this.pendingDeletePromise_.reject(this.pendingDeleteItems_); 115 this.pendingDeletePromise_.reject(this.pendingDeleteItems_);
116 116
117 this.pendingDeleteItems_ = null; 117 this.pendingDeleteItems_ = null;
118 this.pendingDeletePromise_ = null; 118 this.pendingDeletePromise_ = null;
119 }, 119 },
120
121 menuPromoShown: function() {
122 chrome.send('menuPromoShown');
123 },
124 }; 120 };
125 121
126 cr.addSingletonGetter(BrowserService); 122 cr.addSingletonGetter(BrowserService);
127 123
128 return {BrowserService: BrowserService}; 124 return {BrowserService: BrowserService};
129 }); 125 });
130 126
131 /** 127 /**
132 * Called by the history backend when deletion was succesful. 128 * Called by the history backend when deletion was succesful.
133 */ 129 */
134 function deleteComplete() { 130 function deleteComplete() {
135 md_history.BrowserService.getInstance().resolveDelete_(true); 131 md_history.BrowserService.getInstance().resolveDelete_(true);
136 } 132 }
137 133
138 /** 134 /**
139 * Called by the history backend when the deletion failed. 135 * Called by the history backend when the deletion failed.
140 */ 136 */
141 function deleteFailed() { 137 function deleteFailed() {
142 md_history.BrowserService.getInstance().resolveDelete_(false); 138 md_history.BrowserService.getInstance().resolveDelete_(false);
143 } 139 }
144 140
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.vulcanized.html ('k') | chrome/browser/resources/md_history/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698