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 // Chromium settings and storage represent user-selected preferences and | 5 // Chromium settings and storage represent user-selected preferences and |
6 // information and MUST not be extracted, overwritten or modified except | 6 // information and MUST not be extracted, overwritten or modified except |
7 // through Chromium defined APIs. | 7 // through Chromium defined APIs. |
8 | 8 |
9 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ | 9 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ |
10 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ | 10 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 virtual ~WebDatabaseService(); | 128 virtual ~WebDatabaseService(); |
129 | 129 |
130 void OnDatabaseLoadDone(sql::InitStatus status); | 130 void OnDatabaseLoadDone(sql::InitStatus status); |
131 | 131 |
132 base::FilePath path_; | 132 base::FilePath path_; |
133 | 133 |
134 // The primary owner is |WebDatabaseService| but is refcounted because | 134 // The primary owner is |WebDatabaseService| but is refcounted because |
135 // PostTask on DB thread may outlive us. | 135 // PostTask on DB thread may outlive us. |
136 scoped_refptr<WebDataServiceBackend> wds_backend_; | 136 scoped_refptr<WebDataServiceBackend> wds_backend_; |
137 | 137 |
138 // All vended weak pointers are invalidated in ShutdownDatabase(). | |
139 base::WeakPtrFactory<WebDatabaseService> weak_ptr_factory_; | |
140 | |
141 // Callbacks to be called once the DB has loaded. | 138 // Callbacks to be called once the DB has loaded. |
142 LoadedCallbacks loaded_callbacks_; | 139 LoadedCallbacks loaded_callbacks_; |
143 | 140 |
144 // Callbacks to be called if the DB has failed to load. | 141 // Callbacks to be called if the DB has failed to load. |
145 ErrorCallbacks error_callbacks_; | 142 ErrorCallbacks error_callbacks_; |
146 | 143 |
147 // True if the WebDatabase has loaded. | 144 // True if the WebDatabase has loaded. |
148 bool db_loaded_; | 145 bool db_loaded_; |
149 | 146 |
150 scoped_refptr<base::MessageLoopProxy> db_thread_; | 147 scoped_refptr<base::MessageLoopProxy> db_thread_; |
151 | 148 |
| 149 // All vended weak pointers are invalidated in ShutdownDatabase(). |
| 150 base::WeakPtrFactory<WebDatabaseService> weak_ptr_factory_; |
| 151 |
152 DISALLOW_COPY_AND_ASSIGN(WebDatabaseService); | 152 DISALLOW_COPY_AND_ASSIGN(WebDatabaseService); |
153 }; | 153 }; |
154 | 154 |
155 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ | 155 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ |
OLD | NEW |