| 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_BROWSING_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
| 42 #include "chromeos/dbus/dbus_method_call_status.h" | 42 #include "chromeos/dbus/dbus_method_call_status.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 class BrowsingDataFilterBuilder; | 45 class BrowsingDataFilterBuilder; |
| 46 class BrowsingDataFlashLSOHelper; | 46 class BrowsingDataFlashLSOHelper; |
| 47 class BrowsingDataRemoverFactory; | 47 class BrowsingDataRemoverFactory; |
| 48 class Profile; | 48 class Profile; |
| 49 class WebappRegistry; | 49 class WebappRegistry; |
| 50 | 50 |
| 51 namespace bookmarks { |
| 52 class BookmarkModel; |
| 53 } |
| 54 |
| 51 namespace chrome_browser_net { | 55 namespace chrome_browser_net { |
| 52 class Predictor; | 56 class Predictor; |
| 53 } | 57 } |
| 54 | 58 |
| 55 namespace content { | 59 namespace content { |
| 56 class BrowserContext; | 60 class BrowserContext; |
| 57 class PluginDataRemover; | 61 class PluginDataRemover; |
| 58 class StoragePartition; | 62 class StoragePartition; |
| 59 } | 63 } |
| 60 | 64 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 #if BUILDFLAG(ANDROID_JAVA_UI) | 284 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 281 void OverrideWebappRegistryForTesting( | 285 void OverrideWebappRegistryForTesting( |
| 282 std::unique_ptr<WebappRegistry> webapp_registry); | 286 std::unique_ptr<WebappRegistry> webapp_registry); |
| 283 #endif | 287 #endif |
| 284 | 288 |
| 285 #if BUILDFLAG(ENABLE_PLUGINS) | 289 #if BUILDFLAG(ENABLE_PLUGINS) |
| 286 void OverrideFlashLSOHelperForTesting( | 290 void OverrideFlashLSOHelperForTesting( |
| 287 scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper); | 291 scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper); |
| 288 #endif | 292 #endif |
| 289 | 293 |
| 294 void OverrideBookmarkModelForTesting( |
| 295 bookmarks::BookmarkModel* bookmark_model) { |
| 296 bookmark_model_for_testing_ = bookmark_model; |
| 297 } |
| 298 |
| 290 // Parameters of the last call are exposed to be used by tests. Removal and | 299 // Parameters of the last call are exposed to be used by tests. Removal and |
| 291 // origin type masks equal to -1 mean that no removal has ever been executed. | 300 // origin type masks equal to -1 mean that no removal has ever been executed. |
| 292 // TODO(msramek): If other consumers than tests are interested in this, | 301 // TODO(msramek): If other consumers than tests are interested in this, |
| 293 // consider returning them in OnBrowsingDataRemoverDone() callback. | 302 // consider returning them in OnBrowsingDataRemoverDone() callback. |
| 294 const base::Time& GetLastUsedBeginTime(); | 303 const base::Time& GetLastUsedBeginTime(); |
| 295 const base::Time& GetLastUsedEndTime(); | 304 const base::Time& GetLastUsedEndTime(); |
| 296 int GetLastUsedRemovalMask(); | 305 int GetLastUsedRemovalMask(); |
| 297 int GetLastUsedOriginTypeMask(); | 306 int GetLastUsedOriginTypeMask(); |
| 298 | 307 |
| 299 protected: | 308 protected: |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 // Observers of the global state and individual tasks. | 562 // Observers of the global state and individual tasks. |
| 554 base::ObserverList<Observer, true> observer_list_; | 563 base::ObserverList<Observer, true> observer_list_; |
| 555 | 564 |
| 556 // Used if we need to clear history. | 565 // Used if we need to clear history. |
| 557 base::CancelableTaskTracker history_task_tracker_; | 566 base::CancelableTaskTracker history_task_tracker_; |
| 558 | 567 |
| 559 std::unique_ptr<TemplateURLService::Subscription> template_url_sub_; | 568 std::unique_ptr<TemplateURLService::Subscription> template_url_sub_; |
| 560 | 569 |
| 561 // We do not own this. | 570 // We do not own this. |
| 562 content::StoragePartition* storage_partition_for_testing_ = nullptr; | 571 content::StoragePartition* storage_partition_for_testing_ = nullptr; |
| 572 bookmarks::BookmarkModel* bookmark_model_for_testing_ = nullptr; |
| 563 | 573 |
| 564 #if BUILDFLAG(ANDROID_JAVA_UI) | 574 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 565 // WebappRegistry makes calls across the JNI. In unit tests, the Java side is | 575 // WebappRegistry makes calls across the JNI. In unit tests, the Java side is |
| 566 // not initialised, so the registry must be mocked out. | 576 // not initialised, so the registry must be mocked out. |
| 567 std::unique_ptr<WebappRegistry> webapp_registry_; | 577 std::unique_ptr<WebappRegistry> webapp_registry_; |
| 568 #endif | 578 #endif |
| 569 | 579 |
| 570 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; | 580 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; |
| 571 | 581 |
| 572 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 582 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 573 }; | 583 }; |
| 574 | 584 |
| 575 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 585 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |