OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/apps_client.h" | |
6 | |
5 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
tapted
2013/09/04 01:08:35
nit: I don't think this is used for anything
benwells
2013/09/10 16:48:50
Surprisingly I get this error without it:
../../ap
tapted
2013/09/10 20:46:09
Ah drat. nullptr can not come soon enough..
| |
6 #include "extensions/common/extensions_client.h" | |
7 | 8 |
8 namespace extensions { | 9 namespace apps { |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 ExtensionsClient* g_client = NULL; | 13 AppsClient* g_client = NULL; |
13 | |
14 void Initialize(ExtensionsClient* client) { | |
15 client->RegisterManifestHandlers(); | |
16 } | |
17 | 14 |
18 } // namespace | 15 } // namespace |
19 | 16 |
20 ExtensionsClient* ExtensionsClient::Get() { | 17 AppsClient* AppsClient::Get() { |
21 return g_client; | 18 return g_client; |
22 } | 19 } |
23 | 20 |
24 void ExtensionsClient::Set(ExtensionsClient* client) { | 21 void AppsClient::Set(AppsClient* client) { |
25 // 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. |
26 if (g_client) | 23 if (g_client) |
27 return; | 24 return; |
tapted
2013/09/04 01:08:35
nit: blank line after early return?
benwells
2013/09/10 16:48:50
I mainly do that to break up slightly longer block
| |
28 g_client = client; | 25 g_client = client; |
29 Initialize(g_client); | |
30 } | 26 } |
31 | 27 |
32 } // namespace extensions | 28 } // namespace apps |
OLD | NEW |