1 // Copyright (c) 2012 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/public/browser/navigation_controller.h"
7 #include "base/memory/ref_counted_memory.h"
11 NavigationController::LoadURLParams::LoadURLParams(const GURL
& url
)
13 load_type(LOAD_TYPE_DEFAULT
),
14 transition_type(ui::PAGE_TRANSITION_LINK
),
15 frame_tree_node_id(-1),
16 is_renderer_initiated(false),
17 override_user_agent(UA_OVERRIDE_INHERIT
),
18 browser_initiated_post_data(nullptr),
19 can_load_local_resources(false),
20 should_replace_current_entry(false),
21 should_clear_history_list(false) {
22 #if defined(OS_ANDROID)
23 intent_received_timestamp
= 0;
27 NavigationController::LoadURLParams::~LoadURLParams() {
30 NavigationController::LoadURLParams::LoadURLParams(
31 const NavigationController::LoadURLParams
& other
)
33 load_type(other
.load_type
),
34 transition_type(other
.transition_type
),
35 frame_tree_node_id(other
.frame_tree_node_id
),
36 referrer(other
.referrer
),
37 extra_headers(other
.extra_headers
),
38 is_renderer_initiated(other
.is_renderer_initiated
),
39 override_user_agent(other
.override_user_agent
),
40 transferred_global_request_id(other
.transferred_global_request_id
),
41 base_url_for_data_url(other
.base_url_for_data_url
),
42 virtual_url_for_data_url(other
.virtual_url_for_data_url
),
43 browser_initiated_post_data(other
.browser_initiated_post_data
),
44 should_replace_current_entry(false),
45 should_clear_history_list(false) {
46 #if defined(OS_ANDROID)
47 intent_received_timestamp
= other
.intent_received_timestamp
;
51 NavigationController::LoadURLParams
&
52 NavigationController::LoadURLParams::operator=(
53 const NavigationController::LoadURLParams
& other
) {
55 load_type
= other
.load_type
;
56 transition_type
= other
.transition_type
;
57 frame_tree_node_id
= other
.frame_tree_node_id
;
58 referrer
= other
.referrer
;
59 redirect_chain
= other
.redirect_chain
;
60 extra_headers
= other
.extra_headers
;
61 is_renderer_initiated
= other
.is_renderer_initiated
;
62 override_user_agent
= other
.override_user_agent
;
63 transferred_global_request_id
= other
.transferred_global_request_id
;
64 base_url_for_data_url
= other
.base_url_for_data_url
;
65 virtual_url_for_data_url
= other
.virtual_url_for_data_url
;
66 browser_initiated_post_data
= other
.browser_initiated_post_data
;
67 should_replace_current_entry
= other
.should_replace_current_entry
;
68 should_clear_history_list
= other
.should_clear_history_list
;
69 #if defined(OS_ANDROID)
70 intent_received_timestamp
= other
.intent_received_timestamp
;
76 } // namespace content