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.
4
5 #include "content/public/browser/navigation_controller.h"
6
7 #include "base/memory/ref_counted_memory.h"
8
9 namespace content {
10
LoadURLParams(const GURL & url)11 NavigationController::LoadURLParams::LoadURLParams(const GURL& url)
12 : url(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(NULL),
19 can_load_local_resources(false),
20 should_replace_current_entry(false),
21 should_clear_history_list(false) {
22 }
23
~LoadURLParams()24 NavigationController::LoadURLParams::~LoadURLParams() {
25 }
26
LoadURLParams(const NavigationController::LoadURLParams & other)27 NavigationController::LoadURLParams::LoadURLParams(
28 const NavigationController::LoadURLParams& other)
29 : url(other.url),
30 load_type(other.load_type),
31 transition_type(other.transition_type),
32 frame_tree_node_id(other.frame_tree_node_id),
33 referrer(other.referrer),
34 extra_headers(other.extra_headers),
35 is_renderer_initiated(other.is_renderer_initiated),
36 override_user_agent(other.override_user_agent),
37 transferred_global_request_id(other.transferred_global_request_id),
38 base_url_for_data_url(other.base_url_for_data_url),
39 virtual_url_for_data_url(other.virtual_url_for_data_url),
40 browser_initiated_post_data(other.browser_initiated_post_data),
41 should_replace_current_entry(false),
42 should_clear_history_list(false) {
43 }
44
45 NavigationController::LoadURLParams&
operator =(const NavigationController::LoadURLParams & other)46 NavigationController::LoadURLParams::operator=(
47 const NavigationController::LoadURLParams& other) {
48 url = other.url;
49 load_type = other.load_type;
50 transition_type = other.transition_type;
51 frame_tree_node_id = other.frame_tree_node_id;
52 referrer = other.referrer;
53 redirect_chain = other.redirect_chain;
54 extra_headers = other.extra_headers;
55 is_renderer_initiated = other.is_renderer_initiated;
56 override_user_agent = other.override_user_agent;
57 transferred_global_request_id = other.transferred_global_request_id;
58 base_url_for_data_url = other.base_url_for_data_url;
59 virtual_url_for_data_url = other.virtual_url_for_data_url;
60 browser_initiated_post_data = other.browser_initiated_post_data;
61 should_replace_current_entry = other.should_replace_current_entry;
62 should_clear_history_list = other.should_clear_history_list;
63
64 return *this;
65 }
66
67 } // namespace content
68