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

Side by Side Diff: chrome/browser/apps/chrome_apps_client.cc

Issue 23524005: Introduce AppsClient and use it in apps to get the loaded profiles list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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
(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 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/chrome_apps_client.h ('k') | chrome/browser/apps/web_view_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698