OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/hosted_apps_counter.h" | 5 #include "chrome/browser/browsing_data/hosted_apps_counter.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/common/pref_names.h" | 12 #include "components/browsing_data/pref_names.h" |
13 #include "extensions/browser/extension_registry.h" | 13 #include "extensions/browser/extension_registry.h" |
14 #include "extensions/common/extension.h" | 14 #include "extensions/common/extension.h" |
15 | 15 |
16 HostedAppsCounter::HostedAppsCounter(Profile* profile) | 16 HostedAppsCounter::HostedAppsCounter(Profile* profile) |
17 : BrowsingDataCounter(prefs::kDeleteHostedAppsData), profile_(profile) {} | 17 : BrowsingDataCounter(browsing_data::prefs::kDeleteHostedAppsData), |
| 18 profile_(profile) {} |
18 | 19 |
19 HostedAppsCounter::~HostedAppsCounter() {} | 20 HostedAppsCounter::~HostedAppsCounter() {} |
20 | 21 |
21 void HostedAppsCounter::Count() { | 22 void HostedAppsCounter::Count() { |
22 int count = 0; | 23 int count = 0; |
23 std::vector<std::string> names; | 24 std::vector<std::string> names; |
24 | 25 |
25 std::unique_ptr<extensions::ExtensionSet> extensions = | 26 std::unique_ptr<extensions::ExtensionSet> extensions = |
26 extensions::ExtensionRegistry::Get(profile_) | 27 extensions::ExtensionRegistry::Get(profile_) |
27 ->GenerateInstalledExtensionsSet(); | 28 ->GenerateInstalledExtensionsSet(); |
(...skipping 14 matching lines...) Expand all Loading... |
42 | 43 |
43 // HostedAppsCounter::HostedAppsResult ----------------------------------------- | 44 // HostedAppsCounter::HostedAppsResult ----------------------------------------- |
44 | 45 |
45 HostedAppsCounter::HostedAppsResult::HostedAppsResult( | 46 HostedAppsCounter::HostedAppsResult::HostedAppsResult( |
46 const HostedAppsCounter* source, | 47 const HostedAppsCounter* source, |
47 ResultInt num_apps, | 48 ResultInt num_apps, |
48 const std::vector<std::string>& examples) | 49 const std::vector<std::string>& examples) |
49 : FinishedResult(source, num_apps), examples_(examples) {} | 50 : FinishedResult(source, num_apps), examples_(examples) {} |
50 | 51 |
51 HostedAppsCounter::HostedAppsResult::~HostedAppsResult() {} | 52 HostedAppsCounter::HostedAppsResult::~HostedAppsResult() {} |
OLD | NEW |