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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 1406023021: Fix switch statement in about_flags.cc to support FEATURE_VALUE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | 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 (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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698