Skip to content

Commit

Permalink
Add HttpHeaders constants for Sec-CH-DPR.
Browse files Browse the repository at this point in the history
RELNOTES=`net`: Added `HttpHeaders` constants for `Sec-CH-DPR`.
PiperOrigin-RevId: 435172482
  • Loading branch information
java-team-github-bot authored and Google Java Core Libraries committed Mar 16, 2022
1 parent aa45235 commit 75a3d4d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void testConstantNameMatchesString() throws Exception {
.build();
ImmutableSet<String> uppercaseAcronyms =
ImmutableSet.of(
"CH", "ID", "DNT", "DNS", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA", "UID",
"URL", "WWW", "XSS");
"CH", "ID", "DNT", "DNS", "DPR", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA",
"UID", "URL", "WWW", "XSS");
assertConstantNameMatchesString(HttpHeaders.class, specialCases, uppercaseAcronyms);
}

Expand Down
7 changes: 7 additions & 0 deletions android/guava/src/com/google/common/net/HttpHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,13 @@ private ReferrerPolicyValues() {}
* @since NEXT
*/
public static final String SEC_CH_VIEWPORT_HEIGHT = "Sec-CH-Viewport-Height";
/**
* The HTTP <a href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-dpr">{@code
* Sec-CH-DPR}</a> header field name.
*
* @since NEXT
*/
public static final String SEC_CH_DPR = "Sec-CH-DPR";
/**
* The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Dest}</a>
* header field name.
Expand Down
4 changes: 2 additions & 2 deletions guava-tests/test/com/google/common/net/HttpHeadersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void testConstantNameMatchesString() throws Exception {
.build();
ImmutableSet<String> uppercaseAcronyms =
ImmutableSet.of(
"CH", "ID", "DNT", "DNS", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA", "UID",
"URL", "WWW", "XSS");
"CH", "ID", "DNT", "DNS", "DPR", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA",
"UID", "URL", "WWW", "XSS");
assertConstantNameMatchesString(HttpHeaders.class, specialCases, uppercaseAcronyms);
}

Expand Down
7 changes: 7 additions & 0 deletions guava/src/com/google/common/net/HttpHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,13 @@ private ReferrerPolicyValues() {}
* @since NEXT
*/
public static final String SEC_CH_VIEWPORT_HEIGHT = "Sec-CH-Viewport-Height";
/**
* The HTTP <a href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-dpr">{@code
* Sec-CH-DPR}</a> header field name.
*
* @since NEXT
*/
public static final String SEC_CH_DPR = "Sec-CH-DPR";
/**
* The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Dest}</a>
* header field name.
Expand Down

0 comments on commit 75a3d4d

Please sign in to comment.