| Index: chrome/browser/browser.cc
|
| ===================================================================
|
| --- chrome/browser/browser.cc (revision 6194)
|
| +++ chrome/browser/browser.cc (working copy)
|
| @@ -581,12 +581,25 @@
|
|
|
| // If we are showing an interstitial, treat this as an OpenURL.
|
| TabContents* current_tab = GetSelectedTabContents();
|
| + std::wstring current_url;
|
| + LocationBarView* lbv = GetLocationBarView();
|
| + AutocompleteEditView* aev = NULL;
|
| +
|
| + if ((lbv)&&(current_tab->ShouldDisplayURL())) {
|
| + aev = lbv->location_entry();
|
| + current_url = UTF8ToWide(current_tab->GetURL().spec());
|
| + }
|
| +
|
| if (current_tab) {
|
| WebContents* web_contents = current_tab->AsWebContents();
|
| if (web_contents && web_contents->showing_interstitial_page()) {
|
| NavigationEntry* entry = current_tab->controller()->GetActiveEntry();
|
| DCHECK(entry); // Should exist if interstitial is showing.
|
| OpenURL(entry->url(), GURL(), CURRENT_TAB, PageTransition::RELOAD);
|
| +
|
| + if (aev) {
|
| + aev->SetWindowTextAndCaretPos(current_url, current_url.length() - 1);
|
| + }
|
| return;
|
| }
|
| }
|
| @@ -595,6 +608,10 @@
|
| // As this is caused by a user action, give the focus to the page.
|
| current_tab->Focus();
|
| current_tab->controller()->Reload(true);
|
| +
|
| + if (aev) {
|
| + aev->SetWindowTextAndCaretPos(current_url, current_url.length() - 1);
|
| + }
|
| }
|
| }
|
|
|
| @@ -2355,4 +2372,4 @@
|
| DCHECK(prefs);
|
|
|
| prefs->RegisterDictionaryPref(window_pref.c_str());
|
| -}
|
| +}
|
|
|