Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / navigation_controller.cc
blob6287fe5ab9492d52af3324a97173a798bcde787a
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"
9 namespace content {
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(nullptr),
19 can_load_local_resources(false),
20 should_replace_current_entry(false),
21 #if defined(OS_ANDROID)
22 intent_received_timestamp(0),
23 has_user_gesture(false),
24 #endif
25 should_clear_history_list(false) {
28 NavigationController::LoadURLParams::~LoadURLParams() {
31 NavigationController::LoadURLParams::LoadURLParams(
32 const NavigationController::LoadURLParams& other)
33 : url(other.url),
34 load_type(other.load_type),
35 transition_type(other.transition_type),
36 frame_tree_node_id(other.frame_tree_node_id),
37 referrer(other.referrer),
38 extra_headers(other.extra_headers),
39 is_renderer_initiated(other.is_renderer_initiated),
40 override_user_agent(other.override_user_agent),
41 transferred_global_request_id(other.transferred_global_request_id),
42 base_url_for_data_url(other.base_url_for_data_url),
43 virtual_url_for_data_url(other.virtual_url_for_data_url),
44 browser_initiated_post_data(other.browser_initiated_post_data),
45 should_replace_current_entry(false),
46 #if defined(OS_ANDROID)
47 intent_received_timestamp(other.intent_received_timestamp),
48 has_user_gesture(other.has_user_gesture),
49 #endif
50 should_clear_history_list(false) {
53 NavigationController::LoadURLParams&
54 NavigationController::LoadURLParams::operator=(
55 const NavigationController::LoadURLParams& other) {
56 url = other.url;
57 load_type = other.load_type;
58 transition_type = other.transition_type;
59 frame_tree_node_id = other.frame_tree_node_id;
60 referrer = other.referrer;
61 redirect_chain = other.redirect_chain;
62 extra_headers = other.extra_headers;
63 is_renderer_initiated = other.is_renderer_initiated;
64 override_user_agent = other.override_user_agent;
65 transferred_global_request_id = other.transferred_global_request_id;
66 base_url_for_data_url = other.base_url_for_data_url;
67 virtual_url_for_data_url = other.virtual_url_for_data_url;
68 browser_initiated_post_data = other.browser_initiated_post_data;
69 should_replace_current_entry = other.should_replace_current_entry;
70 should_clear_history_list = other.should_clear_history_list;
71 #if defined(OS_ANDROID)
72 intent_received_timestamp = other.intent_received_timestamp;
73 has_user_gesture = other.has_user_gesture;
74 #endif
76 return *this;
79 } // namespace content