| Index: chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
|
| diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
|
| index 1fceceb53eea3634f442feb09c13a82772852741..eb983dc26d78fff1761fada8ddc78dfdebe74c38 100644
|
| --- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
|
| +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
|
| @@ -200,11 +200,18 @@ void SyncPromoHandler::HandleCloseSyncPromo(const base::ListValue* args) {
|
| if (!username.empty())
|
| prefs_->SetBoolean(prefs::kSyncPromoShowNTPBubble, true);
|
|
|
| - GURL url = SyncPromoUI::GetNextPageURLForSyncPromoURL(
|
| - web_ui()->GetWebContents()->GetURL());
|
| - OpenURLParams params(
|
| - url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, false);
|
| - web_ui()->GetWebContents()->OpenURL(params);
|
| + // If the browser window is being closed then don't try to navigate to
|
| + // another URL. This prevents the browser window from flashing during
|
| + // close.
|
| + Browser* browser =
|
| + BrowserList::FindBrowserWithWebContents(web_ui()->GetWebContents());
|
| + if (browser && !browser->IsAttemptingToCloseBrowser()) {
|
| + GURL url = SyncPromoUI::GetNextPageURLForSyncPromoURL(
|
| + web_ui()->GetWebContents()->GetURL());
|
| + OpenURLParams params(
|
| + url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, false);
|
| + web_ui()->GetWebContents()->OpenURL(params);
|
| + }
|
| }
|
|
|
| void SyncPromoHandler::HandleInitializeSyncPromo(const base::ListValue* args) {
|
|
|