OLD | NEW |
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_actions_desktop.h" | 5 #include "chrome/browser/profiles/avatar_menu_actions_desktop.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
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" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 if (!settings_browser) { | 42 if (!settings_browser) { |
43 const Browser::CreateParams params(ProfileManager::GetLastUsedProfile(), | 43 const Browser::CreateParams params(ProfileManager::GetLastUsedProfile(), |
44 chrome::GetActiveDesktop()); | 44 chrome::GetActiveDesktop()); |
45 settings_browser = new Browser(params); | 45 settings_browser = new Browser(params); |
46 } | 46 } |
47 chrome::ShowSettingsSubPage(settings_browser, chrome::kCreateProfileSubPage); | 47 chrome::ShowSettingsSubPage(settings_browser, chrome::kCreateProfileSubPage); |
48 ProfileMetrics::LogProfileAddNewUser(type); | 48 ProfileMetrics::LogProfileAddNewUser(type); |
49 } | 49 } |
50 | 50 |
51 void AvatarMenuActionsDesktop::EditProfile(Profile* profile, size_t index) { | 51 void AvatarMenuActionsDesktop::EditProfile(Profile* profile, size_t index) { |
| 52 profiles::UpdateGAIAProfilePhotoIfNeeded(profile); |
| 53 |
52 Browser* settings_browser = browser_; | 54 Browser* settings_browser = browser_; |
53 if (!settings_browser) { | 55 if (!settings_browser) { |
54 settings_browser = new Browser( | 56 settings_browser = new Browser( |
55 Browser::CreateParams(profile, chrome::GetActiveDesktop())); | 57 Browser::CreateParams(profile, chrome::GetActiveDesktop())); |
56 } | 58 } |
57 std::string page = chrome::kManageProfileSubPage; | 59 std::string page = chrome::kManageProfileSubPage; |
58 page += "#"; | 60 page += "#"; |
59 page += base::IntToString(static_cast<int>(index)); | 61 page += base::IntToString(static_cast<int>(index)); |
60 chrome::ShowSettingsSubPage(settings_browser, page); | 62 chrome::ShowSettingsSubPage(settings_browser, page); |
61 } | 63 } |
(...skipping 13 matching lines...) Expand all Loading... |
75 #if defined(OS_WIN) | 77 #if defined(OS_WIN) |
76 return chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH; | 78 return chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH; |
77 #else | 79 #else |
78 return true; | 80 return true; |
79 #endif | 81 #endif |
80 } | 82 } |
81 | 83 |
82 void AvatarMenuActionsDesktop::ActiveBrowserChanged(Browser* browser) { | 84 void AvatarMenuActionsDesktop::ActiveBrowserChanged(Browser* browser) { |
83 browser_ = browser; | 85 browser_ = browser; |
84 } | 86 } |
OLD | NEW |