| 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_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ |
| 6 #define CHROME_BROWSER_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ | 6 #define CHROME_BROWSER_ANDROID_PREFERENCES_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 | 13 |
| 13 class Profile; | 14 class Profile; |
| 14 | 15 |
| 15 class ImportantSitesUtil { | 16 class ImportantSitesUtil { |
| 16 public: | 17 public: |
| 17 // This returns the top |<=max_results| important registerable | 18 // This returns the top |<=max_results| important registerable |
| 18 // domains. This uses site engagement and notifications to generate the list. | 19 // domains. This uses site engagement and notifications to generate the list. |
| 19 // |max_results| is assumed to be small. | 20 // |max_results| is assumed to be small. |
| 20 // See net/base/registry_controlled_domains/registry_controlled_domain.h for | 21 // See net/base/registry_controlled_domains/registry_controlled_domain.h for |
| 21 // more details on registrable domains and the current list of effective | 22 // more details on registrable domains and the current list of effective |
| 22 // eTLDs. | 23 // eTLDs. |
| 23 static std::vector<std::string> GetImportantRegisterableDomains( | 24 static std::vector<std::string> GetImportantRegisterableDomains( |
| 24 Profile* profile, | 25 Profile* profile, |
| 25 size_t max_results); | 26 size_t max_results); |
| 26 | 27 |
| 28 // This marks the given origin as important so we can test features that rely |
| 29 // on important sites. |
| 30 static void MarkOriginAsImportantForTesting(Profile* profile, |
| 31 const GURL& origin); |
| 32 |
| 27 private: | 33 private: |
| 28 DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil); | 34 DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil); |
| 29 }; | 35 }; |
| 30 | 36 |
| 31 #endif // CHROME_BROWSER_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ | 37 #endif // CHROME_BROWSER_ANDROID_PREFERENCES_IMPORTANT_SITES_UTIL_H_ |
| OLD | NEW |