| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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 #include "services/sky/runtime_flags.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "mojo/public/cpp/application/application_impl.h" | |
| 9 | |
| 10 namespace sky { | |
| 11 namespace { | |
| 12 | |
| 13 bool initialized = false; | |
| 14 RuntimeFlags flags; | |
| 15 | |
| 16 // Load the viewer in testing mode so we can dump pixels. | |
| 17 const char kTesting[] = "--testing"; | |
| 18 | |
| 19 } // namespace | |
| 20 | |
| 21 void RuntimeFlags::Initialize(mojo::ApplicationImpl* app) { | |
| 22 DCHECK(!initialized); | |
| 23 flags.testing_ = app->HasArg(kTesting); | |
| 24 initialized = true; | |
| 25 } | |
| 26 | |
| 27 const RuntimeFlags& RuntimeFlags::Get() { | |
| 28 DCHECK(initialized); | |
| 29 return flags; | |
| 30 } | |
| 31 | |
| 32 } // namespace sky | |
| OLD | NEW |