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

Unified Diff: content/public/common/previews_state.h

Issue 2642793005: Create a Lite Page bit for previews and fallback to Lo-Fi (Closed)
Patch Set: bengr comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/common/previews_state.h
diff --git a/content/public/common/previews_state.h b/content/public/common/previews_state.h
index 5c88744894e7c9ed5bfa8b80566bd0004742a5d5..dda92cdfa52722b18808580bd72b0546893bcb4d 100644
--- a/content/public/common/previews_state.h
+++ b/content/public/common/previews_state.h
@@ -14,20 +14,24 @@
namespace content {
-// The Previews state which determines whether to request a Preview version of
+typedef int PreviewsState;
nasko 2017/02/16 18:10:02 Why does that need to stay around?
megjablon 2017/02/17 20:17:52 So that we can use these as a bitmask
nasko 2017/02/28 00:30:46 It was a bitmask before while being an enum, wasn'
megjablon 2017/02/28 00:44:23 Before we were only assigning it one value, but c+
+
+// The Previews types which determines whether to request a Preview version of
// the resource. Previews are optimizations that change the format and
// content of web pages to improve data savings and / or performance. This enum
// determines which Previews types to request.
-enum PreviewsState {
+enum PreviewsTypes {
PREVIEWS_UNSPECIFIED = 0, // Let the browser process decide whether or
// not to request Preview types.
SERVER_LOFI_ON = 1 << 0, // Request a Lo-Fi version of the resource
// from the server.
CLIENT_LOFI_ON = 1 << 1, // Request a Lo-Fi version of the resource
// from the client.
- PREVIEWS_NO_TRANSFORM = 1 << 2, // Explicitly forbid Previews
+ SERVER_LITE_PAGE_ON = 1 << 2, // Request a Lite Page version of the
+ // resource from the server.
+ PREVIEWS_NO_TRANSFORM = 1 << 3, // Explicitly forbid Previews
// transformations.
- PREVIEWS_OFF = 1 << 3, // Request a normal (non-Preview) version of
+ PREVIEWS_OFF = 1 << 4, // Request a normal (non-Preview) version of
// the resource. Server transformations may
// still happen if the page is heavy.
PREVIEWS_STATE_LAST = PREVIEWS_OFF
@@ -39,6 +43,8 @@ STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_UNSPECIFIED,
blink::WebURLRequest::PreviewsUnspecified);
STATIC_ASSERT_PREVIEWS_ENUM(SERVER_LOFI_ON, blink::WebURLRequest::ServerLoFiOn);
STATIC_ASSERT_PREVIEWS_ENUM(CLIENT_LOFI_ON, blink::WebURLRequest::ClientLoFiOn);
+STATIC_ASSERT_PREVIEWS_ENUM(SERVER_LITE_PAGE_ON,
+ blink::WebURLRequest::ServerLitePageOn);
STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_NO_TRANSFORM,
blink::WebURLRequest::PreviewsNoTransform);
STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_OFF, blink::WebURLRequest::PreviewsOff);

Powered by Google App Engine
This is Rietveld 408576698