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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 VerifyDownloadCount(1u); | 96 VerifyDownloadCount(1u); |
97 } | 97 } |
98 | 98 |
99 browsing_data::BrowsingDataCounter::ResultInt GetCacheSize() { | 99 browsing_data::BrowsingDataCounter::ResultInt GetCacheSize() { |
100 base::RunLoop run_loop; | 100 base::RunLoop run_loop; |
101 browsing_data::BrowsingDataCounter::ResultInt size; | 101 browsing_data::BrowsingDataCounter::ResultInt size; |
102 | 102 |
103 Profile* profile = browser()->profile(); | 103 Profile* profile = browser()->profile(); |
104 CacheCounter counter(profile); | 104 CacheCounter counter(profile); |
105 counter.Init(profile->GetPrefs(), | 105 counter.Init(profile->GetPrefs(), |
| 106 browsing_data::ClearBrowsingDataPreferenceType::DEFAULT, |
106 base::Bind(&BrowsingDataRemoverBrowserTest::OnCacheSizeResult, | 107 base::Bind(&BrowsingDataRemoverBrowserTest::OnCacheSizeResult, |
107 base::Unretained(this), base::Unretained(&run_loop), | 108 base::Unretained(this), base::Unretained(&run_loop), |
108 base::Unretained(&size))); | 109 base::Unretained(&size))); |
109 counter.Restart(); | 110 counter.Restart(); |
110 run_loop.Run(); | 111 run_loop.Run(); |
111 return size; | 112 return size; |
112 } | 113 } |
113 | 114 |
114 void RemoveAndWait(int remove_mask) { | 115 void RemoveAndWait(int remove_mask) { |
115 BrowsingDataRemover* remover = | 116 BrowsingDataRemover* remover = |
(...skipping 180 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 |