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

Side by Side Diff: device/udev_linux/udev_loader.cc

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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 | « device/udev_linux/udev_loader.h ('k') | device/udev_linux/udev_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 "device/udev_linux/udev_loader.h"
6
7 #include "base/logging.h"
8 #include "device/udev_linux/udev0_loader.h"
9 #include "device/udev_linux/udev1_loader.h"
10
11 namespace device {
12
13 namespace {
14
15 UdevLoader* g_udev_loader = NULL;
16
17 } // namespace
18
19 // static
20 UdevLoader* UdevLoader::Get() {
21 if (g_udev_loader)
22 return g_udev_loader;
23
24 scoped_ptr<UdevLoader> udev_loader;
25 udev_loader.reset(new Udev1Loader);
26 if (udev_loader->Init()) {
27 g_udev_loader = udev_loader.release();
28 return g_udev_loader;
29 }
30
31 udev_loader.reset(new Udev0Loader);
32 if (udev_loader->Init()) {
33 g_udev_loader = udev_loader.release();
34 return g_udev_loader;
35 }
36 CHECK(false);
37 return NULL;
38 }
39
40 UdevLoader::~UdevLoader() {
41 }
42
43 } // namespace device
OLDNEW
« no previous file with comments | « device/udev_linux/udev_loader.h ('k') | device/udev_linux/udev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698