blob: 8bd24c54e47dfc6f21962009e3f30dc319f3b289 [file] [log] [blame]
rockot60d92c22017-03-21 06:35:231// Copyright 2017 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
Ken Rockot30f6a4a2020-09-17 08:34:015#ifndef CONTENT_COMMON_SHARED_FILE_UTIL_H_
6#define CONTENT_COMMON_SHARED_FILE_UTIL_H_
rockot60d92c22017-03-21 06:35:237
8#include <map>
9#include <string>
10
11#include "base/command_line.h"
Henrique Nakashima78c1ce132018-12-12 19:16:3212#include "base/component_export.h"
Anton Bikineevf62d1bf2021-05-15 17:56:0713#include "third_party/abseil-cpp/absl/types/optional.h"
rockot60d92c22017-03-21 06:35:2314
Ken Rockot30f6a4a2020-09-17 08:34:0115namespace content {
rockot60d92c22017-03-21 06:35:2316
Lei Zhanged9be3a2021-11-17 22:01:1817class SharedFileSwitchValueBuilder final {
rockot60d92c22017-03-21 06:35:2318 public:
19 void AddEntry(const std::string& key_str, int key_id);
20 const std::string& switch_value() const { return switch_value_; }
21
22 private:
23 std::string switch_value_;
24};
25
Anton Bikineevf62d1bf2021-05-15 17:56:0726absl::optional<std::map<int, std::string>> ParseSharedFileSwitchValue(
Henrique Nakashima78c1ce132018-12-12 19:16:3227 const std::string& value);
rockot60d92c22017-03-21 06:35:2328
Ken Rockot30f6a4a2020-09-17 08:34:0129} // namespace content
rockot60d92c22017-03-21 06:35:2330
Ken Rockot30f6a4a2020-09-17 08:34:0131#endif // CONTENT_COMMON_SHARED_FILE_UTIL_H_