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

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: 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 #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_error_factory.h"
11 #include "sync/api/sync_merge_result.h"
12
13 namespace wifi_sync {
14
15 const syncer::ModelType WifiCredentialSyncableService::kModelType =
16 syncer::WIFI_CREDENTIALS;
17
18 WifiCredentialSyncableService::WifiCredentialSyncableService() {
19 }
20
21 WifiCredentialSyncableService::~WifiCredentialSyncableService() {
22 }
23
24 // Implementation of syncer::SyncableService API.
25 syncer::SyncMergeResult WifiCredentialSyncableService::MergeDataAndStartSyncing(
26 syncer::ModelType type,
27 const syncer::SyncDataList& initial_sync_data,
28 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
29 scoped_ptr<syncer::SyncErrorFactory> /* error_handler */) {
30 DCHECK(!sync_processor_.get());
31 DCHECK(sync_processor.get());
32 DCHECK_EQ(kModelType, type);
33
34 sync_processor_ = sync_processor.Pass();
35
36 // TODO(quiche): Update local WiFi configuration.
37 // TODO(quiche): Notify upper layers that sync is ready.
38 NOTIMPLEMENTED();
39
40 return syncer::SyncMergeResult(type);
41 }
42
43 void WifiCredentialSyncableService::StopSyncing(syncer::ModelType type) {
44 DCHECK_EQ(kModelType, type);
45 sync_processor_.reset();
46 }
47
48 syncer::SyncDataList WifiCredentialSyncableService::GetAllSyncData(
49 syncer::ModelType type) const {
50 DCHECK_EQ(kModelType, type);
51 NOTIMPLEMENTED();
52 return syncer::SyncDataList();
53 }
54
55 syncer::SyncError WifiCredentialSyncableService::ProcessSyncChanges(
56 const tracked_objects::Location& /* caller_location */,
57 const syncer::SyncChangeList& change_list) {
58 NOTIMPLEMENTED();
59 return syncer::SyncError();
60 }
61
62 } // namespace wifi_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698