diff options
author | cmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 15:58:22 +0000 |
---|---|---|
committer | cmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 15:58:22 +0000 |
commit | 07efbd20cead99d9b46df250e6e562bf1696cd4b (patch) | |
tree | 50485add0945c56ffad95992b8f4b993c2797bd1 /chrome | |
parent | ddd83f3dec12b231e59d1222d787c310bb42bc5a (diff) | |
download | chromium_src-07efbd20cead99d9b46df250e6e562bf1696cd4b.zip chromium_src-07efbd20cead99d9b46df250e6e562bf1696cd4b.tar.gz chromium_src-07efbd20cead99d9b46df250e6e562bf1696cd4b.tar.bz2 |
[Chrome OS] Log and handle cryptohomed callbacks for calls we didn't initiate
BUG=chromium-os:7038
TEST=unit tests, install on device and test for crashes on "full sync" after PW change
Review URL: http://codereview.chromium.org/3443029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/cros/cryptohome_library.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/cros/cryptohome_library.cc b/chrome/browser/chromeos/cros/cryptohome_library.cc index cd75a85..13145d3 100644 --- a/chrome/browser/chromeos/cros/cryptohome_library.cc +++ b/chrome/browser/chromeos/cros/cryptohome_library.cc @@ -117,18 +117,21 @@ class CryptohomeLibraryImpl : public CryptohomeLibrary { } void Dispatch(const chromeos::CryptohomeAsyncCallStatus& event) { + if (!callback_map_[event.async_id]) { + LOG(ERROR) << "Received signal for unknown async_id " << event.async_id; + return; + } callback_map_[event.async_id]->OnComplete(event.return_status, event.return_code); callback_map_[event.async_id] = NULL; } - bool CacheCallback(int async_id, - Delegate* d, - const char* error) { + bool CacheCallback(int async_id, Delegate* d, const char* error) { if (async_id == 0) { LOG(ERROR) << error; return false; } + LOG(INFO) << "Adding handler for " << async_id; callback_map_[async_id] = d; return true; } |