| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // returns allowCredentials value of m_resourceLoaderOptions. | 146 // returns allowCredentials value of m_resourceLoaderOptions. |
| 147 StoredCredentials effectiveAllowCredentials() const; | 147 StoredCredentials effectiveAllowCredentials() const; |
| 148 | 148 |
| 149 // TODO(oilpan): DocumentThreadableLoader used to be a ResourceOwner, | 149 // TODO(oilpan): DocumentThreadableLoader used to be a ResourceOwner, |
| 150 // but ResourceOwner was moved onto the oilpan heap before | 150 // but ResourceOwner was moved onto the oilpan heap before |
| 151 // DocumentThreadableLoader was ready. When DocumentThreadableLoader | 151 // DocumentThreadableLoader was ready. When DocumentThreadableLoader |
| 152 // moves onto the oilpan heap, make it a ResourceOwner again and remove | 152 // moves onto the oilpan heap, make it a ResourceOwner again and remove |
| 153 // this re-implementation of ResourceOwner. | 153 // this re-implementation of ResourceOwner. |
| 154 RawResource* resource() const { return m_resource.get(); } | 154 RawResource* resource() const { return m_resource.get(); } |
| 155 void clearResource() { setResource(nullptr); } | 155 void clearResource() { setResource(nullptr); } |
| 156 void setResource(const ResourcePtr<RawResource>& newResource) | 156 void setResource(const PassRefPtrWillBeRawPtr<RawResource>& newResource) |
| 157 { | 157 { |
| 158 if (newResource == m_resource) | 158 if (newResource == m_resource) |
| 159 return; | 159 return; |
| 160 | 160 |
| 161 if (ResourcePtr<RawResource> oldResource = m_resource) { | 161 if (PassRefPtrWillBeRawPtr<RawResource> oldResource = m_resource.rel
ease()) |
| 162 m_resource.clear(); | |
| 163 oldResource->removeClient(this); | 162 oldResource->removeClient(this); |
| 164 } | |
| 165 | 163 |
| 166 if (newResource) { | 164 if (newResource) { |
| 167 m_resource = newResource; | 165 m_resource = newResource; |
| 168 m_resource->addClient(this); | 166 m_resource->addClient(this); |
| 169 } | 167 } |
| 170 } | 168 } |
| 171 ResourcePtr<RawResource> m_resource; | 169 RefPtrWillBePersistent<RawResource> m_resource; |
| 172 // End of ResourceOwner re-implementation, see above. | 170 // End of ResourceOwner re-implementation, see above. |
| 173 | 171 |
| 174 SecurityOrigin* securityOrigin() const; | 172 SecurityOrigin* securityOrigin() const; |
| 175 Document& document() const; | 173 Document& document() const; |
| 176 | 174 |
| 177 ThreadableLoaderClient* m_client; | 175 ThreadableLoaderClient* m_client; |
| 178 RawPtrWillBeWeakPersistent<Document> m_document; | 176 RawPtrWillBeWeakPersistent<Document> m_document; |
| 179 | 177 |
| 180 const ThreadableLoaderOptions m_options; | 178 const ThreadableLoaderOptions m_options; |
| 181 // Some items may be overridden by m_forceDoNotAllowStoredCredentials | 179 // Some items may be overridden by m_forceDoNotAllowStoredCredentials |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // But this value is not the max number of total redirects allowed, | 219 // But this value is not the max number of total redirects allowed, |
| 222 // because same-origin redirects are not counted here. | 220 // because same-origin redirects are not counted here. |
| 223 int m_corsRedirectLimit; | 221 int m_corsRedirectLimit; |
| 224 | 222 |
| 225 const WebURLRequest::FetchRedirectMode m_redirectMode; | 223 const WebURLRequest::FetchRedirectMode m_redirectMode; |
| 226 }; | 224 }; |
| 227 | 225 |
| 228 } // namespace blink | 226 } // namespace blink |
| 229 | 227 |
| 230 #endif // DocumentThreadableLoader_h | 228 #endif // DocumentThreadableLoader_h |
| OLD | NEW |