Chromium Code Reviews
DescriptionTranslate: infobars should not appear when a page has a refresh meta tag
If a page contains a <meta http-equiv="refresh" content="0;...">,
a client redirect is performed, but |page_id| is not modified.
On the other hand, CapturePageInfo is executed as a delayed function.
This function may handle a different page if user took an action to
navigate a page, or a page is navigated automatically by a script or
a client redirect. The page can be incomplete when this function runs.
There, |page_id| can be a hint to distinguish pages and abort functions.
But if the page is redirected by refresh meta tag, it is useless.
This change omit to call CapturePageInfo if a loaded page contains
refresh meta tag to avoid TranslateHelper is confused.
BUG=236781
TEST=none
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201645
Patch Set 1 #
Total comments: 3
Patch Set 2 : revised, but doesn't work #Patch Set 3 : refined #
Total comments: 1
Patch Set 4 : navigation safe (better one?) #Patch Set 5 : (rebase) #
Total comments: 1
Patch Set 6 : make HasRefreshMetaTag() non-static function #
Total comments: 1
Patch Set 7 : add a browser test #Patch Set 8 : inject refresh at onload #Patch Set 9 : more tests to update location #
Total comments: 2
Patch Set 10 : (rebase) #Patch Set 11 : rebase fix #Messages
Total messages: 19 (0 generated)
|