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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc

Issue 520623002: Remove Files.app's own profile badge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/file_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
index 9bf3259f975dce0b7ead08b7ad51f078e381c6a5..ed0aea07b3a8594478f3e368edf05b2a2318474d 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
@@ -62,7 +62,7 @@ AppWindow* GetCurrentAppWindow(ChromeSyncExtensionFunction* function) {
}
std::vector<linked_ptr<api::file_browser_private::ProfileInfo> >
-GetLoggedInProfileInfoList(content::WebContents* contents) {
+GetLoggedInProfileInfoList() {
DCHECK(user_manager::UserManager::IsInitialized());
const std::vector<Profile*>& profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
@@ -89,18 +89,6 @@ GetLoggedInProfileInfoList(content::WebContents* contents) {
// TODO(hirono): Remove the property from the profile_info.
profile_info->is_current_profile = true;
- // Make an icon URL of the profile.
- if (contents) {
- const gfx::Image& image =
- ash::GetAvatarImageForContext(contents->GetBrowserContext());
- const gfx::ImageSkia& skia = image.AsImageSkia();
- profile_info->profile_image.reset(
- new api::file_browser_private::ImageSet);
- profile_info->profile_image->scale1x_url =
- webui::GetBitmapDataUrl(skia.GetRepresentation(1.0f).sk_bitmap());
- profile_info->profile_image->scale2x_url =
- webui::GetBitmapDataUrl(skia.GetRepresentation(2.0f).sk_bitmap());
- }
result_profiles.push_back(profile_info);
}
@@ -380,7 +368,7 @@ void FileBrowserPrivateRequestWebStoreAccessTokenFunction::OnAccessTokenFetched(
bool FileBrowserPrivateGetProfilesFunction::RunSync() {
const std::vector<linked_ptr<api::file_browser_private::ProfileInfo> >&
- profiles = GetLoggedInProfileInfoList(GetAssociatedWebContents());
+ profiles = GetLoggedInProfileInfoList();
// Obtains the display profile ID.
AppWindow* const app_window = GetCurrentAppWindow(this);
@@ -404,7 +392,7 @@ bool FileBrowserPrivateVisitDesktopFunction::RunSync() {
using api::file_browser_private::VisitDesktop::Params;
const scoped_ptr<Params> params(Params::Create(*args_));
const std::vector<linked_ptr<api::file_browser_private::ProfileInfo> >&
- profiles = GetLoggedInProfileInfoList(GetAssociatedWebContents());
+ profiles = GetLoggedInProfileInfoList();
chrome::MultiUserWindowManager* const window_manager =
chrome::MultiUserWindowManager::GetInstance();
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/file_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698