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

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

Issue 1420013004: Polish the result communication and display of the browsing data counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 1 month 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 "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/prefs/pref_member.h" 9 #include "base/prefs/pref_member.h"
10 #include "chrome/browser/browsing_data/browsing_data_counter.h" 10 #include "chrome/browser/browsing_data/browsing_data_counter.h"
(...skipping 29 matching lines...) Expand all
40 // Javascript callback to start clearing data. 40 // Javascript callback to start clearing data.
41 void HandleClearBrowserData(const base::ListValue* value); 41 void HandleClearBrowserData(const base::ListValue* value);
42 42
43 // BrowsingDataRemover::Observer implementation. 43 // BrowsingDataRemover::Observer implementation.
44 // Closes the dialog once all requested data has been removed. 44 // Closes the dialog once all requested data has been removed.
45 void OnBrowsingDataRemoverDone() override; 45 void OnBrowsingDataRemoverDone() override;
46 46
47 // Updates UI when the pref to allow clearing history changes. 47 // Updates UI when the pref to allow clearing history changes.
48 virtual void OnBrowsingHistoryPrefChanged(); 48 virtual void OnBrowsingHistoryPrefChanged();
49 49
50 // Adds a |counter| for browsing data. Its output will be displayed 50 // Adds a |counter| for browsing data.
51 // in the dialog with the string |text_grd_id|. 51 void AddCounter(scoped_ptr<BrowsingDataCounter> counter);
52 void AddCounter(scoped_ptr<BrowsingDataCounter> counter, int text_grd_id);
53 52
54 // Updates the counter of the pref |pref_name| in the UI according 53 // Updates a counter in the UI according to the |result|.
55 // to a callback from a |BrowsingDataCounter| that specifies whether 54 void UpdateCounterText(scoped_ptr<BrowsingDataCounter::Result> result);
56 // the counting has |finished| and what the |count| is. The |count| will
57 // be substituted into the string with the ID |text_grd_id|.
58 void UpdateCounterText(const std::string& pref_name,
59 int text_grd_id,
60 bool finished,
61 BrowsingDataCounter::ResultInt count);
62 55
63 // Implementation of SyncServiceObserver. Updates the support string at the 56 // Implementation of SyncServiceObserver. Updates the support string at the
64 // bottom of the dialog. 57 // bottom of the dialog.
65 void OnStateChanged() override; 58 void OnStateChanged() override;
66 59
67 // If non-null it means removal is in progress. BrowsingDataRemover takes care 60 // If non-null it means removal is in progress. BrowsingDataRemover takes care
68 // of deleting itself when done. 61 // of deleting itself when done.
69 BrowsingDataRemover* remover_; 62 BrowsingDataRemover* remover_;
70 63
71 // Keeps track of whether clearing LSO data is supported. 64 // Keeps track of whether clearing LSO data is supported.
(...skipping 11 matching lines...) Expand all
83 76
84 // Informs us whether the user is syncing their data. 77 // Informs us whether the user is syncing their data.
85 ProfileSyncService* sync_service_; 78 ProfileSyncService* sync_service_;
86 79
87 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); 80 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler);
88 }; 81 };
89 82
90 } // namespace options 83 } // namespace options
91 84
92 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 85 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698