| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/api/easy_unlock_private/easy_unlock_private_
api.h" | 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_
api.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 std::vector<linked_ptr<easy_unlock_private::UserInfo> > users; | 680 std::vector<linked_ptr<easy_unlock_private::UserInfo> > users; |
| 681 std::string user_id = service->GetUserEmail(); | 681 std::string user_id = service->GetUserEmail(); |
| 682 if (!user_id.empty()) { | 682 if (!user_id.empty()) { |
| 683 users.push_back( | 683 users.push_back( |
| 684 linked_ptr<easy_unlock_private::UserInfo>( | 684 linked_ptr<easy_unlock_private::UserInfo>( |
| 685 new easy_unlock_private::UserInfo())); | 685 new easy_unlock_private::UserInfo())); |
| 686 users[0]->user_id = user_id; | 686 users[0]->user_id = user_id; |
| 687 users[0]->logged_in = service->GetType() == EasyUnlockService::TYPE_REGULAR; | 687 users[0]->logged_in = service->GetType() == EasyUnlockService::TYPE_REGULAR; |
| 688 users[0]->data_ready = users[0]->logged_in || | 688 users[0]->data_ready = users[0]->logged_in || |
| 689 service->GetRemoteDevices() != NULL; | 689 service->GetRemoteDevices() != NULL; |
| 690 |
| 691 EasyUnlockService::UserSettings user_settings = |
| 692 EasyUnlockService::GetUserSettings(user_id); |
| 693 users[0]->check_close_proximity = user_settings.check_close_proximity; |
| 690 } | 694 } |
| 691 results_ = easy_unlock_private::GetUserInfo::Results::Create(users); | 695 results_ = easy_unlock_private::GetUserInfo::Results::Create(users); |
| 692 return true; | 696 return true; |
| 693 } | 697 } |
| 694 | 698 |
| 695 EasyUnlockPrivateGetConnectionInfoFunction:: | 699 EasyUnlockPrivateGetConnectionInfoFunction:: |
| 696 EasyUnlockPrivateGetConnectionInfoFunction() { | 700 EasyUnlockPrivateGetConnectionInfoFunction() { |
| 697 } | 701 } |
| 698 | 702 |
| 699 EasyUnlockPrivateGetConnectionInfoFunction:: | 703 EasyUnlockPrivateGetConnectionInfoFunction:: |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 scoped_ptr<base::ListValue> results(new base::ListValue()); | 741 scoped_ptr<base::ListValue> results(new base::ListValue()); |
| 738 results->AppendInteger(connection_info.rssi); | 742 results->AppendInteger(connection_info.rssi); |
| 739 results->AppendInteger(connection_info.transmit_power); | 743 results->AppendInteger(connection_info.transmit_power); |
| 740 results->AppendInteger(connection_info.max_transmit_power); | 744 results->AppendInteger(connection_info.max_transmit_power); |
| 741 SetResultList(results.Pass()); | 745 SetResultList(results.Pass()); |
| 742 SendResponse(true); | 746 SendResponse(true); |
| 743 } | 747 } |
| 744 | 748 |
| 745 } // namespace api | 749 } // namespace api |
| 746 } // namespace extensions | 750 } // namespace extensions |
| OLD | NEW |