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

Unified Diff: chrome/browser/ui/webui/sync_setup_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_setup_handler.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_setup_handler.cc
===================================================================
--- chrome/browser/ui/webui/sync_setup_handler.cc (revision 111699)
+++ chrome/browser/ui/webui/sync_setup_handler.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/browser/sync/sync_setup_flow.h"
#include "chrome/browser/sync/util/oauth.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/net/gaia/gaia_constants.h"
#include "chrome/common/pref_names.h"
@@ -257,11 +258,12 @@
}
void SyncSetupHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
- GetStaticLocalizedValues(localized_strings);
+ GetStaticLocalizedValues(localized_strings, web_ui_);
}
void SyncSetupHandler::GetStaticLocalizedValues(
- DictionaryValue* localized_strings) {
+ DictionaryValue* localized_strings,
+ WebUI* web_ui) {
DCHECK(localized_strings);
localized_strings->SetString(
@@ -303,6 +305,17 @@
GetStringFUTF16(IDS_SYNC_PROMO_MESSAGE_TITLE,
GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
+ // The experimental body string only appears if we are on the launch page
+ // version of the Sync Promo.
+ int message_body_resource_id = IDS_SYNC_PROMO_MESSAGE_BODY_A;
+ if (web_ui && SyncPromoUI::GetIsLaunchPageForSyncPromoURL(
+ web_ui->tab_contents()->GetURL())) {
+ message_body_resource_id = sync_promo_trial::GetMessageBodyResID();
+ }
+ localized_strings->SetString(
+ "promoMessageBody",
+ GetStringUTF16(message_body_resource_id));
+
std::string create_account_url =
google_util::StringAppendGoogleLocaleParam(kCreateNewAccountUrl);
string16 create_account = GetStringUTF16(IDS_SYNC_CREATE_ACCOUNT);
@@ -383,7 +396,6 @@
{ "encryptAllOption", IDS_SYNC_ENCRYPT_ALL_DATA },
{ "aspWarningText", IDS_SYNC_ASP_PASSWORD_WARNING_TEXT },
{ "promoPageTitle", IDS_SYNC_PROMO_TAB_TITLE},
- { "promoMessageBody", IDS_SYNC_PROMO_MESSAGE_BODY},
{ "promoSkipButton", IDS_SYNC_PROMO_SKIP_BUTTON},
{ "promoAdvanced", IDS_SYNC_PROMO_ADVANCED},
{ "promoLearnMoreShow", IDS_SYNC_PROMO_LEARN_MORE_SHOW},
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698