OLD | NEW |
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 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" | 5 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browsing_data/cache_counter.h" | 9 #include "chrome/browser/browsing_data/cache_counter.h" |
10 #include "chrome/browser/browsing_data/media_licenses_counter.h" | 10 #include "chrome/browser/browsing_data/media_licenses_counter.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
15 #include "components/browsing_data/core/pref_names.h" | 15 #include "components/browsing_data/core/pref_names.h" |
16 #include "components/prefs/pref_service.h" | 16 #include "components/prefs/pref_service.h" |
17 #include "grit/components_strings.h" | 17 #include "components/strings/grit/components_strings.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/text/bytes_formatting.h" | 19 #include "ui/base/text/bytes_formatting.h" |
20 | 20 |
21 #if defined(ENABLE_EXTENSIONS) | 21 #if defined(ENABLE_EXTENSIONS) |
22 #include "base/numerics/safe_conversions.h" | 22 #include "base/numerics/safe_conversions.h" |
23 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
24 #include "base/strings/utf_string_conversions.h" | |
25 #include "chrome/browser/browsing_data/hosted_apps_counter.h" | 24 #include "chrome/browser/browsing_data/hosted_apps_counter.h" |
26 #endif | 25 #endif |
27 | 26 |
28 bool AreCountersEnabled() { | 27 bool AreCountersEnabled() { |
29 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 28 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
30 switches::kEnableClearBrowsingDataCounters)) { | 29 switches::kEnableClearBrowsingDataCounters)) { |
31 return true; | 30 return true; |
32 } | 31 } |
33 | 32 |
34 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 33 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return base::ReplaceStringPlaceholders( | 129 return base::ReplaceStringPlaceholders( |
131 l10n_util::GetPluralStringFUTF16( | 130 l10n_util::GetPluralStringFUTF16( |
132 IDS_DEL_HOSTED_APPS_COUNTER, hosted_apps_count), | 131 IDS_DEL_HOSTED_APPS_COUNTER, hosted_apps_count), |
133 replacements, | 132 replacements, |
134 nullptr); | 133 nullptr); |
135 } | 134 } |
136 #endif | 135 #endif |
137 | 136 |
138 return browsing_data::GetCounterTextFromResult(result); | 137 return browsing_data::GetCounterTextFromResult(result); |
139 } | 138 } |
OLD | NEW |