1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SYNC_DRIVER_ABOUT_SYNC_UTIL_H_
6 #define COMPONENTS_SYNC_DRIVER_ABOUT_SYNC_UTIL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "components/version_info/version_info.h"
11 class SigninManagerBase
;
14 class DictionaryValue
;
17 namespace sync_driver
{
21 namespace sync_ui_util
{
23 // These strings are used from logs to pull out specific data from sync; we
24 // don't want these to ever go out of sync between the logs and sync util.
25 extern const char kIdentityTitle
[];
26 extern const char kDetailsKey
[];
29 // Must match the resource file names.
30 extern const char kAboutJS
[];
31 extern const char kChromeSyncJS
[];
32 extern const char kDataJS
[];
33 extern const char kEventsJS
[];
34 extern const char kSearchJS
[];
35 extern const char kSyncIndexJS
[];
36 extern const char kSyncLogJS
[];
37 extern const char kSyncNodeBrowserJS
[];
38 extern const char kSyncSearchJS
[];
39 extern const char kTypesJS
[];
42 // Must match the constants used in the resource files.
43 extern const char kDispatchEvent
[];
44 extern const char kGetAllNodes
[];
45 extern const char kGetAllNodesCallback
[];
46 extern const char kRegisterForEvents
[];
47 extern const char kRegisterForPerTypeCounters
[];
48 extern const char kRequestListOfTypes
[];
49 extern const char kRequestUpdatedAboutInfo
[];
52 // Must match the constants used in the resource files.
53 extern const char kCommit
[];
54 extern const char kCounters
[];
55 extern const char kCounterType
[];
56 extern const char kModelType
[];
57 extern const char kOnAboutInfoUpdated
[];
58 extern const char kOnCountersUpdated
[];
59 extern const char kOnProtocolEvent
[];
60 extern const char kOnReceivedListOfTypes
[];
61 extern const char kStatus
[];
62 extern const char kTypes
[];
63 extern const char kUpdate
[];
65 // This function returns a DictionaryValue which contains all the information
66 // required to populate the 'About' tab of about:sync.
67 // Note that |service| may be NULL.
68 scoped_ptr
<base::DictionaryValue
> ConstructAboutInformation(
69 sync_driver::SyncService
* service
,
70 SigninManagerBase
* signin
,
71 version_info::Channel channel
);
73 } // namespace sync_ui_util
75 } // namespace sync_driver
77 #endif // COMPONENTS_SYNC_DRIVER_ABOUT_SYNC_UTIL_H_