Index: content/child/geofencing/geofencing_dispatcher.cc |
diff --git a/content/child/geofencing/geofencing_dispatcher.cc b/content/child/geofencing/geofencing_dispatcher.cc |
index 37ba161aa289fa8ec44174beae43bfdf59e2f29c..2dda75213aa3be9a607c4d7ac356e875c7701521 100644 |
--- a/content/child/geofencing/geofencing_dispatcher.cc |
+++ b/content/child/geofencing/geofencing_dispatcher.cc |
@@ -166,7 +166,7 @@ void GeofencingDispatcher::OnRegisterRegionComplete(int thread_id, |
if (status == GEOFENCING_STATUS_OK) { |
callbacks->onSuccess(); |
} else { |
- callbacks->onError(new WebGeofencingError( |
+ callbacks->onError(WebGeofencingError( |
WebGeofencingError::ErrorTypeAbort, |
blink::WebString::fromUTF8(GeofencingStatusToString(status)))); |
} |
@@ -183,7 +183,7 @@ void GeofencingDispatcher::OnUnregisterRegionComplete(int thread_id, |
if (status == GEOFENCING_STATUS_OK) { |
callbacks->onSuccess(); |
} else { |
- callbacks->onError(new WebGeofencingError( |
+ callbacks->onError(WebGeofencingError( |
WebGeofencingError::ErrorTypeAbort, |
blink::WebString::fromUTF8(GeofencingStatusToString(status)))); |
} |
@@ -200,18 +200,17 @@ void GeofencingDispatcher::OnGetRegisteredRegionsComplete( |
DCHECK(callbacks); |
if (status == GEOFENCING_STATUS_OK) { |
- scoped_ptr<blink::WebVector<blink::WebGeofencingRegistration>> result( |
- new blink::WebVector<blink::WebGeofencingRegistration>(regions.size())); |
+ blink::WebVector<blink::WebGeofencingRegistration> result(regions.size()); |
size_t index = 0; |
for (GeofencingRegistrations::const_iterator it = regions.begin(); |
it != regions.end(); |
++it, ++index) { |
- (*result)[index].id = blink::WebString::fromUTF8(it->first); |
- (*result)[index].region = it->second; |
+ result[index].id = blink::WebString::fromUTF8(it->first); |
+ result[index].region = it->second; |
} |
- callbacks->onSuccess(result.release()); |
+ callbacks->onSuccess(result); |
} else { |
- callbacks->onError(new WebGeofencingError( |
+ callbacks->onError(WebGeofencingError( |
WebGeofencingError::ErrorTypeAbort, |
blink::WebString::fromUTF8(GeofencingStatusToString(status)))); |
} |