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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBStructTraits.cpp

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 "IDBStructTraits.h"
6
7 using indexed_db::mojom::blink::DataLoss;
8
9 namespace mojo {
10
11 DataLoss EnumTraits<DataLoss, blink::WebIDBDataLoss>::ToMojom(
12 blink::WebIDBDataLoss input)
13 {
14 switch (input) {
15 case blink::WebIDBDataLossNone:
16 return DataLoss::None;
17 case blink::WebIDBDataLossTotal:
18 return DataLoss::Total;
19 }
20
21 NOTREACHED();
22 return DataLoss::None;
23 }
24
25 bool EnumTraits<DataLoss, blink::WebIDBDataLoss>::FromMojom(
26 DataLoss input,
27 blink::WebIDBDataLoss* output)
28 {
29 switch (input) {
30 case DataLoss::None:
31 *output = blink::WebIDBDataLossNone;
32 return true;
33 case DataLoss::Total:
34 *output = blink::WebIDBDataLossTotal;
35 return true;
36 }
37
38 NOTREACHED();
39 return false;
40 }
41
42 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698