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: extensions/common/extensions_client.cc

Issue 27446002: Move permission warning message handling from PermissionSet to PermissionMessageProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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
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 "extensions/common/extensions_client.h" 6 #include "extensions/common/extensions_client.h"
7 7
8 namespace extensions { 8 namespace extensions {
9 9
10 namespace { 10 namespace {
11 11
12 ExtensionsClient* g_client = NULL; 12 ExtensionsClient* g_client = NULL;
13 13
14 void Initialize(ExtensionsClient* client) {
15 client->RegisterManifestHandlers();
16 }
17
18 } // namespace 14 } // namespace
19 15
20 ExtensionsClient* ExtensionsClient::Get() { 16 ExtensionsClient* ExtensionsClient::Get() {
21 return g_client; 17 return g_client;
22 } 18 }
23 19
24 void ExtensionsClient::Set(ExtensionsClient* client) { 20 void ExtensionsClient::Set(ExtensionsClient* client) {
25 // This can happen in unit tests, where the utility thread runs in-process. 21 // This can happen in unit tests, where the utility thread runs in-process.
26 if (g_client) 22 if (g_client)
27 return; 23 return;
28 g_client = client; 24 g_client = client;
29 Initialize(g_client); 25 g_client->Initialize();
30 } 26 }
31 27
32 } // namespace extensions 28 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extensions_client.h ('k') | extensions/common/permissions/permission_message_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698