| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TEST_UTIL_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 12 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 13 #include "chrome/browser/chrome_thread.h" | 11 #include "chrome/browser/chrome_thread.h" |
| 14 #include "chrome/browser/webdata/web_data_service.h" | 12 #include "chrome/browser/webdata/web_data_service.h" |
| 15 | 13 |
| 16 template <class T> | 14 template <class T> |
| 17 class AutofillWebDataServiceConsumer: public WebDataServiceConsumer { | 15 class AutofillWebDataServiceConsumer: public WebDataServiceConsumer { |
| 18 public: | 16 public: |
| 19 AutofillWebDataServiceConsumer() : handle_(0) {} | 17 AutofillWebDataServiceConsumer() : handle_(0) {} |
| 20 virtual ~AutofillWebDataServiceConsumer() {} | 18 virtual ~AutofillWebDataServiceConsumer() {} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 WebDataService::Handle handle() { return handle_; } | 31 WebDataService::Handle handle() { return handle_; } |
| 34 T& result() { return result_; } | 32 T& result() { return result_; } |
| 35 | 33 |
| 36 private: | 34 private: |
| 37 WebDataService::Handle handle_; | 35 WebDataService::Handle handle_; |
| 38 T result_; | 36 T result_; |
| 39 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceConsumer); | 37 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceConsumer); |
| 40 }; | 38 }; |
| 41 | 39 |
| 42 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__ | 40 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__ |
| OLD | NEW |