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

Unified Diff: chrome/browser/ui/webui/options/clear_browser_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/options/clear_browser_data_handler.cc
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
index 0d7767128d979c0671e706dc878005b1a2bc1c33..caddf9d8e11b89d019a0d6d2f8ce37f55bfceb0d 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
@@ -391,7 +391,7 @@ void ClearBrowserDataHandler::UpdateCounterText(
base::StringValue(GetChromeCounterTextFromResult(result.get())));
}
-void ClearBrowserDataHandler::OnStateChanged() {
+void ClearBrowserDataHandler::OnStateChanged(syncer::SyncService* sync) {
web_ui()->CallJavascriptFunctionUnsafe(
"ClearBrowserDataOverlay.updateSyncWarningAndHistoryFooter",
base::FundamentalValue(sync_service_ && sync_service_->IsSyncActive()),
@@ -423,7 +423,7 @@ void ClearBrowserDataHandler::RefreshHistoryNotice() {
void ClearBrowserDataHandler::UpdateHistoryNotice(bool show) {
should_show_history_notice_ = show;
- OnStateChanged();
+ OnStateChanged(nullptr);
sky 2017/01/27 16:29:44 This seems error prone. I recommend having OnState
Steven Holte 2017/01/27 20:11:45 Done.
UMA_HISTOGRAM_BOOLEAN(
"History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated",

Powered by Google App Engine
This is Rietveld 408576698