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

Side by Side Diff: chrome/browser/resources/google_now/cards.js

Issue 416913002: Update Confusing Log Message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Show/hide trigger in a card. 8 * Show/hide trigger in a card.
9 * 9 *
10 * @typedef {{ 10 * @typedef {{
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Try updating the notification. 137 // Try updating the notification.
138 instrumented.notifications.update( 138 instrumented.notifications.update(
139 chromeNotificationId, 139 chromeNotificationId,
140 receivedNotification.chromeNotificationOptions, 140 receivedNotification.chromeNotificationOptions,
141 function(wasUpdated) { 141 function(wasUpdated) {
142 if (!wasUpdated) { 142 if (!wasUpdated) {
143 // If the notification wasn't updated, it probably didn't exist. 143 // If the notification wasn't updated, it probably didn't exist.
144 // Create it. 144 // Create it.
145 console.log( 145 console.log(
146 'cardManager.updateNotification ' + chromeNotificationId + 146 'cardManager.updateNotification ' + chromeNotificationId +
147 ' failed to update, creating'); 147 ' not updated, creating instead');
148 instrumented.notifications.create( 148 instrumented.notifications.create(
149 chromeNotificationId, 149 chromeNotificationId,
150 receivedNotification.chromeNotificationOptions, 150 receivedNotification.chromeNotificationOptions,
151 function(newChromeNotificationId) { 151 function(newChromeNotificationId) {
152 if (!newChromeNotificationId || chrome.runtime.lastError) { 152 if (!newChromeNotificationId || chrome.runtime.lastError) {
153 var errorMessage = chrome.runtime.lastError && 153 var errorMessage = chrome.runtime.lastError &&
154 chrome.runtime.lastError.message; 154 chrome.runtime.lastError.message;
155 console.error('notifications.create: ID=' + 155 console.error('notifications.create: ID=' +
156 newChromeNotificationId + ', ERROR=' + errorMessage); 156 newChromeNotificationId + ', ERROR=' + errorMessage);
157 return; 157 return;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 }); 378 });
379 }); 379 });
380 } 380 }
381 }); 381 });
382 382
383 return { 383 return {
384 update: update, 384 update: update,
385 onDismissal: onDismissal 385 onDismissal: onDismissal
386 }; 386 };
387 } 387 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698