| OLD | NEW | 
|---|
| 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/command_line.h" | 7 #include "base/command_line.h" | 
| 8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.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/content_switches.h" | 10 #include "content/public/common/content_switches.h" | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 23   return !url.SchemeIs(url::kDataScheme) && url != GURL(url::kAboutBlankURL) && | 23   return !url.SchemeIs(url::kDataScheme) && url != GURL(url::kAboutBlankURL) && | 
| 24          !url.SchemeIs(url::kJavaScriptScheme); | 24          !url.SchemeIs(url::kJavaScriptScheme); | 
| 25 } | 25 } | 
| 26 | 26 | 
| 27 CommonNavigationParams::CommonNavigationParams() | 27 CommonNavigationParams::CommonNavigationParams() | 
| 28     : transition(ui::PAGE_TRANSITION_LINK), | 28     : transition(ui::PAGE_TRANSITION_LINK), | 
| 29       navigation_type(FrameMsg_Navigate_Type::NORMAL), | 29       navigation_type(FrameMsg_Navigate_Type::NORMAL), | 
| 30       allow_download(true), | 30       allow_download(true), | 
| 31       should_replace_current_entry(false), | 31       should_replace_current_entry(false), | 
| 32       report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), | 32       report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), | 
| 33       lofi_state(LOFI_UNSPECIFIED) { | 33       lofi_state(LOFI_UNSPECIFIED), | 
|  | 34       navigation_start(base::TimeTicks::Now()) { | 
| 34 } | 35 } | 
| 35 | 36 | 
| 36 CommonNavigationParams::CommonNavigationParams( | 37 CommonNavigationParams::CommonNavigationParams( | 
| 37     const GURL& url, | 38     const GURL& url, | 
| 38     const Referrer& referrer, | 39     const Referrer& referrer, | 
| 39     ui::PageTransition transition, | 40     ui::PageTransition transition, | 
| 40     FrameMsg_Navigate_Type::Value navigation_type, | 41     FrameMsg_Navigate_Type::Value navigation_type, | 
| 41     bool allow_download, | 42     bool allow_download, | 
| 42     bool should_replace_current_entry, | 43     bool should_replace_current_entry, | 
| 43     base::TimeTicks ui_timestamp, | 44     base::TimeTicks ui_timestamp, | 
| 44     FrameMsg_UILoadMetricsReportType::Value report_type, | 45     FrameMsg_UILoadMetricsReportType::Value report_type, | 
| 45     const GURL& base_url_for_data_url, | 46     const GURL& base_url_for_data_url, | 
| 46     const GURL& history_url_for_data_url, | 47     const GURL& history_url_for_data_url, | 
| 47     LoFiState lofi_state) | 48     LoFiState lofi_state, | 
|  | 49     const base::TimeTicks& navigation_start) | 
| 48     : url(url), | 50     : url(url), | 
| 49       referrer(referrer), | 51       referrer(referrer), | 
| 50       transition(transition), | 52       transition(transition), | 
| 51       navigation_type(navigation_type), | 53       navigation_type(navigation_type), | 
| 52       allow_download(allow_download), | 54       allow_download(allow_download), | 
| 53       should_replace_current_entry(should_replace_current_entry), | 55       should_replace_current_entry(should_replace_current_entry), | 
| 54       ui_timestamp(ui_timestamp), | 56       ui_timestamp(ui_timestamp), | 
| 55       report_type(report_type), | 57       report_type(report_type), | 
| 56       base_url_for_data_url(base_url_for_data_url), | 58       base_url_for_data_url(base_url_for_data_url), | 
| 57       history_url_for_data_url(history_url_for_data_url), | 59       history_url_for_data_url(history_url_for_data_url), | 
| 58       lofi_state(lofi_state) { | 60       lofi_state(lofi_state), | 
|  | 61       navigation_start(navigation_start) { | 
| 59 } | 62 } | 
| 60 | 63 | 
| 61 CommonNavigationParams::~CommonNavigationParams() { | 64 CommonNavigationParams::~CommonNavigationParams() { | 
| 62 } | 65 } | 
| 63 | 66 | 
| 64 BeginNavigationParams::BeginNavigationParams() | 67 BeginNavigationParams::BeginNavigationParams() | 
| 65     : load_flags(0), | 68     : load_flags(0), | 
| 66       has_user_gesture(false), | 69       has_user_gesture(false), | 
| 67       skip_service_worker(false), | 70       skip_service_worker(false), | 
| 68       request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} | 71       request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 107 #endif | 110 #endif | 
| 108       transferred_request_child_id(transferred_request_child_id), | 111       transferred_request_child_id(transferred_request_child_id), | 
| 109       transferred_request_request_id(transferred_request_request_id) { | 112       transferred_request_request_id(transferred_request_request_id) { | 
| 110 } | 113 } | 
| 111 | 114 | 
| 112 StartNavigationParams::~StartNavigationParams() { | 115 StartNavigationParams::~StartNavigationParams() { | 
| 113 } | 116 } | 
| 114 | 117 | 
| 115 RequestNavigationParams::RequestNavigationParams() | 118 RequestNavigationParams::RequestNavigationParams() | 
| 116     : is_overriding_user_agent(false), | 119     : is_overriding_user_agent(false), | 
| 117       browser_navigation_start(base::TimeTicks::Now()), |  | 
| 118       can_load_local_resources(false), | 120       can_load_local_resources(false), | 
| 119       request_time(base::Time::Now()), | 121       request_time(base::Time::Now()), | 
| 120       page_id(-1), | 122       page_id(-1), | 
| 121       nav_entry_id(0), | 123       nav_entry_id(0), | 
| 122       is_same_document_history_load(false), | 124       is_same_document_history_load(false), | 
| 123       has_committed_real_load(false), | 125       has_committed_real_load(false), | 
| 124       intended_as_new_entry(false), | 126       intended_as_new_entry(false), | 
| 125       pending_history_list_offset(-1), | 127       pending_history_list_offset(-1), | 
| 126       current_history_list_offset(-1), | 128       current_history_list_offset(-1), | 
| 127       current_history_list_length(0), | 129       current_history_list_length(0), | 
| 128       should_clear_history_list(false), | 130       should_clear_history_list(false), | 
| 129       should_create_service_worker(false), | 131       should_create_service_worker(false), | 
| 130       service_worker_provider_id(kInvalidServiceWorkerProviderId) {} | 132       service_worker_provider_id(kInvalidServiceWorkerProviderId) {} | 
| 131 | 133 | 
| 132 RequestNavigationParams::RequestNavigationParams( | 134 RequestNavigationParams::RequestNavigationParams( | 
| 133     bool is_overriding_user_agent, | 135     bool is_overriding_user_agent, | 
| 134     base::TimeTicks navigation_start, |  | 
| 135     const std::vector<GURL>& redirects, | 136     const std::vector<GURL>& redirects, | 
| 136     bool can_load_local_resources, | 137     bool can_load_local_resources, | 
| 137     base::Time request_time, | 138     base::Time request_time, | 
| 138     const PageState& page_state, | 139     const PageState& page_state, | 
| 139     int32 page_id, | 140     int32 page_id, | 
| 140     int nav_entry_id, | 141     int nav_entry_id, | 
| 141     bool is_same_document_history_load, | 142     bool is_same_document_history_load, | 
| 142     bool has_committed_real_load, | 143     bool has_committed_real_load, | 
| 143     bool intended_as_new_entry, | 144     bool intended_as_new_entry, | 
| 144     int pending_history_list_offset, | 145     int pending_history_list_offset, | 
| 145     int current_history_list_offset, | 146     int current_history_list_offset, | 
| 146     int current_history_list_length, | 147     int current_history_list_length, | 
| 147     bool should_clear_history_list) | 148     bool should_clear_history_list) | 
| 148     : is_overriding_user_agent(is_overriding_user_agent), | 149     : is_overriding_user_agent(is_overriding_user_agent), | 
| 149       browser_navigation_start(navigation_start), |  | 
| 150       redirects(redirects), | 150       redirects(redirects), | 
| 151       can_load_local_resources(can_load_local_resources), | 151       can_load_local_resources(can_load_local_resources), | 
| 152       request_time(request_time), | 152       request_time(request_time), | 
| 153       page_state(page_state), | 153       page_state(page_state), | 
| 154       page_id(page_id), | 154       page_id(page_id), | 
| 155       nav_entry_id(nav_entry_id), | 155       nav_entry_id(nav_entry_id), | 
| 156       is_same_document_history_load(is_same_document_history_load), | 156       is_same_document_history_load(is_same_document_history_load), | 
| 157       has_committed_real_load(has_committed_real_load), | 157       has_committed_real_load(has_committed_real_load), | 
| 158       intended_as_new_entry(intended_as_new_entry), | 158       intended_as_new_entry(intended_as_new_entry), | 
| 159       pending_history_list_offset(pending_history_list_offset), | 159       pending_history_list_offset(pending_history_list_offset), | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 172     const RequestNavigationParams& request_params) | 172     const RequestNavigationParams& request_params) | 
| 173     : common_params(common_params), | 173     : common_params(common_params), | 
| 174       start_params(start_params), | 174       start_params(start_params), | 
| 175       request_params(request_params) { | 175       request_params(request_params) { | 
| 176 } | 176 } | 
| 177 | 177 | 
| 178 NavigationParams::~NavigationParams() { | 178 NavigationParams::~NavigationParams() { | 
| 179 } | 179 } | 
| 180 | 180 | 
| 181 }  // namespace content | 181 }  // namespace content | 
| OLD | NEW | 
|---|