Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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. | |
| 4 | |
| 5 #include "core/WebFactory.h" | |
| 6 #include "platform/wtf/Assertions.h" | |
| 7 | |
| 8 namespace blink { | |
| 9 | |
| 10 WebFactory* WebFactory::factory_instance_ = nullptr; | |
| 11 | |
| 12 WebFactory& WebFactory::GetInstance() { | |
| 13 DCHECK(factory_instance_); | |
| 14 return *factory_instance_; | |
| 15 } | |
| 16 | |
| 17 void WebFactory::SetInstance(WebFactory* factory) { | |
| 18 DCHECK_EQ(nullptr, factory_instance_); | |
| 19 DCHECK(factory); | |
|
dcheng
2017/05/22 09:16:49
Nit: in Blink, it's more customary to pass never-n
sashab
2017/05/29 04:34:00
Done.
| |
| 20 factory_instance_ = factory; | |
| 21 } | |
| 22 | |
| 23 } // namespace blink | |
| OLD | NEW |