category_status.cc 714 B

123456789101112131415161718192021
  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
  3. // found in the LICENSE file.
  4. #include "components/ntp_snippets/category_status.h"
  5. namespace ntp_snippets {
  6. bool IsCategoryStatusAvailable(CategoryStatus status) {
  7. // Note: This code is duplicated in SnippetsBridge.java.
  8. return status == CategoryStatus::AVAILABLE_LOADING ||
  9. status == CategoryStatus::AVAILABLE;
  10. }
  11. bool IsCategoryStatusInitOrAvailable(CategoryStatus status) {
  12. // Note: This code is duplicated in SnippetsBridge.java.
  13. return status == CategoryStatus::INITIALIZING ||
  14. IsCategoryStatusAvailable(status);
  15. }
  16. } // namespace ntp_snippets