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

Side by Side Diff: chrome/browser/engagement/site_engagement_score.h

Issue 2393103002: [Durable] Updated Durable heuristic to use 'important sites' (Closed)
Patch Set: windows test fix 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 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 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
7 7
8 #include <array> 8 #include <array>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void set_last_engagement_time(const base::Time& time) { 151 void set_last_engagement_time(const base::Time& time) {
152 last_engagement_time_ = time; 152 last_engagement_time_ = time;
153 } 153 }
154 154
155 private: 155 private:
156 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, FirstDailyEngagementBonus); 156 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, FirstDailyEngagementBonus);
157 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PartiallyEmptyDictionary); 157 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PartiallyEmptyDictionary);
158 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PopulatedDictionary); 158 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PopulatedDictionary);
159 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, Reset); 159 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, Reset);
160 friend class ChromePluginServiceFilterTest; 160 friend class ChromePluginServiceFilterTest;
161 friend class ImportantSitesUtil;
161 friend class ImportantSitesUtilTest; 162 friend class ImportantSitesUtilTest;
162 friend class SiteEngagementHelperTest; 163 friend class SiteEngagementHelperTest;
163 friend class SiteEngagementScoreTest; 164 friend class SiteEngagementScoreTest;
164 friend class SiteEngagementServiceTest; 165 friend class SiteEngagementServiceTest;
165 166
166 using ParamValues = std::array<std::pair<std::string, double>, MAX_VARIATION>; 167 using ParamValues = std::array<std::pair<std::string, double>, MAX_VARIATION>;
167 168
168 // Array holding the values corresponding to each item in Variation array. 169 // Array holding the values corresponding to each item in Variation array.
169 static ParamValues& GetParamValues(); 170 static ParamValues& GetParamValues();
170 static ParamValues BuildParamValues(); 171 static ParamValues BuildParamValues();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // The origin this score represents. 221 // The origin this score represents.
221 GURL origin_; 222 GURL origin_;
222 223
223 // The settings to write this score to when Commit() is called. 224 // The settings to write this score to when Commit() is called.
224 HostContentSettingsMap* settings_map_; 225 HostContentSettingsMap* settings_map_;
225 226
226 DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore); 227 DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore);
227 }; 228 };
228 229
229 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 230 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698