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

Side by Side Diff: ash/common/test/test_system_tray_delegate.cc

Issue 2384103003: Fix spacing issues on Ash shelf (Closed)
Patch Set: Re-enabled disabled test Created 4 years, 1 month 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
« no previous file with comments | « ash/common/test/test_system_tray_delegate.h ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/common/test/test_system_tray_delegate.h" 5 #include "ash/common/test/test_system_tray_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
11 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 13
14 namespace ash { 14 namespace ash {
15 namespace test { 15 namespace test {
16 16
17 namespace { 17 namespace {
18 18
19 bool g_system_update_required = false; 19 bool g_system_update_required = false;
20 LoginStatus g_initial_status = LoginStatus::USER; 20 LoginStatus g_initial_status = LoginStatus::USER;
21 21
22 } // namespace 22 } // namespace
23 23
24 TestSystemTrayDelegate::TestSystemTrayDelegate() 24 TestSystemTrayDelegate::TestSystemTrayDelegate()
25 : login_status_(g_initial_status), session_length_limit_set_(false) {} 25 : login_status_(g_initial_status), session_length_limit_set_(false) {}
26 26
27 TestSystemTrayDelegate::~TestSystemTrayDelegate() {} 27 TestSystemTrayDelegate::~TestSystemTrayDelegate() {}
28 28
29 // static
30 void TestSystemTrayDelegate::SetSystemUpdateRequired(bool required) {
31 g_system_update_required = required;
32 }
33
34 void TestSystemTrayDelegate::SetLoginStatus(LoginStatus login_status) { 29 void TestSystemTrayDelegate::SetLoginStatus(LoginStatus login_status) {
35 login_status_ = login_status; 30 login_status_ = login_status;
36 WmShell::Get()->UpdateAfterLoginStatusChange(login_status); 31 WmShell::Get()->UpdateAfterLoginStatusChange(login_status);
37 } 32 }
38 33
39 void TestSystemTrayDelegate::SetSessionLengthLimitForTest( 34 void TestSystemTrayDelegate::SetSessionLengthLimitForTest(
40 const base::TimeDelta& new_limit) { 35 const base::TimeDelta& new_limit) {
41 session_length_limit_ = new_limit; 36 session_length_limit_ = new_limit;
42 session_length_limit_set_ = true; 37 session_length_limit_set_ = true;
43 } 38 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 : old_status_(g_initial_status) { 108 : old_status_(g_initial_status) {
114 g_initial_status = new_status; 109 g_initial_status = new_status;
115 } 110 }
116 111
117 ScopedInitialLoginStatus::~ScopedInitialLoginStatus() { 112 ScopedInitialLoginStatus::~ScopedInitialLoginStatus() {
118 g_initial_status = old_status_; 113 g_initial_status = old_status_;
119 } 114 }
120 115
121 } // namespace test 116 } // namespace test
122 } // namespace ash 117 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/test/test_system_tray_delegate.h ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698