| Index: content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| index 4f7ea18a20f7828d30c4d0c4581fc30638bfbb9a..96e2cee81d7cfa739884aba795f18909a534aef5 100644
|
| --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| @@ -98,6 +98,15 @@ class DOMStorageContextWrapper::MojoState {
|
| level_db_wrappers_.erase(origin);
|
| }
|
|
|
| + void OnUserServiceConnectionComplete() {
|
| + CHECK_EQ(shell::mojom::ConnectResult::SUCCEEDED,
|
| + user_service_connection_->GetResult());
|
| + }
|
| +
|
| + void OnUserServiceConnectionError() {
|
| + CHECK(false);
|
| + }
|
| +
|
| // Part of our asynchronous directory opening called from OpenLocalStorage().
|
| void OnDirectoryOpened(filesystem::FileError err);
|
| void OnDatabaseOpened(leveldb::DatabaseError status);
|
| @@ -143,6 +152,12 @@ void DOMStorageContextWrapper::MojoState::OpenLocalStorage(
|
| user_service_connection_ =
|
| connector_->Connect(user_service::kUserServiceName);
|
| connection_state_ = CONNECTION_IN_PROGRESS;
|
| + user_service_connection_->AddConnectionCompletedClosure(
|
| + base::Bind(&MojoState::OnUserServiceConnectionComplete,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| + user_service_connection_->SetConnectionLostClosure(
|
| + base::Bind(&MojoState::OnUserServiceConnectionError,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
|
|
| if (!subdirectory_.empty()) {
|
| // We were given a subdirectory to write to. Get it and use a disk backed
|
|
|