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/extensions/api/signed_in_devices/signed_in_devices_mana
ger.h" | 5 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_mana
ger.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.
h" | 15 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.
h" |
16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/sync/profile_sync_service_factory.h" | 18 #include "chrome/browser/sync/profile_sync_service_factory.h" |
19 #include "chrome/common/extensions/api/signed_in_devices.h" | 19 #include "chrome/common/extensions/api/signed_in_devices.h" |
20 #include "components/browser_sync/profile_sync_service.h" | 20 #include "components/browser_sync/profile_sync_service.h" |
21 #include "components/sync/device_info/device_info.h" | 21 #include "components/sync/device_info/device_info.h" |
22 #include "extensions/browser/event_router.h" | 22 #include "extensions/browser/event_router.h" |
23 #include "extensions/browser/extension_registry.h" | 23 #include "extensions/browser/extension_registry.h" |
24 #include "extensions/common/extension.h" | 24 #include "extensions/common/extension.h" |
25 | 25 |
26 using sync_driver::DeviceInfo; | 26 using syncer::DeviceInfo; |
27 namespace extensions { | 27 namespace extensions { |
28 | 28 |
29 namespace { | 29 namespace { |
30 void FillDeviceInfo(const DeviceInfo& device_info, | 30 void FillDeviceInfo(const DeviceInfo& device_info, |
31 api::signed_in_devices::DeviceInfo* api_device_info) { | 31 api::signed_in_devices::DeviceInfo* api_device_info) { |
32 api_device_info->id = device_info.public_id(); | 32 api_device_info->id = device_info.public_id(); |
33 api_device_info->name = device_info.client_name(); | 33 api_device_info->name = device_info.client_name(); |
34 api_device_info->os = api::signed_in_devices::ParseOS( | 34 api_device_info->os = api::signed_in_devices::ParseOS( |
35 device_info.GetOSString()); | 35 device_info.GetOSString()); |
36 api_device_info->type = api::signed_in_devices::ParseDeviceType( | 36 api_device_info->type = api::signed_in_devices::ParseDeviceType( |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 | 155 |
156 void SignedInDevicesManager::OnExtensionUnloaded( | 156 void SignedInDevicesManager::OnExtensionUnloaded( |
157 content::BrowserContext* browser_context, | 157 content::BrowserContext* browser_context, |
158 const Extension* extension, | 158 const Extension* extension, |
159 UnloadedExtensionInfo::Reason reason) { | 159 UnloadedExtensionInfo::Reason reason) { |
160 RemoveChangeObserverForExtension(extension->id()); | 160 RemoveChangeObserverForExtension(extension->id()); |
161 } | 161 } |
162 | 162 |
163 } // namespace extensions | 163 } // namespace extensions |
OLD | NEW |