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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_API_H_
_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_API_H_
_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_API_H_
_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_API_H_
_ |
7 | 7 |
8 #include <memory> | |
9 #include <string> | 8 #include <string> |
10 #include <vector> | 9 #include <vector> |
11 | 10 |
12 #include "chrome/browser/extensions/chrome_extension_function.h" | 11 #include "chrome/browser/extensions/chrome_extension_function.h" |
13 | 12 |
14 class Profile; | 13 namespace sync_driver { |
| 14 class DeviceInfo; |
| 15 class DeviceInfoTracker; |
| 16 } // namespace sync_driver |
15 | 17 |
16 namespace extensions { | 18 namespace extensions { |
17 class ExtensionPrefs; | 19 class ExtensionPrefs; |
18 } // namespace extensions | 20 } // namespace extensions |
19 | 21 |
20 namespace syncer { | 22 class Profile; |
21 class DeviceInfo; | |
22 class DeviceInfoTracker; | |
23 } // namespace syncer | |
24 | 23 |
25 namespace extensions { | 24 namespace extensions { |
26 | 25 |
27 // Gets the list of signed in devices. The returned scoped vector will be | 26 // Gets the list of signed in devices. The returned scoped vector will be |
28 // filled with the list of devices associated with the account signed into this | 27 // filled with the list of devices associated with the account signed into this |
29 // |profile|. This function needs the |extension_id| because the | 28 // |profile|. This function needs the |extension_id| because the |
30 // public device ids are set per extension. | 29 // public device ids are set per extension. |
31 std::vector<std::unique_ptr<syncer::DeviceInfo>> GetAllSignedInDevices( | 30 std::vector<std::unique_ptr<sync_driver::DeviceInfo>> GetAllSignedInDevices( |
32 const std::string& extension_id, | 31 const std::string& extension_id, |
33 Profile* profile); | 32 Profile* profile); |
34 | 33 |
35 std::vector<std::unique_ptr<syncer::DeviceInfo>> GetAllSignedInDevices( | 34 std::vector<std::unique_ptr<sync_driver::DeviceInfo>> GetAllSignedInDevices( |
36 const std::string& extension_id, | 35 const std::string& extension_id, |
37 syncer::DeviceInfoTracker* device_tracker, | 36 sync_driver::DeviceInfoTracker* device_tracker, |
38 ExtensionPrefs* extension_prefs); | 37 ExtensionPrefs* extension_prefs); |
39 | 38 |
40 class SignedInDevicesGetFunction : public ChromeSyncExtensionFunction { | 39 class SignedInDevicesGetFunction : public ChromeSyncExtensionFunction { |
41 protected: | 40 protected: |
42 ~SignedInDevicesGetFunction() override {} | 41 ~SignedInDevicesGetFunction() override {} |
43 | 42 |
44 // ExtensionFunction: | 43 // ExtensionFunction: |
45 bool RunSync() override; | 44 bool RunSync() override; |
46 DECLARE_EXTENSION_FUNCTION("signedInDevices.get", SIGNED_IN_DEVICES_GET) | 45 DECLARE_EXTENSION_FUNCTION("signedInDevices.get", SIGNED_IN_DEVICES_GET) |
47 }; | 46 }; |
48 | 47 |
49 } // namespace extensions | 48 } // namespace extensions |
50 | 49 |
51 #endif // CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_API
_H__ | 50 #endif // CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_API
_H__ |
OLD | NEW |