flutter_flutter/common/settings.cc
Vyacheslav Egorov 723c7d0143
Revert "Re-land "Support multiple shells in a single process. (#4932)" (#4977)" (#4981)
This reverts commit a3327bff86800b3e654a2988fa7e6049edeb679c.
2018-04-12 18:28:55 +02:00

30 lines
573 B
C++

// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/common/settings.h"
#include <memory>
#include "lib/fxl/logging.h"
namespace blink {
namespace {
Settings* g_settings = nullptr;
} // namespace
const Settings& Settings::Get() {
FXL_CHECK(g_settings);
return *g_settings;
}
void Settings::Set(const Settings& settings) {
FXL_CHECK(!g_settings);
g_settings = new Settings();
*g_settings = settings;
}
} // namespace blink