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

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

Issue 23902011: Use FavoriteList in ClientCertResolver instead of NetworkList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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') | no next file » | 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/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chromeos/network/network_event_log.h" 10 #include "chromeos/network/network_event_log.h"
(...skipping 19 matching lines...) Expand all
30 return GetStringValue(key, value, &profile_path_); 30 return GetStringValue(key, value, &profile_path_);
31 } else if (key == flimflam::kUIDataProperty) { 31 } else if (key == flimflam::kUIDataProperty) {
32 scoped_ptr<NetworkUIData> new_ui_data = 32 scoped_ptr<NetworkUIData> new_ui_data =
33 shill_property_util::GetUIDataFromValue(value); 33 shill_property_util::GetUIDataFromValue(value);
34 if (!new_ui_data) { 34 if (!new_ui_data) {
35 NET_LOG_ERROR("Failed to parse " + key, path()); 35 NET_LOG_ERROR("Failed to parse " + key, path());
36 return false; 36 return false;
37 } 37 }
38 ui_data_ = *new_ui_data; 38 ui_data_ = *new_ui_data;
39 return true; 39 return true;
40 } else if (key == flimflam::kGuidProperty) {
41 return GetStringValue(key, value, &guid_);
40 } 42 }
41 return false; 43 return false;
42 } 44 }
43 45
44 bool FavoriteState::IsManaged() const { 46 bool FavoriteState::IsManaged() const {
45 return ui_data_.onc_source() == onc::ONC_SOURCE_DEVICE_POLICY || 47 return ui_data_.onc_source() == onc::ONC_SOURCE_DEVICE_POLICY ||
46 ui_data_.onc_source() == onc::ONC_SOURCE_USER_POLICY; 48 ui_data_.onc_source() == onc::ONC_SOURCE_USER_POLICY;
47 } 49 }
48 50
49 bool FavoriteState::IsPrivate() const { 51 bool FavoriteState::IsPrivate() const {
50 return !profile_path_.empty() && 52 return !profile_path_.empty() &&
51 profile_path_ != NetworkProfileHandler::kSharedProfilePath; 53 profile_path_ != NetworkProfileHandler::kSharedProfilePath;
52 } 54 }
53 55
54 } // namespace chromeos 56 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/favorite_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698