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

Unified Diff: chrome/browser/ui/webui/sync_promo_ui.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: Init 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
Index: chrome/browser/ui/webui/sync_promo_ui.cc
===================================================================
--- chrome/browser/ui/webui/sync_promo_ui.cc (revision 111699)
+++ chrome/browser/ui/webui/sync_promo_ui.cc (working copy)
@@ -32,7 +32,7 @@
const char kStringsJsFile[] = "strings.js";
const char kSyncPromoJsFile[] = "sync_promo.js";
-const char kSyncPromoQueryKeyShowTitle[] = "show_title";
+const char kSyncPromoQueryKeyLaunchPage[] = "launch_page";
sail 2011/11/28 16:34:25 same, is launch page?
SteveT 2011/11/28 20:07:32 Done.
const char kSyncPromoQueryKeyNextPage[] = "next_page";
// The maximum number of times we want to show the sync promo at startup.
@@ -214,7 +214,7 @@
// static
GURL SyncPromoUI::GetSyncPromoURL(const GURL& next_page, bool show_title) {
std::stringstream stream;
- stream << chrome::kChromeUISyncPromoURL << "?" << kSyncPromoQueryKeyShowTitle
+ stream << chrome::kChromeUISyncPromoURL << "?" << kSyncPromoQueryKeyLaunchPage
<< "=" << (show_title ? "true" : "false");
if (!next_page.spec().empty()) {
@@ -229,9 +229,11 @@
}
// static
-bool SyncPromoUI::GetShowTitleForSyncPromoURL(const GURL& url) {
+bool SyncPromoUI::GetLaunchPageForSyncPromoURL(const GURL& url) {
std::string value;
- if (GetValueForKeyInQuery(url, kSyncPromoQueryKeyShowTitle, &value))
+ // Show the title if the promo is currently the Chrome launch page (and not
+ // the page accessed through the NTP).
+ if (GetValueForKeyInQuery(url, kSyncPromoQueryKeyLaunchPage, &value))
return value == "true";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698