OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/in_process_webkit/indexed_db_key_utility_client.h" | 5 #include "chrome/browser/in_process_webkit/indexed_db_key_utility_client.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/common/indexed_db_key.h" | 8 #include "chrome/common/indexed_db_key.h" |
9 #include "chrome/common/notification_service.h" | 9 #include "chrome/common/notification_service.h" |
10 #include "chrome/common/serialized_script_value.h" | 10 #include "chrome/common/serialized_script_value.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 void IndexedDBKeyUtilityClient::FinishCreatingKeys() { | 141 void IndexedDBKeyUtilityClient::FinishCreatingKeys() { |
142 DCHECK(state_ == STATE_CREATING_KEYS); | 142 DCHECK(state_ == STATE_CREATING_KEYS); |
143 state_ = STATE_INITIALIZED; | 143 state_ = STATE_INITIALIZED; |
144 waitable_event_.Signal(); | 144 waitable_event_.Signal(); |
145 } | 145 } |
146 | 146 |
147 IndexedDBKeyUtilityClient::Client::Client(IndexedDBKeyUtilityClient* parent) | 147 IndexedDBKeyUtilityClient::Client::Client(IndexedDBKeyUtilityClient* parent) |
148 : parent_(parent) { | 148 : parent_(parent) { |
149 } | 149 } |
150 | 150 |
151 void IndexedDBKeyUtilityClient::Client::OnProcessCrashed() { | 151 void IndexedDBKeyUtilityClient::Client::OnProcessCrashed(int exit_code) { |
152 if (parent_->state_ == STATE_CREATING_KEYS) | 152 if (parent_->state_ == STATE_CREATING_KEYS) |
153 parent_->FinishCreatingKeys(); | 153 parent_->FinishCreatingKeys(); |
154 } | 154 } |
155 | 155 |
156 void IndexedDBKeyUtilityClient::Client::OnIDBKeysFromValuesAndKeyPathSucceeded( | 156 void IndexedDBKeyUtilityClient::Client::OnIDBKeysFromValuesAndKeyPathSucceeded( |
157 int id, const std::vector<IndexedDBKey>& keys) { | 157 int id, const std::vector<IndexedDBKey>& keys) { |
158 parent_->SetKeys(keys); | 158 parent_->SetKeys(keys); |
159 parent_->FinishCreatingKeys(); | 159 parent_->FinishCreatingKeys(); |
160 } | 160 } |
161 | 161 |
162 void IndexedDBKeyUtilityClient::Client::OnIDBKeysFromValuesAndKeyPathFailed( | 162 void IndexedDBKeyUtilityClient::Client::OnIDBKeysFromValuesAndKeyPathFailed( |
163 int id) { | 163 int id) { |
164 parent_->FinishCreatingKeys(); | 164 parent_->FinishCreatingKeys(); |
165 } | 165 } |
OLD | NEW |