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

Side by Side Diff: third_party/WebKit/Source/web/WebDataSourceImpl.cpp

Issue 2140523002: Remove WebURLRequest::initialize() and simplify WebURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutable ref Created 4 years, 5 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 40
41 namespace blink { 41 namespace blink {
42 42
43 WebDataSourceImpl* WebDataSourceImpl::create(LocalFrame* frame, const ResourceRe quest& request, const SubstituteData& data) 43 WebDataSourceImpl* WebDataSourceImpl::create(LocalFrame* frame, const ResourceRe quest& request, const SubstituteData& data)
44 { 44 {
45 return new WebDataSourceImpl(frame, request, data); 45 return new WebDataSourceImpl(frame, request, data);
46 } 46 }
47 47
48 const WebURLRequest& WebDataSourceImpl::originalRequest() const 48 const WebURLRequest& WebDataSourceImpl::originalRequest() const
49 { 49 {
50 m_originalRequestWrapper.bind(DocumentLoader::originalRequest());
51 return m_originalRequestWrapper; 50 return m_originalRequestWrapper;
52 } 51 }
53 52
54 const WebURLRequest& WebDataSourceImpl::request() const 53 const WebURLRequest& WebDataSourceImpl::request() const
55 { 54 {
56 m_requestWrapper.bind(DocumentLoader::request());
57 return m_requestWrapper; 55 return m_requestWrapper;
58 } 56 }
59 57
60 const WebURLResponse& WebDataSourceImpl::response() const 58 const WebURLResponse& WebDataSourceImpl::response() const
61 { 59 {
62 return m_responseWrapper; 60 return m_responseWrapper;
63 } 61 }
64 62
65 bool WebDataSourceImpl::hasUnreachableURL() const 63 bool WebDataSourceImpl::hasUnreachableURL() const
66 { 64 {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 case NavigationTypeFormResubmitted: 125 case NavigationTypeFormResubmitted:
128 return WebNavigationTypeFormResubmitted; 126 return WebNavigationTypeFormResubmitted;
129 case NavigationTypeOther: 127 case NavigationTypeOther:
130 default: 128 default:
131 return WebNavigationTypeOther; 129 return WebNavigationTypeOther;
132 } 130 }
133 } 131 }
134 132
135 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r equest, const SubstituteData& data) 133 WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r equest, const SubstituteData& data)
136 : DocumentLoader(frame, request, data) 134 : DocumentLoader(frame, request, data)
135 , m_originalRequestWrapper(DocumentLoader::originalRequest())
136 , m_requestWrapper(DocumentLoader::request())
137 , m_responseWrapper(DocumentLoader::response()) 137 , m_responseWrapper(DocumentLoader::response())
138 { 138 {
139 } 139 }
140 140
141 WebDataSourceImpl::~WebDataSourceImpl() 141 WebDataSourceImpl::~WebDataSourceImpl()
142 { 142 {
143 // Verify that detachFromFrame() has been called. 143 // Verify that detachFromFrame() has been called.
144 DCHECK(!m_extraData); 144 DCHECK(!m_extraData);
145 } 145 }
146 146
147 void WebDataSourceImpl::detachFromFrame() 147 void WebDataSourceImpl::detachFromFrame()
148 { 148 {
149 DocumentLoader::detachFromFrame(); 149 DocumentLoader::detachFromFrame();
150 m_extraData.reset(); 150 m_extraData.reset();
151 } 151 }
152 152
153 void WebDataSourceImpl::setSubresourceFilter(WebDocumentSubresourceFilter* subre sourceFilter) 153 void WebDataSourceImpl::setSubresourceFilter(WebDocumentSubresourceFilter* subre sourceFilter)
154 { 154 {
155 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); 155 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter));
156 } 156 }
157 157
158 DEFINE_TRACE(WebDataSourceImpl) 158 DEFINE_TRACE(WebDataSourceImpl)
159 { 159 {
160 DocumentLoader::trace(visitor); 160 DocumentLoader::trace(visitor);
161 } 161 }
162 162
163 } // namespace blink 163 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp ('k') | third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698