| 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/signed_in_devices_api.
     h" |    5 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.
     h" | 
|    6  |    6  | 
|    7 #include <memory> |    7 #include <memory> | 
|    8 #include <utility> |    8 #include <utility> | 
|    9  |    9  | 
|   10 #include "base/values.h" |   10 #include "base/values.h" | 
|   11 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" |   11 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" | 
|   12 #include "chrome/browser/profiles/profile.h" |   12 #include "chrome/browser/profiles/profile.h" | 
|   13 #include "chrome/browser/sync/profile_sync_service_factory.h" |   13 #include "chrome/browser/sync/profile_sync_service_factory.h" | 
|   14 #include "chrome/common/extensions/api/signed_in_devices.h" |   14 #include "chrome/common/extensions/api/signed_in_devices.h" | 
|   15 #include "components/browser_sync/profile_sync_service.h" |   15 #include "components/browser_sync/profile_sync_service.h" | 
|   16 #include "components/sync/device_info/device_info_tracker.h" |   16 #include "components/sync/device_info/device_info_tracker.h" | 
|   17 #include "components/sync/device_info/local_device_info_provider.h" |   17 #include "components/sync/device_info/local_device_info_provider.h" | 
|   18 #include "extensions/browser/extension_prefs.h" |   18 #include "extensions/browser/extension_prefs.h" | 
|   19  |   19  | 
|   20 using base::DictionaryValue; |   20 using base::DictionaryValue; | 
|   21 using sync_driver::DeviceInfo; |   21 using syncer::DeviceInfo; | 
|   22 using sync_driver::DeviceInfoTracker; |   22 using syncer::DeviceInfoTracker; | 
|   23 using sync_driver::LocalDeviceInfoProvider; |   23 using syncer::LocalDeviceInfoProvider; | 
|   24  |   24  | 
|   25 namespace extensions { |   25 namespace extensions { | 
|   26  |   26  | 
|   27 static const char kPrefStringForIdMapping[] = "id_mapping_dictioanry"; |   27 static const char kPrefStringForIdMapping[] = "id_mapping_dictioanry"; | 
|   28  |   28  | 
|   29 // Gets the dictionary that stores the id mapping. The dictionary is stored |   29 // Gets the dictionary that stores the id mapping. The dictionary is stored | 
|   30 // in the |ExtensionPrefs|. |   30 // in the |ExtensionPrefs|. | 
|   31 const base::DictionaryValue* GetIdMappingDictionary( |   31 const base::DictionaryValue* GetIdMappingDictionary( | 
|   32     ExtensionPrefs* extension_prefs, |   32     ExtensionPrefs* extension_prefs, | 
|   33     const std::string& extension_id) { |   33     const std::string& extension_id) { | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  138  |  138  | 
|  139   for (const std::unique_ptr<DeviceInfo>& device : devices) |  139   for (const std::unique_ptr<DeviceInfo>& device : devices) | 
|  140     result->Append(device->ToValue()); |  140     result->Append(device->ToValue()); | 
|  141  |  141  | 
|  142   SetResult(std::move(result)); |  142   SetResult(std::move(result)); | 
|  143   return true; |  143   return true; | 
|  144 } |  144 } | 
|  145  |  145  | 
|  146 }  // namespace extensions |  146 }  // namespace extensions | 
|  147  |  147  | 
| OLD | NEW |