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

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

Issue 7795042: Merge 99883 - Completely disable about:flags (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 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 | « no previous file | chrome/browser/about_flags_unittest.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 e.command_line_value); 648 e.command_line_value);
649 } else { 649 } else {
650 for (int j = 0; j < e.num_choices; ++j) 650 for (int j = 0; j < e.num_choices; ++j)
651 name_to_switch_map[NameForChoice(e, j)] = 651 name_to_switch_map[NameForChoice(e, j)] =
652 std::pair<std::string, std::string>( 652 std::pair<std::string, std::string>(
653 e.choices[j].command_line_switch, 653 e.choices[j].command_line_switch,
654 e.choices[j].command_line_value); 654 e.choices[j].command_line_value);
655 } 655 }
656 } 656 }
657 657
658 // TODO(thakis): Reenable.
659 #if 0
658 command_line->AppendSwitch(switches::kFlagSwitchesBegin); 660 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
661 #endif
659 flags_switches_.insert( 662 flags_switches_.insert(
660 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, 663 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
661 std::string())); 664 std::string()));
662 for (std::set<std::string>::iterator it = enabled_experiments.begin(); 665 for (std::set<std::string>::iterator it = enabled_experiments.begin();
663 it != enabled_experiments.end(); 666 it != enabled_experiments.end();
664 ++it) { 667 ++it) {
665 const std::string& experiment_name = *it; 668 const std::string& experiment_name = *it;
666 NameToSwitchAndValueMap::const_iterator name_to_switch_it = 669 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
667 name_to_switch_map.find(experiment_name); 670 name_to_switch_map.find(experiment_name);
668 if (name_to_switch_it == name_to_switch_map.end()) { 671 if (name_to_switch_it == name_to_switch_map.end()) {
669 NOTREACHED(); 672 NOTREACHED();
670 continue; 673 continue;
671 } 674 }
672 675
673 const std::pair<std::string, std::string>& 676 const std::pair<std::string, std::string>&
674 switch_and_value_pair = name_to_switch_it->second; 677 switch_and_value_pair = name_to_switch_it->second;
675 678
679 // TODO(thakis): Reenable.
680 #if 0
676 command_line->AppendSwitchASCII(switch_and_value_pair.first, 681 command_line->AppendSwitchASCII(switch_and_value_pair.first,
677 switch_and_value_pair.second); 682 switch_and_value_pair.second);
683 #endif
678 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; 684 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
679 } 685 }
686 // TODO(thakis): Reenable.
687 #if 0
680 command_line->AppendSwitch(switches::kFlagSwitchesEnd); 688 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
689 #endif
681 flags_switches_.insert( 690 flags_switches_.insert(
682 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, 691 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
683 std::string())); 692 std::string()));
684 } 693 }
685 694
686 bool FlagsState::IsRestartNeededToCommitChanges() { 695 bool FlagsState::IsRestartNeededToCommitChanges() {
687 return needs_restart_; 696 return needs_restart_;
688 } 697 }
689 698
690 void FlagsState::SetExperimentEnabled( 699 void FlagsState::SetExperimentEnabled(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 } 804 }
796 805
797 const Experiment* GetExperiments(size_t* count) { 806 const Experiment* GetExperiments(size_t* count) {
798 *count = num_experiments; 807 *count = num_experiments;
799 return experiments; 808 return experiments;
800 } 809 }
801 810
802 } // namespace testing 811 } // namespace testing
803 812
804 } // namespace about_flags 813 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/about_flags_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698