| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <memory> | 6 #include <memory> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "chrome/browser/browsing_data/browsing_data_filter_builder.h" | |
| 14 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 13 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 15 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 14 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 16 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" | 15 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" |
| 17 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" | 16 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" |
| 18 #include "chrome/browser/browsing_data/cache_counter.h" | 17 #include "chrome/browser/browsing_data/cache_counter.h" |
| 19 #include "chrome/browser/chrome_notification_types.h" | 18 #include "chrome/browser/chrome_notification_types.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
| 22 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
| 25 #include "chrome/test/base/ui_test_utils.h" | 24 #include "chrome/test/base/ui_test_utils.h" |
| 26 #include "components/browsing_data/core/browsing_data_utils.h" | 25 #include "components/browsing_data/core/browsing_data_utils.h" |
| 27 #include "components/prefs/pref_service.h" | 26 #include "components/prefs/pref_service.h" |
| 28 #include "content/public/browser/browser_context.h" | 27 #include "content/public/browser/browser_context.h" |
| 29 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
| 29 #include "content/public/browser/browsing_data_filter_builder.h" |
| 30 #include "content/public/browser/download_manager.h" | 30 #include "content/public/browser/download_manager.h" |
| 31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/common/content_paths.h" | 32 #include "content/public/common/content_paths.h" |
| 33 #include "content/public/test/browser_test_utils.h" | 33 #include "content/public/test/browser_test_utils.h" |
| 34 #include "content/public/test/download_test_observer.h" | 34 #include "content/public/test/download_test_observer.h" |
| 35 #include "net/dns/mock_host_resolver.h" | 35 #include "net/dns/mock_host_resolver.h" |
| 36 #include "net/http/transport_security_state.h" | 36 #include "net/http/transport_security_state.h" |
| 37 #include "net/test/embedded_test_server/embedded_test_server.h" | 37 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 38 #include "net/url_request/url_request_context.h" | 38 #include "net/url_request/url_request_context.h" |
| 39 #include "net/url_request/url_request_context_getter.h" | 39 #include "net/url_request/url_request_context_getter.h" |
| 40 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
| 41 | 41 |
| 42 using content::BrowserThread; | 42 using content::BrowserThread; |
| 43 using content::BrowsingDataFilterBuilder; |
| 43 | 44 |
| 44 namespace { | 45 namespace { |
| 45 static const char* kExampleHost = "example.com"; | 46 static const char* kExampleHost = "example.com"; |
| 46 } | 47 } |
| 47 | 48 |
| 48 class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest { | 49 class BrowsingDataRemoverBrowserTest : public InProcessBrowserTest { |
| 49 public: | 50 public: |
| 50 BrowsingDataRemoverBrowserTest() {} | 51 BrowsingDataRemoverBrowserTest() {} |
| 51 | 52 |
| 52 void SetUpOnMainThread() override { | 53 void SetUpOnMainThread() override { |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 base::RunLoop run_loop; | 297 base::RunLoop run_loop; |
| 297 BrowserThread::PostTaskAndReply( | 298 BrowserThread::PostTaskAndReply( |
| 298 BrowserThread::IO, FROM_HERE, | 299 BrowserThread::IO, FROM_HERE, |
| 299 base::Bind(&BrowsingDataRemoverTransportSecurityStateBrowserTest:: | 300 base::Bind(&BrowsingDataRemoverTransportSecurityStateBrowserTest:: |
| 300 CheckTransportSecurityState, | 301 CheckTransportSecurityState, |
| 301 base::Unretained(this), | 302 base::Unretained(this), |
| 302 base::RetainedRef(browser()->profile()->GetRequestContext()), | 303 base::RetainedRef(browser()->profile()->GetRequestContext()), |
| 303 false /* should not be cleared */), | 304 false /* should not be cleared */), |
| 304 run_loop.QuitClosure()); | 305 run_loop.QuitClosure()); |
| 305 } | 306 } |
| OLD | NEW |