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

Side by Side Diff: Source/platform/network/ResourceRequest.cpp

Issue 700663004: [Streams] Add "useStreamOnResponse" on WebURLRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@use-web-data-pipe
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/platform/network/ResourceRequest.h ('k') | public/platform/WebURLRequest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 request->setHTTPMethod(AtomicString(data->m_httpMethod)); 43 request->setHTTPMethod(AtomicString(data->m_httpMethod));
44 request->setPriority(data->m_priority, data->m_intraPriorityValue); 44 request->setPriority(data->m_priority, data->m_intraPriorityValue);
45 45
46 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); 46 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release());
47 47
48 request->setHTTPBody(data->m_httpBody); 48 request->setHTTPBody(data->m_httpBody);
49 request->setAllowStoredCredentials(data->m_allowStoredCredentials); 49 request->setAllowStoredCredentials(data->m_allowStoredCredentials);
50 request->setReportUploadProgress(data->m_reportUploadProgress); 50 request->setReportUploadProgress(data->m_reportUploadProgress);
51 request->setHasUserGesture(data->m_hasUserGesture); 51 request->setHasUserGesture(data->m_hasUserGesture);
52 request->setDownloadToFile(data->m_downloadToFile); 52 request->setDownloadToFile(data->m_downloadToFile);
53 request->setUseStreamOnResponse(data->m_useStreamOnResponse);
53 request->setSkipServiceWorker(data->m_skipServiceWorker); 54 request->setSkipServiceWorker(data->m_skipServiceWorker);
54 request->setRequestorID(data->m_requestorID); 55 request->setRequestorID(data->m_requestorID);
55 request->setRequestorProcessID(data->m_requestorProcessID); 56 request->setRequestorProcessID(data->m_requestorProcessID);
56 request->setAppCacheHostID(data->m_appCacheHostID); 57 request->setAppCacheHostID(data->m_appCacheHostID);
57 request->setRequestContext(data->m_requestContext); 58 request->setRequestContext(data->m_requestContext);
58 request->setFrameType(data->m_frameType); 59 request->setFrameType(data->m_frameType);
59 request->setFetchRequestMode(data->m_fetchRequestMode); 60 request->setFetchRequestMode(data->m_fetchRequestMode);
60 request->setFetchCredentialsMode(data->m_fetchCredentialsMode); 61 request->setFetchCredentialsMode(data->m_fetchCredentialsMode);
61 request->m_referrerPolicy = data->m_referrerPolicy; 62 request->m_referrerPolicy = data->m_referrerPolicy;
62 return request.release(); 63 return request.release();
(...skipping 10 matching lines...) Expand all
73 data->m_httpHeaders = httpHeaderFields().copyData(); 74 data->m_httpHeaders = httpHeaderFields().copyData();
74 data->m_priority = priority(); 75 data->m_priority = priority();
75 data->m_intraPriorityValue = m_intraPriorityValue; 76 data->m_intraPriorityValue = m_intraPriorityValue;
76 77
77 if (m_httpBody) 78 if (m_httpBody)
78 data->m_httpBody = m_httpBody->deepCopy(); 79 data->m_httpBody = m_httpBody->deepCopy();
79 data->m_allowStoredCredentials = m_allowStoredCredentials; 80 data->m_allowStoredCredentials = m_allowStoredCredentials;
80 data->m_reportUploadProgress = m_reportUploadProgress; 81 data->m_reportUploadProgress = m_reportUploadProgress;
81 data->m_hasUserGesture = m_hasUserGesture; 82 data->m_hasUserGesture = m_hasUserGesture;
82 data->m_downloadToFile = m_downloadToFile; 83 data->m_downloadToFile = m_downloadToFile;
84 data->m_useStreamOnResponse = m_useStreamOnResponse;
83 data->m_skipServiceWorker = m_skipServiceWorker; 85 data->m_skipServiceWorker = m_skipServiceWorker;
84 data->m_requestorID = m_requestorID; 86 data->m_requestorID = m_requestorID;
85 data->m_requestorProcessID = m_requestorProcessID; 87 data->m_requestorProcessID = m_requestorProcessID;
86 data->m_appCacheHostID = m_appCacheHostID; 88 data->m_appCacheHostID = m_appCacheHostID;
87 data->m_requestContext = m_requestContext; 89 data->m_requestContext = m_requestContext;
88 data->m_frameType = m_frameType; 90 data->m_frameType = m_frameType;
89 data->m_fetchRequestMode = m_fetchRequestMode; 91 data->m_fetchRequestMode = m_fetchRequestMode;
90 data->m_fetchCredentialsMode = m_fetchCredentialsMode; 92 data->m_fetchCredentialsMode = m_fetchCredentialsMode;
91 data->m_referrerPolicy = m_referrerPolicy; 93 data->m_referrerPolicy = m_referrerPolicy;
92 return data.release(); 94 return data.release();
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 { 405 {
404 m_url = url; 406 m_url = url;
405 m_cachePolicy = UseProtocolCachePolicy; 407 m_cachePolicy = UseProtocolCachePolicy;
406 m_timeoutInterval = s_defaultTimeoutInterval; 408 m_timeoutInterval = s_defaultTimeoutInterval;
407 m_httpMethod = "GET"; 409 m_httpMethod = "GET";
408 m_allowStoredCredentials = true; 410 m_allowStoredCredentials = true;
409 m_reportUploadProgress = false; 411 m_reportUploadProgress = false;
410 m_reportRawHeaders = false; 412 m_reportRawHeaders = false;
411 m_hasUserGesture = false; 413 m_hasUserGesture = false;
412 m_downloadToFile = false; 414 m_downloadToFile = false;
415 m_useStreamOnResponse = false;
413 m_skipServiceWorker = false; 416 m_skipServiceWorker = false;
414 m_priority = ResourceLoadPriorityLowest; 417 m_priority = ResourceLoadPriorityLowest;
415 m_intraPriorityValue = 0; 418 m_intraPriorityValue = 0;
416 m_requestorID = 0; 419 m_requestorID = 0;
417 m_requestorProcessID = 0; 420 m_requestorProcessID = 0;
418 m_appCacheHostID = 0; 421 m_appCacheHostID = 0;
419 m_requestContext = WebURLRequest::RequestContextUnspecified; 422 m_requestContext = WebURLRequest::RequestContextUnspecified;
420 m_frameType = WebURLRequest::FrameTypeNone; 423 m_frameType = WebURLRequest::FrameTypeNone;
421 m_fetchRequestMode = WebURLRequest::FetchRequestModeNoCORS; 424 m_fetchRequestMode = WebURLRequest::FetchRequestModeNoCORS;
422 // Contrary to the Fetch spec, we default to same-origin mode here, and deal 425 // Contrary to the Fetch spec, we default to same-origin mode here, and deal
423 // with CORS modes in updateRequestForAccessControl if we're called in a 426 // with CORS modes in updateRequestForAccessControl if we're called in a
424 // context which requires it. 427 // context which requires it.
425 m_fetchCredentialsMode = WebURLRequest::FetchCredentialsModeSameOrigin; 428 m_fetchCredentialsMode = WebURLRequest::FetchCredentialsModeSameOrigin;
426 m_referrerPolicy = ReferrerPolicyDefault; 429 m_referrerPolicy = ReferrerPolicyDefault;
427 } 430 }
428 431
429 // This is used by the loader to control the number of issued parallel load requ ests. 432 // This is used by the loader to control the number of issued parallel load requ ests.
430 unsigned initializeMaximumHTTPConnectionCountPerHost() 433 unsigned initializeMaximumHTTPConnectionCountPerHost()
431 { 434 {
432 // The chromium network stack already handles limiting the number of 435 // The chromium network stack already handles limiting the number of
433 // parallel requests per host, so there's no need to do it here. Therefore, 436 // parallel requests per host, so there's no need to do it here. Therefore,
434 // this is set to a high value that should never be hit in practice. 437 // this is set to a high value that should never be hit in practice.
435 return 10000; 438 return 10000;
436 } 439 }
437 440
438 } // namespace blink 441 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/network/ResourceRequest.h ('k') | public/platform/WebURLRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698