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

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

Issue 2184823007: Add a feature which, when enabled, blocks permissions after X prompt dismissals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 4 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 14 matching lines...) Expand all
25 #include "chrome/browser/domain_reliability/service_factory.h" 25 #include "chrome/browser/domain_reliability/service_factory.h"
26 #include "chrome/browser/download/download_prefs.h" 26 #include "chrome/browser/download/download_prefs.h"
27 #include "chrome/browser/history/history_service_factory.h" 27 #include "chrome/browser/history/history_service_factory.h"
28 #include "chrome/browser/history/web_history_service_factory.h" 28 #include "chrome/browser/history/web_history_service_factory.h"
29 #include "chrome/browser/io_thread.h" 29 #include "chrome/browser/io_thread.h"
30 #include "chrome/browser/media/media_device_id_salt.h" 30 #include "chrome/browser/media/media_device_id_salt.h"
31 #include "chrome/browser/net/predictor.h" 31 #include "chrome/browser/net/predictor.h"
32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
34 #include "chrome/browser/password_manager/password_store_factory.h" 34 #include "chrome/browser/password_manager/password_store_factory.h"
35 #include "chrome/browser/permissions/permission_decision_auto_blocker.h"
35 #include "chrome/browser/prerender/prerender_manager.h" 36 #include "chrome/browser/prerender/prerender_manager.h"
36 #include "chrome/browser/prerender/prerender_manager_factory.h" 37 #include "chrome/browser/prerender/prerender_manager_factory.h"
37 #include "chrome/browser/profiles/profile.h" 38 #include "chrome/browser/profiles/profile.h"
38 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 39 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
39 #include "chrome/browser/search_engines/template_url_service_factory.h" 40 #include "chrome/browser/search_engines/template_url_service_factory.h"
40 #include "chrome/browser/sessions/tab_restore_service_factory.h" 41 #include "chrome/browser/sessions/tab_restore_service_factory.h"
41 #include "chrome/browser/web_data_service_factory.h" 42 #include "chrome/browser/web_data_service_factory.h"
42 #include "chrome/common/features.h" 43 #include "chrome/common/features.h"
43 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
44 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 #endif 415 #endif
415 } 416 }
416 417
417 #if defined(ENABLE_EXTENSIONS) 418 #if defined(ENABLE_EXTENSIONS)
418 // Clear launch times as they are a form of history. 419 // Clear launch times as they are a form of history.
419 extensions::ExtensionPrefs* extension_prefs = 420 extensions::ExtensionPrefs* extension_prefs =
420 extensions::ExtensionPrefs::Get(profile_); 421 extensions::ExtensionPrefs::Get(profile_);
421 extension_prefs->ClearLastLaunchTimes(); 422 extension_prefs->ClearLastLaunchTimes();
422 #endif 423 #endif
423 424
425 // Clear permission dismissal counts as they are origin-keyed.
426 PermissionDecisionAutoBlocker::RemoveCountsByUrl(profile_, filter);
427
424 // The power consumption history by origin contains details of websites 428 // The power consumption history by origin contains details of websites
425 // that were visited. 429 // that were visited.
426 // TODO(dmurph): Support all backends with filter (crbug.com/113621). 430 // TODO(dmurph): Support all backends with filter (crbug.com/113621).
427 power::OriginPowerMap* origin_power_map = 431 power::OriginPowerMap* origin_power_map =
428 power::OriginPowerMapFactory::GetForBrowserContext(profile_); 432 power::OriginPowerMapFactory::GetForBrowserContext(profile_);
429 if (origin_power_map) 433 if (origin_power_map)
430 origin_power_map->ClearOriginMap(); 434 origin_power_map->ClearOriginMap();
431 435
432 // Need to clear the host cache and accumulated speculative data, as it also 436 // Need to clear the host cache and accumulated speculative data, as it also
433 // reveals some history: we have no mechanism to track when these items were 437 // reveals some history: we have no mechanism to track when these items were
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 waiting_for_clear_offline_page_data_ = false; 1295 waiting_for_clear_offline_page_data_ = false;
1292 NotifyIfDone(); 1296 NotifyIfDone();
1293 } 1297 }
1294 #endif 1298 #endif
1295 1299
1296 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { 1300 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() {
1297 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1301 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1298 waiting_for_clear_domain_reliability_monitor_ = false; 1302 waiting_for_clear_domain_reliability_monitor_ = false;
1299 NotifyIfDone(); 1303 NotifyIfDone();
1300 } 1304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698