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

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

Issue 1899433002: Update flags used by offline pages and bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 if (remove_mask & REMOVE_WEBAPP_DATA) { 983 if (remove_mask & REMOVE_WEBAPP_DATA) {
984 // Clear all data associated with registered webapps. The webapp_registry 984 // Clear all data associated with registered webapps. The webapp_registry
985 // makes a JNI call into a Java-side AsyncTask, so don't wait for the reply. 985 // makes a JNI call into a Java-side AsyncTask, so don't wait for the reply.
986 waiting_for_clear_webapp_data_ = true; 986 waiting_for_clear_webapp_data_ = true;
987 webapp_registry_->UnregisterWebapps( 987 webapp_registry_->UnregisterWebapps(
988 base::Bind(&BrowsingDataRemover::OnClearedWebappData, 988 base::Bind(&BrowsingDataRemover::OnClearedWebappData,
989 weak_ptr_factory_.GetWeakPtr())); 989 weak_ptr_factory_.GetWeakPtr()));
990 } 990 }
991 991
992 if ((remove_mask & REMOVE_OFFLINE_PAGE_DATA) && 992 if ((remove_mask & REMOVE_OFFLINE_PAGE_DATA) &&
993 offline_pages::IsOfflinePagesEnabled()) { 993 offline_pages::IsOfflineBookmarksEnabled()) {
994 waiting_for_clear_offline_page_data_ = true; 994 waiting_for_clear_offline_page_data_ = true;
995 offline_pages::OfflinePageModelFactory::GetForBrowserContext(profile_) 995 offline_pages::OfflinePageModelFactory::GetForBrowserContext(profile_)
996 ->DeletePagesByURLPredicate( 996 ->DeletePagesByURLPredicate(
997 same_domain_filter, 997 same_domain_filter,
998 base::Bind(&BrowsingDataRemover::OnClearedOfflinePageData, 998 base::Bind(&BrowsingDataRemover::OnClearedOfflinePageData,
999 weak_ptr_factory_.GetWeakPtr())); 999 weak_ptr_factory_.GetWeakPtr()));
1000 } 1000 }
1001 #endif 1001 #endif
1002 1002
1003 // Record the combined deletion of cookies and cache. 1003 // Record the combined deletion of cookies and cache.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 waiting_for_clear_domain_reliability_monitor_ = false; 1312 waiting_for_clear_domain_reliability_monitor_ = false;
1313 NotifyIfDone(); 1313 NotifyIfDone();
1314 } 1314 }
1315 1315
1316 // static 1316 // static
1317 BrowsingDataRemover::CallbackSubscription 1317 BrowsingDataRemover::CallbackSubscription
1318 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1318 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1319 const BrowsingDataRemover::Callback& callback) { 1319 const BrowsingDataRemover::Callback& callback) {
1320 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1320 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1321 } 1321 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698