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

Side by Side Diff: third_party/WebKit/public/platform/WebURLRequest.h

Issue 2873793002: Record Data Savings for Client-Side LoFi (Closed)
Patch Set: fix crash in DRPNetworkDelegate when lofi_ui_service is null. Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/Resource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 kNoReport, // Don't report metrics for this WebURLRequest. 143 kNoReport, // Don't report metrics for this WebURLRequest.
144 kReportLink, // Report metrics with UI action link clicked. 144 kReportLink, // Report metrics with UI action link clicked.
145 kReportIntent, // Report metrics with UI action displayed intent. 145 kReportIntent, // Report metrics with UI action displayed intent.
146 }; 146 };
147 147
148 typedef int PreviewsState; 148 typedef int PreviewsState;
149 149
150 // The Previews types which determines whether to request a Preview version of 150 // The Previews types which determines whether to request a Preview version of
151 // the resource. 151 // the resource.
152 enum PreviewsTypes { 152 enum PreviewsTypes {
153 kPreviewsUnspecified = 0, // Let the browser process decide whether or 153 kPreviewsUnspecified = 0, // Let the browser process decide whether or
154 // not to request Preview types. 154 // not to request Preview types.
155 kServerLoFiOn = 1 << 0, // Request a Lo-Fi version of the resource 155 kServerLoFiOn = 1 << 0, // Request a Lo-Fi version of the resource
156 // from the server. 156 // from the server.
157 kClientLoFiOn = 1 << 1, // Request a Lo-Fi version of the resource 157 kClientLoFiOn = 1 << 1, // Request a Lo-Fi version of the resource
158 // from the client. 158 // from the client.
159 kServerLitePageOn = 1 << 2, // Request a Lite Page version of the 159 kClientLoFiAutoReload = 1 << 2, // Request the original version of the
160 // resource from the server. 160 // resource after a decoding error occurred
161 kPreviewsNoTransform = 1 << 3, // Explicitly forbid Previews 161 // when attempting to use Client Lo-Fi.
162 // transformations. 162 kServerLitePageOn = 1 << 3, // Request a Lite Page version of the
163 kPreviewsOff = 1 << 4, // Request a normal (non-Preview) version of 163 // resource from the server.
164 // the resource. Server transformations may 164 kPreviewsNoTransform = 1 << 4, // Explicitly forbid Previews
165 // still happen if the page is heavy. 165 // transformations.
166 kPreviewsOff = 1 << 5, // Request a normal (non-Preview) version of
167 // the resource. Server transformations may
168 // still happen if the page is heavy.
166 kPreviewsStateLast = kPreviewsOff 169 kPreviewsStateLast = kPreviewsOff
167 }; 170 };
168 171
169 // Indicates which service workers will receive fetch events for this request. 172 // Indicates which service workers will receive fetch events for this request.
170 enum class ServiceWorkerMode { 173 enum class ServiceWorkerMode {
171 // Relevant local and foreign service workers will get a fetch or 174 // Relevant local and foreign service workers will get a fetch or
172 // foreignfetch event for this request. 175 // foreignfetch event for this request.
173 kAll, 176 kAll,
174 // Only relevant foreign service workers will get a foreignfetch event for 177 // Only relevant foreign service workers will get a foreignfetch event for
175 // this request. 178 // this request.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // instance it contains. 377 // instance it contains.
375 std::unique_ptr<ResourceRequestContainer> owned_resource_request_; 378 std::unique_ptr<ResourceRequestContainer> owned_resource_request_;
376 379
377 // Should never be null. 380 // Should never be null.
378 ResourceRequest* resource_request_; 381 ResourceRequest* resource_request_;
379 }; 382 };
380 383
381 } // namespace blink 384 } // namespace blink
382 385
383 #endif 386 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/Resource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698