| Index: chrome/browser/ui/webui/sync_promo/sync_promo_handler2.cc
|
| diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_handler2.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler2.cc
|
| index cabbfc83dc80477dbccda41bc48cc5f67ea71538..431e24d58d2a8d645238b4d000f8315804db7c84 100644
|
| --- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler2.cc
|
| +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler2.cc
|
| @@ -204,10 +204,17 @@ void SyncPromoHandler2::HandleCloseSyncPromo(const base::ListValue* args) {
|
| if (!username.empty())
|
| prefs_->SetBoolean(prefs::kSyncPromoShowNTPBubble, true);
|
|
|
| - GURL url = SyncPromoUI::GetNextPageURLForSyncPromoURL(
|
| - web_ui_->tab_contents()->GetURL());
|
| - web_ui_->tab_contents()->OpenURL(url, GURL(), CURRENT_TAB,
|
| - content::PAGE_TRANSITION_LINK);
|
| + // 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_->tab_contents()->GetURL());
|
| + web_ui_->tab_contents()->OpenURL(url, GURL(), CURRENT_TAB,
|
| + content::PAGE_TRANSITION_LINK);
|
| + }
|
| }
|
|
|
| void SyncPromoHandler2::HandleInitializeSyncPromo(const base::ListValue* args) {
|
|
|