| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/flags_ui/flags_state.h" | 5 #include "components/flags_ui/flags_state.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 break; | 541 break; |
| 542 } | 542 } |
| 543 | 543 |
| 544 bool supported = (entry.supported_platforms & current_platform) != 0; | 544 bool supported = (entry.supported_platforms & current_platform) != 0; |
| 545 #if defined(OS_CHROMEOS) | 545 #if defined(OS_CHROMEOS) |
| 546 if (access == kOwnerAccessToFlags && | 546 if (access == kOwnerAccessToFlags && |
| 547 (entry.supported_platforms & kOsCrOSOwnerOnly) != 0) { | 547 (entry.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 548 supported = true; | 548 supported = true; |
| 549 } | 549 } |
| 550 #endif | 550 #endif |
| 551 #if defined(OS_IOS) | |
| 552 if (access == kAppleReviewAccessToFlags) | |
| 553 supported = ((entry.supported_platforms & kOsIosAppleReview) != 0); | |
| 554 #endif | |
| 555 if (supported) | 551 if (supported) |
| 556 supported_entries->Append(std::move(data)); | 552 supported_entries->Append(std::move(data)); |
| 557 else | 553 else |
| 558 unsupported_entries->Append(std::move(data)); | 554 unsupported_entries->Append(std::move(data)); |
| 559 } | 555 } |
| 560 } | 556 } |
| 561 | 557 |
| 562 // static | 558 // static |
| 563 int FlagsState::GetCurrentPlatform() { | 559 int FlagsState::GetCurrentPlatform() { |
| 564 #if defined(OS_IOS) // Needs to be before the OS_MACOSX check. | 560 #if defined(OS_IOS) // Needs to be before the OS_MACOSX check. |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 state == FeatureEntry::FeatureState::ENABLED, | 793 state == FeatureEntry::FeatureState::ENABLED, |
| 798 name_to_switch_map); | 794 name_to_switch_map); |
| 799 } | 795 } |
| 800 } | 796 } |
| 801 break; | 797 break; |
| 802 } | 798 } |
| 803 } | 799 } |
| 804 } | 800 } |
| 805 | 801 |
| 806 } // namespace flags_ui | 802 } // namespace flags_ui |
| OLD | NEW |