Virtual url used as download url for non-savable pages

36 views
Skip to first unread message

Роман Брек

unread,
Jul 16, 2025, 8:41:51 AMJul 16
to navigation-dev
Greetings navigation experts,

Skimming through web_contents_impl.cc I found it a little confusing that downloading documents such as pdf through context menu uses navigation entries virtual url instead of the actual url. See https://source.chromium.org/chromium/chromium/src/+/main:content/browser/web_contents/web_contents_impl.cc;drc=3bade5b688ea2ca929113a099536bede0eafb001;l=6582 . 

Browsing blame for possible discussion history did not bring any results as this was initially added in this commit where it looked like that and still used a virtual url. As per documentation in navigation_entry.h virtual url is to be displayed to the user, and GetUrl is the actual url. What am I missing here and why is document download supposed to use the virtual one?

Any help is much appreciated, thanks!
Roman
Reply all
Reply to author
Forward
0 new messages