diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 00:59:34 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 00:59:34 +0000 |
commit | 541b7b0c37d6869f6ffecf8ada1d8bcfd2a919f8 (patch) | |
tree | b21b32646d015e52b58be2a75cfb39ded9e8d524 /content/child | |
parent | 4a3235d7241f45fb7e9c96e930693ed2c7de6554 (diff) | |
download | chromium_src-541b7b0c37d6869f6ffecf8ada1d8bcfd2a919f8.zip chromium_src-541b7b0c37d6869f6ffecf8ada1d8bcfd2a919f8.tar.gz chromium_src-541b7b0c37d6869f6ffecf8ada1d8bcfd2a919f8.tar.bz2 |
move request_extra_data.{cc,h} from content/common to content/child
R=jam@chromium.org
BUG=239107
Review URL: https://codereview.chromium.org/16103012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child')
-rw-r--r-- | content/child/request_extra_data.cc | 37 | ||||
-rw-r--r-- | content/child/request_extra_data.h | 60 | ||||
-rw-r--r-- | content/child/resource_dispatcher.cc | 2 | ||||
-rw-r--r-- | content/child/resource_dispatcher_unittest.cc | 2 |
4 files changed, 99 insertions, 2 deletions
diff --git a/content/child/request_extra_data.cc b/content/child/request_extra_data.cc new file mode 100644 index 0000000..ac2bed12 --- /dev/null +++ b/content/child/request_extra_data.cc @@ -0,0 +1,37 @@ +// Copyright (c) 2012 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 "content/child/request_extra_data.h" + +using WebKit::WebReferrerPolicy; +using WebKit::WebString; + +namespace content { + +RequestExtraData::RequestExtraData(WebReferrerPolicy referrer_policy, + const WebString& custom_user_agent, + bool is_main_frame, + int64 frame_id, + bool parent_is_main_frame, + int64 parent_frame_id, + bool allow_download, + PageTransition transition_type, + int transferred_request_child_id, + int transferred_request_request_id) + : webkit_glue::WebURLRequestExtraDataImpl(referrer_policy, + custom_user_agent), + is_main_frame_(is_main_frame), + frame_id_(frame_id), + parent_is_main_frame_(parent_is_main_frame), + parent_frame_id_(parent_frame_id), + allow_download_(allow_download), + transition_type_(transition_type), + transferred_request_child_id_(transferred_request_child_id), + transferred_request_request_id_(transferred_request_request_id) { +} + +RequestExtraData::~RequestExtraData() { +} + +} // namespace content diff --git a/content/child/request_extra_data.h b/content/child/request_extra_data.h new file mode 100644 index 0000000..5b890e6 --- /dev/null +++ b/content/child/request_extra_data.h @@ -0,0 +1,60 @@ +// Copyright (c) 2012 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. + +#ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ +#define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ + +#include "base/compiler_specific.h" +#include "content/common/content_export.h" +#include "content/public/common/page_transition_types.h" +#include "webkit/glue/weburlrequest_extradata_impl.h" + +namespace content { + +// The RenderView stores an instance of this class in the "extra data" of each +// ResourceRequest (see RenderView::willSendRequest). +class CONTENT_EXPORT RequestExtraData + : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { + public: + RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, + const WebKit::WebString& custom_user_agent, + bool is_main_frame, + int64 frame_id, + bool parent_is_main_frame, + int64 parent_frame_id, + bool allow_download, + PageTransition transition_type, + int transferred_request_child_id, + int transferred_request_request_id); + virtual ~RequestExtraData(); + + bool is_main_frame() const { return is_main_frame_; } + int64 frame_id() const { return frame_id_; } + bool parent_is_main_frame() const { return parent_is_main_frame_; } + int64 parent_frame_id() const { return parent_frame_id_; } + bool allow_download() const { return allow_download_; } + PageTransition transition_type() const { return transition_type_; } + int transferred_request_child_id() const { + return transferred_request_child_id_; + } + int transferred_request_request_id() const { + return transferred_request_request_id_; + } + + private: + bool is_main_frame_; + int64 frame_id_; + bool parent_is_main_frame_; + int64 parent_frame_id_; + bool allow_download_; + PageTransition transition_type_; + int transferred_request_child_id_; + int transferred_request_request_id_; + + DISALLOW_COPY_AND_ASSIGN(RequestExtraData); +}; + +} // namespace content + +#endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc index 98a2243..6065513 100644 --- a/content/child/resource_dispatcher.cc +++ b/content/child/resource_dispatcher.cc @@ -15,8 +15,8 @@ #include "base/metrics/histogram.h" #include "base/shared_memory.h" #include "base/string_util.h" +#include "content/child/request_extra_data.h" #include "content/common/inter_process_time_ticks_converter.h" -#include "content/common/request_extra_data.h" #include "content/common/resource_messages.h" #include "content/public/common/resource_dispatcher_delegate.h" #include "content/public/common/resource_response.h" diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc index 9621bbe..857c49a 100644 --- a/content/child/resource_dispatcher_unittest.cc +++ b/content/child/resource_dispatcher_unittest.cc @@ -9,8 +9,8 @@ #include "base/message_loop.h" #include "base/process.h" #include "base/process_util.h" +#include "content/child/request_extra_data.h" #include "content/child/resource_dispatcher.h" -#include "content/common/request_extra_data.h" #include "content/common/resource_messages.h" #include "content/public/common/resource_response.h" #include "net/base/net_errors.h" |