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

Side by Side Diff: components/password_manager/core/browser/facet_manager.h

Issue 1072413003: Add foundation for trimming the AffiliationDatabase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep noncontroversial parts. Created 5 years, 7 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_PASSWORD_MANAGER_CORE_BROWSER_FACET_MANAGER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FACET_MANAGER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FACET_MANAGER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FACET_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void OnFetchSucceeded(const AffiliatedFacetsWithUpdateTime& affiliation); 51 void OnFetchSucceeded(const AffiliatedFacetsWithUpdateTime& affiliation);
52 52
53 // Called by the backend when the time specified in RequestNotificationAtTime 53 // Called by the backend when the time specified in RequestNotificationAtTime
54 // has come to pass, so that |this| can perform delayed administrative tasks. 54 // has come to pass, so that |this| can perform delayed administrative tasks.
55 void NotifyAtRequestedTime(); 55 void NotifyAtRequestedTime();
56 56
57 // Returns whether this instance has becomes redundant, that is, it has no 57 // Returns whether this instance has becomes redundant, that is, it has no
58 // more meaningful state than a newly created instance would have. 58 // more meaningful state than a newly created instance would have.
59 bool CanBeDiscarded() const; 59 bool CanBeDiscarded() const;
60 60
61 // Returns whether or not cached data for this facet can be discarded without
62 // harm when trimming the database.
63 bool CanCachedDataBeDiscarded() const;
64
61 // Returns whether or not affiliation information relating to this facet needs 65 // Returns whether or not affiliation information relating to this facet needs
62 // to be fetched right now. 66 // to be fetched right now.
63 bool DoesRequireFetch() const; 67 bool DoesRequireFetch() const;
64 68
65 // The members below are made public for the sake of tests. 69 // The members below are made public for the sake of tests.
66 70
67 // Returns whether or not cached data for this facet is fresh (not stale). 71 // Returns whether or not cached data for this facet is fresh (not stale).
68 bool IsCachedDataFresh() const; 72 bool IsCachedDataFresh() const;
69 73
70 // Returns whether or not cached data for this facet is near-stale or stale. 74 // Returns whether or not cached data for this facet is near-stale or stale.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // This is not a single timestamp but rather a multiset so that cancellation 128 // This is not a single timestamp but rather a multiset so that cancellation
125 // of individual prefetches can be supported even if there are two requests 129 // of individual prefetches can be supported even if there are two requests
126 // with the same |keep_fresh_until| threshold. 130 // with the same |keep_fresh_until| threshold.
127 std::multiset<base::Time> keep_fresh_until_thresholds_; 131 std::multiset<base::Time> keep_fresh_until_thresholds_;
128 132
129 DISALLOW_COPY_AND_ASSIGN(FacetManager); 133 DISALLOW_COPY_AND_ASSIGN(FacetManager);
130 }; 134 };
131 135
132 } // namespace password_manager 136 } // namespace password_manager
133 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FACET_MANAGER_H_ 137 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FACET_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698