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

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

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comments and rebase Created 5 years, 1 month 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 | « content/common/navigation_params.h ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/common/navigation_params.h" 5 #include "content/common/navigation_params.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "content/common/service_worker/service_worker_types.h" 9 #include "content/common/service_worker/service_worker_types.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 11 matching lines...) Expand all
22 // network stack. Neither should pushState/popState. 22 // network stack. Neither should pushState/popState.
23 return !url.SchemeIs(url::kDataScheme) && url != GURL(url::kAboutBlankURL) && 23 return !url.SchemeIs(url::kDataScheme) && url != GURL(url::kAboutBlankURL) &&
24 !url.SchemeIs(url::kJavaScriptScheme); 24 !url.SchemeIs(url::kJavaScriptScheme);
25 } 25 }
26 26
27 CommonNavigationParams::CommonNavigationParams() 27 CommonNavigationParams::CommonNavigationParams()
28 : transition(ui::PAGE_TRANSITION_LINK), 28 : transition(ui::PAGE_TRANSITION_LINK),
29 navigation_type(FrameMsg_Navigate_Type::NORMAL), 29 navigation_type(FrameMsg_Navigate_Type::NORMAL),
30 allow_download(true), 30 allow_download(true),
31 should_replace_current_entry(false), 31 should_replace_current_entry(false),
32 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT) { 32 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT),
33 lofi_state(LOFI_UNSPECIFIED) {
33 } 34 }
34 35
35 CommonNavigationParams::CommonNavigationParams( 36 CommonNavigationParams::CommonNavigationParams(
36 const GURL& url, 37 const GURL& url,
37 const Referrer& referrer, 38 const Referrer& referrer,
38 ui::PageTransition transition, 39 ui::PageTransition transition,
39 FrameMsg_Navigate_Type::Value navigation_type, 40 FrameMsg_Navigate_Type::Value navigation_type,
40 bool allow_download, 41 bool allow_download,
41 bool should_replace_current_entry, 42 bool should_replace_current_entry,
42 base::TimeTicks ui_timestamp, 43 base::TimeTicks ui_timestamp,
43 FrameMsg_UILoadMetricsReportType::Value report_type, 44 FrameMsg_UILoadMetricsReportType::Value report_type,
44 const GURL& base_url_for_data_url, 45 const GURL& base_url_for_data_url,
45 const GURL& history_url_for_data_url) 46 const GURL& history_url_for_data_url,
47 LoFiState lofi_state)
46 : url(url), 48 : url(url),
47 referrer(referrer), 49 referrer(referrer),
48 transition(transition), 50 transition(transition),
49 navigation_type(navigation_type), 51 navigation_type(navigation_type),
50 allow_download(allow_download), 52 allow_download(allow_download),
51 should_replace_current_entry(should_replace_current_entry), 53 should_replace_current_entry(should_replace_current_entry),
52 ui_timestamp(ui_timestamp), 54 ui_timestamp(ui_timestamp),
53 report_type(report_type), 55 report_type(report_type),
54 base_url_for_data_url(base_url_for_data_url), 56 base_url_for_data_url(base_url_for_data_url),
55 history_url_for_data_url(history_url_for_data_url) { 57 history_url_for_data_url(history_url_for_data_url),
58 lofi_state(lofi_state) {
56 } 59 }
57 60
58 CommonNavigationParams::~CommonNavigationParams() { 61 CommonNavigationParams::~CommonNavigationParams() {
59 } 62 }
60 63
61 BeginNavigationParams::BeginNavigationParams() 64 BeginNavigationParams::BeginNavigationParams()
62 : load_flags(0), 65 : load_flags(0),
63 has_user_gesture(false), 66 has_user_gesture(false),
64 skip_service_worker(false), 67 skip_service_worker(false),
65 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} 68 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {}
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 const RequestNavigationParams& request_params) 170 const RequestNavigationParams& request_params)
168 : common_params(common_params), 171 : common_params(common_params),
169 start_params(start_params), 172 start_params(start_params),
170 request_params(request_params) { 173 request_params(request_params) {
171 } 174 }
172 175
173 NavigationParams::~NavigationParams() { 176 NavigationParams::~NavigationParams() {
174 } 177 }
175 178
176 } // namespace content 179 } // namespace content
OLDNEW
« no previous file with comments | « content/common/navigation_params.h ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698