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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT ios Created 5 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
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 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 FlagsStorage* flags_storage, 2087 FlagsStorage* flags_storage,
2088 const std::string& internal_name, 2088 const std::string& internal_name,
2089 bool enable); 2089 bool enable);
2090 void RemoveFlagsSwitches( 2090 void RemoveFlagsSwitches(
2091 std::map<std::string, base::CommandLine::StringType>* switch_list); 2091 std::map<std::string, base::CommandLine::StringType>* switch_list);
2092 void ResetAllFlags(FlagsStorage* flags_storage); 2092 void ResetAllFlags(FlagsStorage* flags_storage);
2093 void reset(); 2093 void reset();
2094 2094
2095 // Returns the singleton instance of this class 2095 // Returns the singleton instance of this class
2096 static FlagsState* GetInstance() { 2096 static FlagsState* GetInstance() {
2097 return Singleton<FlagsState>::get(); 2097 return base::Singleton<FlagsState>::get();
2098 } 2098 }
2099 2099
2100 private: 2100 private:
2101 bool needs_restart_; 2101 bool needs_restart_;
2102 std::map<std::string, std::string> flags_switches_; 2102 std::map<std::string, std::string> flags_switches_;
2103 2103
2104 DISALLOW_COPY_AND_ASSIGN(FlagsState); 2104 DISALLOW_COPY_AND_ASSIGN(FlagsState);
2105 }; 2105 };
2106 2106
2107 // Adds the internal names for the specified experiment to |names|. 2107 // Adds the internal names for the specified experiment to |names|.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 } 2702 }
2703 2703
2704 const Experiment* GetExperiments(size_t* count) { 2704 const Experiment* GetExperiments(size_t* count) {
2705 *count = num_experiments; 2705 *count = num_experiments;
2706 return experiments; 2706 return experiments;
2707 } 2707 }
2708 2708
2709 } // namespace testing 2709 } // namespace testing
2710 2710
2711 } // namespace about_flags 2711 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698