Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: services/sky/runtime_flags.cc

Issue 1235093002: Move sky_viewer into services/sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: again Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/sky/runtime_flags.h ('k') | services/sky/viewer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/viewer/runtime_flags.h" 5 #include "services/sky/runtime_flags.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 9
10 namespace sky { 10 namespace sky {
11 namespace { 11 namespace {
12 12
13 bool initialized = false; 13 bool initialized = false;
14 RuntimeFlags flags; 14 RuntimeFlags flags;
15 15
16 // Load the viewer in testing mode so we can dump pixels. 16 // Load the viewer in testing mode so we can dump pixels.
17 const char kTesting[] = "--testing"; 17 const char kTesting[] = "--testing";
18 18
19 } // namespace 19 } // namespace
20 20
21 void RuntimeFlags::Initialize(mojo::ApplicationImpl* app) { 21 void RuntimeFlags::Initialize(mojo::ApplicationImpl* app) {
22 DCHECK(!initialized); 22 DCHECK(!initialized);
23 flags.testing_ = app->HasArg(kTesting); 23 flags.testing_ = app->HasArg(kTesting);
24 initialized = true; 24 initialized = true;
25 } 25 }
26 26
27 const RuntimeFlags& RuntimeFlags::Get() { 27 const RuntimeFlags& RuntimeFlags::Get() {
28 DCHECK(initialized); 28 DCHECK(initialized);
29 return flags; 29 return flags;
30 } 30 }
31 31
32 } // namespace sky 32 } // namespace sky
OLDNEW
« no previous file with comments | « services/sky/runtime_flags.h ('k') | services/sky/viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698