Chromium Code Reviews| Index: chromeos/network/network_profile.h |
| diff --git a/chromeos/network/network_profile.h b/chromeos/network/network_profile.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2d716803149f5a89c2131f724e08f70ce7b7ea03 |
| --- /dev/null |
| +++ b/chromeos/network/network_profile.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROMEOS_NETWORK_NETWORK_PROFILE_H_ |
| +#define CHROMEOS_NETWORK_NETWORK_PROFILE_H_ |
| + |
| +#include <string> |
| + |
| +#include "chromeos/chromeos_export.h" |
| + |
| +namespace chromeos { |
| + |
| +struct CHROMEOS_EXPORT NetworkProfile { |
| + enum Type { |
| + // NETWORK_PROFILE_EPHEMERAL, // Not persisted. Pseudo profile type for |
| + // // unconfigured networks. |
|
stevenjb
2013/04/26 21:00:49
?
pneubeck (no reviews)
2013/04/29 18:05:51
Done.
|
| + TYPE_SHARED, // Shared by all users on the device. |
| + TYPE_USER // Not visible to other users. |
| + }; |
| + |
| + NetworkProfile(const std::string& profile_path, |
| + const std::string& user_hash) |
| + : path(profile_path), |
| + userhash(user_hash) {} |
|
stevenjb
2013/04/26 21:00:49
nit: } on separate line, blank line before members
pneubeck (no reviews)
2013/04/29 18:05:51
Done.
|
| + std::string path; |
| + std::string userhash; // Only set for user profiles. |
| + |
| + Type type() const { |
| + return userhash.empty() ? TYPE_SHARED : TYPE_USER; |
| + } |
| +}; |
| + |
| +CHROMEOS_EXPORT std::string ProfileToString(const NetworkProfile* profile); |
|
stevenjb
2013/04/26 21:00:49
This should be namespaced (chromeos is a very larg
pneubeck (no reviews)
2013/04/29 18:05:51
Done.
|
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_NETWORK_NETWORK_PROFILE_H_ |