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

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

Issue 709683004: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-1-security-class
Patch Set: fix android_aosp build Created 6 years 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 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 "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/keyed_service/core/keyed_service.h"
11 #include "sync/api/sync_change_processor.h"
12 #include "sync/api/syncable_service.h"
13
14 namespace wifi_sync {
15
16 // KeyedService that synchronizes WiFi credentials between local settings,
17 // and Chrome Sync.
18 //
19 // This service does not necessarily own the storage for WiFi
20 // credentials. In particular, on ChromeOS, WiFi credential storage is
21 // managed by the ChromeOS connection manager ("Shill").
22 class WifiCredentialSyncableService
23 : public syncer::SyncableService, public KeyedService {
24 public:
25 WifiCredentialSyncableService();
26 ~WifiCredentialSyncableService() override;
27
28 // syncer::SyncableService implementation.
29 syncer::SyncMergeResult MergeDataAndStartSyncing(
30 syncer::ModelType type,
31 const syncer::SyncDataList& initial_sync_data,
32 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
33 scoped_ptr<syncer::SyncErrorFactory> error_handler) override;
34 void StopSyncing(syncer::ModelType type) override;
35 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
36 syncer::SyncError ProcessSyncChanges(
37 const tracked_objects::Location& caller_location,
38 const syncer::SyncChangeList& change_list) override;
39
40 private:
41 // The syncer::ModelType that this SyncableService processes and
42 // generates updates for.
43 static const syncer::ModelType kModelType;
44
45 // Our SyncChangeProcessor instance. Used to push changes into
46 // Chrome Sync.
47 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
48
49 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableService);
50 };
51
52 } // namespace wifi_sync
53
54 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_
OLDNEW
« no previous file with comments | « components/wifi_sync/wifi_credential.cc ('k') | components/wifi_sync/wifi_credential_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698