| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2554 case FeatureEntry::SINGLE_DISABLE_VALUE: | 2554 case FeatureEntry::SINGLE_DISABLE_VALUE: |
| 2555 data->SetBoolean( | 2555 data->SetBoolean( |
| 2556 "enabled", | 2556 "enabled", |
| 2557 (!is_default_value && | 2557 (!is_default_value && |
| 2558 entry.type == FeatureEntry::SINGLE_VALUE) || | 2558 entry.type == FeatureEntry::SINGLE_VALUE) || |
| 2559 (is_default_value && | 2559 (is_default_value && |
| 2560 entry.type == FeatureEntry::SINGLE_DISABLE_VALUE)); | 2560 entry.type == FeatureEntry::SINGLE_DISABLE_VALUE)); |
| 2561 break; | 2561 break; |
| 2562 case FeatureEntry::MULTI_VALUE: | 2562 case FeatureEntry::MULTI_VALUE: |
| 2563 case FeatureEntry::ENABLE_DISABLE_VALUE: | 2563 case FeatureEntry::ENABLE_DISABLE_VALUE: |
| 2564 case FeatureEntry::FEATURE_VALUE: |
| 2564 data->Set("choices", CreateChoiceData(entry, enabled_entries)); | 2565 data->Set("choices", CreateChoiceData(entry, enabled_entries)); |
| 2565 break; | 2566 break; |
| 2566 default: | |
| 2567 NOTREACHED(); | |
| 2568 } | 2567 } |
| 2569 | 2568 |
| 2570 bool supported = (entry.supported_platforms & current_platform) != 0; | 2569 bool supported = (entry.supported_platforms & current_platform) != 0; |
| 2571 #if defined(OS_CHROMEOS) | 2570 #if defined(OS_CHROMEOS) |
| 2572 if (access == kOwnerAccessToFlags && | 2571 if (access == kOwnerAccessToFlags && |
| 2573 (entry.supported_platforms & kOsCrOSOwnerOnly) != 0) { | 2572 (entry.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 2574 supported = true; | 2573 supported = true; |
| 2575 } | 2574 } |
| 2576 #endif | 2575 #endif |
| 2577 if (supported) | 2576 if (supported) |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2978 FlagsState::GetInstance()->SetFeatureEntries(entries, count); | 2977 FlagsState::GetInstance()->SetFeatureEntries(entries, count); |
| 2979 } | 2978 } |
| 2980 | 2979 |
| 2981 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2980 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2982 return FlagsState::GetInstance()->GetFeatureEntries(count); | 2981 return FlagsState::GetInstance()->GetFeatureEntries(count); |
| 2983 } | 2982 } |
| 2984 | 2983 |
| 2985 } // namespace testing | 2984 } // namespace testing |
| 2986 | 2985 |
| 2987 } // namespace about_flags | 2986 } // namespace about_flags |
| OLD | NEW |