Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / athena / extensions / extensions_delegate.cc
blob97bd0dda01f2df0bdc674b8d6406aa2315fb46af
1 // Copyright 2014 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.
5 #include "athena/extensions/public/extensions_delegate.h"
7 #include "base/logging.h"
9 namespace athena {
10 namespace {
12 ExtensionsDelegate* instance = NULL;
14 } // namespace
16 ExtensionsDelegate::ExtensionsDelegate() {
17 DCHECK(!instance);
18 instance = this;
21 ExtensionsDelegate::~ExtensionsDelegate() {
22 DCHECK(instance);
23 instance = NULL;
26 // static
27 ExtensionsDelegate* ExtensionsDelegate::Get(content::BrowserContext* context) {
28 DCHECK(instance);
29 DCHECK_EQ(context, instance->GetBrowserContext());
30 return instance;
33 // static
34 void ExtensionsDelegate::Shutdown() {
35 DCHECK(instance);
36 delete instance;
39 } // namespace athena