| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // behavior it wants to test, which would otherwise be reserved for network
loads. | 270 // behavior it wants to test, which would otherwise be reserved for network
loads. |
| 271 if (getType() == MainResource || getType() == Raw) | 271 if (getType() == MainResource || getType() == Raw) |
| 272 return false; | 272 return false; |
| 273 | 273 |
| 274 WrappedResourceRequest wrappedRequest(request); | 274 WrappedResourceRequest wrappedRequest(request); |
| 275 WebString mimetype; | 275 WebString mimetype; |
| 276 WebString charset; | 276 WebString charset; |
| 277 WebData webData; | 277 WebData webData; |
| 278 if (!Platform::current()->parseDataURLIfCanBeHandledLocally(wrappedRequest,
mimetype, charset, webData)) | 278 if (!Platform::current()->parseDataURLIfCanBeHandledLocally(wrappedRequest,
mimetype, charset, webData)) |
| 279 return false; | 279 return false; |
| 280 RefPtr<SharedBuffer> data = PassRefPtr<SharedBuffer>(webData); | |
| 281 if (!data) | |
| 282 return false; | |
| 283 | 280 |
| 284 loadLocallyStaticData(request, options, mimetype, charset, data.release()); | 281 loadLocallyStaticData(request, options, mimetype, charset, PassRefPtr<Shared
Buffer>(webData)); |
| 285 return true; | 282 return true; |
| 286 } | 283 } |
| 287 | 284 |
| 288 void Resource::load(ResourceFetcher* fetcher, const ResourceLoaderOptions& optio
ns) | 285 void Resource::load(ResourceFetcher* fetcher, const ResourceLoaderOptions& optio
ns) |
| 289 { | 286 { |
| 290 m_options = options; | 287 m_options = options; |
| 291 m_loading = true; | 288 m_loading = true; |
| 292 | 289 |
| 293 ResourceRequest request(m_revalidatingRequest.isNull() ? m_resourceRequest :
m_revalidatingRequest); | 290 ResourceRequest request(m_revalidatingRequest.isNull() ? m_resourceRequest :
m_revalidatingRequest); |
| 294 if (!accept().isEmpty()) | 291 if (!accept().isEmpty()) |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 case Resource::Media: | 1196 case Resource::Media: |
| 1200 return "Media"; | 1197 return "Media"; |
| 1201 case Resource::Manifest: | 1198 case Resource::Manifest: |
| 1202 return "Manifest"; | 1199 return "Manifest"; |
| 1203 } | 1200 } |
| 1204 ASSERT_NOT_REACHED(); | 1201 ASSERT_NOT_REACHED(); |
| 1205 return "Unknown"; | 1202 return "Unknown"; |
| 1206 } | 1203 } |
| 1207 | 1204 |
| 1208 } // namespace blink | 1205 } // namespace blink |
| OLD | NEW |