Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_browsertest.cc

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: rebase and fix compilation Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_counter_utils.cc ('k') | chrome/browser/browsing_data/cache_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698