OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/profiles/fake_profile_info_interface.h" |
| 6 |
| 7 #include "grit/theme_resources.h" |
| 8 #include "ui/base/resource/resource_bundle.h" |
| 9 |
| 10 FakeProfileInfo::FakeProfileInfo() {} |
| 11 FakeProfileInfo::~FakeProfileInfo() {} |
| 12 |
| 13 std::vector<AvatarMenuModel::Item*>* FakeProfileInfo::mock_profiles() { |
| 14 return &profiles_; |
| 15 } |
| 16 |
| 17 // static |
| 18 gfx::Image& FakeProfileInfo::GetTestImage() { |
| 19 return ResourceBundle::GetSharedInstance().GetImageNamed( |
| 20 IDR_PROFILE_AVATAR_0); |
| 21 } |
| 22 |
| 23 size_t FakeProfileInfo::GetNumberOfProfiles() const { |
| 24 return profiles_.size(); |
| 25 } |
| 26 |
| 27 size_t FakeProfileInfo::GetIndexOfProfileWithPath( |
| 28 const FilePath& profile_path) const { |
| 29 return std::string::npos; |
| 30 } |
| 31 |
| 32 string16 FakeProfileInfo::GetNameOfProfileAtIndex(size_t index) const { |
| 33 return profiles_[index]->name; |
| 34 } |
| 35 |
| 36 FilePath FakeProfileInfo::GetPathOfProfileAtIndex(size_t index) const { |
| 37 return FilePath(); |
| 38 } |
| 39 |
| 40 const gfx::Image& FakeProfileInfo::GetAvatarIconOfProfileAtIndex( |
| 41 size_t index) const { |
| 42 return profiles_[index]->icon; |
| 43 } |
OLD | NEW |