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

Side by Side Diff: chromeos/network/favorite_state.cc

Issue 210433002: Always list EthernetEAP as a Favorite for debugging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/favorite_state.h ('k') | chromeos/network/managed_state.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 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
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
86 bool FavoriteState::IsPrivate() const { 93 bool FavoriteState::IsPrivate() const {
87 return !profile_path_.empty() && 94 return !profile_path_.empty() &&
88 profile_path_ != NetworkProfileHandler::GetSharedProfilePath(); 95 profile_path_ != NetworkProfileHandler::GetSharedProfilePath();
89 } 96 }
90 97
91 } // namespace chromeos 98 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/favorite_state.h ('k') | chromeos/network/managed_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698