| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PERSON_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PERSON_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PERSON_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PERSON_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class DictionaryValue; | 14 class DictionaryValue; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace app_list { | 17 namespace app_list { |
| 18 | 18 |
| 19 // Person holds information about a search result retrieved from the People | 19 // Person holds information about a search result retrieved from the People |
| 20 // Search Google webservice. | 20 // Search Google webservice. |
| 21 struct Person { | 21 struct Person { |
| 22 // Parses the dictionary from the people search result and creates a person | 22 // Parses the dictionary from the people search result and creates a person |
| 23 // object. | 23 // object. |
| 24 static scoped_ptr<Person> Create(const base::DictionaryValue& dict); | 24 static std::unique_ptr<Person> Create(const base::DictionaryValue& dict); |
| 25 | 25 |
| 26 Person(); | 26 Person(); |
| 27 ~Person(); | 27 ~Person(); |
| 28 | 28 |
| 29 scoped_ptr<Person> Duplicate(); | 29 std::unique_ptr<Person> Duplicate(); |
| 30 | 30 |
| 31 // This is a unique id for this person. In the case of a result with an | 31 // This is a unique id for this person. In the case of a result with an |
| 32 // associated Google account, this will always be the same as the owner id. | 32 // associated Google account, this will always be the same as the owner id. |
| 33 // In case of non-Google results, this id is arbitrary but guaranteed to be | 33 // In case of non-Google results, this id is arbitrary but guaranteed to be |
| 34 // unique for this person search result. | 34 // unique for this person search result. |
| 35 std::string id; | 35 std::string id; |
| 36 | 36 |
| 37 // The Owner Id is a GAIA obfuscated id which can be used to identify a | 37 // The Owner Id is a GAIA obfuscated id which can be used to identify a |
| 38 // Google contact. | 38 // Google contact. |
| 39 std::string owner_id; | 39 std::string owner_id; |
| 40 | 40 |
| 41 // Interaction rank is a number between 0.0-1.0 indicating how frequently | 41 // Interaction rank is a number between 0.0-1.0 indicating how frequently |
| 42 // you interact with the person. | 42 // you interact with the person. |
| 43 double interaction_rank; | 43 double interaction_rank; |
| 44 | 44 |
| 45 std::string display_name; | 45 std::string display_name; |
| 46 std::string email; | 46 std::string email; |
| 47 GURL image_url; | 47 GURL image_url; |
| 48 | 48 |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace app_list | 51 } // namespace app_list |
| 52 | 52 |
| 53 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PERSON_H_ | 53 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PERSON_H_ |
| OLD | NEW |