Chromium Code Reviews| Index: chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc |
| diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc |
| index 4c0920d235cedc0c7b9665202be3ad1614aaa0b5..5652239f461a19138054a0fbb36a040f05f07c1f 100644 |
| --- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc |
| +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc |
| @@ -96,6 +96,11 @@ content::WebUIDataSource* CreateSyncUIHTMLSource(content::WebUI* web_ui) { |
| } // namespace |
| +// Under the covers, we use a dummy chrome-extension to serve the purposes |
|
Charlie Reis
2013/03/06 00:14:54
nit: chrome-extension URL
(We don't have an actual
tim (not reviewing)
2013/03/06 01:04:08
Done.
|
| +// outlined in the .h file comment for this string. |
| +const char* SyncPromoUI::kChromeSigninEffectiveURL = |
| + "chrome-extension://acfccoigjajmmgbhpfbjnpckhjjegnih"; |
| + |
| SyncPromoUI::SyncPromoUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| SyncPromoHandler* handler = new SyncPromoHandler( |
| g_browser_process->profile_manager()); |
| @@ -259,6 +264,18 @@ GURL SyncPromoUI::GetSyncPromoURL(const GURL& next_page, |
| } |
| // static |
| +bool SyncPromoUI::IsWebBasedSigninFlowURL(const GURL& url) { |
| + if (url == GURL(kChromeSigninEffectiveURL)) |
|
Charlie Reis
2013/03/06 00:14:54
You should check the scheme and host.
tim (not reviewing)
2013/03/06 01:04:08
Done.
|
| + return true; |
| + |
| + GURL service_login(GaiaUrls::GetInstance()->service_login_url()); |
| + if (url.GetOrigin() != service_login.GetOrigin()) |
| + return false; |
| + |
| + return url.path() == service_login.path(); |
| +} |
| + |
| +// static |
| GURL SyncPromoUI::GetNextPageURLForSyncPromoURL(const GURL& url) { |
| const char* key_name = UseWebBasedSigninFlow() ? kSyncPromoQueryKeyContinue : |
| kSyncPromoQueryKeyNextPage; |