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

Side by Side Diff: chrome/browser/profiles/avatar_menu_actions_desktop.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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
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_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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // associated with the browser it is opened in. AvatarMenuActionsDesktop 58 // associated with the browser it is opened in. AvatarMenuActionsDesktop
59 // should account for this when picking a browser to open in. 59 // should account for this when picking a browser to open in.
60 chrome::ShowSettingsSubPage(settings_browser, chrome::kManageProfileSubPage); 60 chrome::ShowSettingsSubPage(settings_browser, chrome::kManageProfileSubPage);
61 } 61 }
62 62
63 bool AvatarMenuActionsDesktop::ShouldShowAddNewProfileLink() const { 63 bool AvatarMenuActionsDesktop::ShouldShowAddNewProfileLink() const {
64 // |browser_| can be NULL in unit_tests. 64 // |browser_| can be NULL in unit_tests.
65 if (browser_ && browser_->profile()->IsSupervised()) 65 if (browser_ && browser_->profile()->IsSupervised())
66 return false; 66 return false;
67 #if defined(OS_WIN) 67 #if defined(OS_WIN)
68 return chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH; 68 return chrome::GetActiveDesktop() != ui::HOST_DESKTOP_TYPE_ASH;
69 #else 69 #else
70 return true; 70 return true;
71 #endif 71 #endif
72 } 72 }
73 73
74 bool AvatarMenuActionsDesktop::ShouldShowEditProfileLink() const { 74 bool AvatarMenuActionsDesktop::ShouldShowEditProfileLink() const {
75 #if defined(OS_WIN) 75 #if defined(OS_WIN)
76 return chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH; 76 return chrome::GetActiveDesktop() != ui::HOST_DESKTOP_TYPE_ASH;
77 #else 77 #else
78 return true; 78 return true;
79 #endif 79 #endif
80 } 80 }
81 81
82 void AvatarMenuActionsDesktop::ActiveBrowserChanged(Browser* browser) { 82 void AvatarMenuActionsDesktop::ActiveBrowserChanged(Browser* browser) {
83 browser_ = browser; 83 browser_ = browser;
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698