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

Side by Side Diff: cc/ipc/cc_param_traits.cc

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Created 4 years, 2 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/ipc/cc_param_traits.h" 5 #include "cc/ipc/cc_param_traits.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/unguessable_token.h"
12 #include "cc/output/compositor_frame.h" 13 #include "cc/output/compositor_frame.h"
13 #include "cc/output/filter_operations.h" 14 #include "cc/output/filter_operations.h"
14 #include "cc/quads/debug_border_draw_quad.h" 15 #include "cc/quads/debug_border_draw_quad.h"
15 #include "cc/quads/draw_quad.h" 16 #include "cc/quads/draw_quad.h"
16 #include "cc/quads/largest_draw_quad.h" 17 #include "cc/quads/largest_draw_quad.h"
17 #include "cc/quads/render_pass_draw_quad.h" 18 #include "cc/quads/render_pass_draw_quad.h"
18 #include "cc/quads/solid_color_draw_quad.h" 19 #include "cc/quads/solid_color_draw_quad.h"
19 #include "cc/quads/surface_draw_quad.h" 20 #include "cc/quads/surface_draw_quad.h"
20 #include "cc/quads/tile_draw_quad.h" 21 #include "cc/quads/tile_draw_quad.h"
21 #include "cc/quads/yuv_video_draw_quad.h" 22 #include "cc/quads/yuv_video_draw_quad.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 base::PickleIterator* iter, 586 base::PickleIterator* iter,
586 param_type* p) { 587 param_type* p) {
587 uint32_t client_id; 588 uint32_t client_id;
588 if (!ReadParam(m, iter, &client_id)) 589 if (!ReadParam(m, iter, &client_id))
589 return false; 590 return false;
590 591
591 uint32_t local_id; 592 uint32_t local_id;
592 if (!ReadParam(m, iter, &local_id)) 593 if (!ReadParam(m, iter, &local_id))
593 return false; 594 return false;
594 595
595 uint64_t nonce; 596 base::UnguessableToken nonce;
596 if (!ReadParam(m, iter, &nonce)) 597 if (!ReadParam(m, iter, &nonce))
597 return false; 598 return false;
598 599
599 *p = cc::SurfaceId(client_id, local_id, nonce); 600 *p = cc::SurfaceId(client_id, local_id, nonce);
600 return true; 601 return true;
601 } 602 }
602 603
603 void ParamTraits<cc::SurfaceId>::Log(const param_type& p, std::string* l) { 604 void ParamTraits<cc::SurfaceId>::Log(const param_type& p, std::string* l) {
604 l->append("SurfaceId("); 605 l->append("SurfaceId(");
605 LogParam(p.client_id(), l); 606 LogParam(p.client_id(), l);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_ 970 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_
970 #include "cc/ipc/cc_param_traits_macros.h" 971 #include "cc/ipc/cc_param_traits_macros.h"
971 } // namespace IPC 972 } // namespace IPC
972 973
973 // Generate param traits log methods. 974 // Generate param traits log methods.
974 #include "ipc/param_traits_log_macros.h" 975 #include "ipc/param_traits_log_macros.h"
975 namespace IPC { 976 namespace IPC {
976 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_ 977 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_
977 #include "cc/ipc/cc_param_traits_macros.h" 978 #include "cc/ipc/cc_param_traits_macros.h"
978 } // namespace IPC 979 } // namespace IPC
OLDNEW
« no previous file with comments | « cc/ipc/DEPS ('k') | cc/ipc/surface_id.mojom » ('j') | cc/ipc/surface_id_struct_traits.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698