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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp

Issue 2918653004: Remove dup'ed code for RequestorOrigin and FirstPartyCookie (Closed)
Patch Set: . Created 3 years, 6 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 unified diff | Download patch
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 ResourceRequest::ResourceRequest() : ResourceRequest(KURL()) {} 43 ResourceRequest::ResourceRequest() : ResourceRequest(KURL()) {}
44 44
45 ResourceRequest::ResourceRequest(const String& url_string) 45 ResourceRequest::ResourceRequest(const String& url_string)
46 : ResourceRequest(KURL(kParsedURLString, url_string)) {} 46 : ResourceRequest(KURL(kParsedURLString, url_string)) {}
47 47
48 ResourceRequest::ResourceRequest(const KURL& url) 48 ResourceRequest::ResourceRequest(const KURL& url)
49 : url_(url), 49 : url_(url),
50 cache_policy_(WebCachePolicy::kUseProtocolCachePolicy), 50 cache_policy_(WebCachePolicy::kUseProtocolCachePolicy),
51 timeout_interval_(default_timeout_interval_), 51 timeout_interval_(default_timeout_interval_),
52 requestor_origin_(SecurityOrigin::CreateUnique()), 52 requestor_origin_(nullptr),
53 http_method_(HTTPNames::GET), 53 http_method_(HTTPNames::GET),
54 allow_stored_credentials_(true), 54 allow_stored_credentials_(true),
55 report_upload_progress_(false), 55 report_upload_progress_(false),
56 report_raw_headers_(false), 56 report_raw_headers_(false),
57 has_user_gesture_(false), 57 has_user_gesture_(false),
58 download_to_file_(false), 58 download_to_file_(false),
59 use_stream_on_response_(false), 59 use_stream_on_response_(false),
60 keepalive_(false), 60 keepalive_(false),
61 should_reset_app_cache_(false), 61 should_reset_app_cache_(false),
62 service_worker_mode_(WebURLRequest::ServiceWorkerMode::kAll), 62 service_worker_mode_(WebURLRequest::ServiceWorkerMode::kAll),
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // layer. 426 // layer.
427 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD) 427 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD)
428 return false; 428 return false;
429 429
430 // For non-GET and non-HEAD methods, always send an Origin header so the 430 // For non-GET and non-HEAD methods, always send an Origin header so the
431 // server knows we support this feature. 431 // server knows we support this feature.
432 return true; 432 return true;
433 } 433 }
434 434
435 } // namespace blink 435 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698