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

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

Issue 1527653004: Move browsing data counters helper functions to an 'utils' file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Default flag value. Created 5 years 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 14 matching lines...) Expand all
25 // OptionsPageUIHandler implementation. 25 // OptionsPageUIHandler implementation.
26 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 26 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
27 void InitializeHandler() override; 27 void InitializeHandler() override;
28 void InitializePage() override; 28 void InitializePage() override;
29 29
30 // WebUIMessageHandler implementation. 30 // WebUIMessageHandler implementation.
31 void RegisterMessages() override; 31 void RegisterMessages() override;
32 32
33 void UpdateInfoBannerVisibility(); 33 void UpdateInfoBannerVisibility();
34 34
35 // Constructs the text to be displayed by a counter from the given |result|.
36 static base::string16 GetCounterTextFromResult(
37 const BrowsingDataCounter::Result* result);
38
39 private: 35 private:
40 // Javascript callback for when the CBD dialog is opened. The caller does 36 // Javascript callback for when the CBD dialog is opened. The caller does
41 // not provide any parameters, so |value| is unused. 37 // not provide any parameters, so |value| is unused.
42 void OnPageOpened(const base::ListValue* value); 38 void OnPageOpened(const base::ListValue* value);
43 39
44 // Javascript callback to start clearing data. 40 // Javascript callback to start clearing data.
45 void HandleClearBrowserData(const base::ListValue* value); 41 void HandleClearBrowserData(const base::ListValue* value);
46 42
47 // BrowsingDataRemover::Observer implementation. 43 // BrowsingDataRemover::Observer implementation.
48 // Closes the dialog once all requested data has been removed. 44 // Closes the dialog once all requested data has been removed.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 76
81 // Informs us whether the user is syncing their data. 77 // Informs us whether the user is syncing their data.
82 ProfileSyncService* sync_service_; 78 ProfileSyncService* sync_service_;
83 79
84 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); 80 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler);
85 }; 81 };
86 82
87 } // namespace options 83 } // namespace options
88 84
89 #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