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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_clear_browsing_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 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 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Clears browsing data, called by Javascript. 47 // Clears browsing data, called by Javascript.
48 void HandleClearBrowsingData(const base::ListValue* value); 48 void HandleClearBrowsingData(const base::ListValue* value);
49 49
50 // Called when a clearing task finished. |webui_callback_id| is provided 50 // Called when a clearing task finished. |webui_callback_id| is provided
51 // by the WebUI action that initiated it. 51 // by the WebUI action that initiated it.
52 void OnClearingTaskFinished(const std::string& webui_callback_id); 52 void OnClearingTaskFinished(const std::string& webui_callback_id);
53 53
54 // Initializes the dialog UI. Called by JavaScript when the DOM is ready. 54 // Initializes the dialog UI. Called by JavaScript when the DOM is ready.
55 void HandleInitialize(const base::ListValue* args); 55 void HandleInitialize(const base::ListValue* args);
56 56
57 // Implementation of SyncServiceObserver. Updates the footer of the dialog 57 // Implementation of SyncServiceObserver.
58 // when the sync state changes. 58 void OnStateChanged(syncer::SyncService* sync) override;
59 void OnStateChanged() override; 59
60 // Updates the footer of the dialog when the sync state changes.
61 void UpdateSyncState();
60 62
61 // Finds out whether we should show notice about other forms of history stored 63 // Finds out whether we should show notice about other forms of history stored
62 // in user's account. 64 // in user's account.
63 void RefreshHistoryNotice(); 65 void RefreshHistoryNotice();
64 66
65 // Called as an asynchronous response to |RefreshHistoryNotice()|. Shows or 67 // Called as an asynchronous response to |RefreshHistoryNotice()|. Shows or
66 // hides the footer about other forms of history stored in user's account. 68 // hides the footer about other forms of history stored in user's account.
67 void UpdateHistoryNotice(bool show); 69 void UpdateHistoryNotice(bool show);
68 70
69 // Called as an asynchronous response to |RefreshHistoryNotice()|. Enables or 71 // Called as an asynchronous response to |RefreshHistoryNotice()|. Enables or
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 105
104 // A weak pointer factory for asynchronous calls referencing this class. 106 // A weak pointer factory for asynchronous calls referencing this class.
105 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; 107 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_;
106 108
107 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); 109 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler);
108 }; 110 };
109 111
110 } // namespace settings 112 } // namespace settings
111 113
112 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER _H_ 114 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698