OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * 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 * | 10 * |
(...skipping 27 matching lines...) Expand all Loading... |
38 // 100MB | 38 // 100MB |
39 static size_t maximumResourcesContentSize = 100 * 1000 * 1000; | 39 static size_t maximumResourcesContentSize = 100 * 1000 * 1000; |
40 | 40 |
41 // 10MB | 41 // 10MB |
42 static size_t maximumSingleResourceContentSize = 10 * 1000 * 1000; | 42 static size_t maximumSingleResourceContentSize = 10 * 1000 * 1000; |
43 } | 43 } |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 | 47 |
48 PassRefPtrWillBeRawPtr<XHRReplayData> XHRReplayData::create(ExecutionContext* ex
ecutionContext, const AtomicString& method, const KURL& url, bool async, PassRef
Ptr<FormData> formData, bool includeCredentials) | 48 PassRefPtrWillBeRawPtr<XHRReplayData> XHRReplayData::create(ExecutionContext* ex
ecutionContext, const AtomicString& method, const KURL& url, bool async, PassRef
Ptr<EncodedFormData> formData, bool includeCredentials) |
49 { | 49 { |
50 return adoptRefWillBeNoop(new XHRReplayData(executionContext, method, url, a
sync, formData, includeCredentials)); | 50 return adoptRefWillBeNoop(new XHRReplayData(executionContext, method, url, a
sync, formData, includeCredentials)); |
51 } | 51 } |
52 | 52 |
53 void XHRReplayData::addHeader(const AtomicString& key, const AtomicString& value
) | 53 void XHRReplayData::addHeader(const AtomicString& key, const AtomicString& value
) |
54 { | 54 { |
55 m_headers.set(key, value); | 55 m_headers.set(key, value); |
56 } | 56 } |
57 | 57 |
58 XHRReplayData::XHRReplayData(ExecutionContext* executionContext, const AtomicStr
ing& method, const KURL& url, bool async, PassRefPtr<FormData> formData, bool in
cludeCredentials) | 58 XHRReplayData::XHRReplayData(ExecutionContext* executionContext, const AtomicStr
ing& method, const KURL& url, bool async, PassRefPtr<EncodedFormData> formData,
bool includeCredentials) |
59 : ContextLifecycleObserver(executionContext) | 59 : ContextLifecycleObserver(executionContext) |
60 , m_method(method) | 60 , m_method(method) |
61 , m_url(url) | 61 , m_url(url) |
62 , m_async(async) | 62 , m_async(async) |
63 , m_formData(formData) | 63 , m_formData(formData) |
64 , m_includeCredentials(includeCredentials) | 64 , m_includeCredentials(includeCredentials) |
65 { | 65 { |
66 } | 66 } |
67 | 67 |
68 DEFINE_TRACE(XHRReplayData) | 68 DEFINE_TRACE(XHRReplayData) |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 String requestId = m_requestIdsDeque.takeFirst(); | 372 String requestId = m_requestIdsDeque.takeFirst(); |
373 ResourceData* resourceData = resourceDataForRequestId(requestId); | 373 ResourceData* resourceData = resourceDataForRequestId(requestId); |
374 if (resourceData) | 374 if (resourceData) |
375 m_contentSize -= resourceData->evictContent(); | 375 m_contentSize -= resourceData->evictContent(); |
376 } | 376 } |
377 return true; | 377 return true; |
378 } | 378 } |
379 | 379 |
380 } // namespace blink | 380 } // namespace blink |
381 | 381 |
OLD | NEW |