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