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

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

Issue 2664253006: Clears out external protocol data when cookies and site data is cleared. (Closed)
Patch Set: a Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chrome_browsing_data_remover_delegate.h" 5 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "chrome/browser/autofill/personal_data_manager_factory.h" 12 #include "chrome/browser/autofill/personal_data_manager_factory.h"
13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/browsing_data/browsing_data_helper.h" 15 #include "chrome/browser/browsing_data/browsing_data_helper.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
18 #include "chrome/browser/domain_reliability/service_factory.h" 18 #include "chrome/browser/domain_reliability/service_factory.h"
19 #include "chrome/browser/download/download_prefs.h" 19 #include "chrome/browser/download/download_prefs.h"
20 #include "chrome/browser/external_protocol/external_protocol_handler.h"
20 #include "chrome/browser/history/history_service_factory.h" 21 #include "chrome/browser/history/history_service_factory.h"
21 #include "chrome/browser/history/web_history_service_factory.h" 22 #include "chrome/browser/history/web_history_service_factory.h"
22 #include "chrome/browser/io_thread.h" 23 #include "chrome/browser/io_thread.h"
23 #include "chrome/browser/media/media_device_id_salt.h" 24 #include "chrome/browser/media/media_device_id_salt.h"
24 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h" 25 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
25 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h" 26 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
26 #include "chrome/browser/net/predictor.h" 27 #include "chrome/browser/net/predictor.h"
27 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 28 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
28 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 29 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
29 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" 30 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 } 919 }
919 920
920 ////////////////////////////////////////////////////////////////////////////// 921 //////////////////////////////////////////////////////////////////////////////
921 // REMOVE_WEBAPP_DATA 922 // REMOVE_WEBAPP_DATA
922 #if defined(OS_ANDROID) 923 #if defined(OS_ANDROID)
923 // Clear all data associated with registered webapps. 924 // Clear all data associated with registered webapps.
924 if (remove_mask & BrowsingDataRemover::REMOVE_WEBAPP_DATA) 925 if (remove_mask & BrowsingDataRemover::REMOVE_WEBAPP_DATA)
925 webapp_registry_->UnregisterWebappsForUrls(filter); 926 webapp_registry_->UnregisterWebappsForUrls(filter);
926 #endif 927 #endif
927 928
929 //////////////////////////////////////////////////////////////////////////////
930 // Remove external protocol data.
931 if (remove_mask & BrowsingDataRemover::REMOVE_EXTERNAL_PROTOCOL_DATA)
932 ExternalProtocolHandler::ClearData(profile_);
933
928 synchronous_clear_operations_.GetCompletionCallback().Run(); 934 synchronous_clear_operations_.GetCompletionCallback().Run();
929 } 935 }
930 936
931 void ChromeBrowsingDataRemoverDelegate::NotifyIfDone() { 937 void ChromeBrowsingDataRemoverDelegate::NotifyIfDone() {
932 if (!AllDone()) 938 if (!AllDone())
933 return; 939 return;
934 940
935 DCHECK(!callback_.is_null()); 941 DCHECK(!callback_.is_null());
936 callback_.Run(); 942 callback_.Run();
937 } 943 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 } 1056 }
1051 1057
1052 void ChromeBrowsingDataRemoverDelegate:: 1058 void ChromeBrowsingDataRemoverDelegate::
1053 OnDeauthorizeFlashContentLicensesCompleted( 1059 OnDeauthorizeFlashContentLicensesCompleted(
1054 uint32_t request_id, 1060 uint32_t request_id,
1055 bool /* success */) { 1061 bool /* success */) {
1056 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); 1062 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_);
1057 clear_flash_content_licenses_.GetCompletionCallback().Run(); 1063 clear_flash_content_licenses_.GetCompletionCallback().Run();
1058 } 1064 }
1059 #endif 1065 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698