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

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

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed redundant functions Created 5 years, 3 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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/metrics/histogram_macros.h" 15 #include "base/metrics/histogram_macros.h"
16 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
17 #include "chrome/browser/autofill/personal_data_manager_factory.h" 17 #include "chrome/browser/autofill/personal_data_manager_factory.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/browsing_data/browsing_data_helper.h" 19 #include "chrome/browser/browsing_data/browsing_data_helper.h"
20 #include "chrome/browser/chrome_notification_types.h" 20 #include "chrome/browser/chrome_notification_types.h"
21 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
21 #include "chrome/browser/domain_reliability/service_factory.h" 22 #include "chrome/browser/domain_reliability/service_factory.h"
22 #include "chrome/browser/download/download_prefs.h" 23 #include "chrome/browser/download/download_prefs.h"
23 #include "chrome/browser/download/download_service_factory.h" 24 #include "chrome/browser/download/download_service_factory.h"
24 #include "chrome/browser/history/history_service_factory.h" 25 #include "chrome/browser/history/history_service_factory.h"
25 #include "chrome/browser/history/web_history_service_factory.h" 26 #include "chrome/browser/history/web_history_service_factory.h"
26 #include "chrome/browser/io_thread.h" 27 #include "chrome/browser/io_thread.h"
27 #include "chrome/browser/media/media_device_id_salt.h" 28 #include "chrome/browser/media/media_device_id_salt.h"
28 #include "chrome/browser/net/predictor.h" 29 #include "chrome/browser/net/predictor.h"
29 #include "chrome/browser/password_manager/password_store_factory.h" 30 #include "chrome/browser/password_manager/password_store_factory.h"
30 #include "chrome/browser/prerender/prerender_manager.h" 31 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 plugin_data_remover_->StartRemoving(delete_begin_); 552 plugin_data_remover_->StartRemoving(delete_begin_);
552 553
553 base::WaitableEventWatcher::EventCallback watcher_callback = 554 base::WaitableEventWatcher::EventCallback watcher_callback =
554 base::Bind(&BrowsingDataRemover::OnWaitableEventSignaled, 555 base::Bind(&BrowsingDataRemover::OnWaitableEventSignaled,
555 base::Unretained(this)); 556 base::Unretained(this));
556 watcher_.StartWatching(event, watcher_callback); 557 watcher_.StartWatching(event, watcher_callback);
557 } 558 }
558 #endif 559 #endif
559 560
560 if (remove_mask & REMOVE_SITE_USAGE_DATA || remove_mask & REMOVE_HISTORY) { 561 if (remove_mask & REMOVE_SITE_USAGE_DATA || remove_mask & REMOVE_HISTORY) {
561 profile_->GetHostContentSettingsMap()->ClearSettingsForOneType( 562 HostContentSettingsMapFactory::GetForProfile(profile_)
562 CONTENT_SETTINGS_TYPE_APP_BANNER); 563 ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_APP_BANNER);
563 profile_->GetHostContentSettingsMap()->ClearSettingsForOneType( 564 HostContentSettingsMapFactory::GetForProfile(profile_)
564 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT); 565 ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT);
565 } 566 }
566 567
567 if (remove_mask & REMOVE_PASSWORDS) { 568 if (remove_mask & REMOVE_PASSWORDS) {
568 content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); 569 content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords"));
569 password_manager::PasswordStore* password_store = 570 password_manager::PasswordStore* password_store =
570 PasswordStoreFactory::GetForProfile( 571 PasswordStoreFactory::GetForProfile(
571 profile_, ServiceAccessType::EXPLICIT_ACCESS).get(); 572 profile_, ServiceAccessType::EXPLICIT_ACCESS).get();
572 573
573 if (password_store) { 574 if (password_store) {
574 waiting_for_clear_passwords_ = true; 575 waiting_for_clear_passwords_ = true;
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 waiting_for_clear_domain_reliability_monitor_ = false; 1140 waiting_for_clear_domain_reliability_monitor_ = false;
1140 NotifyAndDeleteIfDone(); 1141 NotifyAndDeleteIfDone();
1141 } 1142 }
1142 1143
1143 // static 1144 // static
1144 BrowsingDataRemover::CallbackSubscription 1145 BrowsingDataRemover::CallbackSubscription
1145 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1146 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1146 const BrowsingDataRemover::Callback& callback) { 1147 const BrowsingDataRemover::Callback& callback) {
1147 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1148 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1148 } 1149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698