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

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

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: fix ContentResourceProviderTest Created 3 years, 11 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 | « 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/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.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/appcache_info.h" 10 #include "content/public/common/appcache_info.h"
(...skipping 16 matching lines...) Expand all
27 !url.is_empty() && !url.SchemeIs(url::kContentIDScheme) && 27 !url.is_empty() && !url.SchemeIs(url::kContentIDScheme) &&
28 url != content::kAboutSrcDocURL; 28 url != content::kAboutSrcDocURL;
29 } 29 }
30 30
31 CommonNavigationParams::CommonNavigationParams() 31 CommonNavigationParams::CommonNavigationParams()
32 : transition(ui::PAGE_TRANSITION_LINK), 32 : transition(ui::PAGE_TRANSITION_LINK),
33 navigation_type(FrameMsg_Navigate_Type::NORMAL), 33 navigation_type(FrameMsg_Navigate_Type::NORMAL),
34 allow_download(true), 34 allow_download(true),
35 should_replace_current_entry(false), 35 should_replace_current_entry(false),
36 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), 36 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT),
37 lofi_state(LOFI_UNSPECIFIED), 37 previews_state(PREVIEWS_UNSPECIFIED),
38 navigation_start(base::TimeTicks::Now()), 38 navigation_start(base::TimeTicks::Now()),
39 method("GET") {} 39 method("GET") {}
40 40
41 CommonNavigationParams::CommonNavigationParams( 41 CommonNavigationParams::CommonNavigationParams(
42 const GURL& url, 42 const GURL& url,
43 const Referrer& referrer, 43 const Referrer& referrer,
44 ui::PageTransition transition, 44 ui::PageTransition transition,
45 FrameMsg_Navigate_Type::Value navigation_type, 45 FrameMsg_Navigate_Type::Value navigation_type,
46 bool allow_download, 46 bool allow_download,
47 bool should_replace_current_entry, 47 bool should_replace_current_entry,
48 base::TimeTicks ui_timestamp, 48 base::TimeTicks ui_timestamp,
49 FrameMsg_UILoadMetricsReportType::Value report_type, 49 FrameMsg_UILoadMetricsReportType::Value report_type,
50 const GURL& base_url_for_data_url, 50 const GURL& base_url_for_data_url,
51 const GURL& history_url_for_data_url, 51 const GURL& history_url_for_data_url,
52 LoFiState lofi_state, 52 PreviewsState previews_state,
53 const base::TimeTicks& navigation_start, 53 const base::TimeTicks& navigation_start,
54 std::string method, 54 std::string method,
55 const scoped_refptr<ResourceRequestBodyImpl>& post_data) 55 const scoped_refptr<ResourceRequestBodyImpl>& post_data)
56 : url(url), 56 : url(url),
57 referrer(referrer), 57 referrer(referrer),
58 transition(transition), 58 transition(transition),
59 navigation_type(navigation_type), 59 navigation_type(navigation_type),
60 allow_download(allow_download), 60 allow_download(allow_download),
61 should_replace_current_entry(should_replace_current_entry), 61 should_replace_current_entry(should_replace_current_entry),
62 ui_timestamp(ui_timestamp), 62 ui_timestamp(ui_timestamp),
63 report_type(report_type), 63 report_type(report_type),
64 base_url_for_data_url(base_url_for_data_url), 64 base_url_for_data_url(base_url_for_data_url),
65 history_url_for_data_url(history_url_for_data_url), 65 history_url_for_data_url(history_url_for_data_url),
66 lofi_state(lofi_state), 66 previews_state(previews_state),
67 navigation_start(navigation_start), 67 navigation_start(navigation_start),
68 method(method), 68 method(method),
69 post_data(post_data) { 69 post_data(post_data) {
70 // |method != "POST"| should imply absence of |post_data|. 70 // |method != "POST"| should imply absence of |post_data|.
71 if (method != "POST" && post_data) { 71 if (method != "POST" && post_data) {
72 NOTREACHED(); 72 NOTREACHED();
73 this->post_data = nullptr; 73 this->post_data = nullptr;
74 } 74 }
75 } 75 }
76 76
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 const RequestNavigationParams& request_params) 194 const RequestNavigationParams& request_params)
195 : common_params(common_params), 195 : common_params(common_params),
196 start_params(start_params), 196 start_params(start_params),
197 request_params(request_params) { 197 request_params(request_params) {
198 } 198 }
199 199
200 NavigationParams::~NavigationParams() { 200 NavigationParams::~NavigationParams() {
201 } 201 }
202 202
203 } // namespace content 203 } // 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