OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "chrome/browser/apps/chrome_apps_client.h" |
| 6 |
| 7 #include "base/memory/singleton.h" |
| 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/profiles/profile_manager.h" |
| 10 |
| 11 ChromeAppsClient::ChromeAppsClient() {} |
| 12 |
| 13 ChromeAppsClient::~ChromeAppsClient() {} |
| 14 |
| 15 // static |
| 16 ChromeAppsClient* ChromeAppsClient::GetInstance() { |
| 17 return Singleton<ChromeAppsClient, |
| 18 LeakySingletonTraits<ChromeAppsClient> >::get(); |
| 19 } |
| 20 |
| 21 std::vector<content::BrowserContext*> |
| 22 ChromeAppsClient::GetLoadedBrowserContexts() { |
| 23 std::vector<Profile*> profiles = |
| 24 g_browser_process->profile_manager()->GetLoadedProfiles(); |
| 25 return std::vector<content::BrowserContext*>(profiles.begin(), |
| 26 profiles.end()); |
| 27 } |
OLD | NEW |