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

Side by Side Diff: Source/core/fetch/ResourceLoader.h

Issue 414423003: Oilpan: Prepare to move ResourceLoader and ResourceLoaderSet to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: FINAL Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 30 matching lines...) Expand all
41 } 41 }
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class Resource; 45 class Resource;
46 class KURL; 46 class KURL;
47 class ResourceError; 47 class ResourceError;
48 class ResourceResponse; 48 class ResourceResponse;
49 class ResourceLoaderHost; 49 class ResourceLoaderHost;
50 50
51 class ResourceLoader FINAL : public RefCounted<ResourceLoader>, protected blink: :WebURLLoaderClient { 51 class ResourceLoader FINAL : public RefCountedWillBeGarbageCollectedFinalized<Re sourceLoader>, protected WebURLLoaderClient {
52 public: 52 public:
53 static PassRefPtr<ResourceLoader> create(ResourceLoaderHost*, Resource*, con st ResourceRequest&, const ResourceLoaderOptions&); 53 static PassRefPtrWillBeRawPtr<ResourceLoader> create(ResourceLoaderHost*, Re source*, const ResourceRequest&, const ResourceLoaderOptions&);
54 virtual ~ResourceLoader(); 54 virtual ~ResourceLoader();
55 void trace(Visitor*);
55 56
56 void start(); 57 void start();
57 void changeToSynchronous(); 58 void changeToSynchronous();
58 59
59 void cancel(); 60 void cancel();
60 void cancel(const ResourceError&); 61 void cancel(const ResourceError&);
61 void cancelIfNotFinishing(); 62 void cancelIfNotFinishing();
62 63
63 Resource* cachedResource() { return m_resource; } 64 Resource* cachedResource() { return m_resource; }
64 const ResourceRequest& originalRequest() const { return m_originalRequest; } 65 const ResourceRequest& originalRequest() const { return m_originalRequest; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void init(const ResourceRequest&); 106 void init(const ResourceRequest&);
106 void requestSynchronously(); 107 void requestSynchronously();
107 108
108 void didFinishLoadingOnePart(double finishTime, int64_t encodedDataLength); 109 void didFinishLoadingOnePart(double finishTime, int64_t encodedDataLength);
109 110
110 bool responseNeedsAccessControlCheck() const; 111 bool responseNeedsAccessControlCheck() const;
111 112
112 ResourceRequest& applyOptions(ResourceRequest&) const; 113 ResourceRequest& applyOptions(ResourceRequest&) const;
113 114
114 OwnPtr<blink::WebURLLoader> m_loader; 115 OwnPtr<blink::WebURLLoader> m_loader;
115 RefPtrWillBePersistent<ResourceLoaderHost> m_host; 116 RefPtrWillBeMember<ResourceLoaderHost> m_host;
116 117
117 ResourceRequest m_request; 118 ResourceRequest m_request;
118 ResourceRequest m_originalRequest; // Before redirects. 119 ResourceRequest m_originalRequest; // Before redirects.
119 120
120 bool m_notifiedLoadComplete; 121 bool m_notifiedLoadComplete;
121 122
122 bool m_defersLoading; 123 bool m_defersLoading;
123 ResourceRequest m_deferredRequest; 124 ResourceRequest m_deferredRequest;
124 ResourceLoaderOptions m_options; 125 ResourceLoaderOptions m_options;
125 126
126 enum ResourceLoaderState { 127 enum ResourceLoaderState {
127 Initialized, 128 Initialized,
128 Finishing, 129 Finishing,
129 Terminated 130 Terminated
130 }; 131 };
131 132
132 enum ConnectionState { 133 enum ConnectionState {
133 ConnectionStateNew, 134 ConnectionStateNew,
134 ConnectionStateStarted, 135 ConnectionStateStarted,
135 ConnectionStateReceivedResponse, 136 ConnectionStateReceivedResponse,
136 ConnectionStateReceivingData, 137 ConnectionStateReceivingData,
137 ConnectionStateFinishedLoading, 138 ConnectionStateFinishedLoading,
138 ConnectionStateCanceled, 139 ConnectionStateCanceled,
139 ConnectionStateFailed, 140 ConnectionStateFailed,
140 }; 141 };
141 142
142 Resource* m_resource; 143 RawPtrWillBeMember<Resource> m_resource;
143 ResourceLoaderState m_state; 144 ResourceLoaderState m_state;
144 145
145 // Used for sanity checking to make sure we don't experience illegal state 146 // Used for sanity checking to make sure we don't experience illegal state
146 // transitions. 147 // transitions.
147 ConnectionState m_connectionState; 148 ConnectionState m_connectionState;
148 149
149 OwnPtr<RequestCountTracker> m_requestCountTracker; 150 OwnPtr<RequestCountTracker> m_requestCountTracker;
150 }; 151 };
151 152
152 } 153 }
153 154
154 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698