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 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BASE_H_ | 5 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BASE_H_ |
6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BASE_H_ | 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BASE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/ref_counted_delete_on_message_loop.h" | 11 #include "base/memory/ref_counted_delete_on_message_loop.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "components/webdata/common/webdata_export.h" | 13 #include "components/webdata/common/webdata_export.h" |
14 #include "sql/init_status.h" | 14 #include "sql/init_status.h" |
15 | 15 |
16 class WebDatabase; | 16 class WebDatabase; |
17 class WebDatabaseService; | 17 class WebDatabaseService; |
18 class WebDatabaseTable; | 18 class WebDatabaseTable; |
19 | 19 |
20 namespace base { | 20 namespace base { |
| 21 // TODO(skyostil): Migrate to SingleThreadTaskRunner (crbug.com/465354). |
| 22 class MessageLoopProxy; |
21 class Thread; | 23 class Thread; |
22 } | 24 } |
23 | 25 |
24 // Base for WebDataService class hierarchy. | 26 // Base for WebDataService class hierarchy. |
25 // WebDataServiceBase is destroyed on the UI thread. | 27 // WebDataServiceBase is destroyed on the UI thread. |
26 class WEBDATA_EXPORT WebDataServiceBase | 28 class WEBDATA_EXPORT WebDataServiceBase |
27 : public base::RefCountedDeleteOnMessageLoop<WebDataServiceBase> { | 29 : public base::RefCountedDeleteOnMessageLoop<WebDataServiceBase> { |
28 public: | 30 public: |
29 // All requests return an opaque handle of the following type. | 31 // All requests return an opaque handle of the following type. |
30 typedef int Handle; | 32 typedef int Handle; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Our database service. | 92 // Our database service. |
91 scoped_refptr<WebDatabaseService> wdbs_; | 93 scoped_refptr<WebDatabaseService> wdbs_; |
92 | 94 |
93 private: | 95 private: |
94 ProfileErrorCallback profile_error_callback_; | 96 ProfileErrorCallback profile_error_callback_; |
95 | 97 |
96 DISALLOW_COPY_AND_ASSIGN(WebDataServiceBase); | 98 DISALLOW_COPY_AND_ASSIGN(WebDataServiceBase); |
97 }; | 99 }; |
98 | 100 |
99 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BASE_H_ | 101 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BASE_H_ |
OLD | NEW |