optimization_guide_permissions_util.h 858 B

1234567891011121314151617181920212223
  1. // Copyright 2019 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. #ifndef COMPONENTS_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_PERMISSIONS_UTIL_H_
  5. #define COMPONENTS_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_PERMISSIONS_UTIL_H_
  6. class PrefService;
  7. namespace optimization_guide {
  8. // Returns true if the user, as represented by |profile| is permitted to make
  9. // calls to the remote Optimization Guide Service.
  10. //
  11. // Note that this does not include the additional enterprise policy check that
  12. // gates model downloads.
  13. bool IsUserPermittedToFetchFromRemoteOptimizationGuide(
  14. bool is_off_the_record,
  15. PrefService* pref_service);
  16. } // namespace optimization_guide
  17. #endif // COMPONENTS_OPTIMIZATION_GUIDE_CORE_OPTIMIZATION_GUIDE_PERMISSIONS_UTIL_H_