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

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

Issue 2354443002: Implement PluginsPermissionContext and hookup to flash download interception. (Closed)
Patch Set: Implement PluginsPermissionContext and hookup to flash download interception. 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // Get/set the last time this origin recorded an engagement change. 147 // Get/set the last time this origin recorded an engagement change.
148 base::Time last_engagement_time() const { 148 base::Time last_engagement_time() const {
149 return last_engagement_time_; 149 return last_engagement_time_;
150 } 150 }
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, PartiallyEmptyDictionary); 157 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PartiallyEmptyDictionary);
157 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PopulatedDictionary); 158 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, PopulatedDictionary);
158 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, Reset); 159 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, Reset);
159 FRIEND_TEST_ALL_PREFIXES(SiteEngagementScoreTest, FirstDailyEngagementBonus); 160 friend class ChromePluginServiceFilterTest;
161 friend class FlashPermissionTestConfig;
160 friend class ImportantSitesUtilTest; 162 friend class ImportantSitesUtilTest;
161 friend class SiteEngagementHelperTest; 163 friend class SiteEngagementHelperTest;
162 friend class SiteEngagementScoreTest; 164 friend class SiteEngagementScoreTest;
163 friend class SiteEngagementServiceTest; 165 friend class SiteEngagementServiceTest;
164 friend class ChromePluginServiceFilterTest;
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();
171 172
172 // Keys used in the content settings dictionary. 173 // Keys used in the content settings dictionary.
173 static const char* kRawScoreKey; 174 static const char* kRawScoreKey;
174 static const char* kPointsAddedTodayKey; 175 static const char* kPointsAddedTodayKey;
(...skipping 45 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698