| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/lock.h" | 12 #include "base/lock.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 15 #include "base/scoped_vector.h" | 15 #include "base/scoped_vector.h" |
| 16 #include "base/thread.h" | 16 #include "base/thread.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 GenericRequest2(WebDataService* service, | 233 GenericRequest2(WebDataService* service, |
| 234 Handle handle, | 234 Handle handle, |
| 235 WebDataServiceConsumer* consumer, | 235 WebDataServiceConsumer* consumer, |
| 236 T arg1, | 236 T arg1, |
| 237 U arg2) | 237 U arg2) |
| 238 : WebDataRequest(service, handle, consumer), | 238 : WebDataRequest(service, handle, consumer), |
| 239 arg1_(arg1), | 239 arg1_(arg1), |
| 240 arg2_(arg2) { | 240 arg2_(arg2) { |
| 241 } | 241 } |
| 242 | 242 |
| 243 virtual ~GenericRequest2() {} | 243 virtual ~GenericRequest2() { } |
| 244 | 244 |
| 245 T GetArgument1() { | 245 T GetArgument1() { |
| 246 return arg1_; | 246 return arg1_; |
| 247 } | 247 } |
| 248 | 248 |
| 249 U GetArgument2() { | 249 U GetArgument2() { |
| 250 return arg2_; | 250 return arg2_; |
| 251 } | 251 } |
| 252 | 252 |
| 253 private: | 253 private: |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 //////////////////////////////////////////////////////////////////////////////// | 532 //////////////////////////////////////////////////////////////////////////////// |
| 533 | 533 |
| 534 class WebDataServiceConsumer { | 534 class WebDataServiceConsumer { |
| 535 public: | 535 public: |
| 536 | 536 |
| 537 // Called when a request is done. h uniquely identifies the request. | 537 // Called when a request is done. h uniquely identifies the request. |
| 538 // result can be NULL, if no result is expected or if the database could | 538 // result can be NULL, if no result is expected or if the database could |
| 539 // not be opened. The result object is destroyed after this call. | 539 // not be opened. The result object is destroyed after this call. |
| 540 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 540 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 541 const WDTypedResult* result) = 0; | 541 const WDTypedResult* result) = 0; |
| 542 | |
| 543 protected: | |
| 544 ~WebDataServiceConsumer() {} | |
| 545 }; | 542 }; |
| 546 | 543 |
| 547 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ | 544 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |