1 // 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 
5 #ifndef SERVICES_SERVICE_MANAGER_EMBEDDER_SHARED_FILE_UTIL_H_
6 #define SERVICES_SERVICE_MANAGER_EMBEDDER_SHARED_FILE_UTIL_H_
7 
8 #include <map>
9 #include <string>
10 
11 #include "base/command_line.h"
12 #include "base/component_export.h"
13 #include "base/optional.h"
14 
15 namespace service_manager {
16 
COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER)17 class COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER)
18     SharedFileSwitchValueBuilder final {
19  public:
20   void AddEntry(const std::string& key_str, int key_id);
21   const std::string& switch_value() const { return switch_value_; }
22 
23  private:
24   std::string switch_value_;
25 };
26 
27 COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER)
28 base::Optional<std::map<int, std::string>> ParseSharedFileSwitchValue(
29     const std::string& value);
30 
31 }  // namespace service_manager
32 
33 #endif  // SERVICES_SERVICE_MANAGER_EMBEDDER_SHARED_FILE_UTIL_H_
34