Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / browsing_data / mock_browsing_data_flash_lso_helper.h
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
3 // found in the LICENSE file.
4
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_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h"
13
14 class MockBrowsingDataFlashLSOHelper : public BrowsingDataFlashLSOHelper {
15  public:
16   explicit MockBrowsingDataFlashLSOHelper(
17       content::BrowserContext* browser_context);
18
19   // BrowsingDataFlashLSOHelper implementation:
20   virtual void StartFetching(
21       const GetSitesWithFlashDataCallback& callback) OVERRIDE;
22   virtual void DeleteFlashLSOsForSite(const std::string& site) OVERRIDE;
23
24   // Adds a domain sample.
25   void AddFlashLSODomain(const std::string& domain);
26
27   // Notifies the callback.
28   void Notify();
29
30   // Returns true if the domain list is empty.
31   bool AllDeleted();
32
33  private:
34   virtual ~MockBrowsingDataFlashLSOHelper();
35
36   GetSitesWithFlashDataCallback callback_;
37
38   std::vector<std::string> domains_;
39
40   DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataFlashLSOHelper);
41 };
42
43 #endif  // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_FLASH_LSO_HELPER_H_