summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/navigation_state.cc
blob: fe1c6d9cf0ecdbdb8208238cd6a9b65aadee961b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/renderer/navigation_state.h"

#include "chrome/renderer/user_script_idle_scheduler.h"
#include "webkit/glue/alt_error_page_resource_fetcher.h"
#include "webkit/glue/password_form.h"

NavigationState::~NavigationState() {}

void NavigationState::set_user_script_idle_scheduler(
    UserScriptIdleScheduler* scheduler) {
  user_script_idle_scheduler_.reset(scheduler);
}

void NavigationState::set_password_form_data(webkit_glue::PasswordForm* data) {
  password_form_data_.reset(data);
}

void NavigationState::set_alt_error_page_fetcher(
    webkit_glue::AltErrorPageResourceFetcher* f) {
  alt_error_page_fetcher_.reset(f);
}

NavigationState::NavigationState(PageTransition::Type transition_type,
                                 const base::Time& request_time,
                                 bool is_content_initiated,
                                 int32 pending_page_id,
                                 int pending_history_list_offset)
    : transition_type_(transition_type),
      load_type_(UNDEFINED_LOAD),
      request_time_(request_time),
      load_histograms_recorded_(false),
      request_committed_(false),
      is_content_initiated_(is_content_initiated),
      pending_page_id_(pending_page_id),
      pending_history_list_offset_(pending_history_list_offset),
      postpone_loading_data_(false),
      cache_policy_override_set_(false),
      cache_policy_override_(WebKit::WebURLRequest::UseProtocolCachePolicy),
      user_script_idle_scheduler_(NULL),
      http_status_code_(0),
      was_fetched_via_spdy_(false),
      was_npn_negotiated_(false),
      was_alternate_protocol_available_(false),
      was_fetched_via_proxy_(false),
      was_translated_(false),
      was_within_same_page_(false),
      was_prefetcher_(false),
      was_referred_by_prefetcher_(false) {
}