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

Side by Side Diff: ash/test/test_session_state_delegate.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/test/test_session_state_delegate.h ('k') | base/logging.h » ('j') | url/gurl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698