Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: content/public/common/resource_response.h

Issue 8680036: Move ResourceResponse struct into the Content API, since it's used in Chrome. While at it, I also... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #ifndef CONTENT_COMMON_RESOURCE_RESPONSE_H_ 7 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_
8 #define CONTENT_COMMON_RESOURCE_RESPONSE_H_ 8 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_
9 #pragma once 9 #pragma once
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
15 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
16 #include "net/url_request/url_request_status.h" 17 #include "net/url_request/url_request_status.h"
17 #include "webkit/glue/resource_loader_bridge.h" 18 #include "webkit/glue/resource_loader_bridge.h"
18 19
20 namespace content {
21
19 // Parameters for a resource response header. 22 // Parameters for a resource response header.
20 struct ResourceResponseHead : webkit_glue::ResourceResponseInfo { 23 struct ResourceResponseHead : webkit_glue::ResourceResponseInfo {
21 // The response status. 24 // The response status.
22 net::URLRequestStatus status; 25 net::URLRequestStatus status;
23 }; 26 };
24 27
25 // Parameters for a synchronous resource response. 28 // Parameters for a synchronous resource response.
26 struct SyncLoadResult : ResourceResponseHead { 29 struct SyncLoadResult : ResourceResponseHead {
27 // The final URL after any redirects. 30 // The final URL after any redirects.
28 GURL final_url; 31 GURL final_url;
29 32
30 // The response data. 33 // The response data.
31 std::string data; 34 std::string data;
32 }; 35 };
33 36
34 // Simple wrapper that refcounts ResourceResponseHead. 37 // Simple wrapper that refcounts ResourceResponseHead.
35 struct CONTENT_EXPORT ResourceResponse 38 struct CONTENT_EXPORT ResourceResponse
36 : public base::RefCounted<ResourceResponse> { 39 : public NON_EXPORTED_BASE(ResourceResponseHead),
37 ResourceResponse(); 40 public base::RefCounted<ResourceResponse> {
38
39 ResourceResponseHead response_head;
40 41
41 private: 42 private:
42 friend class base::RefCounted<ResourceResponse>; 43 friend class base::RefCounted<ResourceResponse>;
43 44
44 ~ResourceResponse(); 45 ~ResourceResponse() {}
Dirk Pranke 2011/11/24 00:30:47 I'm still a bit fuzzy on the rules for when we're
jam 2011/11/24 00:42:18 The errors I get when there are template member va
45 }; 46 };
46 47
47 #endif // CONTENT_COMMON_RESOURCE_RESPONSE_H_ 48 } // namespace content
49
50 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_
OLDNEW
« no previous file with comments | « content/public/browser/resource_dispatcher_host_delegate.h ('k') | content/test/render_view_fake_resources_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698