| Index: chrome/test/base/testing_profile_manager.cc
|
| diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
|
| index ce2cf195f83dccd163005ece4605b9df85f269f3..6b0df50a64c757291c30c8e3f965ce723a7d6e4a 100644
|
| --- a/chrome/test/base/testing_profile_manager.cc
|
| +++ b/chrome/test/base/testing_profile_manager.cc
|
| @@ -4,9 +4,12 @@
|
|
|
| #include "chrome/test/base/testing_profile_manager.h"
|
|
|
| +#include "base/files/file_util.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/prefs/pref_service_syncable.h"
|
| +#include "chrome/browser/profiles/profile_avatar_downloader.h"
|
| +#include "chrome/browser/profiles/profile_avatar_icon_util.h"
|
| #include "chrome/browser/profiles/profile_info_cache.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/common/chrome_constants.h"
|
| @@ -97,6 +100,18 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
|
| size_t index = cache.GetIndexOfProfileWithPath(profile_path);
|
| cache.SetAvatarIconOfProfileAtIndex(index, avatar_id);
|
| cache.SetSupervisedUserIdOfProfileAtIndex(index, supervised_user_id);
|
| +
|
| + // Cache a "high res" icon so we don't try to fetch one over the network.
|
| + ProfileAvatarDownloader avatar_downloader(
|
| + cache.GetAvatarIconIndexOfProfileAtIndex(index), profile_path, &cache);
|
| +
|
| + // Put a real bitmap into "bitmap". 2x2 bitmap of green 32 bit pixels.
|
| + SkBitmap bitmap;
|
| + bitmap.allocN32Pixels(2, 2);
|
| + bitmap.eraseColor(SK_ColorGREEN);
|
| + avatar_downloader.OnFetchComplete(
|
| + GURL("http://www.google.com/avatar.png"), &bitmap);
|
| +
|
| // SetNameOfProfileAtIndex may reshuffle the list of profiles, so we do it
|
| // last.
|
| cache.SetNameOfProfileAtIndex(index, user_name);
|
|
|