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

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

Issue 23127002: Switch Google Now Background Toggle to use Experiment Variations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Finch
Patch Set: Created 7 years, 4 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 | chrome/browser/resources/google_now/background_unittest.gtestjs » ('j') | 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 fdeee8ca3b63bc48b0330017360cd6cc5836da9c..0c3882adebcb29c3f86663ec1bb13ea113c292fe 100644
--- a/chrome/browser/resources/google_now/background.js
+++ b/chrome/browser/resources/google_now/background.js
@@ -118,7 +118,6 @@ var tasks = buildTaskManager(areTasksConflicting);
// Add error processing to API calls.
tasks.instrumentChromeApiFunction('location.onLocationUpdate.addListener', 0);
-tasks.instrumentChromeApiFunction('metricsPrivate.getFieldTrial', 1);
tasks.instrumentChromeApiFunction('metricsPrivate.getVariationParams', 1);
tasks.instrumentChromeApiFunction('notifications.create', 2);
tasks.instrumentChromeApiFunction('notifications.update', 2);
@@ -868,11 +867,11 @@ function onStateChange() {
tasks.debugSetStepName('onStateChange-isSignedIn');
authenticationManager.isSignedIn(function(token) {
var signedIn = !!token && !!NOTIFICATION_CARDS_URL;
- instrumented.metricsPrivate.getFieldTrial(
+ instrumented.metricsPrivate.getVariationParams(
'GoogleNow',
function(response) {
- console.log('Experiment Status: ' + response);
- var enableBackground = (response != 'EnableWithoutBackground');
+ var enableBackground =
+ (response && (response.enableBackground != 'false'));
vadimt 2013/08/13 21:05:15 !response || response.enableBackground != 'false'.
robliao 2013/08/13 21:09:15 That's a bit more permissive than I was expecting.
vadimt 2013/08/13 21:17:10 Background is a "normal" behavior, and the absence
robliao 2013/08/13 21:30:32 Done.
tasks.debugSetStepName(
'onStateChange-get-googleGeolocationAccessEnabledPref');
instrumented.
« no previous file with comments | « no previous file | chrome/browser/resources/google_now/background_unittest.gtestjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698