Chromium Code Reviews| Index: cc/ipc/local_frame_id_struct_traits.h |
| diff --git a/cc/ipc/local_frame_id_struct_traits.h b/cc/ipc/local_frame_id_struct_traits.h |
| index 50af9a9cc6414ffeb528599af973404f73323753..84bc79f7c80ad4dd6090ade1c8dd7d48ad23290b 100644 |
| --- a/cc/ipc/local_frame_id_struct_traits.h |
| +++ b/cc/ipc/local_frame_id_struct_traits.h |
| @@ -7,6 +7,7 @@ |
| #include "cc/ipc/local_frame_id.mojom-shared.h" |
| #include "cc/surfaces/local_frame_id.h" |
| +#include "mojo/common/common_custom_types_struct_traits.h" |
| namespace mojo { |
| @@ -16,13 +17,18 @@ struct StructTraits<cc::mojom::LocalFrameIdDataView, cc::LocalFrameId> { |
| return local_frame_id.local_id(); |
| } |
| - static uint64_t nonce(const cc::LocalFrameId& local_frame_id) { |
| + static const base::UnguessableToken& nonce( |
| + const cc::LocalFrameId& local_frame_id) { |
| return local_frame_id.nonce(); |
| } |
| static bool Read(cc::mojom::LocalFrameIdDataView data, |
| cc::LocalFrameId* out) { |
| - *out = cc::LocalFrameId(data.local_id(), data.nonce()); |
| + base::UnguessableToken nonce; |
| + if (!data.ReadNonce(&nonce)) { |
|
Fady Samuel
2016/10/07 14:18:11
nit: drop the braces.
Alex Z.
2016/10/07 14:27:49
Done.
|
| + return false; |
| + } |
| + *out = cc::LocalFrameId(data.local_id(), nonce); |
| return true; |
| } |
| }; |