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 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); 488 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"));
489 489
490 storage_partition_remove_mask |= 490 storage_partition_remove_mask |=
491 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; 491 content::StoragePartition::REMOVE_DATA_MASK_COOKIES;
492 492
493 // Clear the safebrowsing cookies only if time period is for "all time". It 493 // Clear the safebrowsing cookies only if time period is for "all time". It
494 // doesn't make sense to apply the time period of deleting in the last X 494 // doesn't make sense to apply the time period of deleting in the last X
495 // hours/days to the safebrowsing cookies since they aren't the result of 495 // hours/days to the safebrowsing cookies since they aren't the result of
496 // any user action. 496 // any user action.
497 if (delete_begin_ == base::Time()) { 497 if (delete_begin_ == base::Time()) {
498 SafeBrowsingService* sb_service = 498 safe_browsing::SafeBrowsingService* sb_service =
499 g_browser_process->safe_browsing_service(); 499 g_browser_process->safe_browsing_service();
500 if (sb_service) { 500 if (sb_service) {
501 net::URLRequestContextGetter* sb_context = 501 net::URLRequestContextGetter* sb_context =
502 sb_service->url_request_context(); 502 sb_service->url_request_context();
503 ++waiting_for_clear_cookies_count_; 503 ++waiting_for_clear_cookies_count_;
504 BrowserThread::PostTask( 504 BrowserThread::PostTask(
505 BrowserThread::IO, FROM_HERE, 505 BrowserThread::IO, FROM_HERE,
506 base::Bind(&BrowsingDataRemover::ClearCookiesOnIOThread, 506 base::Bind(&BrowsingDataRemover::ClearCookiesOnIOThread,
507 base::Unretained(this), base::Unretained(sb_context))); 507 base::Unretained(this), base::Unretained(sb_context)));
508 } 508 }
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 waiting_for_clear_domain_reliability_monitor_ = false; 1194 waiting_for_clear_domain_reliability_monitor_ = false;
1195 NotifyAndDeleteIfDone(); 1195 NotifyAndDeleteIfDone();
1196 } 1196 }
1197 1197
1198 // static 1198 // static
1199 BrowsingDataRemover::CallbackSubscription 1199 BrowsingDataRemover::CallbackSubscription
1200 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1200 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1201 const BrowsingDataRemover::Callback& callback) { 1201 const BrowsingDataRemover::Callback& callback) {
1202 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1202 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1203 } 1203 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698