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

Side by Side Diff: Source/modules/serviceworkers/Headers.cpp

Issue 333423004: moved to https://codereview.chromium.org/399543002/ (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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/Headers.h" 6 #include "modules/serviceworkers/Headers.h"
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "core/fetch/CrossOriginAccessControl.h" 10 #include "core/fetch/CrossOriginAccessControl.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 } 291 }
292 292
293 Headers::Headers() 293 Headers::Headers()
294 : m_headerList(FetchHeaderList::create()) 294 : m_headerList(FetchHeaderList::create())
295 , m_guard(NoneGuard) 295 , m_guard(NoneGuard)
296 { 296 {
297 ScriptWrappable::init(this); 297 ScriptWrappable::init(this);
298 } 298 }
299 299
300 // Called when creating Request or Responce. 300 // Called when creating Request or Response.
301 Headers::Headers(FetchHeaderList* headerList) 301 Headers::Headers(FetchHeaderList* headerList)
302 : m_headerList(headerList) 302 : m_headerList(headerList)
303 , m_guard(NoneGuard) 303 , m_guard(NoneGuard)
304 { 304 {
305 ScriptWrappable::init(this); 305 ScriptWrappable::init(this);
306 } 306 }
307 307
308 void Headers::forEachInternal(PassOwnPtr<HeadersForEachCallback> callback, Scrip tValue* thisArg) 308 void Headers::forEachInternal(PassOwnPtr<HeadersForEachCallback> callback, Scrip tValue* thisArg)
309 { 309 {
310 TrackExceptionState exceptionState; 310 TrackExceptionState exceptionState;
311 for (size_t i = 0; i < m_headerList->size(); ++i) { 311 for (size_t i = 0; i < m_headerList->size(); ++i) {
312 if (thisArg) 312 if (thisArg)
313 callback->handleItem(*thisArg, m_headerList->list()[i]->second, m_he aderList->list()[i]->first, this); 313 callback->handleItem(*thisArg, m_headerList->list()[i]->second, m_he aderList->list()[i]->first, this);
314 else 314 else
315 callback->handleItem(m_headerList->list()[i]->second, m_headerList-> list()[i]->first, this); 315 callback->handleItem(m_headerList->list()[i]->second, m_headerList-> list()[i]->first, this);
316 if (exceptionState.hadException()) 316 if (exceptionState.hadException())
317 break; 317 break;
318 } 318 }
319 } 319 }
320 320
321 } // namespace WebCore 321 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/HeaderMapForEachCallback.idl ('k') | Source/modules/serviceworkers/Request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698