webapps_client.cc 554 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2020 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. #include "components/webapps/browser/webapps_client.h"
  5. namespace webapps {
  6. namespace {
  7. WebappsClient* g_instance = nullptr;
  8. }
  9. WebappsClient::WebappsClient() {
  10. DCHECK(!g_instance);
  11. g_instance = this;
  12. }
  13. WebappsClient::~WebappsClient() {
  14. DCHECK(g_instance);
  15. g_instance = nullptr;
  16. }
  17. // static
  18. WebappsClient* WebappsClient::Get() {
  19. return g_instance;
  20. }
  21. } // namespace webapps