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

Unified Diff: chrome/browser/ui/ash/multi_user/user_switch_util.cc

Issue 2144083002: mash: Move user_switch_util to chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/multi_user/user_switch_util.cc
diff --git a/ash/system/chromeos/multi_user/user_switch_util.cc b/chrome/browser/ui/ash/multi_user/user_switch_util.cc
similarity index 94%
rename from ash/system/chromeos/multi_user/user_switch_util.cc
rename to chrome/browser/ui/ash/multi_user/user_switch_util.cc
index e29ad22e7f713e990c11f63193ceb260320d3332..e527fb77aa233a1ca9196f570d326f3779fa1c6d 100644
--- a/ash/system/chromeos/multi_user/user_switch_util.cc
+++ b/chrome/browser/ui/ash/multi_user/user_switch_util.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/chromeos/multi_user/user_switch_util.h"
+#include "chrome/browser/ui/ash/multi_user/user_switch_util.h"
#include "ash/common/system/chromeos/screen_security/screen_tray_item.h"
#include "ash/shell.h"
+#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/system_tray.h"
-#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/label.h"
@@ -15,8 +15,6 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
-namespace ash {
-
namespace {
// Default width/height of the dialog.
@@ -31,7 +29,7 @@ const int kTopInset = 10;
// Dialog for multi-profiles desktop casting warning.
class DesktopCastingWarningView : public views::DialogDelegateView {
public:
- DesktopCastingWarningView(base::Callback<void()> on_accept);
+ explicit DesktopCastingWarningView(base::Callback<void()> on_accept);
James Cook 2016/07/13 19:26:06 Thanks for fixing. (Out of curiosity, do you use "
msw 2016/07/13 19:31:52 Nope; just saw this lint error in presubmit.
~DesktopCastingWarningView() override;
static void ShowDialog(const base::Callback<void()> on_accept);
@@ -90,7 +88,8 @@ void DesktopCastingWarningView::ShowDialog(
bool DesktopCastingWarningView::Accept() {
// Stop screen sharing and capturing.
- SystemTray* system_tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
+ ash::SystemTray* system_tray =
+ ash::Shell::GetInstance()->GetPrimarySystemTray();
if (system_tray->GetScreenShareItem()->is_started())
system_tray->GetScreenShareItem()->Stop();
if (system_tray->GetScreenCaptureItem()->is_started())
@@ -175,7 +174,8 @@ void TrySwitchingActiveUser(const base::Callback<void()> on_switch) {
}
// If neither screen sharing nor capturing is going on we can immediately
// switch users.
- SystemTray* system_tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
+ ash::SystemTray* system_tray =
+ ash::Shell::GetInstance()->GetPrimarySystemTray();
if (!system_tray->GetScreenShareItem()->is_started() &&
!system_tray->GetScreenCaptureItem()->is_started()) {
on_switch.Run();
@@ -193,5 +193,3 @@ bool TestAndTerminateDesktopCastingWarningForTest(bool accept) {
CHECK(!instance_for_test);
return true;
}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/ash/multi_user/user_switch_util.h ('k') | chrome/browser/ui/ash/multi_user/user_switch_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698