OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "extensions/browser/app_window/app_window_client.h" | 5 #include "extensions/browser/app_window/app_window_client.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 | 8 |
9 namespace extensions { | 9 namespace extensions { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 AppWindowClient* g_client = NULL; | 13 AppWindowClient* g_client = nullptr; |
14 | 14 |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 AppWindowClient* AppWindowClient::Get() { | 17 AppWindowClient* AppWindowClient::Get() { |
18 return g_client; | 18 return g_client; |
19 } | 19 } |
20 | 20 |
21 void AppWindowClient::Set(AppWindowClient* client) { | 21 void AppWindowClient::Set(AppWindowClient* client) { |
22 // This can happen in unit tests, where the utility thread runs in-process. | 22 // This can happen in unit tests, where the utility thread runs in-process. |
23 if (g_client) | 23 if (g_client) |
24 return; | 24 return; |
25 | 25 |
26 g_client = client; | 26 g_client = client; |
27 } | 27 } |
28 | 28 |
29 } // namespace extensions | 29 } // namespace extensions |
OLD | NEW |