diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 17:04:42 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 17:04:42 +0000 |
commit | 9bade09ac71236e99865278def63b5212b7cf6b6 (patch) | |
tree | 9a578185c9a32cfcfe6cdce4bb343a0a697a2c42 /chrome/browser/chromeos/synaptics_library.cc | |
parent | e5263916f2e000b2b53d8385a452d4fd5a4106b1 (diff) | |
download | chromium_src-9bade09ac71236e99865278def63b5212b7cf6b6.zip chromium_src-9bade09ac71236e99865278def63b5212b7cf6b6.tar.gz chromium_src-9bade09ac71236e99865278def63b5212b7cf6b6.tar.bz2 |
Write a test for loading libcros.so on startup of Chrome. You just pass the
--test-load-libcros on the command line. The browser will exit immediately and
the error code (and error messages) will indicate success or failure.
I also renamed loaded() static functions related to loading this library. These
are not simple getters since they will actually load the library if its not
loaded yet. I renamed it to EnsureLoaded.
TEST=This is a test
BUG=none
Review URL: http://codereview.chromium.org/387014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/synaptics_library.cc')
-rw-r--r-- | chrome/browser/chromeos/synaptics_library.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/synaptics_library.cc b/chrome/browser/chromeos/synaptics_library.cc index c849c33..f68b3ea 100644 --- a/chrome/browser/chromeos/synaptics_library.cc +++ b/chrome/browser/chromeos/synaptics_library.cc @@ -16,8 +16,8 @@ SynapticsLibrary* SynapticsLibrary::Get() { } // static -bool SynapticsLibrary::loaded() { - return CrosLibrary::loaded(); +bool SynapticsLibrary::EnsureLoaded() { + return CrosLibrary::EnsureLoaded(); } void SynapticsLibrary::SetBoolParameter(SynapticsParameter param, bool value) { @@ -33,7 +33,7 @@ void SynapticsLibrary::SetRangeParameter(SynapticsParameter param, int value) { } void SynapticsLibrary::SetParameter(SynapticsParameter param, int value) { - if (CrosLibrary::loaded()) { + if (CrosLibrary::EnsureLoaded()) { // This calls SetSynapticsParameter in the cros library which is // potentially time consuming. So we run this on the FILE thread. ChromeThread::PostTask( |