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

Unified Diff: chrome/browser/resources/google_now/background.js

Issue 20693004: Basic State Machine Logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Linebreak Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/background.js
diff --git a/chrome/browser/resources/google_now/background.js b/chrome/browser/resources/google_now/background.js
index e7a94a5f315935654bcdcf579cb37eac3fac053e..aa68162313ed48f53b2c64666c6a21d938af991c 100644
--- a/chrome/browser/resources/google_now/background.js
+++ b/chrome/browser/resources/google_now/background.js
@@ -704,6 +704,7 @@ function setShouldPollCards(shouldPollCardsRequest, onSuccess) {
'setShouldRun-shouldRun-updateCardsAttemptsIsRunning');
updateCardsAttempts.isRunning(function(currentValue) {
if (shouldPollCardsRequest != currentValue) {
+ console.log('Action Taken setShouldPollCards=' + shouldPollCardsRequest);
if (shouldPollCardsRequest)
startPollingCards();
else
@@ -728,6 +729,7 @@ function setToastVisible(visibleRequest, onSuccess) {
notifications = notifications || {};
if (visibleRequest != !!notifications[WELCOME_TOAST_NOTIFICATION_ID]) {
+ console.log('Action Taken setToastVisible=' + visibleRequest);
if (visibleRequest)
showWelcomeToast();
else
@@ -754,6 +756,11 @@ function updateRunningState(
userRespondedToToast,
callback) {
+ console.log(
+ 'State Update signedIn=' + signedIn + ' ' +
+ 'geolocationEnabled=' + geolocationEnabled + ' ' +
+ 'userRespondedToToast=' + userRespondedToToast);
+
var shouldSetToastVisible = false;
var shouldPollCards = false;
@@ -778,6 +785,10 @@ function updateRunningState(
recordEvent(GoogleNowEvent.STOPPED);
}
+ console.log(
+ 'Requested Actions setToastVisible=' + shouldSetToastVisible + ' ' +
+ 'setShouldPollCards=' + shouldPollCards);
+
setToastVisible(shouldSetToastVisible, function() {
setShouldPollCards(shouldPollCards, callback);
});
« 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