Commit 48ffdf71 authored by pilgrim@chromium.org's avatar pilgrim@chromium.org

Move resource_devtools_info from webkit/ to content/

BUG=338338
TBR=darin@chromium.org

Review URL: https://codereview.chromium.org/298293010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273992 0039d316-1c4b-4281-b951-d872f2087c98
parent 6094ed46
......@@ -7,8 +7,8 @@
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "content/public/common/resource_devtools_info.h"
#include "net/base/net_log.h"
#include "webkit/common/resource_devtools_info.h"
namespace net {
class URLRequest;
......@@ -25,7 +25,7 @@ struct ResourceResponse;
// IO Thread, it must also reside on the IO Thread. Only OnAddEntry can be
// called from other threads.
class DevToolsNetLogObserver : public net::NetLog::ThreadSafeObserver {
typedef webkit_glue::ResourceDevToolsInfo ResourceInfo;
typedef ResourceDevToolsInfo ResourceInfo;
public:
// net::NetLog::ThreadSafeObserver implementation:
......
......@@ -58,7 +58,6 @@ using blink::WebURLLoaderClient;
using blink::WebURLRequest;
using blink::WebURLResponse;
using webkit_glue::MultipartResponseDelegate;
using webkit_glue::ResourceDevToolsInfo;
using webkit_glue::ResourceLoaderBridge;
using webkit_glue::WebURLResponseExtraDataImpl;
......
......@@ -134,7 +134,7 @@ void ParamTraits<webkit_common::DataElement>::Log(
l->append("<webkit_common::DataElement>");
}
void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Write(
void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Write(
Message* m, const param_type& p) {
WriteParam(m, p.get() != NULL);
if (p.get()) {
......@@ -147,14 +147,14 @@ void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Write(
}
}
bool ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Read(
bool ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Read(
const Message* m, PickleIterator* iter, param_type* r) {
bool has_object;
if (!ReadParam(m, iter, &has_object))
return false;
if (!has_object)
return true;
*r = new webkit_glue::ResourceDevToolsInfo();
*r = new content::ResourceDevToolsInfo();
return
ReadParam(m, iter, &(*r)->http_status_code) &&
ReadParam(m, iter, &(*r)->http_status_text) &&
......@@ -164,7 +164,7 @@ bool ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Read(
ReadParam(m, iter, &(*r)->response_headers_text);
}
void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Log(
void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Log(
const param_type& p, std::string* l) {
l->append("(");
if (p.get()) {
......
......@@ -24,7 +24,7 @@ namespace net {
struct LoadTimingInfo;
}
namespace webkit_glue {
namespace content {
struct ResourceDevToolsInfo;
}
......@@ -47,8 +47,8 @@ struct CONTENT_EXPORT ParamTraits<webkit_common::DataElement> {
};
template <>
struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > {
typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type;
struct ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> > {
typedef scoped_refptr<content::ResourceDevToolsInfo> 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);
......
......@@ -89,6 +89,8 @@
'public/common/referrer.h',
'public/common/renderer_preferences.cc',
'public/common/renderer_preferences.h',
'public/common/resource_devtools_info.cc',
'public/common/resource_devtools_info.h',
'public/common/resource_response.h',
'public/common/resource_response_info.cc',
'public/common/resource_response_info.h',
......
// 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_devtools_info.h"
#include "content/public/common/resource_devtools_info.h"
namespace webkit_glue {
namespace content {
ResourceDevToolsInfo::ResourceDevToolsInfo()
: http_status_code(0) {
......@@ -13,4 +13,4 @@ ResourceDevToolsInfo::ResourceDevToolsInfo()
ResourceDevToolsInfo::~ResourceDevToolsInfo() {
}
} // namespace webkit_glue
} // namespace content
// 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_DEVTOOLS_INFO_H_
#define WEBKIT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#ifndef CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "webkit/common/webkit_common_export.h"
#include "content/common/content_export.h"
namespace webkit_glue {
namespace content {
struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> {
typedef std::vector<std::pair<std::string, std::string> >
HeadersVector;
WEBKIT_COMMON_EXPORT ResourceDevToolsInfo();
CONTENT_EXPORT ResourceDevToolsInfo();
int32 http_status_code;
std::string http_status_text;
......@@ -29,9 +29,9 @@ struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> {
private:
friend class base::RefCounted<ResourceDevToolsInfo>;
WEBKIT_COMMON_EXPORT ~ResourceDevToolsInfo();
CONTENT_EXPORT ~ResourceDevToolsInfo();
};
} // namespace webkit_glue
} // namespace content
#endif // WEBKIT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#endif // CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
......@@ -12,11 +12,11 @@
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
#include "content/public/common/resource_devtools_info.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_timing_info.h"
#include "net/http/http_response_info.h"
#include "url/gurl.h"
#include "webkit/common/resource_devtools_info.h"
namespace content {
......@@ -67,7 +67,7 @@ struct ResourceResponseInfo {
// Actual request and response headers, as obtained from the network stack.
// Only present if request had LOAD_REPORT_RAW_HEADERS in load_flags, and
// requesting renderer had CanReadRowCookies permission.
scoped_refptr<webkit_glue::ResourceDevToolsInfo> devtools_info;
scoped_refptr<ResourceDevToolsInfo> devtools_info;
// The path to a file that will contain the response body. It may only
// contain a portion of the response body at the time that the ResponseInfo
......
......@@ -41,8 +41,6 @@
'sources': [
'data_element.cc',
'data_element.h',
'resource_devtools_info.cc',
'resource_devtools_info.h',
'resource_type.cc',
'resource_type.h',
'webkit_common_export.h',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment