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

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

Issue 2623033003: Always show counters in the material design Clear Browsing Data dialog. (Closed)
Patch Set: iOS fix #2 Created 3 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 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 28 matching lines...) Expand all
39 DISALLOW_COPY_AND_ASSIGN(AutofillResult); 39 DISALLOW_COPY_AND_ASSIGN(AutofillResult);
40 }; 40 };
41 41
42 explicit AutofillCounter( 42 explicit AutofillCounter(
43 scoped_refptr<autofill::AutofillWebDataService> web_data_service); 43 scoped_refptr<autofill::AutofillWebDataService> web_data_service);
44 ~AutofillCounter() override; 44 ~AutofillCounter() override;
45 45
46 // BrowsingDataCounter implementation. 46 // BrowsingDataCounter implementation.
47 void OnInitialized() override; 47 void OnInitialized() override;
48 48
49 // Whether the counting is in progress.
50 bool HasPendingQuery() {
51 return suggestions_query_ || credit_cards_query_ || addresses_query_;
52 }
53
54 const char* GetPrefName() const override; 49 const char* GetPrefName() const override;
55 50
56 // Set the beginning of the time period for testing. AutofillTable does not 51 // Set the beginning of the time period for testing. AutofillTable does not
57 // allow us to set time explicitly, and BrowsingDataCounter recognizes 52 // allow us to set time explicitly, and BrowsingDataCounter recognizes
58 // only predefined time periods, out of which the lowest one is one hour. 53 // only predefined time periods, out of which the lowest one is one hour.
59 // Obviously, the test cannot run that long. 54 // Obviously, the test cannot run that long.
60 // TODO(msramek): Consider changing BrowsingDataCounter to use arbitrary 55 // TODO(msramek): Consider changing BrowsingDataCounter to use arbitrary
61 // time periods instead of BrowsingDataRemover::TimePeriod. 56 // time periods instead of BrowsingDataRemover::TimePeriod.
62 void SetPeriodStartForTesting(const base::Time& period_start_for_testing); 57 void SetPeriodStartForTesting(const base::Time& period_start_for_testing);
63 58
(...skipping 21 matching lines...) Expand all
85 ResultInt num_addresses_; 80 ResultInt num_addresses_;
86 81
87 base::Time period_start_for_testing_; 82 base::Time period_start_for_testing_;
88 83
89 DISALLOW_COPY_AND_ASSIGN(AutofillCounter); 84 DISALLOW_COPY_AND_ASSIGN(AutofillCounter);
90 }; 85 };
91 86
92 } // namespace browsing_data 87 } // namespace browsing_data
93 88
94 #endif // COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_ 89 #endif // COMPONENTS_BROWSING_DATA_CORE_COUNTERS_AUTOFILL_COUNTER_H_
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/privacy_page_test.js ('k') | components/browsing_data/core/counters/autofill_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698