| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // returns allowCredentials value of m_resourceLoaderOptions. | 157 // returns allowCredentials value of m_resourceLoaderOptions. |
| 158 StoredCredentials effectiveAllowCredentials() const; | 158 StoredCredentials effectiveAllowCredentials() const; |
| 159 | 159 |
| 160 // TODO(oilpan): DocumentThreadableLoader used to be a ResourceOwner, | 160 // TODO(oilpan): DocumentThreadableLoader used to be a ResourceOwner, |
| 161 // but ResourceOwner was moved onto the oilpan heap before | 161 // but ResourceOwner was moved onto the oilpan heap before |
| 162 // DocumentThreadableLoader was ready. When DocumentThreadableLoader | 162 // DocumentThreadableLoader was ready. When DocumentThreadableLoader |
| 163 // moves onto the oilpan heap, make it a ResourceOwner again and remove | 163 // moves onto the oilpan heap, make it a ResourceOwner again and remove |
| 164 // this re-implementation of ResourceOwner. | 164 // this re-implementation of ResourceOwner. |
| 165 RawResource* resource() const { return m_resource.get(); } | 165 RawResource* resource() const { return m_resource.get(); } |
| 166 void clearResource() { setResource(nullptr); } | 166 void clearResource() { setResource(nullptr); } |
| 167 void setResource(const PassRefPtrWillBeRawPtr<RawResource>& newResource) | 167 void setResource(const RawPtr<RawResource>& newResource) |
| 168 { | 168 { |
| 169 if (newResource == m_resource) | 169 if (newResource == m_resource) |
| 170 return; | 170 return; |
| 171 | 171 |
| 172 if (PassRefPtrWillBeRawPtr<RawResource> oldResource = m_resource.rel
ease()) | 172 if (RawPtr<RawResource> oldResource = m_resource.release()) |
| 173 oldResource->removeClient(this); | 173 oldResource->removeClient(this); |
| 174 | 174 |
| 175 if (newResource) { | 175 if (newResource) { |
| 176 m_resource = newResource; | 176 m_resource = newResource; |
| 177 m_resource->addClient(this); | 177 m_resource->addClient(this); |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 RefPtrWillBePersistent<RawResource> m_resource; | 180 Persistent<RawResource> m_resource; |
| 181 // End of ResourceOwner re-implementation, see above. | 181 // End of ResourceOwner re-implementation, see above. |
| 182 | 182 |
| 183 SecurityOrigin* getSecurityOrigin() const; | 183 SecurityOrigin* getSecurityOrigin() const; |
| 184 Document& document() const; | 184 Document& document() const; |
| 185 | 185 |
| 186 ThreadableLoaderClient* m_client; | 186 ThreadableLoaderClient* m_client; |
| 187 RawPtrWillBeWeakPersistent<Document> m_document; | 187 WeakPersistent<Document> m_document; |
| 188 | 188 |
| 189 const ThreadableLoaderOptions m_options; | 189 const ThreadableLoaderOptions m_options; |
| 190 // Some items may be overridden by m_forceDoNotAllowStoredCredentials | 190 // Some items may be overridden by m_forceDoNotAllowStoredCredentials |
| 191 // and m_securityOrigin. In such a case, build a ResourceLoaderOptions | 191 // and m_securityOrigin. In such a case, build a ResourceLoaderOptions |
| 192 // with up-to-date values from them and this variable, and use it. | 192 // with up-to-date values from them and this variable, and use it. |
| 193 const ResourceLoaderOptions m_resourceLoaderOptions; | 193 const ResourceLoaderOptions m_resourceLoaderOptions; |
| 194 | 194 |
| 195 bool m_forceDoNotAllowStoredCredentials; | 195 bool m_forceDoNotAllowStoredCredentials; |
| 196 RefPtr<SecurityOrigin> m_securityOrigin; | 196 RefPtr<SecurityOrigin> m_securityOrigin; |
| 197 | 197 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 int m_corsRedirectLimit; | 232 int m_corsRedirectLimit; |
| 233 | 233 |
| 234 WebURLRequest::FetchRedirectMode m_redirectMode; | 234 WebURLRequest::FetchRedirectMode m_redirectMode; |
| 235 | 235 |
| 236 WeakPtrFactory<DocumentThreadableLoader> m_weakFactory; | 236 WeakPtrFactory<DocumentThreadableLoader> m_weakFactory; |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 } // namespace blink | 239 } // namespace blink |
| 240 | 240 |
| 241 #endif // DocumentThreadableLoader_h | 241 #endif // DocumentThreadableLoader_h |
| OLD | NEW |