Index: chrome/browser/ui/views/ash/app_list/search_builder.cc |
diff --git a/chrome/browser/ui/views/ash/app_list/search_builder.cc b/chrome/browser/ui/views/ash/app_list/search_builder.cc |
index ce0374f90e8e9455a671e50c8662c51400e6e041..1eea3d864f8664d7afb56149e8047a21c134d29c 100644 |
--- a/chrome/browser/ui/views/ash/app_list/search_builder.cc |
+++ b/chrome/browser/ui/views/ash/app_list/search_builder.cc |
@@ -88,6 +88,13 @@ const extensions::Extension* GetExtensionByURL(Profile* profile, |
service->GetInstalledApp(url); |
} |
+#if defined(OS_CHROMEOS) |
+const contacts::Contact* GetContactByURL(const GURL& url) { |
+ return contacts::ContactManager::GetInstance()->GetContactByProviderId( |
+ url.spec()); |
+} |
+#endif |
+ |
// SearchBuildResult is an app list SearchResult built from an |
// AutocompleteMatch. |
class SearchBuilderResult : public app_list::SearchResult, |
@@ -116,6 +123,17 @@ class SearchBuilderResult : public app_list::SearchResult, |
} |
} |
+#if defined(OS_CHROMEOS) |
+ if (match_.type == AutocompleteMatch::CONTACT) { |
+ const contacts::Contact* contact = |
+ GetContactByURL(match_.destination_url); |
+ if (contact && !contact->photo.empty() && !contact->photo.isNull()) { |
+ SetIcon(contact->photo); |
+ return; |
+ } |
+ } |
+#endif |
+ |
int resource_id = match_.starred ? |
IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match_.type); |
SetIcon(*ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( |