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

Unified Diff: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Use parameter Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc
diff --git a/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc b/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc
index 9db933397170af8013a6643b091276f4bf1eb118..3c95a88602bdefff0334978dab913563d280bfda 100644
--- a/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc
+++ b/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc
@@ -255,7 +255,7 @@ void ClearBrowsingDataHandler::HandleInitialize(const base::ListValue* args) {
// Needed because WebUI doesn't handle renderer crashes. See crbug.com/610450.
task_observer_.reset();
- OnStateChanged();
+ OnStateChanged(nullptr);
sky 2017/01/27 16:29:44 Same comment above using another function.
Steven Holte 2017/01/27 20:11:45 Done.
RefreshHistoryNotice();
// Restart the counters each time the dialog is reopened.
@@ -267,7 +267,7 @@ void ClearBrowsingDataHandler::HandleInitialize(const base::ListValue* args) {
*base::Value::CreateNullValue() /* Promise<void> */);
}
-void ClearBrowsingDataHandler::OnStateChanged() {
+void ClearBrowsingDataHandler::OnStateChanged(syncer::SyncService* sync) {
CallJavascriptFunction(
"cr.webUIListenerCallback",
base::StringValue("update-footer"),
@@ -300,7 +300,7 @@ void ClearBrowsingDataHandler::RefreshHistoryNotice() {
void ClearBrowsingDataHandler::UpdateHistoryNotice(bool show) {
show_history_footer_ = show;
- OnStateChanged();
+ OnStateChanged(nullptr);
UMA_HISTOGRAM_BOOLEAN(
"History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated",

Powered by Google App Engine
This is Rietveld 408576698