diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 09:54:13 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 09:54:13 +0000 |
commit | 7c927b60bffa117129ba9214fcb6174d753351d9 (patch) | |
tree | 785de404571d36e57c8c9b916426805fc43ee476 /chrome/common/resource_response.h | |
parent | af2ae52b8f5ec53e1ba1b4593368cd66f59c3a4d (diff) | |
download | chromium_src-7c927b60bffa117129ba9214fcb6174d753351d9.zip chromium_src-7c927b60bffa117129ba9214fcb6174d753351d9.tar.gz chromium_src-7c927b60bffa117129ba9214fcb6174d753351d9.tar.bz2 |
Further reduce the bad dependency of chrome/common on chrome/browser.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/656011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_response.h')
-rw-r--r-- | chrome/common/resource_response.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/chrome/common/resource_response.h b/chrome/common/resource_response.h new file mode 100644 index 0000000..840b864 --- /dev/null +++ b/chrome/common/resource_response.h @@ -0,0 +1,50 @@ +// Copyright (c) 2010 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. + +// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading + +#ifndef CHROME_COMMON_RESOURCE_RESPONSE_H_ +#define CHROME_COMMON_RESOURCE_RESPONSE_H_ + +#include <string> + +#include "base/ref_counted.h" +#include "chrome/common/filter_policy.h" +#include "googleurl/src/gurl.h" +#include "net/url_request/url_request_status.h" +#include "webkit/glue/resource_loader_bridge.h" + +// Parameters for a resource response header. +struct ResourceResponseHead + : webkit_glue::ResourceLoaderBridge::ResponseInfo { + ResourceResponseHead() : filter_policy(FilterPolicy::DONT_FILTER) {} + + // The response status. + URLRequestStatus status; + + // Specifies if the resource should be filtered before being displayed + // (insecure resources can be filtered to keep the page secure). + FilterPolicy::Type filter_policy; +}; + +// Parameters for a synchronous resource response. +struct SyncLoadResult : ResourceResponseHead { + // The final URL after any redirects. + GURL final_url; + + // The response data. + std::string data; +}; + +// Simple wrapper that refcounts ResourceResponseHead. +struct ResourceResponse : public base::RefCounted<ResourceResponse> { + ResourceResponseHead response_head; + + private: + friend class base::RefCounted<ResourceResponse>; + + ~ResourceResponse() {} +}; + +#endif // CHROME_COMMON_RESOURCE_RESPONSE_H_ |