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

Side by Side Diff: extensions/common/extensions_client.cc

Issue 149163002: app_shell: Add ShellContentRendererClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (content_renderer_client) Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « apps/shell/shell_main_delegate.cc ('k') | extensions/common/permissions/api_permission.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/logging.h"
6 #include "extensions/common/extensions_client.h" 7 #include "extensions/common/extensions_client.h"
7 8
8 namespace extensions { 9 namespace extensions {
9 10
10 namespace { 11 namespace {
11 12
12 ExtensionsClient* g_client = NULL; 13 ExtensionsClient* g_client = NULL;
13 14
14 } // namespace 15 } // namespace
15 16
16 ExtensionsClient* ExtensionsClient::Get() { 17 ExtensionsClient* ExtensionsClient::Get() {
18 DCHECK(g_client);
17 return g_client; 19 return g_client;
18 } 20 }
19 21
20 void ExtensionsClient::Set(ExtensionsClient* client) { 22 void ExtensionsClient::Set(ExtensionsClient* client) {
21 // This can happen in unit tests, where the utility thread runs in-process. 23 // This can happen in unit tests, where the utility thread runs in-process.
22 if (g_client) 24 if (g_client)
23 return; 25 return;
24 g_client = client; 26 g_client = client;
25 g_client->Initialize(); 27 g_client->Initialize();
26 } 28 }
27 29
28 } // namespace extensions 30 } // namespace extensions
OLDNEW
« no previous file with comments | « apps/shell/shell_main_delegate.cc ('k') | extensions/common/permissions/api_permission.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698