diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 20:29:36 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 20:29:36 +0000 |
commit | 2024513b9c22eb479f14948169cc94dd2163a952 (patch) | |
tree | 7290a2b7f9e776a3a46605d4b997adea78c2fa83 /chrome/browser/chromeos/cros/cros_library.h | |
parent | 6c9d9b18c4cf4112d2b6f113ab7b19b35e083743 (diff) | |
download | chromium_src-2024513b9c22eb479f14948169cc94dd2163a952.zip chromium_src-2024513b9c22eb479f14948169cc94dd2163a952.tar.gz chromium_src-2024513b9c22eb479f14948169cc94dd2163a952.tar.bz2 |
Added new arg to google_authenticator_unittest so it would build.
TBR:cmasone
Revert "Revert 44935 - Allow mocking of cros api without automatically deleting the mocks"
This reverts commit 6113af35343e47bb584395d387aba96b7c435277.
Review URL: http://codereview.chromium.org/1627028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44945 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 | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/cros/cros_library.h b/chrome/browser/chromeos/cros/cros_library.h index 3bdfa50..cfee217 100644 --- a/chrome/browser/chromeos/cros/cros_library.h +++ b/chrome/browser/chromeos/cros/cros_library.h @@ -31,22 +31,24 @@ class CrosLibrary { // mock objects). class TestApi { public: + // Passing true for own for these setters will cause them to be deleted + // when the CrosLibrary is deleted (or other mocks are set). // Setter for LibraryLoader. - void SetLibraryLoader(LibraryLoader* loader); + void SetLibraryLoader(LibraryLoader* loader, bool own); // Setter for CryptohomeLibrary. - void SetCryptohomeLibrary(CryptohomeLibrary* library); + void SetCryptohomeLibrary(CryptohomeLibrary* library, bool own); // Setter for LanguageLibrary - void SetLanguageLibrary(LanguageLibrary* library); + void SetLanguageLibrary(LanguageLibrary* library, bool own); // Setter for LoginLibrary. - void SetLoginLibrary(LoginLibrary* library); + void SetLoginLibrary(LoginLibrary* library, bool own); // Setter for MountLibrary. - void SetMountLibrary(MountLibrary* library); + void SetMountLibrary(MountLibrary* library, bool own); // Setter for NetworkLibrary. - void SetNetworkLibrary(NetworkLibrary* library); + void SetNetworkLibrary(NetworkLibrary* library, bool own); // Setter for PowerLibrary. - void SetPowerLibrary(PowerLibrary* library); + void SetPowerLibrary(PowerLibrary* library, bool own); // Setter for SynapticsLibrary. - void SetSynapticsLibrary(SynapticsLibrary* library); + void SetSynapticsLibrary(SynapticsLibrary* library, bool own); private: friend class CrosLibrary; @@ -105,6 +107,16 @@ class CrosLibrary { NetworkLibrary* network_lib_; PowerLibrary* power_lib_; SynapticsLibrary* synaptics_lib_; + + bool own_library_loader_; + bool own_cryptohome_loader_; + bool own_language_loader_; + bool own_login_loader_; + bool own_mount_loader_; + bool own_network_loader_; + bool own_power_loader_; + bool own_synaptics_library_; + // True if libcros was successfully loaded. bool loaded_; // True if the last load attempt had an error. |