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

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

Issue 709683004: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-1-security-class
Patch Set: address style issues from stevenjb's review of PS9 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 #include "components/wifi_sync/wifi_credential_syncable_service.h"
6
7 #include "base/logging.h"
8 #include "sync/api/sync_change.h"
9 #include "sync/api/sync_error.h"
10 #include "sync/api/sync_merge_result.h"
11
12 namespace wifi_sync {
13
14 const syncer::ModelType WifiCredentialSyncableService::kModelType =
15 syncer::WIFI_CREDENTIALS;
16
17 WifiCredentialSyncableService::WifiCredentialSyncableService()
18 : thread_checker_() {
19 }
20
21 WifiCredentialSyncableService::~WifiCredentialSyncableService() {
22 DCHECK(thread_checker_.CalledOnValidThread());
23 }
24
25 // Implementation of syncer::SyncableService API.
26 syncer::SyncMergeResult WifiCredentialSyncableService::MergeDataAndStartSyncing(
27 syncer::ModelType type,
28 const syncer::SyncDataList& initial_sync_data,
29 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
30 scoped_ptr<syncer::SyncErrorFactory> /* error_handler */) {
31 DCHECK(thread_checker_.CalledOnValidThread());
32 DCHECK(!sync_processor_.get());
33 DCHECK(sync_processor.get());
34 DCHECK_EQ(kModelType, type);
35
36 sync_processor_ = sync_processor.Pass();
37
38 // TODO(quiche): Update local WiFi configuration.
39 // TODO(quiche): Notify upper layers that sync is ready.
40 NOTIMPLEMENTED();
41
42 return syncer::SyncMergeResult(type);
43 }
44
45 void WifiCredentialSyncableService::StopSyncing(syncer::ModelType type) {
46 DCHECK(thread_checker_.CalledOnValidThread());
47 DCHECK_EQ(kModelType, type);
48 sync_processor_.reset();
49 }
50
51 syncer::SyncDataList WifiCredentialSyncableService::GetAllSyncData(
52 syncer::ModelType type) const {
53 DCHECK(thread_checker_.CalledOnValidThread());
54 DCHECK_EQ(kModelType, type);
55 NOTIMPLEMENTED();
56 return syncer::SyncDataList();
57 }
58
59 syncer::SyncError WifiCredentialSyncableService::ProcessSyncChanges(
60 const tracked_objects::Location& /* caller_location */,
61 const syncer::SyncChangeList& change_list) {
62 DCHECK(thread_checker_.CalledOnValidThread());
63 NOTIMPLEMENTED();
64 return syncer::SyncError();
65 }
66
67 } // namespace wifi_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698