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

Unified Diff: ppapi/shared_impl/url_request_info_data.cc

Issue 10913257: Convert url request info to new proxy API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 3 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 | « ppapi/shared_impl/url_request_info_data.h ('k') | ppapi/thunk/ppb_flash_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/url_request_info_data.cc
diff --git a/ppapi/shared_impl/url_request_info_data.cc b/ppapi/shared_impl/url_request_info_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8bb02a447f04f515aae0668f6d9f028da459bed4
--- /dev/null
+++ b/ppapi/shared_impl/url_request_info_data.cc
@@ -0,0 +1,70 @@
+// Copyright (c) 2012 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 "ppapi/shared_impl/url_request_info_data.h"
+
+#include "ppapi/shared_impl/resource.h"
+
+namespace ppapi {
+
+namespace {
+
+const int32_t kDefaultPrefetchBufferUpperThreshold = 100 * 1000 * 1000;
+const int32_t kDefaultPrefetchBufferLowerThreshold = 50 * 1000 * 1000;
+
+} // namespace
+
+URLRequestInfoData::BodyItem::BodyItem()
+ : is_file(false),
+ start_offset(0),
+ number_of_bytes(-1),
+ expected_last_modified_time(0.0) {
+}
+
+URLRequestInfoData::BodyItem::BodyItem(const std::string& data)
+ : is_file(false),
+ data(data),
+ start_offset(0),
+ number_of_bytes(-1),
+ expected_last_modified_time(0.0) {
+}
+
+URLRequestInfoData::BodyItem::BodyItem(
+ Resource* file_ref,
+ int64_t start_offset,
+ int64_t number_of_bytes,
+ PP_Time expected_last_modified_time)
+ : is_file(true),
+ file_ref(file_ref),
+ file_ref_host_resource(file_ref->host_resource()),
+ start_offset(start_offset),
+ number_of_bytes(number_of_bytes),
+ expected_last_modified_time(expected_last_modified_time) {
+}
+
+URLRequestInfoData::URLRequestInfoData()
+ : url(),
+ method(),
+ headers(),
+ stream_to_file(false),
+ follow_redirects(true),
+ record_download_progress(false),
+ record_upload_progress(false),
+ has_custom_referrer_url(false),
+ custom_referrer_url(),
+ allow_cross_origin_requests(false),
+ allow_credentials(false),
+ has_custom_content_transfer_encoding(false),
+ custom_content_transfer_encoding(),
+ has_custom_user_agent(false),
+ custom_user_agent(),
+ prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold),
+ prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold),
+ body() {
+}
+
+URLRequestInfoData::~URLRequestInfoData() {
+}
+
+} // namespace ppapi
« no previous file with comments | « ppapi/shared_impl/url_request_info_data.h ('k') | ppapi/thunk/ppb_flash_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698