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

Side by Side Diff: components/browsing_data/core/counters/autofill_counter.h

Issue 2403773002: Remove stl_util's STLDeleteContainerPointers from autofill. (Closed)
Patch Set: rebase Created 4 years, 2 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 COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_ 5 #ifndef COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_
6 #define COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_ 6 #define COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // only predefined time periods, out of which the lowest one is one hour. 58 // only predefined time periods, out of which the lowest one is one hour.
59 // Obviously, the test cannot run that long. 59 // Obviously, the test cannot run that long.
60 // TODO(msramek): Consider changing BrowsingDataCounter to use arbitrary 60 // TODO(msramek): Consider changing BrowsingDataCounter to use arbitrary
61 // time periods instead of BrowsingDataRemover::TimePeriod. 61 // time periods instead of BrowsingDataRemover::TimePeriod.
62 void SetPeriodStartForTesting(const base::Time& period_start_for_testing); 62 void SetPeriodStartForTesting(const base::Time& period_start_for_testing);
63 63
64 private: 64 private:
65 void Count() override; 65 void Count() override;
66 66
67 // WebDataServiceConsumer implementation. 67 // WebDataServiceConsumer implementation.
68 void OnWebDataServiceRequestDone(WebDataServiceBase::Handle handle, 68 void OnWebDataServiceRequestDone(
69 const WDTypedResult* result) override; 69 WebDataServiceBase::Handle handle,
70 std::unique_ptr<WDTypedResult> result) override;
70 71
71 // Cancel all pending requests to AutofillWebdataService. 72 // Cancel all pending requests to AutofillWebdataService.
72 void CancelAllRequests(); 73 void CancelAllRequests();
73 74
74 base::ThreadChecker thread_checker_; 75 base::ThreadChecker thread_checker_;
75 76
76 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; 77 scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
77 78
78 WebDataServiceBase::Handle suggestions_query_; 79 WebDataServiceBase::Handle suggestions_query_;
79 WebDataServiceBase::Handle credit_cards_query_; 80 WebDataServiceBase::Handle credit_cards_query_;
80 WebDataServiceBase::Handle addresses_query_; 81 WebDataServiceBase::Handle addresses_query_;
81 82
82 ResultInt num_suggestions_; 83 ResultInt num_suggestions_;
83 ResultInt num_credit_cards_; 84 ResultInt num_credit_cards_;
84 ResultInt num_addresses_; 85 ResultInt num_addresses_;
85 86
86 base::Time period_start_for_testing_; 87 base::Time period_start_for_testing_;
87 88
88 DISALLOW_COPY_AND_ASSIGN(AutofillCounter); 89 DISALLOW_COPY_AND_ASSIGN(AutofillCounter);
89 }; 90 };
90 91
91 } // namespace browsing_data 92 } // namespace browsing_data
92 93
93 #endif // COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_ 94 #endif // COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698