| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "modules/geofencing/GeofencingError.h" | |
| 6 | |
| 7 #include "core/dom/DOMException.h" | |
| 8 #include "core/dom/ExceptionCode.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 DOMException* GeofencingError::take(ScriptPromiseResolver*, const WebGeofencingE
rror& webError) | |
| 13 { | |
| 14 switch (webError.errorType) { | |
| 15 case WebGeofencingError::ErrorTypeAbort: | |
| 16 return DOMException::create(AbortError, webError.message); | |
| 17 case WebGeofencingError::ErrorTypeUnknown: | |
| 18 return DOMException::create(UnknownError, webError.message); | |
| 19 } | |
| 20 ASSERT_NOT_REACHED(); | |
| 21 return DOMException::create(UnknownError); | |
| 22 } | |
| 23 | |
| 24 } // namespace blink | |
| OLD | NEW |