| 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" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 VerifyDownloadCount(1u); | 98 VerifyDownloadCount(1u); |
| 99 } | 99 } |
| 100 | 100 |
| 101 browsing_data::BrowsingDataCounter::ResultInt GetCacheSize() { | 101 browsing_data::BrowsingDataCounter::ResultInt GetCacheSize() { |
| 102 base::RunLoop run_loop; | 102 base::RunLoop run_loop; |
| 103 browsing_data::BrowsingDataCounter::ResultInt size; | 103 browsing_data::BrowsingDataCounter::ResultInt size; |
| 104 | 104 |
| 105 Profile* profile = browser()->profile(); | 105 Profile* profile = browser()->profile(); |
| 106 CacheCounter counter(profile); | 106 CacheCounter counter(profile); |
| 107 counter.Init(profile->GetPrefs(), | 107 counter.Init(profile->GetPrefs(), |
| 108 browsing_data::ClearBrowsingDataTab::ADVANCED, |
| 108 base::Bind(&BrowsingDataRemoverBrowserTest::OnCacheSizeResult, | 109 base::Bind(&BrowsingDataRemoverBrowserTest::OnCacheSizeResult, |
| 109 base::Unretained(this), base::Unretained(&run_loop), | 110 base::Unretained(this), base::Unretained(&run_loop), |
| 110 base::Unretained(&size))); | 111 base::Unretained(&size))); |
| 111 counter.Restart(); | 112 counter.Restart(); |
| 112 run_loop.Run(); | 113 run_loop.Run(); |
| 113 return size; | 114 return size; |
| 114 } | 115 } |
| 115 | 116 |
| 116 void RemoveAndWait(int remove_mask) { | 117 void RemoveAndWait(int remove_mask) { |
| 117 BrowsingDataRemover* remover = | 118 BrowsingDataRemover* remover = |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 base::RunLoop run_loop; | 313 base::RunLoop run_loop; |
| 313 BrowserThread::PostTaskAndReply( | 314 BrowserThread::PostTaskAndReply( |
| 314 BrowserThread::IO, FROM_HERE, | 315 BrowserThread::IO, FROM_HERE, |
| 315 base::Bind(&BrowsingDataRemoverTransportSecurityStateBrowserTest:: | 316 base::Bind(&BrowsingDataRemoverTransportSecurityStateBrowserTest:: |
| 316 CheckTransportSecurityState, | 317 CheckTransportSecurityState, |
| 317 base::Unretained(this), | 318 base::Unretained(this), |
| 318 base::RetainedRef(browser()->profile()->GetRequestContext()), | 319 base::RetainedRef(browser()->profile()->GetRequestContext()), |
| 319 false /* should not be cleared */), | 320 false /* should not be cleared */), |
| 320 run_loop.QuitClosure()); | 321 run_loop.QuitClosure()); |
| 321 } | 322 } |
| OLD | NEW |