OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/extensions/api/signed_in_devices/id_mapping_helper.h" | 5 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.
h" | 13 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.
h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "components/crx_file/id_util.h" | 15 #include "components/crx_file/id_util.h" |
16 #include "components/sync_driver/device_info.h" | 16 #include "components/sync/driver/device_info.h" |
17 | 17 |
18 using base::DictionaryValue; | 18 using base::DictionaryValue; |
19 using base::Value; | 19 using base::Value; |
20 using sync_driver::DeviceInfo; | 20 using sync_driver::DeviceInfo; |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 std::string GetPublicIdFromGUID( | 24 std::string GetPublicIdFromGUID( |
25 const base::DictionaryValue& id_mapping, | 25 const base::DictionaryValue& id_mapping, |
26 const std::string& guid) { | 26 const std::string& guid) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 if ((*it)->guid() == client_id) { | 99 if ((*it)->guid() == client_id) { |
100 std::unique_ptr<DeviceInfo> device(*it); | 100 std::unique_ptr<DeviceInfo> device(*it); |
101 devices.weak_erase(it); | 101 devices.weak_erase(it); |
102 return device; | 102 return device; |
103 } | 103 } |
104 } | 104 } |
105 return std::unique_ptr<DeviceInfo>(); | 105 return std::unique_ptr<DeviceInfo>(); |
106 } | 106 } |
107 | 107 |
108 } // namespace extensions | 108 } // namespace extensions |
OLD | NEW |