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

Issue 1105263004: "Load image" context menu item to reload a LoFi image. (Closed)

Created:
5 years, 7 months ago by megjablon
Modified:
5 years, 7 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, David Trainor- moved to gerrit, creis+watch_chromium.org, nasko+codewatch_chromium.org, avayvod+watch_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

"Load image" context menu item to reload a LoFi image. LoFi uses solid color image placeholders. Provide the user a context menu option to load the origial image in place. Also, provide a way for the context menu to know that an image was LoFi. BUG=485295 Committed: https://crrev.com/3eec0d31013c3596f418deaec96e119d1125b607 Cr-Commit-Position: refs/heads/master@{#330267}

Patch Set 1 : #

Total comments: 29

Patch Set 2 : Addressing comments and waiting for content/ advice #

Total comments: 6

Patch Set 3 : All comments and move Chrome-Proxy logic outside of content/ #

Total comments: 18

Patch Set 4 : Addressing comments #

Total comments: 8

Patch Set 5 : rebase #

Patch Set 6 : Context menu browser test to unit test and comments #

Total comments: 12

Patch Set 7 : Rename ReloadOriginalImage to ShowOriginalImage and Comments #

Total comments: 4

Patch Set 8 : Rename AddContextMenuProperties to AddImageContextMenuProperties #

Total comments: 2

Patch Set 9 : nit #

Patch Set 10 : try again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+393 lines, -26 lines) Patch
M chrome/android/java/res/menu/chrome_context_menu.xml View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/Tab.java View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItemDelegate.java View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuParams.java View 1 2 3 4 4 chunks +14 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextmenu/EmptyChromeContextMenuItemDelegate.java View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/app/chrome_command_ids.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/android/tab_android.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/tab_android.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 3 4 5 6 6 chunks +25 lines, -1 line 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc View 1 2 3 4 5 6 3 chunks +126 lines, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc View 1 2 3 4 5 6 3 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/context_menu_helper.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/DEPS View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_frame_observer.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/chrome_render_frame_observer.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc View 1 2 3 4 5 6 7 8 6 chunks +29 lines, -14 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc View 1 2 3 4 5 6 6 chunks +43 lines, -3 lines 0 comments Download
M components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/context_menu_params.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/context_menu_params_builder.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 62 (28 generated)
megjablon
bengr: components/* creis: content/* thestig: chrome/*
5 years, 7 months ago (2015-05-11 19:57:41 UTC) #15
Lei Zhang
You should find someone else to review chrome/android. https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd#newcode1016 chrome/app/generated_resources.grd:1016: + ...
5 years, 7 months ago (2015-05-11 20:16:54 UTC) #16
bengr
https://codereview.chromium.org/1105263004/diff/260001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc (right): https://codereview.chromium.org/1105263004/diff/260001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc#newcode226 components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc:226: request ? request->load_flags() : net::LOAD_NORMAL); Since looking at the ...
5 years, 7 months ago (2015-05-11 20:35:40 UTC) #17
Charlie Reis
[+jam for content API question] https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc#newcode987 content/child/web_url_loader_impl.cc:987: info.headers->HasHeaderValue("Chrome-Proxy", "q=low")); It's not ...
5 years, 7 months ago (2015-05-11 22:32:58 UTC) #19
megjablon
https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd#newcode1016 chrome/app/generated_resources.grd:1016: + Load image On 2015/05/11 20:16:53, Lei Zhang wrote: ...
5 years, 7 months ago (2015-05-11 22:58:41 UTC) #20
jam
https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc#newcode987 content/child/web_url_loader_impl.cc:987: info.headers->HasHeaderValue("Chrome-Proxy", "q=low")); On 2015/05/11 22:32:58, Charlie Reis wrote: > ...
5 years, 7 months ago (2015-05-11 22:59:47 UTC) #21
bengr
https://codereview.chromium.org/1105263004/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc (right): https://codereview.chromium.org/1105263004/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc#newcode179 components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc:179: bool DataReductionProxyRequestOptions::ShouldForceDisableLoFi( Move this to an anonymous namespace. https://codereview.chromium.org/1105263004/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h ...
5 years, 7 months ago (2015-05-12 17:21:47 UTC) #22
megjablon
On 2015/05/11 22:59:47, jam wrote: > https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc > File content/child/web_url_loader_impl.cc (right): > > https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc#newcode987 > ...
5 years, 7 months ago (2015-05-12 20:15:11 UTC) #23
Lei Zhang
https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd#newcode1016 chrome/app/generated_resources.grd:1016: + Load image On 2015/05/11 22:58:40, megjablon wrote: > ...
5 years, 7 months ago (2015-05-12 21:16:39 UTC) #24
jam
On 2015/05/12 20:15:11, megjablon wrote: > On 2015/05/11 22:59:47, jam wrote: > > > https://codereview.chromium.org/1105263004/diff/260001/content/child/web_url_loader_impl.cc ...
5 years, 7 months ago (2015-05-13 17:44:31 UTC) #25
megjablon
https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1105263004/diff/260001/chrome/app/generated_resources.grd#newcode1016 chrome/app/generated_resources.grd:1016: + Load image On 2015/05/12 21:16:39, Lei Zhang wrote: ...
5 years, 7 months ago (2015-05-13 23:36:38 UTC) #27
Lei Zhang
As I mentioned before, you should find someone to review the Android bits. You'll also ...
5 years, 7 months ago (2015-05-13 23:50:20 UTC) #28
megjablon
Adding tedchoc for chrome/android and chrome/browser/android
5 years, 7 months ago (2015-05-14 00:22:50 UTC) #30
Ted C
the android side of this seems ok, but the !android bits look like the more ...
5 years, 7 months ago (2015-05-14 00:38:00 UTC) #31
bengr
https://codereview.chromium.org/1105263004/diff/310001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc (right): https://codereview.chromium.org/1105263004/diff/310001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc#newcode37 components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc:37: Remove blank line. https://codereview.chromium.org/1105263004/diff/310001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc#newcode38 components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc:38: namespace { Add a ...
5 years, 7 months ago (2015-05-14 18:30:51 UTC) #32
megjablon
https://codereview.chromium.org/1105263004/diff/260001/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc File chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc (right): https://codereview.chromium.org/1105263004/diff/260001/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc#newcode321 chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc:321: IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, DataSaverLoadImage) { On 2015/05/13 23:50:19, Lei Zhang wrote: ...
5 years, 7 months ago (2015-05-14 19:26:26 UTC) #33
megjablon
asvitkine: histograms.xml wfh: render_messages.h and frame_messages.h
5 years, 7 months ago (2015-05-14 19:29:29 UTC) #35
Alexei Svitkine (slow)
histograms.xml lgtm, did not look at the rest
5 years, 7 months ago (2015-05-14 20:42:41 UTC) #36
Will Harris
IPC message changes look fine from a security perspective. lgtm on content/common/frame_messages.h and chrome/common/render_messages.h
5 years, 7 months ago (2015-05-14 20:57:01 UTC) #37
jam
lgtm with comments https://codereview.chromium.org/1105263004/diff/330001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/1105263004/diff/330001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode703 chrome/browser/renderer_context_menu/render_view_context_menu.cc:703: static const char lo_fi_header_key[] = "Chrome-Proxy"; ...
5 years, 7 months ago (2015-05-15 06:52:19 UTC) #38
megjablon
https://codereview.chromium.org/1105263004/diff/330001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/1105263004/diff/330001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode703 chrome/browser/renderer_context_menu/render_view_context_menu.cc:703: static const char lo_fi_header_key[] = "Chrome-Proxy"; On 2015/05/15 06:52:19, ...
5 years, 7 months ago (2015-05-15 20:31:08 UTC) #41
Lei Zhang
non-android chrome/ bits lgtm
5 years, 7 months ago (2015-05-15 20:36:15 UTC) #43
Ted C
lgtm -- android still don't like the naming, but won't keep pushing it if you ...
5 years, 7 months ago (2015-05-15 21:01:07 UTC) #44
bengr
lgtm, with a couple of minor comments. https://codereview.chromium.org/1105263004/diff/410001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc (right): https://codereview.chromium.org/1105263004/diff/410001/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc#newcode150 components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc:150: request_ = ...
5 years, 7 months ago (2015-05-15 21:23:22 UTC) #45
megjablon
Changed any methods or variables named ReloadOriginalImage to ShowOriginalImage. https://codereview.chromium.org/1105263004/diff/410001/chrome/android/java/res/menu/chrome_context_menu.xml File chrome/android/java/res/menu/chrome_context_menu.xml (right): https://codereview.chromium.org/1105263004/diff/410001/chrome/android/java/res/menu/chrome_context_menu.xml#newcode23 chrome/android/java/res/menu/chrome_context_menu.xml:23: ...
5 years, 7 months ago (2015-05-15 22:25:28 UTC) #46
Charlie Reis
Thanks for the updates! Just one question below. https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc File content/renderer/context_menu_params_builder.cc (right): https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc#newcode49 content/renderer/context_menu_params_builder.cc:49: GetContentClient()->renderer()->AddContextMenuProperties( ...
5 years, 7 months ago (2015-05-15 22:37:46 UTC) #48
megjablon
https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc File content/renderer/context_menu_params_builder.cc (right): https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc#newcode49 content/renderer/context_menu_params_builder.cc:49: GetContentClient()->renderer()->AddContextMenuProperties( On 2015/05/15 22:37:46, Charlie Reis wrote: > Seems ...
5 years, 7 months ago (2015-05-15 22:52:22 UTC) #49
Charlie Reis
https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc File content/renderer/context_menu_params_builder.cc (right): https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc#newcode49 content/renderer/context_menu_params_builder.cc:49: GetContentClient()->renderer()->AddContextMenuProperties( On 2015/05/15 22:52:22, megjablon wrote: > On 2015/05/15 ...
5 years, 7 months ago (2015-05-15 22:59:10 UTC) #50
megjablon
https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc File content/renderer/context_menu_params_builder.cc (right): https://codereview.chromium.org/1105263004/diff/450001/content/renderer/context_menu_params_builder.cc#newcode49 content/renderer/context_menu_params_builder.cc:49: GetContentClient()->renderer()->AddContextMenuProperties( On 2015/05/15 22:59:09, Charlie Reis wrote: > On ...
5 years, 7 months ago (2015-05-15 23:16:05 UTC) #52
Charlie Reis
Thanks! LGTM with nit. https://codereview.chromium.org/1105263004/diff/490001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/1105263004/diff/490001/content/public/renderer/content_renderer_client.h#newcode311 content/public/renderer/content_renderer_client.h:311: // Gives the embedder a ...
5 years, 7 months ago (2015-05-15 23:21:18 UTC) #53
megjablon
https://codereview.chromium.org/1105263004/diff/490001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/1105263004/diff/490001/content/public/renderer/content_renderer_client.h#newcode311 content/public/renderer/content_renderer_client.h:311: // Gives the embedder a chance to add properties ...
5 years, 7 months ago (2015-05-15 23:36:54 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1105263004/570001
5 years, 7 months ago (2015-05-16 02:01:16 UTC) #60
commit-bot: I haz the power
Committed patchset #10 (id:570001)
5 years, 7 months ago (2015-05-16 02:07:40 UTC) #61
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:30:57 UTC) #62
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/3eec0d31013c3596f418deaec96e119d1125b607
Cr-Commit-Position: refs/heads/master@{#330267}

Powered by Google App Engine
This is Rietveld 408576698