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

Side by Side Diff: mojo/shell/public/cpp/lib/capabilities.cc

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « mojo/shell/public/cpp/capabilities.h ('k') | net/cert/signed_tree_head.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 "mojo/shell/public/cpp/capabilities.h" 5 #include "mojo/shell/public/cpp/capabilities.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 CapabilityRequest::CapabilityRequest() {} 9 CapabilityRequest::CapabilityRequest() {}
10 CapabilityRequest::CapabilityRequest(const CapabilityRequest& other) = default;
10 CapabilityRequest::~CapabilityRequest() {} 11 CapabilityRequest::~CapabilityRequest() {}
11 12
12 bool CapabilityRequest::operator==(const CapabilityRequest& other) const { 13 bool CapabilityRequest::operator==(const CapabilityRequest& other) const {
13 return other.classes == classes && other.interfaces == interfaces; 14 return other.classes == classes && other.interfaces == interfaces;
14 } 15 }
15 16
16 CapabilitySpec::CapabilitySpec() {} 17 CapabilitySpec::CapabilitySpec() {}
18 CapabilitySpec::CapabilitySpec(const CapabilitySpec& other) = default;
17 CapabilitySpec::~CapabilitySpec() {} 19 CapabilitySpec::~CapabilitySpec() {}
18 20
19 bool CapabilitySpec::operator==(const CapabilitySpec& other) const { 21 bool CapabilitySpec::operator==(const CapabilitySpec& other) const {
20 return other.provided == provided && other.required == required; 22 return other.provided == provided && other.required == required;
21 } 23 }
22 24
23 // static 25 // static
24 shell::mojom::CapabilitySpecPtr 26 shell::mojom::CapabilitySpecPtr
25 TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec>::Convert( 27 TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec>::Convert(
26 const CapabilitySpec& input) { 28 const CapabilitySpec& input) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 TypeConverter<CapabilityRequest, 63 TypeConverter<CapabilityRequest,
62 shell::mojom::CapabilityRequestPtr>::Convert( 64 shell::mojom::CapabilityRequestPtr>::Convert(
63 const shell::mojom::CapabilityRequestPtr& input) { 65 const shell::mojom::CapabilityRequestPtr& input) {
64 CapabilityRequest request; 66 CapabilityRequest request;
65 request.classes = input->classes.To<std::set<std::string>>(); 67 request.classes = input->classes.To<std::set<std::string>>();
66 request.interfaces = input->interfaces.To<std::set<std::string>>(); 68 request.interfaces = input->interfaces.To<std::set<std::string>>();
67 return request; 69 return request;
68 } 70 }
69 71
70 } // namespace mojo 72 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/capabilities.h ('k') | net/cert/signed_tree_head.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698