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

Side by Side Diff: third_party/WebKit/Source/core/WebFactory.cpp

Issue 2887523003: Introduced WebFactory and WebFactoryImpl for constructing web/ classes (Closed)
Patch Set: Removed file from wrong branch Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698