| Index: content/common/indexed_db/indexed_db_enum_traits.cc
|
| diff --git a/content/common/indexed_db/indexed_db_enum_traits.cc b/content/common/indexed_db/indexed_db_enum_traits.cc
|
| index 13cd0467ea4c807ec69c882f98612167ae8efc52..498e4ab47aedf7995ed37263a0d0e03be37762c6 100644
|
| --- a/content/common/indexed_db/indexed_db_enum_traits.cc
|
| +++ b/content/common/indexed_db/indexed_db_enum_traits.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| using indexed_db::mojom::CursorDirection;
|
| using indexed_db::mojom::DataLoss;
|
| +using indexed_db::mojom::OperationType;
|
| using indexed_db::mojom::PutMode;
|
| using indexed_db::mojom::TaskType;
|
| using indexed_db::mojom::TransactionMode;
|
| @@ -78,6 +79,45 @@ bool EnumTraits<DataLoss, blink::WebIDBDataLoss>::FromMojom(
|
| }
|
|
|
| // static
|
| +OperationType EnumTraits<OperationType, blink::WebIDBOperationType>::ToMojom(
|
| + blink::WebIDBOperationType input) {
|
| + switch (input) {
|
| + case blink::WebIDBAdd:
|
| + return OperationType::Add;
|
| + case blink::WebIDBPut:
|
| + return OperationType::Put;
|
| + case blink::WebIDBDelete:
|
| + return OperationType::Delete;
|
| + case blink::WebIDBClear:
|
| + return OperationType::Clear;
|
| + case blink::WebIDBOperationTypeCount:
|
| + NOTREACHED();
|
| + return OperationType::Add;
|
| + }
|
| +}
|
| +
|
| +// static
|
| +bool EnumTraits<OperationType, blink::WebIDBOperationType>::FromMojom(
|
| + OperationType input,
|
| + blink::WebIDBOperationType* output) {
|
| + switch (input) {
|
| + case OperationType::Add:
|
| + *output = blink::WebIDBAdd;
|
| + return true;
|
| + case OperationType::Put:
|
| + *output = blink::WebIDBPut;
|
| + return true;
|
| + case OperationType::Delete:
|
| + *output = blink::WebIDBDelete;
|
| + return true;
|
| + case OperationType::Clear:
|
| + *output = blink::WebIDBClear;
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +// static
|
| PutMode EnumTraits<PutMode, blink::WebIDBPutMode>::ToMojom(
|
| blink::WebIDBPutMode input) {
|
| switch (input) {
|
|
|