From 8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a Mon Sep 17 00:00:00 2001 From: "satish@chromium.org" Date: Mon, 13 Dec 2010 08:18:55 +0000 Subject: Rename all methods accessing Singleton as GetInstance(). This is in preparation to a subsequent CL where Singleton will restrict access to only the type being made singleton. I also moved pepper::ResourceTracker to a lazy instance since there were too many places in code where this class was being accessed from and this was a smaller change than renaming methods in that case. BUG=65298 TEST=all existing tests should pass. Review URL: http://codereview.chromium.org/5685007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68982 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/about_flags.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chrome/browser/about_flags.cc') diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 15d9cb2..b87f4217a 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -305,7 +305,7 @@ class FlagsState { void reset(); // Returns the singleton instance of this class - static FlagsState* instance() { + static FlagsState* GetInstance() { return Singleton::get(); } @@ -467,7 +467,7 @@ Value* CreateChoiceData(const Experiment& experiment, } // namespace void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) { - FlagsState::instance()->ConvertFlagsToSwitches(prefs, command_line); + FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line); } ListValue* GetFlagsExperimentsData(PrefService* prefs) { @@ -504,17 +504,17 @@ ListValue* GetFlagsExperimentsData(PrefService* prefs) { } bool IsRestartNeededToCommitChanges() { - return FlagsState::instance()->IsRestartNeededToCommitChanges(); + return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); } void SetExperimentEnabled( PrefService* prefs, const std::string& internal_name, bool enable) { - FlagsState::instance()->SetExperimentEnabled(prefs, internal_name, enable); + FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable); } void RemoveFlagsSwitches( std::map* switch_list) { - FlagsState::instance()->RemoveFlagsSwitches(switch_list); + FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); } int GetCurrentPlatform() { @@ -683,7 +683,7 @@ namespace testing { const char kMultiSeparator[] = "@"; void ClearState() { - FlagsState::instance()->reset(); + FlagsState::GetInstance()->reset(); } void SetExperiments(const Experiment* e, size_t count) { -- cgit v1.1