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

Side by Side Diff: third_party/WebKit/Source/core/loader/BeaconLoader.cpp

Issue 2232083002: Fix incorrect usage of StringImpl::sizeInBytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size_teeee Created 4 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
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 "core/loader/BeaconLoader.h" 5 #include "core/loader/BeaconLoader.h"
6 6
7 #include "core/dom/DOMArrayBufferView.h" 7 #include "core/dom/DOMArrayBufferView.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/fetch/CrossOriginAccessControl.h" 9 #include "core/fetch/CrossOriginAccessControl.h"
10 #include "core/fetch/FetchContext.h" 10 #include "core/fetch/FetchContext.h"
(...skipping 27 matching lines...) Expand all
38 38
39 class BeaconString final : public Beacon { 39 class BeaconString final : public Beacon {
40 public: 40 public:
41 explicit BeaconString(const String& data) 41 explicit BeaconString(const String& data)
42 : m_data(data) 42 : m_data(data)
43 { 43 {
44 } 44 }
45 45
46 unsigned long long size() const override 46 unsigned long long size() const override
47 { 47 {
48 return m_data.sizeInBytes(); 48 return m_data.charactersSizeInBytes();
49 } 49 }
50 50
51 bool serialize(ResourceRequest& request, int, int&) const override 51 bool serialize(ResourceRequest& request, int, int&) const override
52 { 52 {
53 RefPtr<EncodedFormData> entityBody = EncodedFormData::create(m_data.utf8 ()); 53 RefPtr<EncodedFormData> entityBody = EncodedFormData::create(m_data.utf8 ());
54 request.setHTTPBody(entityBody); 54 request.setHTTPBody(entityBody);
55 request.setHTTPContentType(getContentType()); 55 request.setHTTPContentType(getContentType());
56 return true; 56 return true;
57 } 57 }
58 58
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 dispose(); 266 dispose();
267 // Signal WebURLLoader that the redirect musn't be followed. 267 // Signal WebURLLoader that the redirect musn't be followed.
268 passedNewRequest = WebURLRequest(); 268 passedNewRequest = WebURLRequest();
269 return; 269 return;
270 } 270 }
271 // FIXME: http://crbug.com/427429 is needed to correctly propagate 271 // FIXME: http://crbug.com/427429 is needed to correctly propagate
272 // updates of Origin: following this successful redirect. 272 // updates of Origin: following this successful redirect.
273 } 273 }
274 274
275 } // namespace blink 275 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698