OLD | NEW |
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 "chromeos/network/network_state_handler.h" | 5 #include "chromeos/network/network_state_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 std::string GetLogName(const ManagedState* state) { | 49 std::string GetLogName(const ManagedState* state) { |
50 if (!state) | 50 if (!state) |
51 return "None"; | 51 return "None"; |
52 return base::StringPrintf("%s (%s)", state->name().c_str(), | 52 return base::StringPrintf("%s (%s)", state->name().c_str(), |
53 state->path().c_str()); | 53 state->path().c_str()); |
54 } | 54 } |
55 | 55 |
56 std::string ValueAsString(const base::Value& value) { | 56 std::string ValueAsString(const base::Value& value) { |
57 std::string vstr; | 57 std::string vstr; |
58 base::JSONWriter::WriteWithOptions( | 58 base::JSONWriter::WriteWithOptions( |
59 &value, base::JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &vstr); | 59 value, base::JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &vstr); |
60 return vstr.empty() ? "''" : vstr; | 60 return vstr.empty() ? "''" : vstr; |
61 } | 61 } |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 const char NetworkStateHandler::kDefaultCheckPortalList[] = | 65 const char NetworkStateHandler::kDefaultCheckPortalList[] = |
66 "ethernet,wifi,cellular"; | 66 "ethernet,wifi,cellular"; |
67 | 67 |
68 NetworkStateHandler::NetworkStateHandler() : network_list_sorted_(false) { | 68 NetworkStateHandler::NetworkStateHandler() : network_list_sorted_(false) { |
69 } | 69 } |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 if (type.MatchesType(shill::kTypeBluetooth)) | 984 if (type.MatchesType(shill::kTypeBluetooth)) |
985 technologies.push_back(new std::string(shill::kTypeBluetooth)); | 985 technologies.push_back(new std::string(shill::kTypeBluetooth)); |
986 if (type.MatchesType(shill::kTypeVPN)) | 986 if (type.MatchesType(shill::kTypeVPN)) |
987 technologies.push_back(new std::string(shill::kTypeVPN)); | 987 technologies.push_back(new std::string(shill::kTypeVPN)); |
988 | 988 |
989 CHECK_GT(technologies.size(), 0ul); | 989 CHECK_GT(technologies.size(), 0ul); |
990 return technologies.Pass(); | 990 return technologies.Pass(); |
991 } | 991 } |
992 | 992 |
993 } // namespace chromeos | 993 } // namespace chromeos |
OLD | NEW |