OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 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. | |
4 | |
5 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ | |
6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "components/keyed_service/core/keyed_service.h" | |
12 #include "components/wifi_sync/wifi_security_class.h" | |
erikwright (departed)
2014/10/29 18:18:25
forward-decl for many of these. You do not need to
mukesh agrawal
2014/10/30 18:41:28
Done.
| |
13 #include "sync/api/sync_change.h" | |
14 #include "sync/api/sync_data.h" | |
15 #include "sync/api/sync_error.h" | |
16 #include "sync/api/sync_error_factory.h" | |
17 #include "sync/api/syncable_service.h" | |
18 | |
19 namespace content { | |
20 class BrowserContext; | |
21 } // content | |
22 | |
23 namespace wifi_sync { | |
24 | |
25 class WifiCredentialSyncableService : public syncer::SyncableService, | |
erikwright (departed)
2014/10/29 18:18:25
class comments?
mukesh agrawal
2014/10/30 18:41:28
Done.
| |
26 public KeyedService { | |
27 public: | |
28 explicit WifiCredentialSyncableService(content::BrowserContext* context); | |
erikwright (departed)
2014/10/29 18:18:25
comment
mukesh agrawal
2014/10/30 18:41:28
Done.
| |
29 ~WifiCredentialSyncableService() override; | |
30 | |
31 // syncer::SyncableService implementation. | |
32 syncer::SyncMergeResult MergeDataAndStartSyncing( | |
33 syncer::ModelType type, | |
34 const syncer::SyncDataList& initial_sync_data, | |
35 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | |
36 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; | |
37 void StopSyncing(syncer::ModelType type) override; | |
38 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; | |
39 syncer::SyncError ProcessSyncChanges( | |
40 const tracked_objects::Location& from_here, | |
41 const syncer::SyncChangeList& change_list) override; | |
42 | |
43 // Called from UI layer. | |
44 bool IsRunning(); | |
erikwright (departed)
2014/10/29 18:18:25
method comments?
mukesh agrawal
2014/10/30 18:41:28
Done.
| |
45 void AddToSyncedNetworks(const std::string& item_id, | |
46 const std::vector<unsigned char>& ssid, | |
47 WifiSecurityClass security_class, | |
48 const std::string& passphrase); | |
49 void RemoveFromSyncedNetworks(const std::string& item_id); | |
50 static const char* GetNormalizedSecurityClass( | |
51 WifiSecurityClass security_class); | |
52 | |
53 private: | |
54 content::BrowserContext* browser_context_; | |
55 | |
56 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableService); | |
erikwright (departed)
2014/10/29 18:18:25
#include "base/macros.h"
mukesh agrawal
2014/10/30 18:41:28
Done.
| |
57 }; | |
58 | |
59 } // namespace wifi_sync | |
60 | |
61 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ | |
OLD | NEW |