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

Unified Diff: chrome/browser/profiles/avatar_menu_desktop.cc

Issue 660813002: [Win] Add a fast profile switcher to the Windows taskbar item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: commas. commas are important Created 6 years, 1 month 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 | « chrome/browser/profiles/avatar_menu.h ('k') | chrome/browser/profiles/profile_avatar_icon_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu_desktop.cc
diff --git a/chrome/browser/profiles/avatar_menu_desktop.cc b/chrome/browser/profiles/avatar_menu_desktop.cc
deleted file mode 100644
index 89d3d92cec0d4046fdfbf57f0a80e6ae9f71f717..0000000000000000000000000000000000000000
--- a/chrome/browser/profiles/avatar_menu_desktop.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/profiles/avatar_menu.h"
-
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/profiles/profile_avatar_icon_util.h"
-#include "chrome/browser/profiles/profile_info_cache.h"
-#include "chrome/browser/profiles/profile_manager.h"
-#include "ui/base/resource/resource_bundle.h"
-
-// static
-void AvatarMenu::GetImageForMenuButton(Profile* profile,
- gfx::Image* image,
- bool* is_rectangle) {
- ProfileInfoCache& cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
- if (index == std::string::npos) {
- NOTREACHED();
- return;
- }
-
- // If there is a Gaia image available, try to use that.
- if (cache.IsUsingGAIAPictureOfProfileAtIndex(index)) {
- const gfx::Image* gaia_image = cache.GetGAIAPictureOfProfileAtIndex(index);
- if (gaia_image) {
- *image = *gaia_image;
- *is_rectangle = true;
- return;
- }
- }
-
- // Otherwise, use the default resource, not the downloaded high-res one.
- const size_t icon_index = cache.GetAvatarIconIndexOfProfileAtIndex(index);
- const int resource_id =
- profiles::GetDefaultAvatarIconResourceIDAtIndex(icon_index);
- *image = ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
- *is_rectangle = false;
-}
« no previous file with comments | « chrome/browser/profiles/avatar_menu.h ('k') | chrome/browser/profiles/profile_avatar_icon_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698