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

Side by Side Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 10 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Updates UI when the pref to allow clearing history changes. 50 // Updates UI when the pref to allow clearing history changes.
51 virtual void OnBrowsingHistoryPrefChanged(); 51 virtual void OnBrowsingHistoryPrefChanged();
52 52
53 // Adds a |counter| for browsing data. 53 // Adds a |counter| for browsing data.
54 void AddCounter(std::unique_ptr<browsing_data::BrowsingDataCounter> counter); 54 void AddCounter(std::unique_ptr<browsing_data::BrowsingDataCounter> counter);
55 55
56 // Updates a counter in the UI according to the |result|. 56 // Updates a counter in the UI according to the |result|.
57 void UpdateCounterText( 57 void UpdateCounterText(
58 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result); 58 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result);
59 59
60 // Implementation of SyncServiceObserver. Updates the support string at the 60 // Implementation of SyncServiceObserver.
61 // bottom of the dialog. 61 void OnStateChanged(syncer::SyncService* sync) override;
62 void OnStateChanged() override; 62
63 // Updates the support string at the bottom of the dialog.
64 void UpdateSyncState();
63 65
64 // Finds out whether we should show a notice informing the user about other 66 // Finds out whether we should show a notice informing the user about other
65 // forms of browsing history. Responds with an asynchronous callback to 67 // forms of browsing history. Responds with an asynchronous callback to
66 // |UpdateHistoryNotice|. 68 // |UpdateHistoryNotice|.
67 void RefreshHistoryNotice(); 69 void RefreshHistoryNotice();
68 70
69 // Shows or hides the notice about other forms of browsing history. 71 // Shows or hides the notice about other forms of browsing history.
70 void UpdateHistoryNotice(bool show); 72 void UpdateHistoryNotice(bool show);
71 73
72 // Remembers whether we should popup a dialog about other forms of browsing 74 // Remembers whether we should popup a dialog about other forms of browsing
(...skipping 24 matching lines...) Expand all
97 99
98 // A weak pointer factory for asynchronous calls referencing this class. 100 // A weak pointer factory for asynchronous calls referencing this class.
99 base::WeakPtrFactory<ClearBrowserDataHandler> weak_ptr_factory_; 101 base::WeakPtrFactory<ClearBrowserDataHandler> weak_ptr_factory_;
100 102
101 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); 103 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler);
102 }; 104 };
103 105
104 } // namespace options 106 } // namespace options
105 107
106 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 108 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698