Add a stub __cxa_demangle to disable LLVM's demangler.
[chromium-blink-merge.git] / content / common / navigation_params.cc
blob8b70c8ffb9718acfc22352f71d3643591cad57c7
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
3 // found in the LICENSE file.
5 #include "content/common/navigation_params.h"
7 #include "base/memory/ref_counted_memory.h"
9 namespace content {
11 CommonNavigationParams::CommonNavigationParams()
12 : transition(ui::PAGE_TRANSITION_LINK),
13 navigation_type(FrameMsg_Navigate_Type::NORMAL),
14 allow_download(true),
15 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT) {
18 CommonNavigationParams::CommonNavigationParams(
19 const GURL& url,
20 const Referrer& referrer,
21 ui::PageTransition transition,
22 FrameMsg_Navigate_Type::Value navigation_type,
23 bool allow_download,
24 base::TimeTicks ui_timestamp,
25 FrameMsg_UILoadMetricsReportType::Value report_type,
26 const GURL& base_url_for_data_url,
27 const GURL& history_url_for_data_url)
28 : url(url),
29 referrer(referrer),
30 transition(transition),
31 navigation_type(navigation_type),
32 allow_download(allow_download),
33 ui_timestamp(ui_timestamp),
34 report_type(report_type),
35 base_url_for_data_url(base_url_for_data_url),
36 history_url_for_data_url(history_url_for_data_url) {
39 CommonNavigationParams::~CommonNavigationParams() {
42 BeginNavigationParams::BeginNavigationParams()
43 : load_flags(0), has_user_gesture(false) {
46 BeginNavigationParams::BeginNavigationParams(std::string method,
47 std::string headers,
48 int load_flags,
49 bool has_user_gesture)
50 : method(method),
51 headers(headers),
52 load_flags(load_flags),
53 has_user_gesture(has_user_gesture) {
56 StartNavigationParams::StartNavigationParams()
57 : is_post(false),
58 should_replace_current_entry(false),
59 transferred_request_child_id(-1),
60 transferred_request_request_id(-1) {
63 StartNavigationParams::StartNavigationParams(
64 bool is_post,
65 const std::string& extra_headers,
66 const std::vector<unsigned char>& browser_initiated_post_data,
67 bool should_replace_current_entry,
68 int transferred_request_child_id,
69 int transferred_request_request_id)
70 : is_post(is_post),
71 extra_headers(extra_headers),
72 browser_initiated_post_data(browser_initiated_post_data),
73 should_replace_current_entry(should_replace_current_entry),
74 transferred_request_child_id(transferred_request_child_id),
75 transferred_request_request_id(transferred_request_request_id) {
78 StartNavigationParams::~StartNavigationParams() {
81 RequestNavigationParams::RequestNavigationParams()
82 : is_overriding_user_agent(false),
83 browser_navigation_start(base::TimeTicks::Now()),
84 can_load_local_resources(false),
85 request_time(base::Time::Now()),
86 page_id(-1),
87 nav_entry_id(0),
88 is_same_document_history_load(false),
89 has_committed_real_load(false),
90 intended_as_new_entry(false),
91 pending_history_list_offset(-1),
92 current_history_list_offset(-1),
93 current_history_list_length(0),
94 should_clear_history_list(false) {
97 RequestNavigationParams::RequestNavigationParams(
98 bool is_overriding_user_agent,
99 base::TimeTicks navigation_start,
100 const std::vector<GURL>& redirects,
101 bool can_load_local_resources,
102 base::Time request_time,
103 const PageState& page_state,
104 int32 page_id,
105 int nav_entry_id,
106 bool is_same_document_history_load,
107 bool has_committed_real_load,
108 bool intended_as_new_entry,
109 int pending_history_list_offset,
110 int current_history_list_offset,
111 int current_history_list_length,
112 bool should_clear_history_list)
113 : is_overriding_user_agent(is_overriding_user_agent),
114 browser_navigation_start(navigation_start),
115 redirects(redirects),
116 can_load_local_resources(can_load_local_resources),
117 request_time(request_time),
118 page_state(page_state),
119 page_id(page_id),
120 nav_entry_id(nav_entry_id),
121 is_same_document_history_load(is_same_document_history_load),
122 has_committed_real_load(has_committed_real_load),
123 intended_as_new_entry(intended_as_new_entry),
124 pending_history_list_offset(pending_history_list_offset),
125 current_history_list_offset(current_history_list_offset),
126 current_history_list_length(current_history_list_length),
127 should_clear_history_list(should_clear_history_list) {
130 RequestNavigationParams::~RequestNavigationParams() {
133 NavigationParams::NavigationParams(
134 const CommonNavigationParams& common_params,
135 const StartNavigationParams& start_params,
136 const RequestNavigationParams& request_params)
137 : common_params(common_params),
138 start_params(start_params),
139 request_params(request_params) {
142 NavigationParams::~NavigationParams() {
145 } // namespace content