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

Issue 6681030: Requesting Review for BugFix Chromium:1935 (Closed)

Created:
9 years, 9 months ago by Ramkumar
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Send the 'page_url' parameter of the page (on which the right click was made to open the context menu) as the 'referer' field of the http header field. This change is done for cases OPENLINKNEWTAB, OPENLINKNEWWINDOW, and NOT for OPENLINKOFFTHERECORD (Incognito). Also Https to Https transition must NOT send the referrer and this is checked in the 'OpenURL' method. Call to the ShouldHideReferrer method is done at render_view.cc /* FIX for Issue 1935: referer-header is not set when opening link in new tab via context menu */ Contributed by Ramkumar Gokarnesan - ramgo@yahoo-inc.com BUG=chromium:1935 TEST=Try right click on a URL and click 'open link in new tab' or 'open link in new window' and see the referer information being sent as a part of the http header field. verify with wireshark / VS debugger.

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 5

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -12 lines) Patch
M AUTHORS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 6 chunks +21 lines, -11 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 3 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
Ramkumar
9 years, 9 months ago (2011-03-14 10:41:01 UTC) #1
Evan Stade
This looks alright to me, but Brett might be a better reviewer
9 years, 9 months ago (2011-03-14 19:35:50 UTC) #2
brettw
What should happen for iframes? It seems like the referrer should be the iframe containing ...
9 years, 9 months ago (2011-03-14 19:51:37 UTC) #3
Ramkumar
i havent touched the iframe case, can you please be specific with what has to ...
9 years, 9 months ago (2011-03-15 05:44:55 UTC) #4
brettw
I don't actually know what should be done. To test, just construct a page with ...
9 years, 9 months ago (2011-03-15 15:41:19 UTC) #5
Ramkumar
tried with this page http://nunzioweb.com/iframes-example.htm Referrers are being sent for the links present outside the ...
9 years, 9 months ago (2011-03-16 06:19:40 UTC) #6
Ramkumar
Sorry it was taking it from the cache thats why there were no http packets ...
9 years, 9 months ago (2011-03-16 08:07:08 UTC) #7
Ramkumar
for an iframe with link, what is the expected behaviour? this does NOT send the ...
9 years, 9 months ago (2011-03-16 10:33:47 UTC) #8
Ramkumar
there is another parameter called 'frame_url' which has the subframe url where the click was ...
9 years, 9 months ago (2011-03-16 11:45:46 UTC) #9
Ramkumar
have used the logic that if frame_url is empty, then send page_url, else send frame_url, ...
9 years, 9 months ago (2011-03-16 13:02:17 UTC) #10
brettw
On Wed, Mar 16, 2011 at 6:02 AM, <ramkumar.gokarnesan@gmail.com> wrote: > have used the logic ...
9 years, 9 months ago (2011-03-16 15:42:41 UTC) #11
Ramkumar
Thanks for pointing out, changed the behaviour as of Patch set 3. when a link ...
9 years, 9 months ago (2011-03-17 06:39:32 UTC) #12
Ramkumar
please check the current code and tell me the further steps to follow!
9 years, 9 months ago (2011-03-18 12:31:35 UTC) #13
brettw
I think your logic is good. I just have some indentation nitpicks. Also, have you ...
9 years, 9 months ago (2011-03-18 16:20:55 UTC) #14
Ramkumar
Thanks again, all indentation done as required i guess, please give it a final check, ...
9 years, 9 months ago (2011-03-21 05:56:09 UTC) #15
brettw
I can't check this in until I know what to add to the AUTHORS file. ...
9 years, 9 months ago (2011-03-26 17:54:18 UTC) #16
Ramkumar
I work for Yahoo!. The legal dept. is looking into the Corporate CLA. I'll get ...
9 years, 9 months ago (2011-03-28 05:14:45 UTC) #17
darin (slow to review)
http://codereview.chromium.org/6681030/diff/19001/chrome/browser/tab_contents/render_view_context_menu.cc File chrome/browser/tab_contents/render_view_context_menu.cc (right): http://codereview.chromium.org/6681030/diff/19001/chrome/browser/tab_contents/render_view_context_menu.cc#newcode1529 chrome/browser/tab_contents/render_view_context_menu.cc:1529: bool hide_referrer = WebSecurityPolicy::shouldHideReferrer( we try to avoid using ...
9 years, 8 months ago (2011-04-13 16:38:32 UTC) #18
brettw
http://codereview.chromium.org/6681030/diff/19001/chrome/browser/tab_contents/render_view_context_menu.cc File chrome/browser/tab_contents/render_view_context_menu.cc (right): http://codereview.chromium.org/6681030/diff/19001/chrome/browser/tab_contents/render_view_context_menu.cc#newcode1529 chrome/browser/tab_contents/render_view_context_menu.cc:1529: bool hide_referrer = WebSecurityPolicy::shouldHideReferrer( I don't see this getting ...
9 years, 8 months ago (2011-04-13 17:43:20 UTC) #19
Ramkumar
That code WILL get called if you are going in an https page and opening ...
9 years, 8 months ago (2011-04-13 17:54:53 UTC) #20
Ramkumar
Also omitting that method call will send the referrer from https to http, which is ...
9 years, 8 months ago (2011-04-13 17:55:50 UTC) #21
darin (slow to review)
I agree with what you are trying to accomplish. The concern with using WebKit code ...
9 years, 8 months ago (2011-04-13 23:30:43 UTC) #22
Ramkumar
"Well, you could add some code to RenderView where it handles this navigation request" --> ...
9 years, 8 months ago (2011-04-14 06:00:52 UTC) #23
Ramkumar
The shouldHideReferrer method just validates the referrer policy and doesn't involve any state change in ...
9 years, 8 months ago (2011-04-14 10:53:39 UTC) #24
brettw
> "Well, you could add some code to RenderView where it handles this navigation > ...
9 years, 8 months ago (2011-04-15 06:13:06 UTC) #25
Ramkumar
I really didnt notice there was code flow through RenderView.cc. will it be okay if ...
9 years, 8 months ago (2011-04-15 07:55:12 UTC) #26
Ramkumar
Please review patch set 5, i have moved the logic to render_view.cc
9 years, 8 months ago (2011-04-18 08:00:53 UTC) #27
brettw
LGTM with just a spacing nitpick. When you upload your final one, can you also ...
9 years, 8 months ago (2011-04-18 22:24:32 UTC) #28
Ramkumar
Hey, think i fixed the 4 spaces indent, how can i add to the AUTHORS ...
9 years, 8 months ago (2011-04-19 08:06:25 UTC) #29
Ramkumar
i have added this Ramkumar Gokarnesan - ramgo@yahoo-inc.com to the change list description please have ...
9 years, 8 months ago (2011-04-19 08:32:51 UTC) #30
darin (slow to review)
On 2011/04/19 08:32:51, Ramkumar wrote: > i have added this > Ramkumar Gokarnesan - mailto:ramgo@yahoo-inc.com ...
9 years, 8 months ago (2011-04-19 16:20:02 UTC) #31
darin (slow to review)
OK, LGTM
9 years, 8 months ago (2011-04-20 06:13:57 UTC) #32
commit-bot: I haz the power
Can't apply patch for file AUTHORS. patching file AUTHORS Hunk #1 FAILED at 94. 1 ...
9 years, 8 months ago (2011-04-20 06:14:19 UTC) #33
Ramkumar
Hey why this problem?! is the code committed? On Wed, Apr 20, 2011 at 11:44 ...
9 years, 8 months ago (2011-04-20 08:36:14 UTC) #34
darin (slow to review)
It suggests that someone else modified AUTHORS in the meantime. If you "svn update" and ...
9 years, 8 months ago (2011-04-20 16:13:12 UTC) #35
brettw
Checked in as r82323. Your checkout was super old (looks like about a month) and ...
9 years, 8 months ago (2011-04-20 17:30:41 UTC) #36
Ramkumar
9 years, 8 months ago (2011-04-20 17:45:37 UTC) #37
Many thanks! Yeah, the fix was over long back, the license
verification took time, sorry about that. And i did change the
indentation to 4spaces from the function call, not from the margin.
Sorry! And thanks a lot for helping me out :)

On 4/20/11, brettw@chromium.org <brettw@chromium.org> wrote:
> Checked in as r82323.
>
> Your checkout was super old (looks like about a month) and there way this
> patch
> would apply. I manually fixed the problems (mostly a result render_view.cc
> moving). In the future, please be sure your checkout is up-to-date before
> submitting.
>
> Also, you didn't fix the indentation problem in render_view in the most
> recent
> upload. I fixed this for you.
>
> http://codereview.chromium.org/6681030/
>

-- 
Sent from my mobile device

Powered by Google App Engine
This is Rietveld 408576698