| 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 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BACKEND_H_ | 5 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BACKEND_H_ |
| 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BACKEND_H_ | 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BACKEND_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class WebDataRequestManager; | 22 class WebDataRequestManager; |
| 23 | 23 |
| 24 namespace tracked_objects { | 24 namespace tracked_objects { |
| 25 class Location; | 25 class Location; |
| 26 } | 26 } |
| 27 | 27 |
| 28 // WebDataServiceBackend handles all database tasks posted by | 28 // WebDataServiceBackend handles all database tasks posted by |
| 29 // WebDatabaseService. It is refcounted to allow asynchronous destruction on the | 29 // WebDatabaseService. It is refcounted to allow asynchronous destruction on the |
| 30 // DB thread. | 30 // DB thread. |
| 31 | 31 |
| 32 // TODO(caitkp): Rename this class to WebDatabaseBackend. |
| 33 |
| 32 class WebDataServiceBackend | 34 class WebDataServiceBackend |
| 33 : public base::RefCountedThreadSafe< | 35 : public base::RefCountedThreadSafe< |
| 34 WebDataServiceBackend, | 36 WebDataServiceBackend, |
| 35 content::BrowserThread::DeleteOnDBThread> { | 37 content::BrowserThread::DeleteOnDBThread> { |
| 36 public: | 38 public: |
| 37 class Delegate { | 39 class Delegate { |
| 38 public: | 40 public: |
| 39 virtual ~Delegate() {} | 41 virtual ~Delegate() {} |
| 40 | 42 |
| 41 // Invoked when the backend has finished loading the db. | 43 // Invoked when the backend has finished loading the db. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // fails), used to avoid continually trying to reinit if the db init fails. | 114 // fails), used to avoid continually trying to reinit if the db init fails. |
| 113 bool init_complete_; | 115 bool init_complete_; |
| 114 | 116 |
| 115 // Delegate. See the class definition above for more information. | 117 // Delegate. See the class definition above for more information. |
| 116 scoped_ptr<Delegate> delegate_; | 118 scoped_ptr<Delegate> delegate_; |
| 117 | 119 |
| 118 DISALLOW_COPY_AND_ASSIGN(WebDataServiceBackend); | 120 DISALLOW_COPY_AND_ASSIGN(WebDataServiceBackend); |
| 119 }; | 121 }; |
| 120 | 122 |
| 121 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BACKEND_H_ | 123 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_BACKEND_H_ |
| OLD | NEW |