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

Unified Diff: cc/ipc/local_frame_id_struct_traits.h

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Changed SurfaceManager::kRootSurfaceId to a private field to avoid static initialization Created 4 years, 1 month 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
« no previous file with comments | « cc/ipc/local_frame_id.mojom ('k') | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..514bd4cbeaeb11dd7602dd77d60b2f5deddf41e9 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))
+ return false;
+
+ *out = cc::LocalFrameId(data.local_id(), nonce);
return true;
}
};
« no previous file with comments | « cc/ipc/local_frame_id.mojom ('k') | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698