summaryrefslogtreecommitdiffstats
path: root/ash/test/test_system_tray_delegate.cc
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 03:08:49 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 03:08:49 +0000
commit39594f64142380e8ed8e06e10deb1396d0fa52dc (patch)
treef91eff5d77bee32c6c8a8ee95a1a2e958e2a1c7c /ash/test/test_system_tray_delegate.cc
parent8019cf950502180caa60a6cf7b52fc5934745e3f (diff)
downloadchromium_src-39594f64142380e8ed8e06e10deb1396d0fa52dc.zip
chromium_src-39594f64142380e8ed8e06e10deb1396d0fa52dc.tar.gz
chromium_src-39594f64142380e8ed8e06e10deb1396d0fa52dc.tar.bz2
Revert 222957 "Refactors TestSystemTrayDelegate into DefaultSyst..."
It broke Aura windows builder FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma\gomacc.exe "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe" /nologo /showIncludes /FC @obj\ash\test\ash_test_support.test_system_tray_delegate.obj.rsp /c ..\..\ash\test\test_system_tray_delegate.cc /Foobj\ash\test\ash_test_support.test_system_tray_delegate.obj /Fdobj\ash\ash_test_support.pdb c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(24) : error C2220: warning treated as error - no 'object' file generated c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(24) : warning C4273: 'ash::test::TestSystemTrayDelegate::TestSystemTrayDelegate' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(15) : see previous definition of '{ctor}' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(28) : warning C4273: 'ash::test::TestSystemTrayDelegate::~TestSystemTrayDelegate' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(16) : see previous definition of '{dtor}' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(33) : warning C4273: 'ash::test::TestSystemTrayDelegate::SetInitialLoginStatus' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(23) : see previous definition of 'SetInitialLoginStatus' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(37) : warning C4273: 'ash::test::TestSystemTrayDelegate::SetLoginStatus' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(30) : see previous definition of 'SetLoginStatus' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(42) : warning C4273: 'ash::test::TestSystemTrayDelegate::GetUserLoginStatus' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(37) : see previous definition of 'GetUserLoginStatus' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(61) : warning C4273: 'ash::test::TestSystemTrayDelegate::ShouldShowDisplayNotification' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(38) : see previous definition of 'ShouldShowDisplayNotification' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(65) : warning C4273: 'ash::test::TestSystemTrayDelegate::ShutDown' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(39) : see previous definition of 'ShutDown' c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.cc(69) : warning C4273: 'ash::test::TestSystemTrayDelegate::SignOut' : inconsistent dll linkage c:\b\build\slave\win_aura_builder\build\src\ash\test\test_system_tray_delegate.h(40) : see previous definition of 'SignOut' ninja: build stopped: subcommand failed. > Refactors TestSystemTrayDelegate into DefaultSystemTrayDelegate > > DefaultSystemTrayDelegate is the no-op implementation and > TestSystemTrayDelegate contains the test related bits. > > This also fixes a crash in the windows side as > TestSystemTrayDelegate::Shutdown() quits the message loop, which is > the wrong thing to do. > > BUG=159693 284358 > TEST=none > R=oshima@chromium.org > > Review URL: https://chromiumcodereview.appspot.com/23465018 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/23650004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/test_system_tray_delegate.cc')
-rw-r--r--ash/test/test_system_tray_delegate.cc74
1 files changed, 0 insertions, 74 deletions
diff --git a/ash/test/test_system_tray_delegate.cc b/ash/test/test_system_tray_delegate.cc
deleted file mode 100644
index 0f47aea..0000000
--- a/ash/test/test_system_tray_delegate.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/test/test_system_tray_delegate.h"
-
-#include <string>
-
-#include "ash/session_state_delegate.h"
-#include "ash/shell.h"
-#include "base/message_loop/message_loop.h"
-#include "base/time/time.h"
-
-namespace ash {
-namespace test {
-
-namespace {
-
-user::LoginStatus g_initial_status = user::LOGGED_IN_USER;
-
-} // namespace
-
-TestSystemTrayDelegate::TestSystemTrayDelegate()
- : should_show_display_notification_(false),
- login_status_(g_initial_status) {
-}
-
-TestSystemTrayDelegate::~TestSystemTrayDelegate() {
-}
-
-// static
-void TestSystemTrayDelegate::SetInitialLoginStatus(
- user::LoginStatus login_status) {
- g_initial_status = login_status;
-}
-
-void TestSystemTrayDelegate::SetLoginStatus(user::LoginStatus login_status) {
- login_status_ = login_status;
- Shell::GetInstance()->UpdateAfterLoginStatusChange(login_status);
-}
-
-user::LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const {
- // Initial login status has been changed for testing.
- if (g_initial_status != user::LOGGED_IN_USER &&
- g_initial_status == login_status_) {
- return login_status_;
- }
-
- // At new user image screen manager->IsUserLoggedIn() would return true
- // but there's no browser session available yet so use SessionStarted().
- SessionStateDelegate* delegate =
- Shell::GetInstance()->session_state_delegate();
-
- if (!delegate->IsActiveUserSessionStarted())
- return ash::user::LOGGED_IN_NONE;
- if (delegate->IsScreenLocked())
- return user::LOGGED_IN_LOCKED;
- return login_status_;
-}
-
-bool TestSystemTrayDelegate::ShouldShowDisplayNotification() {
- return should_show_display_notification_;
-}
-
-void TestSystemTrayDelegate::ShutDown() {
- base::MessageLoop::current()->Quit();
-}
-
-void TestSystemTrayDelegate::SignOut() {
- base::MessageLoop::current()->Quit();
-}
-
-} // namespace test
-} // namespace ash