diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-24 05:46:57 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-24 05:46:57 +0000 |
commit | d8ef715b6145fb3bd9cc70fd051c71b84bb7715b (patch) | |
tree | 3c05d3cf379723fccca5986f76017bc0a9a25ce6 /chrome/browser/chromeos/cros/cros_library.h | |
parent | 240cc92d2f736c143258a6f62e39831e54b5e5d3 (diff) | |
download | chromium_src-d8ef715b6145fb3bd9cc70fd051c71b84bb7715b.zip chromium_src-d8ef715b6145fb3bd9cc70fd051c71b84bb7715b.tar.gz chromium_src-d8ef715b6145fb3bd9cc70fd051c71b84bb7715b.tar.bz2 |
Revert 97662 - Initialize/Shutdown CrosLibrary explicitly to avoid singleton races during shutdown.
This caused Chrome on Chrome OS to use the fake network library.
BUG=chromium-os:19511
TEST=chrome should not use the fake netowkr library
--
BUG=chromium-os:18912
TEST=Ensure chrome shuts down cleanly after heavy usage. Include opening Other Wi-F > Advanced.
Review URL: http://codereview.chromium.org/7672005
TBR=stevenjb@google.com
Review URL: http://codereview.chromium.org/7718026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/cros/cros_library.h')
-rw-r--r-- | chrome/browser/chromeos/cros/cros_library.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/chrome/browser/chromeos/cros/cros_library.h b/chrome/browser/chromeos/cros/cros_library.h index 2ddb568..331ec6f 100644 --- a/chrome/browser/chromeos/cros/cros_library.h +++ b/chrome/browser/chromeos/cros/cros_library.h @@ -73,17 +73,7 @@ class CrosLibrary { CrosLibrary* library_; }; - // Sets the global instance. Must be called before any calls to Get(). - static void Initialize(); - - // Returns true if the global instance has been initialized. - static bool Initialized(); - - // Destroys the global instance. Must be called before AtExitManager is - // destroyed to ensure clean shutdown. - static void Shutdown(); - - // Gets the global instance. Initialize() must be called first. + // This gets the CrosLibrary. static CrosLibrary* Get(); BrightnessLibrary* GetBrightnessLibrary(); @@ -102,9 +92,6 @@ class CrosLibrary { // Getter for Test API that gives access to internal members of this class. TestApi* GetTestApi(); - // Returns true if the cros library was loaded (i.e. not a stub). - bool LibraryLoaded() { return loaded_; } - // Ensures that the library is loaded, loading it if needed. If the library // could not be loaded, returns false. bool EnsureLoaded(); @@ -193,13 +180,11 @@ class CrosLibrary { class ScopedStubCrosEnabler { public: ScopedStubCrosEnabler() { - chromeos::CrosLibrary::Initialize(); chromeos::CrosLibrary::Get()->GetTestApi()->SetUseStubImpl(); } ~ScopedStubCrosEnabler() { chromeos::CrosLibrary::Get()->GetTestApi()->ResetUseStubImpl(); - chromeos::CrosLibrary::Shutdown(); } private: |