Chromium Code Reviews| Index: components/wifi_sync/wifi_credential_syncable_service.h |
| diff --git a/components/wifi_sync/wifi_credential_syncable_service.h b/components/wifi_sync/wifi_credential_syncable_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0f09c4c8ab7accd7cc9a55df69e96e2c7fb85c29 |
| --- /dev/null |
| +++ b/components/wifi_sync/wifi_credential_syncable_service.h |
| @@ -0,0 +1,61 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ |
| +#define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "components/keyed_service/core/keyed_service.h" |
| +#include "components/wifi_sync/wifi_security_class.h" |
|
erikwright (departed)
2014/10/29 18:18:25
forward-decl for many of these. You do not need to
mukesh agrawal
2014/10/30 18:41:28
Done.
|
| +#include "sync/api/sync_change.h" |
| +#include "sync/api/sync_data.h" |
| +#include "sync/api/sync_error.h" |
| +#include "sync/api/sync_error_factory.h" |
| +#include "sync/api/syncable_service.h" |
| + |
| +namespace content { |
| +class BrowserContext; |
| +} // content |
| + |
| +namespace wifi_sync { |
| + |
| +class WifiCredentialSyncableService : public syncer::SyncableService, |
|
erikwright (departed)
2014/10/29 18:18:25
class comments?
mukesh agrawal
2014/10/30 18:41:28
Done.
|
| + public KeyedService { |
| + public: |
| + explicit WifiCredentialSyncableService(content::BrowserContext* context); |
|
erikwright (departed)
2014/10/29 18:18:25
comment
mukesh agrawal
2014/10/30 18:41:28
Done.
|
| + ~WifiCredentialSyncableService() override; |
| + |
| + // syncer::SyncableService implementation. |
| + syncer::SyncMergeResult MergeDataAndStartSyncing( |
| + syncer::ModelType type, |
| + const syncer::SyncDataList& initial_sync_data, |
| + scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
| + scoped_ptr<syncer::SyncErrorFactory> error_handler) override; |
| + void StopSyncing(syncer::ModelType type) override; |
| + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; |
| + syncer::SyncError ProcessSyncChanges( |
| + const tracked_objects::Location& from_here, |
| + const syncer::SyncChangeList& change_list) override; |
| + |
| + // Called from UI layer. |
| + bool IsRunning(); |
|
erikwright (departed)
2014/10/29 18:18:25
method comments?
mukesh agrawal
2014/10/30 18:41:28
Done.
|
| + void AddToSyncedNetworks(const std::string& item_id, |
| + const std::vector<unsigned char>& ssid, |
| + WifiSecurityClass security_class, |
| + const std::string& passphrase); |
| + void RemoveFromSyncedNetworks(const std::string& item_id); |
| + static const char* GetNormalizedSecurityClass( |
| + WifiSecurityClass security_class); |
| + |
| + private: |
| + content::BrowserContext* browser_context_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableService); |
|
erikwright (departed)
2014/10/29 18:18:25
#include "base/macros.h"
mukesh agrawal
2014/10/30 18:41:28
Done.
|
| +}; |
| + |
| +} // namespace wifi_sync |
| + |
| +#endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_ |