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

Unified Diff: chrome/browser/ui/webui/sync_promo_handler.cc

Issue 8689006: Create a field test for sync sign in promo strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: small typo spotted by tmccoy Created 9 years, 1 month 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 | « chrome/browser/ui/webui/sync_promo_handler.h ('k') | chrome/browser/ui/webui/sync_promo_trial.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_promo_handler.cc
===================================================================
--- chrome/browser/ui/webui/sync_promo_handler.cc (revision 111699)
+++ chrome/browser/ui/webui/sync_promo_handler.cc (working copy)
@@ -15,6 +15,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/webui/sync_promo_trial.h"
#include "chrome/browser/ui/webui/sync_promo_ui.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -120,6 +121,20 @@
SyncSetupHandler::RegisterMessages();
}
+void SyncPromoHandler::ShowGaiaSuccessAndClose() {
+ if (sync_promo_trial::IsExperimentActive())
+ sync_promo_trial::RecordUserSignedIn();
+
+ SyncSetupHandler::ShowGaiaSuccessAndClose();
+}
+
+void SyncPromoHandler::ShowGaiaSuccessAndSettingUp() {
+ if (sync_promo_trial::IsExperimentActive())
+ sync_promo_trial::RecordUserSignedIn();
+
+ SyncSetupHandler::ShowGaiaSuccessAndSettingUp();
+}
+
void SyncPromoHandler::ShowConfigure(const base::DictionaryValue& args) {
bool usePassphrase = false;
args.GetBoolean("usePassphrase", &usePassphrase);
@@ -186,8 +201,13 @@
}
void SyncPromoHandler::HandleInitializeSyncPromo(const base::ListValue* args) {
- base::FundamentalValue visible(SyncPromoUI::GetShowTitleForSyncPromoURL(
- web_ui_->tab_contents()->GetURL()));
+ // If the promo is also the Chrome launch page, we want to show the title and
+ // log an event if we are running an experiment.
+ bool is_launch_page = SyncPromoUI::GetIsLaunchPageForSyncPromoURL(
+ web_ui_->tab_contents()->GetURL());
+ if (is_launch_page && sync_promo_trial::IsExperimentActive())
+ sync_promo_trial::RecordUserSawMessage();
+ base::FundamentalValue visible(is_launch_page);
web_ui_->CallJavascriptFunction("SyncSetupOverlay.setPromoTitleVisible",
visible);
« no previous file with comments | « chrome/browser/ui/webui/sync_promo_handler.h ('k') | chrome/browser/ui/webui/sync_promo_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698