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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_struct_traits.cc

Issue 2176613003: [Media Router] Clean up issues related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 4 years 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 "chrome/browser/media/router/mojo/media_router_struct_traits.h"
6
7 namespace mojo {
8
9 // static
10 bool StructTraits<media_router::mojom::IssueDataView, media_router::IssueInfo>::
11 Read(media_router::mojom::IssueDataView data,
12 media_router::IssueInfo* out) {
13 if (!data.ReadTitle(&out->title))
14 return false;
15
16 if (!data.ReadDefaultAction(&out->default_action))
17 return false;
18
19 if (!data.ReadSeverity(&out->severity))
20 return false;
21
22 base::Optional<std::string> message;
23 if (!data.ReadMessage(&message))
24 return false;
25
26 out->message = message.value_or(std::string());
27
28 if (!data.ReadSecondaryActions(&out->secondary_actions))
29 return false;
30
31 base::Optional<std::string> route_id;
32 if (!data.ReadRouteId(&route_id))
33 return false;
34
35 out->route_id = route_id.value_or(std::string());
36
37 out->is_blocking = data.is_blocking();
38 out->help_page_id = data.help_page_id();
39
40 return true;
41 }
42
43 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698