summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authoramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 16:58:06 +0000
committeramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 16:58:06 +0000
commit2e4633c5b2a040357659646b951b632bff3055f5 (patch)
treef4a4ab7e636963a940118157cbec5dd4cc7b4ad4 /chrome/common/render_messages.h
parentdba526fa150d26deae1a10f54bc3b72ed36e5520 (diff)
downloadchromium_src-2e4633c5b2a040357659646b951b632bff3055f5.zip
chromium_src-2e4633c5b2a040357659646b951b632bff3055f5.tar.gz
chromium_src-2e4633c5b2a040357659646b951b632bff3055f5.tar.bz2
A prototype of resource loading through automation
In a test scenario where we need to load resources over automation, we intercept the URL reqeusts and serve them using automation IPCs. This resource loading can be enabled per tab created by automation. BUG=none TEST=none Review URL: http://codereview.chromium.org/145024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index b2fd1f9..829a8ed 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -25,7 +25,6 @@
#include "media/audio/audio_output.h"
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
-#include "net/url_request/url_request_status.h"
#include "webkit/glue/autofill_form.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/form_data.h"
@@ -1246,58 +1245,6 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
}
};
-// Traits for URLRequestStatus
-template <>
-struct ParamTraits<URLRequestStatus> {
- typedef URLRequestStatus param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p.status()));
- WriteParam(m, p.os_error());
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- int status, os_error;
- if (!ReadParam(m, iter, &status) ||
- !ReadParam(m, iter, &os_error))
- return false;
- r->set_status(static_cast<URLRequestStatus::Status>(status));
- r->set_os_error(os_error);
- return true;
- }
- static void Log(const param_type& p, std::wstring* l) {
- std::wstring status;
- switch (p.status()) {
- case URLRequestStatus::SUCCESS:
- status = L"SUCCESS";
- break;
- case URLRequestStatus::IO_PENDING:
- status = L"IO_PENDING ";
- break;
- case URLRequestStatus::HANDLED_EXTERNALLY:
- status = L"HANDLED_EXTERNALLY";
- break;
- case URLRequestStatus::CANCELED:
- status = L"CANCELED";
- break;
- case URLRequestStatus::FAILED:
- status = L"FAILED";
- break;
- default:
- status = L"UNKNOWN";
- break;
- }
- if (p.status() == URLRequestStatus::FAILED)
- l->append(L"(");
-
- LogParam(status, l);
-
- if (p.status() == URLRequestStatus::FAILED) {
- l->append(L", ");
- LogParam(p.os_error(), l);
- l->append(L")");
- }
- }
-};
-
template <>
struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > {
typedef scoped_refptr<net::HttpResponseHeaders> param_type;