Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / common / navigation_params.cc
blob31787acb9751c5864e2b6062218da2d682286aa6
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 {
10 CommonNavigationParams::CommonNavigationParams()
11 : transition(ui::PAGE_TRANSITION_LINK),
12 navigation_type(FrameMsg_Navigate_Type::NORMAL),
13 allow_download(true) {
16 CommonNavigationParams::~CommonNavigationParams() {}
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 : url(url),
25 referrer(referrer),
26 transition(transition),
27 navigation_type(navigation_type),
28 allow_download(allow_download) {
31 RequestNavigationParams::RequestNavigationParams() : is_post(false) {}
33 RequestNavigationParams::RequestNavigationParams(
34 bool is_post,
35 const std::string& extra_headers,
36 const base::RefCountedMemory* post_data)
37 : is_post(is_post),
38 extra_headers(extra_headers) {
39 if (post_data) {
40 browser_initiated_post_data.assign(
41 post_data->front(), post_data->front() + post_data->size());
45 RequestNavigationParams::~RequestNavigationParams() {}
47 CommitNavigationParams::CommitNavigationParams()
48 : is_overriding_user_agent(false) {
51 CommitNavigationParams::CommitNavigationParams(const PageState& page_state,
52 bool is_overriding_user_agent,
53 base::TimeTicks navigation_start)
54 : page_state(page_state),
55 is_overriding_user_agent(is_overriding_user_agent),
56 browser_navigation_start(navigation_start) {
59 CommitNavigationParams::~CommitNavigationParams() {}
61 } // namespace content