Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/fetch/RawResource.h" | 36 #include "core/fetch/RawResource.h" |
| 37 #include "core/fetch/ResourceOwner.h" | 37 #include "core/fetch/ResourceOwner.h" |
| 38 #include "core/frame/csp/ContentSecurityPolicy.h" | 38 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 39 #include "core/loader/ThreadableLoader.h" | 39 #include "core/loader/ThreadableLoader.h" |
| 40 #include "platform/Timer.h" | 40 #include "platform/Timer.h" |
| 41 #include "platform/network/HTTPHeaderMap.h" | 41 #include "platform/network/HTTPHeaderMap.h" |
| 42 #include "platform/network/ResourceError.h" | 42 #include "platform/network/ResourceError.h" |
| 43 #include "wtf/Forward.h" | 43 #include "wtf/Forward.h" |
| 44 #include "wtf/OwnPtr.h" | 44 #include "wtf/OwnPtr.h" |
| 45 #include "wtf/PassRefPtr.h" | 45 #include "wtf/PassRefPtr.h" |
|
tyoshino (SeeGerritForStatus)
2016/03/03 11:53:38
Change to PassOwnPtr.h and add Handle.h
hiroshige
2016/03/08 23:39:25
Done.
| |
| 46 #include "wtf/WeakPtr.h" | |
| 46 #include "wtf/text/WTFString.h" | 47 #include "wtf/text/WTFString.h" |
| 47 | 48 |
| 48 namespace blink { | 49 namespace blink { |
| 49 | 50 |
| 50 class Document; | 51 class Document; |
| 51 class KURL; | 52 class KURL; |
| 52 class ResourceRequest; | 53 class ResourceRequest; |
| 53 class SecurityOrigin; | 54 class SecurityOrigin; |
| 54 class ThreadableLoaderClient; | 55 class ThreadableLoaderClient; |
| 55 | 56 |
| 56 class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv ate RawResourceClient { | 57 class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv ate RawResourceClient { |
| 57 USING_FAST_MALLOC(DocumentThreadableLoader); | 58 USING_FAST_MALLOC(DocumentThreadableLoader); |
| 58 public: | 59 public: |
| 59 static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOp tions&); | 60 static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOp tions&); |
| 60 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable LoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&); | 61 static PassOwnPtr<DocumentThreadableLoader> create(Document&, Threadable LoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&); |
| 61 ~DocumentThreadableLoader() override; | 62 ~DocumentThreadableLoader() override; |
| 62 | 63 |
| 63 void start(const ResourceRequest&) override; | 64 void start(const ResourceRequest&) override; |
| 64 | 65 |
| 65 void overrideTimeout(unsigned long timeout) override; | 66 void overrideTimeout(unsigned long timeout) override; |
| 66 | 67 |
| 67 // |this| may be dead after calling this method in async mode. | 68 // |this| may be dead after calling this method in async mode. |
| 68 void cancel() override; | 69 void cancel() override; |
| 69 void setDefersLoading(bool); | 70 void setDefersLoading(bool); |
| 70 | 71 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 double m_requestStartedSeconds; // Time an asynchronous fetch request is started | 217 double m_requestStartedSeconds; // Time an asynchronous fetch request is started |
| 217 | 218 |
| 218 // Max number of times that this DocumentThreadableLoader can follow | 219 // Max number of times that this DocumentThreadableLoader can follow |
| 219 // cross-origin redirects. | 220 // cross-origin redirects. |
| 220 // This is used to limit the number of redirects. | 221 // This is used to limit the number of redirects. |
| 221 // But this value is not the max number of total redirects allowed, | 222 // But this value is not the max number of total redirects allowed, |
| 222 // because same-origin redirects are not counted here. | 223 // because same-origin redirects are not counted here. |
| 223 int m_corsRedirectLimit; | 224 int m_corsRedirectLimit; |
| 224 | 225 |
| 225 WebURLRequest::FetchRedirectMode m_redirectMode; | 226 WebURLRequest::FetchRedirectMode m_redirectMode; |
| 227 | |
| 228 WeakPtrFactory<DocumentThreadableLoader> m_weakFactory; | |
| 226 }; | 229 }; |
| 227 | 230 |
| 228 } // namespace blink | 231 } // namespace blink |
| 229 | 232 |
| 230 #endif // DocumentThreadableLoader_h | 233 #endif // DocumentThreadableLoader_h |
| OLD | NEW |