document_state.cc revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
1c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor// Use of this source code is governed by a BSD-style license that can be
3c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor// found in the LICENSE file.
4c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor
5c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor#include "content/public/renderer/document_state.h"
6c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor
7c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor#include "content/public/common/password_form.h"
8c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor#include "content/public/renderer/navigation_state.h"
9931a4feb64f18190d189c222d61b2abf52f18ab8Tim Northover
10c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregornamespace content {
11931a4feb64f18190d189c222d61b2abf52f18ab8Tim Northover
12c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas GregorDocumentState::DocumentState()
13931a4feb64f18190d189c222d61b2abf52f18ab8Tim Northover    : load_histograms_recorded_(false),
14c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor      web_timing_histograms_recorded_(false),
15c0265406a82d391a5fc60d16dd1c6cd61a92cfceDouglas Gregor      was_fetched_via_spdy_(false),
16      was_npn_negotiated_(false),
17      was_alternate_protocol_available_(false),
18      was_fetched_via_proxy_(false),
19      was_prefetcher_(false),
20      was_referred_by_prefetcher_(false),
21      load_type_(UNDEFINED_LOAD),
22      can_load_local_resources_(false) {
23}
24
25DocumentState::~DocumentState() {}
26
27void DocumentState::set_password_form_data(
28    scoped_ptr<PasswordForm> data) {
29  password_form_data_.reset(data.release());
30}
31
32void DocumentState::set_navigation_state(NavigationState* navigation_state) {
33  navigation_state_.reset(navigation_state);
34}
35
36}  // namespace content
37