gpu_info_util.cc 865 B

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 "ui/display/util/gpu_info_util.h"
  5. #include "base/strings/string_piece.h"
  6. #include "base/values.h"
  7. namespace display {
  8. base::Value BuildGpuInfoEntry(base::StringPiece description,
  9. base::StringPiece value) {
  10. base::Value dict(base::Value::Type::DICTIONARY);
  11. dict.SetStringKey("description", description);
  12. dict.SetStringKey("value", value);
  13. return dict;
  14. }
  15. base::Value BuildGpuInfoEntry(base::StringPiece description,
  16. base::Value value) {
  17. base::Value dict(base::Value::Type::DICTIONARY);
  18. dict.SetStringKey("description", description);
  19. dict.SetKey("value", std::move(value));
  20. return dict;
  21. }
  22. } // namespace display