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

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

Issue 1581173004: Added namespace browsing_data_counter_utils Base URL: https://chromium.googlesource.com/chromium/src.git@add-counters
Patch Set: 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 namespace browsing_data_counter_utils {
12
11 // Whether the browsing data counters experiment is enabled. 13 // Whether the browsing data counters experiment is enabled.
12 bool AreCountersEnabled(); 14 bool AreCountersEnabled();
13 15
14 // Constructs the text to be displayed by a counter from the given |result|. 16 // Constructs the text to be displayed by a counter from the given |result|.
15 base::string16 GetCounterTextFromResult( 17 base::string16 GetCounterTextFromResult(
16 const BrowsingDataCounter::Result* result); 18 const BrowsingDataCounter::Result* result);
17 19
18 // Browsing data types as seen in the Android UI. 20 // Browsing data types as seen in the Android UI.
19 // TODO(msramek): Reuse this enum as the canonical representation of the 21 // TODO(msramek): Reuse this enum as the canonical representation of the
20 // user-facing browsing data types in the Desktop UI as well. 22 // user-facing browsing data types in the Desktop UI as well.
(...skipping 12 matching lines...) Expand all
33 35
34 // Copies the name of the deletion preference corresponding to the given 36 // Copies the name of the deletion preference corresponding to the given
35 // |data_type| to |out_pref|. Returns false if no such preference exists. 37 // |data_type| to |out_pref|. Returns false if no such preference exists.
36 bool GetDeletionPreferenceFromDataType( 38 bool GetDeletionPreferenceFromDataType(
37 BrowsingDataType data_type, std::string* out_pref); 39 BrowsingDataType data_type, std::string* out_pref);
38 40
39 // Creates a new instance of BrowsingDataCounter that is counting the data 41 // Creates a new instance of BrowsingDataCounter that is counting the data
40 // related to a given deletion preference |pref_name|. 42 // related to a given deletion preference |pref_name|.
41 BrowsingDataCounter* CreateCounterForPreference(std::string pref_name); 43 BrowsingDataCounter* CreateCounterForPreference(std::string pref_name);
42 44
45 } // namespace browsing_data_counter_utils
46
43 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_ 47 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/preferences/pref_service_bridge.cc ('k') | chrome/browser/browsing_data/browsing_data_counter_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698