| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/macros.h" | 21 #include "base/macros.h" |
| 22 #include "base/memory/ptr_util.h" | 22 #include "base/memory/ptr_util.h" |
| 23 #include "base/message_loop/message_loop.h" | 23 #include "base/message_loop/message_loop.h" |
| 24 #include "base/run_loop.h" | 24 #include "base/run_loop.h" |
| 25 #include "base/single_thread_task_runner.h" | 25 #include "base/single_thread_task_runner.h" |
| 26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
| 27 #include "base/task/cancelable_task_tracker.h" | 27 #include "base/task/cancelable_task_tracker.h" |
| 28 #include "base/threading/thread_task_runner_handle.h" | 28 #include "base/threading/thread_task_runner_handle.h" |
| 29 #include "base/time/time.h" | 29 #include "base/time/time.h" |
| 30 #include "build/build_config.h" | 30 #include "build/build_config.h" |
| 31 #include "chrome/browser/browsing_data/browsing_data_filter_builder.h" | |
| 32 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 31 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 33 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 32 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 34 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" | 33 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" |
| 35 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h" | 34 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h" |
| 36 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" | 35 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" |
| 37 #include "chrome/test/base/testing_profile.h" | 36 #include "chrome/test/base/testing_profile.h" |
| 38 #include "content/public/browser/browser_context.h" | 37 #include "content/public/browser/browser_context.h" |
| 38 #include "content/public/browser/browsing_data_filter_builder.h" |
| 39 #include "content/public/browser/cookie_store_factory.h" | 39 #include "content/public/browser/cookie_store_factory.h" |
| 40 #include "content/public/browser/dom_storage_context.h" | 40 #include "content/public/browser/dom_storage_context.h" |
| 41 #include "content/public/browser/local_storage_usage_info.h" | 41 #include "content/public/browser/local_storage_usage_info.h" |
| 42 #include "content/public/browser/permission_type.h" | 42 #include "content/public/browser/permission_type.h" |
| 43 #include "content/public/browser/storage_partition.h" | 43 #include "content/public/browser/storage_partition.h" |
| 44 #include "content/public/test/mock_download_manager.h" | 44 #include "content/public/test/mock_download_manager.h" |
| 45 #include "content/public/test/test_browser_thread.h" | 45 #include "content/public/test/test_browser_thread.h" |
| 46 #include "content/public/test/test_browser_thread_bundle.h" | 46 #include "content/public/test/test_browser_thread_bundle.h" |
| 47 #include "content/public/test/test_utils.h" | 47 #include "content/public/test/test_utils.h" |
| 48 #include "extensions/features/features.h" | 48 #include "extensions/features/features.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 60 #include "url/origin.h" | 60 #include "url/origin.h" |
| 61 | 61 |
| 62 #if BUILDFLAG(ENABLE_EXTENSIONS) | 62 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 63 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" | 63 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 class MockExtensionSpecialStoragePolicy; | 66 class MockExtensionSpecialStoragePolicy; |
| 67 | 67 |
| 68 using content::BrowserThread; | 68 using content::BrowserThread; |
| 69 using content::BrowserContext; | 69 using content::BrowserContext; |
| 70 using content::BrowsingDataFilterBuilder; |
| 70 using content::StoragePartition; | 71 using content::StoragePartition; |
| 71 using testing::_; | 72 using testing::_; |
| 72 using testing::ByRef; | 73 using testing::ByRef; |
| 73 using testing::Eq; | 74 using testing::Eq; |
| 74 using testing::Invoke; | 75 using testing::Invoke; |
| 75 using testing::IsEmpty; | 76 using testing::IsEmpty; |
| 76 using testing::Matcher; | 77 using testing::Matcher; |
| 77 using testing::MakeMatcher; | 78 using testing::MakeMatcher; |
| 78 using testing::MatcherInterface; | 79 using testing::MatcherInterface; |
| 79 using testing::MatchResultListener; | 80 using testing::MatchResultListener; |
| (...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1711 EXPECT_TRUE(remover->is_removing()); | 1712 EXPECT_TRUE(remover->is_removing()); |
| 1712 | 1713 |
| 1713 // Add one more deletion and wait for it. | 1714 // Add one more deletion and wait for it. |
| 1714 BlockUntilBrowsingDataRemoved( | 1715 BlockUntilBrowsingDataRemoved( |
| 1715 base::Time(), base::Time::Max(), | 1716 base::Time(), base::Time::Max(), |
| 1716 BrowsingDataRemover::REMOVE_COOKIES, | 1717 BrowsingDataRemover::REMOVE_COOKIES, |
| 1717 BrowsingDataHelper::UNPROTECTED_WEB); | 1718 BrowsingDataHelper::UNPROTECTED_WEB); |
| 1718 | 1719 |
| 1719 EXPECT_FALSE(remover->is_removing()); | 1720 EXPECT_FALSE(remover->is_removing()); |
| 1720 } | 1721 } |
| OLD | NEW |