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

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

Issue 1426393003: NOT FOR REVIEW Base URL: https://chromium.googlesource.com/chromium/src.git@submit-4.5-split-wcss
Patch Set: Created 5 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ 5 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_
6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ 6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_
7 7
8 #include <string>
9
10 #include "components/keyed_service/core/keyed_service.h" 8 #include "components/keyed_service/core/keyed_service.h"
11 #include "sync/api/syncable_service.h" 9 #include "sync/api/syncable_service.h"
12 10
13 namespace wifi_sync { 11 namespace wifi_sync {
14 12
15 class WifiCredential; 13 class WifiCredential;
16 14
17 // KeyedService that synchronizes WiFi credentials between local settings, 15 // KeyedService that synchronizes WiFi credentials between local settings,
18 // and Chrome Sync. 16 // and Chrome Sync.
19 class WifiCredentialSyncableService 17 class WifiCredentialSyncableService
20 : public syncer::SyncableService, public KeyedService { 18 : public syncer::SyncableService, public KeyedService {
21 public: 19 public:
22 // Adds a WiFiCredential to Chrome Sync. |item_id| is a persistent 20 // Adds a WiFiCredential to Chrome Sync. It is an error to add a
23 // identifier which can be used to later remove the credential. It 21 // network that already exists. It is also an error to call this
24 // is an error to add a network that already exists. It is also an 22 // method before MergeDataAndStartSyncing(), or after StopSyncing().
25 // error to call this method before MergeDataAndStartSyncing(), or
26 // after StopSyncing().
27 // 23 //
28 // TODO(quiche): Allow changing a credential, by addding it again. 24 // TODO(quiche): Allow changing a credential, by addding it again.
29 // crbug.com/431436 25 // crbug.com/431436
30 virtual bool AddToSyncedNetworks(const std::string& item_id, 26 virtual bool AddToSyncedNetworks(const WifiCredential& credential) = 0;
31 const WifiCredential& credential) = 0;
32 }; 27 };
33 28
34 } // namespace wifi_sync 29 } // namespace wifi_sync
35 30
36 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ 31 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698