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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 SharedBuffer* data = archiveResource->data(); | 1002 SharedBuffer* data = archiveResource->data(); |
1003 if (data) | 1003 if (data) |
1004 resource->appendData(data->data(), data->size()); | 1004 resource->appendData(data->data(), data->size()); |
1005 resource->finish(); | 1005 resource->finish(); |
1006 return true; | 1006 return true; |
1007 } | 1007 } |
1008 | 1008 |
1009 void ResourceFetcher::didFinishLoading(Resource* resource, double finishTime, in
t64_t encodedDataLength) | 1009 void ResourceFetcher::didFinishLoading(Resource* resource, double finishTime, in
t64_t encodedDataLength) |
1010 { | 1010 { |
1011 TRACE_EVENT_ASYNC_END0("blink.net", "Resource", resource); | 1011 TRACE_EVENT_ASYNC_END0("blink.net", "Resource", resource); |
1012 RefPtr<ResourceFetcher> protect(this); | 1012 RefPtrWillBeRawPtr<ResourceFetcher> protect(this); |
1013 willTerminateResourceLoader(resource->loader()); | 1013 willTerminateResourceLoader(resource->loader()); |
1014 | 1014 |
1015 if (resource && resource->response().isHTTP() && resource->response().httpSt
atusCode() < 400) { | 1015 if (resource && resource->response().isHTTP() && resource->response().httpSt
atusCode() < 400) { |
1016 ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resour
ce); | 1016 ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resour
ce); |
1017 if (it != m_resourceTimingInfoMap.end()) { | 1017 if (it != m_resourceTimingInfoMap.end()) { |
1018 RefPtr<ResourceTimingInfo> info = it->value; | 1018 RefPtr<ResourceTimingInfo> info = it->value; |
1019 m_resourceTimingInfoMap.remove(it); | 1019 m_resourceTimingInfoMap.remove(it); |
1020 populateResourceTiming(info.get(), resource, false); | 1020 populateResourceTiming(info.get(), resource, false); |
1021 context().addResourceTiming(info.get(), resource->type() == Resource
::MainResource); | 1021 context().addResourceTiming(info.get(), resource->type() == Resource
::MainResource); |
1022 } | 1022 } |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 ResourceLoaderHost::trace(visitor); | 1283 ResourceLoaderHost::trace(visitor); |
1284 } | 1284 } |
1285 | 1285 |
1286 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) | 1286 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) |
1287 { | 1287 { |
1288 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); | 1288 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); |
1289 return static_cast<ResourceFetcher*>(host); | 1289 return static_cast<ResourceFetcher*>(host); |
1290 } | 1290 } |
1291 | 1291 |
1292 } | 1292 } |
OLD | NEW |