| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/indexed_db/indexed_db_connection.h" | 5 #include "content/browser/indexed_db/indexed_db_connection.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | |
| 9 | 8 |
| 10 namespace content { | 9 namespace content { |
| 11 | 10 |
| 12 IndexedDBConnection::IndexedDBConnection( | 11 IndexedDBConnection::IndexedDBConnection( |
| 13 scoped_refptr<IndexedDBDatabase> database, | 12 scoped_refptr<IndexedDBDatabase> database, |
| 14 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks) | 13 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks) |
| 15 : database_(database), callbacks_(callbacks), weak_factory_(this) {} | 14 : database_(database), callbacks_(callbacks), weak_factory_(this) {} |
| 16 | 15 |
| 17 IndexedDBConnection::~IndexedDBConnection() {} | 16 IndexedDBConnection::~IndexedDBConnection() {} |
| 18 | 17 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (it != active_observers_.end()) | 79 if (it != active_observers_.end()) |
| 81 active_observers_.erase(it); | 80 active_observers_.erase(it); |
| 82 else | 81 else |
| 83 pending_observer_ids.push_back(id_to_remove); | 82 pending_observer_ids.push_back(id_to_remove); |
| 84 } | 83 } |
| 85 if (!pending_observer_ids.empty()) | 84 if (!pending_observer_ids.empty()) |
| 86 database_->RemovePendingObservers(this, pending_observer_ids); | 85 database_->RemovePendingObservers(this, pending_observer_ids); |
| 87 } | 86 } |
| 88 | 87 |
| 89 } // namespace content | 88 } // namespace content |
| OLD | NEW |