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

Side by Side Diff: Source/modules/beacon/NavigatorBeacon.cpp

Issue 727523002: IDL: Use raw pointers instead of RawPtr<> for rvalue types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/bindings/tests/results/core/UnionTypesCore.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/beacon/NavigatorBeacon.h" 6 #include "modules/beacon/NavigatorBeacon.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/modules/v8/UnionTypesModules.h" 9 #include "bindings/modules/v8/UnionTypesModules.h"
10 #include "core/dom/DOMArrayBufferView.h" 10 #include "core/dom/DOMArrayBufferView.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (!impl.canSendBeacon(context, url, exceptionState)) 97 if (!impl.canSendBeacon(context, url, exceptionState))
98 return false; 98 return false;
99 99
100 int allowance = impl.maxAllowance(); 100 int allowance = impl.maxAllowance();
101 int bytes = 0; 101 int bytes = 0;
102 bool allowed; 102 bool allowed;
103 103
104 if (data.isArrayBufferView()) 104 if (data.isArrayBufferView())
105 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsArrayBufferView()->view(), bytes); 105 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsArrayBufferView()->view(), bytes);
106 else if (data.isBlob()) 106 else if (data.isBlob())
107 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsBlob().get(), bytes); 107 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsBlob(), bytes);
108 else if (data.isString()) 108 else if (data.isString())
109 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsString(), bytes); 109 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsString(), bytes);
110 else if (data.isFormData()) 110 else if (data.isFormData())
111 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsFormData(), bytes); 111 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, da ta.getAsFormData(), bytes);
112 else 112 else
113 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, St ring(), bytes); 113 allowed = BeaconLoader::sendBeacon(navigator.frame(), allowance, url, St ring(), bytes);
114 114
115 return impl.beaconResult(context, allowed, bytes); 115 return impl.beaconResult(context, allowed, bytes);
116 } 116 }
117 117
118 } // namespace blink 118 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/UnionTypesCore.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698