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 "components/webdata/common/web_database_service.h" | 5 #include "components/webdata/common/web_database_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "components/webdata/common/web_data_request_manager.h" | 13 #include "components/webdata/common/web_data_request_manager.h" |
14 #include "components/webdata/common/web_data_results.h" | 14 #include "components/webdata/common/web_data_results.h" |
15 #include "components/webdata/common/web_data_service_consumer.h" | 15 #include "components/webdata/common/web_data_service_consumer.h" |
16 #include "components/webdata/common/web_database_backend.h" | 16 #include "components/webdata/common/web_database_backend.h" |
17 | 17 |
18 using base::Bind; | 18 using base::Bind; |
19 using base::FilePath; | 19 using base::FilePath; |
20 | 20 |
21 // Receives messages from the backend on the DB thread, posts them to | 21 // Receives messages from the backend on the DB thread, posts them to |
22 // WebDatabaseService on the UI thread. | 22 // WebDatabaseService on the UI thread. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } else { | 146 } else { |
147 // Notify that the database load failed. | 147 // Notify that the database load failed. |
148 for (size_t i = 0; i < error_callbacks_.size(); i++) { | 148 for (size_t i = 0; i < error_callbacks_.size(); i++) { |
149 if (!error_callbacks_[i].is_null()) | 149 if (!error_callbacks_[i].is_null()) |
150 error_callbacks_[i].Run(status); | 150 error_callbacks_[i].Run(status); |
151 } | 151 } |
152 | 152 |
153 error_callbacks_.clear(); | 153 error_callbacks_.clear(); |
154 } | 154 } |
155 } | 155 } |
OLD | NEW |