OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "modules/fetch/RequestInit.h" | 5 #include "modules/fetch/RequestInit.h" |
6 | 6 |
7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
8 #include "bindings/core/v8/V8ArrayBuffer.h" | 8 #include "bindings/core/v8/V8ArrayBuffer.h" |
9 #include "bindings/core/v8/V8ArrayBufferView.h" | 9 #include "bindings/core/v8/V8ArrayBufferView.h" |
10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 if (DictionaryHelper::Get(options, "headers", headers_vector, | 38 if (DictionaryHelper::Get(options, "headers", headers_vector, |
39 exception_state)) { | 39 exception_state)) { |
40 headers = Headers::Create(headers_vector, exception_state); | 40 headers = Headers::Create(headers_vector, exception_state); |
41 are_any_members_set = true; | 41 are_any_members_set = true; |
42 } else { | 42 } else { |
43 are_any_members_set |= | 43 are_any_members_set |= |
44 DictionaryHelper::Get(options, "headers", headers_dictionary); | 44 DictionaryHelper::Get(options, "headers", headers_dictionary); |
45 } | 45 } |
46 } | 46 } |
47 are_any_members_set |= DictionaryHelper::Get(options, "mode", mode); | 47 are_any_members_set |= DictionaryHelper::Get(options, "mode", mode); |
48 are_any_members_set |= DictionaryHelper::Get(options, "cache", cache); | |
yhirano
2017/04/11 09:16:43
This should be behind the flag.
yiyix
2017/04/11 10:00:06
You are right, the variable |cache| will still be
| |
48 are_any_members_set |= DictionaryHelper::Get(options, "redirect", redirect); | 49 are_any_members_set |= DictionaryHelper::Get(options, "redirect", redirect); |
49 AtomicString referrer_string; | 50 AtomicString referrer_string; |
50 bool is_referrer_string_set = DictionaryHelper::GetWithUndefinedCheck( | 51 bool is_referrer_string_set = DictionaryHelper::GetWithUndefinedCheck( |
51 options, "referrer", referrer_string); | 52 options, "referrer", referrer_string); |
52 are_any_members_set |= is_referrer_string_set; | 53 are_any_members_set |= is_referrer_string_set; |
53 are_any_members_set |= DictionaryHelper::Get(options, "integrity", integrity); | 54 are_any_members_set |= DictionaryHelper::Get(options, "integrity", integrity); |
54 AtomicString referrer_policy_string; | 55 AtomicString referrer_policy_string; |
55 bool is_referrer_policy_set = | 56 bool is_referrer_policy_set = |
56 DictionaryHelper::Get(options, "referrerPolicy", referrer_policy_string); | 57 DictionaryHelper::Get(options, "referrerPolicy", referrer_policy_string); |
57 are_any_members_set |= is_referrer_policy_set; | 58 are_any_members_set |= is_referrer_policy_set; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 AtomicString("application/x-www-form-urlencoded;charset=UTF-8"); | 152 AtomicString("application/x-www-form-urlencoded;charset=UTF-8"); |
152 body = new FormDataBytesConsumer(context, form_data.Release()); | 153 body = new FormDataBytesConsumer(context, form_data.Release()); |
153 } else if (v8_body->IsString()) { | 154 } else if (v8_body->IsString()) { |
154 content_type = "text/plain;charset=UTF-8"; | 155 content_type = "text/plain;charset=UTF-8"; |
155 body = new FormDataBytesConsumer( | 156 body = new FormDataBytesConsumer( |
156 ToUSVString(isolate, v8_body, exception_state)); | 157 ToUSVString(isolate, v8_body, exception_state)); |
157 } | 158 } |
158 } | 159 } |
159 | 160 |
160 } // namespace blink | 161 } // namespace blink |
OLD | NEW |