| OLD | NEW |
| 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_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ | 5 #ifndef CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_ |
| 6 #define CHROME_BROWSER_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ | 6 #define CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 | 15 |
| 16 class ImportantSitesUtil { | 16 class ImportantSitesUtil { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 // This records metrics for blacklisted and ignored sites and removes any | 38 // This records metrics for blacklisted and ignored sites and removes any |
| 39 // 'ignored' sites from our important sites list if they were ignored 3 times | 39 // 'ignored' sites from our important sites list if they were ignored 3 times |
| 40 // in a row. | 40 // in a row. |
| 41 static void RecordBlacklistedAndIgnoredImportantSites( | 41 static void RecordBlacklistedAndIgnoredImportantSites( |
| 42 Profile* profile, | 42 Profile* profile, |
| 43 const std::vector<std::string>& blacklisted_sites, | 43 const std::vector<std::string>& blacklisted_sites, |
| 44 const std::vector<int32_t>& blacklisted_sites_reason_bitfield, | 44 const std::vector<int32_t>& blacklisted_sites_reason_bitfield, |
| 45 const std::vector<std::string>& ignored_sites, | 45 const std::vector<std::string>& ignored_sites, |
| 46 const std::vector<int32_t>& ignored_sites_reason_bitfield); | 46 const std::vector<int32_t>& ignored_sites_reason_bitfield); |
| 47 | 47 |
| 48 // This marks the given origin as important for testing. | 48 // This marks the given origin as important for testing. Requires calling |
| 49 // SiteEngagementScore::SetParamValuesForTesting(). |
| 49 static void MarkOriginAsImportantForTesting(Profile* profile, | 50 static void MarkOriginAsImportantForTesting(Profile* profile, |
| 50 const GURL& origin); | 51 const GURL& origin); |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil); | 54 DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 #endif // CHROME_BROWSER_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ | 57 #endif // CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_ |
| OLD | NEW |