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

Side by Side Diff: content/common/navigation_params.h

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move DRP parts to https://codereview.chromium.org/1363673004/ Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/frame_message_enums.h" 13 #include "content/common/frame_message_enums.h"
14 #include "content/public/common/page_state.h" 14 #include "content/public/common/page_state.h"
15 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
16 #include "ui/base/page_transition_types.h" 16 #include "ui/base/page_transition_types.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace base { 19 namespace base {
20 class RefCountedMemory; 20 class RefCountedMemory;
21 } 21 }
22 22
23 namespace content { 23 namespace content {
24 24
25 // The LoFi state which determines whether to add the LoFi header. Must stay in
26 // sync with the enum in data_reduction_proxy_lofi_helper.h.
27 enum LoFiState {
28 // Request a LoFi version of the resource.
29 LOFI_ON = 0,
30 // Request a normal (non-LoFi) version of the resource.
31 LOFI_OFF,
32 // Let the browser process decide whether or not to request the LoFi version.
33 LOFI_DEFAULT,
34 };
35
25 // PlzNavigate 36 // PlzNavigate
26 // Helper function to determine if the navigation to |url| should make a request 37 // Helper function to determine if the navigation to |url| should make a request
27 // to the network stack. A request should not be sent for data URLs, JavaScript 38 // to the network stack. A request should not be sent for data URLs, JavaScript
28 // URLs or about:blank. In these cases, no request needs to be sent. 39 // URLs or about:blank. In these cases, no request needs to be sent.
29 bool ShouldMakeNetworkRequestForURL(const GURL& url); 40 bool ShouldMakeNetworkRequestForURL(const GURL& url);
30 41
31 // The following structures hold parameters used during a navigation. In 42 // The following structures hold parameters used during a navigation. In
32 // particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and 43 // particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and
33 // FrameHostMsg_BeginNavigation. 44 // FrameHostMsg_BeginNavigation.
34 45
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // The report type to be used when recording the metric using |ui_timestamp|. 93 // The report type to be used when recording the metric using |ui_timestamp|.
83 FrameMsg_UILoadMetricsReportType::Value report_type; 94 FrameMsg_UILoadMetricsReportType::Value report_type;
84 95
85 // Base URL for use in Blink's SubstituteData. 96 // Base URL for use in Blink's SubstituteData.
86 // Is only used with data: URLs. 97 // Is only used with data: URLs.
87 GURL base_url_for_data_url; 98 GURL base_url_for_data_url;
88 99
89 // History URL for use in Blink's SubstituteData. 100 // History URL for use in Blink's SubstituteData.
90 // Is only used with data: URLs. 101 // Is only used with data: URLs.
91 GURL history_url_for_data_url; 102 GURL history_url_for_data_url;
103
104 // Whether or not to request a LoFi version of the document or let the browser
105 // decide.
106 LoFiState lofi_state;
92 }; 107 };
93 108
94 // Provided by the renderer ---------------------------------------------------- 109 // Provided by the renderer ----------------------------------------------------
95 // 110 //
96 // This struct holds parameters sent by the renderer to the browser. It is only 111 // This struct holds parameters sent by the renderer to the browser. It is only
97 // used in PlzNavigate (since in the current architecture, the renderer does not 112 // used in PlzNavigate (since in the current architecture, the renderer does not
98 // inform the browser of navigations until they commit). 113 // inform the browser of navigations until they commit).
99 114
100 // This struct is not used outside of the PlzNavigate project. 115 // This struct is not used outside of the PlzNavigate project.
101 // PlzNavigate: parameters needed to start a navigation on the IO thread, 116 // PlzNavigate: parameters needed to start a navigation on the IO thread,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ~NavigationParams(); 283 ~NavigationParams();
269 284
270 CommonNavigationParams common_params; 285 CommonNavigationParams common_params;
271 StartNavigationParams start_params; 286 StartNavigationParams start_params;
272 RequestNavigationParams request_params; 287 RequestNavigationParams request_params;
273 }; 288 };
274 289
275 } // namespace content 290 } // namespace content
276 291
277 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 292 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698