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 "chrome/common/extensions/chrome_extensions_client.h" | 5 #include "chrome/common/extensions/chrome_extensions_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 return CHANNEL_BETA; | 87 return CHANNEL_BETA; |
88 case version_info::Channel::STABLE: | 88 case version_info::Channel::STABLE: |
89 return CHANNEL_STABLE; | 89 return CHANNEL_STABLE; |
90 } | 90 } |
91 NOTREACHED() << static_cast<int>(channel); | 91 NOTREACHED() << static_cast<int>(channel); |
92 return CHANNEL_UNKNOWN; | 92 return CHANNEL_UNKNOWN; |
93 } | 93 } |
94 | 94 |
95 } // namespace | 95 } // namespace |
96 | 96 |
97 static base::LazyInstance<ChromeExtensionsClient> g_client = | 97 static base::LazyInstance<ChromeExtensionsClient>::DestructorAtExit g_client = |
98 LAZY_INSTANCE_INITIALIZER; | 98 LAZY_INSTANCE_INITIALIZER; |
99 | 99 |
100 ChromeExtensionsClient::ChromeExtensionsClient() {} | 100 ChromeExtensionsClient::ChromeExtensionsClient() {} |
101 | 101 |
102 ChromeExtensionsClient::~ChromeExtensionsClient() { | 102 ChromeExtensionsClient::~ChromeExtensionsClient() { |
103 } | 103 } |
104 | 104 |
105 void ChromeExtensionsClient::Initialize() { | 105 void ChromeExtensionsClient::Initialize() { |
106 // Registration could already be finalized in unit tests, where the utility | 106 // Registration could already be finalized in unit tests, where the utility |
107 // thread runs in-process. | 107 // thread runs in-process. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 const { | 336 const { |
337 return GetCurrentChannel() == version_info::Channel::UNKNOWN; | 337 return GetCurrentChannel() == version_info::Channel::UNKNOWN; |
338 } | 338 } |
339 | 339 |
340 // static | 340 // static |
341 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 341 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
342 return g_client.Pointer(); | 342 return g_client.Pointer(); |
343 } | 343 } |
344 | 344 |
345 } // namespace extensions | 345 } // namespace extensions |
OLD | NEW |