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

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

Issue 2393103002: [Durable] Updated Durable heuristic to use 'important sites' (Closed)
Patch Set: 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 DurableStoragePermissionContextTest;
161 friend class FlashPermissionBrowserTest; 162 friend class FlashPermissionBrowserTest;
162 friend class ImportantSitesUtilTest; 163 friend class ImportantSitesUtilTest;
163 friend class SiteEngagementHelperTest; 164 friend class SiteEngagementHelperTest;
164 friend class SiteEngagementScoreTest; 165 friend class SiteEngagementScoreTest;
165 friend class SiteEngagementServiceTest; 166 friend class SiteEngagementServiceTest;
166 167
167 using ParamValues = std::array<std::pair<std::string, double>, MAX_VARIATION>; 168 using ParamValues = std::array<std::pair<std::string, double>, MAX_VARIATION>;
168 169
169 // Array holding the values corresponding to each item in Variation array. 170 // Array holding the values corresponding to each item in Variation array.
170 static ParamValues& GetParamValues(); 171 static ParamValues& GetParamValues();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // The origin this score represents. 222 // The origin this score represents.
222 GURL origin_; 223 GURL origin_;
223 224
224 // The settings to write this score to when Commit() is called. 225 // The settings to write this score to when Commit() is called.
225 HostContentSettingsMap* settings_map_; 226 HostContentSettingsMap* settings_map_;
226 227
227 DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore); 228 DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore);
228 }; 229 };
229 230
230 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_ 231 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SCORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698