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/Request.h" | 5 #include "modules/fetch/Request.h" |
6 | 6 |
7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
10 #include "core/loader/ThreadableLoader.h" | 10 #include "core/loader/ThreadableLoader.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 case kReferrerPolicyDefault: | 602 case kReferrerPolicyDefault: |
603 return ""; | 603 return ""; |
604 case kReferrerPolicyNoReferrerWhenDowngrade: | 604 case kReferrerPolicyNoReferrerWhenDowngrade: |
605 return "no-referrer-when-downgrade"; | 605 return "no-referrer-when-downgrade"; |
606 case kReferrerPolicyNever: | 606 case kReferrerPolicyNever: |
607 return "no-referrer"; | 607 return "no-referrer"; |
608 case kReferrerPolicyOrigin: | 608 case kReferrerPolicyOrigin: |
609 return "origin"; | 609 return "origin"; |
610 case kReferrerPolicyOriginWhenCrossOrigin: | 610 case kReferrerPolicyOriginWhenCrossOrigin: |
611 return "origin-when-cross-origin"; | 611 return "origin-when-cross-origin"; |
| 612 case kReferrerPolicySameOrigin: |
| 613 return "same-origin"; |
| 614 case kReferrerPolicyStrictOrigin: |
| 615 return "strict-origin"; |
612 case kReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin: | 616 case kReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin: |
613 DCHECK(RuntimeEnabledFeatures::ReducedReferrerGranularityEnabled()); | 617 return "strict-origin-when-cross-origin"; |
614 return "no-referrer-when-downgrade-origin-when-cross-origin"; | |
615 } | 618 } |
616 NOTREACHED(); | 619 NOTREACHED(); |
617 return String(); | 620 return String(); |
618 } | 621 } |
619 | 622 |
620 String Request::mode() const { | 623 String Request::mode() const { |
621 // "The mode attribute's getter must return the value corresponding to the | 624 // "The mode attribute's getter must return the value corresponding to the |
622 // first matching statement, switching on request's mode:" | 625 // first matching statement, switching on request's mode:" |
623 switch (request_->Mode()) { | 626 switch (request_->Mode()) { |
624 case WebURLRequest::kFetchRequestModeSameOrigin: | 627 case WebURLRequest::kFetchRequestModeSameOrigin: |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 .Set(request.As<v8::Object>(), body_buffer); | 776 .Set(request.As<v8::Object>(), body_buffer); |
774 } | 777 } |
775 | 778 |
776 DEFINE_TRACE(Request) { | 779 DEFINE_TRACE(Request) { |
777 Body::Trace(visitor); | 780 Body::Trace(visitor); |
778 visitor->Trace(request_); | 781 visitor->Trace(request_); |
779 visitor->Trace(headers_); | 782 visitor->Trace(headers_); |
780 } | 783 } |
781 | 784 |
782 } // namespace blink | 785 } // namespace blink |
OLD | NEW |