| 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 CHROME_BROWSER_MOCK_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_MOCK_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
| 6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 6 #define CHROME_BROWSER_MOCK_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "chrome/browser/browsing_data_indexed_db_helper.h" | 14 #include "chrome/browser/browsing_data_indexed_db_helper.h" |
| 16 | 15 |
| 17 // Mock for BrowsingDataIndexedDBHelper. | 16 // Mock for BrowsingDataIndexedDBHelper. |
| 18 // Use AddIndexedDBSamples() or add directly to response_ list, then | 17 // Use AddIndexedDBSamples() or add directly to response_ list, then |
| 19 // call Notify(). | 18 // call Notify(). |
| 20 class MockBrowsingDataIndexedDBHelper | 19 class MockBrowsingDataIndexedDBHelper |
| 21 : public BrowsingDataIndexedDBHelper { | 20 : public BrowsingDataIndexedDBHelper { |
| 22 public: | 21 public: |
| 23 MockBrowsingDataIndexedDBHelper(); | 22 MockBrowsingDataIndexedDBHelper(); |
| 24 | 23 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 virtual ~MockBrowsingDataIndexedDBHelper(); | 44 virtual ~MockBrowsingDataIndexedDBHelper(); |
| 46 | 45 |
| 47 base::Callback<void(const std::list<IndexedDBInfo>&)> callback_; | 46 base::Callback<void(const std::list<IndexedDBInfo>&)> callback_; |
| 48 std::map<GURL, bool> origins_; | 47 std::map<GURL, bool> origins_; |
| 49 std::list<IndexedDBInfo> response_; | 48 std::list<IndexedDBInfo> response_; |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 51 #endif // CHROME_BROWSER_MOCK_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
| OLD | NEW |