| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "storage/common/database/database_connections.h" | 5 #include "storage/common/database/database_connections.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
| 14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 | 15 |
| 16 namespace storage { | 16 namespace storage { |
| 17 | 17 |
| 18 DatabaseConnections::DatabaseConnections() { | 18 DatabaseConnections::DatabaseConnections() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 DatabaseConnections::~DatabaseConnections() { | 21 DatabaseConnections::~DatabaseConnections() { |
| 22 DCHECK(connections_.empty()); | 22 DCHECK(connections_.empty()); |
| 23 } | 23 } |
| 24 | 24 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 162 } |
| 163 waitable_event.TimedWait(timeout); | 163 waitable_event.TimedWait(timeout); |
| 164 { | 164 { |
| 165 base::AutoLock auto_lock(open_connections_lock_); | 165 base::AutoLock auto_lock(open_connections_lock_); |
| 166 waiting_to_close_event_ = nullptr; | 166 waiting_to_close_event_ = nullptr; |
| 167 return open_connections_.IsEmpty(); | 167 return open_connections_.IsEmpty(); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace storage | 171 } // namespace storage |
| OLD | NEW |