OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/system/network/network_list.h" | 5 #include "ash/system/network/network_list.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/strings/grit/ash_strings.h" | 9 #include "ash/strings/grit/ash_strings.h" |
10 #include "ash/system/network/network_icon.h" | 10 #include "ash/system/network/network_icon.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 std::string() /* no username hash, device policy */); | 59 std::string() /* no username hash, device policy */); |
60 bool policy_prohibites_unmanaged = false; | 60 bool policy_prohibites_unmanaged = false; |
61 if (global_network_config) { | 61 if (global_network_config) { |
62 global_network_config->GetBooleanWithoutPathExpansion( | 62 global_network_config->GetBooleanWithoutPathExpansion( |
63 ::onc::global_network_config::kAllowOnlyPolicyNetworksToConnect, | 63 ::onc::global_network_config::kAllowOnlyPolicyNetworksToConnect, |
64 &policy_prohibites_unmanaged); | 64 &policy_prohibites_unmanaged); |
65 } | 65 } |
66 if (!policy_prohibites_unmanaged) | 66 if (!policy_prohibites_unmanaged) |
67 return false; | 67 return false; |
68 return !managed_configuration_handler->FindPolicyByGuidAndProfile( | 68 return !managed_configuration_handler->FindPolicyByGuidAndProfile( |
69 network->guid(), network->profile_path()); | 69 network->guid(), network->profile_path(), nullptr /* onc_source */); |
70 } | 70 } |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 // A header row for sections in network detailed view which contains a title and | 74 // A header row for sections in network detailed view which contains a title and |
75 // a toggle button to turn on/off the section. Subclasses are given the | 75 // a toggle button to turn on/off the section. Subclasses are given the |
76 // opportunity to add extra buttons before the toggle button is added. | 76 // opportunity to add extra buttons before the toggle button is added. |
77 class NetworkListView::SectionHeaderRowView : public views::View, | 77 class NetworkListView::SectionHeaderRowView : public views::View, |
78 public views::ButtonListener { | 78 public views::ButtonListener { |
79 public: | 79 public: |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 if (found == last_network_info_map_.end()) { | 671 if (found == last_network_info_map_.end()) { |
672 // If we cannot find |info| in |last_network_info_map_|, just return true | 672 // If we cannot find |info| in |last_network_info_map_|, just return true |
673 // since this is a new network so we have nothing to compare. | 673 // since this is a new network so we have nothing to compare. |
674 return true; | 674 return true; |
675 } else { | 675 } else { |
676 return *found->second != info; | 676 return *found->second != info; |
677 } | 677 } |
678 } | 678 } |
679 | 679 |
680 } // namespace ash | 680 } // namespace ash |
OLD | NEW |