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_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" | 12 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" |
13 | 13 |
14 class MockBrowsingDataFlashLSOHelper : public BrowsingDataFlashLSOHelper { | 14 class MockBrowsingDataFlashLSOHelper : public BrowsingDataFlashLSOHelper { |
15 public: | 15 public: |
16 explicit MockBrowsingDataFlashLSOHelper( | 16 explicit MockBrowsingDataFlashLSOHelper( |
17 content::BrowserContext* browser_context); | 17 content::BrowserContext* browser_context); |
18 | 18 |
19 // BrowsingDataFlashLSOHelper implementation: | 19 // BrowsingDataFlashLSOHelper implementation: |
20 virtual void StartFetching( | 20 virtual void StartFetching( |
21 const GetSitesWithFlashDataCallback& callback) OVERRIDE; | 21 const GetSitesWithFlashDataCallback& callback) override; |
22 virtual void DeleteFlashLSOsForSite(const std::string& site) OVERRIDE; | 22 virtual void DeleteFlashLSOsForSite(const std::string& site) override; |
23 | 23 |
24 // Adds a domain sample. | 24 // Adds a domain sample. |
25 void AddFlashLSODomain(const std::string& domain); | 25 void AddFlashLSODomain(const std::string& domain); |
26 | 26 |
27 // Notifies the callback. | 27 // Notifies the callback. |
28 void Notify(); | 28 void Notify(); |
29 | 29 |
30 // Returns true if the domain list is empty. | 30 // Returns true if the domain list is empty. |
31 bool AllDeleted(); | 31 bool AllDeleted(); |
32 | 32 |
33 private: | 33 private: |
34 virtual ~MockBrowsingDataFlashLSOHelper(); | 34 virtual ~MockBrowsingDataFlashLSOHelper(); |
35 | 35 |
36 GetSitesWithFlashDataCallback callback_; | 36 GetSitesWithFlashDataCallback callback_; |
37 | 37 |
38 std::vector<std::string> domains_; | 38 std::vector<std::string> domains_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataFlashLSOHelper); | 40 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataFlashLSOHelper); |
41 }; | 41 }; |
42 | 42 |
43 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_ | 43 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_ |
OLD | NEW |