| Index: chrome/browser/profiles/profile_info_cache_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/profiles/profile_info_cache_unittest.cc (revision 115334)
|
| +++ chrome/browser/profiles/profile_info_cache_unittest.cc (working copy)
|
| @@ -23,17 +23,19 @@
|
|
|
| using content::BrowserThread;
|
|
|
| -ProfileNameVerifierObserver::ProfileNameVerifierObserver() {
|
| +ProfileNameVerifierObserver::ProfileNameVerifierObserver(
|
| + ProfileInfoCache* cache) : cache_(cache) {
|
| + DCHECK(cache_);
|
| }
|
|
|
| ProfileNameVerifierObserver::~ProfileNameVerifierObserver() {
|
| }
|
|
|
| void ProfileNameVerifierObserver::OnProfileAdded(
|
| - const string16& profile_name,
|
| - const string16& profile_base_dir,
|
| const FilePath& profile_path,
|
| - const gfx::Image* avatar_image) {
|
| + const string16& profile_base_dir) {
|
| + size_t index = cache_->GetIndexOfProfileWithPath(profile_path);
|
| + string16 profile_name = cache_->GetNameOfProfileAtIndex(index);
|
| EXPECT_TRUE(profile_names_.find(profile_name) == profile_names_.end());
|
| profile_names_.insert(profile_name);
|
| }
|
| @@ -59,10 +61,10 @@
|
| }
|
|
|
| void ProfileNameVerifierObserver::OnProfileAvatarChanged(
|
| - const string16& profile_name,
|
| - const string16& profile_base_dir,
|
| const FilePath& profile_path,
|
| - const gfx::Image* avatar_image) {
|
| + const string16& profile_base_dir) {
|
| + size_t index = cache_->GetIndexOfProfileWithPath(profile_path);
|
| + string16 profile_name = cache_->GetNameOfProfileAtIndex(index);
|
| EXPECT_TRUE(profile_names_.find(profile_name) != profile_names_.end());
|
| }
|
|
|
| @@ -70,7 +72,8 @@
|
| : testing_profile_manager_(
|
| static_cast<TestingBrowserProcess*>(g_browser_process)),
|
| ui_thread_(BrowserThread::UI, &ui_loop_),
|
| - file_thread_(BrowserThread::FILE, &ui_loop_) {
|
| + file_thread_(BrowserThread::FILE, &ui_loop_),
|
| + name_observer_(GetCache()) {
|
| }
|
|
|
| ProfileInfoCacheTest::~ProfileInfoCacheTest() {
|
|
|