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.
5 #include "device/udev_linux/udev_loader.h"
7 #include "base/logging.h"
8 #include "device/udev_linux/udev0_loader.h"
9 #include "device/udev_linux/udev1_loader.h"
15 UdevLoader
* g_udev_loader
= NULL
;
20 UdevLoader
* UdevLoader::Get() {
24 scoped_ptr
<UdevLoader
> udev_loader
;
25 udev_loader
.reset(new Udev1Loader
);
26 if (udev_loader
->Init()) {
27 g_udev_loader
= udev_loader
.release();
31 udev_loader
.reset(new Udev0Loader
);
32 if (udev_loader
->Init()) {
33 g_udev_loader
= udev_loader
.release();
40 UdevLoader::~UdevLoader() {