Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Issue 14769004: Translate: infobars should not appear when a page has a refresh meta tag (Closed)

Created:
7 years, 7 months ago by Takashi Toyoshima
Modified:
7 years, 7 months ago
CC:
chromium-reviews, MAD, Miguel Garcia
Visibility:
Public.

Description

Translate: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+248 lines, -44 lines) Patch
M chrome/browser/translate/translate_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +127 lines, -2 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +68 lines, -23 lines 0 comments Download
A + chrome/test/data/translate/refresh_meta_tag.html View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/test/data/translate/refresh_meta_tag_at_onload.html View 1 2 3 4 5 6 7 1 chunk +23 lines, -0 lines 0 comments Download
A + chrome/test/data/translate/refresh_meta_tag_next.html View 1 2 3 4 5 6 1 chunk +3 lines, -5 lines 0 comments Download
A + chrome/test/data/translate/update_location.html View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -2 lines 0 comments Download
A + chrome/test/data/translate/update_location_at_onload.html View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -3 lines 0 comments Download
A + chrome/test/data/translate/update_location_next.html View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Takashi Toyoshima
(CCed to mad and miguelg as developers on Chrome Translate) Hi sky, Can you take ...
7 years, 7 months ago (2013-05-01 12:17:18 UTC) #1
sky
I'm not a good OWNER here. Maybe John is?
7 years, 7 months ago (2013-05-01 16:14:04 UTC) #2
jam
On 2013/05/01 16:14:04, sky wrote: > I'm not a good OWNER here. Maybe John is? ...
7 years, 7 months ago (2013-05-01 19:35:22 UTC) #3
Takashi Toyoshima
+jochen, brettw I'm finding a proper OWNERS reviewer for chrome/renderer/chrome_render_view_observer. Can one of you guys ...
7 years, 7 months ago (2013-05-02 01:38:38 UTC) #4
jochen (gone - plz use gerrit)
https://codereview.chromium.org/14769004/diff/1/chrome/renderer/chrome_render_view_observer.cc File chrome/renderer/chrome_render_view_observer.cc (left): https://codereview.chromium.org/14769004/diff/1/chrome/renderer/chrome_render_view_observer.cc#oldcode674 chrome/renderer/chrome_render_view_observer.cc:674: int page_id = render_view()->GetPageId(); what's the reason to not ...
7 years, 7 months ago (2013-05-02 09:48:42 UTC) #5
Takashi Toyoshima
https://codereview.chromium.org/14769004/diff/1/chrome/renderer/chrome_render_view_observer.cc File chrome/renderer/chrome_render_view_observer.cc (left): https://codereview.chromium.org/14769004/diff/1/chrome/renderer/chrome_render_view_observer.cc#oldcode674 chrome/renderer/chrome_render_view_observer.cc:674: int page_id = render_view()->GetPageId(); Thanks. You are right. I ...
7 years, 7 months ago (2013-05-02 11:51:18 UTC) #6
Takashi Toyoshima
https://codereview.chromium.org/14769004/diff/1/chrome/renderer/chrome_render_view_observer.cc File chrome/renderer/chrome_render_view_observer.cc (left): https://codereview.chromium.org/14769004/diff/1/chrome/renderer/chrome_render_view_observer.cc#oldcode674 chrome/renderer/chrome_render_view_observer.cc:674: int page_id = render_view()->GetPageId(); In the case of client ...
7 years, 7 months ago (2013-05-02 12:13:57 UTC) #7
Takashi Toyoshima
jochen, I upload Patch Set 3. This is based on the first patch, but I ...
7 years, 7 months ago (2013-05-02 12:50:07 UTC) #8
jochen (gone - plz use gerrit)
can you write a test for this? What happens if the meta tag is inserted ...
7 years, 7 months ago (2013-05-02 14:00:31 UTC) #9
Takashi Toyoshima
> can you write a test for this? Ok, I'll try... but time looks running ...
7 years, 7 months ago (2013-05-02 14:48:13 UTC) #10
jochen (gone - plz use gerrit)
On 2013/05/02 14:48:13, Takashi Toyoshima (chromium) wrote: > > can you write a test for ...
7 years, 7 months ago (2013-05-02 15:10:47 UTC) #11
Takashi Toyoshima
Sorry, I didn't mean that I don't want to write a test, or must land ...
7 years, 7 months ago (2013-05-02 16:18:52 UTC) #12
jochen (gone - plz use gerrit)
On 2013/05/02 16:18:52, Takashi Toyoshima (chromium) wrote: > Sorry, I didn't mean that I don't ...
7 years, 7 months ago (2013-05-03 11:24:48 UTC) #13
Takashi Toyoshima
Hi, I added some browser tests. 1. a page having http-equiv=refresh meta tag 2. a ...
7 years, 7 months ago (2013-05-14 14:38:29 UTC) #14
Takashi Toyoshima
jochen: ping
7 years, 7 months ago (2013-05-16 04:08:08 UTC) #15
jochen (gone - plz use gerrit)
lgtm https://chromiumcodereview.appspot.com/14769004/diff/42001/chrome/renderer/chrome_render_view_observer.cc File chrome/renderer/chrome_render_view_observer.cc (right): https://chromiumcodereview.appspot.com/14769004/diff/42001/chrome/renderer/chrome_render_view_observer.cc#newcode814 chrome/renderer/chrome_render_view_observer.cc:814: const extensions::Extension* ChromeRenderViewObserver::GetExtension( any reason you move this ...
7 years, 7 months ago (2013-05-22 12:26:02 UTC) #16
Takashi Toyoshima
Thanks. https://chromiumcodereview.appspot.com/14769004/diff/42001/chrome/renderer/chrome_render_view_observer.cc File chrome/renderer/chrome_render_view_observer.cc (right): https://chromiumcodereview.appspot.com/14769004/diff/42001/chrome/renderer/chrome_render_view_observer.cc#newcode814 chrome/renderer/chrome_render_view_observer.cc:814: const extensions::Extension* ChromeRenderViewObserver::GetExtension( This is because only this ...
7 years, 7 months ago (2013-05-22 12:59:39 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/toyoshim@chromium.org/14769004/61003
7 years, 7 months ago (2013-05-22 13:05:10 UTC) #18
commit-bot: I haz the power
7 years, 7 months ago (2013-05-23 00:10:10 UTC) #19
Message was sent while issue was closed.
Change committed as 201645

Powered by Google App Engine
This is Rietveld 408576698