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

Unified Diff: device/core/device_client.cc

Issue 1314273002: Manage UsbService lifetime in DeviceClient implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/BUILD.gn ('k') | device/device_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/core/device_client.cc
diff --git a/device/core/device_client.cc b/device/core/device_client.cc
index 52021221d9f0fc84130109ba6846a7d3eafd0627..50b015e9ddc636a6a0e525d6e6bc3548a3b537ce 100644
--- a/device/core/device_client.cc
+++ b/device/core/device_client.cc
@@ -10,17 +10,16 @@ namespace device {
namespace {
-DeviceClient* g_instance = NULL;
+DeviceClient* g_instance;
} // namespace
DeviceClient::DeviceClient() {
- DCHECK(!g_instance);
g_instance = this;
}
DeviceClient::~DeviceClient() {
- g_instance = NULL;
+ g_instance = nullptr;
}
/* static */
@@ -32,13 +31,13 @@ DeviceClient* DeviceClient::Get() {
UsbService* DeviceClient::GetUsbService() {
// This should never be called by clients which do not support the USB API.
NOTREACHED();
- return NULL;
+ return nullptr;
}
HidService* DeviceClient::GetHidService() {
// This should never be called by clients which do not support the HID API.
NOTREACHED();
- return NULL;
+ return nullptr;
}
} // namespace device
« no previous file with comments | « device/BUILD.gn ('k') | device/device_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698