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

Side by Side Diff: chrome/browser/browsing_data/hosted_apps_counter.cc

Issue 2136373003: Move browsing data deletion prefs to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 4 years, 5 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 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
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() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698