| 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 #include "chrome/browser/ui/app_list/search/people/person.h" | 5 #include "chrome/browser/ui/app_list/search/people/person.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 return value; | 57 return value; |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| 62 | 62 |
| 63 namespace app_list { | 63 namespace app_list { |
| 64 | 64 |
| 65 // static | 65 // static |
| 66 scoped_ptr<Person> Person::Create(const base::DictionaryValue& dict) { | 66 std::unique_ptr<Person> Person::Create(const base::DictionaryValue& dict) { |
| 67 scoped_ptr<Person> person(new Person()); | 67 std::unique_ptr<Person> person(new Person()); |
| 68 | 68 |
| 69 // Person id's. | 69 // Person id's. |
| 70 if (!dict.GetString(kKeyId, &person->id) || | 70 if (!dict.GetString(kKeyId, &person->id) || |
| 71 !dict.GetString(kKeyOwnerId, &person->owner_id)) { | 71 !dict.GetString(kKeyOwnerId, &person->owner_id)) { |
| 72 person.reset(); | 72 person.reset(); |
| 73 return person; | 73 return person; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // Interaction rank. | 76 // Interaction rank. |
| 77 std::string interaction_rank_string; | 77 std::string interaction_rank_string; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 98 | 98 |
| 99 return person; | 99 return person; |
| 100 } | 100 } |
| 101 | 101 |
| 102 Person::Person() : interaction_rank(0.0) { | 102 Person::Person() : interaction_rank(0.0) { |
| 103 } | 103 } |
| 104 | 104 |
| 105 Person::~Person() { | 105 Person::~Person() { |
| 106 } | 106 } |
| 107 | 107 |
| 108 scoped_ptr<Person> Person::Duplicate() { | 108 std::unique_ptr<Person> Person::Duplicate() { |
| 109 scoped_ptr<Person> person(new Person()); | 109 std::unique_ptr<Person> person(new Person()); |
| 110 *person = *this; | 110 *person = *this; |
| 111 return person; | 111 return person; |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace app_list | 114 } // namespace app_list |
| OLD | NEW |