Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Side by Side Diff: Source/core/workers/WorkerScriptLoader.h

Issue 360233005: Replace 'ResourceRequest::TargetType' with 'ResourceRequest::RequestContext'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Uninitialized === crash. :( Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerScriptLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 * 25 *
26 */ 26 */
27 27
28 #ifndef WorkerScriptLoader_h 28 #ifndef WorkerScriptLoader_h
29 #define WorkerScriptLoader_h 29 #define WorkerScriptLoader_h
30 30
31 #include "core/loader/ThreadableLoader.h" 31 #include "core/loader/ThreadableLoader.h"
32 #include "core/loader/ThreadableLoaderClient.h" 32 #include "core/loader/ThreadableLoaderClient.h"
33 #include "platform/network/ResourceRequest.h" 33 #include "platform/network/ResourceRequest.h"
34 #include "platform/weborigin/KURL.h" 34 #include "platform/weborigin/KURL.h"
35 #include "public/platform/WebURLRequest.h"
35 #include "wtf/FastAllocBase.h" 36 #include "wtf/FastAllocBase.h"
36 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
37 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
38 #include "wtf/text/StringBuilder.h" 39 #include "wtf/text/StringBuilder.h"
39 40
40 namespace WebCore { 41 namespace WebCore {
41 42
42 class ResourceRequest; 43 class ResourceRequest;
43 class ResourceResponse; 44 class ResourceResponse;
44 class ExecutionContext; 45 class ExecutionContext;
(...skipping 24 matching lines...) Expand all
69 const KURL& responseURL() const; 70 const KURL& responseURL() const;
70 bool failed() const { return m_failed; } 71 bool failed() const { return m_failed; }
71 unsigned long identifier() const { return m_identifier; } 72 unsigned long identifier() const { return m_identifier; }
72 73
73 virtual void didReceiveResponse(unsigned long /*identifier*/, const Reso urceResponse&) OVERRIDE; 74 virtual void didReceiveResponse(unsigned long /*identifier*/, const Reso urceResponse&) OVERRIDE;
74 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; 75 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE;
75 virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE ; 76 virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE ;
76 virtual void didFail(const ResourceError&) OVERRIDE; 77 virtual void didFail(const ResourceError&) OVERRIDE;
77 virtual void didFailRedirectCheck() OVERRIDE; 78 virtual void didFailRedirectCheck() OVERRIDE;
78 79
79 void setTargetType(ResourceRequest::TargetType targetType) { m_targetTyp e = targetType; } 80 void setRequestContext(blink::WebURLRequest::RequestContext requestConte xt) { m_requestContext = requestContext; }
80 81
81 private: 82 private:
82 friend class WTF::RefCounted<WorkerScriptLoader>; 83 friend class WTF::RefCounted<WorkerScriptLoader>;
83 84
84 WorkerScriptLoader(); 85 WorkerScriptLoader();
85 virtual ~WorkerScriptLoader(); 86 virtual ~WorkerScriptLoader();
86 87
87 PassOwnPtr<ResourceRequest> createResourceRequest(); 88 PassOwnPtr<ResourceRequest> createResourceRequest();
88 void notifyFinished(); 89 void notifyFinished();
89 90
90 WorkerScriptLoaderClient* m_client; 91 WorkerScriptLoaderClient* m_client;
91 RefPtr<ThreadableLoader> m_threadableLoader; 92 RefPtr<ThreadableLoader> m_threadableLoader;
92 String m_responseEncoding; 93 String m_responseEncoding;
93 OwnPtr<TextResourceDecoder> m_decoder; 94 OwnPtr<TextResourceDecoder> m_decoder;
94 StringBuilder m_script; 95 StringBuilder m_script;
95 KURL m_url; 96 KURL m_url;
96 KURL m_responseURL; 97 KURL m_responseURL;
97 bool m_failed; 98 bool m_failed;
98 unsigned long m_identifier; 99 unsigned long m_identifier;
99 bool m_finishing; 100 bool m_finishing;
100 ResourceRequest::TargetType m_targetType; 101 blink::WebURLRequest::RequestContext m_requestContext;
101 }; 102 };
102 103
103 } // namespace WebCore 104 } // namespace WebCore
104 105
105 #endif // WorkerScriptLoader_h 106 #endif // WorkerScriptLoader_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698