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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_counter_utils.h

Issue 1530123002: Prepare ClearBrowsingDataDialogFragment for browsing data counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@utils
Patch Set: Added *Bridge class, shared enum Created 4 years, 11 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_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/browser/browsing_data/browsing_data_counter.h" 9 #include "chrome/browser/browsing_data/browsing_data_counter.h"
10 10
11 // Whether the browsing data counters experiment is enabled. 11 // Whether the browsing data counters experiment is enabled.
newt (away) 2016/01/12 18:55:27 Tangential comment: Perhaps these static methods s
msramek 2016/01/13 15:27:53 I originally did have a namespace :-) See the code
newt (away) 2016/01/13 20:01:49 Ah, well I respectfully submit my opposing opinion
msramek 2016/01/14 15:45:43 Very well :) Then I think it's best if we go with
12 bool AreCountersEnabled(); 12 bool AreCountersEnabled();
13 13
14 // Constructs the text to be displayed by a counter from the given |result|. 14 // Constructs the text to be displayed by a counter from the given |result|.
15 base::string16 GetCounterTextFromResult( 15 base::string16 GetCounterTextFromResult(
16 const BrowsingDataCounter::Result* result); 16 const BrowsingDataCounter::Result* result);
17 17
18 // Browsing data types as seen in the Android UI.
19 //
20 // A Java counterpart will be generated for this enum.
21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
22 enum ClankBrowsingDataType {
newt (away) 2016/01/12 18:55:26 Don't use the word "clank" in code. How about just
msramek 2016/01/13 15:27:53 Done. Yes, I wasn't sure about that, but I found s
23 HISTORY,
24 CACHE,
25 COOKIES,
26 PASSWORDS,
27 FORM_DATA,
28 BOOKMARKS,
29 NUM_TYPES = BOOKMARKS
newt (away) 2016/01/12 18:55:26 remove " = BOOKMARKS". In this case, BOOKMARKS wil
msramek 2016/01/13 15:27:53 Ah, of course.
30 };
31
32 // Copies the name of the deletion preference corresponding to the given
33 // |data_type| to |out_pref|. Returns false if no such preference exists.
34 bool GetDeletionPreferenceFromDataType(
35 ClankBrowsingDataType data_type, std::string* out_pref);
36
18 // Creates a new instance of BrowsingDataCounter that is counting the data 37 // Creates a new instance of BrowsingDataCounter that is counting the data
19 // related to a given deletion preference |pref_name|. 38 // related to a given deletion preference |pref_name|.
20 BrowsingDataCounter* CreateCounterForPreference(std::string pref_name); 39 BrowsingDataCounter* CreateCounterForPreference(std::string pref_name);
21 40
22 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_ 41 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698