weblayer_user_population_helper.cc 1.0 KB

12345678910111213141516171819202122232425262728
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "weblayer/browser/safe_browsing/weblayer_user_population_helper.h"
  5. #include "components/safe_browsing/core/browser/user_population.h"
  6. #include "weblayer/browser/browser_context_impl.h"
  7. namespace weblayer {
  8. safe_browsing::ChromeUserPopulation GetUserPopulationForBrowserContext(
  9. content::BrowserContext* browser_context) {
  10. auto* browser_context_impl =
  11. static_cast<BrowserContextImpl*>(browser_context);
  12. return safe_browsing::GetUserPopulation(
  13. browser_context_impl->pref_service(),
  14. browser_context_impl->IsOffTheRecord(),
  15. /*is_history_sync_enabled=*/false,
  16. /*is_under_advanced_protection=*/false,
  17. /*browser_policy_connector=*/nullptr,
  18. /*num_profiles=*/absl::optional<size_t>(),
  19. /*num_loaded_profiles=*/absl::optional<size_t>(),
  20. /*num_open_profiles=*/absl::optional<size_t>());
  21. }
  22. } // namespace weblayer