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

Unified Diff: sky/engine/bindings-dart/common/ExceptionMessages.h

Issue 875013003: Import Dart bindings as of Blink r188698. This merely copies the files over and does not attach any… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/bindings-dart/common/ExceptionMessages.h
diff --git a/sky/engine/bindings/core/v8/ExceptionMessages.h b/sky/engine/bindings-dart/common/ExceptionMessages.h
similarity index 86%
copy from sky/engine/bindings/core/v8/ExceptionMessages.h
copy to sky/engine/bindings-dart/common/ExceptionMessages.h
index 54f74545499c68b32a38471008b979262260b584..3712e7360e9770267ee022e519ced8cc2647affc 100644
--- a/sky/engine/bindings/core/v8/ExceptionMessages.h
+++ b/sky/engine/bindings-dart/common/ExceptionMessages.h
@@ -28,12 +28,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SKY_ENGINE_BINDINGS_CORE_V8_EXCEPTIONMESSAGES_H_
-#define SKY_ENGINE_BINDINGS_CORE_V8_EXCEPTIONMESSAGES_H_
+#ifndef ExceptionMessages_h
+#define ExceptionMessages_h
-#include "sky/engine/wtf/MathExtras.h"
-#include "sky/engine/wtf/text/StringBuilder.h"
-#include "sky/engine/wtf/text/WTFString.h"
+#include "wtf/MathExtras.h"
+#include "wtf/text/StringBuilder.h"
+#include "wtf/text/WTFString.h"
namespace blink {
@@ -72,15 +72,15 @@ public:
{
bool eq = given == bound;
StringBuilder result;
- result.appendLiteral("The ");
+ result.append("The ");
result.append(name);
- result.appendLiteral(" provided (");
+ result.append(" provided (");
result.append(formatNumber(given));
- result.appendLiteral(") is greater than ");
+ result.append(") is greater than ");
result.append(eq ? "or equal to " : "");
- result.appendLiteral("the maximum bound (");
+ result.append("the maximum bound (");
result.append(formatNumber(bound));
- result.appendLiteral(").");
+ result.append(").");
return result.toString();
}
@@ -89,15 +89,15 @@ public:
{
bool eq = given == bound;
StringBuilder result;
- result.appendLiteral("The ");
+ result.append("The ");
result.append(name);
- result.appendLiteral(" provided (");
+ result.append(" provided (");
result.append(formatNumber(given));
- result.appendLiteral(") is less than ");
+ result.append(") is less than ");
result.append(eq ? "or equal to " : "");
- result.appendLiteral("the minimum bound (");
+ result.append("the minimum bound (");
result.append(formatNumber(bound));
- result.appendLiteral(").");
+ result.append(").");
return result.toString();
}
@@ -105,14 +105,14 @@ public:
static String indexOutsideRange(const char* name, NumberType given, NumberType lowerBound, BoundType lowerType, NumberType upperBound, BoundType upperType)
{
StringBuilder result;
- result.appendLiteral("The ");
+ result.append("The ");
result.append(name);
- result.appendLiteral(" provided (");
+ result.append(" provided (");
result.append(formatNumber(given));
- result.appendLiteral(") is outside the range ");
+ result.append(") is outside the range ");
result.append(lowerType == ExclusiveBound ? '(' : '[');
result.append(formatNumber(lowerBound));
- result.appendLiteral(", ");
+ result.append(", ");
result.append(formatNumber(upperBound));
result.append(upperType == ExclusiveBound ? ')' : ']');
result.append('.');
@@ -161,4 +161,4 @@ template <> String ExceptionMessages::formatNumber<double>(double number);
} // namespace blink
-#endif // SKY_ENGINE_BINDINGS_CORE_V8_EXCEPTIONMESSAGES_H_
+#endif // ExceptionMessages_h
« no previous file with comments | « sky/engine/bindings-dart/common/DeleteResult.h ('k') | sky/engine/bindings-dart/common/ExceptionMessages.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698