OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/webui/settings/settings_clear_browsing_data_handler.
h" | 5 #include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.
h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/sparse_histogram.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 12 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
14 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" | 13 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" |
15 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 15 #include "components/prefs/pref_service.h" |
16 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
17 | 17 |
18 namespace settings { | 18 namespace settings { |
19 | 19 |
20 ClearBrowsingDataHandler::ClearBrowsingDataHandler(content::WebUI* webui) | 20 ClearBrowsingDataHandler::ClearBrowsingDataHandler(content::WebUI* webui) |
21 : remover_(nullptr) { | 21 : remover_(nullptr) { |
22 PrefService* prefs = Profile::FromWebUI(webui)->GetPrefs(); | 22 PrefService* prefs = Profile::FromWebUI(webui)->GetPrefs(); |
23 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, prefs); | 23 clear_plugin_lso_data_enabled_.Init(prefs::kClearPluginLSODataEnabled, prefs); |
24 pepper_flash_settings_enabled_.Init(prefs::kPepperFlashSettingsEnabled, | 24 pepper_flash_settings_enabled_.Init(prefs::kPepperFlashSettingsEnabled, |
25 prefs); | 25 prefs); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 web_ui()->CallJavascriptFunction("SettingsClearBrowserData.doneClearing"); | 138 web_ui()->CallJavascriptFunction("SettingsClearBrowserData.doneClearing"); |
139 } | 139 } |
140 | 140 |
141 void ClearBrowsingDataHandler::OnBrowsingHistoryPrefChanged() { | 141 void ClearBrowsingDataHandler::OnBrowsingHistoryPrefChanged() { |
142 web_ui()->CallJavascriptFunction( | 142 web_ui()->CallJavascriptFunction( |
143 "SettingsClearBrowserData.setAllowDeletingHistory", | 143 "SettingsClearBrowserData.setAllowDeletingHistory", |
144 base::FundamentalValue(*allow_deleting_browser_history_)); | 144 base::FundamentalValue(*allow_deleting_browser_history_)); |
145 } | 145 } |
146 | 146 |
147 } // namespace settings | 147 } // namespace settings |
OLD | NEW |