| 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 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "chrome/browser/pepper_flash_settings_manager.h" | 12 #include "chrome/browser/pepper_flash_settings_manager.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 class BrowsingDataFlashLSOHelperImpl | 16 class BrowsingDataFlashLSOHelperImpl |
| 17 : public BrowsingDataFlashLSOHelper, | 17 : public BrowsingDataFlashLSOHelper, |
| 18 public PepperFlashSettingsManager::Client { | 18 public PepperFlashSettingsManager::Client { |
| 19 public: | 19 public: |
| 20 explicit BrowsingDataFlashLSOHelperImpl( | 20 explicit BrowsingDataFlashLSOHelperImpl( |
| 21 content::BrowserContext* browser_context); | 21 content::BrowserContext* browser_context); |
| 22 | 22 |
| 23 // BrowsingDataFlashLSOHelper implementation: | 23 // BrowsingDataFlashLSOHelper implementation: |
| 24 virtual void StartFetching( | 24 virtual void StartFetching( |
| 25 const GetSitesWithFlashDataCallback& callback) OVERRIDE; | 25 const GetSitesWithFlashDataCallback& callback) override; |
| 26 virtual void DeleteFlashLSOsForSite(const std::string& site) OVERRIDE; | 26 virtual void DeleteFlashLSOsForSite(const std::string& site) override; |
| 27 | 27 |
| 28 // PepperFlashSettingsManager::Client overrides: | 28 // PepperFlashSettingsManager::Client overrides: |
| 29 virtual void OnGetSitesWithDataCompleted( | 29 virtual void OnGetSitesWithDataCompleted( |
| 30 uint32 request_id, | 30 uint32 request_id, |
| 31 const std::vector<std::string>& sites) OVERRIDE; | 31 const std::vector<std::string>& sites) override; |
| 32 virtual void OnClearSiteDataCompleted( | 32 virtual void OnClearSiteDataCompleted( |
| 33 uint32 request_id, | 33 uint32 request_id, |
| 34 bool success) OVERRIDE; | 34 bool success) override; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 virtual ~BrowsingDataFlashLSOHelperImpl(); | 37 virtual ~BrowsingDataFlashLSOHelperImpl(); |
| 38 | 38 |
| 39 // Asynchronously fetches and deletes data and calls us back. | 39 // Asynchronously fetches and deletes data and calls us back. |
| 40 PepperFlashSettingsManager settings_manager_; | 40 PepperFlashSettingsManager settings_manager_; |
| 41 | 41 |
| 42 // Identifies the request to fetch site data. | 42 // Identifies the request to fetch site data. |
| 43 uint32 get_sites_with_data_request_id_; | 43 uint32 get_sites_with_data_request_id_; |
| 44 | 44 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 clear_site_data_ids_.erase(entry); | 94 clear_site_data_ids_.erase(entry); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace | 97 } // namespace |
| 98 | 98 |
| 99 // static | 99 // static |
| 100 BrowsingDataFlashLSOHelper* BrowsingDataFlashLSOHelper::Create( | 100 BrowsingDataFlashLSOHelper* BrowsingDataFlashLSOHelper::Create( |
| 101 content::BrowserContext* browser_context) { | 101 content::BrowserContext* browser_context) { |
| 102 return new BrowsingDataFlashLSOHelperImpl(browser_context); | 102 return new BrowsingDataFlashLSOHelperImpl(browser_context); |
| 103 } | 103 } |
| OLD | NEW |