diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-14 05:38:04 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-14 05:38:04 +0000 |
commit | 12cc36539c6bafab23be2399300beb8cbb17988a (patch) | |
tree | 81594c7e055359712f1e458e0efc1589309f21bf /chrome/browser/spellchecker/spelling_service_client.h | |
parent | 891f89be969ed572740e76fbefa3df4ef57c7b36 (diff) | |
download | chromium_src-12cc36539c6bafab23be2399300beb8cbb17988a.zip chromium_src-12cc36539c6bafab23be2399300beb8cbb17988a.tar.gz chromium_src-12cc36539c6bafab23be2399300beb8cbb17988a.tar.bz2 |
Add SpellingServiceClient::IsAvailable().
This change adds a static function SpellingServiceClient::IsAvailable() and use it instead of checking conditions directly.
BUG=none
TEST=SpellingServiceClientTest.AvailableServices
Review URL: https://chromiumcodereview.appspot.com/10536141
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker/spelling_service_client.h')
-rw-r--r-- | chrome/browser/spellchecker/spelling_service_client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/spellchecker/spelling_service_client.h b/chrome/browser/spellchecker/spelling_service_client.h index c531405..be9d33c 100644 --- a/chrome/browser/spellchecker/spelling_service_client.h +++ b/chrome/browser/spellchecker/spelling_service_client.h @@ -89,6 +89,9 @@ class SpellingServiceClient : public net::URLFetcherDelegate { const string16& text, const TextCheckCompleteCallback& callback); + // Returns whether the specified service is available for the given profile. + static bool IsAvailable(Profile* profile, ServiceType type); + private: // Creates a URLFetcher object used for sending a JSON-RPC request. This // function is overriden by unit tests to prevent them from actually sending |