Chromium Code Reviews| 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/ui/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 #include "chromeos/dbus/session_manager_client.h" | 93 #include "chromeos/dbus/session_manager_client.h" |
| 94 #include "chromeos/ime/extension_ime_util.h" | 94 #include "chromeos/ime/extension_ime_util.h" |
| 95 #include "chromeos/ime/ime_keyboard.h" | 95 #include "chromeos/ime/ime_keyboard.h" |
| 96 #include "chromeos/ime/input_method_manager.h" | 96 #include "chromeos/ime/input_method_manager.h" |
| 97 #include "chromeos/login/login_state.h" | 97 #include "chromeos/login/login_state.h" |
| 98 #include "chromeos/network/portal_detector/network_portal_detector.h" | 98 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 99 #include "components/google/core/browser/google_util.h" | 99 #include "components/google/core/browser/google_util.h" |
| 100 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 100 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 101 #include "components/user_manager/user.h" | 101 #include "components/user_manager/user.h" |
| 102 #include "components/user_manager/user_manager.h" | 102 #include "components/user_manager/user_manager.h" |
| 103 #include "components/user_manager/user_type.h" | 103 #include "components/user_manager/user_type.h" |
|
bartfab (slow)
2014/11/11 19:42:06
Nit: No longer used.
merkulova
2014/11/12 10:01:01
Done.
| |
| 104 #include "content/public/browser/notification_observer.h" | 104 #include "content/public/browser/notification_observer.h" |
| 105 #include "content/public/browser/notification_service.h" | 105 #include "content/public/browser/notification_service.h" |
| 106 #include "content/public/browser/user_metrics.h" | 106 #include "content/public/browser/user_metrics.h" |
| 107 #include "content/public/browser/web_contents.h" | 107 #include "content/public/browser/web_contents.h" |
| 108 #include "device/bluetooth/bluetooth_adapter.h" | 108 #include "device/bluetooth/bluetooth_adapter.h" |
| 109 #include "device/bluetooth/bluetooth_adapter_factory.h" | 109 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 110 #include "device/bluetooth/bluetooth_device.h" | 110 #include "device/bluetooth/bluetooth_device.h" |
| 111 #include "net/base/escape.h" | 111 #include "net/base/escape.h" |
| 112 #include "third_party/cros_system_api/dbus/service_constants.h" | 112 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 113 #include "ui/base/l10n/l10n_util.h" | 113 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 546 chrome::ShowSingletonTab(displayer.browser(), | 546 chrome::ShowSingletonTab(displayer.browser(), |
| 547 GURL(chrome::kLearnMoreEnterpriseURL)); | 547 GURL(chrome::kLearnMoreEnterpriseURL)); |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 | 550 |
| 551 void SystemTrayDelegateChromeOS::ShowUserLogin() { | 551 void SystemTrayDelegateChromeOS::ShowUserLogin() { |
| 552 ash::Shell* shell = ash::Shell::GetInstance(); | 552 ash::Shell* shell = ash::Shell::GetInstance(); |
| 553 if (!shell->delegate()->IsMultiProfilesEnabled()) | 553 if (!shell->delegate()->IsMultiProfilesEnabled()) |
| 554 return; | 554 return; |
| 555 | 555 |
| 556 // Only regular users could add other users to current session. | 556 // Only regular users could add other users to current session. |
|
Daniel Erat
2014/11/11 16:02:49
please update this comment to describe what the co
merkulova
2014/11/12 10:01:01
Done.
| |
| 557 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != | 557 if (!user_manager::UserManager::Get()->GetActiveUser()->IsRegular() || |
|
bartfab (slow)
2014/11/11 19:42:06
The old code implemented the exactly same conditio
merkulova
2014/11/12 10:01:01
Done.
| |
| 558 user_manager::USER_TYPE_REGULAR) { | 558 user_manager::UserManager::Get()->GetActiveUser()->IsSupervised()) { |
|
Daniel Erat
2014/11/11 16:02:49
nit: indent this one space less:
if (!user_mana
merkulova
2014/11/12 10:01:01
Done.
| |
| 559 return; | 559 return; |
| 560 } | 560 } |
| 561 | 561 |
| 562 if (static_cast<int>( | 562 if (static_cast<int>( |
| 563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= | 563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= |
| 564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) | 564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) |
| 565 return; | 565 return; |
| 566 | 566 |
| 567 // Launch sign in screen to add another user to current session. | 567 // Launch sign in screen to add another user to current session. |
| 568 if (user_manager::UserManager::Get() | 568 if (user_manager::UserManager::Get() |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1311 accessibility_subscription_.reset(); | 1311 accessibility_subscription_.reset(); |
| 1312 else | 1312 else |
| 1313 OnAccessibilityModeChanged(details.notify); | 1313 OnAccessibilityModeChanged(details.notify); |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1317 return new SystemTrayDelegateChromeOS(); | 1317 return new SystemTrayDelegateChromeOS(); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 } // namespace chromeos | 1320 } // namespace chromeos |
| OLD | NEW |