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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h

Issue 1961183002: MD Settings: Update some Settings handlers to use new JS lifecycle management. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/scoped_observer.h"
10 #include "chrome/browser/browsing_data/browsing_data_remover.h" 11 #include "chrome/browser/browsing_data/browsing_data_remover.h"
11 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" 13 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
13 #include "components/browser_sync/browser/profile_sync_service.h" 14 #include "components/browser_sync/browser/profile_sync_service.h"
14 #include "components/prefs/pref_member.h" 15 #include "components/prefs/pref_member.h"
15 16
16 namespace base { 17 namespace base {
17 class ListValue; 18 class ListValue;
18 } 19 }
19 20
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Finds out whether we should show notice about other forms of history stored 58 // Finds out whether we should show notice about other forms of history stored
58 // in user's account. 59 // in user's account.
59 void RefreshHistoryNotice(); 60 void RefreshHistoryNotice();
60 61
61 // Called as an asynchronous response to |RefreshHistoryNotice()|. Shows or 62 // Called as an asynchronous response to |RefreshHistoryNotice()|. Shows or
62 // hides the footer about other forms of history stored in user's account. 63 // hides the footer about other forms of history stored in user's account.
63 void UpdateHistoryNotice(bool show); 64 void UpdateHistoryNotice(bool show);
64 65
65 // ProfileSyncService to observe sync state changes. 66 // ProfileSyncService to observe sync state changes.
66 ProfileSyncService* sync_service_; 67 ProfileSyncService* sync_service_;
68 ScopedObserver<ProfileSyncService, sync_driver::SyncServiceObserver>
69 sync_service_observer_;
67 70
68 // If non-null it means removal is in progress. 71 // If non-null it means removal is in progress.
69 BrowsingDataRemover* remover_; 72 BrowsingDataRemover* remover_;
70 73
71 // The WebUI callback ID of the last performClearBrowserData request. There 74 // The WebUI callback ID of the last performClearBrowserData request. There
72 // can only be one such request in-flight. 75 // can only be one such request in-flight.
73 std::string webui_callback_id_; 76 std::string webui_callback_id_;
74 77
75 // Keeps track of whether clearing LSO data is supported. 78 // Keeps track of whether clearing LSO data is supported.
76 BooleanPrefMember clear_plugin_lso_data_enabled_; 79 BooleanPrefMember clear_plugin_lso_data_enabled_;
(...skipping 12 matching lines...) Expand all
89 92
90 // A weak pointer factory for asynchronous calls referencing this class. 93 // A weak pointer factory for asynchronous calls referencing this class.
91 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; 94 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_;
92 95
93 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); 96 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler);
94 }; 97 };
95 98
96 } // namespace settings 99 } // namespace settings
97 100
98 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER _H_ 101 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698