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

Side by Side Diff: components/wifi_sync/wifi_credential_syncable_service.h

Issue 675993005: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rename component, and add stub wifi_credential_syncable_service Created 6 years, 1 month 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
OLDNEW
(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"
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
26 : public syncer::SyncableService, public KeyedService {
27 public:
28 explicit WifiCredentialSyncableService(content::BrowserContext *context);
29 virtual ~WifiCredentialSyncableService();
stevenjb 2014/10/28 21:17:31 new style is: ~WifiCredentialSyncableService() ove
mukesh agrawal 2014/10/29 00:41:34 Done.
30
31 // syncer::SyncableService implementation.
32 virtual 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 virtual void StopSyncing(syncer::ModelType type) override;
38 virtual syncer::SyncDataList GetAllSyncData(
39 syncer::ModelType type) const override;
40 virtual syncer::SyncError ProcessSyncChanges(
41 const tracked_objects::Location& from_here,
42 const syncer::SyncChangeList& change_list) override;
43
44 // Called from UI layer.
45 virtual bool IsRunning();
stevenjb 2014/10/28 21:17:31 nit: New virtuals should probably be declared firs
mukesh agrawal 2014/10/29 00:41:34 I actually don't know why I made these virtual, so
stevenjb 2014/10/29 17:49:45 I personally tend to put new public methods above
46 virtual void AddToSyncedNetworks(
47 const std::string& item_id,
48 const std::vector<unsigned char>& ssid,
49 WifiSecurityClass security_class,
50 const std::string& passphrase);
51 virtual void RemoveFromSyncedNetworks(const std::string& item_id);
52 static const char* GetNormalizedSecurityClass(
53 WifiSecurityClass security_class);
54
55 private:
56 content::BrowserContext *browser_context_;
57
58 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableService);
59 };
60
61 } // namespace wifi_sync
62
63 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698