parser_util.cc 538 B

1234567891011121314151617
  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 "google_apis/common/parser_util.h"
  5. namespace google_apis {
  6. bool IsResourceKindExpected(const base::Value& value,
  7. const std::string& expected_kind) {
  8. if (!value.is_dict())
  9. return false;
  10. const std::string* kind = value.FindStringKey(kApiResponseKindKey);
  11. return kind && *kind == expected_kind;
  12. }
  13. } // namespace google_apis