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

Side by Side Diff: Source/core/loader/ThreadableLoaderClientWrapper.h

Issue 358573002: [ServiceWorker] Implement Headers class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 void didFail(const ResourceError& error) 91 void didFail(const ResourceError& error)
92 { 92 {
93 m_done = true; 93 m_done = true;
94 if (m_client) 94 if (m_client)
95 m_client->didFail(error); 95 m_client->didFail(error);
96 } 96 }
97 97
98 void didFailAccessControlCheck(const ResourceError& error) 98 void didFailAccessControlCheck(const ResourceError& error)
99 { 99 {
100 // Let the client first handle the failure by possibly issuing 100 m_done = true;
falken 2014/06/27 02:08:06 this change looks unrelated to Headers?
horo 2014/06/27 04:19:10 Removed this file. It was accidental included to t
101 // a didFail() with a cancellation error before marking this
102 // wrapper as 'done'.
103 if (m_client) 101 if (m_client)
104 m_client->didFailAccessControlCheck(error); 102 m_client->didFailAccessControlCheck(error);
105 m_done = true;
106 } 103 }
107 104
108 void didFailRedirectCheck() 105 void didFailRedirectCheck()
109 { 106 {
107 m_done = true;
110 if (m_client) 108 if (m_client)
111 m_client->didFailRedirectCheck(); 109 m_client->didFailRedirectCheck();
112 m_done = true;
113 } 110 }
114 111
115 void didReceiveAuthenticationCancellation(unsigned long identifier, const Re sourceResponse& response) 112 void didReceiveAuthenticationCancellation(unsigned long identifier, const Re sourceResponse& response)
116 { 113 {
117 if (m_client) 114 if (m_client)
118 m_client->didReceiveResponse(identifier, response); 115 m_client->didReceiveResponse(identifier, response);
119 } 116 }
120 117
121 void didDownloadData(int dataLength) 118 void didDownloadData(int dataLength)
122 { 119 {
123 if (m_client) 120 if (m_client)
124 m_client->didDownloadData(dataLength); 121 m_client->didDownloadData(dataLength);
125 } 122 }
126 123
127 protected: 124 protected:
128 explicit ThreadableLoaderClientWrapper(ThreadableLoaderClient* client) 125 explicit ThreadableLoaderClientWrapper(ThreadableLoaderClient* client)
129 : m_client(client) 126 : m_client(client)
130 , m_done(false) 127 , m_done(false)
131 { 128 {
132 } 129 }
133 130
134 ThreadableLoaderClient* m_client; 131 ThreadableLoaderClient* m_client;
135 bool m_done; 132 bool m_done;
136 }; 133 };
137 134
138 } // namespace WebCore 135 } // namespace WebCore
139 136
140 #endif // ThreadableLoaderClientWrapper_h 137 #endif // ThreadableLoaderClientWrapper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698