Files.app: Dispatch 'drive-connection-changed' event on initialization of VolumeManag...
[chromium-blink-merge.git] / extensions / common / extensions_client.cc
blob89d420b0f63a2fd4b9d2d7017eca6200064b4c3a
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
3 // found in the LICENSE file.
5 #include "extensions/common/extensions_client.h"
7 #include "base/basictypes.h"
8 #include "base/logging.h"
9 #include "extensions/common/extension_icon_set.h"
10 #include "extensions/common/manifest_handlers/icons_handler.h"
12 namespace extensions {
14 namespace {
16 ExtensionsClient* g_client = NULL;
18 } // namespace
20 ExtensionsClient* ExtensionsClient::Get() {
21 DCHECK(g_client);
22 return g_client;
25 std::set<base::FilePath> ExtensionsClient::GetBrowserImagePaths(
26 const Extension* extension) {
27 std::set<base::FilePath> paths;
28 extensions::IconsInfo::GetIcons(extension).GetPaths(&paths);
29 return paths;
32 void ExtensionsClient::Set(ExtensionsClient* client) {
33 // This can happen in unit tests, where the utility thread runs in-process.
34 if (g_client)
35 return;
36 g_client = client;
37 g_client->Initialize();
40 } // namespace extensions