Adam Barth 6b0e5e85a4 Finish removing //flutter/tonic (flutter/engine#2917)
This pulled a refactoring of how we keep track of the primary threads.
2016-08-12 12:05:48 -07: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/ftl/logging.h"
namespace blink {
namespace {
Settings* g_settings = nullptr;
} // namespace
const Settings& Settings::Get() {
FTL_CHECK(g_settings);
return *g_settings;
}
void Settings::Set(const Settings& settings) {
FTL_CHECK(!g_settings);
g_settings = new Settings();
*g_settings = settings;
}
} // namespace blink