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

Side by Side Diff: chrome/browser/chromeos/profiles/avatar_menu_chromeos.cc

Issue 1972033002: Simplify some old avatar menu button code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate ash browser test fix Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/profiles/avatar_menu.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/avatar_menu.h" 5 #include "chrome/browser/profiles/avatar_menu.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/ash/session_util.h" 12 #include "chrome/browser/ui/ash/session_util.h"
13 13
14 #include "ui/gfx/image/image.h" 14 #include "ui/gfx/image/image.h"
15 15
16 // static 16 // static
17 void AvatarMenu::GetImageForMenuButton(const base::FilePath& profile_path, 17 void AvatarMenu::GetImageForMenuButton(const base::FilePath& profile_path,
18 gfx::Image* image, 18 gfx::Image* image) {
19 bool* is_rectangle) {
20 // ChromeOS avatar icon is circular. 19 // ChromeOS avatar icon is circular.
21 *is_rectangle = false;
22 Profile* profile = 20 Profile* profile =
23 g_browser_process->profile_manager()->GetProfileByPath(profile_path); 21 g_browser_process->profile_manager()->GetProfileByPath(profile_path);
24 *image = gfx::Image(GetAvatarImageForContext(profile)); 22 *image = gfx::Image(GetAvatarImageForContext(profile));
25 } 23 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/avatar_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698