summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc3
-rw-r--r--content/browser/loader/upload_data_stream_builder.cc3
-rw-r--r--content/browser/loader/upload_data_stream_builder.h8
-rw-r--r--content/browser/loader/upload_data_stream_builder_unittest.cc3
-rw-r--r--content/child/npapi/plugin_url_fetcher.cc6
-rw-r--r--content/child/resource_dispatcher.cc1
-rw-r--r--content/child/web_url_loader_impl.cc3
-rw-r--r--content/common/resource_messages.cc10
-rw-r--r--content/common/resource_messages.h8
-rw-r--r--content/common/resource_request_body.cc (renamed from webkit/common/resource_request_body.cc)8
-rw-r--r--content/common/resource_request_body.h (renamed from webkit/common/resource_request_body.h)16
-rw-r--r--content/content_common.gypi2
-rw-r--r--webkit/child/resource_loader_bridge.h9
-rw-r--r--webkit/common/webkit_common.gyp2
14 files changed, 40 insertions, 42 deletions
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index c17a003..94899d5 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -53,6 +53,7 @@
#include "content/browser/worker_host/worker_service_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/resource_messages.h"
+#include "content/common/resource_request_body.h"
#include "content/common/ssl_status_serialization.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_thread.h"
@@ -94,13 +95,11 @@
#include "webkit/browser/fileapi/file_system_context.h"
#include "webkit/common/appcache/appcache_interfaces.h"
#include "webkit/common/blob/shareable_file_reference.h"
-#include "webkit/common/resource_request_body.h"
using base::Time;
using base::TimeDelta;
using base::TimeTicks;
using webkit_blob::ShareableFileReference;
-using webkit_glue::ResourceRequestBody;
// ----------------------------------------------------------------------------
diff --git a/content/browser/loader/upload_data_stream_builder.cc b/content/browser/loader/upload_data_stream_builder.cc
index 2e9a606..2db9fdf 100644
--- a/content/browser/loader/upload_data_stream_builder.cc
+++ b/content/browser/loader/upload_data_stream_builder.cc
@@ -6,17 +6,16 @@
#include "base/logging.h"
#include "content/browser/fileapi/upload_file_system_file_element_reader.h"
+#include "content/common/resource_request_body.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
#include "net/base/upload_file_element_reader.h"
#include "webkit/browser/blob/blob_data_handle.h"
#include "webkit/browser/blob/blob_storage_context.h"
-#include "webkit/common/resource_request_body.h"
using webkit_blob::BlobData;
using webkit_blob::BlobDataHandle;
using webkit_blob::BlobStorageContext;
-using webkit_glue::ResourceRequestBody;
namespace content {
namespace {
diff --git a/content/browser/loader/upload_data_stream_builder.h b/content/browser/loader/upload_data_stream_builder.h
index e2b6ce3..60b6f33 100644
--- a/content/browser/loader/upload_data_stream_builder.h
+++ b/content/browser/loader/upload_data_stream_builder.h
@@ -24,12 +24,10 @@ namespace webkit_blob {
class BlobStorageContext;
}
-namespace webkit_glue {
-class ResourceRequestBody;
-}
-
namespace content {
+class ResourceRequestBody;
+
class CONTENT_EXPORT UploadDataStreamBuilder {
public:
// Creates a new UploadDataStream from this request body.
@@ -43,7 +41,7 @@ class CONTENT_EXPORT UploadDataStreamBuilder {
// filesystem URLs. |file_task_runner| is used to perform file operations
// when the data gets uploaded.
static scoped_ptr<net::UploadDataStream> Build(
- webkit_glue::ResourceRequestBody* body,
+ ResourceRequestBody* body,
webkit_blob::BlobStorageContext* blob_context,
fileapi::FileSystemContext* file_system_context,
base::TaskRunner* file_task_runner);
diff --git a/content/browser/loader/upload_data_stream_builder_unittest.cc b/content/browser/loader/upload_data_stream_builder_unittest.cc
index 4c9661c..dba3dff 100644
--- a/content/browser/loader/upload_data_stream_builder_unittest.cc
+++ b/content/browser/loader/upload_data_stream_builder_unittest.cc
@@ -11,18 +11,17 @@
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/time/time.h"
+#include "content/common/resource_request_body.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
#include "net/base/upload_file_element_reader.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "webkit/browser/blob/blob_storage_context.h"
-#include "webkit/common/resource_request_body.h"
using webkit_blob::BlobData;
using webkit_blob::BlobDataHandle;
using webkit_blob::BlobStorageContext;
-using webkit_glue::ResourceRequestBody;
namespace content {
namespace {
diff --git a/content/child/npapi/plugin_url_fetcher.cc b/content/child/npapi/plugin_url_fetcher.cc
index bc2b6f0..2a5c46b 100644
--- a/content/child/npapi/plugin_url_fetcher.cc
+++ b/content/child/npapi/plugin_url_fetcher.cc
@@ -15,6 +15,7 @@
#include "content/child/request_extra_data.h"
#include "content/child/resource_dispatcher.h"
#include "content/child/web_url_loader_impl.h"
+#include "content/common/resource_request_body.h"
#include "content/common/service_worker/service_worker_types.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
@@ -22,7 +23,6 @@
#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "webkit/child/multipart_response_delegate.h"
-#include "webkit/common/resource_request_body.h"
namespace content {
namespace {
@@ -148,8 +148,8 @@ PluginURLFetcher::PluginURLFetcher(PluginStreamUrl* plugin_stream,
bridge_.reset(ChildThread::current()->resource_dispatcher()->CreateBridge(
request_info));
if (!body.empty()) {
- scoped_refptr<webkit_glue::ResourceRequestBody> request_body =
- new webkit_glue::ResourceRequestBody;
+ scoped_refptr<ResourceRequestBody> request_body =
+ new ResourceRequestBody;
request_body->AppendBytes(&body[0], body.size());
bridge_->SetRequestBody(request_body.get());
}
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 27ee442..c332de4 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -29,7 +29,6 @@
#include "webkit/common/resource_type.h"
using webkit_glue::ResourceLoaderBridge;
-using webkit_glue::ResourceRequestBody;
using webkit_glue::ResourceResponseInfo;
namespace content {
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index cbdb763..dec6d29 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "content/child/blink_platform_impl.h"
+#include "content/common/resource_request_body.h"
#include "net/base/data_url.h"
#include "net/base/load_flags.h"
#include "net/base/mime_util.h"
@@ -35,7 +36,6 @@
#include "webkit/child/resource_loader_bridge.h"
#include "webkit/child/weburlrequest_extradata_impl.h"
#include "webkit/child/weburlresponse_extradata_impl.h"
-#include "webkit/common/resource_request_body.h"
using base::Time;
using base::TimeTicks;
@@ -57,7 +57,6 @@ using webkit_glue::FtpDirectoryListingResponseDelegate;
using webkit_glue::MultipartResponseDelegate;
using webkit_glue::ResourceDevToolsInfo;
using webkit_glue::ResourceLoaderBridge;
-using webkit_glue::ResourceRequestBody;
using webkit_glue::ResourceResponseInfo;
using webkit_glue::WebURLResponseExtraDataImpl;
diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc
index 87f9e9f..ae8f88c 100644
--- a/content/common/resource_messages.cc
+++ b/content/common/resource_messages.cc
@@ -259,7 +259,7 @@ void ParamTraits<net::LoadTimingInfo>::Log(const param_type& p,
l->append(")");
}
-void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Write(
+void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Write(
Message* m,
const param_type& p) {
WriteParam(m, p.get() != NULL);
@@ -269,7 +269,7 @@ void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Write(
}
}
-bool ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Read(
+bool ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Read(
const Message* m,
PickleIterator* iter,
param_type* r) {
@@ -284,15 +284,15 @@ bool ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Read(
int64 identifier;
if (!ReadParam(m, iter, &identifier))
return false;
- *r = new webkit_glue::ResourceRequestBody;
+ *r = new content::ResourceRequestBody;
(*r)->swap_elements(&elements);
(*r)->set_identifier(identifier);
return true;
}
-void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log(
+void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log(
const param_type& p, std::string* l) {
- l->append("<webkit_glue::ResourceRequestBody>");
+ l->append("<ResourceRequestBody>");
}
} // namespace IPC
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h
index 6070c50..73a5956 100644
--- a/content/common/resource_messages.h
+++ b/content/common/resource_messages.h
@@ -10,12 +10,12 @@
#include "base/memory/shared_memory.h"
#include "base/process/process.h"
#include "content/common/content_param_traits_macros.h"
+#include "content/common/resource_request_body.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/resource_response.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/request_priority.h"
#include "net/http/http_response_info.h"
-#include "webkit/common/resource_request_body.h"
#ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_
#define CONTENT_COMMON_RESOURCE_MESSAGES_H_
@@ -63,8 +63,8 @@ struct ParamTraits<net::LoadTimingInfo> {
};
template <>
-struct ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> > {
- typedef scoped_refptr<webkit_glue::ResourceRequestBody> param_type;
+struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > {
+ typedef scoped_refptr<content::ResourceRequestBody> param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
@@ -175,7 +175,7 @@ IPC_STRUCT_BEGIN(ResourceHostMsg_Request)
IPC_STRUCT_MEMBER(int, service_worker_provider_id)
// Optional resource request body (may be null).
- IPC_STRUCT_MEMBER(scoped_refptr<webkit_glue::ResourceRequestBody>,
+ IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>,
request_body)
IPC_STRUCT_MEMBER(bool, download_to_file)
diff --git a/webkit/common/resource_request_body.cc b/content/common/resource_request_body.cc
index 42b798f..1de7f9e 100644
--- a/webkit/common/resource_request_body.cc
+++ b/content/common/resource_request_body.cc
@@ -1,10 +1,10 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 "webkit/common/resource_request_body.h"
+#include "content/common/resource_request_body.h"
-namespace webkit_glue {
+namespace content {
ResourceRequestBody::ResourceRequestBody()
: identifier_(0) {
@@ -42,4 +42,4 @@ void ResourceRequestBody::AppendFileSystemFileRange(
ResourceRequestBody::~ResourceRequestBody() {
}
-} // namespace webkit_glue
+} // namespace content
diff --git a/webkit/common/resource_request_body.h b/content/common/resource_request_body.h
index ccfc1f3..c060c723 100644
--- a/webkit/common/resource_request_body.h
+++ b/content/common/resource_request_body.h
@@ -1,28 +1,28 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_
-#define WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_
+#ifndef CONTENT_COMMON_RESOURCE_REQUEST_BODY_H_
+#define CONTENT_COMMON_RESOURCE_REQUEST_BODY_H_
#include <vector>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/supports_user_data.h"
+#include "content/common/content_export.h"
#include "url/gurl.h"
#include "webkit/common/data_element.h"
-#include "webkit/common/webkit_common_export.h"
namespace base {
class FilePath;
}
-namespace webkit_glue {
+namespace content {
// A struct used to represent upload data. The data field is populated by
// WebURLLoader from the data given as WebHTTPBody.
-class WEBKIT_COMMON_EXPORT ResourceRequestBody
+class CONTENT_EXPORT ResourceRequestBody
: public base::RefCounted<ResourceRequestBody>,
public base::SupportsUserData {
public:
@@ -60,6 +60,6 @@ class WEBKIT_COMMON_EXPORT ResourceRequestBody
DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody);
};
-} // namespace webkit_glue
+} // namespace content
-#endif // WEBKIT_COMMON_RESOURCE_REQUEST_BODY_H_
+#endif // CONTENT_COMMON_RESOURCE_REQUEST_BODY_H_
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 0c46e2a..64d55be 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -349,6 +349,8 @@
'common/quota_messages.h',
'common/resource_messages.cc',
'common/resource_messages.h',
+ 'common/resource_request_body.cc',
+ 'common/resource_request_body.h',
'common/sandbox_init_mac.cc',
'common/sandbox_init_mac.h',
'common/sandbox_init_win.cc',
diff --git a/webkit/child/resource_loader_bridge.h b/webkit/child/resource_loader_bridge.h
index 2a54d616..7532386 100644
--- a/webkit/child/resource_loader_bridge.h
+++ b/webkit/child/resource_loader_bridge.h
@@ -33,8 +33,13 @@
#include "webkit/common/resource_response_info.h"
#include "webkit/common/resource_type.h"
-namespace webkit_glue {
+// TODO(pilgrim) remove this once resource loader is moved to content
+// http://crbug.com/338338
+namespace content {
class ResourceRequestBody;
+}
+
+namespace webkit_glue {
class ResourceLoaderBridge {
public:
@@ -191,7 +196,7 @@ class ResourceLoaderBridge {
// Call this method before calling Start() to set the request body.
// May only be used with HTTP(S) POST requests.
- virtual void SetRequestBody(ResourceRequestBody* request_body) = 0;
+ virtual void SetRequestBody(content::ResourceRequestBody* request_body) = 0;
// Call this method to initiate the request. If this method succeeds, then
// the peer's methods will be called asynchronously to report various events.
diff --git a/webkit/common/webkit_common.gyp b/webkit/common/webkit_common.gyp
index 33eec7c..0342642 100644
--- a/webkit/common/webkit_common.gyp
+++ b/webkit/common/webkit_common.gyp
@@ -50,8 +50,6 @@
'data_element.h',
'resource_devtools_info.cc',
'resource_devtools_info.h',
- 'resource_request_body.cc',
- 'resource_request_body.h',
'resource_response_info.cc',
'resource_response_info.h',
'resource_type.cc',