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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/Request.cpp

Issue 2326153003: Rename referrerPolicy() methods to getReferrerPolicy(). (Closed)
Patch Set: . Created 4 years 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 // 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/fetch/FetchUtils.h" 10 #include "core/fetch/FetchUtils.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 String Request::referrer() const { 581 String Request::referrer() const {
582 // "The referrer attribute's getter must return the empty string if 582 // "The referrer attribute's getter must return the empty string if
583 // request's referrer is no referrer, "about:client" if request's referrer 583 // request's referrer is no referrer, "about:client" if request's referrer
584 // is client and request's referrer, serialized, otherwise." 584 // is client and request's referrer, serialized, otherwise."
585 ASSERT(FetchRequestData::noReferrerString() == AtomicString()); 585 ASSERT(FetchRequestData::noReferrerString() == AtomicString());
586 ASSERT(FetchRequestData::clientReferrerString() == 586 ASSERT(FetchRequestData::clientReferrerString() ==
587 AtomicString("about:client")); 587 AtomicString("about:client"));
588 return m_request->referrerString(); 588 return m_request->referrerString();
589 } 589 }
590 590
591 String Request::referrerPolicy() const { 591 String Request::getReferrerPolicy() const {
592 switch (m_request->getReferrerPolicy()) { 592 switch (m_request->getReferrerPolicy()) {
593 case ReferrerPolicyAlways: 593 case ReferrerPolicyAlways:
594 return "unsafe-url"; 594 return "unsafe-url";
595 case ReferrerPolicyDefault: 595 case ReferrerPolicyDefault:
596 return ""; 596 return "";
597 case ReferrerPolicyNoReferrerWhenDowngrade: 597 case ReferrerPolicyNoReferrerWhenDowngrade:
598 return "no-referrer-when-downgrade"; 598 return "no-referrer-when-downgrade";
599 case ReferrerPolicyNever: 599 case ReferrerPolicyNever:
600 return "no-referrer"; 600 return "no-referrer";
601 case ReferrerPolicyOrigin: 601 case ReferrerPolicyOrigin:
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 V8HiddenValue::internalBodyBuffer(scriptState->isolate()), bodyBuffer); 733 V8HiddenValue::internalBodyBuffer(scriptState->isolate()), bodyBuffer);
734 } 734 }
735 735
736 DEFINE_TRACE(Request) { 736 DEFINE_TRACE(Request) {
737 Body::trace(visitor); 737 Body::trace(visitor);
738 visitor->trace(m_request); 738 visitor->trace(m_request);
739 visitor->trace(m_headers); 739 visitor->trace(m_headers);
740 } 740 }
741 741
742 } // namespace blink 742 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Request.h ('k') | third_party/WebKit/Source/modules/fetch/Request.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698