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

Unified Diff: content/child/request_info.h

Issue 207603003: Extract RequestInfo struct from ResourceLoaderBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/npapi/plugin_url_fetcher.cc ('k') | content/child/request_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/request_info.h
diff --git a/content/child/request_info.h b/content/child/request_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..6dd1bed698f2a4479970c637995b1caeb3448a15
--- /dev/null
+++ b/content/child/request_info.h
@@ -0,0 +1,87 @@
+// 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 CONTENT_CHILD_REQUEST_INFO_H_
+#define CONTENT_CHILD_REQUEST_INFO_H_
+
+#include <stdint.h>
+
+#include <string>
+
+#include "content/common/content_export.h"
+#include "net/base/request_priority.h"
+#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
+#include "third_party/WebKit/public/platform/WebURLRequest.h"
+#include "url/gurl.h"
+#include "webkit/common/resource_type.h"
+
+namespace content {
+
+// Structure used when calling BlinkPlatformImpl::CreateResourceLoader().
+struct CONTENT_EXPORT RequestInfo {
+ RequestInfo();
+ ~RequestInfo();
+
+ // HTTP-style method name (e.g., "GET" or "POST").
+ std::string method;
+
+ // Absolute URL encoded in ASCII per the rules of RFC-2396.
+ GURL url;
+
+ // URL of the document in the top-level window, which may be checked by the
+ // third-party cookie blocking policy.
+ GURL first_party_for_cookies;
+
+ // Optional parameter, a URL with similar constraints in how it must be
+ // encoded as the url member.
+ GURL referrer;
+
+ // The referrer policy that applies to the referrer.
+ blink::WebReferrerPolicy referrer_policy;
+
+ // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and
+ // \r\n-terminated list of MIME headers. They should be ASCII-encoded using
+ // the standard MIME header encoding rules. The headers parameter can also
+ // be null if no extra request headers need to be set.
+ std::string headers;
+
+ // Composed of the values defined in url_request_load_flags.h.
+ int load_flags;
+
+ // Process id of the process making the request.
+ int requestor_pid;
+
+ // Indicates if the current request is the main frame load, a sub-frame
+ // load, or a sub objects load.
+ ResourceType::Type request_type;
+
+ // Indicates the priority of this request, as determined by WebKit.
+ net::RequestPriority priority;
+
+ // Used for plugin to browser requests.
+ uint32_t request_context;
+
+ // Identifies what appcache host this request is associated with.
+ int appcache_host_id;
+
+ // Used to associated the bridge with a frame's network context.
+ int routing_id;
+
+ // If true, then the response body will be downloaded to a file and the
+ // path to that file will be provided in ResponseInfo::download_file_path.
+ bool download_to_file;
+
+ // True if the request was user initiated.
+ bool has_user_gesture;
+
+ // Extra data associated with this request. We do not own this pointer.
+ blink::WebURLRequest::ExtraData* extra_data;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RequestInfo);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_REQUEST_INFO_H_
« no previous file with comments | « content/child/npapi/plugin_url_fetcher.cc ('k') | content/child/request_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698