[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / printing / metafile_agent.cc
1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "printing/metafile_agent.h"
6
7 #include <string>
8
9 #include "base/no_destructor.h"
10
11 namespace printing {
12
13 namespace {
14
15 std::string& GetAgentImpl() {
16   static base::NoDestructor<std::string> instance;
17   return *instance;
18 }
19
20 }  // namespace
21
22 void SetAgent(const std::string& user_agent) {
23   GetAgentImpl() = user_agent;
24 }
25
26 const std::string& GetAgent() {
27   return GetAgentImpl();
28 }
29
30 }  // namespace printing