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

Side by Side Diff: chrome/browser/profiles/profile_list_desktop_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/profiles/profile_list_desktop.h" 5 #include "chrome/browser/profiles/profile_list_desktop.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 manager()->profile_info_cache(), 66 manager()->profile_info_cache(),
67 mock_observer_.get(), 67 mock_observer_.get(),
68 NULL)); 68 NULL));
69 avatar_menu_->RebuildMenu(); 69 avatar_menu_->RebuildMenu();
70 EXPECT_EQ(0, change_count()); 70 EXPECT_EQ(0, change_count());
71 return avatar_menu_.get(); 71 return avatar_menu_.get();
72 } 72 }
73 73
74 TestingProfileManager* manager() { return &manager_; } 74 TestingProfileManager* manager() { return &manager_; }
75 75
76 void AddOmittedProfile(std::string name) { 76 void AddOmittedProfile(const std::string& name) {
77 ProfileInfoCache* cache = manager()->profile_info_cache(); 77 ProfileInfoCache* cache = manager()->profile_info_cache();
78 cache->AddProfileToCache( 78 cache->AddProfileToCache(
79 cache->GetUserDataDir().AppendASCII(name), ASCIIToUTF16(name), 79 cache->GetUserDataDir().AppendASCII(name), ASCIIToUTF16(name),
80 std::string(), base::string16(), 0, "TEST_ID"); 80 std::string(), base::string16(), 0, "TEST_ID");
81 } 81 }
82 82
83 int change_count() const { return mock_observer_->change_count(); } 83 int change_count() const { return mock_observer_->change_count(); }
84 84
85 private: 85 private:
86 TestingProfileManager manager_; 86 TestingProfileManager manager_;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 base::string16 supervised_user_label = 352 base::string16 supervised_user_label =
353 l10n_util::GetStringUTF16(IDS_LEGACY_SUPERVISED_USER_AVATAR_LABEL); 353 l10n_util::GetStringUTF16(IDS_LEGACY_SUPERVISED_USER_AVATAR_LABEL);
354 const AvatarMenu::Item& item1 = model->GetItemAt(0); 354 const AvatarMenu::Item& item1 = model->GetItemAt(0);
355 EXPECT_NE(item1.username, supervised_user_label); 355 EXPECT_NE(item1.username, supervised_user_label);
356 356
357 const AvatarMenu::Item& item2 = model->GetItemAt(1); 357 const AvatarMenu::Item& item2 = model->GetItemAt(1);
358 EXPECT_EQ(item2.username, supervised_user_label); 358 EXPECT_EQ(item2.username, supervised_user_label);
359 } 359 }
360 360
361 } // namespace 361 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698