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

Issue 2860093003: Implement device-ram client hints header (Closed)

Created:
3 years, 7 months ago by fmeawad
Modified:
3 years, 6 months ago
CC:
chromium-reviews, Yoav Weiss, jam, tyoshino+watch_chromium.org, blink-reviews-api_chromium.org, loading-reviews_chromium.org, dglazkov+blink, darin-cc_chromium.org, gavinp+loader_chromium.org, asvitkine+watch_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, blink-reviews-frames_chromium.org, Nate Chapin, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement device-ram client hints header BUG=718622 Review-Url: https://codereview.chromium.org/2860093003 Cr-Commit-Position: refs/heads/master@{#475694} Committed: https://chromium.googlesource.com/chromium/src/+/3a2b4be52d3f11b216be38f9e5f2ca10962a4591

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase + Address Comments + Add Layout Tests #

Patch Set 3 : Fix FrameFetchContextTest #

Total comments: 16

Patch Set 4 : Address Comments #

Patch Set 5 : Rebase #

Total comments: 5

Patch Set 6 : Address Comments 2 #

Total comments: 4

Patch Set 7 : Move physical_memory_mb to MemoryCoordinator and Address other comments #

Patch Set 8 : Minor fixes #

Total comments: 6

Patch Set 9 : Address Nits + Rebase #

Patch Set 10 : Rebase UseCounter.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -13 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/misc/client-hint-accept-on-subresource.html View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept-meta.html View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/client-hints-invalid-accept.php View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/client-hints-no-accept.html View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/resources/iframe-accept-ch.php View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/misc/resources/image-checks-for-device-ram.php View 1 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 3 chunks +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +41 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/MemoryCoordinator.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/MemoryCoordinator.cpp View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.cpp View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -1 line 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 63 (35 generated)
panicker
Thanks for the CL! Looking good! Left a couple comments. https://codereview.chromium.org/2860093003/diff/1/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/2860093003/diff/1/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode612 ...
3 years, 7 months ago (2017-05-05 17:19:30 UTC) #2
fmeawad
Shubhie, can you take another look before I send it to a wider audience. Also ...
3 years, 7 months ago (2017-05-23 20:50:54 UTC) #3
Yoav Weiss
Thanks for working on this! A few nits. https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php File third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php (right): https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php#newcode2 third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php:2: header("ACCEPT-CH: ...
3 years, 7 months ago (2017-05-24 07:48:03 UTC) #12
panicker
LGTM, modulo Yoav's comments. https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode609 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:609: float FrameFetchContext::ClientHintsDeviceRam(int physical_memory_mb) { let's ...
3 years, 7 months ago (2017-05-24 17:27:20 UTC) #13
panicker
https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 File third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 (right): https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5#newcode344 third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5:344: status: "experimental", this should be "test" to start with. ...
3 years, 7 months ago (2017-05-24 17:28:33 UTC) #14
fmeawad
Comments addressed, PTAL https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php File third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php (right): https://codereview.chromium.org/2860093003/diff/40001/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php#newcode2 third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php:2: header("ACCEPT-CH: DPR, Width, Viewport-Width, Device-Ram"); On ...
3 years, 7 months ago (2017-05-24 18:24:57 UTC) #17
haraken
Implementation-wise LGTM https://codereview.chromium.org/2860093003/diff/80001/third_party/WebKit/Source/core/page/ChromeClient.h File third_party/WebKit/Source/core/page/ChromeClient.h (right): https://codereview.chromium.org/2860093003/diff/80001/third_party/WebKit/Source/core/page/ChromeClient.h#newcode402 third_party/WebKit/Source/core/page/ChromeClient.h:402: float device_ram_mb_; Is this unused?
3 years, 7 months ago (2017-05-25 04:17:48 UTC) #25
kinuko
https://codereview.chromium.org/2860093003/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp File third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp (right): https://codereview.chromium.org/2860093003/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp#newcode497 third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp:497: class FrameFetchContextHintsTest : public FrameFetchContextTest { For these ones ...
3 years, 7 months ago (2017-05-25 05:05:51 UTC) #27
kinuko
https://codereview.chromium.org/2860093003/diff/80001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/2860093003/diff/80001/content/child/blink_platform_impl.cc#newcode365 content/child/blink_platform_impl.cc:365: static_cast<size_t>(base::SysInfo::AmountOfPhysicalMemoryMB())) { Hum, this doesn't seem we need public ...
3 years, 7 months ago (2017-05-25 05:31:28 UTC) #28
haraken
On 2017/05/25 05:31:28, kinuko wrote: > https://codereview.chromium.org/2860093003/diff/80001/content/child/blink_platform_impl.cc > File content/child/blink_platform_impl.cc (right): > > https://codereview.chromium.org/2860093003/diff/80001/content/child/blink_platform_impl.cc#newcode365 > ...
3 years, 7 months ago (2017-05-25 05:40:51 UTC) #29
kinuko
On 2017/05/25 05:40:51, haraken wrote: > On 2017/05/25 05:31:28, kinuko wrote: > > > https://codereview.chromium.org/2860093003/diff/80001/content/child/blink_platform_impl.cc ...
3 years, 7 months ago (2017-05-25 05:44:36 UTC) #30
fmeawad
> Yep, my comment meant to say platform/ solution would be less code if we ...
3 years, 6 months ago (2017-05-25 19:52:54 UTC) #31
fmeawad
https://codereview.chromium.org/2860093003/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp File third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp (right): https://codereview.chromium.org/2860093003/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp#newcode497 third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp:497: class FrameFetchContextHintsTest : public FrameFetchContextTest { On 2017/05/25 05:05:51, ...
3 years, 6 months ago (2017-05-25 19:53:35 UTC) #32
haraken
On 2017/05/25 19:52:54, fmeawad wrote: > > Yep, my comment meant to say platform/ solution ...
3 years, 6 months ago (2017-05-26 03:50:52 UTC) #33
Yoav Weiss
https://codereview.chromium.org/2860093003/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/2860093003/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode620 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:620: } ``` int power = 0; // Extract the ...
3 years, 6 months ago (2017-05-26 05:44:23 UTC) #34
fmeawad
All comments addressed, PTAL https://codereview.chromium.org/2860093003/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/2860093003/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode620 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:620: } On 2017/05/26 05:44:22, Yoav ...
3 years, 6 months ago (2017-05-26 20:13:17 UTC) #39
Yoav Weiss
LGTM! Thanks for working on this :) Couple of nits and we're good to go ...
3 years, 6 months ago (2017-05-26 20:48:15 UTC) #40
haraken
LGTM
3 years, 6 months ago (2017-05-27 00:33:44 UTC) #41
kinuko
lgtm https://codereview.chromium.org/2860093003/diff/140001/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp File third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp (right): https://codereview.chromium.org/2860093003/diff/140001/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp#newcode49 third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp:49: #include "platform/testing/TestingPlatformSupport.h" No longer needed
3 years, 6 months ago (2017-05-29 05:50:02 UTC) #42
fmeawad
https://codereview.chromium.org/2860093003/diff/140001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/2860093003/diff/140001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode619 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:619: int power = 0; // To compensate of the ...
3 years, 6 months ago (2017-05-30 17:21:00 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860093003/140001
3 years, 6 months ago (2017-05-30 17:22:25 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/106631) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 6 months ago (2017-05-30 17:25:16 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860093003/160001
3 years, 6 months ago (2017-05-30 17:28:50 UTC) #51
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/core/frame/UseCounter.h: While running git apply --index -3 -p1; error: patch ...
3 years, 6 months ago (2017-05-30 19:37:17 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860093003/180001
3 years, 6 months ago (2017-05-30 19:42:36 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/396051)
3 years, 6 months ago (2017-05-30 19:49:08 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860093003/180001
3 years, 6 months ago (2017-05-30 19:50:52 UTC) #60
commit-bot: I haz the power
3 years, 6 months ago (2017-05-30 23:51:51 UTC) #63
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/3a2b4be52d3f11b216be38f9e5f2...

Powered by Google App Engine
This is Rietveld 408576698