| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/favorite_state.h" | 5 #include "chromeos/network/favorite_state.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chromeos/network/network_event_log.h" | 10 #include "chromeos/network/network_event_log.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // order leads to memory access errors. | 76 // order leads to memory access errors. |
| 77 proxy_config_.MergeDictionary(proxy_config_dict.get()); | 77 proxy_config_.MergeDictionary(proxy_config_dict.get()); |
| 78 } else { | 78 } else { |
| 79 NET_LOG_ERROR("Failed to parse " + key, path()); | 79 NET_LOG_ERROR("Failed to parse " + key, path()); |
| 80 } | 80 } |
| 81 return true; | 81 return true; |
| 82 } | 82 } |
| 83 return false; | 83 return false; |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool FavoriteState::IsFavorite() const { | |
| 87 // kTypeEthernetEap is always a favorite. We need this check because it does | |
| 88 // not show up in the visible list, but its properties may not be available | |
| 89 // when it first shows up in ServiceCompleteList. See crbug.com/355117. | |
| 90 return !profile_path_.empty() || type() == shill::kTypeEthernetEap; | |
| 91 } | |
| 92 | |
| 93 bool FavoriteState::IsPrivate() const { | 86 bool FavoriteState::IsPrivate() const { |
| 94 return !profile_path_.empty() && | 87 return !profile_path_.empty() && |
| 95 profile_path_ != NetworkProfileHandler::GetSharedProfilePath(); | 88 profile_path_ != NetworkProfileHandler::GetSharedProfilePath(); |
| 96 } | 89 } |
| 97 | 90 |
| 98 } // namespace chromeos | 91 } // namespace chromeos |
| OLD | NEW |