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

Unified Diff: components/wifi_sync/wifi_credential_syncable_service.h

Issue 675993005: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rename component, and add stub wifi_credential_syncable_service Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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..0f934f3a804eebb397e33a8e69604111060501b8
--- /dev/null
+++ b/components/wifi_sync/wifi_credential_syncable_service.h
@@ -0,0 +1,63 @@
+// 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"
+#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, public KeyedService {
+ public:
+ explicit WifiCredentialSyncableService(content::BrowserContext *context);
+ virtual ~WifiCredentialSyncableService();
stevenjb 2014/10/28 21:17:31 new style is: ~WifiCredentialSyncableService() ove
mukesh agrawal 2014/10/29 00:41:34 Done.
+
+ // syncer::SyncableService implementation.
+ virtual 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;
+ virtual void StopSyncing(syncer::ModelType type) override;
+ virtual syncer::SyncDataList GetAllSyncData(
+ syncer::ModelType type) const override;
+ virtual syncer::SyncError ProcessSyncChanges(
+ const tracked_objects::Location& from_here,
+ const syncer::SyncChangeList& change_list) override;
+
+ // Called from UI layer.
+ virtual bool IsRunning();
stevenjb 2014/10/28 21:17:31 nit: New virtuals should probably be declared firs
mukesh agrawal 2014/10/29 00:41:34 I actually don't know why I made these virtual, so
stevenjb 2014/10/29 17:49:45 I personally tend to put new public methods above
+ virtual void AddToSyncedNetworks(
+ const std::string& item_id,
+ const std::vector<unsigned char>& ssid,
+ WifiSecurityClass security_class,
+ const std::string& passphrase);
+ virtual void RemoveFromSyncedNetworks(const std::string& item_id);
+ static const char* GetNormalizedSecurityClass(
+ WifiSecurityClass security_class);
+
+ private:
+ content::BrowserContext *browser_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableService);
+};
+
+} // namespace wifi_sync
+
+#endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698