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

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

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 void ClearChannelIDsOnIOThread( 224 void ClearChannelIDsOnIOThread(
225 base::Time delete_begin, 225 base::Time delete_begin,
226 base::Time delete_end, 226 base::Time delete_end,
227 scoped_refptr<net::URLRequestContextGetter> rq_context, 227 scoped_refptr<net::URLRequestContextGetter> rq_context,
228 const base::Closure& callback) { 228 const base::Closure& callback) {
229 DCHECK_CURRENTLY_ON(BrowserThread::IO); 229 DCHECK_CURRENTLY_ON(BrowserThread::IO);
230 net::ChannelIDService* channel_id_service = 230 net::ChannelIDService* channel_id_service =
231 rq_context->GetURLRequestContext()->channel_id_service(); 231 rq_context->GetURLRequestContext()->channel_id_service();
232 channel_id_service->GetChannelIDStore()->DeleteAllCreatedBetween( 232 channel_id_service->GetChannelIDStore()->DeleteAllCreatedBetween(
233 delete_begin, delete_end, base::Bind(&OnClearedChannelIDsOnIOThread, 233 delete_begin, delete_end,
234 std::move(rq_context), callback)); 234 base::Bind(&OnClearedChannelIDsOnIOThread,
235 base::RetainedRef(std::move(rq_context)), callback));
235 } 236 }
236 237
237 } // namespace 238 } // namespace
238 239
239 BrowsingDataRemover::CompletionInhibitor* 240 BrowsingDataRemover::CompletionInhibitor*
240 BrowsingDataRemover::completion_inhibitor_ = nullptr; 241 BrowsingDataRemover::completion_inhibitor_ = nullptr;
241 242
242 BrowsingDataRemover::NotificationDetails::NotificationDetails() 243 BrowsingDataRemover::NotificationDetails::NotificationDetails()
243 : removal_begin(base::Time()), 244 : removal_begin(base::Time()),
244 removal_mask(-1), 245 removal_mask(-1),
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 if (delete_begin_ == base::Time()) { 611 if (delete_begin_ == base::Time()) {
611 safe_browsing::SafeBrowsingService* sb_service = 612 safe_browsing::SafeBrowsingService* sb_service =
612 g_browser_process->safe_browsing_service(); 613 g_browser_process->safe_browsing_service();
613 if (sb_service) { 614 if (sb_service) {
614 scoped_refptr<net::URLRequestContextGetter> sb_context = 615 scoped_refptr<net::URLRequestContextGetter> sb_context =
615 sb_service->url_request_context(); 616 sb_service->url_request_context();
616 ++waiting_for_clear_cookies_count_; 617 ++waiting_for_clear_cookies_count_;
617 BrowserThread::PostTask( 618 BrowserThread::PostTask(
618 BrowserThread::IO, FROM_HERE, 619 BrowserThread::IO, FROM_HERE,
619 base::Bind(&ClearCookiesOnIOThread, delete_begin_, delete_end_, 620 base::Bind(&ClearCookiesOnIOThread, delete_begin_, delete_end_,
620 std::move(sb_context), 621 base::RetainedRef(std::move(sb_context)),
621 UIThreadTrampoline( 622 UIThreadTrampoline(
622 base::Bind(&BrowsingDataRemover::OnClearedCookies, 623 base::Bind(&BrowsingDataRemover::OnClearedCookies,
623 weak_ptr_factory_.GetWeakPtr())))); 624 weak_ptr_factory_.GetWeakPtr()))));
624 } 625 }
625 } 626 }
626 627
627 MediaDeviceIDSalt::Reset(profile_->GetPrefs()); 628 MediaDeviceIDSalt::Reset(profile_->GetPrefs());
628 } 629 }
629 630
630 // Channel IDs are not separated for protected and unprotected web 631 // Channel IDs are not separated for protected and unprotected web
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 waiting_for_clear_domain_reliability_monitor_ = false; 1231 waiting_for_clear_domain_reliability_monitor_ = false;
1231 NotifyIfDone(); 1232 NotifyIfDone();
1232 } 1233 }
1233 1234
1234 // static 1235 // static
1235 BrowsingDataRemover::CallbackSubscription 1236 BrowsingDataRemover::CallbackSubscription
1236 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1237 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1237 const BrowsingDataRemover::Callback& callback) { 1238 const BrowsingDataRemover::Callback& callback) {
1238 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1239 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1239 } 1240 }
OLDNEW
« no previous file with comments | « base/threading/sequenced_worker_pool_unittest.cc ('k') | chrome/browser/captive_portal/captive_portal_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698