Lines Matching refs:Person
5 #include "chrome/browser/ui/app_list/search/people/person.h"
14 const char kKeyId[] = "person.id";
15 const char kKeyNames[] = "person.names";
17 const char kKeyEmails[] = "person.emails";
19 const char kKeyInteractionRank[] = "person.sortKeys.interactionRank";
20 const char kKeyImages[] = "person.images";
22 const char kKeyOwnerId[] = "person.metadata.ownerId";
66 scoped_ptr<Person> Person::Create(const base::DictionaryValue& dict) {
67 scoped_ptr<Person> person(new Person());
69 // Person id's.
70 if (!dict.GetString(kKeyId, &person->id) ||
71 !dict.GetString(kKeyOwnerId, &person->owner_id)) {
72 person.reset();
73 return person.Pass();
80 interaction_rank_string, &person->interaction_rank)) {
81 person.reset();
82 return person.Pass();
85 person->display_name = GetTargetValue(dict, kKeyNames, kKeyDisplayName);
86 person->email = GetTargetValue(dict, kKeyEmails, kKeyEmailValue);
87 person->image_url = GURL(GetTargetValue(dict, kKeyImages, kKeyUrl));
90 if (person->id.empty() ||
91 person->owner_id.empty() ||
92 person->display_name.empty() ||
93 person->email.empty() ||
94 !person->image_url.is_valid() ||
95 person->interaction_rank == 0.0) {
96 person.reset();
99 return person.Pass();
102 Person::Person() : interaction_rank(0.0) {
105 Person::~Person() {
108 scoped_ptr<Person> Person::Duplicate() {
109 scoped_ptr<Person> person(new Person());
110 *person = *this;
111 return person.Pass();