Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: chrome/browser/extensions/api/signedin_devices/signedin_devices_api.h

Issue 22706006: Implementation of the DeviceInfo get API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SIGNEDIN_DEVICES_SIGNEDIN_DEVICES_API_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SIGNEDIN_DEVICES_SIGNEDIN_DEVICES_API_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_SIGNEDIN_DEVICES_SIGNEDIN_DEVICES_API_H__ 6 #define CHROME_BROWSER_EXTENSIONS_API_SIGNEDIN_DEVICES_SIGNEDIN_DEVICES_API_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "chrome/browser/extensions/extension_function.h"
12 13
13 namespace browser_sync { 14 namespace browser_sync {
14 class DeviceInfo; 15 class DeviceInfo;
15 } // namespace browser_sync 16 } // namespace browser_sync
16 17
17 namespace extensions { 18 namespace extensions {
18 class ExtensionPrefs; 19 class ExtensionPrefs;
19 } // namespace extensions 20 } // namespace extensions
20 21
21 class Profile; 22 class Profile;
22 class ProfileSyncService; 23 class ProfileSyncService;
23 24
24 namespace extensions { 25 namespace extensions {
25 26
26 // Gets the list of signed in devices. The returned scoped vector will be 27 // Gets the list of signed in devices. The returned scoped vector will be
27 // filled with the list of devices associated with the account signed into this 28 // filled with the list of devices associated with the account signed into this
28 // |profile|. This function needs the |extension_id| because the 29 // |profile|. This function needs the |extension_id| because the
29 // public device ids are set per extension. 30 // public device ids are set per extension.
30 ScopedVector<browser_sync::DeviceInfo> GetAllSignedInDevices( 31 ScopedVector<browser_sync::DeviceInfo> GetAllSignedInDevices(
31 const std::string& extension_id, 32 const std::string& extension_id,
32 Profile* profile); 33 Profile* profile);
33 34
34 ScopedVector<browser_sync::DeviceInfo> GetAllSignedInDevices( 35 ScopedVector<browser_sync::DeviceInfo> GetAllSignedInDevices(
35 const std::string& extension_id, 36 const std::string& extension_id,
36 ProfileSyncService* pss, 37 ProfileSyncService* pss,
37 ExtensionPrefs* extension_prefs); 38 ExtensionPrefs* extension_prefs);
38 39
40 class SignedinDevicesGetFunction : public SyncExtensionFunction {
41 protected:
42 virtual ~SignedinDevicesGetFunction() {}
43
44 // ExtensionFunction:
45 virtual bool RunImpl() OVERRIDE;
46 DECLARE_EXTENSION_FUNCTION("SignedinDevices.get", SIGNEDIN_DEVICES_GET)
47 };
48
39 } // namespace extensions 49 } // namespace extensions
40 50
41 #endif // CHROME_BROWSER_EXTENSIONS_API_SIGNEDIN_DEVICES_SIGNEDIN_DEVICES_API_H __ 51 #endif // CHROME_BROWSER_EXTENSIONS_API_SIGNEDIN_DEVICES_SIGNEDIN_DEVICES_API_H __
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698