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

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: Fix more errors Created 5 years, 4 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 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 FlagsStorage* flags_storage, 2156 FlagsStorage* flags_storage,
2157 const std::string& internal_name, 2157 const std::string& internal_name,
2158 bool enable); 2158 bool enable);
2159 void RemoveFlagsSwitches( 2159 void RemoveFlagsSwitches(
2160 std::map<std::string, base::CommandLine::StringType>* switch_list); 2160 std::map<std::string, base::CommandLine::StringType>* switch_list);
2161 void ResetAllFlags(FlagsStorage* flags_storage); 2161 void ResetAllFlags(FlagsStorage* flags_storage);
2162 void reset(); 2162 void reset();
2163 2163
2164 // Returns the singleton instance of this class 2164 // Returns the singleton instance of this class
2165 static FlagsState* GetInstance() { 2165 static FlagsState* GetInstance() {
2166 return Singleton<FlagsState>::get(); 2166 return base::Singleton<FlagsState>::get();
2167 } 2167 }
2168 2168
2169 private: 2169 private:
2170 bool needs_restart_; 2170 bool needs_restart_;
2171 std::map<std::string, std::string> flags_switches_; 2171 std::map<std::string, std::string> flags_switches_;
2172 2172
2173 DISALLOW_COPY_AND_ASSIGN(FlagsState); 2173 DISALLOW_COPY_AND_ASSIGN(FlagsState);
2174 }; 2174 };
2175 2175
2176 // Adds the internal names for the specified experiment to |names|. 2176 // Adds the internal names for the specified experiment to |names|.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 } 2771 }
2772 2772
2773 const Experiment* GetExperiments(size_t* count) { 2773 const Experiment* GetExperiments(size_t* count) {
2774 *count = num_experiments; 2774 *count = num_experiments;
2775 return experiments; 2775 return experiments;
2776 } 2776 }
2777 2777
2778 } // namespace testing 2778 } // namespace testing
2779 2779
2780 } // namespace about_flags 2780 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698