OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/test/test_session_state_delegate.h" | 5 #include "ash/test/test_session_state_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 user_list_.push_back( | 92 user_list_.push_back( |
93 new MockUserInfo("Second@tray")); // This is intended to be capitalized. | 93 new MockUserInfo("Second@tray")); // This is intended to be capitalized. |
94 user_list_.push_back(new MockUserInfo("third@tray")); | 94 user_list_.push_back(new MockUserInfo("third@tray")); |
95 user_list_.push_back(new MockUserInfo("someone@tray")); | 95 user_list_.push_back(new MockUserInfo("someone@tray")); |
96 } | 96 } |
97 | 97 |
98 TestSessionStateDelegate::~TestSessionStateDelegate() { | 98 TestSessionStateDelegate::~TestSessionStateDelegate() { |
99 STLDeleteElements(&user_list_); | 99 STLDeleteElements(&user_list_); |
100 } | 100 } |
101 | 101 |
102 void TestSessionStateDelegate::AddUser(const std::string user_id) { | 102 void TestSessionStateDelegate::AddUser(const std::string& user_id) { |
103 user_list_.push_back(new MockUserInfo(user_id)); | 103 user_list_.push_back(new MockUserInfo(user_id)); |
104 } | 104 } |
105 | 105 |
106 const user_manager::UserInfo* TestSessionStateDelegate::GetActiveUserInfo() | 106 const user_manager::UserInfo* TestSessionStateDelegate::GetActiveUserInfo() |
107 const { | 107 const { |
108 return user_list_[active_user_index_]; | 108 return user_list_[active_user_index_]; |
109 } | 109 } |
110 | 110 |
111 content::BrowserContext* | 111 content::BrowserContext* |
112 TestSessionStateDelegate::GetBrowserContextByIndex( | 112 TestSessionStateDelegate::GetBrowserContextByIndex( |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 void TestSessionStateDelegate::AddSessionStateObserver( | 258 void TestSessionStateDelegate::AddSessionStateObserver( |
259 SessionStateObserver* observer) { | 259 SessionStateObserver* observer) { |
260 } | 260 } |
261 | 261 |
262 void TestSessionStateDelegate::RemoveSessionStateObserver( | 262 void TestSessionStateDelegate::RemoveSessionStateObserver( |
263 SessionStateObserver* observer) { | 263 SessionStateObserver* observer) { |
264 } | 264 } |
265 | 265 |
266 } // namespace test | 266 } // namespace test |
267 } // namespace ash | 267 } // namespace ash |
OLD | NEW |