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

Side by Side Diff: components/wifi_sync/wifi_credential.h

Issue 1869063004: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « components/wifi/network_properties.cc ('k') | components/wifi_sync/wifi_credential.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_H_ 5 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_H_
6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_H_ 6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 // Per IEEE 802.11-2012 (Sec 8.4.2.2), the only requirement on SSIDs 27 // Per IEEE 802.11-2012 (Sec 8.4.2.2), the only requirement on SSIDs
28 // is that they are between 0 and 32 bytes in length 28 // is that they are between 0 and 32 bytes in length
29 // (inclusive). There are no restrictions on the values of those 29 // (inclusive). There are no restrictions on the values of those
30 // bytes. The SSID is not, e.g., required to be encoded as UTF-8. 30 // bytes. The SSID is not, e.g., required to be encoded as UTF-8.
31 using SsidBytes = std::vector<uint8_t>; 31 using SsidBytes = std::vector<uint8_t>;
32 using CredentialSet = std::set< 32 using CredentialSet = std::set<
33 WifiCredential, 33 WifiCredential,
34 bool(*)(const WifiCredential&a, const WifiCredential& b)>; 34 bool(*)(const WifiCredential&a, const WifiCredential& b)>;
35 35
36 WifiCredential(const WifiCredential& other);
36 ~WifiCredential(); 37 ~WifiCredential();
37 38
38 // Creates a WifiCredential with the given |ssid|, |security_class|, 39 // Creates a WifiCredential with the given |ssid|, |security_class|,
39 // and |passphrase|. No assumptions are made about the input 40 // and |passphrase|. No assumptions are made about the input
40 // encoding of |ssid|. |passphrase|, however, must be valid 41 // encoding of |ssid|. |passphrase|, however, must be valid
41 // UTF-8. Returns NULL if the parameters are invalid. 42 // UTF-8. Returns NULL if the parameters are invalid.
42 static scoped_ptr<WifiCredential> Create( 43 static scoped_ptr<WifiCredential> Create(
43 const SsidBytes& ssid, 44 const SsidBytes& ssid,
44 WifiSecurityClass security_class, 45 WifiSecurityClass security_class,
45 const std::string& passphrase); 46 const std::string& passphrase);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const SsidBytes ssid_; 85 const SsidBytes ssid_;
85 // The WiFi network's security class (e.g. WEP, PSK). 86 // The WiFi network's security class (e.g. WEP, PSK).
86 const WifiSecurityClass security_class_; 87 const WifiSecurityClass security_class_;
87 // The passphrase for connecting to the network. 88 // The passphrase for connecting to the network.
88 const std::string passphrase_; 89 const std::string passphrase_;
89 }; 90 };
90 91
91 } // namespace wifi_sync 92 } // namespace wifi_sync
92 93
93 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_H_ 94 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_H_
OLDNEW
« no previous file with comments | « components/wifi/network_properties.cc ('k') | components/wifi_sync/wifi_credential.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698